mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-08 22:39:36 +08:00
fix(AssistantService): add default settings configuration to assistant initialization (#7371)
This commit is contained in:
parent
ed0bb7fd16
commit
b4b456ae06
@ -14,7 +14,17 @@ export function getDefaultAssistant(): Assistant {
|
|||||||
topics: [getDefaultTopic('default')],
|
topics: [getDefaultTopic('default')],
|
||||||
messages: [],
|
messages: [],
|
||||||
type: 'assistant',
|
type: 'assistant',
|
||||||
regularPhrases: [] // Added regularPhrases
|
regularPhrases: [], // Added regularPhrases
|
||||||
|
settings: {
|
||||||
|
temperature: DEFAULT_TEMPERATURE,
|
||||||
|
contextCount: DEFAULT_CONTEXTCOUNT,
|
||||||
|
enableMaxTokens: false,
|
||||||
|
maxTokens: 0,
|
||||||
|
streamOutput: true,
|
||||||
|
topP: 1,
|
||||||
|
toolUseMode: 'prompt',
|
||||||
|
customParameters: []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,7 +137,17 @@ export async function createAssistantFromAgent(agent: Agent) {
|
|||||||
topics: [topic],
|
topics: [topic],
|
||||||
model: agent.defaultModel,
|
model: agent.defaultModel,
|
||||||
type: 'assistant',
|
type: 'assistant',
|
||||||
regularPhrases: agent.regularPhrases || [] // Ensured regularPhrases
|
regularPhrases: agent.regularPhrases || [], // Ensured regularPhrases
|
||||||
|
settings: agent.settings || {
|
||||||
|
temperature: DEFAULT_TEMPERATURE,
|
||||||
|
contextCount: DEFAULT_CONTEXTCOUNT,
|
||||||
|
enableMaxTokens: false,
|
||||||
|
maxTokens: 0,
|
||||||
|
streamOutput: true,
|
||||||
|
topP: 1,
|
||||||
|
toolUseMode: 'prompt',
|
||||||
|
customParameters: []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
store.dispatch(addAssistant(assistant))
|
store.dispatch(addAssistant(assistant))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user