From 8161c485b230dbff403da6a118c204a426c5ba47 Mon Sep 17 00:00:00 2001 From: Dillon Laird Date: Wed, 16 Oct 2024 09:13:25 -0700 Subject: [PATCH] fixed streamlit app for new updates --- examples/chat/app.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/examples/chat/app.py b/examples/chat/app.py index 25188649..66d222ba 100644 --- a/examples/chat/app.py +++ b/examples/chat/app.py @@ -27,13 +27,19 @@ "style": {"bottom": "calc(50% - 4.25rem", "right": "0.4rem"}, } # set artifacts remote_path to WORKSPACE -artifacts = va.tools.meta_tools.Artifacts(WORKSPACE / "artifacts.pkl") +local_artifacts_path = "artifacts.pkl" +remote_artifacts_path = WORKSPACE / "artifacts.pkl" +artifacts = va.tools.meta_tools.Artifacts(remote_artifacts_path, local_artifacts_path) if Path("artifacts.pkl").exists(): artifacts.load("artifacts.pkl") else: artifacts.save("artifacts.pkl") -agent = va.agent.VisionAgent(verbosity=1, local_artifacts_path="artifacts.pkl") +agent = va.agent.VisionAgent( + verbosity=2, + local_artifacts_path=local_artifacts_path, + remote_artifacts_path=remote_artifacts_path, +) st.set_page_config(layout="wide") @@ -54,7 +60,9 @@ def update_messages(messages, lock): with lock: if Path("artifacts.pkl").exists(): artifacts.load("artifacts.pkl") - new_chat, _ = agent.chat_with_artifacts(messages, artifacts=artifacts) + new_chat, _ = agent.chat_with_artifacts( + messages, artifacts=artifacts, test_multi_plan=False + ) for new_message in new_chat[len(messages) :]: messages.append(new_message)