LibreChat/api/server/utils
Danny Avila 519645c0b0
🔻 fix: Role and System Message Handling for ChatGPT Imports (#9524)
* fix: ChatGPT import logic breaks message graph when it encounters a system message

- Implemented `findNonSystemParent` to maintain parent-child relationships by skipping system messages.
- Added a test case to ensure system messages do not disrupt the conversation flow during import.

* fix: ChatGPT import, correct sender for user messages with GPT-4 model

* fix: Enhance model name extraction for assistant messages in import process

- Updated sender assignment logic to dynamically extract model names from model slugs, improving accuracy for various GPT models.
- Added comprehensive tests to validate the extraction and formatting of model names from different model slugs, ensuring robustness in the import functionality.
2025-09-09 13:51:26 -04:00
..
__tests__ 🗂️ fix: Disable express-static-gzip for Uploaded Images (#8307) 2025-07-11 16:51:53 -04:00
emails 🔒 fix: href Attribute in Email Microsoft Template 2025-09-08 14:39:00 -04:00
import 🔻 fix: Role and System Message Handling for ChatGPT Imports (#9524) 2025-09-09 13:51:26 -04:00
countTokens.js feat: Assistants API, General File Support, Side Panel, File Explorer (#1696) 2024-02-13 20:42:27 -05:00
files.js 📚 feat: Add Source Citations for File Search in Agents (#8652) 2025-08-13 16:24:16 -04:00
getFileStrategy.js 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
handleText.js 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
index.js 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
queue.js 🅰️ feat: Azure OpenAI Assistants API Support (#1992) 2024-03-14 17:21:42 -04:00
removePorts.js feat: bun api support 🥟 (#1021) 2023-10-07 11:16:06 -04:00
sendEmail.js 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
staticCache.js 🗂️ fix: Disable express-static-gzip for Uploaded Images (#8307) 2025-07-11 16:51:53 -04:00