defaultWhat's your mood today?
typetext
{
"max_tokens": 500,
"prompt": "How do you make ratatouille?",
"repetition_penalty": 1.2,
"temperature": 0.75,
"top_p": 1
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_HPc**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run stability-ai/stablelm-tuned-alpha-7b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"stability-ai/stablelm-tuned-alpha-7b:4a9a32b4fd86c2d047f1d271fa93972683ec6ef1cf82f402bd021f267330b50b",
{
input: {
max_tokens: 500,
prompt: "How do you make ratatouille?",
repetition_penalty: 1.2,
temperature: 0.75,
top_p: 1
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_HPc**********************************
This is your API token. Keep it to yourself.
import replicate
Run stability-ai/stablelm-tuned-alpha-7b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"stability-ai/stablelm-tuned-alpha-7b:4a9a32b4fd86c2d047f1d271fa93972683ec6ef1cf82f402bd021f267330b50b",
input={
"max_tokens": 500,
"prompt": "How do you make ratatouille?",
"repetition_penalty": 1.2,
"temperature": 0.75,
"top_p": 1
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_HPc**********************************
This is your API token. Keep it to yourself.
Run stability-ai/stablelm-tuned-alpha-7b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "stability-ai/stablelm-tuned-alpha-7b:4a9a32b4fd86c2d047f1d271fa93972683ec6ef1cf82f402bd021f267330b50b",
"input": {
"max_tokens": 500,
"prompt": "How do you make ratatouille?",
"repetition_penalty": 1.2,
"temperature": 0.75,
"top_p": 1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
First start with some lovely vegetables like eggplant or zucchini - whatever you fancy! Then cook them up nice and tender. Next put on some herbs if you want something special, such as thyme or rosemary - maybe a sprinkling of smoked paprika for extra flavor. Once everything's cooked through stir it all together well so each spoonful contains delicious little bits of veggies, herbs and flavourings. And serve over plenty of good quality white rice – either keep it simple with basmati or let your guests choose their own pasta from amongst several available options... The end-result should look delectable too!
{
"id": "exec534nwzebthkdtiafwq56ve",
"model": "stability-ai/stablelm-tuned-alpha-7b",
"version": "4a9a32b4fd86c2d047f1d271fa93972683ec6ef1cf82f402bd021f267330b50b",
"input": {
"max_tokens": 500,
"prompt": "How do you make ratatouille?",
"repetition_penalty": 1.2,
"temperature": 0.75,
"top_p": 1
},
"logs": "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/transformers/pipelines/base.py:1070: UserWarning: You seem to be using the pipelines sequentially on GPU. In order to maximize efficiency please use a dataset\nwarnings.warn(\nSetting `pad_token_id` to `eos_token_id`:0 for open-end generation.",
"output": "First start with some lovely vegetables like eggplant or zucchini - whatever you fancy! Then cook them up nice and tender. Next put on some herbs if you want something special, such as thyme or rosemary - maybe a sprinkling of smoked paprika for extra flavor. Once everything's cooked through stir it all together well so each spoonful contains delicious little bits of veggies, herbs and flavourings. And serve over plenty of good quality white rice – either keep it simple with basmati or let your guests choose their own pasta from amongst several available options... The end-result should look delectable too!",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-04-20T14:14:16.492424Z",
"started_at": "2023-04-20T14:14:16.588982Z",
"completed_at": "2023-04-20T14:14:20.152141Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/exec534nwzebthkdtiafwq56ve/cancel",
"get": "https://api.replicate.com/v1/predictions/exec534nwzebthkdtiafwq56ve"
},
"metrics": {
"predict_time": 3.563159,
"total_time": 3.659717
}
}