mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-13 05:58:51 +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
|
|
@ -1,6 +1,7 @@
|
|||
const { nanoid } = require('nanoid');
|
||||
const { sendEvent, GenerationJobManager } = require('@librechat/api');
|
||||
const { Constants } = require('@librechat/agents');
|
||||
const { logger } = require('@librechat/data-schemas');
|
||||
const { sendEvent, GenerationJobManager } = require('@librechat/api');
|
||||
const { Tools, StepTypes, FileContext, ErrorTypes } = require('librechat-data-provider');
|
||||
const {
|
||||
EnvVar,
|
||||
|
|
@ -441,10 +442,10 @@ function createToolEndCallback({ req, res, artifactPromises, streamId = null })
|
|||
return;
|
||||
}
|
||||
|
||||
{
|
||||
if (output.name !== Tools.execute_code) {
|
||||
return;
|
||||
}
|
||||
const isCodeTool =
|
||||
output.name === Tools.execute_code || output.name === Constants.PROGRAMMATIC_TOOL_CALLING;
|
||||
if (!isCodeTool) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!output.artifact.files) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue