mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 02:10:15 +01:00
fix: declare endpoint in initialization step
This commit is contained in:
parent
60ee12d3e8
commit
6d30726113
3 changed files with 2 additions and 16 deletions
|
|
@ -1,16 +0,0 @@
|
||||||
const { EModelEndpoint } = require('librechat-data-provider');
|
|
||||||
const AgentClient = require('~/server/controllers/agents/client');
|
|
||||||
const { logger } = require('~/config');
|
|
||||||
|
|
||||||
class BedrockClient extends AgentClient {
|
|
||||||
constructor(options = {}) {
|
|
||||||
super(options);
|
|
||||||
this.options.endpoint = EModelEndpoint.bedrock;
|
|
||||||
}
|
|
||||||
|
|
||||||
setOptions(options) {
|
|
||||||
logger.info('[api/server/controllers/bedrock/client.js] setOptions', options);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = BedrockClient;
|
|
||||||
|
|
@ -108,6 +108,7 @@ const initializeClient = async ({ req, res, endpointOption }) => {
|
||||||
toolMap,
|
toolMap,
|
||||||
modelOptions,
|
modelOptions,
|
||||||
eventHandlers,
|
eventHandlers,
|
||||||
|
endpoint: EModelEndpoint.agents,
|
||||||
configOptions: options.configOptions,
|
configOptions: options.configOptions,
|
||||||
maxContextTokens:
|
maxContextTokens:
|
||||||
agent.max_context_tokens ??
|
agent.max_context_tokens ??
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ const initializeClient = async ({ req, res, endpointOption }) => {
|
||||||
modelOptions,
|
modelOptions,
|
||||||
eventHandlers,
|
eventHandlers,
|
||||||
maxContextTokens,
|
maxContextTokens,
|
||||||
|
endpoint: EModelEndpoint.bedrock,
|
||||||
configOptions: options.configOptions,
|
configOptions: options.configOptions,
|
||||||
});
|
});
|
||||||
return { client };
|
return { client };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue