Skip to content

Commit

Permalink
fix: address second conversation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
wuyiqunLu committed Sep 19, 2024
1 parent 0891ca2 commit f10383f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
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

0 comments on commit f10383f

Please sign in to comment.