mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
🔨 fix(ToolCall): Check output string type before performing .toLowerCase() (#4324)
This commit is contained in:
parent
5da7766fad
commit
bdc2fd307f
1 changed files with 2 additions and 1 deletions
|
|
@ -33,7 +33,8 @@ export default function ToolCall({
|
|||
|
||||
const [function_name, _domain] = name.split(actionDelimiter) as [string, string | undefined];
|
||||
const domain = _domain?.replaceAll(actionDomainSeparator, '.') ?? null;
|
||||
const error = output?.toLowerCase()?.includes('error processing tool');
|
||||
const error =
|
||||
typeof output === 'string' && output.toLowerCase().includes('error processing tool');
|
||||
|
||||
const args = useMemo(() => {
|
||||
if (typeof _args === 'string') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue