main 681f5ce5b84b cached
271 files
10.3 MB
2.7M tokens
536 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (10,873K chars total). Download the full file to get everything.
Repository: openinterpreter/open-interpreter
Branch: main
Commit: 681f5ce5b84b
Files: 271
Total size: 10.3 MB

Directory structure:
gitextract_u72n0w4c/

├── .devcontainer/
│   ├── DockerFile
│   └── devcontainer.json
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.yml
│   │   ├── config.yml
│   │   └── feature_request.yml
│   ├── pull_request_template.md
│   └── workflows/
│       ├── potential-duplicates.yml
│       └── python-package.yml
├── .gitignore
├── .pre-commit-config.yaml
├── Dockerfile
├── LICENSE
├── README.md
├── docs/
│   ├── CONTRIBUTING.md
│   ├── NCU_MIGRATION_GUIDE.md
│   ├── README_DE.md
│   ├── README_ES.md
│   ├── README_IN.md
│   ├── README_JA.md
│   ├── README_UK.md
│   ├── README_VN.md
│   ├── README_ZH.md
│   ├── ROADMAP.md
│   ├── SAFE_MODE.md
│   ├── SECURITY.md
│   ├── assets/
│   │   └── .DS-Store
│   ├── code-execution/
│   │   ├── computer-api.mdx
│   │   ├── custom-languages.mdx
│   │   ├── settings.mdx
│   │   └── usage.mdx
│   ├── computer/
│   │   ├── custom-languages.mdx
│   │   ├── introduction.mdx
│   │   ├── language-model-usage.mdx
│   │   └── user-usage.mdx
│   ├── getting-started/
│   │   ├── introduction.mdx
│   │   └── setup.mdx
│   ├── guides/
│   │   ├── advanced-terminal-usage.mdx
│   │   ├── basic-usage.mdx
│   │   ├── demos.mdx
│   │   ├── multiple-instances.mdx
│   │   ├── os-mode.mdx
│   │   ├── profiles.mdx
│   │   ├── running-locally.mdx
│   │   └── streaming-response.mdx
│   ├── integrations/
│   │   ├── docker.mdx
│   │   └── e2b.mdx
│   ├── language-models/
│   │   ├── custom-models.mdx
│   │   ├── hosted-models/
│   │   │   ├── ai21.mdx
│   │   │   ├── anthropic.mdx
│   │   │   ├── anyscale.mdx
│   │   │   ├── aws-sagemaker.mdx
│   │   │   ├── azure.mdx
│   │   │   ├── baseten.mdx
│   │   │   ├── cloudflare.mdx
│   │   │   ├── cohere.mdx
│   │   │   ├── deepinfra.mdx
│   │   │   ├── gpt-4-setup.mdx
│   │   │   ├── huggingface.mdx
│   │   │   ├── mistral-api.mdx
│   │   │   ├── nlp-cloud.mdx
│   │   │   ├── openai.mdx
│   │   │   ├── openrouter.mdx
│   │   │   ├── palm.mdx
│   │   │   ├── perplexity.mdx
│   │   │   ├── petals.mdx
│   │   │   ├── replicate.mdx
│   │   │   ├── togetherai.mdx
│   │   │   ├── vertex-ai.mdx
│   │   │   └── vllm.mdx
│   │   ├── introduction.mdx
│   │   ├── local-models/
│   │   │   ├── best-practices.mdx
│   │   │   ├── custom-endpoint.mdx
│   │   │   ├── janai.mdx
│   │   │   ├── llamafile.mdx
│   │   │   ├── lm-studio.mdx
│   │   │   └── ollama.mdx
│   │   └── settings.mdx
│   ├── legal/
│   │   └── license.mdx
│   ├── mint.json
│   ├── protocols/
│   │   ├── i-protocol.mdx
│   │   └── lmc-messages.mdx
│   ├── safety/
│   │   ├── best-practices.mdx
│   │   ├── introduction.mdx
│   │   ├── isolation.mdx
│   │   └── safe-mode.mdx
│   ├── server/
│   │   └── usage.mdx
│   ├── settings/
│   │   ├── all-settings.mdx
│   │   ├── example-profiles.mdx
│   │   └── profiles.mdx
│   ├── style.css
│   ├── telemetry/
│   │   └── telemetry.mdx
│   ├── troubleshooting/
│   │   └── faq.mdx
│   └── usage/
│       ├── desktop/
│       │   ├── help.md
│       │   └── install.mdx
│       ├── examples.mdx
│       ├── python/
│       │   ├── arguments.mdx
│       │   ├── budget-manager.mdx
│       │   ├── conversation-history.mdx
│       │   ├── magic-commands.mdx
│       │   ├── multiple-instances.mdx
│       │   └── settings.mdx
│       └── terminal/
│           ├── arguments.mdx
│           ├── budget-manager.mdx
│           ├── magic-commands.mdx
│           ├── settings.mdx
│           └── vision.mdx
├── examples/
│   ├── Dockerfile
│   ├── JARVIS.ipynb
│   ├── Open_Interpreter_Demo.ipynb
│   ├── README.md
│   ├── custom_tool.ipynb
│   ├── interactive_quickstart.py
│   ├── jan_computer_control.ipynb
│   ├── local3.ipynb
│   ├── local_server.ipynb
│   ├── organize_photos.ipynb
│   ├── screenpipe.ipynb
│   └── talk_to_your_database.ipynb
├── installers/
│   ├── oi-linux-installer.sh
│   ├── oi-mac-installer.sh
│   ├── oi-windows-installer-conda.ps1
│   └── oi-windows-installer.ps1
├── interpreter/
│   ├── __init__.py
│   ├── computer_use/
│   │   ├── __init__.py
│   │   ├── loop.py
│   │   ├── tools/
│   │   │   ├── __init__.py
│   │   │   ├── base.py
│   │   │   ├── bash.py
│   │   │   ├── collection.py
│   │   │   ├── computer.py
│   │   │   ├── edit.py
│   │   │   └── run.py
│   │   └── unused_markdown.py
│   ├── core/
│   │   ├── __init__.py
│   │   ├── archived_server_1.py
│   │   ├── archived_server_2.py
│   │   ├── async_core.py
│   │   ├── computer/
│   │   │   ├── __init__.py
│   │   │   ├── ai/
│   │   │   │   ├── __init__.py
│   │   │   │   └── ai.py
│   │   │   ├── browser/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── browser.py
│   │   │   │   └── browser_next.py
│   │   │   ├── calendar/
│   │   │   │   ├── __init__.py
│   │   │   │   └── calendar.py
│   │   │   ├── clipboard/
│   │   │   │   ├── __init__.py
│   │   │   │   └── clipboard.py
│   │   │   ├── computer.py
│   │   │   ├── contacts/
│   │   │   │   ├── __init__.py
│   │   │   │   └── contacts.py
│   │   │   ├── display/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── display.py
│   │   │   │   └── point/
│   │   │   │       └── point.py
│   │   │   ├── docs/
│   │   │   │   ├── __init__.py
│   │   │   │   └── docs.py
│   │   │   ├── files/
│   │   │   │   ├── __init__.py
│   │   │   │   └── files.py
│   │   │   ├── keyboard/
│   │   │   │   ├── __init__.py
│   │   │   │   └── keyboard.py
│   │   │   ├── mail/
│   │   │   │   ├── __init__.py
│   │   │   │   └── mail.py
│   │   │   ├── mouse/
│   │   │   │   ├── __init__.py
│   │   │   │   └── mouse.py
│   │   │   ├── os/
│   │   │   │   ├── __init__.py
│   │   │   │   └── os.py
│   │   │   ├── skills/
│   │   │   │   └── skills.py
│   │   │   ├── sms/
│   │   │   │   ├── __init__.py
│   │   │   │   └── sms.py
│   │   │   ├── terminal/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── base_language.py
│   │   │   │   ├── languages/
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   ├── applescript.py
│   │   │   │   │   ├── html.py
│   │   │   │   │   ├── java.py
│   │   │   │   │   ├── javascript.py
│   │   │   │   │   ├── jupyter_language.py
│   │   │   │   │   ├── powershell.py
│   │   │   │   │   ├── python.py
│   │   │   │   │   ├── r.py
│   │   │   │   │   ├── react.py
│   │   │   │   │   ├── ruby.py
│   │   │   │   │   ├── shell.py
│   │   │   │   │   └── subprocess_language.py
│   │   │   │   └── terminal.py
│   │   │   ├── utils/
│   │   │   │   ├── computer_vision.py
│   │   │   │   ├── get_active_window.py
│   │   │   │   ├── html_to_png_base64.py
│   │   │   │   ├── recipient_utils.py
│   │   │   │   └── run_applescript.py
│   │   │   └── vision/
│   │   │       ├── __init__.py
│   │   │       └── vision.py
│   │   ├── core.py
│   │   ├── default_system_message.py
│   │   ├── llm/
│   │   │   ├── __init__.py
│   │   │   ├── llm.py
│   │   │   ├── run_function_calling_llm.py
│   │   │   ├── run_text_llm.py
│   │   │   ├── run_tool_calling_llm.py
│   │   │   └── utils/
│   │   │       ├── convert_to_openai_messages.py
│   │   │       ├── merge_deltas.py
│   │   │       └── parse_partial_json.py
│   │   ├── render_message.py
│   │   ├── respond.py
│   │   └── utils/
│   │       ├── __init__.py
│   │       ├── lazy_import.py
│   │       ├── scan_code.py
│   │       ├── system_debug_info.py
│   │       ├── telemetry.py
│   │       ├── temporary_file.py
│   │       └── truncate_output.py
│   └── terminal_interface/
│       ├── __init__.py
│       ├── components/
│       │   ├── base_block.py
│       │   ├── code_block.py
│       │   └── message_block.py
│       ├── contributing_conversations.py
│       ├── conversation_navigator.py
│       ├── local_setup.py
│       ├── magic_commands.py
│       ├── profiles/
│       │   ├── defaults/
│       │   │   ├── assistant.py
│       │   │   ├── aws-docs.py
│       │   │   ├── bedrock-anthropic.py
│       │   │   ├── cerebras.py
│       │   │   ├── codestral-few-shot.py
│       │   │   ├── codestral-os.py
│       │   │   ├── codestral-vision.py
│       │   │   ├── codestral.py
│       │   │   ├── default.yaml
│       │   │   ├── e2b.py
│       │   │   ├── fast.yaml
│       │   │   ├── gemma2.py
│       │   │   ├── groq.py
│       │   │   ├── llama3-os.py
│       │   │   ├── llama3-vision.py
│       │   │   ├── llama3.py
│       │   │   ├── llama31-database.py
│       │   │   ├── local-assistant.py
│       │   │   ├── local-os.py
│       │   │   ├── local.py
│       │   │   ├── obsidian.py
│       │   │   ├── os.py
│       │   │   ├── qwen.py
│       │   │   ├── screenpipe.py
│       │   │   ├── snowpark.yml
│       │   │   ├── template_profile.py
│       │   │   ├── the01.py
│       │   │   └── vision.yaml
│       │   ├── historical_profiles.py
│       │   └── profiles.py
│       ├── render_past_conversation.py
│       ├── start_terminal_interface.py
│       ├── terminal_interface.py
│       ├── utils/
│       │   ├── check_for_package.py
│       │   ├── check_for_update.py
│       │   ├── cli_input.py
│       │   ├── count_tokens.py
│       │   ├── display_markdown_message.py
│       │   ├── display_output.py
│       │   ├── export_to_markdown.py
│       │   ├── find_image_path.py
│       │   ├── get_conversations.py
│       │   ├── in_jupyter_notebook.py
│       │   ├── local_storage_path.py
│       │   └── oi_dir.py
│       └── validate_llm_settings.py
├── pyproject.toml
├── scripts/
│   └── wtf.py
└── tests/
    ├── config.test.yaml
    ├── core/
    │   ├── computer/
    │   │   ├── files/
    │   │   │   └── test_files.py
    │   │   └── test_computer.py
    │   └── test_async_core.py
    └── test_interpreter.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .devcontainer/DockerFile
================================================
FROM python:3.11

================================================
FILE: .devcontainer/devcontainer.json
================================================
{
	"name": "Open Interpreter",
	"dockerFile": "DockerFile",
	// Features to add to the dev container. More info: https://containers.dev/features.
	// "features": {},
	"onCreateCommand": "pip install .",
	"postAttachCommand": "interpreter -y"
	// Configure tool-specific properties.
	// "customizations": {},
}


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: Bug report
description: Create a report to help us improve
labels:
  - bug
body:
  - type: markdown
    attributes:
      value: |
        Your issue may have already been reported. Please check the following link for common issues and solutions.

        [Commonly faced issues and their solutions](https://github.com/OpenInterpreter/open-interpreter/issues/164)
  - type: textarea
    id: description
    attributes:
      label: Describe the bug
      description: A clear and concise description of what the bug is.
    validations:
      required: true
  - type: textarea
    id: repro
    attributes:
      label: Reproduce
      description: Steps to reproduce the behavior
      placeholder: |
        1. Go to '...'
        2. Click on '....'
        3. Scroll down to '....'
        4. See error
    validations:
      required: true
  - type: textarea
    id: expected
    attributes:
      label: Expected behavior
      description: A clear and concise description of what you expected to happen.
    validations:
      required: true
  - type: textarea
    id: screenshots
    attributes:
      label: Screenshots
      description: If applicable, add screenshots to help explain your problem.
  - type: input
    id: oiversion
    attributes:
      label: Open Interpreter version
      description: Run `pip show open-interpreter`
      placeholder: e.g. 0.1.1
    validations:
      required: true
  - type: input
    id: pythonversion
    attributes:
      label: Python version
      description: Run `python -V`
      placeholder: e.g. 3.11.5
    validations:
      required: true
  - type: input
    id: osversion
    attributes:
      label: Operating System name and version
      description: The name and version of your OS.
      placeholder: e.g. Windows 11 / macOS 13 / Ubuntu 22.10
    validations:
      required: true
  - type: textarea
    id: additional
    attributes:
      label: Additional context
      description: Add any other context about the problem here.


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yml
================================================
name: Feature request
description: Suggest an idea for this project
labels:
  - enhancement
body:
  - type: textarea
    id: problem
    attributes:
      label: Is your feature request related to a problem? Please describe.
      description: A clear and concise description of what the problem is.
  - type: textarea
    id: description
    attributes:
      label: Describe the solution you'd like
      description: A clear and concise description of what you want to happen.
    validations:
      required: true
  - type: textarea
    id: alternatives
    attributes:
      label: Describe alternatives you've considered
      description: A clear and concise description of any alternative solutions or features you've considered.
  - type: textarea
    id: additional
    attributes:
      label: Additional context
      description: Add any other context about the problem here.


================================================
FILE: .github/pull_request_template.md
================================================
### Describe the changes you have made:

### Reference any relevant issues (e.g. "Fixes #000"):

### Pre-Submission Checklist (optional but appreciated):

- [ ] I have included relevant documentation updates (stored in /docs)
- [ ] I have read `docs/CONTRIBUTING.md`
- [ ] I have read `docs/ROADMAP.md`

### OS Tests (optional but appreciated):

- [ ] Tested on Windows
- [ ] Tested on MacOS
- [ ] Tested on Linux


================================================
FILE: .github/workflows/potential-duplicates.yml
================================================
name: Potential Duplicates
on:
  issues:
    types: [opened, edited]
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: wow-actions/potential-duplicates@v1
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          # Issue title filter work with anymatch https://www.npmjs.com/package/anymatch.
          # Any matched issue will stop detection immediately.
          # You can specify multi filters in each line.
          filter: ''
          # Exclude keywords in title before detecting.
          exclude: ''
          # Label to set, when potential duplicates are detected.
          label: potential-duplicate
          # Get issues with state to compare. Supported state: 'all', 'closed', 'open'.
          state: all
          # If similarity is higher than this threshold([0,1]), issue will be marked as duplicate.
          threshold: 0.6
          # Reactions to be add to comment when potential duplicates are detected.
          # Available reactions: "-1", "+1", "confused", "laugh", "heart", "hooray", "rocket", "eyes"
          reactions: 'eyes, confused'
          # Comment to post when potential duplicates are detected.
          comment: >
            Potential duplicates: {{#issues}}
              - [#{{ number }}] {{ title }} ({{ accuracy }}%)
            {{/issues}}


================================================
FILE: .github/workflows/python-package.yml
================================================
name: Build and Test

on:
  push:
    branches: ["main", "development"]
  pull_request:
    branches: ["main", "development"]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: true
      matrix:
        python-version: ["3.10", "3.12"]

    steps:
      - uses: actions/checkout@v3
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v3
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install poetry
        run: |
          curl -sSL https://install.python-poetry.org | python3 -
      - name: Install dependencies
        run: |
          # Ensure dependencies are installed without relying on a lock file.
          poetry update
          poetry install -E server
      - name: Test with pytest
        run: |
          poetry run pytest -s -x -k test_
        env:
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}


================================================
FILE: .gitignore
================================================
llama.log

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
#   For a library or package, you might want to ignore these files since the code is
#   intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
#   However, in case of collaboration, if having platform-specific dependencies or dependencies
#   having no cross-platform support, pipenv may install dependencies that don't work, or not
#   install all needed dependencies.
#Pipfile.lock

# poetry
#   Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
#   This is especially recommended for binary packages to ensure reproducibility, and is more
#   commonly ignored for libraries.
#   https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
#   Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
#   pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
#   in version control.
#   https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
#  JetBrains specific template is maintained in a separate JetBrains.gitignore that can
#  be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
#  and can be added to the global gitignore or merged into this file.  For a more nuclear
#  option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

# Ignore the .replit configuration file
.replit

# Ignore Nix directories
nix/

# Ignore the replit.nix configuration file
replit.nix

# Ignore misc directory
misc/

# Ignore litellm_uuid.txt
litellm_uuid.txt

# some more
.aider*
file.txt
numbers.txt
poetry.lock

================================================
FILE: .pre-commit-config.yaml
================================================
repos:
  # Using this mirror lets us use mypyc-compiled black, which is 2x faster
  - repo: https://github.com/psf/black-pre-commit-mirror
    rev: 23.10.1
    hooks:
      - id: black
        # It is recommended to specify the latest version of Python
        # supported by your project here, or alternatively use
        # pre-commit's default_language_version, see
        # https://pre-commit.com/#top_level-default_language_version
        language_version: python3.11
  - repo: https://github.com/PyCQA/isort
    rev: 5.12.0
    hooks:
      - id: isort


================================================
FILE: Dockerfile
================================================
###########################################################################################
# This Dockerfile runs an LMC-compatible websocket server at / on port 8000.              #
# To learn more about LMC, visit https://docs.openinterpreter.com/protocols/lmc-messages. #
###########################################################################################

FROM python:3.11.8

# Set environment variables
# ENV OPENAI_API_KEY ...

ENV HOST 0.0.0.0
# ^ Sets the server host to 0.0.0.0, Required for the server to be accessible outside the container

# Copy required files into container
RUN mkdir -p interpreter scripts
COPY interpreter/ interpreter/
COPY scripts/ scripts/
COPY poetry.lock pyproject.toml README.md ./

# Expose port 8000
EXPOSE 8000

# Install server dependencies
RUN pip install ".[server]"

# Start the server
ENTRYPOINT ["interpreter", "--server"]

================================================
FILE: LICENSE
================================================
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

        Preamble

The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.

The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.

When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.

A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.

The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.

An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.

The precise terms and conditions for copying, distribution and
modification follow.

TERMS AND CONDITIONS

0. Definitions.

"This License" refers to version 3 of the GNU Affero General Public License.

"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.

To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

A "covered work" means either the unmodified Program or a work based
on the Program.

To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

1. Source Code.

The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.

A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

The Corresponding Source for a work in source code form is that
same work.

2. Basic Permissions.

All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.

3. Protecting Users' Legal Rights From Anti-Circumvention Law.

No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

4. Conveying Verbatim Copies.

You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

5. Conveying Modified Source Versions.

You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.

b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to
"keep intact all notices".

c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.

d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.

A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

6. Conveying Non-Source Forms.

You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.

b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.

c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.

d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.

e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.

A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

7. Additional Terms.

"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or

b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or

c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or

d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or

e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or

f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.

All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

8. Termination.

You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

9. Acceptance Not Required for Having Copies.

You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

10. Automatic Licensing of Downstream Recipients.

Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.

An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

11. Patents.

A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".

A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

12. No Surrender of Others' Freedom.

If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

13. Remote Network Interaction; Use with the GNU General Public License.

Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.

Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.

14. Revised Versions of this License.

The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.

If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

15. Disclaimer of Warranty.

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

16. Limitation of Liability.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

17. Interpretation of Sections 15 and 16.

If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.

You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.


================================================
FILE: README.md
================================================
<h1 align="center">● Open Interpreter</h1>

<p align="center">
    <a href="https://discord.gg/Hvz9Axh84z">
        <img alt="Discord" src="https://img.shields.io/discord/1146610656779440188?logo=discord&style=flat&logoColor=white"/></a>
    <a href="docs/README_JA.md"><img src="https://img.shields.io/badge/ドキュメント-日本語-white.svg" alt="JA doc"/></a>
    <a href="docs/README_ZH.md"><img src="https://img.shields.io/badge/文档-中文版-white.svg" alt="ZH doc"/></a>
    <a href="docs/README_ES.md"> <img src="https://img.shields.io/badge/Español-white.svg" alt="ES doc"/></a>
    <a href="docs/README_UK.md"><img src="https://img.shields.io/badge/Українська-white.svg" alt="UK doc"/></a>
    <a href="docs/README_IN.md"><img src="https://img.shields.io/badge/Hindi-white.svg" alt="IN doc"/></a>
    <a href="LICENSE"><img src="https://img.shields.io/static/v1?label=license&message=AGPL&color=white&style=flat" alt="License"/></a>
    <br>
    <br><a href="https://0ggfznkwh4j.typeform.com/to/G21i9lJ2">Get early access to the desktop app</a>‎ ‎ |‎ ‎ <a href="https://docs.openinterpreter.com/">Documentation</a><br>
</p>

<br>

<img alt="local_explorer" src="https://github.com/OpenInterpreter/open-interpreter/assets/63927363/d941c3b4-b5ad-4642-992c-40edf31e2e7a">

<br>
</p>
<br>

**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.**

<br>

## Demo

https://github.com/OpenInterpreter/open-interpreter/assets/63927363/37152071-680d-4423-9af3-64836a6f7b60

#### An interactive demo is also available on Google Colab:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1WKmRXZgsErej2xUriKzxrEAXdxMSgWbb?usp=sharing)

#### Along with an example voice interface, inspired by _Her_:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1NojYGHDgxH6Y1G1oxThEBBb2AtyODBIK)

## Quick Start


### Install

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

> Not working? Read our [setup guide](https://docs.openinterpreter.com/getting-started/setup).

### Terminal

After installation, simply run `interpreter`:

```shell
interpreter
```

### Python

```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](https://openai.com/blog/chatgpt-plugins#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](https://wfhbrian.com/mastering-chatgpts-code-interpreter-list-of-python-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

**Update:** The Generator Update (0.1.5) introduced streaming:

```python
message = "What operating system are we on?"

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

### Interactive Chat

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

```shell
interpreter
```

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

```python
interpreter.chat()
```

**You can also stream each chunk:**

```python
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)`:

```python
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:

```python
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`:

```python
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.

```python
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](https://docs.litellm.ai/docs/providers/) to connect to hosted language models.

You can change the model by setting the model parameter:

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

In Python, set the model on the object:

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

[Find the appropriate "model" string for your language model here.](https://docs.litellm.ai/docs/providers/)

### Running Open Interpreter locally

#### Terminal

Open Interpreter can use OpenAI-compatible server to run models locally. (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):

```shell
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

```shell
interpreter --local
```

for a more detailed guide check out [this video by Mike Bird](https://www.youtube.com/watch?v=CEs51hGWuGU?si=cN7f6QhfT4edfG5H)

**How to run LM Studio in the background.**

1. Download [https://lmstudio.ai/](https://lmstudio.ai/) 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:

```python
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

You can modify the `max_tokens` and `context_window` (in tokens) of locally running models.

For local mode, smaller context windows will use less RAM, so we recommend trying a much shorter window (~1000) if it's failing / if it's slow. Make sure `max_tokens` is less than `context_window`.

```shell
interpreter --local --max_tokens 1000 --context_window 3000
```

### Verbose mode

To help you inspect Open Interpreter we have a `--verbose` mode for debugging.

You can activate verbose mode by using its flag (`interpreter --verbose`), or mid-chat:

```shell
$ interpreter
...
> %verbose true <- Turns on verbose mode

> %verbose false <- Turns off verbose mode
```

### Interactive Mode Commands

In the interactive mode, you can use the below commands to enhance your experience. Here's a list of available commands:

**Available Commands:**

- `%verbose [true/false]`: Toggle verbose mode. Without arguments or with `true` it
  enters verbose mode. With `false` it exits verbose mode.
- `%reset`: Resets the current session's conversation.
- `%undo`: Removes the previous user message and the AI's response from the message history.
- `%tokens [prompt]`: (_Experimental_) Calculate the tokens that will be sent with the next prompt as context and estimate their cost. Optionally calculate the tokens and estimated cost of a `prompt` if one is provided. Relies on [LiteLLM's `cost_per_token()` method](https://docs.litellm.ai/docs/completion/token_usage#2-cost_per_token) for estimated costs.
- `%help`: Show the help message.

### Configuration / Profiles

Open Interpreter allows you to set default behaviors using `yaml` files.

This provides a flexible way to configure the interpreter without changing command-line arguments every time.

Run the following command to open the profiles directory:

```
interpreter --profiles
```

You can add `yaml` files there. The default profile is named `default.yaml`.

#### Multiple Profiles

Open Interpreter supports multiple `yaml` files, allowing you to easily switch between configurations:

```
interpreter --profile my_profile.yaml
```

## Sample FastAPI Server

The generator update enables Open Interpreter to be controlled via HTTP REST endpoints:

```python
# server.py

from fastapi import FastAPI
from fastapi.responses import StreamingResponse
from interpreter import interpreter

app = FastAPI()

@app.get("/chat")
def chat_endpoint(message: str):
    def event_stream():
        for result in interpreter.chat(message, stream=True):
            yield f"data: {result}\n\n"

    return StreamingResponse(event_stream(), media_type="text/event-stream")

@app.get("/history")
def history_endpoint():
    return interpreter.messages
```

```shell
pip install fastapi uvicorn
uvicorn server:app --reload
```

You can also start a server identical to the one above by simply running `interpreter.server()`.

## Android

The step-by-step guide for installing Open Interpreter on your Android device can be found in the [open-interpreter-termux repo](https://github.com/MikeBirdTech/open-interpreter-termux).

## Safety Notice

Since generated code is executed in your local environment, it can interact with your files and system settings, potentially leading to unexpected outcomes like data loss or security risks.

**⚠️ Open Interpreter will ask for user confirmation before executing code.**

You can run `interpreter -y` or set `interpreter.auto_run = True` to bypass this confirmation, in which case:

- Be cautious when requesting commands that modify files or system settings.
- Watch Open Interpreter like a self-driving car, and be prepared to end the process by closing your terminal.
- Consider running Open Interpreter in a restricted environment like Google Colab or Replit. These environments are more isolated, reducing the risks of executing arbitrary code.

There is **experimental** support for a [safe mode](https://github.com/OpenInterpreter/open-interpreter/blob/main/docs/SAFE_MODE.md) to help mitigate some risks.

## How Does it Work?

Open Interpreter equips a [function-calling language model](https://platform.openai.com/docs/guides/gpt/function-calling) with an `exec()` function, which accepts a `language` (like "Python" or "JavaScript") and `code` to run.

We then stream the model's messages, code, and your system's outputs to the terminal as Markdown.

# Access Documentation Offline

The full [documentation](https://docs.openinterpreter.com/) is accessible on-the-go without the need for an internet connection.

[Node](https://nodejs.org/en) is a pre-requisite:

- Version 18.17.0 or any later 18.x.x version.
- Version 20.3.0 or any later 20.x.x version.
- Any version starting from 21.0.0 onwards, with no upper limit specified.

Install [Mintlify](https://mintlify.com/):

```bash
npm i -g mintlify@latest
```

Change into the docs directory and run the appropriate command:

```bash
# Assuming you're at the project's root directory
cd ./docs

# Run the documentation server
mintlify dev
```

A new browser window should open. The documentation will be available at [http://localhost:3000](http://localhost:3000) as long as the documentation server is running.

# Contributing

Thank you for your interest in contributing! We welcome involvement from the community.

Please see our [contributing guidelines](https://github.com/OpenInterpreter/open-interpreter/blob/main/docs/CONTRIBUTING.md) for more details on how to get involved.

# Roadmap

Visit [our roadmap](https://github.com/OpenInterpreter/open-interpreter/blob/main/docs/ROADMAP.md) to preview the future of Open Interpreter.

**Note**: This software is not affiliated with OpenAI.

![thumbnail-ncu](https://github.com/OpenInterpreter/open-interpreter/assets/63927363/1b19a5db-b486-41fd-a7a1-fe2028031686)

> Having access to a junior programmer working at the speed of your fingertips ... can make new workflows effortless and efficient, as well as open the benefits of programming to new audiences.
>
> — _OpenAI's Code Interpreter Release_

<br>


================================================
FILE: docs/CONTRIBUTING.md
================================================
# ●

**Open Interpreter is large, open-source initiative to build a standard interface between language models and computers.**

There are many ways to contribute, from helping others on [Github](https://github.com/OpenInterpreter/open-interpreter/issues) or [Discord](https://discord.gg/6p3fD6rBVm), writing documentation, or improving code.

We depend on contributors like you. Let's build this.

## What should I work on?

First, please familiarize yourself with our [project scope](https://github.com/OpenInterpreter/open-interpreter/blob/main/docs/ROADMAP.md#whats-in-our-scope). Then, pick up a task from our [roadmap](https://github.com/OpenInterpreter/open-interpreter/blob/main/docs/ROADMAP.md) or work on solving an [issue](https://github.com/OpenInterpreter/open-interpreter/issues).

If you encounter a bug or have a feature in mind, don't hesitate to [open a new issue](https://github.com/OpenInterpreter/open-interpreter/issues/new/choose).

## Philosophy

This is a minimalist, **tightly scoped** project that places a premium on simplicity. We're skeptical of new extensions, integrations, and extra features. We would rather not extend the system if it adds nonessential complexity.

# Contribution Guidelines

1. Before taking on significant code changes, please discuss your ideas on [Discord](https://discord.gg/6p3fD6rBVm) to ensure they align with our vision. We want to keep the codebase simple and unintimidating for new users.
2. Fork the repository and create a new branch for your work.
3. Follow the [Running Your Local Fork](https://github.com/OpenInterpreter/open-interpreter/blob/main/docs/CONTRIBUTING.md#running-your-local-fork) guide below.
4. Make changes with clear code comments explaining your approach. Try to follow existing conventions in the code.
5. Follow the [Code Formatting and Linting](https://github.com/OpenInterpreter/open-interpreter/blob/main/docs/CONTRIBUTING.md#code-formatting-and-linting) guide below.
6. Open a PR into `main` linking any related issues. Provide detailed context on your changes.

We will review PRs when possible and work with you to integrate your contribution. Please be patient as reviews take time. Once approved, your code will be merged.

## Running Your Local Fork

**Note: for anyone testing the new `--local`, `--os`, and `--local --os` modes: When you run `poetry install` you aren't installing the optional dependencies and it'll throw errors. To test `--local` mode, run `poetry install -E local`. To test `--os` mode, run `poetry install -E os`. To test `--local --os` mode, run `poetry install -E local -E os`. You can edit the system messages for these modes in `interpreter/terminal_interface/profiles/defaults`.**

Once you've forked the code and created a new branch for your work, you can run the fork in CLI mode by following these steps:

1. CD into the project folder by running `cd open-interpreter`.
2. Install `poetry` [according to their documentation](https://python-poetry.org/docs/#installing-with-pipx), which will create a virtual environment for development + handle dependencies.
3. Install dependencies by running `poetry install`.
4. Run the program with `poetry run interpreter`. Run tests with `poetry run pytest -s -x`.

**Note**: This project uses [`black`](https://black.readthedocs.io/en/stable/index.html) and [`isort`](https://pypi.org/project/isort/) via a [`pre-commit`](https://pre-commit.com/) hook to ensure consistent code style. If you need to bypass it for some reason, you can `git commit` with the `--no-verify` flag.

### Installing New Dependencies

If you wish to install new dependencies into the project, please use `poetry add package-name`.

### Installing Developer Dependencies

If you need to install dependencies specific to development, like testing tools, formatting tools, etc. please use `poetry add package-name --group dev`.

### Known Issues

For some, `poetry install` might hang on some dependencies. As a first step, try to run the following command in your terminal:

`export PYTHON_KEYRING_BACKEND=keyring.backends.fail.Keyring`

Then run `poetry install` again. If this doesn't work, please join our [Discord community](https://discord.gg/6p3fD6rBVm) for help.

## Code Formatting and Linting

Our project uses `black` for code formatting and `isort` for import sorting. To ensure consistency across contributions, please adhere to the following guidelines:

1. **Install Pre-commit Hooks**:

   If you want to automatically format your code every time you make a commit, install the pre-commit hooks.

   ```bash
   pip install pre-commit
   pre-commit install
   ```

   After installing, the hooks will automatically check and format your code every time you commit.

2. **Manual Formatting**:

   If you choose not to use the pre-commit hooks, you can manually format your code using:

   ```bash
   black .
   isort .
   ```

# Licensing

Contributions to Open Interpreter would be under the MIT license before version 0.2.0, or under AGPL for subsequent contributions.

# Questions?

Join our [Discord community](https://discord.gg/6p3fD6rBVm) and post in the #General channel to connect with contributors. We're happy to guide you through your first open source contribution to this project!

**Thank you for your dedication and understanding as we continue refining our processes. As we explore this extraordinary new technology, we sincerely appreciate your involvement.**


================================================
FILE: docs/NCU_MIGRATION_GUIDE.md
================================================
# `0.2.0` Migration Guide

Open Interpreter is [changing](https://changes.openinterpreter.com/log/the-new-computer-update). This guide will help you migrate your application to `0.2.0`, also called the _New Computer Update_ (NCU), the latest major version of Open Interpreter.

## A New Start

To start using Open Interpreter in Python, we now use a standard **class instantiation** format:

```python
# From the module `interpreter`, import the class `OpenInterpreter`
from interpreter import OpenInterpreter

# Create an instance of `OpenInterpreter` to use it
agent = OpenInterpreter()
agent.chat()
```

For convenience, we also provide an instance of `interpreter`, which you can import from the module (also called `interpreter`):

```python
 # From the module `interpreter`, import the included instance of `OpenInterpreter`
from interpreter import interpreter

interpreter.chat()
```

## New Parameters

All stateless LLM attributes have been moved to `interpreter.llm`:

- `interpreter.model` → `interpreter.llm.model`
- `interpreter.api_key` → `interpreter.llm.api_key`
- `interpreter.llm_supports_vision` → `interpreter.llm.supports_vision`
- `interpreter.supports_function_calling` → `interpreter.llm.supports_functions`
- `interpreter.max_tokens` → `interpreter.llm.max_tokens`
- `interpreter.context_window` → `interpreter.llm.context_window`
- `interpreter.temperature` → `interpreter.llm.temperature`
- `interpreter.api_version` → `interpreter.llm.api_version`
- `interpreter.api_base` → `interpreter.llm.api_base`

This is reflected **1)** in Python applications using Open Interpreter and **2)** in your profile for OI's terminal interface, which can be edited via `interpreter --profiles`.

## New Static Messages Structure

- The array of messages is now flat, making the architecture more modular, and easier to adapt to new kinds of media in the future.
- Each message holds only one kind of data. This yields more messages, but prevents large nested messages that can be difficult to parse.
- This allows you to pass the full `messages` list into Open Interpreter as `interpreter.messages = message_list`.
- Every message has a "role", which can be "assistant", "computer", or "user".
- Every message has a "type", specifying the type of data it contains.
- Every message has "content", which contains the data for the message.
- Some messages have a "format" key, to specify the format of the content, like "path" or "base64.png".
- The recipient of the message is specified by the "recipient" key, which can be "user" or "assistant". This is used to inform the LLM of who the message is intended for.

```python
[
  {"role": "user", "type": "message", "content": "Please create a plot from this data and display it as an image and then as HTML."}, # implied format: text (only one format for type message)
  {"role": "user", "type": "image", "format": "path", "content": "path/to/image.png"}
  {"role": "user", "type": "file", "content": "/path/to/file.pdf"} # implied format: path (only one format for type file)
  {"role": "assistant", "type": "message", "content": "Processing your request to generate a plot."} # implied format: text
  {"role": "assistant", "type": "code", "format": "python", "content": "plot = create_plot_from_data('data')\ndisplay_as_image(plot)\ndisplay_as_html(plot)"}
  {"role": "computer", "type": "image", "format": "base64.png", "content": "base64"}
  {"role": "computer", "type": "code", "format": "html", "content": "<html>Plot in HTML format</html>"}
  {"role": "computer", "type": "console", "format": "output", "content": "{HTML errors}"}
  {"role": "assistant", "type": "message", "content": "Plot generated successfully."} # implied format: text
]
```

## New Streaming Structure

- The streaming data structure closely matches the static messages structure, with only a few differences.
- Every streaming chunk has a "start" and "end" key, which are booleans that specify whether the chunk is the first or last chunk in the stream. This is what you should use to build messages from the streaming chunks.
- There is a "confirmation" chunk type, which is used to confirm with the user that the code should be run. The "content" key of this chunk is a dictionary with a `code` and a `language` key.
- Introducing more information per chunk is helpful in processing the streaming responses. Please take a look below for example code for processing streaming responses, in JavaScript.

```python
{"role": "assistant", "type": "message", "start": True}
{"role": "assistant", "type": "message", "content": "Pro"}
{"role": "assistant", "type": "message", "content": "cessing"}
{"role": "assistant", "type": "message", "content": "your request"}
{"role": "assistant", "type": "message", "content": "to generate a plot."}
{"role": "assistant", "type": "message", "end": True}

{"role": "assistant", "type": "code", "format": "python", "start": True}
{"role": "assistant", "type": "code", "format": "python", "content": "plot = create_plot_from_data"}
{"role": "assistant", "type": "code", "format": "python", "content": "('data')\ndisplay_as_image(plot)"}
{"role": "assistant", "type": "code", "format": "python", "content": "\ndisplay_as_html(plot)"}
{"role": "assistant", "type": "code", "format": "python", "end": True}

# The computer will emit a confirmation chunk *before* running the code. You can break here to cancel the execution.

{"role": "computer", "type": "confirmation", "format": "execution", "content": {
    "type": "code",
    "format": "python",
    "content": "plot = create_plot_from_data('data')\ndisplay_as_image(plot)\ndisplay_as_html(plot)",
}}

{"role": "computer", "type": "console", "start": True}
{"role": "computer", "type": "console", "format": "output", "content": "a printed statement"}
{"role": "computer", "type": "console", "format": "active_line", "content": "1"}
{"role": "computer", "type": "console", "format": "active_line", "content": "2"}
{"role": "computer", "type": "console", "format": "active_line", "content": "3"}
{"role": "computer", "type": "console", "format": "output", "content": "another printed statement"}
{"role": "computer", "type": "console", "end": True}
```

## Tips and Best Practices

- Adding an `id` and a `created_at` field to messages can be helpful to manipulate the messages later on.
- If you want your application to run the code instead of OI, then your app will act as the `computer`. This means breaking from the stream once OI emits a confirmation chunk (`{'role': 'computer', 'type': 'confirmation' ...}`) to prevent OI from running the code. When you run code, grab the message history via `messages = interpreter.messages`, then simply mimic the `computer` format above by appending new `{'role': 'computer' ...}` messages, then run `interpreter.chat(messages)`.
- Open Interpreter is designed to stop code execution when the stream is disconnected. Use this to your advantage to add a "Stop" button to the UI.
- Setting up your Python server to send errors and exceptions to the client can be helpful for debugging and generating error messages.

## Example Code

### Types

Python:

```python
class Message:
    role: Union["user", "assistant", "computer"]
    type: Union["message", "code", "image", "console", "file", "confirmation"]
    format: Union["output", "path", "base64.png", "base64.jpeg", "python", "javascript", "shell", "html", "active_line", "execution"]
    recipient: Union["user", "assistant"]
    content: Union[str, dict]  # dict should have 'code' and 'language' keys, this is only for confirmation messages

class StreamingChunk(Message):
    start: bool
    end: bool
```

TypeScript:

```typescript
interface Message {
  role: "user" | "assistant" | "computer";
  type: "message" | "code" | "image" | "console" | "file", | "confirmation";
  format: "output" | "path" | "base64.png" | "base64.jpeg" | "python" | "javascript" | "shell" | "html" | "active_line", | "execution";
  recipient: "user" | "assistant";
  content: string | { code: string; language: string };
}
```

```typescript
interface StreamingChunk extends Message {
  start: boolean;
  end: boolean;
}
```

### Handling streaming chunks

Here is a minimal example of how to handle streaming chunks in JavaScript. This example assumes that you are using a Python server to handle the streaming requests, and that you are using a JavaScript client to send the requests and handle the responses. See the main repository README for an example FastAPI server.

```javascript
//Javascript

let messages = []; //variable to hold all messages
let currentMessageIndex = 0; //variable to keep track of the current message index
let isGenerating = false; //variable to stop the stream

// Function to send a POST request to the OI
async function sendRequest() {
  // Temporary message to hold the message that is being processed
  try {
    // Define parameters for the POST request, add at least the full messages array, but you may also consider adding any other OI parameters here, like auto_run, local, etc.
    const params = {
      messages,
    };

    //Define a controller to allow for aborting the request
    const controller = new AbortController();
    const { signal } = controller;

    // Send the POST request to your Python server endpoint
    const interpreterCall = await fetch("https://YOUR_ENDPOINT/", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      body: JSON.stringify(params),
      signal,
    });

    // Throw an error if the request was not successful
    if (!interpreterCall.ok) {
      console.error("Interpreter didn't respond with 200 OK");
      return;
    }

    // Initialize a reader for the response body
    const reader = interpreterCall.body.getReader();

    isGenerating = true;
    while (true) {
      const { value, done } = await reader.read();

      // Break the loop if the stream is done
      if (done) {
        break;
      }
      // If isGenerating is set to false, cancel the reader and break the loop. This will halt the execution of the code run by OI as well
      if (!isGenerating) {
        await reader.cancel();
        controller.abort();
        break;
      }
      // Decode the stream and split it into lines
      const text = new TextDecoder().decode(value);
      const lines = text.split("\n");
      lines.pop(); // Remove last empty line

      // Process each line of the response
      for (const line of lines) {
        const chunk = JSON.parse(line);
        await processChunk(chunk);
      }
    }
    //Stream has completed here, so run any code that needs to be run after the stream has finished
    if (isGenerating) isGenerating = false;
  } catch (error) {
    console.error("An error occurred:", error);
  }
}

//Function to process each chunk of the stream, and create messages
function processChunk(chunk) {
  if (chunk.start) {
    const tempMessage = {};
    //add the new message's data to the tempMessage
    tempMessage.role = chunk.role;
    tempMessage.type = chunk.type;
    tempMessage.content = "";
    if (chunk.format) tempMessage.format = chunk.format;
    if (chunk.recipient) tempMessage.recipient = chunk.recipient;

    //add the new message to the messages array, and set the currentMessageIndex to the index of the new message
    messages.push(tempMessage);
    currentMessageIndex = messages.length - 1;
  }

  //Handle active lines for code blocks
  if (chunk.format === "active_line") {
    messages[currentMessageIndex].activeLine = chunk.content;
  } else if (chunk.end && chunk.type === "console") {
    messages[currentMessageIndex].activeLine = null;
  }

  //Add the content of the chunk to current message, avoiding adding the content of the active line
  if (chunk.content && chunk.format !== "active_line") {
    messages[currentMessageIndex].content += chunk.content;
  }
}
```


================================================
FILE: docs/README_DE.md
================================================
<h1 align="center">● Open Interpreter</h1>

<p align="center">
    <a href="https://discord.gg/6p3fD6rBVm">
        <img alt="Discord" src="https://img.shields.io/discord/1146610656779440188?logo=discord&style=flat&logoColor=white">
    </a>
    <a href="README_ES.md"> <img src="https://img.shields.io/badge/Español-white.svg" alt="ES doc"/></a>
    <a href="README_JA.md"><img src="https://img.shields.io/badge/ドキュメント-日本語-white.svg" alt="JA doc"></a>
    <a href="README_ZH.md"><img src="https://img.shields.io/badge/文档-中文版-white.svg" alt="ZH doc"></a>
    <a href="../README.md"><img src="https://img.shields.io/badge/english-document-white.svg" alt="EN doc"></a>
    <a href="https://github.com/OpenInterpreter/open-interpreter/blob/main/docs/README_UK.md"><img src="https://img.shields.io/badge/Українська-white.svg" alt="UK doc"/></a>
    <a href="../LICENSE"><img src="https://img.shields.io/static/v1?label=license&message=AGPL&color=white&style=flat" alt="License"/></a>
    <br><br>
    <b>Lassen Sie Sprachmodelle Code auf Ihrem Computer ausführen.</b><br>
    Eine Open-Source, lokal laufende Implementierung von OpenAIs Code-Interpreter.<br>
    <br><a href="https://openinterpreter.com">Erhalten Sie frühen Zugang zur Desktop-Anwendung.</a><br>
</p>

<br>

![poster](https://github.com/OpenInterpreter/open-interpreter/assets/63927363/08f0d493-956b-4d49-982e-67d4b20c4b56)

<br>

```shell
pip install open-interpreter
```

```shell
interpreter
```

<br>

**Open Interpreter** ermöglicht es LLMs (Language Models), Code (Python, Javascript, Shell und mehr) lokal auszuführen. Sie können mit Open Interpreter über eine ChatGPT-ähnliche Schnittstelle in Ihrem Terminal chatten, indem Sie $ interpreter nach der Installation ausführen.

Dies bietet eine natürliche Sprachschnittstelle zu den allgemeinen Fähigkeiten Ihres Computers:

- Erstellen und bearbeiten Sie Fotos, Videos, PDFs usw.
- Steuern Sie einen Chrome-Browser, um Forschungen durchzuführen
- Darstellen, bereinigen und analysieren Sie große Datensätze
- ...usw.

**⚠️ Hinweis: Sie werden aufgefordert, Code zu genehmigen, bevor er ausgeführt wird.**

<br>

## Demo

https://github.com/OpenInterpreter/open-interpreter/assets/63927363/37152071-680d-4423-9af3-64836a6f7b60

#### Eine interaktive Demo ist auch auf Google Colab verfügbar:

[![In Colab öffnen](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1WKmRXZgsErej2xUriKzxrEAXdxMSgWbb?usp=sharing)

## Schnellstart

```shell
pip install open-interpreter
```

### Terminal

Nach der Installation führen Sie einfach `interpreter` aus:

```shell
interpreter
```

### Python

```python
from interpreter import interpreter

interpreter.chat("Stellen Sie AAPL und METAs normalisierte Aktienpreise dar") # Führt einen einzelnen Befehl aus
interpreter.chat() # Startet einen interaktiven Chat
```

## Vergleich zu ChatGPTs Code Interpreter

OpenAIs Veröffentlichung des [Code Interpreters](https://openai.com/blog/chatgpt-plugins#code-interpreter) mit GPT-4 bietet eine fantastische Möglichkeit, reale Aufgaben mit ChatGPT zu erledigen.

Allerdings ist OpenAIs Dienst gehostet, Closed-Source und stark eingeschränkt:

- Kein Internetzugang.
- [Begrenzte Anzahl vorinstallierter Pakete](https://wfhbrian.com/mastering-chatgpts-code-interpreter-list-of-python-packages/).
- 100 MB maximale Uploadgröße, 120.0 Sekunden Laufzeitlimit.
- Der Zustand wird gelöscht (zusammen mit allen generierten Dateien oder Links), wenn die Umgebung abstirbt.

---

Open Interpreter überwindet diese Einschränkungen, indem es in Ihrer lokalen Umgebung läuft. Es hat vollen Zugang zum Internet, ist nicht durch Zeit oder Dateigröße eingeschränkt und kann jedes Paket oder jede Bibliothek nutzen.

Dies kombiniert die Kraft von GPT-4s Code Interpreter mit der Flexibilität Ihrer lokalen Maschine.

## Sicherheitshinweis

Da generierter Code in deiner lokalen Umgebung ausgeführt wird, kann er mit deinen Dateien und Systemeinstellungen interagieren, was potenziell zu unerwarteten Ergebnissen wie Datenverlust oder Sicherheitsrisiken führen kann.

**⚠️ Open Interpreter wird um Nutzerbestätigung bitten, bevor Code ausgeführt wird.**

Du kannst `interpreter -y` ausführen oder `interpreter.auto_run = True` setzen, um diese Bestätigung zu umgehen, in diesem Fall:

- Sei vorsichtig bei Befehlsanfragen, die Dateien oder Systemeinstellungen ändern.
- Beobachte Open Interpreter wie ein selbstfahrendes Auto und sei bereit, den Prozess zu beenden, indem du dein Terminal schließt.
- Betrachte die Ausführung von Open Interpreter in einer eingeschränkten Umgebung wie Google Colab oder Replit. Diese Umgebungen sind isolierter und reduzieren das Risiko der Ausführung willkürlichen Codes.

Es gibt **experimentelle** Unterstützung für einen [Sicherheitsmodus](docs/SAFE_MODE.md), um einige Risiken zu mindern.

## Wie funktioniert es?

Open Interpreter rüstet ein [funktionsaufrufendes Sprachmodell](https://platform.openai.com/docs/guides/gpt/function-calling) mit einer `exec()`-Funktion aus, die eine `language` (wie "Python" oder "JavaScript") und auszuführenden `code` akzeptiert.

Wir streamen dann die Nachrichten des Modells, Code und die Ausgaben deines Systems zum Terminal als Markdown.

# Mitwirken

Danke für dein Interesse an der Mitarbeit! Wir begrüßen die Beteiligung der Gemeinschaft.

Bitte sieh dir unsere [Richtlinien für Mitwirkende](docs/CONTRIBUTING.md) für weitere Details an, wie du dich einbringen kannst.

## Lizenz

Open Interpreter ist unter der MIT-Lizenz lizenziert. Du darfst die Software verwenden, kopieren, modifizieren, verteilen, unterlizenzieren und Kopien der Software verkaufen.

**Hinweis**: Diese Software ist nicht mit OpenAI affiliiert.

> Zugriff auf einen Junior-Programmierer zu haben, der mit der Geschwindigkeit deiner Fingerspitzen arbeitet ... kann neue Arbeitsabläufe mühelos und effizient machen sowie das Programmieren einem neuen Publikum öffnen.
>
> — _OpenAIs Code Interpreter Release_

<br>


================================================
FILE: docs/README_ES.md
================================================
<h1 align="center">● Intérprete Abierto</h1>

<p align="center">
    <a href="https://discord.gg/Hvz9Axh84z">
        <img alt="Discord" src="https://img.shields.io/discord/1146610656779440188?logo=discord&style=flat&logoColor=white"/></a>
    <a href="../README.md"><img src="https://img.shields.io/badge/english-document-white.svg" alt="EN doc"></a>
    <a href="README_JA.md"><img src="https://img.shields.io/badge/ドキュメント-日本語-white.svg" alt="JA doc"/></a>
    <a href="README_ZH.md"> <img src="https://img.shields.io/badge/文档-中文版-white.svg" alt="ZH doc"/></a>
    <a href="README_UK.md"><img src="https://img.shields.io/badge/Українська-white.svg" alt="UK doc"/></a>
    <a href="README_IN.md"> <img src="https://img.shields.io/badge/Hindi-white.svg" alt="IN doc"/></a>
    <a href="../LICENSE"><img src="https://img.shields.io/static/v1?label=license&message=AGPL&color=white&style=flat" alt="License"/></a>
    <br>
    <br>
    <br><a href="https://0ggfznkwh4j.typeform.com/to/G21i9lJ2">Obtenga acceso temprano a la aplicación de escritorio</a>‎ ‎ |‎ ‎ <a href="https://docs.openinterpreter.com/">Documentación</a><br>
</p>

<br>

![poster](https://github.com/OpenInterpreter/open-interpreter/assets/63927363/08f0d493-956b-4d49-982e-67d4b20c4b56)

<br>
<p align="center">
<strong>La Nueva Actualización del Computador</strong> presenta <strong><code>--os</code></strong> y una nueva <strong>API de Computadora</strong>. <a href="https://changes.openinterpreter.com/log/the-new-computer-update">Lea más →</a>
</p>
<br>

```shell
pip install open-interpreter
```

> ¿No funciona? Lea nuestra [guía de configuración](https://docs.openinterpreter.com/getting-started/setup).

```shell
interpreter
```

<br>

**Intérprete Abierto** permite a los LLMs ejecutar código (Python, JavaScript, Shell, etc.) localmente. Puede chatear con Intérprete Abierto a través de una interfaz de chat como ChatGPT en su terminal después de instalar.

Esto proporciona una interfaz de lenguaje natural para las capacidades generales de su computadora:

- Crear y editar fotos, videos, PDF, etc.
- Controlar un navegador de Chrome para realizar investigaciones
- Graficar, limpiar y analizar conjuntos de datos grandes
- ... etc.

**⚠️ Nota: Se le pedirá que apruebe el código antes de ejecutarlo.**

<br>

## Demo

https://github.com/OpenInterpreter/open-interpreter/assets/63927363/37152071-680d-4423-9af3-64836a6f7b60

#### También hay disponible una demo interactiva en Google Colab:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1WKmRXZgsErej2xUriKzxrEAXdxMSgWbb?usp=sharing)

#### Además, hay un ejemplo de interfaz de voz inspirada en _Her_:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1NojYGHDgxH6Y1G1oxThEBBb2AtyODBIK)

## Inicio Rápido

```shell
pip install open-interpreter
```

### Terminal

Después de la instalación, simplemente ejecute `interpreter`:

```shell
interpreter
```

### Python

```python
from interpreter import interpreter

interpreter.chat("Plot AAPL and META's normalized stock prices") # Ejecuta un comando sencillo
interpreter.chat() # Inicia una sesión de chat interactiva
```

### GitHub Codespaces

Presione la tecla `,` en la página de GitHub de este repositorio para crear un espacio de códigos. Después de un momento, recibirá un entorno de máquina virtual en la nube con Interprete Abierto pre-instalado. Puede entonces empezar a interactuar con él directamente y confirmar su ejecución de comandos del sistema sin preocuparse por dañar el sistema.

## Comparación con el Intérprete de Código de ChatGPT

El lanzamiento de [Intérprete de Código](https://openai.com/blog/chatgpt-plugins#code-interpreter) de OpenAI con GPT-4 presenta una oportunidad fantástica para realizar tareas del mundo real con ChatGPT.

Sin embargo, el servicio de OpenAI está alojado, su codigo es cerrado y está fuertemente restringido:

- No hay acceso a Internet.
- [Conjunto limitado de paquetes preinstalados](https://wfhbrian.com/mastering-chatgpts-code-interpreter-list-of-python-packages/).
- Límite de 100 MB de carga, límite de tiempo de 120.0 segundos.
- El estado se elimina (junto con cualquier archivo generado o enlace) cuando el entorno se cierra.

---

Intérprete Abierto supera estas limitaciones al ejecutarse en su entorno local. Tiene acceso completo a Internet, no está restringido por tiempo o tamaño de archivo y puede utilizar cualquier paquete o libreria.

Esto combina el poder del Intérprete de Código de GPT-4 con la flexibilidad de su entorno de desarrollo local.

## Comandos

**Actualización:** La Actualización del Generador (0.1.5) introdujo streaming:

```python
message = "¿Qué sistema operativo estamos utilizando?"

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

### Chat Interactivo

Para iniciar una sesión de chat interactiva en su terminal, puede ejecutar `interpreter` desde la línea de comandos:

```shell
interpreter
```

O `interpreter.chat()` desde un archivo `.py`:

```python
interpreter.chat()
```

**Puede también transmitir cada trozo:**

```python
message = "¿Qué sistema operativo estamos utilizando?"

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

### Chat Programático

Para un control más preciso, puede pasar mensajes directamente a `.chat(message)`:

```python
interpreter.chat("Añade subtítulos a todos los videos en /videos.")

# ... Transmite salida a su terminal, completa tarea ...

interpreter.chat("Estos se ven bien, pero ¿pueden hacer los subtítulos más grandes?")

# ...
```

### Iniciar un nuevo chat

En Python, Intérprete Abierto recuerda el historial de conversación. Si desea empezar de nuevo, puede resetearlo:

```python
interpreter.messages = []
```

### Guardar y Restaurar Chats

`interpreter.chat()` devuelve una lista de mensajes, que puede utilizar para reanudar una conversación con `interpreter.messages = messages`:

```python
messages = interpreter.chat("Mi nombre es Killian.") # Guarda mensajes en 'messages'
interpreter.messages = [] # Resetear Intérprete ("Killian" será olvidado)

interpreter.messages = messages # Reanuda chat desde 'messages' ("Killian" será recordado)
```

### Personalizar el Mensaje del Sistema

Puede inspeccionar y configurar el mensaje del sistema de Intérprete Abierto para extender su funcionalidad, modificar permisos o darle más contexto.

```python
interpreter.system_message += """
Ejecute comandos de shell con -y para que el usuario no tenga que confirmarlos.
"""
print(interpreter.system_message)
```

### Cambiar el Modelo de Lenguaje

Intérprete Abierto utiliza [LiteLLM](https://docs.litellm.ai/docs/providers/) para conectarse a modelos de lenguaje hospedados.

Puede cambiar el modelo estableciendo el parámetro de modelo:

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

En Python, establezca el modelo en el objeto:

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

[Encuentre la cadena adecuada para su modelo de lenguaje aquí.](https://docs.litellm.ai/docs/providers/)

### Ejecutar Intérprete Abierto localmente

#### Terminal

Intérprete Abierto puede utilizar un servidor de OpenAI compatible para ejecutar modelos localmente. (LM Studio, jan.ai, ollama, etc.)

Simplemente ejecute `interpreter` con la URL de base de API de su servidor de inferencia (por defecto, `http://localhost:1234/v1` para LM Studio):

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

O puede utilizar Llamafile sin instalar software adicional simplemente ejecutando:

```shell
interpreter --local
```

Para una guía mas detallada, consulte [este video de Mike Bird](https://www.youtube.com/watch?v=CEs51hGWuGU?si=cN7f6QhfT4edfG5H)

**Cómo ejecutar LM Studio en segundo plano.**

1. Descargue [https://lmstudio.ai/](https://lmstudio.ai/) luego ejecutelo.
2. Seleccione un modelo, luego haga clic **↓ Descargar**.
3. Haga clic en el botón **↔️** en la izquierda (debajo de 💬).
4. Seleccione su modelo en la parte superior, luego haga clic **Iniciar Servidor**.

Una vez que el servidor esté funcionando, puede empezar su conversación con Intérprete Abierto.

> **Nota:** El modo local establece su `context_window` en 3000 y su `max_tokens` en 1000. Si su modelo tiene requisitos diferentes, ajuste estos parámetros manualmente (ver a continuación).

#### Python

Nuestro paquete de Python le da más control sobre cada ajuste. Para replicar y conectarse a LM Studio, utilice estos ajustes:

```python
from interpreter import interpreter

interpreter.offline = True # Desactiva las características en línea como Procedimientos Abiertos
interpreter.llm.model = "openai/x" # Indica a OI que envíe mensajes en el formato de OpenAI
interpreter.llm.api_key = "fake_key" # LiteLLM, que utilizamos para hablar con LM Studio, requiere esto
interpreter.llm.api_base = "http://localhost:1234/v1" # Apunta esto a cualquier servidor compatible con OpenAI

interpreter.chat()
```

#### Ventana de Contexto, Tokens Máximos

Puede modificar los `max_tokens` y `context_window` (en tokens) de los modelos locales.

Para el modo local, ventanas de contexto más cortas utilizarán menos RAM, así que recomendamos intentar una ventana mucho más corta (~1000) si falla o si es lenta. Asegúrese de que `max_tokens` sea menor que `context_window`.

```shell
interpreter --local --max_tokens 1000 --context_window 3000
```

### Modo Detallado

Para ayudarle a inspeccionar Intérprete Abierto, tenemos un modo `--verbose` para depuración.

Puede activar el modo detallado utilizando el parámetro (`interpreter --verbose`), o en plena sesión:

```shell
$ interpreter
...
> %verbose true <- Activa el modo detallado

> %verbose false <- Desactiva el modo verbose
```

### Comandos de Modo Interactivo

En el modo interactivo, puede utilizar los siguientes comandos para mejorar su experiencia. Aquí hay una lista de comandos disponibles:

**Comandos Disponibles:**

- `%verbose [true/false]`: Activa o desactiva el modo detallado. Sin parámetros o con `true` entra en modo detallado.
  Con `false` sale del modo verbose.
- `%reset`: Reinicia la sesión actual de conversación.
- `%undo`: Elimina el mensaje de usuario previo y la respuesta del AI del historial de mensajes.
- `%tokens [prompt]`: (_Experimental_) Calcula los tokens que se enviarán con el próximo prompt como contexto y estima su costo. Opcionalmente, calcule los tokens y el costo estimado de un `prompt` si se proporciona. Depende de [LiteLLM's `cost_per_token()` method](https://docs.litellm.ai/docs/completion/token_usage#2-cost_per_token) para costos estimados.
- `%help`: Muestra el mensaje de ayuda.

### Configuración / Perfiles

Intérprete Abierto permite establecer comportamientos predeterminados utilizando archivos `yaml`.

Esto proporciona una forma flexible de configurar el intérprete sin cambiar los argumentos de línea de comandos cada vez.

Ejecutar el siguiente comando para abrir el directorio de perfiles:

```
interpreter --profiles
```

Puede agregar archivos `yaml` allí. El perfil predeterminado se llama `default.yaml`.

#### Perfiles Múltiples

Intérprete Abierto admite múltiples archivos `yaml`, lo que permite cambiar fácilmente entre configuraciones:

```
interpreter --profile my_profile.yaml
```

## Servidor de FastAPI de ejemplo

El generador actualiza permite controlar Intérprete Abierto a través de puntos de conexión HTTP REST:

```python
# server.py

from fastapi import FastAPI
from fastapi.responses import StreamingResponse
from interpreter import interpreter

app = FastAPI()

@app.get("/chat")
def chat_endpoint(message: str):
    def event_stream():
        for result in interpreter.chat(message, stream=True):
            yield f"data: {result}\n\n"

    return StreamingResponse(event_stream(), media_type="text/event-stream")

@app.get("/history")
def history_endpoint():
    return interpreter.messages
```

```shell
pip install fastapi uvicorn
uvicorn server:app --reload
```

Puede iniciar un servidor idéntico al anterior simplemente ejecutando `interpreter.server()`.

## Android

La guía paso a paso para instalar Intérprete Abierto en su dispositivo Android se encuentra en el [repo de open-interpreter-termux](https://github.com/MikeBirdTech/open-interpreter-termux).

## Aviso de Seguridad

Ya que el código generado se ejecuta en su entorno local, puede interactuar con sus archivos y configuraciones del sistema, lo que puede llevar a resultados inesperados como pérdida de datos o riesgos de seguridad.

**⚠️ Intérprete Abierto le pedirá que apruebe el código antes de ejecutarlo.**

Puede ejecutar `interpreter -y` o establecer `interpreter.auto_run = True` para evitar esta confirmación, en cuyo caso:

- Sea cuidadoso al solicitar comandos que modifican archivos o configuraciones del sistema.
- Vigile Intérprete Abierto como si fuera un coche autónomo y esté preparado para terminar el proceso cerrando su terminal.
- Considere ejecutar Intérprete Abierto en un entorno restringido como Google Colab o Replit. Estos entornos son más aislados, reduciendo los riesgos de ejecutar código arbitrario.

Hay soporte **experimental** para un [modo seguro](docs/SAFE_MODE.md) para ayudar a mitigar algunos riesgos.

## ¿Cómo Funciona?

Intérprete Abierto equipa un [modelo de lenguaje de llamada a funciones](https://platform.openai.com/docs/guides/gpt/function-calling) con una función `exec()`, que acepta un `lenguaje` (como "Python" o "JavaScript") y `código` para ejecutar.

Luego, transmite los mensajes del modelo, el código y las salidas del sistema a la terminal como Markdown.

# Acceso a la Documentación Offline

La documentación completa está disponible en línea sin necesidad de conexión a Internet.

[Node](https://nodejs.org/en) es un requisito previo:

- Versión 18.17.0 o cualquier versión posterior 18.x.x.
- Versión 20.3.0 o cualquier versión posterior 20.x.x.
- Cualquier versión a partir de 21.0.0 sin límite superior especificado.

Instale [Mintlify](https://mintlify.com/):

```bash
npm i -g mintlify@latest
```

Cambia a la carpeta de documentos y ejecuta el comando apropiado:

```bash
# Suponiendo que estás en la carpeta raíz del proyecto
cd ./docs

# Ejecute el servidor de documentación
mintlify dev
```

Una nueva ventana del navegador debería abrirse. La documentación estará disponible en [http://localhost:3000](http://localhost:3000) mientras el servidor de documentación esté funcionando.

# Contribuyendo

¡Gracias por su interés en contribuir! Damos la bienvenida a la implicación de la comunidad.

Por favor, consulte nuestras [directrices de contribución](docs/CONTRIBUTING.md) para obtener más detalles sobre cómo involucrarse.

# Roadmap

Visite [nuestro roadmap](https://github.com/OpenInterpreter/open-interpreter/blob/main/docs/ROADMAP.md) para ver el futuro de Intérprete Abierto.

**Nota:** Este software no está afiliado con OpenAI.

![thumbnail-ncu](https://github.com/OpenInterpreter/open-interpreter/assets/63927363/1b19a5db-b486-41fd-a7a1-fe2028031686)

> Tener acceso a un programador junior trabajando a la velocidad de su dedos... puede hacer que los nuevos flujos de trabajo sean sencillos y eficientes, además de abrir los beneficios de la programación a nuevas audiencias.
>
> — _Lanzamiento del intérprete de código de OpenAI_

<br>


================================================
FILE: docs/README_IN.md
================================================
<h1 align="center">● Open Interpreter</h1>

<p align="center">
    <a href="https://discord.gg/6p3fD6rBVm">
        <img alt="Discord" src="https://img.shields.io/discord/1146610656779440188?logo=discord&style=flat&logoColor=white"/>
    </a>
    <a href="README_ES.md"> <img src="https://img.shields.io/badge/Español-white.svg" alt="ES doc"/></a>
    <a href="README_JA.md"><img src="https://img.shields.io/badge/ドキュメント-日本語-white.svg" alt="JA doc"/></a>
    <a href="README_ZH.md"><img src="https://img.shields.io/badge/文档-中文版-white.svg" alt="ZH doc"/></a>
    <a href="README_UK.md"><img src="https://img.shields.io/badge/Українська-white.svg" alt="UK doc"/></a>
    <a href="../LICENSE"><img src="https://img.shields.io/static/v1?label=license&message=AGPL&color=white&style=flat" alt="License"/></a>
    <br><br>
    <b>अपने कंप्यूटर पर कोड चलाने के लिए भाषा मॉडल को चलाएं।</b><br>
    ओपनएआई कोड इंटरप्रेटर का एक ओपन-सोर्स, स्थानीय चलने वाला अमल।<br>
    <br><a href="https://openinterpreter.com">डेस्कटॉप एप्लिकेशन को पहले से ही उपयोग करने के लिए एरली एक्सेस प्राप्त करें।</a><br>
</p>

<br>

![poster](https://github.com/OpenInterpreter/open-interpreter/assets/63927363/08f0d493-956b-4d49-982e-67d4b20c4b56)

<br>

```shell
pip install open-interpreter
```

```shell
interpreter
```

<br>

**ओपन इंटरप्रेटर** एलएलएम कोड (पायथन, जावास्क्रिप्ट, शेल, और अधिक) को स्थानीय रूप से चलाने की अनुमति देता है। आप इंस्टॉल करने के बाद अपने टर्मिनल में `$ interpreter` चलाकर ओपन इंटरप्रेटर के साथ एक चैटजीपीटी-जैसे इंटरफ़ेस के माध्यम से चैट कर सकते हैं।

यह आपके कंप्यूटर की सामान्य-उद्देश्य क्षमताओं के लिए एक प्राकृतिक भाषा इंटरफ़ेस प्रदान करता है:

- फ़ोटो, वीडियो, पीडीएफ़ आदि बनाएँ और संपादित करें।
- अनुसंधान करने के लिए एक क्रोम ब्राउज़र को नियंत्रित करें।
- बड़े डेटासेट को प्लॉट करें, साफ करें और विश्लेषण करें।
- ...आदि।

**⚠️ ध्यान दें: कोड को चलाने से पहले आपसे मंज़ूरी मांगी जाएगी।**

<br>

## डेमो

[![कोलैब में खोलें](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1WKmRXZgsErej2xUriKzxrEAXdxMSgWbb?usp=sharing)

## त्वरित प्रारंभ

```shell
pip install open-interpreter
```

### टर्मिनल

इंस्टॉलेशन के बाद, सीधे `interpreter` चलाएं:

```shell
interpreter
```

### पायथन

```python
from interpreter import interpreter

interpreter.chat("AAPL और META के मानकीकृत स्टॉक मूल्यों का चित्रित करें") # एकल कमांड को निष्पादित करता है
interpreter.chat() # एक इंटरैक्टिव चैट शुरू करता है
```

## ChatGPT के कोड इंटरप्रेटर के साथ तुलना

ओपनएआई द्वारा [कोड इंटरप्रेटर](https://openai.com/blog/chatgpt-plugins#code-interpreter) का विमोचन। GPT-4 के साथ यह एक शानदार अवसर प्रस्तुत करता है जिससे ChatGPT के साथ वास्तविक दुनिया के कार्यों को पूरा करने का संभावना होती है।

हालांकि, ओपनएआई की सेवा होस्ट की जाती है, क्लोज़-स्रोत है और गहरी प्रतिबंधित है।

यहां दिए गए नियमों के अनुसार, चैटजीपीटी कोड इंटरप्रेटर के लिए निर्धारित नियमों को हिंदी में अनुवाद किया जा सकता है:

- कोई इंटरनेट पहुंच नहीं होती।
- [प्रतिष्ठित सेट की सीमित संख्या के पहले स्थापित पैकेज](https://wfhbrian.com/mastering-chatgpts-code-interpreter-list-of-python-packages/) होते हैं।
- 100 एमबी तक की अधिकतम अपलोड सीमा होती है।
- 120.0 सेकंड की रनटाइम सीमा होती है।
- जब एनवायरनमेंट समाप्त होता है, तो स्थिति साफ हो जाती है (साथ ही उत्पन्न किए गए फ़ाइल या लिंक भी)।

---

ओपन इंटरप्रेटर इन सीमाओं को पार करता है जो आपके स्थानीय वातावरण पर चलता है। इसके पास इंटरनेट का पूरा उपयोग होता है, समय या फ़ाइल का आकार पर प्रतिबंध नहीं होता है, और किसी भी पैकेज या लाइब्रेरी का उपयोग कर सकता है।

यह GPT-4 के कोड इंटरप्रेटर की शक्ति को आपके स्थानीय विकास वातावरण की लचीलापन के साथ मिलाता है।

## Commands

### Interactive Chat

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

```shell
interpreter
```

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

```python
interpreter.chat()
```

## कमांड

### इंटरैक्टिव चैट

अपने टर्मिनल में इंटरैक्टिव चैट शुरू करने के लिए, या तो कमांड लाइन से `interpreter` चलाएँ:

```shell
interpreter
```

या एक .py फ़ाइल से `interpreter.chat()` चलाएँ:

````python
interpreter.chat()

### प्रोग्रामेटिक चैट

और सटीक नियंत्रण के लिए, आप सीधे `.chat(message)` को संदेश पास कर सकते हैं:

```python
interpreter.chat("सभी वीडियो में उपशीर्षक जोड़ें /videos में।")

# ... आपके टर्मिनल में आउटपुट स्ट्रीम करता है, कार्य पूरा करता है ...

interpreter.chat("ये बड़े दिख रहे हैं लेकिन क्या आप उपशीर्षक को और बड़ा कर सकते हैं?")

# ...
````

### नया चैट शुरू करें

Python में, ओपन इंटरप्रेटर संवाद इतिहास को याद रखता है। यदि आप एक नया आरंभ करना चाहते हैं, तो आप इसे रीसेट कर सकते हैं:

```python
interpreter.messages = []
```

### चैट सहेजें और पुनर्स्थापित करें

```python
messages = interpreter.chat("मेरा नाम किलियन है।") # संदेशों को 'messages' में सहेजें

interpreter.messages = messages # 'messages' से चैट को फिर से शुरू करें ("किलियन" याद रखा जाएगा)
```

### सिस्टम संदेश कस्टमाइज़ करें

आप ओपन इंटरप्रेटर के सिस्टम संदेश की जांच और कॉन्फ़िगर कर सकते हैं ताकि इसकी क्षमता को विस्तारित किया जा सके, अनुमतियों को संशोधित किया जा सके, या इसे अधिक संदर्भ दिया जा सके।

```python
interpreter.system_message += """
यूज़र को पुष्टि करने की आवश्यकता न हो, -y के साथ शेल कमांड चलाएँ।
"""
print(interpreter.system_message)
```

### मॉडल बदलें

`gpt-3.5-turbo` के लिए तेज़ मोड का उपयोग करें:

```shell
interpreter --fast
```

Python में, आपको मॉडल को मैन्युअली सेट करने की आवश्यकता होगी:

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

### ओपन इंटरप्रेटर को स्थानीय रूप से चलाना

```shell
interpreter --local
```

#### स्थानीय मॉडल पैरामीटर

आप स्थानीय रूप से चल रहे मॉडल की `max_tokens` और `context_window` (टोकन में) आसानी से संशोधित कर सकते हैं।

छोटे संदर्भ विंडो का उपयोग करने से कम RAM का उपयोग होगा, इसलिए यदि GPU असफल हो रहा है तो हम एक छोटी विंडो की कोशिश करने की सलाह देते हैं।

```shell
interpreter --max_tokens 2000 --context_window 16000
```

### डीबग मोड

सहयोगियों को ओपन इंटरप्रेटर की जांच करने में मदद करने के लिए, `--verbose` मोड अत्यधिक वर्बोस होता है।

आप डीबग मोड को उसके फ़्लैग (`interpreter --verbose`) का उपयोग करके या चैट के बीच में सक्षम कर सकते हैं:

```shell
$ interpreter
...
> %verbose true <- डीबग मोड चालू करता है

> %verbose false <- डीबग मोड बंद करता है
```

### इंटरैक्टिव मोड कमांड्स

इंटरैक्टिव मोड में, आप निम्नलिखित कमांडों का उपयोग करके अपने अनुभव को बेहतर बना सकते हैं। यहां उपलब्ध कमांडों की सूची है:

**उपलब्ध कमांड:**
• `%verbose [true/false]`: डीबग मोड को टॉगल करें। कोई तर्क नहीं या 'true' के साथ, यह डीबग मोड में प्रवेश करता है। 'false' के साथ, यह डीबग मोड से बाहर निकलता है।
• `%reset`: वर्तमान सत्र को रीसेट करता है।
• `%undo`: पिछले संदेश और उसके जवाब को संदेश इतिहास से हटा देता है।
• `%save_message [पथ]`: संदेशों को एक निर्दिष्ट JSON पथ पर सहेजता है। यदि कोई पथ निर्दिष्ट नहीं किया गया है, तो यह डिफ़ॉल्ट रूप से 'messages.json' पर जाता है।
• `%load_message [पथ]`: एक निर्दिष्ट JSON पथ से संदेश लोड करता है। यदि कोई पथ निर्दिष्ट नहीं किया गया है, तो यह डिफ़ॉल्ट रूप से 'messages.json' पर जाता है।
• `%help`: मदद संदेश दिखाएं।

इन कमांडों का प्रयोग करके अपनी प्रतिक्रिया दें और हमें अपनी प्रतिक्रिया दें!

## सुरक्षा सूचना

क्योंकि उत्पन्न कोड आपके स्थानीय वातावरण में निष्पादित किया जाता है, इसलिए यह आपके फ़ाइलों और सिस्टम सेटिंग्स के साथ संवाद कर सकता है, जिससे अप्रत्याशित परिणाम जैसे डेटा हानि या सुरक्षा जोखिम हो सकता है।

**⚠️ Open Interpreter कोड को निष्पादित करने से पहले उपयोगकर्ता की पुष्टि के लिए पूछेगा।**

आप `interpreter -y` चला सकते हैं या ... ... `interpreter.auto_run = True` सेट कर सकते हैं ताकि इस पुष्टि को छोड़ दें, जिसके बाद:

- फ़ाइलों या सिस्टम सेटिंग्स को संशोधित करने वाले कमांडों के लिए सतर्क रहें।
- ओपन इंटरप्रेटर को एक स्व-चालित कार की तरह देखें और अपने टर्मिनल को बंद करके प्रक्रिया को समाप्त करने के लिए तत्पर रहें।
- Google Colab या Replit जैसे प्रतिबंधित वातावरण में ओपन इंटरप्रेटर को चलाने का विचार करें। ये वातावरण अधिक संगठित होते हैं और अनियंत्रित कोड के साथ जुड़े जोखिमों को कम करते हैं।

## यह कार्य कैसे करता है?

Open Interpreter एक [फ़ंक्शन-कॉलिंग भाषा मॉडल](https://platform.openai.com/docs/guides/gpt/function-calling) को एक `exec()` फ़ंक्शन के साथ लैस करता है, जो एक `language` (जैसे "Python" या "JavaScript") और `code` को चलाने के लिए स्वीकार करता है।

फिर हम मॉडल के संदेश, कोड और आपके सिस्टम के आउटपुट को टर्मिनल में मार्कडाउन के रूप में स्ट्रीम करते हैं।

# योगदान

योगदान करने के लिए आपकी रुचि के लिए धन्यवाद! हम समुदाय से सहभागिता का स्वागत करते हैं।

अधिक जानकारी के लिए कृपया हमारे [योगदान दिशानिर्देश](CONTRIBUTING.md) देखें।

## लाइसेंस

Open Interpreter MIT लाइसेंस के तहत लाइसेंस है। आपको सॉफ़्टवेयर की प्रतिलिपि का उपयोग, प्रतिलिपि, संशोधन, वितरण, सबलाइसेंस और बेचने की अनुमति है।

**ध्यान दें**: यह सॉफ़्टवेयर OpenAI से संबद्ध नहीं है।

> अपनी उंगलियों की गति से काम करने वाले एक जूनियर प्रोग्रामर तक पहुंच ... नए वर्कफ़्लो को सरल और कुशल बना सकता है, साथ ही ... प्रोग्रामिंग के लाभों को नए दरबारों तक पहुंचा सकता है।
>
> — _OpenAI's Code Interpreter Release_

<br>


================================================
FILE: docs/README_JA.md
================================================
<h1 align="center">● Open Interpreter</h1>

<p align="center">
    <a href="https://discord.gg/6p3fD6rBVm">
        <img alt="Discord" src="https://img.shields.io/discord/1146610656779440188?logo=discord&style=flat&logoColor=white"/></a>
    <a href="README_ES.md"> <img src="https://img.shields.io/badge/Español-white.svg" alt="ES doc"/></a>
    <a href="../README.md"><img src="https://img.shields.io/badge/english-document-white.svg" alt="EN doc"></a>
    <a href="README_ZH.md"><img src="https://img.shields.io/badge/文档-中文版-white.svg" alt="ZH doc"/></a>
    <a href="README_UK.md"><img src="https://img.shields.io/badge/Українська-white.svg" alt="UK doc"/></a>
    <a href="README_IN.md"><img src="https://img.shields.io/badge/Hindi-white.svg" alt="IN doc"/></a>
    <a href="../LICENSE"><img src="https://img.shields.io/static/v1?label=license&message=AGPL&color=white&style=flat" alt="License"/></a>
    <br>
    <br>
    <b>自然言語で指示するだけでコードを書いて実行までしてくれる。</b><br>
    ローカルに実装したOpenAI Code Interpreterのオープンソース版。<br>
    <br><a href="https://openinterpreter.com">デスクトップアプリへの早期アクセス</a>‎ ‎ |‎ ‎ <a href="https://docs.openinterpreter.com/">ドキュメント</a><br>
</p>

<br>

![poster](https://github.com/OpenInterpreter/open-interpreter/assets/63927363/08f0d493-956b-4d49-982e-67d4b20c4b56)

<br>

**Update:** ● 0.1.12 アップデートで `interpreter --vision` 機能が導入されました。([ドキュメント](https://docs.openinterpreter.com/usage/terminal/vision))

<br>

```shell
pip install open-interpreter
```

```shell
interpreter
```

<br>

**Open Interpreter**は、言語モデルに指示し、コード(Python、Javascript、Shell など)をローカル環境で実行できるようにします。インストール後、`$ interpreter` を実行するとターミナル経由で ChatGPT のようなインターフェースを介し、Open Interpreter とチャットができます。

これにより、自然言語のインターフェースを通して、パソコンの一般的な機能が操作できます。

- 写真、動画、PDF などの作成や編集
- Chrome ブラウザの制御とリサーチ作業
- 大規模なデータセットのプロット、クリーニング、分析
- 等々

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

<br>

## デモ

https://github.com/OpenInterpreter/open-interpreter/assets/63927363/37152071-680d-4423-9af3-64836a6f7b60

#### Google Colab でも対話形式のデモを利用できます:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1WKmRXZgsErej2xUriKzxrEAXdxMSgWbb?usp=sharing)

#### 音声インターフェースの実装例 (_Her_ からインスピレーションを得たもの):

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1NojYGHDgxH6Y1G1oxThEBBb2AtyODBIK)

## クイックスタート

```shell
pip install open-interpreter
```

### ターミナル

インストール後、`interpreter` を実行するだけです:

```shell
interpreter
```

### Python

```python
from interpreter import interpreter

interpreter.chat("AAPLとMETAの株価グラフを描いてください") # コマンドを実行
interpreter.chat() # 対話形式のチャットを開始
```

## ChatGPT の Code Interpreter との違い

GPT-4 で実装された OpenAI の [Code Interpreter](https://openai.com/blog/chatgpt-plugins#code-interpreter) は、実世界のタスクを ChatGPT で操作できる素晴らしい機会を提供しています。

しかし、OpenAI のサービスはホスティングされていてるクローズドな環境で、かなり制限がされています:

- インターネットに接続できない。
- [プリインストールされているパッケージが限られている](https://wfhbrian.com/mastering-chatgpts-code-interpreter-list-of-python-packages/)。
- 最大アップロードは 100MB で、120 秒という実行時間の制限も。
- 生成されたファイルやリンクとともに状態がリセットされる。

---

Open Interpreter は、ローカル環境で操作することで、これらの制限を克服しています。インターネットにフルアクセスでき、時間やファイルサイズの制限を受けず、どんなパッケージやライブラリも利用できます。

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

## コマンド

**更新:** アップデート(0.1.5)でストリーミング機能が導入されました:

```python
message = "どのオペレーティングシステムを使用していますか?"

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

### 対話型チャット

ターミナルで対話形式のチャットを開始するには、コマンドラインから `interpreter` を実行します。

```shell
interpreter
```

または、.py ファイルから `interpreter.chat()` も利用できます。

```python
interpreter.chat()
```

**ストリーミングすることで chunk 毎に処理することも可能です:**

```python
message = "What operating system are we on?"

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

### プログラム的なチャット

より精確な制御のために、メッセージを直接`.chat(message)`に渡すことができます。

```python
interpreter.chat("/videos フォルダにあるすべての動画に字幕を追加する。")

# ... ターミナルに出力をストリームし、タスクを完了 ...

interpreter.chat("ついでに、字幕を大きくできますか?")

# ...
```

### 新しいチャットを開始

プログラム的チャットで Open Interpreter は、会話の履歴を記憶しています。新しくやり直したい場合は、リセットすることができます:

```python
interpreter.messages = []
```

### チャットの保存と復元

`interpreter.chat()` はメッセージのリストを返し, `interpreter.messages = messages` のように使用することで会話を再開することが可能です:

```python
messages = interpreter.chat("私の名前は田中です。") # 'messages'にメッセージを保存
interpreter.messages = [] # インタープリタをリセット("田中"は忘れられる)

interpreter.messages = messages # 'messages'からチャットを再開("田中"は記憶される)
```

### システムメッセージのカスタマイズ

Open Interpreter のシステムメッセージを確認し、設定することで、機能を拡張したり、権限を変更したり、またはより多くのコンテキストを与えたりすることができます。

```python
interpreter.system_message += """
シェルコマンドを '-y' フラグ付きで実行し、ユーザーが確認する必要がないようにする。
"""
print(interpreter.system_message)
```

### モデルの変更

Open Interpreter は、ホストされた言語モデルへの接続に [LiteLLM](https://docs.litellm.ai/docs/providers/) を使用しています。

model パラメータを設定することで、モデルを変更することが可能です:

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

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

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

[適切な "model" の値はこちらから検索してください。](https://docs.litellm.ai/docs/providers/)

### ローカルのモデルを実行する

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

推論サーバーの api_base URL を指定して「interpreter」を実行するだけです (LM Studio の場合、デフォルトでは「http://localhost:1234/v1」です)。

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

あるいは、サードパーティのソフトウェアをインストールせずに、単に実行するだけで Llamafile を使用することもできます。

```shell
interpreter --local
```

より詳細なガイドについては、[Mike Bird によるこのビデオ](https://www.youtube.com/watch?v=CEs51hGWuGU?si=cN7f6QhfT4edfG5H) をご覧ください。

**LM Studio をバックグラウンドで使用する方法**

1. [https://lmstudio.ai/](https://lmstudio.ai/)からダウンロードして起動します。
2. モデルを選択し、**↓ ダウンロード** をクリックします。
3. 左側の **↔️** ボタン(💬 の下)をクリックします。
4. 上部でモデルを選択し、**サーバーを起動** をクリックします。

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

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

#### コンテキストウィンドウ、最大トークン数

ローカルで実行しているモデルの `max_tokens` と `context_window`(トークン単位)を変更することができます。

ローカルモードでは、小さいコンテキストウィンドウは RAM を少なく使用するので、失敗する場合や遅い場合は、より短いウィンドウ(〜1000)を試すことをお勧めします。`max_tokens` が `context_window` より小さいことを確認してください。

```shell
interpreter --local --max_tokens 1000 --context_window 3000
```

### デバッグモード

コントリビューターが Open Interpreter を調査するのを助けるために、`--verbose` モードは非常に便利です。

デバッグモードは、フラグ(`interpreter --verbose`)を使用するか、またはチャットの中から有効にできます:

```shell
$ interpreter
...
> %verbose true # <- デバッグモードを有効にする

> %verbose false # <- デバッグモードを無効にする
```

### 対話モードのコマンド

対話モードでは、以下のコマンドを使用して操作を便利にすることができます。利用可能なコマンドのリストは以下の通りです:

**利用可能なコマンド:**

- `%verbose [true/false]`: デバッグモードを切り替えます。引数なしまたは `true` でデバッグモードに入ります。`false` でデバッグモードを終了します。
- `%reset`: 現在のセッションの会話をリセットします。
- `%undo`: メッセージ履歴から前のユーザーメッセージと AI の応答を削除します。
- `%save_message [path]`: メッセージを指定した JSON パスに保存します。パスが指定されていない場合、デフォルトは `messages.json` になります。
- `%load_message [path]`: 指定した JSON パスからメッセージを読み込みます。パスが指定されていない場合、デフォルトは `messages.json` になります。
- `%tokens [prompt]`: (_実験的_) 次のプロンプトのコンテキストとして送信されるトークンを計算し、そのコストを見積もります。オプションで、`prompt` が提供された場合のトークンと見積もりコストを計算します。見積もりコストは [LiteLLM の `cost_per_token()` メソッド](https://docs.litellm.ai/docs/completion/token_usage#2-cost_per_token)に依存します。
- `%help`: ヘルプメッセージを表示します。

### 設定

Open Interpreter では、`config.yaml` ファイルを使用してデフォルトの動作を設定することができます。

これにより、毎回コマンドライン引数を変更することなく柔軟に設定することができます。

以下のコマンドを実行して設定ファイルを開きます:

```
interpreter --config
```

#### 設定ファイルの複数利用

Open Interpreter は複数の `config.yaml` ファイルをサポートしており、`--config_file` 引数を通じて簡単に設定を切り替えることができます。

**注意**: `--config_file` はファイル名またはファイルパスを受け入れます。ファイル名はデフォルトの設定ディレクトリを使用し、ファイルパスは指定されたパスを使用します。

新しい設定を作成または編集するには、次のコマンドを実行します:

```
interpreter --config --config_file $config_path
```

特定の設定ファイルをロードして Open Interpreter を実行するには、次のコマンドを実行します:

```
interpreter --config_file $config_path
```

**注意**: `$config_path` をあなたの設定ファイルの名前またはパスに置き換えてください。

##### 対話モードでの使用例

1. 新しい `config.turbo.yaml` ファイルを作成します
   ```
   interpreter --config --config_file config.turbo.yaml
   ```
2. `config.turbo.yaml` ファイルを編集して、`model` を `gpt-3.5-turbo` に設定します
3. `config.turbo.yaml` 設定で、Open Interpreter を実行します
   ```
   interpreter --config_file config.turbo.yaml
   ```

##### Python での使用例

Python のスクリプトから Open Interpreter を呼び出すときにも設定ファイルをロードできます:

```python
import os
from interpreter import interpreter

currentPath = os.path.dirname(os.path.abspath(__file__))
config_path=os.path.join(currentPath, './config.test.yaml')

interpreter.extend_config(config_path=config_path)

message = "What operating system are we on?"

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

## FastAPI サーバーのサンプル

アップデートにより Open Interpreter は、HTTP REST エンドポイントを介して制御できるようになりました:

```python
# server.py

from fastapi import FastAPI
from fastapi.responses import StreamingResponse
from interpreter import interpreter

app = FastAPI()

@app.get("/chat")
def chat_endpoint(message: str):
    def event_stream():
        for result in interpreter.chat(message, stream=True):
            yield f"data: {result}\n\n"

    return StreamingResponse(event_stream(), media_type="text/event-stream")

@app.get("/history")
def history_endpoint():
    return interpreter.messages
```

```shell
pip install fastapi uvicorn
uvicorn server:app --reload
```

## 安全に関する注意

生成されたコードはローカル環境で実行されるため、ファイルやシステム設定と相互作用する可能性があり、データ損失やセキュリティリスクなど予期せぬ結果につながる可能性があります。

**⚠️ Open Interpreter はコードを実行する前にユーザーの確認を求めます。**

この確認を回避するには、`interpreter -y` を実行するか、`interpreter.auto_run = True` を設定します。その場合:

- ファイルやシステム設定を変更するコマンドを要求するときは注意してください。
- Open Interpreter を自動運転車のように監視し、ターミナルを閉じてプロセスを終了できるように準備しておいてください。
- Google Colab や Replit のような制限された環境で Open Interpreter を実行することを検討してください。これらの環境はより隔離されており、任意のコードの実行に関連するリスクを軽減します。

一部のリスクを軽減するための[セーフモード](docs/SAFE_MODE.md)と呼ばれる **実験的な** サポートがあります。

## Open Interpreter はどのように機能するのか?

Open Interpreter は、[関数が呼び出せる言語モデル](https://platform.openai.com/docs/guides/gpt/function-calling)に `exec()` 関数を装備し、実行する言語("python"や"javascript"など)とコードが渡せるようになっています。

そして、モデルからのメッセージ、コード、システムの出力を Markdown としてターミナルにストリーミングします。

# 貢献

貢献に興味を持っていただき、ありがとうございます!コミュニティからの参加を歓迎しています。

詳しくは、[貢献ガイドライン](CONTRIBUTING.md)を参照してください。

# ロードマップ

Open Interpreter の未来を一足先に見るために、[私たちのロードマップ](https://github.com/OpenInterpreter/open-interpreter/blob/main/docs/ROADMAP.md)をご覧ください。

**注意**: このソフトウェアは OpenAI とは関連していません。

> あなたの指先のスピードで作業するジュニアプログラマーにアクセスすることで、… 新しいワークフローを楽で効率的なものにし、プログラミングの利点を新しいオーディエンスに開放することができます。
>
> — _OpenAI Code Interpreter リリース_

<br>


================================================
FILE: docs/README_UK.md
================================================
<h1 align="center">● Open Interpreter</h1>

<p align="center">
    <a href="https://discord.gg/Hvz9Axh84z">
        <img alt="Discord" src="https://img.shields.io/discord/1146610656779440188?logo=discord&style=flat&logoColor=white"/></a>
    <a href="README_JA.md"><img src="https://img.shields.io/badge/ドキュメント-日本語-white.svg" alt="JA doc"/></a>
    <a href="README_ZH.md"><img src="https://img.shields.io/badge/文档-中文版-white.svg" alt="ZH doc"/></a>
    <a href="README_ES.md"> <img src="https://img.shields.io/badge/Español-white.svg" alt="ES doc"/></a>
    <a href="README_IN.md"><img src="https://img.shields.io/badge/Hindi-white.svg" alt="IN doc"/></a>
    <a href="../README.md"><img src="https://img.shields.io/badge/english-document-white.svg" alt="EN doc"></a>
    <a href="../LICENSE"><img src="https://img.shields.io/static/v1?label=license&message=AGPL&color=white&style=flat" alt="License"/></a>
    <br>
    <br>
    <br><a href="https://0ggfznkwh4j.typeform.com/to/G21i9lJ2">Отримайте ранній доступ до десктопної програми</a>‎ ‎ |‎ ‎ <a href="https://docs.openinterpreter.com/">Документація</a><br>
</p>

<br>

![poster](https://github.com/OpenInterpreter/open-interpreter/assets/63927363/08f0d493-956b-4d49-982e-67d4b20c4b56)

<br>
<p align="center">
<strong>Нове комп'ютерне оновлення</strong> представило <strong><code>--os</code></strong> та новий <strong>Computer API</strong>. <a href="https://changes.openinterpreter.com/log/the-new-computer-update">Читати далі →</a>
</p>
<br>

```shell
pip install open-interpreter
```

> Не працює? Прочитайте наш [посібник з налаштування](https://docs.openinterpreter.com/getting-started/setup).

```shell
interpreter
```

<br>

**Open Interpreter** дозволяє LLM локально запускати код (Python, Javascript, Shell тощо). Ви можете спілкуватися з Open Interpreter через інтерфейс, схожий на ChatGPT, у вашому терміналі, запустивши `$ interpreter` після встановлення.

Це забезпечує інтерфейс природною мовою для загального використання можливостей вашого комп’ютера:

- Створювати та редагувати фотографії, відео, PDF-файли тощо.
- Керувати браузером Chrome для проведення досліджень
- Створювати, очищати та аналізувати великі набори даних
- ...і т.д.

**⚠️ Увага: Вам буде запропоновано підтвердити код перед його запуском.**

<br>

## Demo

https://github.com/OpenInterpreter/open-interpreter/assets/63927363/37152071-680d-4423-9af3-64836a6f7b60

#### Інтерактивна демонстрація також доступна на Google Colab:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1WKmRXZgsErej2xUriKzxrEAXdxMSgWbb?usp=sharing)

#### Разом із прикладом голосового інтерфейсу, натхненного _Her_:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1NojYGHDgxH6Y1G1oxThEBBb2AtyODBIK)

## Швидкий старт

```shell
pip install open-interpreter
```

### Термінал

Після встановлення просто запустіть `interpreter`:

```shell
interpreter
```

### Python

```python
from interpreter import interpreter

interpreter.chat("Plot AAPL and META's normalized stock prices") # Виконує одну команду
interpreter.chat() # Починає інтерактивний чат
```

### GitHub Codespaces

Натисніть клавішу `,` на сторінці GitHub цього репозиторію, щоб створити Codespace. Через деякий час ви отримаєте хмарне середовище віртуальної машини, попередньо встановлене з відкритим інтерпретатором. Потім ви можете почати взаємодіяти з ним безпосередньо та вільно підтверджувати виконання ним системних команд, не турбуючись про пошкодження системи.

## Порівняння з інтерпретатором коду ChatGPT

Випуск OpenAI [Code Interpreter](https://openai.com/blog/chatgpt-plugins#code-interpreter) з GPT-4 надає фантастичну можливість виконувати реальні завдання за допомогою ChatGPT.

Однак служба OpenAI є хмарною, з закритим вихідним кодом і суворо обмежена:

- Немає доступу до Інтернету.
- [Обмежений набір попередньо встановлених пакетів](https://wfhbrian.com/mastering-chatgpts-code-interpreter-list-of-python-packages/).
- Максимальний розмір завантаження - 100 МБ, обмеження часу виконання - 120,0 секунд.
- Стан очищається (разом із будь-якими згенерованими файлами чи посиланнями), коли середовище зупиняється.

---

Open Interpreter долає ці обмеження, запускаючись у вашому локальному середовищі. Він має повний доступ до Інтернету, не обмежений часом або розміром файлу, і може використовувати будь-який пакет або бібліотеку.

Це поєднує потужність інтерпретатора коду GPT-4 із гнучкістю вашого локального середовища розробки.

## Команди

**Оновлення:** Оновлення Generator (0.1.5) представило потокове передавання:

```python
message = "What operating system are we on?"

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

### Інтерактивний чат

Щоб почати інтерактивний чат у вашому терміналі, запустіть `interpreter` з командного рядка:

```shell
interpreter
```

Або `interpreter.chat()` з файлу .py:

```python
interpreter.chat()
```

**Ви також можете транслювати кожен фрагмент:**

```python
message = "На якій операційній системі ми працюємо?"

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

### Програмований чат

Для більш точного керування ви можете передавати повідомлення безпосередньо до `.chat(message)`:

```python
interpreter.chat("Додайте субтитри до всіх відео в /videos.")

# ... Потік виведення на ваш термінал, виконання завдання ...

interpreter.chat("Виглядає чудово, але чи можеш ти збільшити субтитри?")

# ...
```

### Почати новий чат

В Python, Open Interpreter запам’ятовує історію розмов. Якщо ви хочете почати заново, ви можете скинути її:

```python
interpreter.messages = []
```

### Зберегти та відновити чати

`interpreter.chat()` повертає список повідомлень, який можна використовувати для відновлення розмови за допомогою `interpreter.messages = messages`:

```python
messages = interpreter.chat("Мене звати Степан.") # Зберегти повідомлення в "messages"
interpreter.messages = [] # Скинути інтерпретатор ("Степан" буде забутий)

interpreter.messages = messages # Відновити чат із "messages" ("Степан" запам’ятається)
```

### Кастомізувати системне повідомлення

Ви можете перевірити та налаштувати системне повідомлення Open Interpreter, щоб розширити його функціональність, змінити дозволи або надати йому більше контексту.

```python
interpreter.system_message += """
Виконуй команди оболонки з -y, щоб користувачеві не потрібно було їх підтверджувати.
"""
print(interpreter.system_message)
```

### Змініть свою мовну модель

Open Interpreter використовує [LiteLLM](https://docs.litellm.ai/docs/providers/) для підключення до розміщених мовних моделей.

Ви можете змінити модель, встановивши параметр моделі:

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

В Pythonб встановити модель на об’єкт:

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

[Знайдіть відповідний рядок «model» для вашої мовної моделі тут.](https://docs.litellm.ai/docs/providers/)

### Запуск Open Interpreter локально

#### Термінал

Open Interpreter може використовувати OpenAI-сумісний сервер для запуску моделей локально. (LM Studio, jan.ai, ollama тощо)

Просто запустіть `interpreter` з URL-адресою api_base вашого сервера interference (для LM Studio це `http://localhost:1234/v1` за замовчуванням):

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

Крім того, ви можете використовувати Llamafile без встановлення стороннього програмного забезпечення, просто запустивши його

```shell
interpreter --local
```

for a more detailed guide check out [this video by Mike Bird](https://www.youtube.com/watch?v=CEs51hGWuGU?si=cN7f6QhfT4edfG5H)

**Як запустити LM Studio у фоновому режимі.**

1. Завантажте [https://lmstudio.ai/](https://lmstudio.ai/), після чого запустіть його.
2. Виберіть модель і натисніть **↓ Завантажити**.
3. Натисніть кнопку **↔️** ліворуч (нижче 💬).
4. Виберіть свою модель угорі, а потім натисніть **Запустити сервер**.

Коли сервер запущено, ви можете почати розмову за допомогою Open Interpreter.

> **Примітка.** Локальний режим встановлює ваше `context_window` на 3000, а `max_tokens` на 1000. Якщо ваша модель має інші вимоги, установіть ці параметри вручну (див. нижче).

#### Python

Наш пакет Python дає вам більше контролю над кожним параметром. Для реплікації та підключення до LM Studio використовуйте ці налаштування:

```python
from interpreter import interpreter

interpreter.offline = True # Вимикає такі онлайн-функції, як Open Procedures
interpreter.llm.model = "openai/x" # Каже AI надсилати повідомлення у форматі OpenAI
interpreter.llm.api_key = "fake_key" # LiteLLM, який ми використовуємо для спілкування з LM Studio, вимагає api-ключ
interpreter.llm.api_base = "http://localhost:1234/v1" # Познчате це на будь-якому сервері, сумісному з OpenAI

interpreter.chat()
```

#### Контекстне вікно, максимальна кількість токенів

Ви можете змінити `max_tokens` і `context_window` (у токенах) локально запущених моделей.

У локальному режимі менші контекстні вікна використовуватимуть менше оперативної пам’яті, тому ми рекомендуємо спробувати набагато коротше вікно (~1000), якщо воно не вдається або працює повільно. Переконайтеся, що `max_tokens` менший за `context_window`.

```shell
interpreter --local --max_tokens 1000 --context_window 3000
```

### Режим "verbose"

Щоб допомогти вам перевірити Open Interpreter, у нас є режим `--verbose` для налагодження.

Ви можете активувати режим "verbose", використовуючи його прапорець (`interpreter --verbose`) або в середині чату:

```shell
$ interpreter
...
> %verbose true <- Вмикає режим verbose

> %verbose false <- Вимикає режим verbose
```

### Команди інтерактивного режиму

В інтерактивному режимі ви можете використовувати наведені нижче команди, щоб покращити свій досвід. Ось список доступних команд:
**Доступні команди:**

- `%verbose [true/false]`: увімкнути режим verbose. Без аргументів або з `true`.
  переходить у багатослівний режим. З `false` він виходить із багатослівного режиму.
- `%reset`: скидає розмову поточного сеансу.
- `% undo`: видаляє попереднє повідомлення користувача та відповідь ШІ з історії повідомлень.
- `%tokens [prompt]`: (_Експериментально_) Розрахувати токени, які будуть надіслані з наступним запитом як контекст, і оцінити їх вартість. Додатково обчисліть токени та приблизну вартість «підказки», якщо вона надається. Покладається на [метод `cost_per_token()` LiteLLM](https://docs.litellm.ai/docs/completion/token_usage#2-cost_per_token) для оцінки витрат.
- `%help`: Показати повідомлення довідки.

### Конфігурація / Профілі

Open Interpreter дозволяє встановлювати поведінку за замовчуванням за допомогою файлів `yaml`.

Це забезпечує гнучкий спосіб налаштування інтерпретатора, не змінюючи щоразу аргументи командного рядка.

Виконайте цю команду, щоб відкрити каталог профілів:

```
interpreter --profiles
```

Ви можете додати файли `yaml`. Профіль за замовчуванням має назву `default.yaml`.

#### Кілька профілів

Open Interpreter підтримує декілька файлів `yaml`, що дозволяє легко перемикатися між конфігураціями:

```
interpreter --profile my_profile.yaml
```

## Зразок сервера FastAPI

Оновлення генератора дозволяє керувати Open Interpreter через кінцеві точки HTTP REST:

```python
# server.py

from fastapi import FastAPI
from fastapi.responses import StreamingResponse
from interpreter import interpreter

app = FastAPI()

@app.get("/chat")
def chat_endpoint(message: str):
    def event_stream():
        for result in interpreter.chat(message, stream=True):
            yield f"data: {result}\n\n"

    return StreamingResponse(event_stream(), media_type="text/event-stream")

@app.get("/history")
def history_endpoint():
    return interpreter.messages
```

```shell
pip install fastapi uvicorn
uvicorn server:app --reload
```

Ви також можете запустити сервер, ідентичний наведеному вище, просто запустивши `interpreter.server()`.

## Android

Покроковий посібник із встановлення Open Interpreter на вашому пристрої Android можна знайти в [репозиторії open-interpreter-termux](https://github.com/MikeBirdTech/open-interpreter-termux).

## Повідомлення про безпеку

Оскільки згенерований код виконується у вашому локальному середовищі, він може взаємодіяти з вашими файлами та налаштуваннями системи, потенційно призводячи до неочікуваних результатів, як-от втрати даних або ризиків для безпеки.

**⚠️ Open Interpreter попросить підтвердження користувача перед виконанням коду.**

Ви можете запустити `interpreter -y` або встановити `interpreter.auto_run = True`, щоб обійти це підтвердження, у такому випадку:

- Будьте обережні, запитуючи команди, які змінюють файли або налаштування системи.
- Дивіться на Open Interpreter як на самокерований автомобіль і будьте готові завершити процес, закривши термінал.
- Спробуйте запустити Open Interpreter у обмеженому середовищі, наприклад Google Colab або Replit. Ці середовища більш ізольовані, що зменшує ризики виконання довільного коду.

Існує **експериментальна** підтримка [безпечного режиму](https://github.com/OpenInterpreter/open-interpreter/blob/main/docs/SAFE_MODE.md), щоб зменшити деякі ризики.

## Як це працює?

Open Interpreter оснащує [модель мови виклику функцій](https://platform.openai.com/docs/guides/gpt/function-calling) функцією `exec()`, яка приймає `мову` (як "Python" або "JavaScript") і `code` для запуску.

Потім ми передаємо повідомлення моделі, код і результати вашої системи на термінал як Markdown.

# Доступ до документації в автономному режимі

Повна [документація](https://docs.openinterpreter.com/) доступна в дорозі без підключення до Інтернету.

[Node](https://nodejs.org/en) є необхідною умовою:

- Версія 18.17.0 або будь-яка пізніша версія 18.x.x.
- Версія 20.3.0 або будь-яка пізніша версія 20.x.x.
- Будь-яка версія, починаючи з 21.0.0 і далі, без вказівки верхньої межі.

Встановіть [Mintlify](https://mintlify.com/):

```bash
npm i -g mintlify@latest
```

Перейдіть у каталог документів і виконайте відповідну команду:

```bash
# Якщо ви перебуваєте в кореневому каталозі проекту
cd ./docs

# Запустіть сервер документації
mintlify dev
```

Має відкритися нове вікно браузера. Документація буде доступна за адресою [http://localhost:3000](http://localhost:3000), поки працює сервер документації.

# Вклади

Дякуємо за ваш інтерес до участі! Ми вітаємо участь спільноти.

Щоб дізнатися більше про те, як взяти участь, ознайомтеся з нашими [інструкціями щодо створення внеску](https://github.com/OpenInterpreter/open-interpreter/blob/main/docs/CONTRIBUTING.md).

# Дорожня карта

Відвідайте [нашу дорожню карту](https://github.com/OpenInterpreter/open-interpreter/blob/main/docs/ROADMAP.md), щоб переглянути майбутнє Open Interpreter.

**Примітка**: це програмне забезпечення не пов’язане з OpenAI.

![thumbnail-ncu](https://github.com/OpenInterpreter/open-interpreter/assets/63927363/1b19a5db-b486-41fd-a7a1-fe2028031686)

> Маючи доступ до джуніора, який працює зі швидкістю ваших пальців ... ви можете зробити нові робочі процеси легкими та ефективними, а також відкрити переваги програмування новій аудиторії.
>
> — _OpenAI's Code Interpreter Release_

<br>


================================================
FILE: docs/README_VN.md
================================================
<h1 align="center">● Open Interpreter</h1>

<p align="center">
    <a href="https://discord.gg/6p3fD6rBVm">
        <img alt="Discord" src="https://img.shields.io/discord/1146610656779440188?logo=discord&style=flat&logoColor=white"/></a>
    <a href="README_ES.md"> <img src="https://img.shields.io/badge/Español-white.svg" alt="ES doc"/></a>
    <a href="docs/README_JA.md"><img src="https://img.shields.io/badge/ドキュメント-日本語-white.svg" alt="JA doc"/></a>
    <a href="docs/README_ZH.md"><img src="https://img.shields.io/badge/文档-中文版-white.svg" alt="ZH doc"/></a>
    <a href="README_UK.md"><img src="https://img.shields.io/badge/Українська-white.svg" alt="UK doc"/></a>
    <a href="docs/README_IN.md"><img src="https://img.shields.io/badge/Hindi-white.svg" alt="IN doc"/></a>
    <a href="../LICENSE"><img src="https://img.shields.io/static/v1?label=license&message=AGPL&color=white&style=flat" alt="License"/></a>
    <br>
    <br>
    <b>chạy mô hình ngôn ngữ trí tuệ nhân tạo trên máy tính của bạn.</b><br>
    Mã nguồn mở và ứng dụng phát triển dựa trên code của OpenAI.<br>
    <br><a href="https://openinterpreter.com">Quyền truy cập sớm dành cho máy tính cá nhân</a>‎ ‎ |‎ ‎ <b><a href="https://docs.openinterpreter.com/">Tài liệu đọc tham khảo</a></b><br>
</p>

<br>

![poster](https://github.com/OpenInterpreter/open-interpreter/assets/63927363/08f0d493-956b-4d49-982e-67d4b20c4b56)

<br>

```shell
pip install open-interpreter
```

```shell
interpreter
```

<br>

**Open Interpreter** Chạy LLMs trên máy tính cục bộ (Có thể sử dụng ngôn ngữ Python, Javascript, Shell, và nhiều hơn thế). Bạn có thể nói chuyện với Open Interpreter thông qua giao diện giống với ChatGPT ngay trên terminal của bạn bằng cách chạy lệnh `$ interpreter` sau khi tải thành công.

Các tính năng chung giao diện ngôn ngữ mang llại

- Tạo và chỉnh sửa ảnh, videos, PDF, vân vân...
- Điều khiển trình duyệt Chrome để tiến hành nghiên cứu
- Vẽ, làm sạch và phân tích các tập dữ liệu lớn (large datasets)
- ...vân vân.

**⚠️ Lưu ý: Bạn sẽ được yêu cầu phê duyệt mã trước khi chạy.**

<br>

## Thử nghiệm

https://github.com/OpenInterpreter/open-interpreter/assets/63927363/37152071-680d-4423-9af3-64836a6f7b60

#### Bản thử nghiệm có sẵn trên Google Colab:

[![Mở trong Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1WKmRXZgsErej2xUriKzxrEAXdxMSgWbb?usp=sharing)

#### Đi kèm với ứng dụng mẫu qua tương tác giọng nói (Lấy cảm hứng từ _Cô ấy_ (Giọng nữ)):

[![Mở trong Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1NojYGHDgxH6Y1G1oxThEBBb2AtyODBIK)

## Hướng dẫn khởi dộng ngắn

```shell
pip install open-interpreter
```

### Terminal

Sau khi cài đặt, chạy dòng lệnh `interpreter`:

```shell
interpreter
```

### Python

```python
from interpreter import interpreter

interpreter.chat("Vẽ giá cổ phiếu đã bình hoá của AAPL và META ") # Chạy trên 1 dòng lệnh
interpreter.chat() # Khởi động chat có khả năng tương tác
```

## So sánh Code Interpreter của ChatGPT

Bản phát hành của OpenAI [Code Interpreter](https://openai.com/blog/chatgpt-plugins#code-interpreter) sử dụng GPT-4 tăng khả năng hoàn thiện vấn đề thực tiễn với ChatGPT.

Tuy nhiên, dịch vụ của OpenAI được lưu trữ, mã nguồn đóng, và rất hạn chế:

- Không có truy cập Internet.
- [Số lượng gói cài đặt hỗ trỡ có sẵn giới hạn](https://wfhbrian.com/mastering-chatgpts-code-interpreter-list-of-python-packages/).
- tốc độ tải tối đa 100 MB , thời gian chạy giới hạn 120.0 giây .
- Trạng thái tin nhắn bị xoá kèm với các tệp và liên kết được tạo trước đó khi đóng môi trường lại.

---

Open Interpreter khắc phục những hạn chế này bằng cách chạy cục bộ trobộ môi trường máy tính của bạn. Nó có toàn quyền truy cập vào Internet, không bị hạn chế về thời gian hoặc kích thước tệp và có thể sử dụng bất kỳ gói hoặc thư viện nào.

Đây là sự kết hợp sức mạnh của mã nguồn của GPT-4 với tính linh hoạt của môi trường phát triển cục bộ của bạn.

## Dòng lệnh

**Update:** Cập nhật trình tạo lệnh (0.1.5) giới thiệu tính năng trực tuyến:

```python
message = "Chúng ta đang ở trên hệ điều hành nào?"

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

### Trò chuyện tương tác

Để tạo một cuộc trò chuyện tương tác từ terminal của bạn, chạy `interpreter` bằng dòng lệnh:

```shell
interpreter
```

hoặc `interpreter.chat()` từ file có đuôi .py :

```python
interpreter.chat()
```

**Bạn cũng có thể phát trực tuyến từng đoạn:**

```python
message = "Chúng ta đang chạy trên hệ điều hành nào?"

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

### Trò chuyện lập trình được

Để kiểm soát tốt hơn, bạn chuyển tin nhắn qua `.chat(message)`:

```python
interpreter.chat("Truyền phụ đề tới tất cả videos vào /videos.")

# ... Truyền đầu ra đến thiết bị đầu cuối của bạn (terminal) hoàn thành tác vụ ...

interpreter.chat("Nhìn đẹp đấy nhưng bạn có thể làm cho phụ đề lớn hơn được không?")

# ...
```

### Tạo một cuộc trò chuyện mới:

Trong Python, Open Interpreter ghi nhớ lịch sử hội thoại, nếu muốn bắt đầu lại từ đầu, bạn có thể cài thứ:

```python
interpreter.messages = []
```

### Lưu và khôi phục cuộc trò chuyện

`interpreter.chat()` trả về danh sách tin nhắn, có thể được sử dụng để tiếp tục cuộc trò chuyện với `interpreter.messages = messages`:

```python
messages = interpreter.chat("Tên của tôi là Killian.") # Lưu tin nhắn tới 'messages'
interpreter.messages = [] # Khởi động lại trình phiên dịch ("Killian" sẽ bị lãng quên)

interpreter.messages = messages # Tiếp tục cuộc trò chuyện từ 'messages' ("Killian" sẽ được ghi nhớ)
```

### Cá nhân hoá tin nhắn từ hệ thống

Bạn có thể kiếm tra và điều chỉnh tin nhắn hệ thống từ Optừ Interpreter để mở rộng chức năng của nó, thay đổi quyền, hoặc đưa cho nó nhiều ngữ cảnh hơn.

```python
interpreter.system_message += """
Chạy shell commands với -y để người dùng không phải xác nhận chúng.
"""
print(interpreter.system_message)
```

### Thay đổi mô hình ngôn ngữ

Open Interpreter sử dụng mô hình [LiteLLM](https://docs.litellm.ai/docs/providers/) để kết nối tới các mô hình ngôn ngữ được lưu trữ trước đó.

Bạn có thể thay đổi mô hình ngôn ngữ bằng cách thay đổi tham số mô hình:

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

Ở trong Python, đổi model bằng cách thay đổi đối tượng:

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

[Tìm tên chuỗi "mô hình" phù hợp cho mô hình ngôn ngữ của bạn ở đây.](https://docs.litellm.ai/docs/providers/)

### Chạy Open Interpreter trên máy cục bộ

Open Interpreter có thể sử dụng máy chủ tương thích với OpenAI để chạy các mô hình cục bộ. (LM Studio, jan.ai, ollama, v.v.)

Chỉ cần chạy `interpreter` với URL api_base của máy chủ suy luận của bạn (đối với LM studio, nó là `http://localhost:1234/v1` theo mặc định):

```vỏ
trình thông dịch --api_base "http://localhost:1234/v1" --api_key "fake_key"
```

Ngoài ra, bạn có thể sử dụng Llamafile mà không cần cài đặt bất kỳ phần mềm bên thứ ba nào chỉ bằng cách chạy

```vỏ
thông dịch viên --local
```

để biết hướng dẫn chi tiết hơn, hãy xem [video này của Mike Bird](https://www.youtube.com/watch?v=CEs51hGWuGU?si=cN7f6QhfT4edfG5H)

**Để chạy LM Studio ở chế độ nền.**

1. Tải [https://lmstudio.ai/](https://lmstudio.ai/) và khởi động.
2. Chọn một mô hình rồi nhấn **↓ Download**.
3. Nhấn vào nút **↔️** ở bên trái (dưới 💬).
4. Chọn mô hình của bạn ở phía trên, rồi nhấn chạy **Start Server**.

Một khi server chạy, bạn có thể bắt đầu trò chuyện với Open Interpreter.

> **Lưu ý:** Chế độ cục bộ chỉnh `context_window` của bạn tới 3000, và `max_tokens` của bạn tới 600. Nếu mô hình của bạn có các yêu cầu khác, thì hãy chỉnh các tham số thủ công (xem bên dưới).

#### Cửa sổ ngữ cảnh (Context Window), (Max Tokens)

Bạn có thể thay đổi `max_tokens` và `context_window` (ở trong các) of locally running models.

Ở chế độ cục bộ, các cửa sổ ngữ cảnh sẽ tiêu ít RAM hơn, vậy nên chúng tôi khuyến khích dùng cửa sổ nhỏ hơn (~1000) nếu như nó chạy không ổn định / hoặc nếu nó chậm. Đảm bảo rằng `max_tokens` ít hơn `context_window`.

```shell
interpreter --local --max_tokens 1000 --context_window 3000
```

### Chế độ sửa lỗi

Để giúp đóng góp kiểm tra Open Interpreter, thì chế độ `--verbose` hơi dài dòng.

Bạn có thể khởi động chế độ sửa lỗi bằng cách sử dụng cờ (`interpreter --verbose`), hoặc mid-chat:

```shell
$ interpreter
...
> %verbose true <- Khởi động chế độ gỡ lỗi

> %verbose false <- Tắt chế độ gỡ lỗi
```

### Lệnh chế độ tương tác

Trong chế độ tương tác, bạn có thể sử dụng những dòng lệnh sau để cải thiện trải nghiệm của mình. Đây là danh sách các dòng lệnh có sẵn:

**Các lệnh có sẵn:**

- `%verbose [true/false]`: Bật chế độ gỡ lỗi. Có hay không có `true` đều khởi động chế độ gỡ lỗi. Với `false` thì nó tắt chế độ gỡ lỗi.
- `%reset`: Khởi động lại toàn bộ phiên trò chuyện hiện tại.
- `%undo`: Xóa tin nhắn của người dùng trước đó và phản hồi của AI khỏi lịch sử tin nhắn.
- `%save_message [path]`: Lưu tin nhắn vào một đường dẫn JSON được xác định từ trước. Nếu không có đường dẫn nào được cung cấp, nó sẽ mặc định là `messages.json`.
- `%load_message [path]`: Tải tin nhắn từ một đường dẫn JSON được chỉ định. Nếu không có đường dẫn nào được cung cấp, nó sẽ mặc định là `messages.json`.
- `%tokens [prompt]`: (_Experimental_) Tính toán các token sẽ được gửi cùng với lời nhắc tiếp theo dưới dạng ngữ cảnh và hao tổn. Tùy chọn tính toán token và hao tổn ước tính của một `prompt` nếu được cung cấp. Dựa vào [hàm `cost_per_token()` của mô hình LiteLLM](https://docs.litellm.ai/docs/completion/token_usage#2-cost_per_token) để tính toán hao tổn.
- `%help`: Hiện lên trợ giúp cho cuộc trò chuyện.

### Cấu hình cài

Open Interpreter cho phép bạn thiết lập các tác vụ mặc định bằng cách sử dụng file `config.yaml`.

Điều này cung cấp một cách linh hoạt để định cấu hình trình thông dịch mà không cần thay đổi đối số dòng lệnh mỗi lần

Chạy lệnh sau để mở tệp cấu hình:

```
interpreter --config
```

#### Cấu hình cho nhiều tệp

Open Interpreter hỗ trợ nhiều file `config.yaml`, cho phép bạn dễ dàng chuyển đổi giữa các cấu hình thông qua lệnh `--config_file`.

**Chú ý**: `--config_file` chấp nhận tên tệp hoặc đường dẫn tệp. Tên tệp sẽ sử dụng thư mục cấu hình mặc định, trong khi đường dẫn tệp sẽ sử dụng đường dẫn đã chỉ định.

Để tạo hoặc chỉnh sửa cấu hình mới, hãy chạy:

```
interpreter --config --config_file $config_path
```

Để yêu cầu Open Interpreter chạy một tệp cấu hình cụ thể, hãy chạy:

```
interpreter --config_file $config_path
```

**Chú ý**: Thay đổi `$config_path` với tên hoặc đường dẫn đến tệp cấu hình của bạn.

##### Ví dụ CLI

1. Tạo mới một file `config.turbo.yaml`
   ```
   interpreter --config --config_file config.turbo.yaml
   ```
2. Chạy file `config.turbo.yaml`để đặt lại `model` thành `gpt-3.5-turbo`
3. Chạy Open Interpreter với cấu hình `config.turbo.yaml
   ```
   interpreter --config_file config.turbo.yaml
   ```

##### Ví dụ Python

Bạn cũng có thể tải các tệp cấu hình khi gọi Open Interpreter từ tập lệnh Python:

```python
import os
from interpreter import interpreter

currentPath = os.path.dirname(os.path.abspath(__file__))
config_path=os.path.join(currentPath, './config.test.yaml')

interpreter.extend_config(config_path=config_path)

message = "What operating system are we on?"

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

## Máy chủ FastAPI mẫu

Bản cập nhật trình tạo cho phép điều khiển Trình thông dịch mở thông qua các điểm cuối HTTP REST:

```python
# server.py

from fastapi import FastAPI
from fastapi.responses import StreamingResponse
from interpreter import interpreter

app = FastAPI()

@app.get("/chat")
def chat_endpoint(message: str):
    def event_stream():
        for result in interpreter.chat(message, stream=True):
            yield f"data: {result}\n\n"

    return StreamingResponse(event_stream(), media_type="text/event-stream")

@app.get("/history")
def history_endpoint():
    return interpreter.messages
```

```shell
pip install fastapi uvicorn
uvicorn server:app --reload
```

## Hướng dẫn an toàn

Vì mã được tạo được thực thi trong môi trường cục bộ của bạn nên nó có thể tương tác với các tệp và cài đặt hệ thống của bạn, có khả năng dẫn đến các kết quả không mong muốn như mất dữ liệu hoặc rủi ro bảo mật.

**⚠️ Open Interpreter sẽ yêu cầu xác nhận của người dùng trước khi chạy code.**

Bạn có thể chạy `interpreter -y` hoặc đặt `interpreter.auto_run = True` để bỏ qua xác nhận này, trong trường hợp đó:

- Hãy thận trọng khi yêu cầu các lệnh sửa đổi tệp hoặc cài đặt hệ thống.
- Theo dõi Open Interpreter giống như một chiếc ô tô tự lái và sẵn sàng kết thúc quá trình bằng cách đóng terminal của bạn.
- Cân nhắc việc chạy Open Interpreter trong môi trường bị hạn chế như Google Colab hoặc Replit. Những môi trường này biệt lập hơn, giảm thiểu rủi ro khi chạy code tùy ý.

Đây là hỗ trợ **thử nghiệm** cho [chế độ an toàn](docs/SAFE_MODE.md) giúp giảm thiểu rủi ro.

## Nó hoạt động thế nào?

Open Interpreter trang bị [mô hình ngôn ngữ gọi hàm](https://platform.openai.com/docs/guides/gpt/function-calling) với một hàm `exec()`, chấp nhận một `language` (như "Python" hoặc "JavaScript") và `code` để chạy.

Sau đó, chúng tôi truyền trực tuyến thông báo, mã của mô hình và kết quả đầu ra của hệ thống của bạn đến terminal dưới dạng Markdown.

# Đóng góp

Cảm ơn bạn đã quan tâm đóng góp! Chúng tôi hoan nghênh sự tham gia của cộng đồng.

Vui lòng xem [Hướng dẫn đóng góp](CONTRIBUTING.md) để biết thêm chi tiết cách tham gia.

## Giấy phép

Open Interpreter được cấp phép theo Giấy phép MIT. Bạn được phép sử dụng, sao chép, sửa đổi, phân phối, cấp phép lại và bán các bản sao của phần mềm.

**Lưu ý**: Phần mềm này không liên kết với OpenAI.

> Có quyền truy cập vào một lập trình viên cấp dưới làm việc nhanh chóng trong tầm tay bạn ... có thể khiến quy trình làm việc mới trở nên dễ dàng và hiệu quả, cũng như mở ra những lợi ích của việc lập trình cho người mới.
>
> — _Phát hành trình thông dịch mã của OpenAI_

<br>


================================================
FILE: docs/README_ZH.md
================================================
<h1 align="center">● Open Interpreter(开放解释器)</h1>

<p align="center">
    <a href="https://discord.gg/6p3fD6rBVm"><img alt="Discord" src="https://img.shields.io/discord/1146610656779440188?logo=discord&style=flat&logoColor=white"></a>
    <a href="README_JA.md"><img src="https://img.shields.io/badge/ドキュメント-日本語-white.svg" alt="JA doc"></a>
    <a href="README_ES.md"> <img src="https://img.shields.io/badge/Español-white.svg" alt="ES doc"/></a>
    <a href="README_UK.md"><img src="https://img.shields.io/badge/Українська-white.svg" alt="UK doc"/></a>
    <a href="README_IN.md"><img src="https://img.shields.io/badge/Hindi-white.svg" alt="IN doc"/></a>
    <a href="../README.md"><img src="https://img.shields.io/badge/english-document-white.svg" alt="EN doc"></a>
    <a href="../LICENSE"><img src="https://img.shields.io/static/v1?label=license&message=AGPL&color=white&style=flat" alt="License"/></a>
    <br>
    <br>
    <b>让语言模型在您的计算机上运行代码。</b><br>
    在本地实现的开源OpenAI的代码解释器。<br>
    <br><a href="https://openinterpreter.com">登记以提前获取Open Interpreter(开放解释器)桌面应用程序</a>‎ ‎ |‎ ‎ <b><a href="https://docs.openinterpreter.com/">阅读新文档</a></b><br>
</p>

<br>

![poster](https://github.com/OpenInterpreter/open-interpreter/assets/63927363/08f0d493-956b-4d49-982e-67d4b20c4b56)

<br>

```shell
pip install open-interpreter
```

```shell
interpreter
```

<br>

**Open Interpreter(开放解释器)** 可以让大语言模型(LLMs)在本地运行代码(比如 Python、JavaScript、Shell 等)。安装后,在终端上运行 `$ interpreter` 即可通过类似 ChatGPT 的界面与 Open Interpreter 聊天。

本软件为计算机的通用功能提供了一个自然语言界面,比如:

- 创建和编辑照片、视频、PDF 等
- 控制 Chrome 浏览器进行搜索
- 绘制、清理和分析大型数据集
- ...

**⚠️ 注意:在代码运行前都会要求您批准执行代码。**

<br>

## 演示

https://github.com/OpenInterpreter/open-interpreter/assets/63927363/37152071-680d-4423-9af3-64836a6f7b60

#### Google Colab 上也提供了交互式演示:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1WKmRXZgsErej2xUriKzxrEAXdxMSgWbb?usp=sharing)

## 快速开始

```shell
pip install open-interpreter
```

### 终端

安装后,运行 `interpreter`:

```shell
interpreter
```

### Python

```python
from interpreter import interpreter

interpreter.chat("Plot AAPL and META's normalized stock prices") # 执行单一命令
interpreter.chat() # 开始交互式聊天
```

## 与 ChatGPT 的代码解释器比较

OpenAI 发布的 [Code Interpreter](https://openai.com/blog/chatgpt-plugins#code-interpreter) 和 GPT-4 提供了一个与 ChatGPT 完成实际任务的绝佳机会。

但是,OpenAI 的服务是托管的,闭源的,并且受到严格限制:

- 无法访问互联网。
- [预装软件包数量有限](https://wfhbrian.com/mastering-chatgpts-code-interpreter-list-of-python-packages/)。
- 允许的最大上传为 100 MB,且最大运行时间限制为 120.0 秒
- 当运行环境中途结束时,之前的状态会被清除(包括任何生成的文件或链接)。

---

Open Interpreter(开放解释器)通过在本地环境中运行克服了这些限制。它可以完全访问互联网,不受运行时间或是文件大小的限制,也可以使用任何软件包或库。

它将 GPT-4 代码解释器的强大功能与本地开发环境的灵活性相结合。

## 命令

### 交互式聊天

要在终端中开始交互式聊天,从命令行运行 `interpreter`:

```shell
interpreter
```

或者从.py 文件中运行 `interpreter.chat()`:

```python
interpreter.chat()
```

### 程序化聊天

为了更精确的控制,您可以通过 `.chat(message)` 直接传递消息 :

```python
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 会记录历史对话。如果你想从头开始,可以进行重置:

```python
interpreter.messages = []
```

### 保存和恢复聊天

```python
messages = interpreter.chat("My name is Killian.") # 保存消息到 'messages'
interpreter.messages = [] # 重置解释器 ("Killian" 将被遗忘)

interpreter.messages = messages # 从 'messages' 恢复聊天 ("Killian" 将被记住)
```

### 自定义系统消息

你可以检查和配置 Open Interpreter 的系统信息,以扩展其功能、修改权限或赋予其更多上下文。

```python
interpreter.system_message += """
使用 -y 运行 shell 命令,这样用户就不必确认它们。
"""
print(interpreter.system_message)
```

### 更改模型

Open Interpreter 使用[LiteLLM](https://docs.litellm.ai/docs/providers/)连接到语言模型。

您可以通过设置模型参数来更改模型:

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

在 Python 环境下,您需要手动设置模型:

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

### 在本地运行 Open Interpreter(开放解释器)

```shell
interpreter --local
```

### 调试模式

为了帮助贡献者检查和调试 Open Interpreter,`--verbose` 模式提供了详细的日志。

您可以使用 `interpreter --verbose` 来激活调试模式,或者直接在终端输入:

```shell
$ interpreter
...
> %verbose true <- 开启调试模式

> %verbose false <- 关闭调试模式
```

## 安全提示

由于生成的代码是在本地环境中运行的,因此会与文件和系统设置发生交互,从而可能导致本地数据丢失或安全风险等意想不到的结果。

**⚠️ 所以在执行任何代码之前,Open Interpreter 都会询问用户是否运行。**

您可以运行 `interpreter -y` 或设置 `interpreter.auto_run = True` 来绕过此确认,此时:

- 在运行请求修改本地文件或系统设置的命令时要谨慎。
- 请像驾驶自动驾驶汽车一直握着方向盘一样留意 Open Interpreter,并随时做好通过关闭终端来结束进程的准备。
- 考虑在 Google Colab 或 Replit 等受限环境中运行 Open Interpreter 的主要原因是这些环境更加独立,从而降低执行任意代码导致出现问题的风险。

## 它是如何工作的?

Open Interpreter 为[函数调用语言模型](https://platform.openai.com/docs/guides/gpt/function-calling)配备了 `exec()` 函数,该函数接受 `编程语言`(如 "Python "或 "JavaScript")和要运行的 `代码`。

然后,它会将模型的信息、代码和系统的输出以 Markdown 的形式流式传输到终端。

# 作出贡献

感谢您对本项目参与的贡献!我们欢迎所有人贡献到本项目里面。

请参阅我们的 [贡献准则](CONTRIBUTING.md),了解如何参与贡献的更多详情。

## 规划图

若要预览 Open Interpreter 的未来,请查看[我们的路线图](https://github.com/OpenInterpreter/open-interpreter/blob/main/docs/ROADMAP.md) 。

**请注意**:此软件与 OpenAI 无关。

![thumbnail-ncu](https://github.com/OpenInterpreter/open-interpreter/assets/63927363/1b19a5db-b486-41fd-a7a1-fe2028031686)


================================================
FILE: docs/ROADMAP.md
================================================
# Roadmap

## Documentation
- [ ] Work with Mintlify to translate docs. How does Mintlify let us translate our documentation automatically? I know there's a way.
- [ ] Better comments throughout the package (they're like docs for contributors)
- [ ] Show how to replace interpreter.llm so you can use a custom llm

## New features
- [ ] Figure out how to get OI to answer to user input requests like python's `input()`. Do we somehow detect a delay in the output..? Is there some universal flag that TUIs emit when they expect user input? Should we do this semantically with embeddings, then ask OI to review it and respond..?
- [ ] Placeholder text that gives a compelling example OI request. Probably use `textual`
- [ ] Everything else `textual` offers, like could we make it easier to select text? Copy paste in and out? Code editing interface?
- [x] Let people turn off the active line highlighting
- [ ] Add a --plain flag which doesn't use rich, just prints stuff in plain text
- [ ] Use iPython stuff to track the active line, instead of inserting print statements, which makes debugging weird (From ChatGPT: For deeper insights into what's happening behind the scenes, including which line of code is being executed, you can increase the logging level of the IPython kernel. You can configure the kernel's logger to a more verbose setting, which logs each execution request. However, this requires modifying the kernel's startup settings, which might involve changing logging configurations in the IPython kernel source or when launching the kernel.)
- [ ] Let people edit the code OI writes. Could just open it in the user's preferred editor. Simple. [Full description of how to implement this here.](https://github.com/OpenInterpreter/open-interpreter/pull/830#issuecomment-1854989795)
- [ ] Display images in the terminal interface
- [ ] There should be a function that just renders messages to the terminal, so we can revive conversation navigator, and let people look at their conversations
- [ ] ^ This function should also render the last like 5 messages once input() is about to be run, so we don't get those weird stuttering `rich` artifacts
- [ ] Let OI use OI, add `interpreter.chat(async=True)` bool. OI can use this to open OI on a new thread
  - [ ] Also add `interpreter.await()` which waits for `interpreter.running` (?) to = False, and `interpreter.result()` which returns the last assistant messages content.
- [ ] Allow for limited functions (`interpreter.functions`) using regex
  - [ ] If `interpreter.functions != []`:
    - [ ] set `interpreter.computer.languages` to only use Python
    - [ ] Use regex to ensure the output of code blocks conforms to just using those functions + other python basics
- [ ] (Maybe) Allow for a custom embedding function (`interpreter.embed` or `computer.ai.embed`) which will let us do semantic search
- [ ] (Maybe) if a git is detected, switch to a mode that's good for developers, like showing nested file structure in dynamic system message, searching for relevant functions (use computer.files.search)
- [x] Allow for integrations somehow (you can replace interpreter.llm.completions with a wrapped completions endpoint for any kind of logging. need to document this tho)
  - [ ] Document this^
- [ ] Expand "safe mode" to have proper, simple Docker support, or maybe Cosmopolitan LibC
- [ ] Make it so core can be run elsewhere from terminal package — perhaps split over HTTP (this would make docker easier too)
- [ ] For OS mode, experiment with screenshot just returning active window, experiment with it just showing the changes, or showing changes in addition to the whole thing, etc. GAIA should be your guide

## Future-proofing

- [ ] Really good tests / optimization framework, to be run less frequently than Github actions tests
  - [x] Figure out how to run us on [GAIA](https://huggingface.co/gaia-benchmark)
    - [x] How do we just get the questions out of this thing?
    - [x] How do we assess whether or not OI has solved the task?
  - [ ] Loop over GAIA, use a different language model every time (use Replicate, then ask LiteLLM how they made their "mega key" to many different LLM providers)
  - [ ] Loop over that ↑ using a different prompt each time. Which prompt is best across all LLMs?
  - [ ] (For the NCU) might be good to use a Google VM with a display
  - [ ] (Future future) Use GPT-4 to assess each result, explaining each failure. Summarize. Send it all to GPT-4 + our prompt. Let it redesign the prompt, given the failures, rinse and repeat
- [ ] Stateless (as in, doesn't use the application directory) core python package. All `appdir` or `platformdirs` stuff should be only for the TUI
  - [ ] `interpreter.__dict__` = a dict derived from config is how the python package should be set, and this should be from the TUI. `interpreter` should not know about the config
  - [ ] Move conversation storage out of the core and into the TUI. When we exit or error, save messages same as core currently does
- [ ] Further split TUI from core (some utils still reach across)
- [ ] Better storage of different model keys in TUI / config file. All keys, to multiple providers, should be stored in there. Easy switching
  - [ ] Automatically migrate users from old config to new config, display a message of this
- [ ] On update, check for new system message and ask user to overwrite theirs, or only let users pass in "custom instructions" which adds to our system message
  - [ ] I think we could have a config that's like... system_message_version. If system_message_version is below the current version, ask the user if we can overwrite it with the default config system message of that version. (This somewhat exists now but needs to be robust)

# What's in our scope?

Open Interpreter contains two projects which support each other, whose scopes are as follows:

1. `core`, which is dedicated to figuring out how to get LLMs to safely control a computer. Right now, this means creating a real-time code execution environment that language models can operate.
2. `terminal_interface`, a text-only way for users to direct the code-running LLM running inside `core`. This includes functions for connecting the `core` to various local and hosted LLMs (which the `core` itself should not know about).

# What's not in our scope?

Our guiding philosophy is minimalism, so we have also decided to explicitly consider the following as **out of scope**:

1. Additional functions in `core` beyond running code.
2. More complex interactions with the LLM in `terminal_interface` beyond text (but file paths to more complex inputs, like images or video, can be included in that text).

---

This roadmap gets pretty rough from here. More like working notes.

# Working Notes

## \* Roughly, how to build `computer.browser`:

First I think we should have a part, like `computer.browser.ask(query)` which just hits up [perplexity](https://www.perplexity.ai/) for fast answers to questions.

Then we want these sorts of things:

- `browser.open(url)`
- `browser.screenshot()`
- `browser.click()`

It should actually be based closely on Selenium. Copy their API so the LLM knows it.

Other than that, basically should be = to the computer module itself, at least the IO / keyboard and mouse parts.

However, for non vision models, `browser.screenshot()` can return the accessibility tree, not an image. And for `browser.click(some text)` we can use the HTML to find that text.

**Here's how GPT suggests we implement the first steps of this:**

Creating a Python script that automates the opening of Chrome with the necessary flags and then interacts with it to navigate to a URL and retrieve the accessibility tree involves a few steps. Here's a comprehensive approach:

1. **Script to Launch Chrome with Remote Debugging**:

   - This script will start Chrome with the `--remote-debugging-port=9222` flag.
   - It will handle different platforms (Windows, macOS, Linux).

2. **Python Script for Automation**:
   - This script uses `pychrome` to connect to the Chrome instance, navigate to a URL, and retrieve the accessibility tree.

### Step 1: Launching Chrome with Remote Debugging

You'll need a script to launch Chrome. This script varies based on the operating system. Below is an example for Windows. You can adapt it for macOS or Linux by changing the path and command to start Chrome.

```python
import subprocess
import sys
import os

def launch_chrome():
    chrome_path = "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"  # Update this path for your system
    url = "http://localhost:9222/json/version"
    subprocess.Popen([chrome_path, '--remote-debugging-port=9222'], shell=True)
    print("Chrome launched with remote debugging on port 9222.")

if __name__ == "__main__":
    launch_chrome()
```

### Step 2: Python Script to Navigate and Retrieve Accessibility Tree

Next, you'll use `pychrome` to connect to this Chrome instance. Ensure you've installed `pychrome`:

```bash
pip install pychrome
```

Here's the Python script:

```python
import pychrome
import time

def get_accessibility_tree(tab):
    # Enable the Accessibility domain
    tab.call_method("Accessibility.enable")

    # Get the accessibility tree
    tree = tab.call_method("Accessibility.getFullAXTree")
    return tree

def main():
    # Create a browser instance
    browser = pychrome.Browser(url="http://127.0.0.1:9222")

    # Create a new tab
    tab = browser.new_tab()

    # Start the tab
    tab.start()

    # Navigate to a URL
    tab.set_url("https://www.example.com")
    time.sleep(3)  # Wait for page to load

    # Retrieve the accessibility tree
    accessibility_tree = get_accessibility_tree(tab)
    print(accessibility_tree)

    # Stop the tab (closes it)
    tab.stop()

    # Close the browser
    browser.close()

if __name__ == "__main__":
    main()
```

This script will launch Chrome, connect to it, navigate to "https://www.example.com", and then print the accessibility tree to the console.

**Note**: The script to launch Chrome assumes a typical installation path on Windows. You will need to modify this path according to your Chrome installation location and operating system. Additionally, handling different operating systems requires conditional checks and respective commands for each OS.


================================================
FILE: docs/SAFE_MODE.md
================================================
# Safe Mode

**⚠️ Safe mode is experimental and does not provide any guarantees of safety or security.**

Open Interpreter is working on providing an experimental safety toolkit to help you feel more confident running the code generated by Open Interpreter.

Install Open Interpreter with the safety toolkit dependencies as part of the bundle:

```shell
pip install open-interpreter[safe]
```

Alternatively, you can install the safety toolkit dependencies separately in your virtual environment:

```shell
pip install semgrep
```

## Features

- **No Auto Run**: Safe mode disables the ability to automatically execute code
- **Code Scanning**: Scan generated code for vulnerabilities with [`semgrep`](https://semgrep.dev/)

## Enabling Safe Mode

You can enable safe mode by passing the `--safe` flag when invoking `interpreter` or by configuring `safe_mode` in your [config file](https://github.com/OpenInterpreter/open-interpreter#configuration).

The safe mode setting has three options:

- `off`: disables the safety toolkit (_default_)
- `ask`: prompts you to confirm that you want to scan code
- `auto`: automatically scans code

### Example Config:

```yaml
model: gpt-4
temperature: 0
verbose: false
safe_mode: ask
```

## Roadmap

Some upcoming features that enable even more safety:

- [Execute code in containers](https://github.com/OpenInterpreter/open-interpreter/pull/459)

## Tips & Tricks

You can adjust the `system_message` in your [config file](https://github.com/OpenInterpreter/open-interpreter#configuration) to include instructions for the model to scan packages with [`guarddog`]() before installing them.

```yaml
model: gpt-4
verbose: false
safe_mode: ask
system_message: |
  # normal system message here
  BEFORE INSTALLING ANY PACKAGES WITH pip OR npm YOU MUST SCAN THEM WITH `guarddog` FIRST. Run `guarddog pypi scan $package` for pip packages and `guarddog npm scan $package` for npm packages. `guarddog` only accepts one package name at a time.
```


================================================
FILE: docs/SECURITY.md
================================================
# Open Interpreter Security Policy

We take security seriously. Responsible reporting and disclosure of security
vulnerabilities is important for the protection and privacy of our users. If you
discover any security vulnerabilities, please follow these guidelines.

Published security advisories are available on our [GitHub Security Advisories]
page.

To report a vulnerability, please draft a [new security advisory on GitHub]. Any
fields that you are unsure of or don't understand can be left at their default
values. The important part is that the vulnerability is reported. Once the
security advisory draft has been created, we will validate the vulnerability and
coordinate with you to fix it, release a patch, and responsibly disclose the
vulnerability to the public. Read GitHub's documentation on [privately reporting
a security vulnerability] for details.

Please do not report undisclosed vulnerabilities on public sites or forums,
including GitHub issues and pull requests. Reporting vulnerabilities to the
public could allow attackers to exploit vulnerable applications before we have
been able to release a patch and before applications have had time to install
the patch. Once we have released a patch and sufficient time has passed for
applications to install the patch, we will disclose the vulnerability to the
public, at which time you will be free to publish details of the vulnerability
on public sites and forums.

If you have a fix for a security vulnerability, please do not submit a GitHub
pull request. Instead, report the vulnerability as described in this policy.
Once we have verified the vulnerability, we can create a [temporary private
fork] to collaborate on a patch.

We appreciate your cooperation in helping keep our users safe by following this
policy.

[github security advisories]: https://github.com/OpenInterpreter/open-interpreter/security/advisories
[new security advisory on github]: https://github.com/OpenInterpreter/open-interpreter/security/advisories/new
[privately reporting a security vulnerability]: https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability
[temporary private fork]: https://docs.github.com/en/code-security/security-advisories/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability


================================================
FILE: docs/code-execution/computer-api.mdx
================================================
---
title: Computer API
---

The following functions are designed for language models to use in Open Interpreter, currently only supported in [OS Mode](/guides/os-mode/).

### Display - View

Takes a screenshot of the primary display.



```python
interpreter.computer.display.view()
```



### Display - Center

Gets the x, y value of the center of the screen.



```python
x, y = interpreter.computer.display.center()
```



### Keyboard - Hotkey

Performs a hotkey on the computer



```python
interpreter.computer.keyboard.hotkey(" ", "command")
```



### Keyboard - Write

Writes the text into the currently focused window.



```python
interpreter.computer.keyboard.write("hello")
```



### Mouse - Click

Clicks on the specified coordinates, or an icon, or text. If text is specified, OCR will be run on the screenshot to find the text coordinates and click on it.



```python
# Click on coordinates
interpreter.computer.mouse.click(x=100, y=100)

# Click on text on the screen
interpreter.computer.mouse.click("Onscreen Text")

# Click on a gear icon
interpreter.computer.mouse.click(icon="gear icon")
```



### Mouse - Move

Moves to the specified coordinates, or an icon, or text. If text is specified, OCR will be run on the screenshot to find the text coordinates and move to it.



```python
# Click on coordinates
interpreter.computer.mouse.move(x=100, y=100)

# Click on text on the screen
interpreter.computer.mouse.move("Onscreen Text")

# Click on a gear icon
interpreter.computer.mouse.move(icon="gear icon")
```



### Mouse - Scroll

Scrolls the mouse a specified number of pixels.



```python
# Scroll Down
interpreter.computer.mouse.scroll(-10)

# Scroll Up
interpreter.computer.mouse.scroll(10)
```



### Clipboard - View

Returns the contents of the clipboard.



```python
interpreter.computer.clipboard.view()
```



### OS - Get Selected Text

Get the selected text on the screen.



```python
interpreter.computer.os.get_selected_text()
```



### Mail - Get

Retrieves the last `number` emails from the inbox, optionally filtering for only unread emails. (Mac only)



```python
interpreter.computer.mail.get(number=10, unread=True)
```



### Mail - Send

Sends an email with the given parameters using the default mail app. (Mac only)



```python
interpreter.computer.mail.send("john@email.com", "Subject", "Body", ["path/to/attachment.pdf", "path/to/attachment2.pdf"])
```



### Mail - Unread Count

Retrieves the count of unread emails in the inbox. (Mac only)



```python
interpreter.computer.mail.unread_count()
```



### SMS - Send

Send a text message using the default SMS app. (Mac only)



```python
interpreter.computer.sms.send("2068675309", "Hello from Open Interpreter!")
```



### Contacts - Get Phone Number

Returns the phone number of a contact name. (Mac only)



```python
interpreter.computer.contacts.get_phone_number("John Doe")
```



### Contacts - Get Email Address

Returns the email of a contact name. (Mac only)



```python
interpreter.computer.contacts.get_phone_number("John Doe")
```



### Calendar - Get Events

Fetches calendar events for the given date or date range from all calendars. (Mac only)



```python
interpreter.computer.calendar.get_events(start_date=datetime, end_date=datetime)
```



### Calendar - Create Event

Creates a new calendar event. Uses first calendar if none is specified (Mac only)



```python
interpreter.computer.calendar.create_event(title="Title", start_date=datetime, end_date=datetime, location="Location", notes="Notes", calendar="Work")
```



### Calendar - Delete Event

Delete a specific calendar event. (Mac only)



```python
interpreter.computer.calendar.delete_event(event_title="Title", start_date=datetime, calendar="Work")
```





================================================
FILE: docs/code-execution/custom-languages.mdx
================================================
---
title: Custom Languages
---

You can add or edit the programming languages that Open Interpreter's computer runs.

In this example, we'll swap out the `python` language for a version of `python` that runs in the cloud. We'll use `E2B` to do this.

([`E2B`](https://e2b.dev/) is a secure, sandboxed environment where you can run arbitrary code.)

First, [get an API key here](https://e2b.dev/), and set it:

```python
import os
os.environ["E2B_API_KEY"] = "<your_api_key_here>"
```

Then, define a custom language for Open Interpreter. The class name doesn't matter, but we'll call it `PythonE2B`:

```python
import e2b

class PythonE2B:
    """
    This class contains all requirements for being a custom language in Open Interpreter:

    - name (an attribute)
    - run (a method)
    - stop (a method)
    - terminate (a method)

    You can use this class to run any language you know how to run, or edit any of the official languages (which also conform to this class).

    Here, we'll use E2B to power the `run` method.
    """

    # This is the name that will appear to the LLM.
    name = "python"

    # Optionally, you can append some information about this language to the system message:
    system_message = "# Follow this rule: Every Python code block MUST contain at least one print statement."

    # (E2B isn't a Jupyter Notebook, so we added ^ this so it would print things,
    # instead of putting variables at the end of code blocks, which is a Jupyter thing.)

    def run(self, code):
        """Generator that yields a dictionary in LMC Format."""

        # Run the code on E2B
        stdout, stderr = e2b.run_code('Python3', code)

        # Yield the output
        yield {
            "type": "console", "format": "output",
            "content": stdout + stderr # We combined these arbitrarily. Yield anything you'd like!
        }

    def stop(self):
        """Stops the code."""
        # Not needed here, because e2b.run_code isn't stateful.
        pass

    def terminate(self):
        """Terminates the entire process."""
        # Not needed here, because e2b.run_code isn't stateful.
        pass

# (Tip: Do this before adding/removing languages, otherwise OI might retain the state of previous languages:)
interpreter.computer.terminate()

# Give Open Interpreter its languages. This will only let it run PythonE2B:
interpreter.computer.languages = [PythonE2B]

# Try it out!
interpreter.chat("What's 349808*38490739?")
```

================================================
FILE: docs/code-execution/settings.mdx
================================================
---
title: Settings
---

The `interpreter.computer` is responsible for executing code.

[Click here](https://docs.openinterpreter.com/settings/all-settings#computer) to view `interpreter.computer` settings.


================================================
FILE: docs/code-execution/usage.mdx
================================================
---
title: Usage
---

# Running Code

The `computer` itself is separate from Open Interpreter's core, so you can run it independently:

```python
from interpreter import interpreter

interpreter.computer.run("python", "print('Hello World!')")
```

This runs in the same Python instance that interpreter uses, so you can define functions, variables, or log in to services before the AI starts running code:

```python
interpreter.computer.run("python", "import replicate\nreplicate.api_key='...'")

interpreter.custom_instructions = "Replicate has already been imported."

interpreter.chat("Please generate an image on replicate...") # Interpreter will be logged into Replicate
```

# Custom Languages

You also have control over the `computer`'s languages (like Python, Javascript, and Shell), and can easily append custom languages:

<Card
  title="Custom Languages"
  icon="code"
  iconType="solid"
  href="/code-execution/custom-languages/"
>
  Add or customize the programming languages that Open Interpreter can use.
</Card>

================================================
FILE: docs/computer/custom-languages.mdx
================================================


================================================
FILE: docs/computer/introduction.mdx
================================================
The Computer module is responsible for executing code.

You can manually execute code in the same instance that Open Interpreter uses:

```

```

User Usage

It also comes with a suite of modules that we think are particularly useful to code interpreting LLMs.

LLM Usage

================================================
FILE: docs/computer/language-model-usage.mdx
================================================
Open Interpreter can use the Computer module itself.

Here's what it can do:

================================================
FILE: docs/computer/user-usage.mdx
================================================
The Computer module is responsible for running code.

You can add custom languages to it.

The user can add custom languages to the Computer, and .run code on it.

================================================
FILE: docs/getting-started/introduction.mdx
================================================
---
title: Introduction
description: A new way to use computers
---

# <div class="hidden">Introduction</div>

<img src="https://openinterpreter.com/assets/banner.jpg" alt="thumbnail" style={{transform: "translateY(-1.25rem)"}} />

**Open Interpreter** lets language models run code.

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.

<br/>

<Info>You can also build Open Interpreter into your applications with [our Python package.](/usage/python/arguments)</Info>

---

<h1><span class="font-semibold">Quick start</span></h1>

If you already use Python, you can install Open Interpreter via `pip`:

<Steps>
  <Step title="Install" icon={"arrow-down"} iconType={"solid"}>
```bash
pip install open-interpreter
```
  </Step>
  <Step title="Use" icon={"circle"} iconType={"solid"}>
```bash
interpreter
```
  </Step>
</Steps>

We've also developed [one-line installers](/getting-started/setup#experimental-one-line-installers) that install Python and set up Open Interpreter.


================================================
FILE: docs/getting-started/setup.mdx
================================================
---
title: Setup
---

<iframe
  width="560"
  height="315"
  src="https://www.youtube.com/embed/5sk3t8ilDR8"
  frameBorder="0"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
  allowFullScreen
></iframe>

## Installation from `pip`

If you are familiar with Python, we recommend installing Open Interpreter via `pip`

```bash
pip install open-interpreter
```

<Info>
  You'll need Python
  [3.10](https://www.python.org/downloads/release/python-3100/) or
  [3.11](https://www.python.org/downloads/release/python-3110/). Run `python
  --version` to check yours.

It is recommended to install Open Interpreter in a [virtual
environment](https://docs.python.org/3/library/venv.html).

</Info>

## Install optional dependencies from `pip`

Open Interpreter has optional dependencies for different capabilities

[Local Mode](/guides/running-locally) dependencies

```bash
pip install open-interpreter[local]
```

[OS Mode](/guides/os-mode) dependencies

```bash
pip install open-interpreter[os]
```

[Safe Mode](/safety/safe-mode) dependencies

```bash
pip install open-interpreter[safe]
```

Server dependencies

```bash
pip install open-interpreter[server]
```

## Experimental one-line installers

To try our experimental installers, open your Terminal with admin privileges [(click here to learn how)](https://chat.openai.com/share/66672c0f-0935-4c16-ac96-75c1afe14fe3), then paste the following commands:

<CodeGroup>

```bash Mac
curl -sL https://raw.githubusercontent.com/openinterpreter/open-interpreter/main/installers/oi-mac-installer.sh | bash
```

```powershell Windows
iex "& {$(irm https://raw.githubusercontent.com/openinterpreter/open-interpreter/main/installers/oi-windows-installer-conda.ps1)}"
```

```bash Linux
curl -sL https://raw.githubusercontent.com/openinterpreter/open-interpreter/main/installers/oi-linux-installer.sh | bash
```

</CodeGroup>

These installers will attempt to download Python, set up an environment, and install Open Interpreter for you.

## No Installation

If configuring your computer environment is challenging, you can press the `,` key on the [GitHub page](https://github.com/OpenInterpreter/open-interpreter) 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.


================================================
FILE: docs/guides/advanced-terminal-usage.mdx
================================================
---
title: Advanced Terminal Usage
---

Magic commands can be used to control the interpreter's behavior in interactive mode:

- `%% [shell commands, like ls or cd]`: Run commands in Open Interpreter's shell instance
- `%verbose [true/false]`: Toggle verbose mode. Without arguments or with 'true', it enters verbose mode. With 'false', it exits verbose mode.
- `%reset`: Reset the current session.
- `%undo`: Remove previous messages and its response from the message history.
- `%save_message [path]`: Saves messages to a specified JSON path. If no path is provided, it defaults to 'messages.json'.
- `%load_message [path]`: Loads messages from a specified JSON path. If no path is provided, it defaults to 'messages.json'.
- `%tokens [prompt]`: EXPERIMENTAL: Calculate the tokens used by the next request based on the current conversation's messages and estimate the cost of that request; optionally provide a prompt to also calculate the tokens used by that prompt and the total amount of tokens that will be sent with the next request.
- `%info`: Show system and interpreter information.
- `%help`: Show this help message.
- `%jupyter`: Export the current session to a Jupyter notebook file (.ipynb) to the Downloads folder.
- `%markdown [path]`: Export the conversation to a specified Markdown path. If no path is provided, it will be saved to the Downloads folder with a generated conversation name.

================================================
FILE: docs/guides/basic-usage.mdx
================================================
---
title: Basic Usage
---

<CardGroup>

<Card
  title="Interactive demo"
  icon="gamepad-modern"
  iconType="solid"
  href="https://colab.research.google.com/drive/1WKmRXZgsErej2xUriKzxrEAXdxMSgWbb?usp=sharing"
>
  Try Open Interpreter without installing anything on your computer
</Card>

<Card
  title="Example voice interface"
  icon="circle"
  iconType="solid"
  href="https://colab.research.google.com/drive/1NojYGHDgxH6Y1G1oxThEBBb2AtyODBIK"
>
  An example implementation of Open Interpreter's streaming capabilities
</Card>

</CardGroup>

---

### Interactive Chat

To start an interactive chat in your terminal, either run `interpreter` from the command line or `interpreter.chat()` from a .py file.

<CodeGroup>

```shell Terminal
interpreter
```

```python Python
interpreter.chat()
```

</CodeGroup>

---

### Programmatic Chat

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

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

# ... Displays output in your terminal, completes task ...

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

# ...
```

---

### Start a New Chat

In your terminal, Open Interpreter behaves like ChatGPT and will not remember previous conversations. Simply run `interpreter` to start a new chat.

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

<CodeGroup>

```shell Terminal
interpreter
```

```python Python
interpreter.messages = []
```

</CodeGroup>

---

### Save and Restore Chats

In your terminal, Open Interpreter will save previous conversations to `<your application directory>/Open Interpreter/conversations/`.

You can resume any of them by running `--conversations`. Use your arrow keys to select one , then press `ENTER` to resume it.

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

<CodeGroup>

```shell Terminal
interpreter --conversations
```

```python Python
# Save messages to 'messages'
messages = interpreter.chat("My name is Killian.")

# Reset interpreter ("Killian" will be forgotten)
interpreter.messages = []

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

</CodeGroup>

---

### Configure Default Settings

We save default settings to the `default.yaml` profile which can be opened and edited by running the following command:

```shell
interpreter --profiles
```

You can use this to set your default language model, system message (custom instructions), max budget, etc.

<Info>
  **Note:** The Python library will also inherit settings from the default
  profile file. You can change it by running `interpreter --profiles` and
  editing `default.yaml`.
</Info>

---

### Customize System Message

In your terminal, modify the system message by [editing your configuration file as described here](#configure-default-settings).

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

```python
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](https://docs.litellm.ai/docs/providers/) to connect to language models.

You can change the model by setting the model parameter:

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

In Python, set the model on the object:

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

[Find the appropriate "model" string for your language model here.](https://docs.litellm.ai/docs/providers/)


================================================
FILE: docs/guides/demos.mdx
================================================
---
title: Demos
---

### Vision Mode

#### Recreating a Tailwind Component

Creating a dropdown menu in Tailwind from a single screenshot:

<iframe src="data:text/html;charset=utf-8,%0A%3Cblockquote%20class%3D%22twitter-tweet%22%20data-media-max-width%3D%22560%22%3E%0A%20%20%20%20%3Cp%20lang%3D%22en%22%20dir%3D%22ltr%22%3Ewe%26%2339%3Bve%20literally%20been%20flying%20blind%20until%20now%3Cbr%3E%3Cbr%3E%0A%20%20%20%20%24%20interpreter%20--vision%3Cbr%3E%0A%20%20%20%20%26gt%3B%20Recreate%20this%20component%20in%20Tailwind%20CSS%3Cbr%3E%3Cbr%3E%0A%20%20%20%20%28this%20is%20realtime%29%20%3Ca%20href%3D%22https%3A//t.co/PyVm11mclF%22%3Epic.twitter.com/PyVm11mclF%3C/a%3E%0A%20%20%20%20%3C/p%3E%26mdash%3B%20killian%20%28%40hellokillian%29%20%0A%20%20%20%20%3Ca%20href%3D%22https%3A//twitter.com/hellokillian/status/1723106008061587651%3Fref_src%3Dtwsrc%255Etfw%22%3ENovember%2010%2C%202023%3C/a%3E%0A%3C/blockquote%3E%20%0A%3Cscript%20async%20src%3D%22https%3A//platform.twitter.com/widgets.js%22%20charset%3D%22utf-8%22%3E%3C/script%3E%0A" width="100%" height="500"></iframe>

#### Recreating the ChatGPT interface using GPT-4V:

<iframe src="data:text/html;charset=utf-8,%0A%3Cblockquote%20class%3D%22twitter-tweet%22%20data-media-max-width%3D%22560%22%3E%0A%20%20%20%20%3Cp%20lang%3D%22en%22%20dir%3D%22ltr%22%3EOpen%20Interpreter%20%2B%20Vision%20-%20with%20the%20self-improving%20feedback%20loop%20is%20%F0%9F%91%8C%20%3Cbr%3E%3Cbr%3E%0A%20%20%20%20Here%20is%20how%20it%20iterates%20to%20recreate%20the%20ChatGPT%20UI%20%F0%9F%A4%AF%3Cbr%3E%3Cbr%3E%0A%20%20%20%20%284x%20speedup%29%20%3Ca%20href%3D%22https%3A//t.co/HphKMOWBiB%22%3Epic.twitter.com/HphKMOWBiB%3C/a%3E%0A%20%20%20%20%3C/p%3E%26mdash%3B%20chilang%20%28%40chilang%29%20%0A%20%20%20%20%3Ca%20href%3D%22https%3A//twitter.com/chilang/status/1724577200135897255%3Fref_src%3Dtwsrc%255Etfw%22%3ENovember%2014%2C%202023%3C/a%3E%0A%3C/blockquote%3E%20%0A%3Cscript%20async%20src%3D%22https%3A//platform.twitter.com/widgets.js%22%20charset%3D%22utf-8%22%3E%3C/script%3E%0A" width="100%" height="500"></iframe>

### OS Mode

#### Playing Music

Open Interpreter playing some Lofi using OS mode:

<iframe width="560" height="315" src="https://www.youtube.com/embed/-n8qYi5HhO8?si=huEpYFBEwotBIMMs" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

#### Open Interpreter Chatting with Open Interpreter

OS mode creating and chatting with a local instance of Open Interpreter:

<iframe src="data:text/html;charset=utf-8,%0A%3Cblockquote%20class%3D%22twitter-tweet%22%20data-media-max-width%3D%22560%22%3E%0A%20%20%20%20%3Cp%20lang%3D%22en%22%20dir%3D%22ltr%22%3EComputer-operating%20AI%20can%20replicate%20itself%20onto%20other%20systems.%20%F0%9F%A4%AF%3Cbr%3E%3Cbr%3E%0A%20%20%20%20Open%20Interpreter%20uses%20my%20mouse%20and%20keyboard%20to%20start%20a%20local%20instance%20of%20itself%3A%20%0A%20%20%20%20%3Ca%20href%3D%22https%3A//t.co/1BZWRA4FMn%22%3Epic.twitter.com/1BZWRA4FMn%3C/a%3E%3C/p%3E%26mdash%3B%20Ty%20%28%40FieroTy%29%20%0A%20%20%20%20%3Ca%20href%3D%22https%3A//twitter.com/FieroTy/status/1746639975234560101%3Fref_src%3Dtwsrc%255Etfw%22%3EJanuary%2014%2C%202024%3C/a%3E%0A%3C/blockquote%3E%20%0A%3Cscript%20async%20src%3D%22https%3A//platform.twitter.com/widgets.js%22%20charset%3D%22utf-8%22%3E%3C/script%3E%0A" width="100%" height="500"></iframe>

#### Controlling an Arduino

Reading temperature and humidity from an Arudino:

<iframe src="data:text/html;charset=utf-8,%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cblockquote%20class%3D%22twitter-tweet%22%20data-media-max-width%3D%22560%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cp%20lang%3D%22en%22%20dir%3D%22ltr%22%3EThis%20time%20I%20showed%20it%20an%20image%20of%20a%20temp%20sensor%2C%20LCD%20%26amp%3B%20Arduino.%3Cbr%3E%3Cbr%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20And%20it%20wrote%20a%20program%20to%20read%20the%20temperature%20%26amp%3B%20humidity%20from%20the%20sensor%20%26amp%3B%20show%20it%20on%20the%20LCD%20%F0%9F%A4%AF%3Cbr%3E%3Cbr%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Still%20blown%20away%20by%20how%20good%20%40hellokillian%27s%20Open%20Interpreter%20is%21%3Cbr%3E%3Cbr%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20p.s.%20-%20ignore%20the%20cat%20fight%20in%20the%20background%20%3Ca%20href%3D%22https%3A//t.co/tG9sSdkfD5%22%3Ehttps%3A//t.co/tG9sSdkfD5%3C/a%3E%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ca%20href%3D%22https%3A//t.co/B6sH4absff%22%3Epic.twitter.com/B6sH4absff%3C/a%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C/p%3E%26mdash%3B%20Vindiw%20Wijesooriya%20%28%40vindiww%29%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ca%20href%3D%22https%3A//twitter.com/vindiww/status/1744252926321942552%3Fref_src%3Dtwsrc%255Etfw%22%3EJanuary%208%2C%202024%3C/a%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C/blockquote%3E%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cscript%20async%20src%3D%22https%3A//platform.twitter.com/widgets.js%22%20charset%3D%22utf-8%22%3E%3C/script%3E%0A%20%20%20%20%20%20%20%20" width="100%" height="500"></iframe>

#### Music Creation

OS mode using Logic Pro X to record a piano song and play it back:

<iframe src="data:text/html;charset=utf-8,%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cblockquote%20class%3D%22twitter-tweet%22%20data-media-max-width%3D%22560%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cp%20lang%3D%22en%22%20dir%3D%22ltr%22%3Eit%27s%20not%20quite%20Mozart%2C%20but...%3Cbr%3E%3Cbr%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this%20is%20Open%20Interpreter%20firing%20up%20Logic%20Pro%20to%20write/record%20a%20song%21%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ca%20href%3D%22https%3A//t.co/vPHpPvjk4b%22%3Epic.twitter.com/vPHpPvjk4b%3C/a%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C/p%3E%26mdash%3B%20Ty%20%28%40FieroTy%29%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ca%20href%3D%22https%3A//twitter.com/FieroTy/status/1744203268451111035%3Fref_src%3Dtwsrc%255Etfw%22%3EJanuary%208%2C%202024%3C/a%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C/blockquote%3E%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cscript%20async%20src%3D%22https%3A//platform.twitter.com/widgets.js%22%20charset%3D%22utf-8%22%3E%3C/script%3E%0A%20%20%20%20%20%20%20%20" width="100%" height="500"></iframe>

#### Generating images in Everart.ai

Open Interpreter describing pictures it wants to make, then creating them using OS mode:

<iframe src="data:text/html;charset=utf-8,%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cblockquote%20class%3D%22twitter-tweet%22%20data-media-max-width%3D%22560%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cp%20lang%3D%22en%22%20dir%3D%22ltr%22%3EThis%20is%20wild.%20I%20gave%20OS%20control%20to%20GPT-4%20via%20the%20latest%20update%20of%20Open%20Interpreter%20and%20now%20it%27s%20generating%20pictures%20it%20wants%20to%20see%20in%20%40everartai%20%F0%9F%A4%AF%3Cbr%3E%3Cbr%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20GPT%20is%20controlling%20the%20mouse%20and%20adding%20text%20in%20the%20fields%2C%20I%20am%20not%20doing%20anything.%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ca%20href%3D%22https%3A//t.co/hGgML9epEc%22%3Epic.twitter.com/hGgML9epEc%3C/a%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C/p%3E%26mdash%3B%20Pietro%20Schirano%20%28%40skirano%29%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ca%20href%3D%22https%3A//twitter.com/skirano/status/1747670816437735836%3Fref_src%3Dtwsrc%255Etfw%22%3EJanuary%2017%2C%202024%3C/a%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C/blockquote%3E%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cscript%20async%20src%3D%22https%3A//platform.twitter.com/widgets.js%22%20charset%3D%22utf-8%22%3E%3C/script%3E%0A%20%20%20%20%20%20%20%20" width="100%" height="500"></iframe>

#### Open Interpreter Conversing With ChatGPT

OS mode has a conversation with ChatGPT and even asks it "What do you think about human/AI interaction?"

<iframe src="data:text/html;charset=utf-8,%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cblockquote%20class%3D%22twitter-tweet%22%20data-media-max-width%3D%22560%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cp%20lang%3D%22en%22%20dir%3D%22ltr%22%3EWatch%20GPT%20Vision%20with%20control%20over%20my%20OS%20talking%20to%20ChatGPT.%3Cbr%3E%3Cbr%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20The%20most%20fascinating%20part%20is%20that%20it%27s%20intrigued%20by%20having%20a%20conversation%20with%20another%20%22similar.%22%3Cbr%3E%3Cbr%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22What%20do%20you%20think%20about%20human/AI%20interaction%3F%22%20it%20asked.%3Cbr%3E%3Cbr%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Also%2C%20the%20superhuman%20speed%20at%20which%20it%20types%2C%20lol%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ca%20href%3D%22https%3A//t.co/ViffvDK5H9%22%3Epic.twitter.com/ViffvDK5H9%3C/a%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C/p%3E%26mdash%3B%20Pietro%20Schirano%20%28%40skirano%29%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ca%20href%3D%22https%3A//twitter.com/skirano/status/1747772471770583190%3Fref_src%3Dtwsrc%255Etfw%22%3EJanuary%2018%2C%202024%3C/a%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C/blockquote%3E%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cscript%20async%20src%3D%22https%3A//platform.twitter.com/widgets.js%22%20charset%3D%22utf-8%22%3E%3C/script%3E%0A%20%20%20%20%20%20%20%20" width="100%" height="500"></iframe>

#### Sending an Email with Gmail

OS mode launches Safari, composes an email, and sends it:

<iframe src="data:text/html;charset=utf-8,%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cblockquote%20class%3D%22twitter-tweet%22%20data-media-max-width%3D%22560%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cp%20lang%3D%22en%22%20dir%3D%22ltr%22%3ELook%20ma%2C%20no%20hands%21%20This%20is%20%40OpenInterpreter%20using%20my%20mouse%20and%20keyboard%20to%20send%20an%20email.%20%3Cbr%3E%3Cbr%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Imagine%20what%20else%20is%20possible.%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ca%20href%3D%22https%3A//t.co/GcBqbTwD23%22%3Epic.twitter.com/GcBqbTwD23%3C/a%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C/p%3E%26mdash%3B%20Ty%20%28%40FieroTy%29%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ca%20href%3D%22https%3A//twitter.com/FieroTy/status/1743437525207928920%3Fref_src%3Dtwsrc%255Etfw%22%3EJanuary%206%2C%202024%3C/a%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C/blockquote%3E%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cscript%20async%20src%3D%22https%3A//platform.twitter.com/widgets.js%22%20charset%3D%22utf-8%22%3E%3C/script%3E%0A%20%20%20%20%20%20%20%20" width="100%" height="500"></iframe>


=======================================
Download .txt
gitextract_u72n0w4c/

├── .devcontainer/
│   ├── DockerFile
│   └── devcontainer.json
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.yml
│   │   ├── config.yml
│   │   └── feature_request.yml
│   ├── pull_request_template.md
│   └── workflows/
│       ├── potential-duplicates.yml
│       └── python-package.yml
├── .gitignore
├── .pre-commit-config.yaml
├── Dockerfile
├── LICENSE
├── README.md
├── docs/
│   ├── CONTRIBUTING.md
│   ├── NCU_MIGRATION_GUIDE.md
│   ├── README_DE.md
│   ├── README_ES.md
│   ├── README_IN.md
│   ├── README_JA.md
│   ├── README_UK.md
│   ├── README_VN.md
│   ├── README_ZH.md
│   ├── ROADMAP.md
│   ├── SAFE_MODE.md
│   ├── SECURITY.md
│   ├── assets/
│   │   └── .DS-Store
│   ├── code-execution/
│   │   ├── computer-api.mdx
│   │   ├── custom-languages.mdx
│   │   ├── settings.mdx
│   │   └── usage.mdx
│   ├── computer/
│   │   ├── custom-languages.mdx
│   │   ├── introduction.mdx
│   │   ├── language-model-usage.mdx
│   │   └── user-usage.mdx
│   ├── getting-started/
│   │   ├── introduction.mdx
│   │   └── setup.mdx
│   ├── guides/
│   │   ├── advanced-terminal-usage.mdx
│   │   ├── basic-usage.mdx
│   │   ├── demos.mdx
│   │   ├── multiple-instances.mdx
│   │   ├── os-mode.mdx
│   │   ├── profiles.mdx
│   │   ├── running-locally.mdx
│   │   └── streaming-response.mdx
│   ├── integrations/
│   │   ├── docker.mdx
│   │   └── e2b.mdx
│   ├── language-models/
│   │   ├── custom-models.mdx
│   │   ├── hosted-models/
│   │   │   ├── ai21.mdx
│   │   │   ├── anthropic.mdx
│   │   │   ├── anyscale.mdx
│   │   │   ├── aws-sagemaker.mdx
│   │   │   ├── azure.mdx
│   │   │   ├── baseten.mdx
│   │   │   ├── cloudflare.mdx
│   │   │   ├── cohere.mdx
│   │   │   ├── deepinfra.mdx
│   │   │   ├── gpt-4-setup.mdx
│   │   │   ├── huggingface.mdx
│   │   │   ├── mistral-api.mdx
│   │   │   ├── nlp-cloud.mdx
│   │   │   ├── openai.mdx
│   │   │   ├── openrouter.mdx
│   │   │   ├── palm.mdx
│   │   │   ├── perplexity.mdx
│   │   │   ├── petals.mdx
│   │   │   ├── replicate.mdx
│   │   │   ├── togetherai.mdx
│   │   │   ├── vertex-ai.mdx
│   │   │   └── vllm.mdx
│   │   ├── introduction.mdx
│   │   ├── local-models/
│   │   │   ├── best-practices.mdx
│   │   │   ├── custom-endpoint.mdx
│   │   │   ├── janai.mdx
│   │   │   ├── llamafile.mdx
│   │   │   ├── lm-studio.mdx
│   │   │   └── ollama.mdx
│   │   └── settings.mdx
│   ├── legal/
│   │   └── license.mdx
│   ├── mint.json
│   ├── protocols/
│   │   ├── i-protocol.mdx
│   │   └── lmc-messages.mdx
│   ├── safety/
│   │   ├── best-practices.mdx
│   │   ├── introduction.mdx
│   │   ├── isolation.mdx
│   │   └── safe-mode.mdx
│   ├── server/
│   │   └── usage.mdx
│   ├── settings/
│   │   ├── all-settings.mdx
│   │   ├── example-profiles.mdx
│   │   └── profiles.mdx
│   ├── style.css
│   ├── telemetry/
│   │   └── telemetry.mdx
│   ├── troubleshooting/
│   │   └── faq.mdx
│   └── usage/
│       ├── desktop/
│       │   ├── help.md
│       │   └── install.mdx
│       ├── examples.mdx
│       ├── python/
│       │   ├── arguments.mdx
│       │   ├── budget-manager.mdx
│       │   ├── conversation-history.mdx
│       │   ├── magic-commands.mdx
│       │   ├── multiple-instances.mdx
│       │   └── settings.mdx
│       └── terminal/
│           ├── arguments.mdx
│           ├── budget-manager.mdx
│           ├── magic-commands.mdx
│           ├── settings.mdx
│           └── vision.mdx
├── examples/
│   ├── Dockerfile
│   ├── JARVIS.ipynb
│   ├── Open_Interpreter_Demo.ipynb
│   ├── README.md
│   ├── custom_tool.ipynb
│   ├── interactive_quickstart.py
│   ├── jan_computer_control.ipynb
│   ├── local3.ipynb
│   ├── local_server.ipynb
│   ├── organize_photos.ipynb
│   ├── screenpipe.ipynb
│   └── talk_to_your_database.ipynb
├── installers/
│   ├── oi-linux-installer.sh
│   ├── oi-mac-installer.sh
│   ├── oi-windows-installer-conda.ps1
│   └── oi-windows-installer.ps1
├── interpreter/
│   ├── __init__.py
│   ├── computer_use/
│   │   ├── __init__.py
│   │   ├── loop.py
│   │   ├── tools/
│   │   │   ├── __init__.py
│   │   │   ├── base.py
│   │   │   ├── bash.py
│   │   │   ├── collection.py
│   │   │   ├── computer.py
│   │   │   ├── edit.py
│   │   │   └── run.py
│   │   └── unused_markdown.py
│   ├── core/
│   │   ├── __init__.py
│   │   ├── archived_server_1.py
│   │   ├── archived_server_2.py
│   │   ├── async_core.py
│   │   ├── computer/
│   │   │   ├── __init__.py
│   │   │   ├── ai/
│   │   │   │   ├── __init__.py
│   │   │   │   └── ai.py
│   │   │   ├── browser/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── browser.py
│   │   │   │   └── browser_next.py
│   │   │   ├── calendar/
│   │   │   │   ├── __init__.py
│   │   │   │   └── calendar.py
│   │   │   ├── clipboard/
│   │   │   │   ├── __init__.py
│   │   │   │   └── clipboard.py
│   │   │   ├── computer.py
│   │   │   ├── contacts/
│   │   │   │   ├── __init__.py
│   │   │   │   └── contacts.py
│   │   │   ├── display/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── display.py
│   │   │   │   └── point/
│   │   │   │       └── point.py
│   │   │   ├── docs/
│   │   │   │   ├── __init__.py
│   │   │   │   └── docs.py
│   │   │   ├── files/
│   │   │   │   ├── __init__.py
│   │   │   │   └── files.py
│   │   │   ├── keyboard/
│   │   │   │   ├── __init__.py
│   │   │   │   └── keyboard.py
│   │   │   ├── mail/
│   │   │   │   ├── __init__.py
│   │   │   │   └── mail.py
│   │   │   ├── mouse/
│   │   │   │   ├── __init__.py
│   │   │   │   └── mouse.py
│   │   │   ├── os/
│   │   │   │   ├── __init__.py
│   │   │   │   └── os.py
│   │   │   ├── skills/
│   │   │   │   └── skills.py
│   │   │   ├── sms/
│   │   │   │   ├── __init__.py
│   │   │   │   └── sms.py
│   │   │   ├── terminal/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── base_language.py
│   │   │   │   ├── languages/
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   ├── applescript.py
│   │   │   │   │   ├── html.py
│   │   │   │   │   ├── java.py
│   │   │   │   │   ├── javascript.py
│   │   │   │   │   ├── jupyter_language.py
│   │   │   │   │   ├── powershell.py
│   │   │   │   │   ├── python.py
│   │   │   │   │   ├── r.py
│   │   │   │   │   ├── react.py
│   │   │   │   │   ├── ruby.py
│   │   │   │   │   ├── shell.py
│   │   │   │   │   └── subprocess_language.py
│   │   │   │   └── terminal.py
│   │   │   ├── utils/
│   │   │   │   ├── computer_vision.py
│   │   │   │   ├── get_active_window.py
│   │   │   │   ├── html_to_png_base64.py
│   │   │   │   ├── recipient_utils.py
│   │   │   │   └── run_applescript.py
│   │   │   └── vision/
│   │   │       ├── __init__.py
│   │   │       └── vision.py
│   │   ├── core.py
│   │   ├── default_system_message.py
│   │   ├── llm/
│   │   │   ├── __init__.py
│   │   │   ├── llm.py
│   │   │   ├── run_function_calling_llm.py
│   │   │   ├── run_text_llm.py
│   │   │   ├── run_tool_calling_llm.py
│   │   │   └── utils/
│   │   │       ├── convert_to_openai_messages.py
│   │   │       ├── merge_deltas.py
│   │   │       └── parse_partial_json.py
│   │   ├── render_message.py
│   │   ├── respond.py
│   │   └── utils/
│   │       ├── __init__.py
│   │       ├── lazy_import.py
│   │       ├── scan_code.py
│   │       ├── system_debug_info.py
│   │       ├── telemetry.py
│   │       ├── temporary_file.py
│   │       └── truncate_output.py
│   └── terminal_interface/
│       ├── __init__.py
│       ├── components/
│       │   ├── base_block.py
│       │   ├── code_block.py
│       │   └── message_block.py
│       ├── contributing_conversations.py
│       ├── conversation_navigator.py
│       ├── local_setup.py
│       ├── magic_commands.py
│       ├── profiles/
│       │   ├── defaults/
│       │   │   ├── assistant.py
│       │   │   ├── aws-docs.py
│       │   │   ├── bedrock-anthropic.py
│       │   │   ├── cerebras.py
│       │   │   ├── codestral-few-shot.py
│       │   │   ├── codestral-os.py
│       │   │   ├── codestral-vision.py
│       │   │   ├── codestral.py
│       │   │   ├── default.yaml
│       │   │   ├── e2b.py
│       │   │   ├── fast.yaml
│       │   │   ├── gemma2.py
│       │   │   ├── groq.py
│       │   │   ├── llama3-os.py
│       │   │   ├── llama3-vision.py
│       │   │   ├── llama3.py
│       │   │   ├── llama31-database.py
│       │   │   ├── local-assistant.py
│       │   │   ├── local-os.py
│       │   │   ├── local.py
│       │   │   ├── obsidian.py
│       │   │   ├── os.py
│       │   │   ├── qwen.py
│       │   │   ├── screenpipe.py
│       │   │   ├── snowpark.yml
│       │   │   ├── template_profile.py
│       │   │   ├── the01.py
│       │   │   └── vision.yaml
│       │   ├── historical_profiles.py
│       │   └── profiles.py
│       ├── render_past_conversation.py
│       ├── start_terminal_interface.py
│       ├── terminal_interface.py
│       ├── utils/
│       │   ├── check_for_package.py
│       │   ├── check_for_update.py
│       │   ├── cli_input.py
│       │   ├── count_tokens.py
│       │   ├── display_markdown_message.py
│       │   ├── display_output.py
│       │   ├── export_to_markdown.py
│       │   ├── find_image_path.py
│       │   ├── get_conversations.py
│       │   ├── in_jupyter_notebook.py
│       │   ├── local_storage_path.py
│       │   └── oi_dir.py
│       └── validate_llm_settings.py
├── pyproject.toml
├── scripts/
│   └── wtf.py
└── tests/
    ├── config.test.yaml
    ├── core/
    │   ├── computer/
    │   │   ├── files/
    │   │   │   └── test_files.py
    │   │   └── test_computer.py
    │   └── test_async_core.py
    └── test_interpreter.py
Download .txt
SYMBOL INDEX (536 symbols across 94 files)

FILE: interpreter/__init__.py
  function print_markdown (line 8) | def print_markdown(message):
  function check_for_update (line 35) | def check_for_update():

FILE: interpreter/computer_use/loop.py
  function print_markdown (line 56) | def print_markdown(message):
  class APIProvider (line 80) | class APIProvider(StrEnum):
  function sampling_loop (line 113) | async def sampling_loop(
  function _maybe_filter_to_n_most_recent_images (line 239) | def _maybe_filter_to_n_most_recent_images(
  function _make_api_tool_result (line 288) | def _make_api_tool_result(
  function _maybe_prepend_system_tool_result (line 324) | def _maybe_prepend_system_tool_result(result: ToolResult, result_text: s...
  function main (line 330) | async def main():
  function run_async_main (line 522) | def run_async_main():
  function check_mouse_position (line 544) | def check_mouse_position():
  class ChatMessage (line 566) | class ChatMessage(BaseModel):
  class ChatCompletionRequest (line 571) | class ChatCompletionRequest(BaseModel):

FILE: interpreter/computer_use/tools/base.py
  class BaseAnthropicTool (line 8) | class BaseAnthropicTool(metaclass=ABCMeta):
    method __call__ (line 12) | def __call__(self, **kwargs) -> Any:
    method to_params (line 17) | def to_params(
  class ToolResult (line 24) | class ToolResult:
    method __bool__ (line 32) | def __bool__(self):
    method __add__ (line 35) | def __add__(self, other: "ToolResult"):
    method replace (line 52) | def replace(self, **kwargs):
  class CLIResult (line 57) | class CLIResult(ToolResult):
  class ToolFailure (line 61) | class ToolFailure(ToolResult):
  class ToolError (line 65) | class ToolError(Exception):
    method __init__ (line 68) | def __init__(self, message):

FILE: interpreter/computer_use/tools/bash.py
  class _BashSession (line 10) | class _BashSession:
    method __init__ (line 21) | def __init__(self):
    method start (line 25) | async def start(self):
    method stop (line 41) | def stop(self):
    method run (line 49) | async def run(self, command: str):
  class BashTool (line 119) | class BashTool(BaseAnthropicTool):
    method __init__ (line 129) | def __init__(self):
    method __call__ (line 133) | async def __call__(
    method to_params (line 153) | def to_params(self) -> BetaToolBash20241022Param:

FILE: interpreter/computer_use/tools/collection.py
  class ToolCollection (line 10) | class ToolCollection:
    method __init__ (line 13) | def __init__(self, *tools: BaseAnthropicTool):
    method to_params (line 17) | def to_params(
    method run (line 22) | async def run(self, *, name: str, tool_input: dict[str, Any]) -> ToolR...

FILE: interpreter/computer_use/tools/computer.py
  class Resolution (line 41) | class Resolution(TypedDict):
  class ScalingSource (line 55) | class ScalingSource(StrEnum):
  class ComputerToolOptions (line 60) | class ComputerToolOptions(TypedDict):
  function chunks (line 66) | def chunks(s: str, chunk_size: int) -> list[str]:
  function smooth_move_to (line 70) | def smooth_move_to(x, y, duration=1.2):
  class ComputerTool (line 94) | class ComputerTool(BaseAnthropicTool):
    method options (line 110) | def options(self) -> ComputerToolOptions:
    method to_params (line 120) | def to_params(self) -> BetaToolComputerUse20241022Param:
    method __init__ (line 123) | def __init__(self):
    method __call__ (line 128) | async def __call__(
    method screenshot (line 222) | async def screenshot(self):
    method shell (line 247) | async def shell(self, command: str, take_screenshot=True) -> ToolResult:
    method scale_coordinates (line 259) | def scale_coordinates(self, source: ScalingSource, x: int, y: int):

FILE: interpreter/computer_use/tools/edit.py
  class EditTool (line 20) | class EditTool(BaseAnthropicTool):
    method __init__ (line 31) | def __init__(self):
    method to_params (line 35) | def to_params(self) -> BetaToolTextEditor20241022Param:
    method __call__ (line 41) | async def __call__(
    method validate_path (line 105) | def validate_path(self, command: str, path: Path):
    method view (line 131) | async def view(self, path: Path, view_range: list[int] | None = None):
    method str_replace (line 178) | def str_replace(self, path: Path, old_str: str, new_str: str | None):
    method insert (line 226) | def insert(self, path: Path, insert_line: int, new_str: str):
    method undo_edit (line 265) | def undo_edit(self, path: Path):
    method read_file (line 277) | def read_file(self, path: Path):
    method write_file (line 284) | def write_file(self, path: Path, file: str):
    method _make_output (line 291) | def _make_output(

FILE: interpreter/computer_use/tools/run.py
  function maybe_truncate (line 9) | def maybe_truncate(content: str, truncate_after: int | None = MAX_RESPON...
  function run (line 18) | async def run(

FILE: interpreter/computer_use/unused_markdown.py
  class Style (line 6) | class Style(Enum):
  class MarkdownStreamer (line 15) | class MarkdownStreamer:
    method __init__ (line 16) | def __init__(self):
    method write_char (line 36) | def write_char(self, char: str):
    method handle_marker (line 48) | def handle_marker(self, char: str) -> bool:
    method handle_horizontal_rule (line 104) | def handle_horizontal_rule(self, char: str) -> bool:
    method handle_line_start (line 123) | def handle_line_start(self, char: str) -> bool:
    method feed (line 152) | def feed(self, char: str):
    method reset (line 182) | def reset(self):

FILE: interpreter/core/archived_server_1.py
  function server (line 11) | def server(interpreter, host="0.0.0.0", port=8000):

FILE: interpreter/core/archived_server_2.py
  class Settings (line 29) | class Settings(BaseModel):
  class AsyncInterpreter (line 35) | class AsyncInterpreter:
    method __init__ (line 36) | def __init__(self, interpreter):
    method _add_to_queue (line 69) | async def _add_to_queue(self, queue, item):
    method clear_queue (line 72) | async def clear_queue(self, queue):
    method clear_input_queue (line 76) | async def clear_input_queue(self):
    method clear_output_queue (line 79) | async def clear_output_queue(self):
    method input (line 82) | async def input(self, chunk):
    method add_to_output_queue_sync (line 106) | def add_to_output_queue_sync(self, chunk):
    method run (line 112) | async def run(self):
    method output (line 191) | async def output(self):
  function server (line 195) | def server(interpreter, port=8000):  # Default port is 8000 if not speci...

FILE: interpreter/core/async_core.py
  class AsyncInterpreter (line 44) | class AsyncInterpreter(OpenInterpreter):
    method __init__ (line 45) | def __init__(self, *args, **kwargs):
    method input (line 65) | async def input(self, chunk):
    method output (line 105) | async def output(self):
    method respond (line 110) | def respond(self, run_code=None):
    method accumulate (line 209) | def accumulate(self, chunk):
  function authenticate_function (line 279) | def authenticate_function(key):
  function create_router (line 297) | def create_router(async_interpreter):
  class Server (line 951) | class Server:
    method __init__ (line 955) | def __init__(self, async_interpreter, host=None, port=None):
    method host (line 984) | def host(self):
    method host (line 988) | def host(self, value):
    method port (line 993) | def port(self):
    method port (line 997) | def port(self, value):
    method run (line 1001) | def run(self, host=None, port=None, retries=5):

FILE: interpreter/core/computer/ai/ai.py
  function split_into_chunks (line 6) | def split_into_chunks(text, tokens, llm, overlap):
  function chunk_responses (line 22) | def chunk_responses(responses, tokens, llm):
  function fast_llm (line 80) | def fast_llm(llm, system_message, user_message):
  function query_map_chunks (line 93) | def query_map_chunks(chunks, llm, query):
  function query_reduce_chunks (line 102) | def query_reduce_chunks(responses, llm, chunk_size, query):
  class Ai (line 116) | class Ai:
    method __init__ (line 117) | def __init__(self, computer):
    method chat (line 120) | def chat(self, text, base64=None):
    method query (line 167) | def query(self, text, query, custom_reduce_query=None):
    method summarize (line 189) | def summarize(self, text):

FILE: interpreter/core/computer/browser/browser.py
  class Browser (line 13) | class Browser:
    method __init__ (line 14) | def __init__(self, computer):
    method driver (line 19) | def driver(self, headless=False):
    method driver (line 25) | def driver(self, value):
    method search (line 28) | def search(self, query):
    method fast_search (line 38) | def fast_search(self, query):
    method setup (line 65) | def setup(self, headless):
    method go_to_url (line 79) | def go_to_url(self, url):
    method search_google (line 84) | def search_google(self, query, delays=True):
    method analyze_page (line 99) | def analyze_page(self, intent):
    method quit (line 159) | def quit(self):

FILE: interpreter/core/computer/browser/browser_next.py
  function setup_driver (line 14) | def setup_driver():
  function fetch_page_text (line 29) | def fetch_page_text(url):
  function get_google_search_results (line 37) | def get_google_search_results(query):

FILE: interpreter/core/computer/calendar/calendar.py
  class Calendar (line 23) | class Calendar:
    method __init__ (line 24) | def __init__(self, computer):
    method get_events (line 29) | def get_events(self, start_date=datetime.date.today(), end_date=None):
    method create_event (line 161) | def create_event(
    method delete_event (line 216) | def delete_event(
    method get_first_calendar (line 281) | def get_first_calendar(self) -> str:

FILE: interpreter/core/computer/clipboard/clipboard.py
  class Clipboard (line 7) | class Clipboard:
    method __init__ (line 8) | def __init__(self, computer):
    method view (line 16) | def view(self):
    method copy (line 22) | def copy(self, text=None):
    method paste (line 31) | def paste(self):

FILE: interpreter/core/computer/computer.py
  class Computer (line 22) | class Computer:
    method __init__ (line 23) | def __init__(self, interpreter):
    method languages (line 81) | def languages(self):
    method languages (line 85) | def languages(self, value):
    method _get_all_computer_tools_list (line 88) | def _get_all_computer_tools_list(self):
    method _get_all_computer_tools_signature_and_description (line 107) | def _get_all_computer_tools_signature_and_description(self):
    method _extract_tool_info (line 124) | def _extract_tool_info(self, tool):
    method run (line 187) | def run(self, *args, **kwargs):
    method exec (line 193) | def exec(self, code):
    method stop (line 200) | def stop(self):
    method terminate (line 206) | def terminate(self):
    method screenshot (line 212) | def screenshot(self, *args, **kwargs):
    method view (line 218) | def view(self, *args, **kwargs):
    method to_dict (line 224) | def to_dict(self):
    method load_dict (line 234) | def load_dict(self, data_dict):

FILE: interpreter/core/computer/contacts/contacts.py
  class Contacts (line 6) | class Contacts:
    method __init__ (line 7) | def __init__(self, computer):
    method get_phone_number (line 10) | def get_phone_number(self, contact_name):
    method get_email_address (line 45) | def get_email_address(self, contact_name):
    method get_full_names_from_first_name (line 71) | def get_full_names_from_first_name(self, first_name):

FILE: interpreter/core/computer/display/display.py
  class Display (line 46) | class Display:
    method __init__ (line 47) | def __init__(self, computer):
    method width (line 56) | def width(self):
    method height (line 62) | def height(self):
    method size (line 67) | def size(self):
    method center (line 73) | def center(self):
    method info (line 79) | def info(self):
    method view (line 85) | def view(
    method screenshot (line 107) | def screenshot(
    method find (line 216) | def find(self, description, screenshot=None):
    method find_text (line 277) | def find_text(self, text, screenshot=None):
    method get_text_as_list_of_lists (line 309) | def get_text_as_list_of_lists(self, screenshot=None):
  function take_screenshot_to_pil (line 342) | def take_screenshot_to_pil(screen=0, combine_screens=True):
  function get_displays (line 441) | def get_displays():

FILE: interpreter/core/computer/display/point/point.py
  function take_screenshot_to_pil (line 27) | def take_screenshot_to_pil(filename="temp_screenshot.png"):
  function point (line 45) | def point(description, screenshot=None, debug=False, hashes=None):
  function find_icon (line 52) | def find_icon(description, screenshot=None, debug=False, hashes=None):
  function embed_images (line 481) | def embed_images(images: List[Image.Image], model, transforms):
  function image_search (line 504) | def image_search(query, icons, hashes, debug):
  function get_element_boxes (line 551) | def get_element_boxes(image_data, debug):

FILE: interpreter/core/computer/docs/docs.py
  class Docs (line 9) | class Docs:
    method __init__ (line 10) | def __init__(self, computer):
    method search (line 13) | def search(self, query, module=None, paths=None):

FILE: interpreter/core/computer/files/files.py
  class Files (line 8) | class Files:
    method __init__ (line 9) | def __init__(self, computer):
    method search (line 12) | def search(self, *args, **kwargs):
    method edit (line 18) | def edit(self, path, original_text, replacement_text):
  function get_close_matches_in_text (line 39) | def get_close_matches_in_text(original_text, filedata, n=3):

FILE: interpreter/core/computer/keyboard/keyboard.py
  class Keyboard (line 11) | class Keyboard:
    method __init__ (line 14) | def __init__(self, computer):
    method write (line 17) | def write(self, text, interval=None, delay=0.30, **kwargs):
    method press (line 59) | def press(self, *args, presses=1, interval=0.1):
    method press_and_release (line 71) | def press_and_release(self, *args, presses=1, interval=0.1):
    method hotkey (line 79) | def hotkey(self, *args, interval=0.1):
    method down (line 117) | def down(self, key):
    method up (line 125) | def up(self, key):

FILE: interpreter/core/computer/mail/mail.py
  class Mail (line 9) | class Mail:
    method __init__ (line 10) | def __init__(self, computer):
    method get (line 15) | def get(self, number=5, unread: bool = False):
    method send (line 61) | def send(self, to, subject, body, attachments=None):
    method unread_count (line 109) | def unread_count(self):
    method calculate_upload_delay (line 136) | def calculate_upload_delay(self, attachments):
    method format_path_for_applescript (line 151) | def format_path_for_applescript(self, file_path):

FILE: interpreter/core/computer/mouse/mouse.py
  class Mouse (line 20) | class Mouse:
    method __init__ (line 21) | def __init__(self, computer):
    method scroll (line 24) | def scroll(self, clicks):
    method position (line 30) | def position(self):
    method move (line 44) | def move(self, *args, x=None, y=None, icon=None, text=None, screenshot...
    method click (line 230) | def click(self, *args, button="left", clicks=1, interval=0.1, **kwargs):
    method double_click (line 238) | def double_click(self, *args, button="left", interval=0.1, **kwargs):
    method triple_click (line 246) | def triple_click(self, *args, button="left", interval=0.1, **kwargs):
    method right_click (line 254) | def right_click(self, *args, **kwargs):
    method down (line 262) | def down(self):
    method up (line 268) | def up(self):
  function smooth_move_to (line 279) | def smooth_move_to(x, y, duration=2):

FILE: interpreter/core/computer/os/os.py
  class Os (line 5) | class Os:
    method __init__ (line 6) | def __init__(self, computer):
    method get_selected_text (line 9) | def get_selected_text(self):
    method notify (line 23) | def notify(self, text):

FILE: interpreter/core/computer/skills/skills.py
  class Skills (line 23) | class Skills:
    method __init__ (line 41) | def __init__(self, computer):
    method list (line 46) | def list(self):
    method run (line 68) | def run(self, skill):
    method search (line 77) | def search(self, query):
    method import_skills (line 100) | def import_skills(self):
  class NewSkill (line 157) | class NewSkill:
    method __init__ (line 158) | def __init__(self, skills):
    method create (line 162) | def create(self):
    method name (line 177) | def name(self):
    method name (line 181) | def name(self, value):
    method add_step (line 200) | def add_step(self, step, code):
    method save (line 219) | def save(self):

FILE: interpreter/core/computer/sms/sms.py
  class SMS (line 10) | class SMS:
    method __init__ (line 11) | def __init__(self, computer):
    method resolve_database_path (line 18) | def resolve_database_path(self):
    method send (line 29) | def send(self, to, message):
    method get (line 43) | def get(self, contact=None, limit=10, substring=None):
    method can_access_database (line 106) | def can_access_database(self):
    method prompt_full_disk_access (line 113) | def prompt_full_disk_access(self):

FILE: interpreter/core/computer/terminal/base_language.py
  class BaseLanguage (line 1) | class BaseLanguage:
    method run (line 17) | def run(self, code):
    method stop (line 26) | def stop(self):
    method terminate (line 32) | def terminate(self):

FILE: interpreter/core/computer/terminal/languages/applescript.py
  class AppleScript (line 6) | class AppleScript(SubprocessLanguage):
    method __init__ (line 10) | def __init__(self):
    method preprocess_code (line 14) | def preprocess_code(self, code):
    method add_active_line_indicators (line 35) | def add_active_line_indicators(self, code):
    method detect_active_line (line 50) | def detect_active_line(self, line):
    method detect_end_of_execution (line 58) | def detect_end_of_execution(self, line):

FILE: interpreter/core/computer/terminal/languages/html.py
  class HTML (line 5) | class HTML(BaseLanguage):
    method __init__ (line 9) | def __init__(self):
    method run (line 12) | def run(self, code):

FILE: interpreter/core/computer/terminal/languages/java.py
  class Java (line 10) | class Java(SubprocessLanguage):
    method __init__ (line 14) | def __init__(self):
    method preprocess_code (line 18) | def preprocess_code(self, code):
    method line_postprocessor (line 21) | def line_postprocessor(self, line):
    method detect_active_line (line 25) | def detect_active_line(self, line):
    method detect_end_of_execution (line 30) | def detect_end_of_execution(self, line):
    method run (line 33) | def run(self, code):
  function preprocess_java (line 128) | def preprocess_java(code):

FILE: interpreter/core/computer/terminal/languages/javascript.py
  class JavaScript (line 6) | class JavaScript(SubprocessLanguage):
    method __init__ (line 10) | def __init__(self):
    method preprocess_code (line 14) | def preprocess_code(self, code):
    method line_postprocessor (line 17) | def line_postprocessor(self, line):
    method detect_active_line (line 29) | def detect_active_line(self, line):
    method detect_end_of_execution (line 34) | def detect_end_of_execution(self, line):
  function preprocess_javascript (line 38) | def preprocess_javascript(code):

FILE: interpreter/core/computer/terminal/languages/jupyter_language.py
  class JupyterLanguage (line 36) | class JupyterLanguage(BaseLanguage):
    method __init__ (line 41) | def __init__(self, computer):
    method terminate (line 85) | def terminate(self):
    method run (line 89) | def run(self, code):
    method _execute_code (line 133) | def _execute_code(self, code, message_queue):
    method detect_active_line (line 306) | def detect_active_line(self, line):
    method _capture_output (line 320) | def _capture_output(self, message_queue):
    method stop (line 353) | def stop(self):
    method preprocess_code (line 356) | def preprocess_code(self, code):
  function preprocess_python (line 360) | def preprocess_python(code):
  function add_active_line_prints (line 389) | def add_active_line_prints(code):
  class AddLinePrints (line 414) | class AddLinePrints(ast.NodeTransformer):
    method insert_print_statement (line 420) | def insert_print_statement(self, line_number):
    method process_body (line 430) | def process_body(self, body):
    method visit (line 445) | def visit(self, node):
  function wrap_in_try_except (line 467) | def wrap_in_try_except(code):
  function string_to_python (line 507) | def string_to_python(code_as_string):

FILE: interpreter/core/computer/terminal/languages/powershell.py
  class PowerShell (line 8) | class PowerShell(SubprocessLanguage):
    method __init__ (line 12) | def __init__(self):
    method preprocess_code (line 23) | def preprocess_code(self, code):
    method line_postprocessor (line 26) | def line_postprocessor(self, line):
    method detect_active_line (line 29) | def detect_active_line(self, line):
    method detect_end_of_execution (line 34) | def detect_end_of_execution(self, line):
  function preprocess_powershell (line 38) | def preprocess_powershell(code):
  function add_active_line_prints (line 56) | def add_active_line_prints(code):
  function wrap_in_try_catch (line 67) | def wrap_in_try_catch(code):

FILE: interpreter/core/computer/terminal/languages/python.py
  class Python (line 11) | class Python(JupyterLanguage):

FILE: interpreter/core/computer/terminal/languages/r.py
  class R (line 6) | class R(SubprocessLanguage):
    method __init__ (line 10) | def __init__(self):
    method preprocess_code (line 14) | def preprocess_code(self, code):
    method line_postprocessor (line 46) | def line_postprocessor(self, line):
    method detect_active_line (line 67) | def detect_active_line(self, line):
    method detect_end_of_execution (line 72) | def detect_end_of_execution(self, line):

FILE: interpreter/core/computer/terminal/languages/react.py
  function is_incompatible (line 29) | def is_incompatible(code):
  class React (line 43) | class React(BaseLanguage):
    method run (line 49) | def run(self, code):

FILE: interpreter/core/computer/terminal/languages/ruby.py
  class Ruby (line 6) | class Ruby(SubprocessLanguage):
    method __init__ (line 10) | def __init__(self):
    method preprocess_code (line 14) | def preprocess_code(self, code):
    method line_postprocessor (line 45) | def line_postprocessor(self, line):
    method detect_active_line (line 54) | def detect_active_line(self, line):
    method detect_end_of_execution (line 59) | def detect_end_of_execution(self, line):

FILE: interpreter/core/computer/terminal/languages/shell.py
  class Shell (line 8) | class Shell(SubprocessLanguage):
    method __init__ (line 13) | def __init__(
    method preprocess_code (line 24) | def preprocess_code(self, code):
    method line_postprocessor (line 27) | def line_postprocessor(self, line):
    method detect_active_line (line 30) | def detect_active_line(self, line):
    method detect_end_of_execution (line 35) | def detect_end_of_execution(self, line):
  function preprocess_shell (line 39) | def preprocess_shell(code):
  function add_active_line_prints (line 61) | def add_active_line_prints(code):
  function has_multiline_commands (line 72) | def has_multiline_commands(script_text):

FILE: interpreter/core/computer/terminal/languages/subprocess_language.py
  class SubprocessLanguage (line 12) | class SubprocessLanguage(BaseLanguage):
    method __init__ (line 13) | def __init__(self):
    method detect_active_line (line 20) | def detect_active_line(self, line):
    method detect_end_of_execution (line 23) | def detect_end_of_execution(self, line):
    method line_postprocessor (line 26) | def line_postprocessor(self, line):
    method preprocess_code (line 29) | def preprocess_code(self, code):
    method terminate (line 38) | def terminate(self):
    method start_process (line 44) | def start_process(self):
    method run (line 73) | def run(self, code):
    method handle_stream_output (line 140) | def handle_stream_output(self, stream, is_error_stream):

FILE: interpreter/core/computer/terminal/terminal.py
  class Terminal (line 33) | class Terminal:
    method __init__ (line 34) | def __init__(self, computer):
    method sudo_install (line 50) | def sudo_install(self, package):
    method get_language (line 73) | def get_language(self, language):
    method run (line 82) | def run(self, language, code, stream=False, display=False):
    method _streaming_run (line 156) | def _streaming_run(self, language, code, display=False):
    method stop (line 196) | def stop(self):
    method terminate (line 200) | def terminate(self):

FILE: interpreter/core/computer/utils/computer_vision.py
  function pytesseract_get_text (line 15) | def pytesseract_get_text(img):
  function pytesseract_get_text_bounding_boxes (line 25) | def pytesseract_get_text_bounding_boxes(img):
  function find_text_in_image (line 54) | def find_text_in_image(img, text, debug=False):

FILE: interpreter/core/computer/utils/get_active_window.py
  function get_active_window (line 5) | def get_active_window():

FILE: interpreter/core/computer/utils/html_to_png_base64.py
  function html_to_png_base64 (line 15) | def html_to_png_base64(code):

FILE: interpreter/core/computer/utils/recipient_utils.py
  function format_to_recipient (line 1) | def format_to_recipient(text, recipient):
  function parse_for_recipient (line 5) | def parse_for_recipient(content):

FILE: interpreter/core/computer/utils/run_applescript.py
  function run_applescript (line 4) | def run_applescript(script):
  function run_applescript_capture (line 16) | def run_applescript_capture(script):

FILE: interpreter/core/computer/vision/vision.py
  class Vision (line 15) | class Vision:
    method __init__ (line 16) | def __init__(self, computer):
    method load (line 22) | def load(self, load_moondream=True, load_easyocr=True):
    method ocr (line 59) | def ocr(
    method query (line 122) | def query(

FILE: interpreter/core/core.py
  class OpenInterpreter (line 24) | class OpenInterpreter:
    method __init__ (line 42) | def __init__(
    method local_setup (line 141) | def local_setup(self):
    method wait (line 147) | def wait(self):
    method anonymous_telemetry (line 154) | def anonymous_telemetry(self) -> bool:
    method will_contribute (line 158) | def will_contribute(self):
    method chat (line 164) | def chat(self, message=None, display=True, stream=False, blocking=True):
    method _streaming_chat (line 217) | def _streaming_chat(self, message=None, display=True):
    method _respond_and_store (line 297) | def _respond_and_store(self):
    method reset (line 430) | def reset(self):
    method display_message (line 436) | def display_message(self, markdown):
    method get_oi_dir (line 443) | def get_oi_dir(self):

FILE: interpreter/core/llm/llm.py
  class SuppressDebugFilter (line 33) | class SuppressDebugFilter(logging.Filter):
    method filter (line 34) | def filter(self, record):
  class Llm (line 41) | class Llm:
    method __init__ (line 46) | def __init__(self, interpreter):
    method run (line 79) | def run(self, messages):
    method model (line 331) | def model(self):
    method model (line 335) | def model(self, value):
    method load (line 339) | def load(self):
  function fixed_litellm_completions (line 419) | def fixed_litellm_completions(**params):

FILE: interpreter/core/llm/run_function_calling_llm.py
  function run_function_calling_llm (line 24) | def run_function_calling_llm(llm, request_params):

FILE: interpreter/core/llm/run_text_llm.py
  function run_text_llm (line 1) | def run_text_llm(llm, params):

FILE: interpreter/core/llm/run_tool_calling_llm.py
  function process_messages (line 33) | def process_messages(messages):
  function run_tool_calling_llm (line 101) | def run_tool_calling_llm(llm, request_params):

FILE: interpreter/core/llm/utils/convert_to_openai_messages.py
  function convert_to_openai_messages (line 9) | def convert_to_openai_messages(

FILE: interpreter/core/llm/utils/merge_deltas.py
  function merge_deltas (line 1) | def merge_deltas(original, delta):

FILE: interpreter/core/llm/utils/parse_partial_json.py
  function parse_partial_json (line 5) | def parse_partial_json(s):

FILE: interpreter/core/render_message.py
  function render_message (line 4) | def render_message(interpreter, message):

FILE: interpreter/core/respond.py
  function respond (line 14) | def respond(interpreter):

FILE: interpreter/core/utils/lazy_import.py
  function lazy_import (line 4) | def lazy_import(name, optional=True):

FILE: interpreter/core/utils/scan_code.py
  function scan_code (line 13) | def scan_code(code, language, interpreter):

FILE: interpreter/core/utils/system_debug_info.py
  function get_python_version (line 10) | def get_python_version():
  function get_pip_version (line 14) | def get_pip_version():
  function get_oi_version (line 22) | def get_oi_version():
  function get_os_version (line 37) | def get_os_version():
  function get_cpu_info (line 41) | def get_cpu_info():
  function get_ram_info (line 45) | def get_ram_info():
  function get_package_mismatches (line 53) | def get_package_mismatches(file_path="pyproject.toml"):
  function interpreter_info (line 81) | def interpreter_info(interpreter):
  function system_info (line 129) | def system_info(interpreter):

FILE: interpreter/core/utils/telemetry.py
  function get_or_create_uuid (line 22) | def get_or_create_uuid():
  function send_telemetry (line 47) | def send_telemetry(event_name, properties=None):

FILE: interpreter/core/utils/temporary_file.py
  function cleanup_temporary_file (line 5) | def cleanup_temporary_file(temp_file_name, verbose=False):
  function create_temporary_file (line 24) | def create_temporary_file(contents, extension=None, verbose=False):

FILE: interpreter/core/utils/truncate_output.py
  function truncate_output (line 1) | def truncate_output(data, max_output_chars=2800, add_scrollbars=False):

FILE: interpreter/terminal_interface/components/base_block.py
  class BaseBlock (line 5) | class BaseBlock:
    method __init__ (line 10) | def __init__(self):
    method update_from_message (line 16) | def update_from_message(self, message):
    method end (line 19) | def end(self):
    method refresh (line 23) | def refresh(self, cursor=True):

FILE: interpreter/terminal_interface/components/code_block.py
  class CodeBlock (line 10) | class CodeBlock(BaseBlock):
    method __init__ (line 15) | def __init__(self, interpreter=None):
    method end (line 30) | def end(self):
    method refresh (line 35) | def refresh(self, cursor=True):

FILE: interpreter/terminal_interface/components/message_block.py
  class MessageBlock (line 10) | class MessageBlock(BaseBlock):
    method __init__ (line 11) | def __init__(self):
    method refresh (line 17) | def refresh(self, cursor=True):
  function textify_markdown_code_blocks (line 31) | def textify_markdown_code_blocks(text):

FILE: interpreter/terminal_interface/contributing_conversations.py
  function display_contribution_message (line 19) | def display_contribution_message():
  function display_contributing_current_message (line 32) | def display_contributing_current_message():
  function send_past_conversations (line 41) | def send_past_conversations(interpreter):
  function set_send_future_conversations (line 60) | def set_send_future_conversations(interpreter, should_send_future):
  function user_wants_to_contribute_past (line 71) | def user_wants_to_contribute_past():
  function user_wants_to_contribute_future (line 77) | def user_wants_to_contribute_future():
  function contribute_conversation_launch_logic (line 83) | def contribute_conversation_launch_logic(interpreter):
  class ContributionCache (line 96) | class ContributionCache(TypedDict):
  function contribute_past_and_future_logic (line 103) | def contribute_past_and_future_logic(
  function get_contribute_cache_contents (line 123) | def get_contribute_cache_contents() -> ContributionCache:
  function write_to_contribution_cache (line 140) | def write_to_contribution_cache(contribution_cache: ContributionCache):
  function get_all_conversations (line 145) | def get_all_conversations(interpreter) -> List[List]:
  function is_list_of_lists (line 165) | def is_list_of_lists(l):
  function contribute_conversations (line 169) | def contribute_conversations(

FILE: interpreter/terminal_interface/conversation_navigator.py
  function conversation_navigator (line 16) | def conversation_navigator(interpreter):
  function open_folder (line 94) | def open_folder(path):

FILE: interpreter/terminal_interface/local_setup.py
  function local_setup (line 15) | def local_setup(interpreter, provider=None, model=None):

FILE: interpreter/terminal_interface/magic_commands.py
  function handle_undo (line 13) | def handle_undo(self, arguments):
  function handle_help (line 49) | def handle_help(self, arguments):
  function handle_verbose (line 80) | def handle_verbose(self, arguments=None):
  function handle_debug (line 103) | def handle_debug(self, arguments=None):
  function handle_auto_run (line 126) | def handle_auto_run(self, arguments=None):
  function handle_info (line 137) | def handle_info(self, arguments):
  function handle_reset (line 141) | def handle_reset(self, arguments):
  function default_handle (line 146) | def default_handle(self, arguments):
  function handle_save_message (line 151) | def handle_save_message(self, json_path):
  function handle_load_message (line 162) | def handle_load_message(self, json_path):
  function handle_count_tokens (line 173) | def handle_count_tokens(self, prompt):
  function get_downloads_path (line 215) | def get_downloads_path():
  function install_and_import (line 228) | def install_and_import(package):
  function jupyter (line 259) | def jupyter(self, arguments):
  function markdown (line 300) | def markdown(self, export_path: str):
  function handle_magic_command (line 313) | def handle_magic_command(self, user_input):

FILE: interpreter/terminal_interface/profiles/defaults/e2b.py
  class PythonE2B (line 10) | class PythonE2B:
    method run (line 31) | def run(self, code):
    method stop (line 45) | def stop(self):
    method terminate (line 50) | def terminate(self):

FILE: interpreter/terminal_interface/profiles/profiles.py
  function profile (line 31) | def profile(interpreter, filename_or_url):
  function get_profile (line 67) | def get_profile(filename_or_url, profile_path):
  class RemoveInterpreter (line 123) | class RemoveInterpreter(ast.NodeTransformer):
    method visit_ImportFrom (line 126) | def visit_ImportFrom(self, node):
    method visit_Assign (line 133) | def visit_Assign(self, node):
  function apply_profile (line 145) | def apply_profile(interpreter, profile, profile_path):
  function migrate_profile (line 216) | def migrate_profile(old_path, new_path):
  function apply_profile_to_object (line 562) | def apply_profile_to_object(obj, profile):
  function open_storage_dir (line 574) | def open_storage_dir(directory):
  function reset_profile (line 591) | def reset_profile(specific_default_profile=None):
  function get_default_profile (line 653) | def get_default_profile(specific_default_profile):
  function determine_user_version (line 682) | def determine_user_version():
  function migrate_app_directory (line 709) | def migrate_app_directory(old_dir, new_dir, profile_dir):
  function migrate_user_app_directory (line 756) | def migrate_user_app_directory():
  function write_key_to_profile (line 768) | def write_key_to_profile(key, value):

FILE: interpreter/terminal_interface/render_past_conversation.py
  function render_past_conversation (line 11) | def render_past_conversation(messages):

FILE: interpreter/terminal_interface/start_terminal_interface.py
  function start_terminal_interface (line 19) | def start_terminal_interface(interpreter):
  function set_attributes (line 581) | def set_attributes(args, arguments):
  function get_argument_dictionary (line 595) | def get_argument_dictionary(arguments: list[dict], key: str) -> dict:
  function main (line 608) | def main():

FILE: interpreter/terminal_interface/terminal_interface.py
  function terminal_interface (line 47) | def terminal_interface(interpreter, message):

FILE: interpreter/terminal_interface/utils/check_for_package.py
  function check_for_package (line 6) | def check_for_package(package):

FILE: interpreter/terminal_interface/utils/check_for_update.py
  function check_for_update (line 6) | def check_for_update():

FILE: interpreter/terminal_interface/utils/cli_input.py
  function cli_input (line 1) | def cli_input(prompt: str = "") -> str:

FILE: interpreter/terminal_interface/utils/count_tokens.py
  function count_tokens (line 9) | def count_tokens(text="", model="gpt-4"):
  function token_cost (line 33) | def token_cost(tokens=0, model="gpt-4"):
  function count_messages_tokens (line 47) | def count_messages_tokens(messages=[], model=None):

FILE: interpreter/terminal_interface/utils/display_markdown_message.py
  function display_markdown_message (line 6) | def display_markdown_message(message):

FILE: interpreter/terminal_interface/utils/display_output.py
  function display_output (line 10) | def display_output(output):
  function display_output_cli (line 37) | def display_output_cli(output):
  function open_file (line 75) | def open_file(file_path):

FILE: interpreter/terminal_interface/utils/export_to_markdown.py
  function export_to_markdown (line 1) | def export_to_markdown(messages: list[dict], export_path: str):
  function messages_to_markdown (line 8) | def messages_to_markdown(messages: list[dict]) -> str:

FILE: interpreter/terminal_interface/utils/find_image_path.py
  function find_image_path (line 5) | def find_image_path(text):

FILE: interpreter/terminal_interface/utils/get_conversations.py
  function get_conversations (line 6) | def get_conversations():

FILE: interpreter/terminal_interface/utils/in_jupyter_notebook.py
  function in_jupyter_notebook (line 1) | def in_jupyter_notebook():

FILE: interpreter/terminal_interface/utils/local_storage_path.py
  function get_storage_path (line 9) | def get_storage_path(subdirectory=None):

FILE: interpreter/terminal_interface/validate_llm_settings.py
  function validate_llm_settings (line 19) | def validate_llm_settings(interpreter):
  function display_welcome_message_once (line 113) | def display_welcome_message_once(interpreter):

FILE: scripts/wtf.py
  function main (line 115) | def main():

FILE: tests/core/computer/files/test_files.py
  class TestFiles (line 7) | class TestFiles(unittest.TestCase):
    method setUp (line 8) | def setUp(self):
    method test_search (line 12) | def test_search(self, mock_aifs):
    method test_edit_original_text_in_filedata (line 23) | def test_edit_original_text_in_filedata(self):
    method test_edit_original_text_not_in_filedata (line 37) | def test_edit_original_text_not_in_filedata(self):

FILE: tests/core/computer/test_computer.py
  class TestComputer (line 5) | class TestComputer(unittest.TestCase):
    method setUp (line 6) | def setUp(self):
    method test_get_all_computer_tools_list (line 9) | def test_get_all_computer_tools_list(self):
    method test_get_all_computer_tools_signature_and_description (line 16) | def test_get_all_computer_tools_signature_and_description(self):

FILE: tests/core/test_async_core.py
  class TestServerConstruction (line 7) | class TestServerConstruction(TestCase):
    method test_host_and_port_defaults (line 13) | def test_host_and_port_defaults(self):
    method test_host_and_port_passed_in (line 24) | def test_host_and_port_passed_in(self):
    method test_host_and_port_from_env_1 (line 40) | def test_host_and_port_from_env_1(self):

FILE: tests/test_interpreter.py
  function test_hallucinations (line 27) | def test_hallucinations():
  function run_auth_server (line 77) | def run_auth_server():
  function test_authenticated_acknowledging_breaking_server (line 86) | def test_authenticated_acknowledging_breaking_server():
  function run_server (line 230) | def run_server():
  function test_server (line 240) | def test_server():
  function test_sms (line 656) | def test_sms():
  function test_pytes (line 671) | def test_pytes():
  function test_ai_chat (line 689) | def test_ai_chat():
  function test_generator (line 693) | def test_generator():
  function test_localos (line 778) | def test_localos():
  function test_m_vision (line 786) | def test_m_vision():
  function test_point (line 814) | def test_point():
  function test_skills (line 825) | def test_skills():
  function test_browser (line 876) | def test_browser():
  function test_display_api (line 885) | def test_display_api():
  function test_websocket_server (line 961) | def test_websocket_server():
  function test_i (line 994) | def test_i():
  function test_async (line 1023) | def test_async():
  function test_find_text_api (line 1029) | def test_find_text_api():
  function test_getActiveWindow (line 1041) | def test_getActiveWindow():
  function test_notify (line 1049) | def test_notify():
  function test_get_text (line 1055) | def test_get_text():
  function test_keyboard (line 1061) | def test_keyboard():
  function test_get_selected_text (line 1068) | def test_get_selected_text():
  function test_display_verbose (line 1077) | def test_display_verbose():
  function setup_function (line 1086) | def setup_function():
  function test_long_message (line 1100) | def test_long_message():
  function teardown_function (line 1117) | def teardown_function():
  function test_spotlight (line 1122) | def test_spotlight():
  function test_files (line 1126) | def test_files():
  function test_vision (line 1140) | def test_vision():
  function test_multiple_instances (line 1165) | def test_multiple_instances():
  function test_hello_world (line 1177) | def test_hello_world():
  function test_math (line 1189) | def test_math():
  function test_break_execution (line 1212) | def test_break_execution():
  function test_delayed_exec (line 1265) | def test_delayed_exec():
  function test_nested_loops_and_multiple_newlines (line 1271) | def test_nested_loops_and_multiple_newlines():
  function test_write_to_file (line 1277) | def test_write_to_file():
  function test_markdown (line 1289) | def test_markdown():
  function test_reset (line 1295) | def test_reset():
  function test_token_counter (line 1300) | def test_token_counter():
Copy disabled (too large) Download .json
Condensed preview — 271 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (10,999K chars).
[
  {
    "path": ".devcontainer/DockerFile",
    "chars": 16,
    "preview": "FROM python:3.11"
  },
  {
    "path": ".devcontainer/devcontainer.json",
    "chars": 310,
    "preview": "{\n\t\"name\": \"Open Interpreter\",\n\t\"dockerFile\": \"DockerFile\",\n\t// Features to add to the dev container. More info: https:/"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "chars": 2006,
    "preview": "name: Bug report\ndescription: Create a report to help us improve\nlabels:\n  - bug\nbody:\n  - type: markdown\n    attributes"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 28,
    "preview": "blank_issues_enabled: false\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.yml",
    "chars": 889,
    "preview": "name: Feature request\ndescription: Suggest an idea for this project\nlabels:\n  - enhancement\nbody:\n  - type: textarea\n   "
  },
  {
    "path": ".github/pull_request_template.md",
    "chars": 414,
    "preview": "### Describe the changes you have made:\n\n### Reference any relevant issues (e.g. \"Fixes #000\"):\n\n### Pre-Submission Chec"
  },
  {
    "path": ".github/workflows/potential-duplicates.yml",
    "chars": 1324,
    "preview": "name: Potential Duplicates\non:\n  issues:\n    types: [opened, edited]\njobs:\n  run:\n    runs-on: ubuntu-latest\n    steps:\n"
  },
  {
    "path": ".github/workflows/python-package.yml",
    "chars": 925,
    "preview": "name: Build and Test\n\non:\n  push:\n    branches: [\"main\", \"development\"]\n  pull_request:\n    branches: [\"main\", \"developm"
  },
  {
    "path": ".gitignore",
    "chars": 4195,
    "preview": "llama.log\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distributio"
  },
  {
    "path": ".pre-commit-config.yaml",
    "chars": 561,
    "preview": "repos:\n  # Using this mirror lets us use mypyc-compiled black, which is 2x faster\n  - repo: https://github.com/psf/black"
  },
  {
    "path": "Dockerfile",
    "chars": 879,
    "preview": "###########################################################################################\n# This Dockerfile runs an LM"
  },
  {
    "path": "LICENSE",
    "chars": 33813,
    "preview": "GNU AFFERO GENERAL PUBLIC LICENSE\nVersion 3, 19 November 2007\n\nCopyright (C) 2007 Free Software Foundation, Inc. <http:/"
  },
  {
    "path": "README.md",
    "chars": 14283,
    "preview": "<h1 align=\"center\">● Open Interpreter</h1>\n\n<p align=\"center\">\n    <a href=\"https://discord.gg/Hvz9Axh84z\">\n        <img"
  },
  {
    "path": "docs/CONTRIBUTING.md",
    "chars": 5525,
    "preview": "# ●\r\n\r\n**Open Interpreter is large, open-source initiative to build a standard interface between language models and com"
  },
  {
    "path": "docs/NCU_MIGRATION_GUIDE.md",
    "chars": 11871,
    "preview": "# `0.2.0` Migration Guide\n\nOpen Interpreter is [changing](https://changes.openinterpreter.com/log/the-new-computer-updat"
  },
  {
    "path": "docs/README_DE.md",
    "chars": 5996,
    "preview": "<h1 align=\"center\">● Open Interpreter</h1>\n\n<p align=\"center\">\n    <a href=\"https://discord.gg/6p3fD6rBVm\">\n        <img"
  },
  {
    "path": "docs/README_ES.md",
    "chars": 15433,
    "preview": "<h1 align=\"center\">● Intérprete Abierto</h1>\n\n<p align=\"center\">\n    <a href=\"https://discord.gg/Hvz9Axh84z\">\n        <i"
  },
  {
    "path": "docs/README_IN.md",
    "chars": 8843,
    "preview": "<h1 align=\"center\">● Open Interpreter</h1>\n\n<p align=\"center\">\n    <a href=\"https://discord.gg/6p3fD6rBVm\">\n        <img"
  },
  {
    "path": "docs/README_JA.md",
    "chars": 10486,
    "preview": "<h1 align=\"center\">● Open Interpreter</h1>\n\n<p align=\"center\">\n    <a href=\"https://discord.gg/6p3fD6rBVm\">\n        <img"
  },
  {
    "path": "docs/README_UK.md",
    "chars": 15244,
    "preview": "<h1 align=\"center\">● Open Interpreter</h1>\n\n<p align=\"center\">\n    <a href=\"https://discord.gg/Hvz9Axh84z\">\n        <img"
  },
  {
    "path": "docs/README_VN.md",
    "chars": 14119,
    "preview": "<h1 align=\"center\">● Open Interpreter</h1>\n\n<p align=\"center\">\n    <a href=\"https://discord.gg/6p3fD6rBVm\">\n        <img"
  },
  {
    "path": "docs/README_ZH.md",
    "chars": 5158,
    "preview": "<h1 align=\"center\">● Open Interpreter(开放解释器)</h1>\n\n<p align=\"center\">\n    <a href=\"https://discord.gg/6p3fD6rBVm\"><img a"
  },
  {
    "path": "docs/ROADMAP.md",
    "chars": 10321,
    "preview": "# Roadmap\n\n## Documentation\n- [ ] Work with Mintlify to translate docs. How does Mintlify let us translate our documenta"
  },
  {
    "path": "docs/SAFE_MODE.md",
    "chars": 1982,
    "preview": "# Safe Mode\n\n**⚠️ Safe mode is experimental and does not provide any guarantees of safety or security.**\n\nOpen Interpret"
  },
  {
    "path": "docs/SECURITY.md",
    "chars": 2437,
    "preview": "# Open Interpreter Security Policy\r\n\r\nWe take security seriously. Responsible reporting and disclosure of security\r\nvuln"
  },
  {
    "path": "docs/code-execution/computer-api.mdx",
    "chars": 3756,
    "preview": "---\ntitle: Computer API\n---\n\nThe following functions are designed for language models to use in Open Interpreter, curren"
  },
  {
    "path": "docs/code-execution/custom-languages.mdx",
    "chars": 2472,
    "preview": "---\ntitle: Custom Languages\n---\n\nYou can add or edit the programming languages that Open Interpreter's computer runs.\n\nI"
  },
  {
    "path": "docs/code-execution/settings.mdx",
    "chars": 207,
    "preview": "---\ntitle: Settings\n---\n\nThe `interpreter.computer` is responsible for executing code.\n\n[Click here](https://docs.openin"
  },
  {
    "path": "docs/code-execution/usage.mdx",
    "chars": 1029,
    "preview": "---\ntitle: Usage\n---\n\n# Running Code\n\nThe `computer` itself is separate from Open Interpreter's core, so you can run it "
  },
  {
    "path": "docs/computer/custom-languages.mdx",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "docs/computer/introduction.mdx",
    "chars": 271,
    "preview": "The Computer module is responsible for executing code.\n\nYou can manually execute code in the same instance that Open Int"
  },
  {
    "path": "docs/computer/language-model-usage.mdx",
    "chars": 76,
    "preview": "Open Interpreter can use the Computer module itself.\n\nHere's what it can do:"
  },
  {
    "path": "docs/computer/user-usage.mdx",
    "chars": 162,
    "preview": "The Computer module is responsible for running code.\n\nYou can add custom languages to it.\n\nThe user can add custom langu"
  },
  {
    "path": "docs/getting-started/introduction.mdx",
    "chars": 1298,
    "preview": "---\ntitle: Introduction\ndescription: A new way to use computers\n---\n\n# <div class=\"hidden\">Introduction</div>\n\n<img src="
  },
  {
    "path": "docs/getting-started/setup.mdx",
    "chars": 2478,
    "preview": "---\ntitle: Setup\n---\n\n<iframe\n  width=\"560\"\n  height=\"315\"\n  src=\"https://www.youtube.com/embed/5sk3t8ilDR8\"\n  frameBord"
  },
  {
    "path": "docs/guides/advanced-terminal-usage.mdx",
    "chars": 1406,
    "preview": "---\ntitle: Advanced Terminal Usage\n---\n\nMagic commands can be used to control the interpreter's behavior in interactive "
  },
  {
    "path": "docs/guides/basic-usage.mdx",
    "chars": 3818,
    "preview": "---\ntitle: Basic Usage\n---\n\n<CardGroup>\n\n<Card\n  title=\"Interactive demo\"\n  icon=\"gamepad-modern\"\n  iconType=\"solid\"\n  h"
  },
  {
    "path": "docs/guides/demos.mdx",
    "chars": 10893,
    "preview": "---\ntitle: Demos\n---\n\n### Vision Mode\n\n#### Recreating a Tailwind Component\n\nCreating a dropdown menu in Tailwind from a"
  },
  {
    "path": "docs/guides/multiple-instances.mdx",
    "chars": 869,
    "preview": "---\ntitle: Multiple Instances\n---\n\nTo create multiple instances, use the base class, `OpenInterpreter`:\n\n```python\nfrom "
  },
  {
    "path": "docs/guides/os-mode.mdx",
    "chars": 960,
    "preview": "---\ntitle: OS Mode\n---\n\nOS mode is a highly experimental mode that allows Open Interpreter to control the operating syst"
  },
  {
    "path": "docs/guides/profiles.mdx",
    "chars": 2415,
    "preview": "---\ntitle: Profiles\n---\n\n<iframe\n  width=\"560\"\n  height=\"315\"\n  src=\"https://www.youtube.com/embed/NxfdrGQrkHQ\"\n  frameB"
  },
  {
    "path": "docs/guides/running-locally.mdx",
    "chars": 2901,
    "preview": "---\ntitle: Running Locally\n---\n\nOpen Interpreter can be run fully locally.\n\nUsers need to install software to run local "
  },
  {
    "path": "docs/guides/streaming-response.mdx",
    "chars": 6558,
    "preview": "---\ntitle: Streaming Response\n---\n\nYou can stream messages, code, and code outputs out of Open Interpreter by setting `s"
  },
  {
    "path": "docs/integrations/docker.mdx",
    "chars": 2772,
    "preview": "---\ntitle: Docker\n---\n\nDocker support is currently experimental. Running Open Interpreter inside of a Docker container m"
  },
  {
    "path": "docs/integrations/e2b.mdx",
    "chars": 2229,
    "preview": "---\ntitle: E2B\n---\n\n[E2B](https://e2b.dev/) is a secure, sandboxed environment where you can run arbitrary code.\n\nTo bui"
  },
  {
    "path": "docs/language-models/custom-models.mdx",
    "chars": 1469,
    "preview": "---\ntitle: Custom Models\n---\n\nIn addition to hosted and local language models, Open Interpreter also supports custom mod"
  },
  {
    "path": "docs/language-models/hosted-models/ai21.mdx",
    "chars": 1066,
    "preview": "---\ntitle: AI21\n---\n\nTo use Open Interpreter with a model from AI21, set the `model` flag:\n\n<CodeGroup>\n\n```bash Termina"
  },
  {
    "path": "docs/language-models/hosted-models/anthropic.mdx",
    "chars": 1133,
    "preview": "---\ntitle: Anthropic\n---\n\nTo use Open Interpreter with a model from Anthropic, set the `model` flag:\n\n<CodeGroup>\n\n```ba"
  },
  {
    "path": "docs/language-models/hosted-models/anyscale.mdx",
    "chars": 1879,
    "preview": "---\ntitle: Anyscale\n---\n\nTo use Open Interpreter with a model from Anyscale, set the `model` flag:\n\n<CodeGroup>\n\n```bash"
  },
  {
    "path": "docs/language-models/hosted-models/aws-sagemaker.mdx",
    "chars": 2871,
    "preview": "---\ntitle: AWS Sagemaker\n---\n\nTo use Open Interpreter with a model from AWS Sagemaker, set the `model` flag:\n\n<CodeGroup"
  },
  {
    "path": "docs/language-models/hosted-models/azure.mdx",
    "chars": 1175,
    "preview": "---\ntitle: Azure\n---\n\nTo use a model from Azure, set the `model` flag to begin with `azure/`:\n\n<CodeGroup>\n\n```bash Term"
  },
  {
    "path": "docs/language-models/hosted-models/baseten.mdx",
    "chars": 1400,
    "preview": "---\ntitle: Baseten\n---\n\nTo use Open Interpreter with Baseten, set the `model` flag:\n\n<CodeGroup>\n\n```bash Terminal\ninter"
  },
  {
    "path": "docs/language-models/hosted-models/cloudflare.mdx",
    "chars": 1988,
    "preview": "---\ntitle: Cloudflare Workers AI\n---\n\nTo use Open Interpreter with the Cloudflare Workers AI API, set the `model` flag:\n"
  },
  {
    "path": "docs/language-models/hosted-models/cohere.mdx",
    "chars": 1375,
    "preview": "---\ntitle: Cohere\n---\n\nTo use Open Interpreter with a model from Cohere, set the `model` flag:\n\n<CodeGroup>\n\n```bash Ter"
  },
  {
    "path": "docs/language-models/hosted-models/deepinfra.mdx",
    "chars": 1962,
    "preview": "---\ntitle: DeepInfra\n---\n\nTo use Open Interpreter with DeepInfra, set the `model` flag:\n\n<CodeGroup>\n\n```bash Terminal\ni"
  },
  {
    "path": "docs/language-models/hosted-models/gpt-4-setup.mdx",
    "chars": 2359,
    "preview": "---\ntitle: GPT-4 Setup\n---\n\n# Setting Up GPT-4\n\nStep 1 - Install OpenAI packages\n\n```\npip install openai\n```\n\nStep 2 - c"
  },
  {
    "path": "docs/language-models/hosted-models/huggingface.mdx",
    "chars": 1368,
    "preview": "---\ntitle: Huggingface\n---\n\nTo use Open Interpreter with Huggingface models, set the `model` flag:\n\n<CodeGroup>\n\n```bash"
  },
  {
    "path": "docs/language-models/hosted-models/mistral-api.mdx",
    "chars": 1378,
    "preview": "---\ntitle: Mistral AI API\n---\n\nTo use Open Interpreter with the Mistral API, set the `model` flag:\n\n<CodeGroup>\n\n```bash"
  },
  {
    "path": "docs/language-models/hosted-models/nlp-cloud.mdx",
    "chars": 808,
    "preview": "---\ntitle: NLP Cloud\n---\n\nTo use Open Interpreter with NLP Cloud, set the `model` flag:\n\n<CodeGroup>\n\n```bash Terminal\ni"
  },
  {
    "path": "docs/language-models/hosted-models/openai.mdx",
    "chars": 1539,
    "preview": "---\ntitle: OpenAI\n---\n\nTo use Open Interpreter with a model from OpenAI, simply run:\n\n<CodeGroup>\n\n```bash Terminal\ninte"
  },
  {
    "path": "docs/language-models/hosted-models/openrouter.mdx",
    "chars": 2401,
    "preview": "---\ntitle: OpenRouter\n---\n\nTo use Open Interpreter with a model from OpenRouter, set the `model` flag to begin with `ope"
  },
  {
    "path": "docs/language-models/hosted-models/palm.mdx",
    "chars": 1098,
    "preview": "---\ntitle: PaLM API - Google\n---\n\nTo use Open Interpreter with PaLM, you must `pip install -q google-generativeai`, then"
  },
  {
    "path": "docs/language-models/hosted-models/perplexity.mdx",
    "chars": 2601,
    "preview": "---\ntitle: Perplexity\n---\n\nTo use Open Interpreter with the Perplexity API, set the `model` flag:\n\n<CodeGroup>\n\n```bash "
  },
  {
    "path": "docs/language-models/hosted-models/petals.mdx",
    "chars": 975,
    "preview": "---\ntitle: Petals\n---\n\nTo use Open Interpreter with a model from Petals, set the `model` flag to begin with `petals/`:\n\n"
  },
  {
    "path": "docs/language-models/hosted-models/replicate.mdx",
    "chars": 2053,
    "preview": "---\ntitle: Replicate\n---\n\nTo use Open Interpreter with a model from Replicate, set the `model` flag to begin with `repli"
  },
  {
    "path": "docs/language-models/hosted-models/togetherai.mdx",
    "chars": 1087,
    "preview": "---\ntitle: Together AI\n---\n\nTo use Open Interpreter with Together AI, set the `model` flag:\n\n<CodeGroup>\n\n```bash Termin"
  },
  {
    "path": "docs/language-models/hosted-models/vertex-ai.mdx",
    "chars": 1407,
    "preview": "---\ntitle: Google (Vertex AI)\n---\n\n## Pre-requisites\n* `pip install google-cloud-aiplatform`\n* Authentication:\n    * run"
  },
  {
    "path": "docs/language-models/hosted-models/vllm.mdx",
    "chars": 667,
    "preview": "---\ntitle: vLLM\n---\n\nTo use Open Interpreter with vLLM, you will need to:\n\n1. `pip install vllm`\n2. Set the api_base fla"
  },
  {
    "path": "docs/language-models/introduction.mdx",
    "chars": 863,
    "preview": "---\ntitle: Introduction\n---\n\n**Open Interpreter** works with both hosted and local language models.\n\nHosted models are f"
  },
  {
    "path": "docs/language-models/local-models/best-practices.mdx",
    "chars": 1096,
    "preview": "---\ntitle: \"Best Practices\"\n---\n\nMost settings — like model architecture and GPU offloading — can be adjusted via your L"
  },
  {
    "path": "docs/language-models/local-models/custom-endpoint.mdx",
    "chars": 301,
    "preview": "---\ntitle: Custom Endpoint\n---\n\nSimply set `api_base` to any OpenAI compatible server:\n\n<CodeGroup>\n```bash Terminal\nint"
  },
  {
    "path": "docs/language-models/local-models/janai.mdx",
    "chars": 2167,
    "preview": "---\ntitle: Jan.ai\n---\n\nJan.ai is an open-source platform for running local language models on your computer, and is equi"
  },
  {
    "path": "docs/language-models/local-models/llamafile.mdx",
    "chars": 1075,
    "preview": "---\ntitle: LlamaFile\n---\n\nThe easiest way to get started with local models in Open Interpreter is to run `interpreter --"
  },
  {
    "path": "docs/language-models/local-models/lm-studio.mdx",
    "chars": 2103,
    "preview": "---\ntitle: LM Studio\n---\n\nOpen Interpreter can use OpenAI-compatible server to run models locally. (LM Studio, jan.ai, o"
  },
  {
    "path": "docs/language-models/local-models/ollama.mdx",
    "chars": 1364,
    "preview": "---\ntitle: Ollama\n---\n\nOllama is an easy way to get local language models running on your computer through a command-lin"
  },
  {
    "path": "docs/language-models/settings.mdx",
    "chars": 183,
    "preview": "---\ntitle: Settings\n---\n\nThe `interpreter.llm` is responsible for running the language model.\n\n[Click here](/settings/al"
  },
  {
    "path": "docs/legal/license.mdx",
    "chars": 4898,
    "preview": "---\ntitle: Licenses\ndescription: By using Interpreter, you agree to our Privacy Policy and Terms of Service\n---\n\n\\n\n\n# I"
  },
  {
    "path": "docs/mint.json",
    "chars": 4106,
    "preview": "{\n  \"name\": \"Open Interpreter\",\n  \"logo\": {\n    \"dark\": \"/assets/logo/circle-inverted.png\",\n    \"light\": \"/assets/logo/c"
  },
  {
    "path": "docs/protocols/i-protocol.mdx",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "docs/protocols/lmc-messages.mdx",
    "chars": 2790,
    "preview": "---\ntitle: LMC Messages\n---\n\nTo support the incoming `L`anguage `M`odel `C`omputer architecture, we extend OpenAI's mess"
  },
  {
    "path": "docs/safety/best-practices.mdx",
    "chars": 1549,
    "preview": "---\ntitle: Best Practices\n---\n\nLLM's are not perfect. They can make mistakes, they can be tricked into doing things that"
  },
  {
    "path": "docs/safety/introduction.mdx",
    "chars": 1917,
    "preview": "---\ntitle: Introduction\n---\n\nSafety is a top priority for us at Open Interpreter. Running LLM generated code on your com"
  },
  {
    "path": "docs/safety/isolation.mdx",
    "chars": 1494,
    "preview": "---\ntitle: Isolation\n---\n\nIsolating Open Interpreter from your system is helpful to prevent security mishaps. By running"
  },
  {
    "path": "docs/safety/safe-mode.mdx",
    "chars": 2046,
    "preview": "---\ntitle: Safe Mode\n---\n\n# Safe Mode\n\n**⚠️ Safe mode is experimental and does not provide any guarantees of safety or s"
  },
  {
    "path": "docs/server/usage.mdx",
    "chars": 11213,
    "preview": "# Server Usage Guide\n\n## Starting the Server\n\n### From Command Line\nTo start the server from the command line, use:\n\n```"
  },
  {
    "path": "docs/settings/all-settings.mdx",
    "chars": 16970,
    "preview": "---\ntitle: All Settings\n---\n\n<CardGroup cols={3}>\n\n<Card title=\"Language Model Settings\" icon=\"microchip\" href=\"#languag"
  },
  {
    "path": "docs/settings/example-profiles.mdx",
    "chars": 196,
    "preview": "---\ntitle: Example Profiles\n---\n\n### OS Mode\n\n```yaml\nos: True\ncustom_instructions: \"Always use Safari as the browser, a"
  },
  {
    "path": "docs/settings/profiles.mdx",
    "chars": 1017,
    "preview": "---\ntitle: Profiles\n---\n\nProfiles are preconfigured settings for Open Interpreter that make it easy to get going quickly"
  },
  {
    "path": "docs/style.css",
    "chars": 343,
    "preview": ".rounded-lg {\n    border-radius: 0;\n}\n\n/*\n\n.rounded-sm, .rounded-md, .rounded-lg, .rounded-xl, .rounded-2xl, .rounded-3x"
  },
  {
    "path": "docs/telemetry/telemetry.mdx",
    "chars": 2170,
    "preview": "---\ntitle: Introduction\n---\n\nOpen Interpreter contains a telemetry feature that collects **anonymous** usage information"
  },
  {
    "path": "docs/troubleshooting/faq.mdx",
    "chars": 856,
    "preview": "---\ntitle: \"FAQ\"\ndescription: \"Frequently Asked Questions\"\n---\n\n<Accordion title=\"Does Open Interpreter ensure that my d"
  },
  {
    "path": "docs/usage/desktop/help.md",
    "chars": 51,
    "preview": "Reach out to help@openinterpreter.com for support.\n"
  },
  {
    "path": "docs/usage/desktop/install.mdx",
    "chars": 247,
    "preview": "---\ntitle: Desktop App\n---\n\nOur desktop application is currently in development and is not yet available to the public.\n"
  },
  {
    "path": "docs/usage/examples.mdx",
    "chars": 3773,
    "preview": "---\ntitle: Examples\ndescription: Get started by copying these code snippets into your terminal, a `.py` file, or a Jupyt"
  },
  {
    "path": "docs/usage/python/arguments.mdx",
    "chars": 4010,
    "preview": "---\ntitle: Arguments\n---\n\n<Card\n  title=\"New: Streaming responses in Python\"\n  icon=\"arrow-up-right\"\n  href=\"/usage/pyth"
  },
  {
    "path": "docs/usage/python/budget-manager.mdx",
    "chars": 164,
    "preview": "---\ntitle: Budget Manager\n---\n\nThe `max_budget` property sets the maximum budget limit for the session in USD.\n\n```pytho"
  },
  {
    "path": "docs/usage/python/conversation-history.mdx",
    "chars": 590,
    "preview": "---\ntitle: Conversation History\n---\n\nConversations will be saved in your application directory. **This is true for pytho"
  },
  {
    "path": "docs/usage/python/magic-commands.mdx",
    "chars": 793,
    "preview": "---\ntitle: Magic Commands\n---\n\nIf you run an interactive chat in python, you can use *magic commands* built for terminal"
  },
  {
    "path": "docs/usage/python/multiple-instances.mdx",
    "chars": 854,
    "preview": "To create multiple instances, use the base class, `OpenInterpreter`:\n\n```python\nfrom interpreter import OpenInterpreter\n"
  },
  {
    "path": "docs/usage/python/settings.mdx",
    "chars": 226,
    "preview": "---\ntitle: Settings\n---\n\nDefault settings will be inherited from a profile in your application directory. **This is true"
  },
  {
    "path": "docs/usage/terminal/arguments.mdx",
    "chars": 7283,
    "preview": "---\ntitle: Arguments\n---\n\n**[Modes](/docs/usage/terminal/arguments#modes)**\n\n`--vision`, `--os`.\n\n**[Model Settings](/do"
  },
  {
    "path": "docs/usage/terminal/budget-manager.mdx",
    "chars": 114,
    "preview": "---\ntitle: Budget Manager\n---\n\nYou can set a maximum budget per session:\n```bash\ninterpreter --max_budget 0.01\n```"
  },
  {
    "path": "docs/usage/terminal/magic-commands.mdx",
    "chars": 1271,
    "preview": "---\ntitle: Magic Commands\n---\n\nMagic commands can be used to control the interpreter's behavior in interactive mode:\n\n- "
  },
  {
    "path": "docs/usage/terminal/settings.mdx",
    "chars": 1539,
    "preview": "---\ntitle: Settings\n---\n\nDefault settings can be edited via a profile. To open the file, run:\n\n```bash\ninterpreter --pro"
  },
  {
    "path": "docs/usage/terminal/vision.mdx",
    "chars": 233,
    "preview": "---\ntitle: Vision\n---\n\nTo use vision (highly experimental), run the following command:\n\n```bash\ninterpreter --vision\n```"
  },
  {
    "path": "examples/Dockerfile",
    "chars": 587,
    "preview": "# This is a Dockerfile for using an isolated instance of Open Interpreter\n\n# Start with Python 3.11\nFROM python:3.11\n\n# "
  },
  {
    "path": "examples/JARVIS.ipynb",
    "chars": 34683,
    "preview": "{\n  \"cells\": [\n    {\n      \"cell_type\": \"code\",\n      \"source\": [\n        \"# Welcome to JARVIS.\\n\",\n        \"\\n\",\n      "
  },
  {
    "path": "examples/Open_Interpreter_Demo.ipynb",
    "chars": 9646530,
    "preview": "{\n  \"cells\": [\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"dT4HzysPiaGl\"\n      },\n      \"sou"
  },
  {
    "path": "examples/README.md",
    "chars": 1025,
    "preview": "# Open Interpreter Examples\n\nThis directory contains various examples demonstrating how to use Open Interpreter in diffe"
  },
  {
    "path": "examples/custom_tool.ipynb",
    "chars": 3425,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Add a Custom Tool to your Instanc"
  },
  {
    "path": "examples/interactive_quickstart.py",
    "chars": 94,
    "preview": "# This is all you need to get started\nfrom interpreter import interpreter\n\ninterpreter.chat()\n"
  },
  {
    "path": "examples/jan_computer_control.ipynb",
    "chars": 1736,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Jan Computer Control\\n\",\n    \"\\n\""
  },
  {
    "path": "examples/local3.ipynb",
    "chars": 3496,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"This notebook replicates running Op"
  },
  {
    "path": "examples/local_server.ipynb",
    "chars": 3462,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Build a local Open Interpreter se"
  },
  {
    "path": "examples/organize_photos.ipynb",
    "chars": 4395,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Organize your photos with Open In"
  },
  {
    "path": "examples/screenpipe.ipynb",
    "chars": 7170,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Open Interpreter and ScreenPipe C"
  },
  {
    "path": "examples/talk_to_your_database.ipynb",
    "chars": 4950,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"# Use Open Interpreter to talk to y"
  },
  {
    "path": "installers/oi-linux-installer.sh",
    "chars": 887,
    "preview": "#!/bin/bash\n\necho \"Starting Open Interpreter installation...\"\nsleep 2\necho \"This will take approximately 5 minutes...\"\ns"
  },
  {
    "path": "installers/oi-mac-installer.sh",
    "chars": 4158,
    "preview": "#!/bin/bash\nset -e\n\necho \"Starting Open Interpreter installation...\"\nsleep 2\necho \"This will take approximately 5 minute"
  },
  {
    "path": "installers/oi-windows-installer-conda.ps1",
    "chars": 4232,
    "preview": "# Define variables\n$condaInstallerUrl = \"https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe\"\n$cond"
  },
  {
    "path": "installers/oi-windows-installer.ps1",
    "chars": 1651,
    "preview": "Write-Output \"Starting Open Interpreter installation...\"\nStart-Sleep -Seconds 2\nWrite-Output \"This will take approximate"
  },
  {
    "path": "interpreter/__init__.py",
    "chars": 2531,
    "preview": "import sys\n\nif \"--os\" in sys.argv:\n    from rich import print as rich_print\n    from rich.markdown import Markdown\n    f"
  },
  {
    "path": "interpreter/computer_use/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/computer_use/loop.py",
    "chars": 20467,
    "preview": "\"\"\"\nBased on Anthropic's computer use example at https://github.com/anthropics/anthropic-quickstarts/blob/main/computer-"
  },
  {
    "path": "interpreter/computer_use/tools/__init__.py",
    "chars": 280,
    "preview": "from .base import CLIResult, ToolResult\nfrom .bash import BashTool\nfrom .collection import ToolCollection\nfrom .computer"
  },
  {
    "path": "interpreter/computer_use/tools/base.py",
    "chars": 2013,
    "preview": "from abc import ABCMeta, abstractmethod\nfrom dataclasses import dataclass, fields, replace\nfrom typing import Any\n\nfrom "
  },
  {
    "path": "interpreter/computer_use/tools/bash.py",
    "chars": 5318,
    "preview": "import asyncio\nimport os\nfrom typing import ClassVar, Literal\n\nfrom anthropic.types.beta import BetaToolBash20241022Para"
  },
  {
    "path": "interpreter/computer_use/tools/collection.py",
    "chars": 901,
    "preview": "\"\"\"Collection classes for managing multiple tools.\"\"\"\n\nfrom typing import Any\n\nfrom anthropic.types.beta import BetaTool"
  },
  {
    "path": "interpreter/computer_use/tools/computer.py",
    "chars": 9537,
    "preview": "import asyncio\nimport base64\nimport math\nimport os\nimport platform\nimport shlex\nimport shutil\nimport tempfile\nimport tim"
  },
  {
    "path": "interpreter/computer_use/tools/edit.py",
    "chars": 12341,
    "preview": "from collections import defaultdict\nfrom pathlib import Path\nfrom typing import Literal, get_args\n\nfrom anthropic.types."
  },
  {
    "path": "interpreter/computer_use/tools/run.py",
    "chars": 1595,
    "preview": "\"\"\"Utility to run shell commands asynchronously with a timeout.\"\"\"\n\nimport asyncio\n\nTRUNCATED_MESSAGE: str = \"<response "
  },
  {
    "path": "interpreter/computer_use/unused_markdown.py",
    "chars": 7077,
    "preview": "import sys\nfrom enum import Enum, auto\nfrom typing import Set\n\n\nclass Style(Enum):\n    NORMAL = auto()\n    BOLD = auto()"
  },
  {
    "path": "interpreter/core/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/archived_server_1.py",
    "chars": 6525,
    "preview": "import asyncio\nimport json\nfrom typing import Generator\n\nfrom .utils.lazy_import import lazy_import\n\nuvicorn = lazy_impo"
  },
  {
    "path": "interpreter/core/archived_server_2.py",
    "chars": 9539,
    "preview": "# This is a websocket interpreter, TTS and STT disabled.\n# It makes a websocket on a port that sends/receives LMC messag"
  },
  {
    "path": "interpreter/core/async_core.py",
    "chars": 41904,
    "preview": "import asyncio\nimport json\nimport os\nimport shutil\nimport socket\nimport threading\nimport time\nimport traceback\nfrom coll"
  },
  {
    "path": "interpreter/core/computer/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/ai/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/ai/ai.py",
    "chars": 7568,
    "preview": "from concurrent.futures import ThreadPoolExecutor\n\nimport tiktoken\n\n\ndef split_into_chunks(text, tokens, llm, overlap):\n"
  },
  {
    "path": "interpreter/core/computer/browser/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/browser/browser.py",
    "chars": 5548,
    "preview": "import threading\nimport time\n\nimport html2text\nimport requests\nfrom selenium import webdriver\nfrom selenium.webdriver.ch"
  },
  {
    "path": "interpreter/core/computer/browser/browser_next.py",
    "chars": 2479,
    "preview": "\"\"\"\nEventually we should own the browser\n\"\"\"\n\nimport concurrent.futures\nimport time\n\nfrom selenium import webdriver\nfrom"
  },
  {
    "path": "interpreter/core/computer/calendar/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/calendar/calendar.py",
    "chars": 12989,
    "preview": "import datetime\nimport platform\nimport subprocess\n\nfrom ..utils.run_applescript import run_applescript, run_applescript_"
  },
  {
    "path": "interpreter/core/computer/clipboard/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/clipboard/clipboard.py",
    "chars": 932,
    "preview": "import platform\nfrom ...utils.lazy_import import lazy_import\n\n# Lazy import of optional packages\npyperclip = lazy_import"
  },
  {
    "path": "interpreter/core/computer/computer.py",
    "chars": 8216,
    "preview": "import inspect\nimport json\n\nfrom .ai.ai import Ai\nfrom .browser.browser import Browser\nfrom .calendar.calendar import Ca"
  },
  {
    "path": "interpreter/core/computer/contacts/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/contacts/contacts.py",
    "chars": 3628,
    "preview": "import platform\n\nfrom ..utils.run_applescript import run_applescript_capture\n\n\nclass Contacts:\n    def __init__(self, co"
  },
  {
    "path": "interpreter/core/computer/display/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/display/display.py",
    "chars": 16325,
    "preview": "import base64\nimport io\nimport os\nimport platform\nimport pprint\nimport subprocess\nimport time\nimport warnings\nfrom conte"
  },
  {
    "path": "interpreter/core/computer/display/point/point.py",
    "chars": 26276,
    "preview": "import hashlib\nimport io\nimport os\nimport subprocess\nfrom typing import List\n\nimport cv2\nimport nltk\nimport numpy as np\n"
  },
  {
    "path": "interpreter/core/computer/docs/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/docs/docs.py",
    "chars": 749,
    "preview": "import inspect\nimport os\n\nfrom ...utils.lazy_import import lazy_import\n\n# Lazy import of aifs, imported when needed to s"
  },
  {
    "path": "interpreter/core/computer/files/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/files/files.py",
    "chars": 1698,
    "preview": "import difflib\n\nfrom ...utils.lazy_import import lazy_import\n\n# Lazy import of aifs, imported when needed\naifs = lazy_im"
  },
  {
    "path": "interpreter/core/computer/keyboard/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/keyboard/keyboard.py",
    "chars": 3878,
    "preview": "import os\nimport platform\nimport time\n\nfrom ...utils.lazy_import import lazy_import\n\n# Lazy import of pyautogui\npyautogu"
  },
  {
    "path": "interpreter/core/computer/mail/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/mail/mail.py",
    "chars": 6346,
    "preview": "import os\nimport platform\nimport re\nimport subprocess\n\nfrom ..utils.run_applescript import run_applescript, run_applescr"
  },
  {
    "path": "interpreter/core/computer/mouse/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/mouse/mouse.py",
    "chars": 12437,
    "preview": "import time\nimport warnings\n\nfrom IPython.display import display\nfrom PIL import Image\n\nfrom ...utils.lazy_import import"
  },
  {
    "path": "interpreter/core/computer/os/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/os/os.py",
    "chars": 2951,
    "preview": "import platform\nimport subprocess\n\n\nclass Os:\n    def __init__(self, computer):\n        self.computer = computer\n\n    de"
  },
  {
    "path": "interpreter/core/computer/skills/skills.py",
    "chars": 9701,
    "preview": "import glob\nimport inspect\nimport json\nimport os\nimport re\nimport subprocess\nfrom pathlib import Path\n\nfrom ....terminal"
  },
  {
    "path": "interpreter/core/computer/sms/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/sms/sms.py",
    "chars": 4732,
    "preview": "import datetime\nimport os\nimport plistlib\nimport sqlite3\nimport subprocess\nimport sys\nimport time\n\n\nclass SMS:\n    def _"
  },
  {
    "path": "interpreter/core/computer/terminal/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/terminal/base_language.py",
    "chars": 1090,
    "preview": "class BaseLanguage:\n    \"\"\"\n\n    Attributes\n\n    name = \"baselanguage\" # Name as it is seen by the LLM\n    file_extensio"
  },
  {
    "path": "interpreter/core/computer/terminal/languages/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/terminal/languages/applescript.py",
    "chars": 1812,
    "preview": "import os\n\nfrom .subprocess_language import SubprocessLanguage\n\n\nclass AppleScript(SubprocessLanguage):\n    file_extensi"
  },
  {
    "path": "interpreter/core/computer/terminal/languages/html.py",
    "chars": 858,
    "preview": "from ...utils.html_to_png_base64 import html_to_png_base64\nfrom ..base_language import BaseLanguage\n\n\nclass HTML(BaseLan"
  },
  {
    "path": "interpreter/core/computer/terminal/languages/java.py",
    "chars": 4477,
    "preview": "import os\nimport queue\nimport re\nimport subprocess\nimport threading\nimport time\nimport traceback\nfrom .subprocess_langua"
  },
  {
    "path": "interpreter/core/computer/terminal/languages/javascript.py",
    "chars": 1924,
    "preview": "import re\n\nfrom .subprocess_language import SubprocessLanguage\n\n\nclass JavaScript(SubprocessLanguage):\n    file_extensio"
  },
  {
    "path": "interpreter/core/computer/terminal/languages/jupyter_language.py",
    "chars": 20361,
    "preview": "\"\"\"\nThis is NOT jupyter language, this is just python. \nGotta split this out, generalize it, and move all the python add"
  },
  {
    "path": "interpreter/core/computer/terminal/languages/powershell.py",
    "chars": 2193,
    "preview": "import os\nimport platform\nimport shutil\n\nfrom .subprocess_language import SubprocessLanguage\n\n\nclass PowerShell(Subproce"
  },
  {
    "path": "interpreter/core/computer/terminal/languages/python.py",
    "chars": 294,
    "preview": "import os\n\nfrom .jupyter_language import JupyterLanguage\n\n# Suppresses a weird debugging error\nos.environ[\"PYDEVD_DISABL"
  },
  {
    "path": "interpreter/core/computer/terminal/languages/r.py",
    "chars": 2360,
    "preview": "import re\n\nfrom .subprocess_language import SubprocessLanguage\n\n\nclass R(SubprocessLanguage):\n    file_extension = \"r\"\n "
  },
  {
    "path": "interpreter/core/computer/terminal/languages/react.py",
    "chars": 2503,
    "preview": "import re\n\nfrom ...utils.html_to_png_base64 import html_to_png_base64\nfrom ..base_language import BaseLanguage\n\ntemplate"
  },
  {
    "path": "interpreter/core/computer/terminal/languages/ruby.py",
    "chars": 1773,
    "preview": "import re\nfrom pathlib import Path\nfrom .subprocess_language import SubprocessLanguage\n\n\nclass Ruby(SubprocessLanguage):"
  },
  {
    "path": "interpreter/core/computer/terminal/languages/shell.py",
    "chars": 2857,
    "preview": "import os\nimport platform\nimport re\n\nfrom .subprocess_language import SubprocessLanguage\n\n\nclass Shell(SubprocessLanguag"
  },
  {
    "path": "interpreter/core/computer/terminal/languages/subprocess_language.py",
    "chars": 6715,
    "preview": "import os\nimport queue\nimport re\nimport subprocess\nimport threading\nimport time\nimport traceback\n\nfrom ..base_language i"
  },
  {
    "path": "interpreter/core/computer/terminal/terminal.py",
    "chars": 8204,
    "preview": "import json\nimport os\nimport time\nimport subprocess\nimport getpass\n\nfrom ..utils.recipient_utils import parse_for_recipi"
  },
  {
    "path": "interpreter/core/computer/utils/computer_vision.py",
    "chars": 7064,
    "preview": "import io\n\nfrom ...utils.lazy_import import lazy_import\n\n# Lazy import of optional packages\nnp = lazy_import(\"numpy\")\ntr"
  },
  {
    "path": "interpreter/core/computer/utils/get_active_window.py",
    "chars": 1479,
    "preview": "import platform\nimport sys\n\n\ndef get_active_window():\n    if platform.system() == \"Windows\":\n        import pygetwindow "
  },
  {
    "path": "interpreter/core/computer/utils/html_to_png_base64.py",
    "chars": 1032,
    "preview": "import base64\nimport os\nimport random\nimport string\n\nfrom html2image import Html2Image\n\nfrom ....core.utils.lazy_import "
  },
  {
    "path": "interpreter/core/computer/utils/recipient_utils.py",
    "chars": 396,
    "preview": "def format_to_recipient(text, recipient):\n    return f\"@@@RECIPIENT:{recipient}@@@CONTENT:{text}@@@END\"\n\n\ndef parse_for_"
  },
  {
    "path": "interpreter/core/computer/utils/run_applescript.py",
    "chars": 1069,
    "preview": "import subprocess\n\n\ndef run_applescript(script):\n    \"\"\"\n    Runs the given AppleScript using osascript and returns the "
  },
  {
    "path": "interpreter/core/computer/vision/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/computer/vision/vision.py",
    "chars": 6235,
    "preview": "import base64\nimport contextlib\nimport io\nimport os\nimport tempfile\n\nfrom PIL import Image\n\nfrom ...utils.lazy_import im"
  },
  {
    "path": "interpreter/core/core.py",
    "chars": 18253,
    "preview": "\"\"\"\nThis file defines the Interpreter class.\nIt's the main file. `from interpreter import interpreter` will import an in"
  },
  {
    "path": "interpreter/core/default_system_message.py",
    "chars": 1342,
    "preview": "import getpass\nimport platform\n\ndefault_system_message = f\"\"\"\n\nYou are Open Interpreter, a world-class programmer that c"
  },
  {
    "path": "interpreter/core/llm/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "interpreter/core/llm/llm.py",
    "chars": 18098,
    "preview": "import os\n\nos.environ[\"LITELLM_LOCAL_MODEL_COST_MAP\"] = \"True\"\nimport sys\n\n# Note: litellm in DEV mode will load .env fi"
  },
  {
    "path": "interpreter/core/llm/run_function_calling_llm.py",
    "chars": 6426,
    "preview": "from .utils.merge_deltas import merge_deltas\nfrom .utils.parse_partial_json import parse_partial_json\n\nfunction_schema ="
  },
  {
    "path": "interpreter/core/llm/run_text_llm.py",
    "chars": 2550,
    "preview": "def run_text_llm(llm, params):\n    ## Setup\n\n    if llm.execution_instructions:\n        try:\n            # Add the syste"
  },
  {
    "path": "interpreter/core/llm/run_tool_calling_llm.py",
    "chars": 12105,
    "preview": "import os\nimport re\n\nfrom .utils.merge_deltas import merge_deltas\nfrom .utils.parse_partial_json import parse_partial_js"
  },
  {
    "path": "interpreter/core/llm/utils/convert_to_openai_messages.py",
    "chars": 11979,
    "preview": "import base64\nimport io\nimport json\nimport sys\n\nfrom PIL import Image\n\n\ndef convert_to_openai_messages(\n    messages,\n  "
  },
  {
    "path": "interpreter/core/llm/utils/merge_deltas.py",
    "chars": 711,
    "preview": "def merge_deltas(original, delta):\n    \"\"\"\n    Pushes the delta into the original and returns that.\n\n    Great for recon"
  },
  {
    "path": "interpreter/core/llm/utils/parse_partial_json.py",
    "chars": 1800,
    "preview": "import json\nimport re\n\n\ndef parse_partial_json(s):\n    # Attempt to parse the string as-is.\n    try:\n        return json"
  }
]

// ... and 71 more files (download for full content)

About this extraction

This page contains the full source code of the openinterpreter/open-interpreter GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 271 files (10.3 MB), approximately 2.7M tokens, and a symbol index with 536 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!