Unable to configure custom OpenAI API provider
We have our own AI model marketplace in our company that is compatible with the OpenAI API. However, when I tried to configure a few of our models in LINQPad I got a "not found" error. I must be doing something wrong, but I do not know what.
To be sure that this is not a problem with our company's API I wrote a snippet to test it (using NuGet package OpenAI), and it works as expected:

I have configured a custom provider in LINQPad using the same endpoint, authorization and model ID as above (the dialog title has a misspelling):

However, when I tested it, I got the following "not found" error:

I have tried to provide an invalid API key, but I still get the error, so it must be a problem with the API request URL being wrong. The unchecked built-in OpenAI model IDs always present in the configuration do not exist on our internal API so to be sure that I am testing my specific model ID I have also tried to start a chat where I select our own model ID and this still results in a "not found" error. I have also tried to update the custom endpoint by removing "v1" or adding a trailing slash to no avail.
Given that my simple C# script works how can I configure LINQPad to use the same model?
Answers
-
I was not on the latest version of LINQPad when I made my post but after updating to 9.5.10, I still have the same issue.
-
The endpoint for OpenAI's completions is
https://api.openai.com/v1/chat/completions.If your endpoint follows the same pattern, you will need to include /chat/completions to direct LINQPad to the actual API.
-
deleted
