mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-26 11:44:28 +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')],
|
||||
messages: [],
|
||||
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],
|
||||
model: agent.defaultModel,
|
||||
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))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user