Trying to use the new Ai Agent Error
code:
const supportAgent = new Agent(components.agent, {
thread: openai.chat("gpt-4o-mini"),
textEmbedding: openai.embedding("text-embedding-3-small"),
instructions: "You are a helpful assistant.",
});
error on components.agent:
Argument of type '{ messages: { addMessages: FunctionReference<"mutation", "internal", { agentName?: string | undefined; embeddings?: { dimension: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096; model: string; vectors: (number[] | null)[]; } | undefined; ... 7 more ...; userId?: string | undefined; }, { ...; }>; ... 15 more...' is not assignable to parameter of type '{ [x: string]: { [x: string]: FunctionReference<any, "internal", any, any, string | undefined>; }; }'.
Property 'vector' is incompatible with index signature.
Type '{ index: { deleteBatch: FunctionReference<"mutation", "internal", { ids: string[]; }, null>; deleteBatchForThread: FunctionReference<"mutation", "internal", { cursor?: string | undefined; limit: number; model: string; threadId: string; vectorDimension: 128 | ... 7 more ... | 4096; }, { ...; }>; insertBatch: Function...' is not assignable to type '{ [x: string]: FunctionReference<any, "internal", any, any, string | undefined>; }'.
Property 'index' is incompatible with index signature.
Type '{ deleteBatch: FunctionReference<"mutation", "internal", { ids: string[]; }, null>; deleteBatchForThread: FunctionReference<"mutation", "internal", { cursor?: string | undefined; limit: number; model: string; threadId: string; vectorDimension: 128 | ... 7 more ... | 4096; }, { ...; }>; insertBatch: FunctionReference...' is missing the following properties from type 'FunctionReference<any, "internal", any, any, string | undefined>': _type, _visibility, _args, _returnType, _componentPath
