Compare commits

...

1 Commits

Author SHA1 Message Date
pablonyx
867ff61b68 k 2025-02-19 18:09:21 -08:00
3 changed files with 12 additions and 4 deletions

View File

@@ -221,7 +221,7 @@ export function SettingsForm() {
/>
<Checkbox
label="Override default temperature"
sublabel="If set, users will be able to override the default temperature for each assistant."
sublabel="If set, users will be able to override the default temperature for each assistant. This can be overridden by individual user settings."
checked={settings.temperature_override_enabled}
onChange={(e) =>
handleToggleSettingsField(

View File

@@ -65,7 +65,7 @@ export function getChatRetentionInfo(
};
}
export async function updateModelOverrideForChatSession(
export async function updateLLMOverrideForChatSession(
chatSessionId: string,
newAlternateModel: string
) {

View File

@@ -32,7 +32,10 @@ import { getSourceMetadata } from "./sources";
import { AuthType, NEXT_PUBLIC_CLOUD_ENABLED } from "./constants";
import { useUser } from "@/components/user/UserProvider";
import { SEARCH_TOOL_ID } from "@/app/chat/tools/constants";
import { updateTemperatureOverrideForChatSession } from "@/app/chat/lib";
import {
updateLLMOverrideForChatSession,
updateTemperatureOverrideForChatSession,
} from "@/app/chat/lib";
const CREDENTIAL_URL = "/api/manage/admin/credential";
@@ -391,7 +394,8 @@ LLM Override is as follows (i.e. this order)
- User preference (defaults to system wide default if no preference set)
On switching to an existing or new chat session or a different assistant:
- If we have a live assistant after any switch with a model override, use that- otherwise use the above hierarchy
- If we have a chat session default- use that
- Otherwise if we have a live assistant after any switch with a model override, use that- otherwise use the above hierarchy
Thus, the input should be
- User preference
@@ -502,12 +506,16 @@ export function useLlmOverride(
const provider =
newOverride.provider ||
findProviderForModel(llmProviders, newOverride.modelName);
const structuredValue = structureValue(
newOverride.name,
provider,
newOverride.modelName
);
setLlmOverride(getValidLlmOverride(structuredValue));
if (currentChatSession) {
updateLLMOverrideForChatSession(currentChatSession.id, structuredValue);
}
};
const updateModelOverrideForChatSession = (chatSession?: ChatSession) => {