Spaces:
Paused
Paused
Deploying Pythonic RAG
Browse files- BuildingAChainlitApp.md +6 -0
BuildingAChainlitApp.md
CHANGED
@@ -132,6 +132,9 @@ Simply put, this downloads the file as a temp file, we load it in with `TextFile
|
|
132 |
#### QUESTION #1:
|
133 |
|
134 |
Why do we want to support streaming? What about streaming is important, or useful?
|
|
|
|
|
|
|
135 |
|
136 |
## On Chat Start:
|
137 |
|
@@ -174,6 +177,9 @@ Now, we'll save that into our user session!
|
|
174 |
### QUESTION #2:
|
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 |
|
|
|
132 |
#### QUESTION #1:
|
133 |
|
134 |
Why do we want to support streaming? What about streaming is important, or useful?
|
135 |
+
Streaming allows users to start seeing parts of the response as soon as they are generated, rather than waiting for the entire response to be processed. This can significantly enhance the user experience by reducing perceived latency.
|
136 |
+
|
137 |
+
If a response is long, streaming allows it to be delivered in chunks rather than waiting for the entire response to be completed. In real-time applications such as live chat, streaming is essential to maintain a fluid and dynamic interaction between the user and the system.
|
138 |
|
139 |
## On Chat Start:
|
140 |
|
|
|
177 |
### QUESTION #2:
|
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 |
+
In a multi-user application, each user interacts with the system independently. User sessions allow us to store data specific to each user separately. If we used global variables, data would be shared across all users, leading to conflicts and data leaks.
|
181 |
+
|
182 |
+
User sessions provide a way to persist data across multiple interactions with the same user. For example, a user might upload a file, then ask several questions about it. Using a session, we can store the uploaded file and any processing results so they can be used in subsequent requests
|
183 |
|
184 |
## On Message
|
185 |
|