|
|
|
@ -171,13 +171,13 @@ object AgentService : CoroutineScope { |
|
|
|
|
|
|
|
|
|
|
|
// 设置系统提示词 |
|
|
|
// val customSystemPrompt = config["systemPrompt"] as? String |
|
|
|
// if (!customSystemPrompt.isNullOrBlank()) { |
|
|
|
// systemPrompt = customSystemPrompt |
|
|
|
// } else { |
|
|
|
// initSystemPrompt() |
|
|
|
// } |
|
|
|
initSystemPrompt() |
|
|
|
val customSystemPrompt = config["systemPrompt"] as? String |
|
|
|
if (!customSystemPrompt.isNullOrBlank()) { |
|
|
|
systemPrompt = customSystemPrompt |
|
|
|
} else { |
|
|
|
initSystemPrompt() |
|
|
|
} |
|
|
|
// initSystemPrompt() |
|
|
|
// 初始化Azure ASR |
|
|
|
azureAsrHelper = AzureAsrHelper(context).apply { |
|
|
|
initialize( |
|
|
|
@ -675,6 +675,7 @@ object AgentService : CoroutineScope { |
|
|
|
// 先添加系统提示词 |
|
|
|
if (systemPrompt.isNotEmpty()) { |
|
|
|
messagesWithSystemPrompt.put(openAIService.createSystemMessage(systemPrompt)) |
|
|
|
Log.d(TAG, "系统提示词: ${systemPrompt}") |
|
|
|
} |
|
|
|
|
|
|
|
// 再添加历史消息 |
|
|
|
|