1
0
forked from github/onyx

Compare commits

...

4 Commits

Author SHA1 Message Date
pablodanswer
1392f24540 k 2024-11-21 22:58:57 -08:00
pablodanswer
617e6d9053 unused 2024-11-21 22:58:04 -08:00
pablodanswer
da36e208cd clean 2024-11-21 21:46:21 -08:00
pablodanswer
36eee45a03 llm provider causing re render in effect 2024-11-21 21:44:44 -08:00
2 changed files with 2 additions and 3 deletions

View File

@@ -52,6 +52,7 @@ import {
useLayoutEffect,
useRef,
useState,
useMemo,
} from "react";
import { usePopup } from "@/components/admin/connectors/Popup";
import { SEARCH_PARAM_NAMES, shouldSubmitOnLoad } from "./searchParams";
@@ -266,7 +267,6 @@ export function ChatPage({
availableAssistants[0];
const noAssistants = liveAssistant == null || liveAssistant == undefined;
// always set the model override for the chat session, when an assistant, llm provider, or user preference exists
useEffect(() => {
const personaDefault = getLLMProviderOverrideForPersona(
@@ -282,7 +282,7 @@ export function ChatPage({
);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [liveAssistant, llmProviders, user?.preferences.default_model]);
}, [liveAssistant, user?.preferences.default_model]);
const stopGenerating = () => {
const currentSession = currentSessionId();

View File

@@ -174,7 +174,6 @@ export function useLlmOverride(
modelName: "",
}
);
const [llmOverride, setLlmOverride] = useState<LlmOverride>(
currentChatSession && currentChatSession.current_alternate_model
? destructureValue(currentChatSession.current_alternate_model)