vprzybylo commited on
Commit
b5d1b12
·
1 Parent(s): 0349600

update homework answers 1 and 2

Browse files
Files changed (1) hide show
  1. README.md +6 -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,9 @@ 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
+ ### Quesion #1 Answer:
172
+ It provides immediate feedback and incremental updates, enhancing the user experience. Streaming also helps with handling large datasets efficiently and reduces latency by processing data as it becomes available. This ensures the app remains responsive, scalable, and engaging.
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
+ ### Question #2 Answer:
217
+ User Sessions are essential because web applications need to handle multiple concurrent users, each with their own data and state. Using global variables would cause all users to share the same state, leading to data mixing between users and potential security issues. Additionally, web servers are typically stateless and may handle requests across different instances, making global variables unreliable. User Sessions provide isolated environments for each user's data, allowing proper resource management and enabling the application to scale effectively across multiple servers.
218
+
219
  ### On Message
220
 
221
  First, we load our chain from the user session: