Skip to content

Commit a119c28

Browse files
committed
add open interpreter
1 parent 2180893 commit a119c28

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from interpreter import interpreter
2+
from crewai_tools import tool
3+
4+
5+
# 1. Configuration and Tools
6+
interpreter.auto_run = True
7+
interpreter.llm.model = "gpt-4o"
8+
9+
10+
@tool
11+
def execute_code(code: str):
12+
"""A tool to execute code using Open Interpreter. Returns the output of the code."""
13+
result = interpreter.chat(f"execute this code with no changes: {code}")
14+
return result
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "open_interpreter",
3+
"package": "poetry add open-interpreter",
4+
"env": "",
5+
"tools": ["execute_code"]
6+
}

0 commit comments

Comments
 (0)