Merge pull request #497 from iceljc/bugfix/fix-agent-conv-edge-cases

Bugfix/fix agent conv edge cases
This commit is contained in:
C. Oceania 2024-06-12 04:35:34 +00:00 committed by GitHub
commit 9d0c9c2be3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,6 +46,11 @@ public partial class AgentService
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);