feat: 重构聊天室语义内核

This commit is contained in:
chenchun
2025-03-21 18:24:59 +08:00
parent 0b111852ec
commit cbb3510d94
7 changed files with 78 additions and 67 deletions

View File

@@ -32,9 +32,10 @@ namespace Yi.Framework.Stock.Domain
#pragma warning disable SKEXP0010
// 从配置中获取值
var options = semanticKernelSection.Get<SemanticKernelOptions>();
//股市优先使用第一个ai模型
services.AddKernel()
.AddOpenAIChatCompletion(
modelId: options.ModelId,
modelId: options.ModelIds.FirstOrDefault(),
endpoint: new Uri(options.Endpoint),
apiKey: options.ApiKey);
#pragma warning restore SKEXP0010