Skip to content

Commit

Permalink
flake8 black
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Aug 24, 2024
1 parent a63bcd7 commit a35f1d7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
7 changes: 5 additions & 2 deletions vision_agent/agent/vision_agent_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,9 @@ def pick_plan(
try:
best_plan = extract_json(model(chat, stream=False)) # type: ignore
except JSONDecodeError as e:
_LOGGER.exception(f"Error while extracting JSON during picking best plan {str(e)}")
_LOGGER.exception(
f"Error while extracting JSON during picking best plan {str(e)}"
)
pass
count += 1

Expand Down Expand Up @@ -804,7 +806,8 @@ def chat_with_workflow(

results = write_and_test_code(
chat=[{"role": c["role"], "content": c["content"]} for c in int_chat],
plan=f"\n{plan_i['thoughts']}\n-" + "\n-".join([e for e in plan_i["instructions"]]),
plan=f"\n{plan_i['thoughts']}\n-"
+ "\n-".join([e for e in plan_i["instructions"]]),
tool_info=tool_info,
tool_output=tool_output_str,
tool_utils=T.UTILITIES_DOCSTRING,
Expand Down
4 changes: 2 additions & 2 deletions vision_agent/clients/landing_public_api.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import os
from uuid import UUID
from typing import List
from uuid import UUID

from vision_agent.clients.http import BaseHTTP
from vision_agent.utils.type_defs import LandingaiAPIKey
from vision_agent.tools.meta_tools_types import BboxInputBase64, PromptTask
from vision_agent.utils.type_defs import LandingaiAPIKey


class LandingPublicAPI(BaseHTTP):
Expand Down
6 changes: 3 additions & 3 deletions vision_agent/tools/meta_tools.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import os
import subprocess
from uuid import UUID
from pathlib import Path
from typing import Any, Dict, List, Union
from uuid import UUID

import vision_agent as va
from vision_agent.clients.landing_public_api import LandingPublicAPI
from vision_agent.lmm.types import Message
from vision_agent.tools.meta_tools_types import BboxInput, BboxInputBase64, PromptTask
from vision_agent.tools.tool_utils import get_tool_documentation
from vision_agent.tools.tools import TOOL_DESCRIPTIONS
from vision_agent.utils.image_utils import convert_to_b64
from vision_agent.clients.landing_public_api import LandingPublicAPI
from vision_agent.tools.meta_tools_types import BboxInput, BboxInputBase64, PromptTask

# These tools are adapted from SWE-Agent https://github.com/princeton-nlp/SWE-agent

Expand Down
1 change: 0 additions & 1 deletion vision_agent/utils/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ def download_file(self, file_path: str) -> Path:


class E2BCodeInterpreter(CodeInterpreter):

def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
assert os.getenv("E2B_API_KEY"), "E2B_API_KEY environment variable must be set"
Expand Down

0 comments on commit a35f1d7

Please sign in to comment.