mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-02 06:10:18 +01:00
Added functionality to allow users to set custom api keys (#276)
* Added functionality to allow users to set custom api keys * Added error handling * Changed token to apiKey * Changed apiKey to oaiApiKey * added azure openai ui * Removed logging * Changed configure to Use * Made checked position more rounded * Made setting api key optional if it is openai * Modified error handling * Add support for insufficient_quota errors * Fixed faulty error detection * removed logging
This commit is contained in:
parent
08f3a77d58
commit
14104b276f
11 changed files with 207 additions and 32 deletions
|
|
@ -37,7 +37,8 @@ const useMessageHandler = () => {
|
|||
temperature: currentConversation?.temperature ?? 1,
|
||||
top_p: currentConversation?.top_p ?? 1,
|
||||
presence_penalty: currentConversation?.presence_penalty ?? 0,
|
||||
frequency_penalty: currentConversation?.frequency_penalty ?? 0
|
||||
frequency_penalty: currentConversation?.frequency_penalty ?? 0,
|
||||
token: endpointsConfig[endpoint]?.userProvide ? getToken() : null
|
||||
};
|
||||
responseSender = endpointOption.chatGptLabel ?? 'ChatGPT';
|
||||
} else if (endpoint === 'google') {
|
||||
|
|
@ -47,7 +48,7 @@ const useMessageHandler = () => {
|
|||
currentConversation?.model ?? endpointsConfig[endpoint]?.availableModels?.[0] ?? 'chat-bison',
|
||||
chatGptLabel: currentConversation?.chatGptLabel ?? null,
|
||||
promptPrefix: currentConversation?.promptPrefix ?? null,
|
||||
examples: currentConversation?.examples ?? [{ input: { content: '' }, output: { content: '' }}],
|
||||
examples: currentConversation?.examples ?? [{ input: { content: '' }, output: { content: '' } }],
|
||||
temperature: currentConversation?.temperature ?? 0.2,
|
||||
maxOutputTokens: currentConversation?.maxOutputTokens ?? 1024,
|
||||
topP: currentConversation?.topP ?? 0.95,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue