Improve "\n\nHuman" prefix requirement detection for Anthropic (khanon/oai-reverse-proxy!63)

This commit is contained in:
devvnull 2024-02-08 16:28:11 +00:00 committed by khanon
parent bbee056114
commit 0ce4582f3b
1 changed files with 1 additions and 1 deletions

View File

@ -436,7 +436,7 @@ async function maybeHandleMissingPreambleError(
) {
if (
errorPayload.error?.type === "invalid_request_error" &&
errorPayload.error?.message === 'prompt must start with "\n\nHuman:" turn'
errorPayload.error?.message.startsWith('prompt must start with "\n\nHuman:" turn')
) {
req.log.warn(
{ key: req.key?.hash },