Spaces:
Sleeping
Sleeping
Commit
·
910a585
1
Parent(s):
004bb63
added answers to Questions in md file
Browse files- BuildingAChainlitApp.md +5 -0
BuildingAChainlitApp.md
CHANGED
|
@@ -133,6 +133,9 @@ 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 +178,8 @@ 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 |
+
<!-- A: This allows for portions of the respnse to be available and streamed as they are generated. Therefore the user does not have to wait for the entire response
|
| 137 |
+
to be ready. -->
|
| 138 |
+
|
| 139 |
## On Chat Start:
|
| 140 |
|
| 141 |
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.
|
|
|
|
| 178 |
|
| 179 |
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?
|
| 180 |
|
| 181 |
+
<!-- A: There are many beenfits to using User Session, but overall they allow for building scalable, user-centric applications where context, personalization, and state persistence are critical. -->
|
| 182 |
+
|
| 183 |
## On Message
|
| 184 |
|
| 185 |
First, we load our chain from the user session:
|