Update app.py
Browse files
app.py
CHANGED
|
@@ -182,7 +182,7 @@ def ask_agent(question):
|
|
| 182 |
logger.info(f"Question asked: {question[:100]}...")
|
| 183 |
try:
|
| 184 |
# Run the agent with the user's question, ensuring it uses its knowledge base.
|
| 185 |
-
response = agent.run(question, use_knowledge=True)
|
| 186 |
# Get the agent's response as a single string.
|
| 187 |
full_content = response.get_content_as_string()
|
| 188 |
except Exception as e:
|
|
@@ -315,7 +315,6 @@ with gr.Blocks(
|
|
| 315 |
#ask_btn = gr.Button("Submit 📤", variant="primary")
|
| 316 |
with gr.Row():
|
| 317 |
ask_btn = gr.Button("Submit 📤", variant="primary", elem_classes="component")
|
| 318 |
-
regen_btn = gr.Button("🔄 Regenerate", elem_classes="component")
|
| 319 |
clear_btn = gr.Button("🧹 Clear Chat", elem_classes="component")
|
| 320 |
# A section for example questions.
|
| 321 |
gr.Markdown("### 💡 Example Questions", elem_classes="component")
|
|
|
|
| 182 |
logger.info(f"Question asked: {question[:100]}...")
|
| 183 |
try:
|
| 184 |
# Run the agent with the user's question, ensuring it uses its knowledge base.
|
| 185 |
+
response = agent.run(question, use_knowledge=True, stream=True)
|
| 186 |
# Get the agent's response as a single string.
|
| 187 |
full_content = response.get_content_as_string()
|
| 188 |
except Exception as e:
|
|
|
|
| 315 |
#ask_btn = gr.Button("Submit 📤", variant="primary")
|
| 316 |
with gr.Row():
|
| 317 |
ask_btn = gr.Button("Submit 📤", variant="primary", elem_classes="component")
|
|
|
|
| 318 |
clear_btn = gr.Button("🧹 Clear Chat", elem_classes="component")
|
| 319 |
# A section for example questions.
|
| 320 |
gr.Markdown("### 💡 Example Questions", elem_classes="component")
|