Skip to content

Commit

Permalink
fix: address second conversation issue (#241)
Browse files Browse the repository at this point in the history
* fix: address second conversation issue

* update poetry lock

* fix
  • Loading branch information
wuyiqunLu authored Sep 19, 2024
1 parent 0891ca2 commit 3cda245
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 24 deletions.
40 changes: 20 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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
2 changes: 1 addition & 1 deletion vision_agent/utils/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class Result:
latex: Optional[str] = None
json: Optional[Dict[str, Any]] = None
javascript: Optional[str] = None
artifact_name: Optional[str] = None
artifact: Optional[str] = None
extra: Optional[Dict[str, Any]] = None
"Extra data that can be included. Not part of the standard types."

Expand Down

0 comments on commit 3cda245

Please sign in to comment.