mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-22 02:14:10 +01:00
* 🔧 refactor: Simplify payload parsing and enhance getSaveOptions logic - Removed unused bedrockInputSchema from payloadParser, streamlining the function. - Updated payloadParser to handle optional chaining for model parameters. - Enhanced getSaveOptions to ensure runOptions defaults to an empty object if parsing fails, improving robustness. - Adjusted the assignment of maxContextTokens to use the instance variable for consistency. * 🔧 fix: Update maxContextTokens assignment logic in initializeAgent function - Enhanced the maxContextTokens assignment to allow for user-defined values, ensuring it defaults to a calculated value only when not provided or invalid. This change improves flexibility in agent initialization. * 🧪 test: Add unit tests for initializeAgent function - Introduced comprehensive unit tests for the initializeAgent function, focusing on maxContextTokens behavior. - Tests cover scenarios for user-defined values, fallback calculations, and edge cases such as zero and negative values, enhancing overall test coverage and reliability of agent initialization logic. * refactor: default params Endpoint Configuration Handling - Integrated `getEndpointsConfig` to fetch endpoint configurations, allowing for dynamic handling of `defaultParamsEndpoint`. - Updated `buildEndpointOption` to pass `defaultParamsEndpoint` to `parseCompactConvo`, ensuring correct parameter handling based on endpoint type. - Added comprehensive unit tests for `buildDefaultConvo` and `cleanupPreset` to validate behavior with `defaultParamsEndpoint`, covering various scenarios and edge cases. - Refactored related hooks and utility functions to support the new configuration structure, improving overall flexibility and maintainability. * refactor: Centralize defaultParamsEndpoint retrieval - Introduced `getDefaultParamsEndpoint` function to streamline the retrieval of `defaultParamsEndpoint` across various hooks and middleware. - Updated multiple files to utilize the new function, enhancing code consistency and maintainability. - Removed redundant logic for fetching `defaultParamsEndpoint`, simplifying the codebase. |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| agents.tsx | ||
| artifacts.ts | ||
| buildDefaultConvo.ts | ||
| buildTree.ts | ||
| citations.ts | ||
| cleanupPreset.ts | ||
| cn.ts | ||
| collection.ts | ||
| conversationTags.spec.ts | ||
| conversationTags.ts | ||
| convos.fakeData.ts | ||
| convos.spec.ts | ||
| convos.ts | ||
| createChatSearchParams.spec.ts | ||
| createChatSearchParams.ts | ||
| drafts.ts | ||
| email.ts | ||
| endpoints.spec.ts | ||
| endpoints.ts | ||
| files.ts | ||
| forms.tsx | ||
| getDefaultEndpoint.ts | ||
| getLoginError.ts | ||
| getThemeFromEnv.js | ||
| heicConverter.ts | ||
| imageResize.ts | ||
| index.ts | ||
| json.ts | ||
| languages.ts | ||
| latex.spec.ts | ||
| latex.ts | ||
| localStorage.ts | ||
| logger.ts | ||
| map.ts | ||
| markdown.ts | ||
| memory.ts | ||
| mermaid.ts | ||
| messages.ts | ||
| presets.ts | ||
| promptGroups.ts | ||
| prompts.ts | ||
| resetConvo.ts | ||
| resources.ts | ||
| roles.ts | ||
| routes.ts | ||
| scaleImage.ts | ||
| share.ts | ||
| textarea.ts | ||
| timestamps.ts | ||