mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-22 02:14:10 +01:00
✋ feat: Stop Sequences for Conversations & Presets (#2536)
* feat: `stop` conversation parameter * feat: Tag primitive * feat: dynamic tags * refactor: update tag styling * feat: add stop sequences to OpenAI settings * fix(Presentation): prevent `SidePanel` re-renders that flicker side panel * refactor: use stop placeholder * feat: type and schema update for `stop` and `TPreset` in generation param related types * refactor: pass conversation to dynamic settings * refactor(OpenAIClient): remove default handling for `modelOptions.stop` * docs: fix Google AI Setup formatting * feat: current_model * docs: WIP update * fix(ChatRoute): prevent default preset override before `hasSetConversation.current` becomes true by including latest conversation state as template * docs: update docs with more info on `stop` * chore: bump config_version * refactor: CURRENT_MODEL handling
This commit is contained in:
parent
4121818124
commit
099aa9dead
29 changed files with 690 additions and 93 deletions
|
|
@ -54,7 +54,10 @@ export default function ChatRoute() {
|
|||
!modelsQuery.data?.initial &&
|
||||
!hasSetConversation.current
|
||||
) {
|
||||
newConversation({ modelsData: modelsQuery.data });
|
||||
newConversation({
|
||||
modelsData: modelsQuery.data,
|
||||
template: conversation ? conversation : undefined,
|
||||
});
|
||||
hasSetConversation.current = !!assistants;
|
||||
} else if (
|
||||
initialConvoQuery.data &&
|
||||
|
|
@ -77,7 +80,10 @@ export default function ChatRoute() {
|
|||
conversationId === 'new' &&
|
||||
assistants
|
||||
) {
|
||||
newConversation({ modelsData: modelsQuery.data });
|
||||
newConversation({
|
||||
modelsData: modelsQuery.data,
|
||||
template: conversation ? conversation : undefined,
|
||||
});
|
||||
hasSetConversation.current = true;
|
||||
} else if (!hasSetConversation.current && !modelsQuery.data?.initial && assistants) {
|
||||
newConversation({
|
||||
|
|
@ -88,7 +94,7 @@ export default function ChatRoute() {
|
|||
});
|
||||
hasSetConversation.current = true;
|
||||
}
|
||||
/* Creates infinite render if all dependencies included */
|
||||
/* Creates infinite render if all dependencies included due to newConversation invocations exceeding call stack before hasSetConversation.current becomes truthy */
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [initialConvoQuery.data, endpointsQuery.data, modelsQuery.data, assistants]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue