Skip to content

Commit

Permalink
feat: Add no_tools parameter to get_agent_executor and update screens…
Browse files Browse the repository at this point in the history
…hot_ function to use it
  • Loading branch information
onuratakan committed Dec 21, 2024
1 parent b2d54eb commit 3ff8037
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
4 changes: 3 additions & 1 deletion gpt_computer_assistant/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def get_prompt(name):
return prompt


def get_agent_executor(the_anthropic_model=False):
def get_agent_executor(the_anthropic_model=False, no_tools=False):
tools = get_tools()
tools += custom_tools()

Expand Down Expand Up @@ -81,6 +81,8 @@ def get_agent_executor(the_anthropic_model=False):



if no_tools:
tools = []


if (
Expand Down
13 changes: 4 additions & 9 deletions gpt_computer_assistant/display_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,20 +207,15 @@ def screenshot_(checking:str):



human_second_message = None

if screenshot_path:


human_second_message = {
human_second_message = {
"type": "image_url",
"image_url": {"url": f"data:image/png;base64,{the_base64}"},
}



if human_second_message:
the_message.append(human_second_message)

the_message.append(human_second_message)



Expand All @@ -234,7 +229,7 @@ def screenshot_(checking:str):



msg = get_agent_executor().invoke(
msg = get_agent_executor(no_tools=True).invoke(
{"messages": [the_message]}
)

Expand Down

0 comments on commit 3ff8037

Please sign in to comment.