gpt4 book ai didi

c# - Open AI 的 GPT Davinci - 问它问题,但它返回乱码?

转载 作者:行者123 更新时间:2023-12-02 05:47:05 25 4
gpt4 key购买 nike

我问它“什么是 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 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

我很困惑,我在这里做错了什么?这不应该模拟与 ChatGPT 类似的结果吗?我正在使用以下 NuGet 进行 OpenAI 访问:https://github.com/OkGoDoIt/OpenAI-API-dotnet

最佳答案

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

关于c# - Open AI 的 GPT Davinci - 问它问题,但它返回乱码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75051126/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com