I’m using the simple template for the translation genai sample (code below), and I keep getting request timeouts. I’m on the free tier w/ a ten second limit, but shouldn’t it be enough time to process?
Here’s the code, but like I said, it’s right from the sample.
import { Ai } from '@cloudflare/ai';
export default {
async fetch(request, env) {
const ai = new Ai(env.AI);
const inputs = {
text: 'Tell me a joke about Cloudflare',
source_lang: 'en',
target_lang: 'fr'
};
const response = await ai.run('@cf/meta/m2m100-1.2b', inputs);
return Response.json({ inputs, response });
},
};
Ok. I had done another test previously with one of the other models and it returned really quickly. Is this one that much slower? (And if you don’t have the limit and could give it a quick try, I’d love to hear how long it takes for you.