mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 19:30:15 +01:00
feat: backend content aggregation for agents/bedrock
This commit is contained in:
parent
16ba3ed243
commit
757f544a9b
4 changed files with 32 additions and 17 deletions
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
const { z } = require('zod');
|
||||
const { tool } = require('@langchain/core/tools');
|
||||
const { createContentAggregator } = require('@librechat/agents');
|
||||
const { EModelEndpoint, providerEndpointMap } = require('librechat-data-provider');
|
||||
const { getDefaultHandlers } = require('~/server/controllers/agents/callbacks');
|
||||
// for testing purposes
|
||||
|
|
@ -53,7 +54,8 @@ const initializeClient = async ({ req, res, endpointOption }) => {
|
|||
}
|
||||
|
||||
// TODO: use endpointOption to determine options/modelOptions
|
||||
const eventHandlers = getDefaultHandlers({ res });
|
||||
const { contentParts, aggregateContent } = createContentAggregator();
|
||||
const eventHandlers = getDefaultHandlers({ res, aggregateContent });
|
||||
|
||||
// const tools = [createTavilySearchTool()];
|
||||
// const tools = [_getWeather];
|
||||
|
|
@ -106,6 +108,7 @@ const initializeClient = async ({ req, res, endpointOption }) => {
|
|||
agent,
|
||||
tools,
|
||||
toolMap,
|
||||
contentParts,
|
||||
modelOptions,
|
||||
eventHandlers,
|
||||
endpoint: EModelEndpoint.agents,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue