Download api/server/services/Config/EndpointService.js from Zhitomir/chat: direct link, hf CLI and curl.
- Browser
- Download file 1.53 kB
-
https://huggingface.co/spaces/Zhitomir/chat/resolve/main/api/server/services/Config/EndpointService.js
- Command line
-
hf download hf://spaces/Zhitomir/chat/api/server/services/Config/EndpointService.js
-
curl -L -o EndpointService.js https://huggingface.co/spaces/Zhitomir/chat/resolve/main/api/server/services/Config/EndpointService.js
1.53 kB
| const { EModelEndpoint } = require('librechat-data-provider'); | |
| const { isUserProvided, generateConfig } = require('~/server/utils'); | |
| const { | |
| OPENAI_API_KEY: openAIApiKey, | |
| AZURE_ASSISTANTS_API_KEY: azureAssistantsApiKey, | |
| ASSISTANTS_API_KEY: assistantsApiKey, | |
| AZURE_API_KEY: azureOpenAIApiKey, | |
| ANTHROPIC_API_KEY: anthropicApiKey, | |
| CHATGPT_TOKEN: chatGPTToken, | |
| BINGAI_TOKEN: bingToken, | |
| PLUGINS_USE_AZURE, | |
| GOOGLE_KEY: googleKey, | |
| OPENAI_REVERSE_PROXY, | |
| AZURE_OPENAI_BASEURL, | |
| ASSISTANTS_BASE_URL, | |
| AZURE_ASSISTANTS_BASE_URL, | |
| } = process.env ?? {}; | |
| const useAzurePlugins = !!PLUGINS_USE_AZURE; | |
| const userProvidedOpenAI = useAzurePlugins | |
| ? isUserProvided(azureOpenAIApiKey) | |
| : isUserProvided(openAIApiKey); | |
| module.exports = { | |
| config: { | |
| openAIApiKey, | |
| azureOpenAIApiKey, | |
| useAzurePlugins, | |
| userProvidedOpenAI, | |
| googleKey, | |
| [EModelEndpoint.bingAI]: generateConfig(bingToken), | |
| [EModelEndpoint.anthropic]: generateConfig(anthropicApiKey), | |
| [EModelEndpoint.chatGPTBrowser]: generateConfig(chatGPTToken), | |
| [EModelEndpoint.openAI]: generateConfig(openAIApiKey, OPENAI_REVERSE_PROXY), | |
| [EModelEndpoint.azureOpenAI]: generateConfig(azureOpenAIApiKey, AZURE_OPENAI_BASEURL), | |
| [EModelEndpoint.assistants]: generateConfig( | |
| assistantsApiKey, | |
| ASSISTANTS_BASE_URL, | |
| EModelEndpoint.assistants, | |
| ), | |
| [EModelEndpoint.azureAssistants]: generateConfig( | |
| azureAssistantsApiKey, | |
| AZURE_ASSISTANTS_BASE_URL, | |
| EModelEndpoint.azureAssistants, | |
| ), | |
| }, | |
| }; | |