mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-30 15:18:50 +01:00
feat: first pass, bedrock chat. note: AgentClient is returning agents as conversation.endpoint
This commit is contained in:
parent
120a6a55fb
commit
60ee12d3e8
20 changed files with 270 additions and 23 deletions
|
|
@ -45,6 +45,7 @@ module.exports = {
|
|||
AZURE_ASSISTANTS_BASE_URL,
|
||||
EModelEndpoint.azureAssistants,
|
||||
),
|
||||
[EModelEndpoint.bedrock]: generateConfig(process.env.BEDROCK_AWS_SECRET_ACCESS_KEY),
|
||||
/* key will be part of separate config */
|
||||
[EModelEndpoint.agents]: generateConfig(process.env.I_AM_A_TEAPOT),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,22 +9,13 @@ const { config } = require('./EndpointService');
|
|||
*/
|
||||
async function loadDefaultEndpointsConfig(req) {
|
||||
const { google, gptPlugins } = await loadAsyncEndpoints(req);
|
||||
const {
|
||||
openAI,
|
||||
agents,
|
||||
assistants,
|
||||
azureAssistants,
|
||||
bingAI,
|
||||
anthropic,
|
||||
azureOpenAI,
|
||||
chatGPTBrowser,
|
||||
} = config;
|
||||
const { assistants, azureAssistants, bingAI, azureOpenAI, chatGPTBrowser } = config;
|
||||
|
||||
const enabledEndpoints = getEnabledEndpoints();
|
||||
|
||||
const endpointConfig = {
|
||||
[EModelEndpoint.openAI]: openAI,
|
||||
[EModelEndpoint.agents]: agents,
|
||||
[EModelEndpoint.openAI]: config[EModelEndpoint.openAI],
|
||||
[EModelEndpoint.agents]: config[EModelEndpoint.agents],
|
||||
[EModelEndpoint.assistants]: assistants,
|
||||
[EModelEndpoint.azureAssistants]: azureAssistants,
|
||||
[EModelEndpoint.azureOpenAI]: azureOpenAI,
|
||||
|
|
@ -32,7 +23,8 @@ async function loadDefaultEndpointsConfig(req) {
|
|||
[EModelEndpoint.bingAI]: bingAI,
|
||||
[EModelEndpoint.chatGPTBrowser]: chatGPTBrowser,
|
||||
[EModelEndpoint.gptPlugins]: gptPlugins,
|
||||
[EModelEndpoint.anthropic]: anthropic,
|
||||
[EModelEndpoint.anthropic]: config[EModelEndpoint.anthropic],
|
||||
[EModelEndpoint.bedrock]: config[EModelEndpoint.bedrock],
|
||||
};
|
||||
|
||||
const orderedAndFilteredEndpoints = enabledEndpoints.reduce((config, key, index) => {
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ async function loadDefaultModels(req) {
|
|||
[EModelEndpoint.chatGPTBrowser]: chatGPTBrowser,
|
||||
[EModelEndpoint.assistants]: assistants,
|
||||
[EModelEndpoint.azureAssistants]: azureAssistants,
|
||||
/* TODO: remove this, only for testing */
|
||||
[EModelEndpoint.bedrock]: ['anthropic.claude-3-sonnet-20240229-v1:0'],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue