mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
🧪 fix(ci): update failing initializeClient tests with new expected values (#1982)
* fix(ci): update failing tests with new expected values from `getUserKey` * refactor: safer optional chaining, and ensure apiKey is defined
This commit is contained in:
parent
2ea6e8c18a
commit
7a6a41a72e
5 changed files with 20 additions and 18 deletions
|
|
@ -63,8 +63,8 @@ const initializeClient = async ({ req, res, endpointOption }) => {
|
|||
}
|
||||
}
|
||||
|
||||
let apiKey = userProvidesKey ? userValues.apiKey : credentials[endpoint];
|
||||
let baseURL = userProvidesURL ? userValues.baseURL : baseURLOptions[endpoint];
|
||||
let apiKey = userProvidesKey ? userValues?.apiKey : credentials[endpoint];
|
||||
let baseURL = userProvidesURL ? userValues?.baseURL : baseURLOptions[endpoint];
|
||||
|
||||
const clientOptions = {
|
||||
contextStrategy,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue