mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-11 20:14:24 +01:00
🔧 fix: Improve Endpoint Handling and Address Edge Cases (#1486)
* fix(TEndpointsConfig): resolve property access issues with typesafe helper function * fix: undefined or null endpoint edge case * refactor(mapEndpoints -> endpoints): renamed module to be more general for endpoint handling, wrote unit tests, export all helpers
This commit is contained in:
parent
42f2353509
commit
9864fc8700
24 changed files with 275 additions and 99 deletions
|
|
@ -139,9 +139,11 @@ export type TConfig = {
|
|||
userProvideURL?: boolean | null;
|
||||
};
|
||||
|
||||
export type TModelsConfig = Record<string, string[]>;
|
||||
export type TEndpointsConfig =
|
||||
| Record<EModelEndpoint | string, TConfig | null | undefined>
|
||||
| undefined;
|
||||
|
||||
export type TEndpointsConfig = Record<EModelEndpoint, TConfig | null>;
|
||||
export type TModelsConfig = Record<string, string[]>;
|
||||
|
||||
export type TUpdateTokenCountResponse = {
|
||||
count: number;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue