fixes handling of DALL-E content_policy_violation errors
This commit is contained in:
parent
1fb3eac154
commit
96756d32f3
|
@ -209,9 +209,7 @@ export function buildSpoofedCompletion({
|
|||
],
|
||||
};
|
||||
case "openai-image":
|
||||
throw new Error(
|
||||
`Spoofed completions not supported for ${format} requests`
|
||||
);
|
||||
return obj;
|
||||
default:
|
||||
assertNever(format);
|
||||
}
|
||||
|
@ -287,7 +285,7 @@ export function buildSpoofedSSE({
|
|||
],
|
||||
});
|
||||
case "openai-image":
|
||||
throw new Error(`SSE not supported for ${format} requests`);
|
||||
return JSON.stringify(obj);
|
||||
default:
|
||||
assertNever(format);
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ export class AnthropicKeyChecker extends KeyCheckerBase<AnthropicKey> {
|
|||
} else if (COPYRIGHT_PROMPT.some((re) => re.test(completion))) {
|
||||
this.log.info(
|
||||
{ key: key.hash, response: completion },
|
||||
"Key is has copyright CYA prompt."
|
||||
"Key has copyright CYA prompt."
|
||||
);
|
||||
return { pozzed: true };
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue