Remove legacy Claude stop sequences

This commit is contained in:
Cohee 2024-06-20 22:53:07 +03:00
parent a5baa3605f
commit e9f93ba748

View File

@ -119,7 +119,7 @@ async function sendClaudeRequest(request, response) {
let use_system_prompt = (request.body.model.startsWith('claude-2') || request.body.model.startsWith('claude-3')) && request.body.claude_use_sysprompt;
let converted_prompt = convertClaudeMessages(request.body.messages, request.body.assistant_prefill, use_system_prompt, request.body.human_sysprompt_message, request.body.char_name, request.body.user_name);
// Add custom stop sequences
const stopSequences = ['\n\nHuman:', '\n\nSystem:', '\n\nAssistant:'];
const stopSequences = [];
if (Array.isArray(request.body.stop)) {
stopSequences.push(...request.body.stop);
}