add summarize

This commit is contained in:
Dax Raad 2025-05-29 13:17:56 -04:00
parent d62ce482da
commit e68747a64a

View file

@ -195,6 +195,35 @@ export namespace Server {
return c.json(Session.abort(body.sessionID));
},
)
.post(
"/session_summarize",
describeRoute({
description: "Summarize the session",
responses: {
200: {
description: "Summarize the session",
content: {
"application/json": {
schema: resolver(z.boolean()),
},
},
},
},
}),
zValidator(
"json",
z.object({
sessionID: z.string(),
providerID: z.string(),
modelID: z.string(),
}),
),
async (c) => {
const body = c.req.valid("json");
await Session.summarize(body);
return c.json(true);
},
)
.post(
"/session_chat",
describeRoute({