defaultquestion about the company to answer
typetext
{
"prompt": "What's the phone number of the company?"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_SRT**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run jordillull/acme-assistant using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"jordillull/acme-assistant:ed2fdefcaca8e4b7348da82ea2c19f40d0ea6b83901c7902872b9a885a30ccc0",
{
input: {
prompt: "What's the phone number of the company?"
}
}
);
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_SRT**********************************
This is your API token. Keep it to yourself.
import replicate
Run jordillull/acme-assistant using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"jordillull/acme-assistant:ed2fdefcaca8e4b7348da82ea2c19f40d0ea6b83901c7902872b9a885a30ccc0",
input={
"prompt": "What's the phone number of the company?"
}
)
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_SRT**********************************
This is your API token. Keep it to yourself.
Run jordillull/acme-assistant 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": "jordillull/acme-assistant:ed2fdefcaca8e4b7348da82ea2c19f40d0ea6b83901c7902872b9a885a30ccc0",
"input": {
"prompt": "What\'s the phone number of the company?"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Object output with 2 properties
0.629301905632019
+34 654 321 098 765
{
"id": "e3hrbgxw4srg80cewwqt4089jr",
"model": "jordillull/acme-assistant",
"version": "ed2fdefcaca8e4b7348da82ea2c19f40d0ea6b83901c7902872b9a885a30ccc0",
"input": {
"prompt": "What's the phone number of the company?"
},
"logs": "",
"output": {
"answer": "+34 654 321 098 765",
"score": 0.629301905632019
},
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-04-16T13:54:09.062Z",
"started_at": "2024-04-16T13:57:43.297751Z",
"completed_at": "2024-04-16T13:57:49.934898Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/e3hrbgxw4srg80cewwqt4089jr/cancel",
"get": "https://api.replicate.com/v1/predictions/e3hrbgxw4srg80cewwqt4089jr",
"web": "https://replicate.com/p/e3hrbgxw4srg80cewwqt4089jr"
},
"metrics": {
"predict_time": 6.637147,
"total_time": 220.872898
}
}