TypeError: Cannot read properties of undefined (reading 'AI'). This is my Env interface:const env = [...] and running AI inside a function with function exampleFunction(env: Env) but it also didn't work.
@/hf/meta-llama/meta-llama-3-8b-instruct and @cf/meta/llama-3-8b-instruct and both provide me with almost completely random responses when trying to use a system message along the prompt.

modelMappings that's in @cloudflare/ai but gone in @cloudflare/workers-typesTypeError: Cannot read properties of undefined (reading 'AI')const env = [...]function exampleFunction(env: Env)@/hf/meta-llama/meta-llama-3-8b-instruct@cf/meta/llama-3-8b-instructmodelMappings@cloudflare/aiinterface Env {
AI: any;
}
const env = (globalThis as any).env as Env const intent = await env.AI.run('@cf/meta/llama-3-8b-instruct', {
messages: [
{
"role": "system",
"content": `I will help you figure out intent of the message based on available options. Available intents:\n${INTENTS.join('\n')}\n\nI will choose an intent from the list that best matches the user's prompt and return only its number. There will be no other text in my response other then the found number. I will use the following format: [intent number from the list].\n\nExample of response when found:\n3\n\nExample of when intent cannot be determined:\nNo intent`
},
{
"role": "user",
"content": prompt
}
]
});{
messages: [
{ role: "system", content: "you are a professional computer science assistant" },
{ role: "user", content: "what is WASM?" },
{ role: "assistant", content: "WASM (WebAssembly) is a binary instruction format that is designed to be a platform-agnostic" },
{ role: "user", content: "does Python compile to WASM?" },
{ role: "assistant", content: "No, Python does not directly compile to WebAssembly" },
{ role: "user", content: "what about Rust?" },
],
};