mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
AIX: options override: be safe without the ref
This commit is contained in:
@@ -31,10 +31,15 @@ export function aixCreateChatGenerateContext(name: AixAPI_Context_ChatGenerate['
|
||||
export function aixCreateModelFromLLMOptions(
|
||||
llmInterfaces: DLLM['interfaces'],
|
||||
llmOptions: DModelParameterValues,
|
||||
llmOptionsOverride: Omit<DModelParameterValues, 'llmRef'> | undefined,
|
||||
_llmOptionsOverride: Omit<DModelParameterValues, 'llmRef'> | undefined,
|
||||
debugLlmId: string,
|
||||
): AixAPI_Model {
|
||||
|
||||
// make sure llmRef is removed, if present in the override - excess of caution here
|
||||
const llmOptionsOverride = _llmOptionsOverride ? { ..._llmOptionsOverride } : undefined;
|
||||
if (llmOptionsOverride)
|
||||
delete (llmOptionsOverride as { llmRef?: any }).llmRef;
|
||||
|
||||
// destructure input with the overrides
|
||||
const {
|
||||
llmRef, llmTemperature, llmResponseTokens, llmTopP,
|
||||
|
||||
Reference in New Issue
Block a user