mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🛡️ feat: Add Model Refusal Error Handling (Anthropic) (#10478)
* feat: Add error handling for model refusal and update translations * refactor: error handling in AgentClient to improve logging and cleanup process * refactor: Update error message for response refusal to improve clarity
This commit is contained in:
parent
3f62ce054f
commit
524fc5bae4
5 changed files with 54 additions and 29 deletions
|
|
@ -43,6 +43,7 @@ const errorMessages = {
|
|||
[ErrorTypes.NO_BASE_URL]: 'com_error_no_base_url',
|
||||
[ErrorTypes.INVALID_ACTION]: `com_error_${ErrorTypes.INVALID_ACTION}`,
|
||||
[ErrorTypes.INVALID_REQUEST]: `com_error_${ErrorTypes.INVALID_REQUEST}`,
|
||||
[ErrorTypes.REFUSAL]: 'com_error_refusal',
|
||||
[ErrorTypes.MISSING_MODEL]: (json: TGenericError, localize: LocalizeFunction) => {
|
||||
const { info: endpoint } = json;
|
||||
const provider = (alternateName[endpoint ?? ''] as string | undefined) ?? endpoint ?? 'unknown';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue