All Settings
Language Model Settings
Set your model
, api_key
, temperature
, etc.
Interpreter Settings
Change your system_message
, set your interpreter to run offline
, etc.
Code Execution Settings
Modify the interpreter.computer
, which handles code execution.
Language Model
Model Selection
Specifies which language model to use. Check out the models section for a list of available models. Open Interpreter uses LiteLLM under the hood to support over 100+ models.
Temperature
Sets the randomness level of the model’s output. The default temperature is 0, you can set it to any value between 0 and 1. The higher the temperature, the more random and creative the output will be.
Context Window
Manually set the context window size in tokens for the model. For local models, using a smaller context window will use less RAM, which is more suitable for most devices.
Max Tokens
Sets the maximum number of tokens that the model can generate in a single response.
Max Output
Set the maximum number of characters for code outputs.
API Base
If you are using a custom API, specify its base URL with this argument.
API Key
Set your API key for authentication when making API calls. For OpenAI models, you can get your API key here.
API Version
Optionally set the API version to use with your selected model. (This will override environment variables)
LLM Supports Functions
Inform Open Interpreter that the language model you’re using supports function calling.
LLM Does Not Support Functions
Inform Open Interpreter that the language model you’re using does not support function calling.
Execution Instructions
If llm.supports_functions
is False
, this value will be added to the system message. This parameter tells language models how to execute code. This can be set to an empty string or to False
if you don’t want to tell the LLM how to do this.
LLM Supports Vision
Inform Open Interpreter that the language model you’re using supports vision. Defaults to False
.
Interpreter
Vision Mode
Enables vision mode, which adds some special instructions to the prompt and switches to gpt-4o
.
OS Mode
Enables OS mode for multimodal models. Currently not available in Python. Check out more information on OS mode here.
Version
Get the current installed version number of Open Interpreter.
Open Local Models Directory
Opens the models directory. All downloaded Llamafiles are saved here.
Open Profiles Directory
Opens the profiles directory. New yaml profile files can be added to this directory.
Select Profile
Select a profile to use. If no profile is specified, the default profile will be used.
Help
Display all available terminal arguments.
Loop (Force Task Completion)
Runs Open Interpreter in a loop, requiring it to admit to completing or failing every task.
Verbose
Run the interpreter in verbose mode. Debug information will be printed at each step to help diagnose issues.
Safe Mode
Enable or disable experimental safety mechanisms like code scanning. Valid options are off
, ask
, and auto
.
Auto Run
Automatically run the interpreter without requiring user confirmation.
Max Budget
Sets the maximum budget limit for the session in USD.
Local Mode
Run the model locally. Check the models page for more information.
Fast Mode
Sets the model to gpt-3.5-turbo and encourages it to only write code without confirmation.
Custom Instructions
Appends custom instructions to the system message. This is useful for adding information about your system, preferred languages, etc.
System Message
We don’t recommend modifying the system message, as doing so opts you out of future updates to the core system message. Use --custom_instructions
instead, to add relevant information to the system message. If you must modify the system message, you can do so by using this argument, or by changing a profile file.
Disable Telemetry
Opt out of telemetry.
Offline
This boolean flag determines whether to enable or disable some offline features like open procedures. Use this in conjunction with the model
parameter to set your language model.
Messages
This property holds a list of messages
between the user and the interpreter.
You can use it to restore a conversation:
interpreter.chat("Hi! Can you print hello world?")
print(interpreter.messages)
# This would output:
# [
# {
# "role": "user",
# "message": "Hi! Can you print hello world?"
# },
# {
# "role": "assistant",
# "message": "Sure!"
# }
# {
# "role": "assistant",
# "language": "python",
# "code": "print('Hello, World!')",
# "output": "Hello, World!"
# }
# ]
#You can use this to restore `interpreter` to a previous conversation.
interpreter.messages = messages # A list that resembles the one above
User Message Template
A template applied to the User’s message. {content}
will be replaced with the user’s message, then sent to the language model.
Always Apply User Message Template
The boolean flag for whether the User Message Template will be applied to every user message. The default is False which means the template is only applied to the last User message.
Code Message Template
A template applied to the Computer’s output after running code. {content}
will be replaced with the computer’s output, then sent to the language model.
Empty Code Message Template
If the computer does not output anything after code execution, this value will be sent to the language model.
Code Output Sender
This field determines whether the computer / code output messages are sent as the assistant or as the user. The default is user.
Computer
The computer
object in interpreter.computer
is a virtual computer that the AI controls. Its primary interface/function is to execute code and return the output in real-time.
Offline
Running the computer
in offline mode will disable some online features, like the hosted Computer API. Inherits from interpreter.offline
.
Verbose
This is primarily used for debugging interpreter.computer
. Inherits from interpreter.verbose
.
Emit Images
The emit_images
attribute in interpreter.computer
controls whether the computer should emit images or not. This is inherited from interpreter.llm.supports_vision
.
This is used for multimodel vs. text only models. Running computer.display.view()
will return an actual screenshot for multimodal models if emit_images
is True. If it’s False, computer.display.view()
will return all the text on the screen.
Many other functions of the computer can produce image/text outputs, and this parameter controls that.
Import Computer API
Include the computer API in the system message. The default is False and won’t import the computer API automatically