@lcas58/esmi-api-types 1.0.24 → 1.0.25
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,6 +233,8 @@ 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,
|
|
@@ -335,6 +335,8 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
|
|
|
335
335
|
input: {
|
|
336
336
|
json: {
|
|
337
337
|
message: string;
|
|
338
|
+
sportId: string;
|
|
339
|
+
sportName: string;
|
|
338
340
|
city?: string | undefined;
|
|
339
341
|
state?: string | undefined;
|
|
340
342
|
history?: {
|
|
@@ -352,6 +354,8 @@ declare const router: import("@hono/zod-openapi").OpenAPIHono<import("../../shar
|
|
|
352
354
|
input: {
|
|
353
355
|
json: {
|
|
354
356
|
message: string;
|
|
357
|
+
sportId: string;
|
|
358
|
+
sportName: string;
|
|
355
359
|
city?: string | undefined;
|
|
356
360
|
state?: string | undefined;
|
|
357
361
|
history?: {
|
|
@@ -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;
|
|
@@ -1415,6 +1417,8 @@ export declare const chatRequestSchema: z.ZodObject<{
|
|
|
1415
1417
|
state: z.ZodOptional<z.ZodString>;
|
|
1416
1418
|
}, "strip", z.ZodTypeAny, {
|
|
1417
1419
|
message: string;
|
|
1420
|
+
sportId: string;
|
|
1421
|
+
sportName: string;
|
|
1418
1422
|
city?: string | undefined;
|
|
1419
1423
|
state?: string | undefined;
|
|
1420
1424
|
history?: {
|
|
@@ -1423,6 +1427,8 @@ export declare const chatRequestSchema: z.ZodObject<{
|
|
|
1423
1427
|
}[] | undefined;
|
|
1424
1428
|
}, {
|
|
1425
1429
|
message: string;
|
|
1430
|
+
sportId: string;
|
|
1431
|
+
sportName: string;
|
|
1426
1432
|
city?: string | undefined;
|
|
1427
1433
|
state?: string | undefined;
|
|
1428
1434
|
history?: {
|
|
@@ -1517,6 +1523,8 @@ export declare const chat: {
|
|
|
1517
1523
|
"application/json": {
|
|
1518
1524
|
schema: z.ZodObject<{
|
|
1519
1525
|
message: z.ZodString;
|
|
1526
|
+
sportId: z.ZodString;
|
|
1527
|
+
sportName: z.ZodString;
|
|
1520
1528
|
history: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1521
1529
|
role: z.ZodEnum<["user", "assistant"]>;
|
|
1522
1530
|
content: z.ZodString;
|
|
@@ -1531,6 +1539,8 @@ export declare const chat: {
|
|
|
1531
1539
|
state: z.ZodOptional<z.ZodString>;
|
|
1532
1540
|
}, "strip", z.ZodTypeAny, {
|
|
1533
1541
|
message: string;
|
|
1542
|
+
sportId: string;
|
|
1543
|
+
sportName: string;
|
|
1534
1544
|
city?: string | undefined;
|
|
1535
1545
|
state?: string | undefined;
|
|
1536
1546
|
history?: {
|
|
@@ -1539,6 +1549,8 @@ export declare const chat: {
|
|
|
1539
1549
|
}[] | undefined;
|
|
1540
1550
|
}, {
|
|
1541
1551
|
message: string;
|
|
1552
|
+
sportId: string;
|
|
1553
|
+
sportName: string;
|
|
1542
1554
|
city?: string | undefined;
|
|
1543
1555
|
state?: string | undefined;
|
|
1544
1556
|
history?: {
|
|
@@ -86,6 +86,8 @@ 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
92
|
city: z.string().optional(),
|
|
91
93
|
state: z.string().optional(),
|