OkGoDoIt / OpenAI-API-dotnet

An unofficial C#/.NET SDK for accessing the OpenAI GPT-3 API
https://www.nuget.org/packages/OpenAI/
Other
1.86k stars 433 forks source link

I keep getting the error #225

Open MRDOGHOG opened 2 months ago

MRDOGHOG commented 2 months ago

HttpRequestException: Error at chat/completions (https://api.openai.com/v1/chat/completions) with HTTP status code: BadRequest. Content:

400 Bad Request

400 Bad Request


cloudflare

My Code is from https://www.immersivelimit.com/tutorials/how-to-use-chatgpt-in-unity, and I'm using Version 1.6. How to fix?

MRDOGHOG commented 2 months ago

HttpRequestException: Error at chat/completions (https://api.openai.com/v1/chat/completions) with HTTP status code: BadRequest. Content:

MRDOGHOG commented 2 months ago

If I use version 1.11 I get the error: Assets\ThirdParty\OkGoDoIt\OpenAI_API\OpenAIAPI.cs(38,10): error CS0246: The type or namespace name 'IHttpClientFactory' could not be found (are you missing a using directive or an assembly reference?)