Speed Issue

curl https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID+}/ai/run/@cf/meta/llama-3.1-8b-instruct \
-H 'Authorization: Bearer {API_TOKEN}' \
-d '{ "prompt": "Where did the phrase Hello World come from" }'
curl https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID+}/ai/run/@cf/meta/llama-3.1-8b-instruct \
-H 'Authorization: Bearer {API_TOKEN}' \
-d '{ "prompt": "Where did the phrase Hello World come from" }'
Is it normal for this request to take over 10 seconds to process? I'm trying to make a simple chatbot AI, however the worker is extremely slow, is it normally like this or am i doing something wrong?
No description
8 Replies
bat
batOP4w ago
For example, In a roblox project im making, it took 20 seconds to process the curl above. (As shown in the attachment)
James
James4w ago
That's pretty normal and expected, yes. A common solution for this in AI apps is to stream the response as it's being generated.
bat
batOP4w ago
Yeah i've already moved onto workers & pages for faster responses so i can make my own prompt aswell. Thanks for helping
dolphin_defa
dolphin_defa4w ago
It keeps loading here on the right, what should I do? Please help me, thank you!
No description
James
James4w ago
What browser/OS versions are you using?
bat
batOP4w ago
Hey by the way am I able to customize the ai so I can make it say whatever I want? I'm trying to make it say basic racist stuff, but sometimes it does work & sometimes not, why's that?
James
James4w ago
Not something you're going to get support for here, sorry.
bat
batOP4w ago
Alright, was just curious why it allowed that sometimes & why not, the ai isn't mine im just working on it Anyways, can you please tell me what the API response would be when you hit the maximum of 100k calls per day?

Did you find this page helpful?