I’m using the openai library for .net in C#. And the code below is working.
But now, I need to make this call using a gpt that I created in my account at: /gpts/mine
I tried everything in C# and I can’t do it.
I created a gpt on the openai website, access it at the address:
gpts/editor/g-0101010example
I’ve tried several approaches but without success.
Can you help me?
public async Task<string> IA(string arg)
{
string outputResult = "";
var openai = new OpenAIAPI("xxx");
CompletionRequest completionRequest = new CompletionRequest();
completionRequest.Prompt = arg;
completionRequest.Model = OpenAI_API.Models.Model.ChatGPTTurboInstruct;
completionRequest.MaxTokens = 1024;
var completions = await openai.Completions.CreateCompletionAsync(completionRequest);
foreach (var completion in completions.Completions)
{
outputResult += completion.Text;
}
return outputResult;
}