Skip to content

Commit

Permalink
refmt
Browse files Browse the repository at this point in the history
  • Loading branch information
alckasoc committed Jan 8, 2025
1 parent 569c73b commit 09d2084
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 17 deletions.
8 changes: 5 additions & 3 deletions gui_agents/aci/MacOSACI.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
import numpy as np
import requests
from AppKit import *
from ApplicationServices import (AXUIElementCopyAttributeNames,
AXUIElementCopyAttributeValue,
AXUIElementCreateSystemWide)
from ApplicationServices import (
AXUIElementCopyAttributeNames,
AXUIElementCopyAttributeValue,
AXUIElementCreateSystemWide,
)

from .ACI import ACI, agent_action

Expand Down
8 changes: 5 additions & 3 deletions gui_agents/core/Knowledge.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
from gui_agents.core.BaseModule import BaseModule
from gui_agents.core.ProceduralMemory import PROCEDURAL_MEMORY
from gui_agents.mllm.MultimodalEngine import OpenAIEmbeddingEngine
from gui_agents.utils.common_utils import (load_embeddings,
load_knowledge_base,
save_embeddings)
from gui_agents.utils.common_utils import (
load_embeddings,
load_knowledge_base,
save_embeddings,
)
from gui_agents.utils.query_perplexica import query_to_perplexica

working_dir = os.path.dirname(os.path.abspath(__file__))
Expand Down
9 changes: 7 additions & 2 deletions gui_agents/core/Manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
from gui_agents.core.BaseModule import BaseModule
from gui_agents.core.Knowledge import KnowledgeBase
from gui_agents.core.ProceduralMemory import PROCEDURAL_MEMORY
from gui_agents.utils.common_utils import (Dag, Node, calculate_tokens,
call_llm_safe, parse_dag)
from gui_agents.utils.common_utils import (
Dag,
Node,
calculate_tokens,
call_llm_safe,
parse_dag,
)

logger = logging.getLogger("desktopenv.agent")

Expand Down
9 changes: 6 additions & 3 deletions gui_agents/mllm/MultimodalAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
import base64
import re

from gui_agents.mllm.MultimodalEngine import (LMMEngineAnthropic,
LMMEngineAzureOpenAI,
LMMEngineOpenAI, LMMEnginevLLM)
from gui_agents.mllm.MultimodalEngine import (
LMMEngineAnthropic,
LMMEngineAzureOpenAI,
LMMEngineOpenAI,
LMMEnginevLLM,
)

data_type_map = {
"openai": {"image_url": "image_url"},
Expand Down
6 changes: 4 additions & 2 deletions gui_agents/mllm/MultimodalAsyncAgent.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import base64
import re

from gui_agents.mllm.MultimodalAsyncEngine import (LMMEngineAsyncAzureOpenAI,
LMMEngineAsyncOpenAI)
from gui_agents.mllm.MultimodalAsyncEngine import (
LMMEngineAsyncAzureOpenAI,
LMMEngineAsyncOpenAI,
)
from gui_agents.mllm.MultimodalEngine import LMMEngineCogVLM, LMMEngineLlava


Expand Down
9 changes: 7 additions & 2 deletions gui_agents/mllm/MultimodalAsyncEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
import backoff
import openai
import requests
from openai import (APIConnectionError, APIError, AsyncAzureOpenAI,
AsyncOpenAI, RateLimitError)
from openai import (
APIConnectionError,
APIError,
AsyncAzureOpenAI,
AsyncOpenAI,
RateLimitError,
)
from PIL import Image


Expand Down
3 changes: 1 addition & 2 deletions gui_agents/mllm/MultimodalEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
import requests
import torch
from anthropic import Anthropic
from openai import (APIConnectionError, APIError, AzureOpenAI, OpenAI,
RateLimitError)
from openai import APIConnectionError, APIError, AzureOpenAI, OpenAI, RateLimitError
from PIL import Image

# TODO: Import only if module exists, else ignore
Expand Down

0 comments on commit 09d2084

Please sign in to comment.