You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create an agent using (gemini-1.5-flash) as the chat model. However, I get a TypeScript error because the model returned by google.chat is a LanguageModelV2, while Convex Agent expects a LanguageModelV1.
`import { Agent } from "@convex-dev/agent";
import { components } from "../_generated/api";
import { google } from "@ai-sdk/google";
export const chatAgent = new Agent(components.agent, {
name: "human-resources-agent",
chat: google.chat("gemini-1.5-flash"), // ❌ Type error here
instructions: "You are a helpful assistant.",
});
`
Error Message:
Property 'defaultObjectGenerationMode' is missing in type 'LanguageModelV2' but required in type 'LanguageModelV1'.