Skip to content
This repository was archived by the owner on Dec 30, 2023. It is now read-only.

Support stream output#11

Merged
Richasy merged 2 commits intomainfrom
richasy/streamOutput
Jun 9, 2023
Merged

Support stream output#11
Richasy merged 2 commits intomainfrom
richasy/streamOutput

Conversation

@Richasy
Copy link
Owner

@Richasy Richasy commented Jun 9, 2023

Close #8

When receiving LLM responses, it is possible to stream the messages in a typewriter-like fashion.

LLM generates messages in chunks, and enabling streaming allows for "real-time" display of the generated message content.

PR type

What is the purpose of this PR?

  • Feature

What is the current behavior?

Currently, we will wait for the model to generate the response text before displaying it all at once.

What is the new behavior?

In addition to supporting the generation of text in a single display, real-time display of text generated by the model is now also supported.

PR checklist

Please check that your PR meets the following requirements:

  • App successfully launched
  • New components
    • For controls, the controls have been placed in the Controls folder of the main project
  • File headers have been added to all source files
  • NOT Contains breaking updates

Remark

This real-time is false. Due to limitations of the UI thread itself, it is impossible for the text to be updated multiple times in a short period of time, so there are currently restrictions in place. A timer will be used within the program to attempt to update the temporary text only once every 50 milliseconds.

@Richasy Richasy added the enhancement New feature or request label Jun 9, 2023
@Richasy Richasy merged commit 2c77d66 into main Jun 9, 2023
@Richasy Richasy deleted the richasy/streamOutput branch June 9, 2023 10:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Support for displaying message responses in typewriter mode

1 participant