Giter Club home page Giter Club logo

Comments (4)

gtk2k avatar gtk2k commented on May 16, 2024 1

Thank you. I got the expected behavior.
If possible, it would be nice if onProgress was also written in the README.

from chatgpt-api.

transitive-bullshit avatar transitive-bullshit commented on May 16, 2024

@gtk2k we're already using an event-stream parser for responding to the request. Is there a specific change that you're suggesting?

from chatgpt-api.

transitive-bullshit avatar transitive-bullshit commented on May 16, 2024

I just performed a few tests with and without the Accept: 'text/event-stream' header. I wasn't able to notice any significant difference between the two.

One thing to keep in mind is that it can feel like the responses take longer when you're not seeing the partial response as ChatGPT is "typing". If you compare the time it takes to fully resolve an api.sendMessage vs your browser devtools, it will be very similar.

To view the stream of partial responses with chatgpt, you can use the onProgress or onConversationResponse parameters to api.sendMessage.

from chatgpt-api.

transitive-bullshit avatar transitive-bullshit commented on May 16, 2024

Just added a note to the readme πŸ‘

from chatgpt-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.