deepali1021 commited on
Commit
f244e22
·
1 Parent(s): 727d717

Answered questions

Browse files
Files changed (1) hide show
  1. README.md +5 -0
README.md CHANGED
@@ -168,6 +168,9 @@ Simply put, this downloads the file as a temp file, we load it in with `TextFile
168
 
169
  Why do we want to support streaming? What about streaming is important, or useful?
170
 
 
 
 
171
  ### On Chat Start:
172
 
173
  The next scope is where "the magic happens". On Chat Start is when a user begins a chat session. This will happen whenever a user opens a new chat window, or refreshes an existing chat window.
@@ -210,6 +213,8 @@ Now, we'll save that into our user session!
210
 
211
  Why are we using User Session here? What about Python makes us need to use this? Why not just store everything in a global variable?
212
 
 
 
213
  ### On Message
214
 
215
  First, we load our chain from the user session:
 
168
 
169
  Why do we want to support streaming? What about streaming is important, or useful?
170
 
171
+ We support streaming because we need to process data as it arrives in real-time. Streaming allows to process large data sets that exceed systems memory capacity. By processing data in small chunks you avoid the need to load the entire dataset into memory. It is use to improve performance because we process the data as it become available. This creates a more natural conversation experience.
172
+
173
+
174
  ### On Chat Start:
175
 
176
  The next scope is where "the magic happens". On Chat Start is when a user begins a chat session. This will happen whenever a user opens a new chat window, or refreshes an existing chat window.
 
213
 
214
  Why are we using User Session here? What about Python makes us need to use this? Why not just store everything in a global variable?
215
 
216
+ Chainlit provides user session to persist data in memory through the life cycle of a chat session. Each session is unique to user and the chat session. We do not use global session because doing so will cause the users of our application to share the same state causing mixing of the files and chat history.
217
+
218
  ### On Message
219
 
220
  First, we load our chain from the user session: