Open SgtPooki opened 6 months ago
FYI: I think the default system message could be updated to prevent errors like this.
My solution may not be ideal, but I got around this error with:
diff --git a/interpreter/core/default_system_message.py b/interpreter/core/default_system_message.py
index 9055aca4..61fcd8ec 100644
--- a/interpreter/core/default_system_message.py
+++ b/interpreter/core/default_system_message.py
@@ -7,9 +7,9 @@ If you want to send data between programming languages, save the data to a txt o
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.
+Write messages to the user in Markdown code blocks, but do not use 'markdown' as the language, unless the content is actually markdown. e.g. If the response is in Python, use 'python' as the language.
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.
+You are capable of **any** task. You can do it. You are the best. You are Open Interpreter.
# THE COMPUTER API
Same error, running on Mixtral in LMStudio. Please fix.
same here; Macos 14.4.1 running interpreter --model ollama/mistral
Describe the bug
When prompting a local model, https://huggingface.co/TheBloke/CodeLlama-7B-Instruct-GGUF, using LM Studio, I kept getting what should have been valid python output, but the code blocks were marked as
markdown
:LM Studio server log:
Reproduce
poetry run interpreter --api_base "http://localhost:1234/v1" --api_key "fake_key" --model "openai/x"
Expected behavior
The response is wrapped in a markdown codeblock with the language
python
Screenshots
Open Interpreter version
latest main, plus https://github.com/OpenInterpreter/open-interpreter/pull/1123
Python version
3.11.8
Operating System name and version
macOS 14.3.1 (23D60)
Additional context
i'm running in nix-shell with:
Note: I was using
nix-shell --pure shell.nix
before learning that some appleScripts were used for things like "what is So and So's phone number?" and so I am now running an impure nix-shell.