mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-23 10:46:12 +01:00
refactor: tool classification and calling logic
This commit is contained in:
parent
af1e898a60
commit
f23fc5d7ef
6 changed files with 25 additions and 14 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(() => {
|
||||
|
|
|
|||
|
|
@ -694,7 +694,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_api_key_source": "API Key Source",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue