
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.messages array with the { role: "tool" } items, it shows me this error:
name in the message element?c.env.AI.autorag('my-rag-name').aiSearch()aiSearch()aiSearch()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"langAiError: AiError: Invalid input{ role: "tool" }{"httpCode":400,"internalCode":8001,"message":"AiError: AiError: Invalid input (95e650b5-30fd-461e-a800-95d18c5295ef)","name":"AiError","skipSentry":true,"description":"Invalid input"}{"httpCode":500,"internalCode":3043,"message":"AiError: AiError: Internal server error (40099610-8d16-4868-9093-de9bafb5818f)","name":"AiError","skipSentry":true,"description":"Internal server error"}[wrangler:error] AiError: 3043: Internal server error
at Ai._parseError (cloudflare-internal:ai-api:212:24)
at async Ai.run (cloudflare-internal:ai-api:190:19)
at async runWorker (file:///home/proman4713/JavaScript%20Projects/MawjoodAPI/src/index.js:50:20)
at async jsonError (file:///home/proman4713/.nvm/versions/node/v22.13.1/lib/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts:22:10)
at async drainBody (file:///home/proman4713/.nvm/versions/node/v22.13.1/lib/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts:5:10)