Technologic101 commited on
Commit
c73fd4a
·
1 Parent(s): 0349600

task: homework 3 question answers

Browse files
Files changed (1) hide show
  1. BuildingAChainlitApp.md +8 -0
BuildingAChainlitApp.md CHANGED
@@ -133,6 +133,10 @@ Simply put, this downloads the file as a temp file, we load it in with `TextFile
133
 
134
  Why do we want to support streaming? What about streaming is important, or useful?
135
 
 
 
 
 
136
  ## On Chat Start:
137
 
138
  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.
@@ -175,6 +179,10 @@ Now, we'll save that into our user session!
175
 
176
  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?
177
 
 
 
 
 
178
  ## On Message
179
 
180
  First, we load our chain from the user session:
 
133
 
134
  Why do we want to support streaming? What about streaming is important, or useful?
135
 
136
+ ##### ANSWER:
137
+
138
+ Streaming allows users to see the progress in the response, reducing the perceived latency. For larger responses it can allow for interruptions, or for the user to see the reponse being built. Streaming improves user experience by creating interactions that feel more natural and gives users insight into how the response is being created.
139
+
140
  ## On Chat Start:
141
 
142
  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.
 
179
 
180
  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?
181
 
182
+ ##### ANSWER:
183
+
184
+ Without the User Session, multiple users could access the same session and overwrite each other's data. Any state related to the current conversation would be lost. Global variables affect the whole application and cannot be restricted to a single user.
185
+
186
  ## On Message
187
 
188
  First, we load our chain from the user session: