Spaces:
Runtime error

ashwinpatti commited on
Commit
2de518a
·
1 Parent(s): 6a5eb88

Deploying Pythonic RAG

Browse files
Files changed (1) hide show
  1. README.md +7 -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,10 @@ 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
+ #### Answer:
172
+ Streaming allows the application to provide responses immediately as they are available and hence improve user experience. It also enables to handle large data sets and improves performance.
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
+ #### Answer:
217
+ User session in chainlist persists data in the memory through the life-cycle of a chat session. Each user session is unique to a user and a given chat context. The concept of decorators in the python allow us to use chainlit's user session. We could use global variables to store data that is not user-specific, but this can lead to issues when multiple users interact with the application simultaneously and it could lead to conflicts too. Use of user sessions ensures that each user's data is kept isolated and secure.
218
+
219
+
220
  ### On Message
221
 
222
  First, we load our chain from the user session: