typetext
{
"max_length": 300,
"prompt": "why earth exists?",
"temperature": 0.7
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_JpN**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run tvytlx/llama7b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"tvytlx/llama7b:698c714e9816a4c494ec45a5f236d58828d37cff26fbc5419560676082d4fecf",
{
input: {
max_length: 300,
prompt: "why earth exists?",
temperature: 0.7
}
}
);
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_JpN**********************************
This is your API token. Keep it to yourself.
import replicate
Run tvytlx/llama7b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"tvytlx/llama7b:698c714e9816a4c494ec45a5f236d58828d37cff26fbc5419560676082d4fecf",
input={
"max_length": 300,
"prompt": "why earth exists?",
"temperature": 0.7
}
)
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_JpN**********************************
This is your API token. Keep it to yourself.
Run tvytlx/llama7b 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": "tvytlx/llama7b:698c714e9816a4c494ec45a5f236d58828d37cff26fbc5419560676082d4fecf",
"input": {
"max_length": 300,
"prompt": "why earth exists?",
"temperature": 0.7
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
As an AI language model, I don't have a personal belief or opinion on the existence of Earth. However, scientifically speaking, Earth exists because it is one of the planets in our solar system that has the right conditions for life to exist. It has the right temperature, atmosphere, and resources to support life as we know it.
{
"id": "fdt6cis5ync6db75heew6kbozm",
"model": "tvytlx/llama7b",
"version": "698c714e9816a4c494ec45a5f236d58828d37cff26fbc5419560676082d4fecf",
"input": {
"max_length": 300,
"prompt": "why earth exists?",
"temperature": 0.7
},
"logs": "",
"output": "\n As an AI language model, I don't have a personal belief or opinion on the existence of Earth. However, scientifically speaking, Earth exists because it is one of the planets in our solar system that has the right conditions for life to exist. It has the right temperature, atmosphere, and resources to support life as we know it.",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-04-03T16:34:25.334665Z",
"started_at": "2023-04-03T16:39:37.256073Z",
"completed_at": "2023-04-03T16:39:46.075503Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/fdt6cis5ync6db75heew6kbozm/cancel",
"get": "https://api.replicate.com/v1/predictions/fdt6cis5ync6db75heew6kbozm"
},
"metrics": {
"predict_time": 8.81943,
"total_time": 320.740838
}
}