mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-04 21:32:39 +02:00
Add create chat mutation
This commit is contained in:
parent
666b797772
commit
1cf36c6e6c
3 changed files with 57 additions and 14 deletions
|
|
@ -34,10 +34,17 @@ export const deleteChatResponse = z.object({
|
|||
|
||||
export const deleteChatRequest = chatSummary.pick({ id: true });
|
||||
|
||||
export const createChatRequest = chatDetails.omit({
|
||||
created_at: true,
|
||||
id: true,
|
||||
state_version: true,
|
||||
export const createChatRequest = z.object({
|
||||
type: chatTypeEnum,
|
||||
title: z.string().optional().default("Untitled Chat"),
|
||||
initial_connectors: z.array(z.string()),
|
||||
messages: z.array(
|
||||
z.object({
|
||||
role: z.enum(["user", "assistant"]),
|
||||
content: z.string(),
|
||||
})
|
||||
),
|
||||
search_space_id: z.number(),
|
||||
});
|
||||
|
||||
export const updateChatRequest = chatDetails.omit({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue