Skip to content

Commit 7ebac32

Browse files
minor changes
1 parent dc32e9f commit 7ebac32

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pages/5_🛢_chat_with_sql_db.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def main(self):
6767
db_uri = 'USE_SAMPLE_DB'
6868

6969
if not db_uri:
70-
st.error("Please enter database URI to connect to continue!")
70+
st.error("Please enter database URI to continue!")
7171
st.stop()
7272

7373
db = self.setup_db(db_uri)
@@ -81,7 +81,11 @@ def main(self):
8181

8282
with st.chat_message("assistant"):
8383
st_cb = StreamlitCallbackHandler(st.container())
84-
response = agent.run(user_query, callbacks=[st_cb])
84+
result = agent.invoke(
85+
{"input": user_query},
86+
{"callbacks": [st_cb]}
87+
)
88+
response = result["output"]
8589
st.session_state.messages.append({"role": "assistant", "content": response})
8690
st.write(response)
8791

0 commit comments

Comments
 (0)