mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-21 01:36:13 +01:00
refactor: tool classification and calling logic
This commit is contained in:
parent
c7ddaaf298
commit
d4bdb3be00
6 changed files with 26 additions and 17 deletions
|
|
@ -91,7 +91,11 @@ const Part = memo(
|
|||
|
||||
const isToolCall =
|
||||
'args' in toolCall && (!toolCall.type || toolCall.type === ToolCallTypes.TOOL_CALL);
|
||||
if (isToolCall && toolCall.name === Tools.execute_code) {
|
||||
if (
|
||||
isToolCall &&
|
||||
(toolCall.name === Tools.execute_code ||
|
||||
toolCall.name === Constants.PROGRAMMATIC_TOOL_CALLING)
|
||||
) {
|
||||
return (
|
||||
<ExecuteCode
|
||||
attachments={attachments}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ export default function ExecuteCode({
|
|||
const [contentHeight, setContentHeight] = useState<number | undefined>(0);
|
||||
|
||||
const prevShowCodeRef = useRef<boolean>(showCode);
|
||||
const { lang, code } = useParseArgs(args) ?? ({} as ParsedArgs);
|
||||
const { lang = 'py', code } = useParseArgs(args) ?? ({} as ParsedArgs);
|
||||
const progress = useProgress(initialProgress);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
|
|
@ -702,7 +702,7 @@
|
|||
"com_ui_agents_allow_use": "Allow using Agents",
|
||||
"com_ui_all": "all",
|
||||
"com_ui_all_proper": "All",
|
||||
"com_ui_analyzing": "Analyzing",
|
||||
"com_ui_analyzing": "Running tools with code",
|
||||
"com_ui_analyzing_finished": "Finished analyzing",
|
||||
"com_ui_api_key": "API Key",
|
||||
"com_ui_archive": "Archive",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue