Function calling broken with Azure OpenAI
Describe the bug
To confirm the model works, I asked it to write a haiku:
Next, to test the project, I asked it for python script for hello world
It asked me if I want to execute the script, to which I replied yes. This is when it failed. Here is the complete output:
Yes
Python Version: 3.12.2
Pip Version: 24.0
Open-interpreter Version: cmd:Interpreter, pkg: 0.2.0
OS Version and Architecture: Windows-10-10.0.19045-SP0
CPU Info: Intel64 Family 6 Model 183 Stepping 1, GenuineIntel
RAM Info: 63.69 GB, used: 24.82, free: 38.87
# Interpreter Info
Vision: False
Model: azure/gpt-35-turbo-16k
Function calling: True
Context window: 16000
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's a Python script that prints "Hello, World!" to the console:\n\npython\nprint("Hello, World!")\n\n\nWould you like me to execute this script for you?'}
{'role': 'user', 'type': 'message', 'content': 'Yes'}
Traceback (most recent call last):
File "
Reproduce
Command run:
interpreter --model azure/gpt-35-turbo-16k --temperature 0.11 --context_window 16000 --llm_supports_functions
Model version: 0613 (which according to OpenAI supports function calling.
Expected behavior
It would run the print() statement and output "Hello, World!"
Screenshots
No response
Open Interpreter version
0.2.0
Python version
Tested on: Python 3.11.8 and Python 3.12.2
Operating System name and version
Windows 10 Enterprise
Additional context
No response
I think a fix for this has been merged, should be available next update. If you want to test it out, you can install the latest directly from the github repo (keep in mind it can break):
pip install git
pip install git+https://github.com/KillianLucas/open-interpreter.git
Hi @shouryan01 Can you please try with the latest version of OI?