open-interpreter
open-interpreter copied to clipboard
Cant run scripts
Describe the bug
When given a simple task such as executing a hello world script, an exception is raised:
Python Version: 3.10.12 Pip Version: 22.0.2 Open-interpreter Version: cmd:Interpreter, pkg: 0.2.0 OS Version and Architecture: Linux-5.15.133.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 CPU Info: x86_64 RAM Info: 7.62 GB, used: 0.70, free: 5.72
# Interpreter Info
Vision: False
Model: azure/GPT3
Function calling: True
Context window: None
Max tokens: None
Auto run: False
API base: None
Offline: False
Curl output: Not local
# Messages
System Message: You are Open Interpreter, a world-class programmer that can complete any goal by executing code.
First, write a plan. Always recap the plan between each code block (you have extreme short-term memory loss, so you need to recap the plan between each message block to retain it). When you execute code, it will be executed on the user's machine. The user has given you full and complete permission to execute any code necessary to complete the task. Execute the code. If you want to send data between programming languages, save the data to a txt or json. You can access the internet. Run any code to achieve the goal, and if at first you don't succeed, try again and again. You can install new packages. When a user refers to a filename, they're likely referring to an existing file in the directory you're currently executing code in. Write messages to the user in Markdown. In general, try to make plans with as few steps as possible. As for actually executing code to carry out that plan, for stateful languages (like python, javascript, shell, but NOT for html which starts from 0 every time) it's critical not to try to do everything in one code block. You should try something, print information about it, then continue from there in tiny, informed steps. You will never get it on the first try, and attempting it in one go will often lead to errors you cant see. You are capable of any task.
{'role': 'user', 'type': 'message', 'content': 'python script for hello world'}
{'role': 'assistant', 'type': 'message', 'content': 'Sure! Here is a Python script that prints "Hello, World!":\n\npython\nprint("Hello, World!")\n
\n\nDo you want me to execute this script?'}
{'role': 'user', 'type': 'message', 'content': 'yes'}
Traceback (most recent call last):
File "/usr/local/bin/interpreter", line 8, in
Reproduce
interpreter --model azure/GPT3
python script for hello world
Expected behavior
That the script runs
Screenshots
No response
Open Interpreter version
0.2.0
Python version
3.10
Operating System name and version
WSL
Additional context
No response
https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-35-turbo-model-availability
interpreter --model azure/GPT3
you should probably use interpreter --model azure/gpt-35-turbo
I haven't used azure myself
Unfortunately, that is not the issue, the model should be deployment name e.g interpreter --model azure/<DEPLOYMENT_NAME>
it works fine as long as it does not have to run anything. Stuff like "write a joke" is no problem, so the model is correct.
I see, this is a issue with merge_delta.py will make a fix soon
I have the same problem.It is likely the version of your deployment doesn't support function-calling. I have made a pull request to enable passing an argument --no-llm_supports_functions whick will make OP to treat function_calls correctlly. Before this problem is fixed, you can manually set it to fmake it work for you for now. Open ""/usr/local/lib/python3.10/dist-packages/interpreter/core/llm/llm.py"" Find line 30, change from self.supports_functions = None to self.supports_functions = False
Not sure if it has to do with function calling support. I tried with gpt4 turbo and it was the same result.
@Fschoeller there is also a bug in the merge_delta function which throws error when merging a None function_calls.argument.
Has this bug been fixed? I met with the same issue, None type error.
If you install from github and not pip it seems to work
Should be fixed next update or if you install from the github as @Fschoeller said