I think we're still working on the documentation! But in short it should look something like: ```
I think we're still working on the documentation! But in short it should look something like:
export default {
async fetch(request, env, ctx): Promise<Response> {
const resp = await env.AI.run("@cf/deepgram/aura-1", {}, {
websocket: true
});
return resp;
},
} satisfies ExportedHandler<Env>;mip_opt_out=true affect the unit pricing stated on the cf api page? (when using deepgram directly that significantly increases the price)
@hf/nousresearch/hermes-2-pro-mistral-7b@cf/meta/llama-3.3-70b-instruct-fp8-fast, @cf/mistralai/mistral-small-3.1-24b-instruct, @cf/meta/llama-4-scout-17b-16e-instruct) can use function calling at all (the reply is always text).
tools to my AI.run functionc.env.AI.autorag('my-rag-name').aiSearch() to ask it basically "give me the correct version of the given name". Hoping it would fix the spelling of "Suma Covjek" to "Šuma Čovjek", as listed in one of the files. But results are underwhelming. When I looked at the AI Gateway and what the aiSearch() used for the default system message, I see "...no relevant documents were retrieved for the user's query...". For each and all of them. If I do a search in the playground it would sometimes return a file, but often not the right or relevant one, even if the exact correct spelling is given. What am I missing? How come aiSearch() would not find my content?
lang field to en or fr. While en works, we get AiError: AiError: Invalid input if we set the lang to fr.{"httpCode":400,"internalCode":8001,"message":"AiError: AiError: Invalid input (95e650b5-30fd-461e-a800-95d18c5295ef)","name":"AiError","skipSentry":true,"description":"Invalid input"}Argument of type '"@cf/deepgram/nova-3"' is not assignable to parameter of type 'keyof AiModels'.ts(2345)
this.env.AI.run(
"@cf/deepgram/nova-3"mip_opt_out=true@hf/nousresearch/hermes-2-pro-mistral-7b@cf/meta/llama-3.3-70b-instruct-fp8-fast@cf/mistralai/mistral-small-3.1-24b-instruct@cf/meta/llama-4-scout-17b-16e-instruct)
{
"errors": [
{
"message": "AiError: AiError: Invalid input",
"code": 8001
}
],
"success": false,
"result": {},
"messages": []
}tools: [
{
type: “function”,
function: {
name: "getWeather",
description: "Return the weather for a latitude and longitude",
parameters: {
// ....
},
},
}],