PawanOsman / ChatGPT.Net

C# library for ChatGPT using official OpenAI API

Home Page:https://www.nuget.org/packages/ChatGPT.Net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An error occurred while sending the request.

Caulm opened this issue · comments

commented

I found that sometimes the unofficial API cannot respond when the reply message is too long.
For example, I asked "Perceptual hash algorithm", using ChatGptUnofficial.Ask. Then an exception was thrown.
Message:
An error occurred while sending the request.
Stack trace:

在 System.Net.Http.HttpConnection.<SendAsyncCore>d__62.MoveNext()
在 System.Net.Http.HttpConnectionPool.<SendWithVersionDetectionAndRetryAsync>d__83.MoveNext()
在 System.Threading.Tasks.ValueTask`1.get_Result()
在 System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1.ConfiguredValueTaskAwaiter.GetResult()
在 System.Net.Http.RedirectHandler.<SendAsync>d__4.MoveNext()
在 System.Net.Http.HttpClient.<<SendAsync>g__Core|83_0>d.MoveNext()
在 ChatGPT.Net.ChatGptUnofficial.<SendMessage>d__33.MoveNext() 在 E:\Mirai-console\livebot\source\ChatGPT.Net\ChatGPTUnofficial.cs 中: 第 261 行
在 ChatGPT.Net.ChatGptUnofficial.<Ask>d__30.MoveNext() 在 E:\Mirai-console\livebot\source\ChatGPT.Net\ChatGPTUnofficial.cs 中: 第 147 行

On the webpage, it can be seen that the message was successfully sent and ChatGPT replied a lot.
image
Is there any way to get such a long reply?

Maybe it will timeout, our focus is on the official API that's why we didn't update the unofficial one