AI Agent Hub
AI エージェント / プラグイン情報メディア
← 一覧へ
Open Interpreter
CODEX

Open Interpreter

Open Interpreter

LLMがローカルでPython、JavaScript、シェルなどのコードを実行できる自然言語インターフェース。ターミナルのChatGPT風チャットから、コンピュータの汎用機能を日本語で指示して操作・実行できます。

原文: A natural language interface for computers
#コード実行#自然言語インターフェース#CLI#chatgpt#gpt-4#interpreter#javascript#nodejs#python
REPO STATS

リポジトリ統計

⭐ Stars
63.4k
🍴 Forks
5.5k
⚠️ Open Issues
322
🌿 Language
Python
📄 License
AGPL-3.0
🕒 最終更新
2026.05.04 (5日前)
📅 公開日
2023.07.14
🌿 Branch
main
README

ドキュメント

— AI による自動翻訳 (2026.05.10 更新)

● Open Interpreter

Discord JA doc ZH doc ES doc UK doc IN doc License

デスクトップアプリの早期アクセスを取得‎ ‎ |‎ ‎ ドキュメント


local_explorer


Open InterpreterはLLMにPython、Javascript、Shellなど、様々なプログラミング言語のコードをローカルで実行させることができます。インストール後に$ interpreterを実行することで、ターミナル内のChatGPT風インターフェースを通じてOpen Interpreterとチャットすることができます。

これにより、コンピュータの汎用機能への自然言語インターフェースが提供されます:

  • 写真、動画、PDFなどを作成・編集する
  • リサーチを実行するためにChrome ブラウザを制御する
  • 大規模データセットをプロット、クリーニング、分析する
  • など

⚠️ 注:コードを実行する前に承認するよう求められます。


デモ

Open.Interpreter.Demo.mp4

Google Colabでもインタラクティブなデモが利用可能です

Open In Colab

映画『Her』にインスパイアされた音声インターフェースの例も含まれています

Open In Colab

クイックスタート

インストール

pip install git+https://github.com/OpenInterpreter/open-interpreter.git

オプション依存関係については、セットアップガイドを参照してください。

ターミナル

インストール後、単に interpreter を実行します。

interpreter

Open Interpreter は OpenAI の GPT-4o をデフォルトとして使用し、キーの入力を求めます。キーは OpenAI の API キーページから取得できます。他のプロバイダーまたはローカルモデルについては、以下を参照してください。

Python

from interpreter import interpreter

interpreter.chat("Plot AAPL and META's normalized stock prices") # Executes a single command
interpreter.chat() # Starts an interactive chat

GitHub Codespaces

このリポジトリの GitHub ページで , キーを押すと、codespace を作成できます。しばらくすると、open-interpreter があらかじめインストールされたクラウド仮想マシン環境を受け取ります。その後、システムに損傷を与える心配なく、直接対話を開始し、実行を自由に確認できます。

ChatGPT の Code Interpreter との比較

OpenAI による GPT-4 の Code Interpreter のリリースは、ChatGPT を使用して実際のタスクを実現する素晴らしい機会を提示しています。

ただし、OpenAI のサービスはホスト型であり、クローズドソースで、厳しく制限されています。


Open Interpreter はこれらの制限をローカル環境で実行することで克服します。インターネットへのフルアクセスを持ち、時間やファイルサイズで制限されず、任意のパッケージやライブラリを利用できます。

これは GPT-4 の Code Interpreter のパワーと、ローカル開発環境の柔軟性を組み合わせるものです。

コマンド

インタラクティブチャット

ターミナルでインタラクティブなチャットを開始するには、コマンドラインから interpreter を実行してください:

interpreter

または、.py ファイルから interpreter.chat() を実行します:

interpreter.chat()

各チャンクをストリーミングすることもできます:

message = "What operating system are we on?"

for chunk in interpreter.chat(message, display=False, stream=True):
  print(chunk)

プログラマティックチャット

より細かい制御のため、メッセージを .chat(message) に直接渡すことができます:

interpreter.chat("Add subtitles to all videos in /videos.")

# ... Streams output to your terminal, completes task ...

interpreter.chat("These look great but can you make the subtitles bigger?")

# ...

新しいチャットを開始する

Python では、Open Interpreter は会話履歴を記憶します。新しく開始したい場合は、リセットできます:

interpreter.messages = []

チャットを保存・復元する

interpreter.chat() はメッセージのリストを返します。これを使用して interpreter.messages = messages で会話を再開できます:

messages = interpreter.chat("My name is Killian.") # Save messages to 'messages'
interpreter.messages = [] # Reset interpreter ("Killian" will be forgotten)

interpreter.messages = messages # Resume chat from 'messages' ("Killian" will be remembered)

システムメッセージをカスタマイズする

Open Interpreter のシステムメッセージを検査・設定して、機能を拡張したり、権限を変更したり、より多くのコンテキストを与えたりできます。

interpreter.system_message += """
Run shell commands with -y so the user doesn't have to confirm them.
"""
print(interpreter.system_message)

言語モデルを変更する

Open Interpreter は LiteLLM を使用してホストされた言語モデルに接続します。

モデルパラメータを設定することでモデルを変更できます:

interpreter --model gpt-3.5-turbo
interpreter --model claude-2
interpreter --model command-nightly

Python では、オブジェクトにモデルを設定します:

interpreter.llm.model = "gpt-3.5-turbo"

言語モデルの適切な「model」文字列をここで見つけてください。

Open Interpreter をローカルで実行する

ターミナル

Open Interpreter は OpenAI 互換のサーバーを使用してモデルをローカルで実行できます(LM Studio、Jan.ai、Ollama など)。

推論サーバーの api_base URL を使用して interpreter を実行してください。LM Studio の場合はデフォルトで http://localhost:1234/v1 です。

interpreter --api_base "http://localhost:1234/v1" --api_key "fake_key"

また、サードパーティのソフトウェアをインストールせずに Llamafile を使用することもできます。

interpreter --local

詳しくは Mike Bird によるこのビデオ をご確認ください。

LM Studio をバックグラウンドで実行する方法

  1. LM Studio をダウンロードして起動します。
  2. モデルを選択して ↓ Download をクリックします。
  3. 左側の ↔️ ボタン(💬 の下)をクリックします。
  4. 上部でモデルを選択してから Start Server をクリックします。

サーバーが起動したら、Open Interpreter との会話を開始できます。

注釈: ローカルモードは context_window を 3000 に、max_tokens を 1000 に設定します。モデルが異なる要件を持つ場合は、これらのパラメータを手動で設定してください(以下を参照)。

Python

Python パッケージは、各設定をより詳細に制御できます。LM Studio に接続するには、次の設定を使用してください。

from interpreter import interpreter

interpreter.offline = True # Disables online features like Open Procedures
interpreter.llm.model = "openai/x" # Tells OI to send messages in OpenAI's format
interpreter.llm.api_key = "fake_key" # LiteLLM, which we use to talk to LM Studio, requires this
interpreter.llm.api_base = "http://localhost:1234/v1" # Point this at any OpenAI compatible server

interpreter.chat()

Context Window、Max Tokens

— GitHub から取得した原文(一部省略の場合あり)

● Open Interpreter

Discord JA doc ZH doc ES doc UK doc IN doc License

Get early access to the desktop app‎ ‎ |‎ ‎ Documentation


local_explorer


Open Interpreter lets LLMs run code (Python, Javascript, Shell, and more) locally. You can chat with Open Interpreter through a ChatGPT-like interface in your terminal by running $ interpreter after installing.

This provides a natural-language interface to your computer's general-purpose capabilities:

  • Create and edit photos, videos, PDFs, etc.
  • Control a Chrome browser to perform research
  • Plot, clean, and analyze large datasets
  • ...etc.

⚠️ Note: You'll be asked to approve code before it's run.


Demo

Open.Interpreter.Demo.mp4

An interactive demo is also available on Google Colab

Open In Colab

Along with an example voice interface, inspired by Her

Open In Colab

Quick Start

Install

pip install git+https://github.com/OpenInterpreter/open-interpreter.git

See our setup guide for optional dependencies.

Terminal

After installation, simply run interpreter:

interpreter

Open Interpreter will default to OpenAI's GPT-4o and will ask you to enter a key, which you can obtain from OpenAI's API keys page. For other providers or local models, see below.

Python

from interpreter import interpreter

interpreter.chat("Plot AAPL and META's normalized stock prices") # Executes a single command
interpreter.chat() # Starts an interactive chat

GitHub Codespaces

Press the , key on this repository's GitHub page to create a codespace. After a moment, you'll receive a cloud virtual machine environment pre-installed with open-interpreter. You can then start interacting with it directly and freely confirm its execution of system commands without worrying about damaging the system.

Comparison to ChatGPT's Code Interpreter

OpenAI's release of Code Interpreter with GPT-4 presents a fantastic opportunity to accomplish real-world tasks with ChatGPT.

However, OpenAI's service is hosted, closed-source, and heavily restricted:

  • No internet access.
  • Limited set of pre-installed packages.
  • 100 MB maximum upload, 120.0 second runtime limit.
  • State is cleared (along with any generated files or links) when the environment dies.

Open Interpreter overcomes these limitations by running in your local environment. It has full access to the internet, isn't restricted by time or file size, and can utilize any package or library.

This combines the power of GPT-4's Code Interpreter with the flexibility of your local development environment.

Commands

Interactive Chat

To start an interactive chat in your terminal, either run interpreter from the command line:

interpreter

Or interpreter.chat() from a .py file:

interpreter.chat()

You can also stream each chunk:

message = "What operating system are we on?"

for chunk in interpreter.chat(message, display=False, stream=True):
  print(chunk)

Programmatic Chat

For more precise control, you can pass messages directly to .chat(message):

interpreter.chat("Add subtitles to all videos in /videos.")

# ... Streams output to your terminal, completes task ...

interpreter.chat("These look great but can you make the subtitles bigger?")

# ...

Start a New Chat

In Python, Open Interpreter remembers conversation history. If you want to start fresh, you can reset it:

interpreter.messages = []

Save and Restore Chats

interpreter.chat() returns a List of messages, which can be used to resume a conversation with interpreter.messages = messages:

messages = interpreter.chat("My name is Killian.") # Save messages to 'messages'
interpreter.messages = [] # Reset interpreter ("Killian" will be forgotten)

interpreter.messages = messages # Resume chat from 'messages' ("Killian" will be remembered)

Customize System Message

You can inspect and configure Open Interpreter's system message to extend its functionality, modify permissions, or give it more context.

interpreter.system_message += """
Run shell commands with -y so the user doesn't have to confirm them.
"""
print(interpreter.system_message)

Change your Language Model

Open Interpreter uses LiteLLM to connect to hosted language models.

You can change the model by setting the model parameter:

interpreter --model gpt-3.5-turbo
interpreter --model claude-2
interpreter --model command-nightly

In Python, set the model on the object:

interpreter.llm.model = "gpt-3.5-turbo"

Find the appropriate "model" string for your language model here.

Running Open Interpreter locally

Terminal

Open Interpreter can use OpenAI-compatible server to run models locally (in LM Studio, Jan.ai, Ollama, etc.)

Simply run interpreter with the api_base URL of your inference server (for LM Studio it is http://localhost:1234/v1 by default):

interpreter --api_base "http://localhost:1234/v1" --api_key "fake_key"

Alternatively you can use Llamafile without installing any third party software just by running

interpreter --local

for a more detailed guide check out this video by Mike Bird

How to run LM Studio in the background.

  1. Download LM Studio then start it.
  2. Select a model then click ↓ Download.
  3. Click the ↔️ button on the left (below 💬).
  4. Select your model at the top, then click Start Server.

Once the server is running, you can begin your conversation with Open Interpreter.

Note: Local mode sets your context_window to 3000, and your max_tokens to 1000. If your model has different requirements, set these parameters manually (see below).

Python

Our Python package gives you more control over each setting. To replicate and connect to LM Studio, use these settings:

from interpreter import interpreter

interpreter.offline = True # Disables online features like Open Procedures
interpreter.llm.model = "openai/x" # Tells OI to send messages in OpenAI's format
interpreter.llm.api_key = "fake_key" # LiteLLM, which we use to talk to LM Studio, requires this
interpreter.llm.api_base = "http://localhost:1234/v1" # Point this at any OpenAI compatible server

interpreter.chat()

Context Window, Max Tokens

RELATED

同じカテゴリの他のツール