英文:
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
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论