agentic
agentic copied to clipboard
Support returning the text that chatgpt has generated when the response times out.
Describe the feature
chatgpt sometimes gets stuck in a stalled state until it times out after generating a portion of text. The ChatGPTUnofficialProxyAPI only returns error messages in this case. Would like to provide an option to return the received text when the timeout occurs.
tested in ChatGPTUnofficialProxyAPI , I have found that after the first request at the start of the whole project, subsequent requests may be blocked, resulting in low availability.
We're now returning the delta
as well as the full text if you pass an onProrgress
handler for the official ChatGPTAPI
.
For the unofficial API, you should have access to all this info from onProgress
. I'd recommend implementing any extra error-handling logic for recovering from timeouts on your end.