mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-28 11:39:26 +01:00
22 lines
579 B
TypeScript
22 lines
579 B
TypeScript
import vine from '@vinejs/vine'
|
|
|
|
export const createSessionSchema = vine.compile(
|
|
vine.object({
|
|
title: vine.string().trim().minLength(1).maxLength(200),
|
|
model: vine.string().trim().optional(),
|
|
})
|
|
)
|
|
|
|
export const updateSessionSchema = vine.compile(
|
|
vine.object({
|
|
title: vine.string().trim().minLength(1).maxLength(200).optional(),
|
|
model: vine.string().trim().optional(),
|
|
})
|
|
)
|
|
|
|
export const addMessageSchema = vine.compile(
|
|
vine.object({
|
|
role: vine.enum(['system', 'user', 'assistant'] as const),
|
|
content: vine.string().trim().minLength(1),
|
|
})
|
|
) |