Skip to content

Commit 7cc404c

Browse files
committed
Work without screen, default to anthropic
1 parent e01a33a commit 7cc404c

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

interpreter_1/profiles.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@ class Profile:
3232
def __init__(self):
3333
# Default values if no profile exists
3434
# Model configuration
35-
self.model = "anthropic/claude-3-5-sonnet-latest" # The LLM model to use
36-
self.provider = (
37-
None # The model provider (e.g. anthropic, openai) None will auto-detect
38-
)
35+
self.model = "claude-3-5-sonnet-latest" # The LLM model to use
36+
self.provider = "anthropic" # The model provider (e.g. anthropic, openai) None will auto-detect
3937
self.temperature = 0 # Sampling temperature for model outputs (0-1)
4038
self.max_tokens = None # Maximum tokens in a message
4139

interpreter_1/tools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from .computer import ComputerTool
66
from .edit import EditTool
77

8-
if os.environ.get("INTERPRETER_SIMPLE_BASH") == "true":
8+
if os.environ.get("INTERPRETER_SIMPLE_BASH", "").lower() == "true":
99
from .simple_bash import BashTool
1010
else:
1111
from .bash import BashTool

interpreter_1/tools/computer.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@
1010
from typing import Literal, TypedDict
1111
from uuid import uuid4
1212

13-
import pyautogui
13+
try:
14+
import pyautogui
15+
except:
16+
import traceback
17+
18+
traceback.print_exc()
19+
print("Failed to import pyautogui. Computer tool will not work.")
20+
1421
from anthropic.types.beta import BetaToolComputerUse20241022Param
1522
from screeninfo import get_monitors
1623

0 commit comments

Comments
 (0)