mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-10 20:48:54 +01:00
fix: Allow dynamic content creation in useChatFunctions
- Updated the initial response handling to avoid pre-initializing content types, enabling dynamic creation of content parts based on incoming delta events. This change supports various content types such as think and text.
This commit is contained in:
parent
154498fe46
commit
1efd7fe1a1
2 changed files with 13 additions and 7 deletions
|
|
@ -295,12 +295,9 @@ export default function useChatFunctions({
|
|||
},
|
||||
];
|
||||
} else {
|
||||
initialResponse.content = [
|
||||
{
|
||||
type: ContentTypes.TEXT,
|
||||
text: '',
|
||||
},
|
||||
];
|
||||
// Don't pre-initialize content type - let incoming delta events
|
||||
// create content parts dynamically (supports think, text, etc.)
|
||||
initialResponse.content = [];
|
||||
}
|
||||
}
|
||||
setShowStopButton(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue