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
For cases where you already have JSON Schema definitions or prefer not to use Zod, you can pass raw JSON Schema objects directly:
58
+
59
+
```typescript
60
+
importtype { JSONSchema } from"@tanstack/ai";
61
+
62
+
const inputSchema:JSONSchema= {
63
+
type: "object",
64
+
properties: {
65
+
location: {
66
+
type: "string",
67
+
description: "City name",
68
+
},
69
+
unit: {
70
+
type: "string",
71
+
enum: ["celsius", "fahrenheit"],
72
+
},
73
+
},
74
+
required: ["location"],
75
+
};
76
+
```
77
+
78
+
> **Note:** When using JSON Schema, TypeScript will infer `any` for input/output types since JSON Schema cannot provide compile-time type information. Zod schemas are recommended for full type safety.
0 commit comments