Commit 42b2f5ef authored by 吴春's avatar 吴春

1

parent b5667563
...@@ -238,10 +238,10 @@ namespace Edu.WebApi.Controllers.AI ...@@ -238,10 +238,10 @@ namespace Edu.WebApi.Controllers.AI
{ {
string answer = string.Empty; string answer = string.Empty;
// ChatClient client = new(model: "gpt-4o", apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY"));
// 初始化客户端 // 初始化客户端
var api = new OpenAIAPI("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"); var api = new OpenAIAPI(basicConfigureModel.ApiKey);
//basicConfigureModel.ApiKey // 调用GPT-3模型完成一段文本 // // 调用GPT-3模型完成一段文本
var completionRequest = new CompletionRequest var completionRequest = new CompletionRequest
{ {
Model = "gpt-4o-mini", Model = "gpt-4o-mini",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment