#If you are using Gemini 1.5 flash and
1 messages · Page 1 of 1 (latest)
@runic ruin
I’m using vercel's AI-SDK to connect to AI providers such as Google and Gemini. The API calls are made to the following URL: https://generativelanguage.googleapis.com/v1beta/.
Here is the method I’m using:
const response = await generateObject({
model: google("models/gemini-1.5-flash-001"),
temperature: 0.75,
schema,
prompt,
});
The prompt is plain text requesting dinner recipes.
For reference, you can find the file containing this code at: https://github.com/Immerhaze/next-foodia/blob/main/app/api/generate/route.ts
I don’t think I can be of assistance. I’m not good at Ecmascript, and unfamiliar with the library you use. One thing I did notice: the error message you are getting is from the library, not from any of the console.log or console.error messages in your code. The library also decided to use retry logic, and I agree with that, but you don’t seem to have asked it to do that. My point is, the library is doing things for you that I don’t understand and possibly that you don’t fully understand either. Maybe asking in whatever forum or support structure comes with the library is going to be helpful.