Error invalid schema
I am trying to develop a plugin and got this error while asking for token creation
["◎ Starting CREATE_TOKEN handler..."]
Error in generateObject: InvalidArgumentError [AI_InvalidArgumentError]: Invalid argument for parameter schema: Schema is required for object output.
cause: undefined, parameter: 'schema', value: undefined, [Symbol(vercel.ai.error)]: true, [Symbol(vercel.ai.error.AI_InvalidArgumentError)]: true } ["⛔ AI_InvalidArgumentError: Invalid argument for parameter schema: Schema is required for object output."]
Hello @nidhinakranii! Welcome to the elizaOS community. Thank you for opening your first issue; we appreciate your contribution. You are now an elizaOS contributor!
@nidhinakranii
https://github.com/elizaOS/eliza/blob/de9811786bc63a5e6fd20868e1bfc219cde97543/packages/plugin-coinbase/src/types.ts#L100
Hello @nidhinakranii , the error suggests that the CREATE_TOKEN handler is missing a required schema parameter when attempting to generate an object. It appears the schema is either not defined or being passed as undefined in the function. Ensuring the schema parameter is properly defined and included in the request should resolve the issue.
I added schema and install it at root directory as well as plugin folder separately to check if it works but getting this issue :
Type 'ZodObject<{ name: ZodString; symbol: ZodString; }, "strip",
ZodTypeAny, { symbol?: string; name?: string; }, { symbol?: string; name?:
string; }>' is not assignable to type 'ZodType<any, ZodTypeDef, any>'.
The types of '_getOrReturnCtx(...).common.issues' are incompatible between
these types.
Type 'Zod.ZodIssue[]' is not assignable to type
@./anthropic/node_modules/zod/lib/ZodError").ZodIssue[]'.
Type 'Zod.ZodIssue' is not assignable to type
@./anthropic/node_modules/zod/lib/ZodError").ZodIssue'.
Type 'ZodInvalidUnionIssue & { fatal?: boolean; message: string; }' is not
assignable to type 'ZodIssue'.
Type 'Zod.ZodInvalidUnionIssue & { fatal?: boolean; message: string; }' is
not assignable to type
@./anthropic/node_modules/zod/lib/ZodError").ZodInvalidUnionIssue
& { fatal?: boolean; message: string; }'.
Type 'ZodInvalidUnionIssue & { fatal?: boolean; message: string; }' is not
assignable to type 'ZodInvalidUnionIssue'.
Types of property 'unionErrors' are incompatible.
Type 'Zod.ZodError
On Thu, 16 Jan 2025 at 22:37, HUC-VICTORY @.***> wrote:
Hello @nidhinakranii https://github.com/nidhinakranii , the error suggests that the CREATE_TOKEN handler is missing a required schema parameter when attempting to generate an object. It appears the schema is either not defined or being passed as undefined in the function. Ensuring the schema parameter is properly defined and included in the request should resolve the issue.
— Reply to this email directly, view it on GitHub https://github.com/elizaOS/eliza/issues/2339#issuecomment-2597366108, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATHEF526IGM3LXQTTROA3XT2LB3JBAVCNFSM6AAAAABVIHPKVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJXGM3DMMJQHA . You are receiving this because you were mentioned.Message ID: @.***>
This issue has been automatically marked as stale due to 30 days of inactivity. If no further activity occurs within 7 days, it will be closed automatically. Please take action if this issue is still relevant.