feat: first pass, bedrock chat. note: AgentClient is returning agents as conversation.endpoint

This commit is contained in:
Danny Avila 2024-08-31 22:16:11 -04:00
parent 120a6a55fb
commit 60ee12d3e8
No known key found for this signature in database
GPG key ID: 2DD9CC89B9B50364
20 changed files with 270 additions and 23 deletions

View file

@ -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) => {