chatgpt-api
chatgpt-api copied to clipboard
Missing onProgress on SendMessage function in ChatGPTAPIBrowser class
Describe the feature
The ChatGPTAPIBrowser.sendMessage function is missing the option for sendMessage, it would be nice if this is added
I was about to write it: the onProgress function does not work using apibrowser
+1. Would be a really helpful feature.
Really looking forward to this feature. Once it's live we should put together a demo that uses a websocket server and client to speak with the language model in real time.
If anyone wants to take a stab at this in a PR, the way I'd implement it is using page.exposeFunction
to expose a callback that the inner fetch
evaluate handler can check for to call back into node.js during progress updates.
https://github.com/transitive-bullshit/chatgpt-api/pull/163 was a previous attempt at adding this but it's stale now.
I did, based on page.exposefunction to make the asynchronous result of the stream response to ChatGPTAPIBrowser。 But maybe it's not so good。 Examples are at demos/demo-conversation-browser.ts : https://github.com/bincooo/cdn/raw/main/cgpt.zip
Just added in https://github.com/transitive-bullshit/chatgpt-api/releases/tag/v3.4.0
Please let me know if it's not working for you.