mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-14 06:28:52 +01:00
chore: update @librechat/agents dependency to version 3.0.71 and enhance agent tool loading logic
- Updated the @librechat/agents package to version 3.0.71 across multiple files. - Added support for handling deferred loading of tools in agent initialization and execution processes. - Improved the extraction of discovered tools from message history to optimize tool loading behavior.
This commit is contained in:
parent
1496e11e88
commit
4a6c2aa1e8
8 changed files with 179 additions and 14 deletions
|
|
@ -1019,6 +1019,7 @@ class AgentClient extends BaseClient {
|
|||
|
||||
run = await createRun({
|
||||
agents,
|
||||
messages,
|
||||
indexTokenCountMap,
|
||||
runId: this.responseMessageId,
|
||||
signal: abortController.signal,
|
||||
|
|
|
|||
|
|
@ -374,6 +374,7 @@ async function processRequiredActions(client, requiredActions) {
|
|||
* toolContextMap?: Record<string, unknown>;
|
||||
* userMCPAuthMap?: Record<string, Record<string, string>>;
|
||||
* toolRegistry?: Map<string, import('~/utils/toolClassification').LCTool>;
|
||||
* hasDeferredTools?: boolean;
|
||||
* }>} The agent tools and registry.
|
||||
*/
|
||||
async function loadAgentTools({
|
||||
|
|
@ -518,7 +519,7 @@ async function loadAgentTools({
|
|||
}, {});
|
||||
|
||||
/** Build tool registry from MCP tools and create PTC/tool search tools if configured */
|
||||
const { toolRegistry, additionalTools } = await buildToolClassification({
|
||||
const { toolRegistry, additionalTools, hasDeferredTools } = await buildToolClassification({
|
||||
loadedTools,
|
||||
userId: req.user.id,
|
||||
agentId: agent.id,
|
||||
|
|
@ -533,6 +534,7 @@ async function loadAgentTools({
|
|||
userMCPAuthMap,
|
||||
toolContextMap,
|
||||
toolRegistry,
|
||||
hasDeferredTools,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -546,6 +548,7 @@ async function loadAgentTools({
|
|||
userMCPAuthMap,
|
||||
toolContextMap,
|
||||
toolRegistry,
|
||||
hasDeferredTools,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -674,6 +677,7 @@ async function loadAgentTools({
|
|||
toolContextMap,
|
||||
userMCPAuthMap,
|
||||
toolRegistry,
|
||||
hasDeferredTools,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue