From 9d89a4413bd34f15f9dc22dec164fbf9d83c7c43 Mon Sep 17 00:00:00 2001 From: ItzCrazyKns <95534749+ItzCrazyKns@users.noreply.github.com> Date: Wed, 23 Jul 2025 12:20:49 +0530 Subject: [PATCH] feat(format-history): remove extra `:` --- src/app/api/search/route.ts | 3 +-- src/lib/utils/formatHistory.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/api/search/route.ts b/src/app/api/search/route.ts index 16325de..5f752ec 100644 --- a/src/app/api/search/route.ts +++ b/src/app/api/search/route.ts @@ -81,8 +81,7 @@ export const POST = async (req: Request) => { if (body.chatModel?.provider === 'custom_openai') { llm = new ChatOpenAI({ modelName: body.chatModel?.name || getCustomOpenaiModelName(), - apiKey: - body.chatModel?.customOpenAIKey || getCustomOpenaiApiKey(), + apiKey: body.chatModel?.customOpenAIKey || getCustomOpenaiApiKey(), temperature: 0.7, configuration: { baseURL: diff --git a/src/lib/utils/formatHistory.ts b/src/lib/utils/formatHistory.ts index 6fdede6..733ffc0 100644 --- a/src/lib/utils/formatHistory.ts +++ b/src/lib/utils/formatHistory.ts @@ -4,7 +4,7 @@ const formatChatHistoryAsString = (history: BaseMessage[]) => { return history .map( (message) => - `${isAIMessage(message) ? 'AI' : 'User:'}: ${message.content}`, + `${isAIMessage(message) ? 'AI' : 'User'}: ${message.content}`, ) .join('\n'); };