typetext
{
"max_tokens": 512,
"prompt": "Who are you?",
"temperature": 0.7,
"top_p": 0.95
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Rgg**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run lucataco/ollama-llama3.3-70b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/ollama-llama3.3-70b:29f7aa41293e897979d3e118ec8527542e5457417ae5d70e92b5f3f10033c5c3",
{
input: {
max_tokens: 512,
prompt: "Who are you?",
temperature: 0.7,
top_p: 0.95
}
}
);
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_Rgg**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/ollama-llama3.3-70b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/ollama-llama3.3-70b:29f7aa41293e897979d3e118ec8527542e5457417ae5d70e92b5f3f10033c5c3",
input={
"max_tokens": 512,
"prompt": "Who are you?",
"temperature": 0.7,
"top_p": 0.95
}
)
# The lucataco/ollama-llama3.3-70b model can stream output as it's running.
# The predict method returns an iterator, and you can iterate over that output.
for item in output:
# https://replicate.com/lucataco/ollama-llama3.3-70b/api#output-schema
print(item, end="")
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Rgg**********************************
This is your API token. Keep it to yourself.
Run lucataco/ollama-llama3.3-70b 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": "lucataco/ollama-llama3.3-70b:29f7aa41293e897979d3e118ec8527542e5457417ae5d70e92b5f3f10033c5c3",
"input": {
"max_tokens": 512,
"prompt": "Who are you?",
"temperature": 0.7,
"top_p": 0.95
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
I'm an artificial intelligence model known as Llama. Llama stands for "Large Language Model Meta AI."
{
"id": "mcsw3bc1f9rmc0ckta8t8x6f3m",
"model": "lucataco/ollama-llama3.3-70b",
"version": "29f7aa41293e897979d3e118ec8527542e5457417ae5d70e92b5f3f10033c5c3",
"input": {
"max_tokens": 512,
"prompt": "Who are you?",
"temperature": 0.7,
"top_p": 0.95
},
"logs": "",
"output": [
"I",
"'m",
" an",
" artificial",
" intelligence",
" model",
" known",
" as",
" L",
"lama",
".",
" L",
"lama",
" stands",
" for",
" \"",
"Large",
" Language",
" Model",
" Meta",
" AI",
".\"",
""
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-12-17T03:02:51.514Z",
"started_at": "2024-12-17T03:04:15.1006Z",
"completed_at": "2024-12-17T03:04:17.242314Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/mcsw3bc1f9rmc0ckta8t8x6f3m/cancel",
"get": "https://api.replicate.com/v1/predictions/mcsw3bc1f9rmc0ckta8t8x6f3m",
"stream": "https://stream-b.svc.ric1.c.replicate.net/v1/streams/r6qhwhsmkxynge4vppeg5qkbh4pczohzyatiwmehlmialt3eerua",
"web": "https://replicate.com/p/mcsw3bc1f9rmc0ckta8t8x6f3m"
},
"metrics": {
"predict_time": 2.1417139609999998,
"total_time": 85.728314
}
}