OpenAI的GPT Davinci – 询问它问题,但它返回的是无意义的内容?

huangapple go评论72阅读模式
英文:

Open AI's GPT Davinci - Asking it questions, but it's returning gibberish?

问题

我问它:“什么是COVID-19?”,使用以下代码:

string key = "XXXX";

OpenAIAPI api = new OpenAIAPI(key, Engine.Davinci);

var results = api.Completions.CreateCompletionsAsync(new CompletionRequest("What is COVID-19?", temperature: 0.1, max_tokens: 200), 1).Result;

var answer = results.Completions[0].Text;

这返回:

> Covid-19是一种用于治疗精神分裂症状的药物。它是两种药物的组合,克罗扎平和奥兰扎平。
>
> COVID-19如何工作?
>
> Covid-19是克罗扎平和奥兰扎平两种药物的组合。克罗扎平是一种抗精神病药物,通过阻止大脑中的多巴胺,一种化学信使的作用来工作。奥兰扎平是一种抗精神病药物,通过阻止大脑中的多巴胺和血清素,另一种化学信使的作用来工作。
>
> COVID-19如何使用?
>
> Covid-19用于治疗精神分裂症。
>
> COVID-19如何工作?
>
> Covid-19是克罗扎平和奥兰扎平两种药物的组合。克罗扎平是一种抗精神病药物,通过阻止大脑中的多巴胺

我感到困惑,我做错了什么?这不应该模仿与ChatGPT类似的结果吗?我正在使用以下NuGet获取OpenAI访问:https://www.nuget.org/packages/OpenAI/

英文:

I ask it "What is COVID-19?", by using the following code:

string key = "XXXX";

OpenAIAPI api = new OpenAIAPI(key,Engine.Davinci);

var results = api.Completions.CreateCompletionsAsync(new CompletionRequest("What is COVID-19?", temperature: 0.1, max_tokens: 200), 1).Result;

var answer = results.Completions[0].Text;

Which returns:

> Covid-19 is a drug that is used to treat the symptoms of schizophrenia. It is a combination of two drugs, clozapine and olanzapine.
>
> How does COVID-19 work?
>
> Covid-19 is a combination of two drugs, clozapine and olanzapine. Clozapine is an antipsychotic drug that works by blocking the action of dopamine, a chemical messenger in the brain. Olanzapine is an antipsychotic drug that works by blocking the action of dopamine and serotonin, another chemical messenger in the brain.
>
> How is COVID-19 used?
>
> Covid-19 is used to treat schizophrenia.
>
> How does COVID-19 work?
>
> Covid-19 is a combination of two drugs, clozapine and olanzapine. Clozapine is an antipsychotic drug that works by blocking

I'm baffled, what am I doing wrong here? Shouldn't this emulate similar results to ChatGPT? I am using the following NuGet for OpenAI access: https://github.com/OkGoDoIt/OpenAI-API-dotnet

答案1

得分: 1

我通过使用OpenAIAPI api = new OpenAIAPI(key, "text-davinci-003");来解决了这个问题,而不是Engine.Davinci

英文:

I solved this by using OpenAIAPI api = new OpenAIAPI(key, "text-davinci-003"); rather than Engine.Davinci.

huangapple
  • 本文由 发表于 2023年1月9日 04:41:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/75051126.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定