Spaces:
Sleeping
Sleeping
Assignment 3
Browse files
README.md
CHANGED
@@ -168,6 +168,10 @@ 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 +214,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 |
+
#### Q1 ANSWER
|
172 |
+
|
173 |
+
Because streaming the response makes our system appear more responsive to the user. Its effect may not appear significant in this case as we're using API that's hosted on very powerful machines so the response time is already small. But if we want to deploy an open source model on premise for a client for data security purposes, while using the available hardware, response time will increase and streaming will be crucial.
|
174 |
+
|
175 |
### On Chat Start:
|
176 |
|
177 |
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.
|
|
|
214 |
|
215 |
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?
|
216 |
|
217 |
+
#### Q2 ANSWER
|
218 |
+
|
219 |
+
Because we want to deal with different users with their different conversations separately so we assign a session for each user with its own variables. Storing everything in a global variable meaning that users files and queries will get overwritten and we'll end up with a mess.
|
220 |
+
|
221 |
### On Message
|
222 |
|
223 |
First, we load our chain from the user session:
|