Help to define/choose a gpt created in my gpt in the api in C#

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;
    }

You cannot invoke a GPT from an api as there is no support for it yet. What you can do though is create an Assistant with similar functionality as your GPT and invoke it.

Here is a sample open-source project I built for the same use-case if you wish to start with a boilerplate instead of starting from scratch GitHub - SamurAIGPT/Open-Custom-GPT: Create Custom GPT and add/embed on your site using Assistants api

There’s some things here to address:

  • You are calling for an Instruct Completion model, which performs the single task of completing the prompt you send it.

  • OpenAI_API.Models.Model.ChatGPTTurboInstruct Does not seem right to me. A client library would not prefix the Turbo Instruct model with ChatGPT. Are you just adding these characters in and hoping it works?

  • You cannot use your ChatGPT GPTs outside of the ChatGPT website

  • You can create an Assistant which, conceptually is the same but hasn’t received any noticeable updates and still lacks basic features that ChatGPT has (Such as Vision & Browsing)

It’s fairly straightforward to create an Assistant & OpenAI provides a Playground GUI to create & test them. You can start here with the documentation.
https://platform.openai.com/docs/assistants/overview