Skip to content

Commit

Permalink
fix typing error
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed May 14, 2024
1 parent 12b4ad9 commit e36d84b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vision_agent/agent/vision_agent_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def extract_json(json_str: str) -> Dict[str, Any]:
# get the last ``` not one from an intermediate string
json_str = json_str[: json_str.find("}```")]
json_dict = json.loads(json_str)
return json_dict
return json_dict # type: ignore


def write_plan(
Expand All @@ -80,8 +80,8 @@ def write_plan(
context = USER_REQ_CONTEXT.format(user_requirement=user_requirements)
prompt = PLAN.format(context=context, plan=str(plan), tool_desc=tool_desc)
chat[-1]["content"] = prompt
plan = extract_json(model.chat(chat))
return plan["user_req"], plan["plan"] # type: ignore
new_plan = extract_json(model.chat(chat))
return new_plan["user_req"], new_plan["plan"]


def write_code(
Expand Down

0 comments on commit e36d84b

Please sign in to comment.