fix default agent llm config

This commit is contained in:
Jicheng Lu 2024-06-11 22:41:37 -05:00
parent 1e98567bb4
commit 862da9e837

View file

@ -44,7 +44,11 @@ public partial class AgentService
if (profile.LlmConfig == null)
{
profile.LlmConfig = agentSetting.LlmConfig;
profile.LlmConfig.IsInherit = true;
}
else if (string.IsNullOrEmpty(profile.LlmConfig?.Provider) || string.IsNullOrEmpty(profile.LlmConfig?.Model))
{
profile.LlmConfig.Provider = agentSetting.LlmConfig.Provider;
profile.LlmConfig.Model = agentSetting.LlmConfig.Model;
}
profile.Plugin = GetPlugin(profile.Id);