Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: address second conversation issue #241

Merged
merged 3 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ requests = "2.*"
tqdm = ">=4.64.0,<5.0.0"
pandas = "2.*"
openai = "1.*"
flake8 = "^7.0.0"
typing_extensions = "4.*"
opencv-python = "4.*"
tabulate = "^0.9.0"
Expand All @@ -47,7 +48,6 @@ av = "^11.0.0"
autoflake = "1.*"
pytest = "7.*"
black = ">=23,<25"
flake8 = "5.*"
isort = "5.*"
responses = "^0.23.1"
mypy = "<1.8.0"
Expand Down
7 changes: 5 additions & 2 deletions vision_agent/agent/vision_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,11 @@ def chat_with_code(
# sometimes it gets stuck in a loop, so we force it to exit
if last_response == response:
response["let_user_respond"] = True

self.streaming_message({"role": "assistant", "content": response})
self.streaming_message(
{"role": "assistant", "error": "Stuck in loop"}
)
else:
self.streaming_message({"role": "assistant", "content": response})

if response["let_user_respond"]:
break
Expand Down
Loading