diff --git a/src/app/api/chat/route.ts b/src/app/api/chat/route.ts index d48fbb6..e566edb 100644 --- a/src/app/api/chat/route.ts +++ b/src/app/api/chat/route.ts @@ -49,6 +49,7 @@ type Body = { files: Array; chatModel: ChatModel; embeddingModel: EmbeddingModel; + systemInstructions: string; }; const handleEmitterEvents = async ( @@ -278,6 +279,7 @@ export const POST = async (req: Request) => { embedding, body.optimizationMode, body.files, + body.systemInstructions, ); const responseStream = new TransformStream(); diff --git a/src/app/api/search/route.ts b/src/app/api/search/route.ts index d3e98ca..59d84ff 100644 --- a/src/app/api/search/route.ts +++ b/src/app/api/search/route.ts @@ -125,6 +125,7 @@ export const POST = async (req: Request) => { embeddings, body.optimizationMode, [], + "", ); if (!body.stream) { diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx index efe54d5..8e1c45a 100644 --- a/src/app/settings/page.tsx +++ b/src/app/settings/page.tsx @@ -54,6 +54,38 @@ const Input = ({ className, isSaving, onSave, ...restProps }: InputProps) => { ); }; +interface TextareaProps extends React.InputHTMLAttributes { + isSaving?: boolean; + onSave?: (value: string) => void; +} + +const Textarea = ({ + className, + isSaving, + onSave, + ...restProps +}: TextareaProps) => { + return ( +
+