Merge branch 'ChatGPTNextWeb:main' into main

This commit is contained in:
do02fw
2024-05-07 09:34:26 +08:00
committed by GitHub
7 changed files with 35 additions and 16 deletions

View File

@@ -161,6 +161,13 @@ export class ClaudeApi implements LLMApi {
};
});
if (prompt[0]?.role === "assistant") {
prompt.unshift({
role: "user",
content: ";",
});
}
const requestBody: AnthropicChatRequest = {
messages: prompt,
stream: shouldStream,