feat(format-history): remove extra :
This commit is contained in:
parent
6ea17d54c6
commit
9d89a4413b
2 changed files with 2 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue