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'); };