Skip to content

Formatting response in streaming #204

Answered by cephalization
reveurguy asked this question in Help
Discussion options

You must be logged in to vote

You can take some inspiration from the vercel chatbot template.

https://github.com/vercel-labs/ai-chatbot

For newlines and indentation, you can simply apply white-space: pre-line to whatever element renders content from gpt

For markdown, you can use Remark, like in that template above, but its slightly more complicated depending on your framework and SSR.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by MaxLeiter
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #194 on June 22, 2023 19:09.