Update app.py
Browse files
app.py
CHANGED
|
@@ -213,7 +213,7 @@ builder.add_edge("execute_sql", "refine")
|
|
| 213 |
builder.add_edge("refine", END)
|
| 214 |
|
| 215 |
memory = SqliteSaver("graph_checkpoint")
|
| 216 |
-
graph = builder.compile(checkpointer=memory)
|
| 217 |
|
| 218 |
async def async_chatbot_response(question, model_name):
|
| 219 |
inputs = {"question": question}
|
|
@@ -241,7 +241,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 241 |
reset_btn = gr.Button("Resetar")
|
| 242 |
with gr.Column(scale=4):
|
| 243 |
gr.Markdown("## Reasoning Agent")
|
| 244 |
-
chatbot = gr.Chatbot(height=500)
|
| 245 |
msg = gr.Textbox(placeholder="Digite sua pergunta aqui...", lines=1, label="")
|
| 246 |
btn = gr.Button("Enviar", variant="primary")
|
| 247 |
history_btn = gr.Button("Hist贸rico", variant="secondary")
|
|
|
|
| 213 |
builder.add_edge("refine", END)
|
| 214 |
|
| 215 |
memory = SqliteSaver("graph_checkpoint")
|
| 216 |
+
graph = builder.compile(checkpointer=memory, config={"configurable": {"question"}})
|
| 217 |
|
| 218 |
async def async_chatbot_response(question, model_name):
|
| 219 |
inputs = {"question": question}
|
|
|
|
| 241 |
reset_btn = gr.Button("Resetar")
|
| 242 |
with gr.Column(scale=4):
|
| 243 |
gr.Markdown("## Reasoning Agent")
|
| 244 |
+
chatbot = gr.Chatbot(height=500, type="messages")
|
| 245 |
msg = gr.Textbox(placeholder="Digite sua pergunta aqui...", lines=1, label="")
|
| 246 |
btn = gr.Button("Enviar", variant="primary")
|
| 247 |
history_btn = gr.Button("Hist贸rico", variant="secondary")
|