mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
refactor: Speed up Config fetching and Setup Config Groundwork 👷🚧 (#1297)
* refactor: move endpoint services to own directory * refactor: make endpointconfig handling more concise, separate logic, and cache result for subsequent serving * refactor: ModelController gets same treatment as EndpointController, draft OverrideController * wip: flesh out override controller more to return real value * refactor: client/api changes in anticipation of override
This commit is contained in:
parent
9b2359fc27
commit
0bae503a0a
27 changed files with 405 additions and 138 deletions
|
|
@ -239,3 +239,68 @@
|
|||
* @typedef {AgentAction & { toolCallId: string; run_id: string; thread_id: string; }} OpenAIAssistantAction
|
||||
* @memberof typedefs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @exports EndpointServiceConfig
|
||||
* @typedef {Object} EndpointServiceConfig
|
||||
* @property {string} openAIApiKey - The API key for OpenAI.
|
||||
* @property {string} azureOpenAIApiKey - The API key for Azure OpenAI.
|
||||
* @property {boolean} useAzurePlugins - Flag to indicate if Azure plugins are used.
|
||||
* @property {boolean} userProvidedOpenAI - Flag to indicate if OpenAI API key is user provided.
|
||||
* @property {string} palmKey - The Palm key.
|
||||
* @property {boolean|{userProvide: boolean}} [openAI] - Flag to indicate if OpenAI endpoint is user provided, or its configuration.
|
||||
* @property {boolean|{userProvide: boolean}} [assistant] - Flag to indicate if Assistant endpoint is user provided, or its configuration.
|
||||
* @property {boolean|{userProvide: boolean}} [azureOpenAI] - Flag to indicate if Azure OpenAI endpoint is user provided, or its configuration.
|
||||
* @property {boolean|{userProvide: boolean}} [chatGPTBrowser] - Flag to indicate if ChatGPT Browser endpoint is user provided, or its configuration.
|
||||
* @property {boolean|{userProvide: boolean}} [anthropic] - Flag to indicate if Anthropic endpoint is user provided, or its configuration.
|
||||
* @property {boolean|{userProvide: boolean}} [bingAI] - Flag to indicate if BingAI endpoint is user provided, or its configuration.
|
||||
* @property {boolean|{userProvide: boolean}} [bingAI] - Flag to indicate if BingAI endpoint is user provided, or its configuration.
|
||||
* @property {boolean|{userProvide: boolean}} [bingAI] - Flag to indicate if BingAI endpoint is user provided, or its configuration.
|
||||
* @memberof typedefs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @exports Plugin
|
||||
* @typedef {Object} Plugin
|
||||
* @property {string} pluginKey - The key of the plugin.
|
||||
* @property {string} name - The name of the plugin.
|
||||
* @memberof typedefs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @exports GptPlugins
|
||||
* @typedef {Object} GptPlugins
|
||||
* @property {Plugin[]} plugins - An array of plugins available.
|
||||
* @property {string[]} availableAgents - Available agents, 'classic' or 'functions'.
|
||||
* @property {boolean} userProvide - A flag indicating if the user has provided the data.
|
||||
* @property {boolean} azure - A flag indicating if azure plugins are used.
|
||||
* @memberof typedefs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @exports DefaultConfig
|
||||
* @typedef {Object} DefaultConfig
|
||||
* @property {boolean|{userProvide: boolean}} [openAI] - Flag to indicate if OpenAI endpoint is user provided, or its configuration.
|
||||
* @property {boolean|{userProvide: boolean}} [assistant] - Flag to indicate if Assistant endpoint is user provided, or its configuration.
|
||||
* @property {boolean|{userProvide: boolean}} [azureOpenAI] - Flag to indicate if Azure OpenAI endpoint is user provided, or its configuration.
|
||||
* @property {boolean|{userProvide: boolean}} [chatGPTBrowser] - Flag to indicate if ChatGPT Browser endpoint is user provided, or its configuration.
|
||||
* @property {boolean|{userProvide: boolean}} [anthropic] - Flag to indicate if Anthropic endpoint is user provided, or its configuration.
|
||||
* @property {boolean|{userProvide: boolean}} [bingAI] - Flag to indicate if BingAI endpoint is user provided, or its configuration.
|
||||
* @property {boolean|{userProvide: boolean}} [google] - Flag to indicate if Google endpoint is user provided, or its configuration.
|
||||
* @property {boolean|GptPlugins} [gptPlugins] - Configuration for GPT plugins.
|
||||
* @memberof typedefs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @exports EndpointConfig
|
||||
* @typedef {boolean|{userProvide: boolean}|GptPlugins} EndpointConfig
|
||||
* @memberof typedefs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @exports EndpointWithOrder
|
||||
* @typedef {Object} EndpointWithOrder
|
||||
* @property {EndpointConfig} config - The configuration of the endpoint.
|
||||
* @property {number} order - The order of the endpoint.
|
||||
* @memberof typedefs
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue