@lcas58/esmi-api-types 1.0.24 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -206,6 +206,8 @@ export const chat = async (c) => {
206
206
  const { db } = createDb(c.env);
207
207
  const result = await runChatAgent(c.env, db, {
208
208
  message: body.message,
209
+ sportId: body.sportId,
210
+ sportName: body.sportName,
209
211
  history: body.history,
210
212
  city: body.city,
211
213
  state: body.state,
@@ -231,9 +233,12 @@ export const chatStream = async (c) => {
231
233
  try {
232
234
  await runStreamingChatAgent(c.env, db, {
233
235
  message: body.message,
236
+ sportId: body.sportId,
237
+ sportName: body.sportName,
234
238
  history: body.history,
235
239
  city: body.city,
236
240
  state: body.state,
241
+ enableWebSearch: body.enableWebSearch,
237
242
  }, writer);
238
243
  }
239
244
  catch (err) {
@@ -335,12 +335,15 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
335
335
  input: {
336
336
  json: {
337
337
  message: string;
338
- city?: string | undefined;
339
- state?: string | undefined;
338
+ sportId: string;
339
+ city: string;
340
+ state: string;
341
+ sportName: string;
340
342
  history?: {
341
343
  content: string;
342
344
  role: "user" | "assistant";
343
345
  }[] | undefined;
346
+ enableWebSearch?: boolean | undefined;
344
347
  };
345
348
  };
346
349
  output: {
@@ -352,12 +355,15 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
352
355
  input: {
353
356
  json: {
354
357
  message: string;
355
- city?: string | undefined;
356
- state?: string | undefined;
358
+ sportId: string;
359
+ city: string;
360
+ state: string;
361
+ sportName: string;
357
362
  history?: {
358
363
  content: string;
359
364
  role: "user" | "assistant";
360
365
  }[] | undefined;
366
+ enableWebSearch?: boolean | undefined;
361
367
  };
362
368
  };
363
369
  output: {
@@ -1401,6 +1401,8 @@ export declare const saveExternal: {
1401
1401
  };
1402
1402
  export declare const chatRequestSchema: z.ZodObject<{
1403
1403
  message: z.ZodString;
1404
+ sportId: z.ZodString;
1405
+ sportName: z.ZodString;
1404
1406
  history: z.ZodOptional<z.ZodArray<z.ZodObject<{
1405
1407
  role: z.ZodEnum<["user", "assistant"]>;
1406
1408
  content: z.ZodString;
@@ -1411,24 +1413,31 @@ export declare const chatRequestSchema: z.ZodObject<{
1411
1413
  content: string;
1412
1414
  role: "user" | "assistant";
1413
1415
  }>, "many">>;
1414
- city: z.ZodOptional<z.ZodString>;
1415
- state: z.ZodOptional<z.ZodString>;
1416
+ city: z.ZodString;
1417
+ state: z.ZodString;
1418
+ enableWebSearch: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1416
1419
  }, "strip", z.ZodTypeAny, {
1417
1420
  message: string;
1418
- city?: string | undefined;
1419
- state?: string | undefined;
1421
+ sportId: string;
1422
+ city: string;
1423
+ state: string;
1424
+ sportName: string;
1425
+ enableWebSearch: boolean;
1420
1426
  history?: {
1421
1427
  content: string;
1422
1428
  role: "user" | "assistant";
1423
1429
  }[] | undefined;
1424
1430
  }, {
1425
1431
  message: string;
1426
- city?: string | undefined;
1427
- state?: string | undefined;
1432
+ sportId: string;
1433
+ city: string;
1434
+ state: string;
1435
+ sportName: string;
1428
1436
  history?: {
1429
1437
  content: string;
1430
1438
  role: "user" | "assistant";
1431
1439
  }[] | undefined;
1440
+ enableWebSearch?: boolean | undefined;
1432
1441
  }>;
1433
1442
  export declare const chatResponseSchema: z.ZodObject<{
1434
1443
  reply: z.ZodString;
@@ -1517,6 +1526,8 @@ export declare const chat: {
1517
1526
  "application/json": {
1518
1527
  schema: z.ZodObject<{
1519
1528
  message: z.ZodString;
1529
+ sportId: z.ZodString;
1530
+ sportName: z.ZodString;
1520
1531
  history: z.ZodOptional<z.ZodArray<z.ZodObject<{
1521
1532
  role: z.ZodEnum<["user", "assistant"]>;
1522
1533
  content: z.ZodString;
@@ -1527,24 +1538,31 @@ export declare const chat: {
1527
1538
  content: string;
1528
1539
  role: "user" | "assistant";
1529
1540
  }>, "many">>;
1530
- city: z.ZodOptional<z.ZodString>;
1531
- state: z.ZodOptional<z.ZodString>;
1541
+ city: z.ZodString;
1542
+ state: z.ZodString;
1543
+ enableWebSearch: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1532
1544
  }, "strip", z.ZodTypeAny, {
1533
1545
  message: string;
1534
- city?: string | undefined;
1535
- state?: string | undefined;
1546
+ sportId: string;
1547
+ city: string;
1548
+ state: string;
1549
+ sportName: string;
1550
+ enableWebSearch: boolean;
1536
1551
  history?: {
1537
1552
  content: string;
1538
1553
  role: "user" | "assistant";
1539
1554
  }[] | undefined;
1540
1555
  }, {
1541
1556
  message: string;
1542
- city?: string | undefined;
1543
- state?: string | undefined;
1557
+ sportId: string;
1558
+ city: string;
1559
+ state: string;
1560
+ sportName: string;
1544
1561
  history?: {
1545
1562
  content: string;
1546
1563
  role: "user" | "assistant";
1547
1564
  }[] | undefined;
1565
+ enableWebSearch?: boolean | undefined;
1548
1566
  }>;
1549
1567
  };
1550
1568
  };
@@ -86,9 +86,12 @@ const chatMessageSchema = z.object({
86
86
  });
87
87
  export const chatRequestSchema = z.object({
88
88
  message: z.string().min(1),
89
+ sportId: z.string().min(1),
90
+ sportName: z.string().min(1),
89
91
  history: z.array(chatMessageSchema).optional(),
90
- city: z.string().optional(),
91
- state: z.string().optional(),
92
+ city: z.string().min(1),
93
+ state: z.string().min(1),
94
+ enableWebSearch: z.boolean().optional().default(false),
92
95
  });
93
96
  export const chatResponseSchema = z.object({
94
97
  reply: z.string(),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lcas58/esmi-api-types",
3
3
  "type": "module",
4
- "version": "1.0.24",
4
+ "version": "1.0.26",
5
5
  "license": "MIT",
6
6
  "exports": {
7
7
  ".": {