> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-hi/ai-platforms-and-agents/open-interpreter.md).

# Open Interpreter

**ओपन इंटरप्रेटर** भाषा मॉडल्स को आपके मशीन पर कोड चलाने, वेब ब्राउज़ करने और फ़ाइलें संपादित करने देता है एक प्राकृतिक भाषा चैट इंटरफ़ेस के माध्यम से। 57K+ GitHub स्टार्स के साथ, यह ChatGPT के Code Interpreter का प्रमुख ओपन-सोर्स विकल्प है — पर सैंडबॉक्स सीमाओं के बिना।

{% hint style="success" %}
सभी उदाहरण GPU सर्वरों पर चलाए जा सकते हैं जिन्हें के माध्यम से किराये पर लिया जा सकता है [CLORE.AI मार्केटप्लेस](https://clore.ai/marketplace).
{% endhint %}

***

## Open Interpreter क्या है?

Open Interpreter एक AI कोडिंग सहायक की शक्ति सीधे आपके टर्मिनल तक लाता है। ChatGPT और आपके शेल के बीच कॉपी-पेस्ट करने के बजाय, आप प्राकृतिक रूप से चैट करते हैं और मॉडल वास्तविक समय में कोड निष्पादित करता है:

* **Python, JS, shell, R, AppleScript चलाएँ** — सीधे आपके सर्वर पर
* **वेब ब्राउज़ करें** — पेज लाएं, फॉर्म भरें, डेटा निकालें
* **फ़ाइलें संपादित करें** — डिस्क पर किसी भी फ़ाइल को बनाएं, संशोधित करें और प्रबंधित करें
* **स्थायी स्थिति** — वेरिएबल्स, इम्पोर्ट्स और परिणाम संदेशों के बीच जीवित रहते हैं
* **कई LLM बैकएंड** — OpenAI, Anthropic, स्थानीय मॉडल Ollama/LlamaCpp के माध्यम से

{% hint style="info" %}
Open Interpreter उन डेवलपर्स और शोधकर्ताओं के लिए डिज़ाइन किया गया है जो अपनी पूरी कंप्यूट वातावरण के लिए एक वार्तालाप इंटरफ़ेस चाहते हैं। Clore.ai GPU सर्वर पर, आपको एक शक्तिशाली मशीन मिलती है पूर्ण इंटरनेट पहुँच और कोई निष्पादन सीमाएँ नहीं।
{% endhint %}

***

## सर्वर आवश्यकताएँ

| घटक             | न्यूनतम                 | अनुशंसित                            |
| --------------- | ----------------------- | ----------------------------------- |
| GPU             | कोई भी (CPU मोड उपलब्ध) | स्थानीय LLMs के लिए RTX 3090 / A100 |
| VRAM            | आणविक गतिशीलता          | स्थानीय 13B मॉडल्स के लिए 24 GB+    |
| RAM             | 8 GB                    | 16 GB+                              |
| CPU             | 4 कोर                   | 8+ कोर                              |
| स्टोरेज         | 20 GB                   | 50 GB+                              |
| ऑपरेटिंग सिस्टम | Ubuntu 20.04+           | Ubuntu 22.04                        |
| Python          | 3.10+                   | 3.11                                |
| नेटवर्क         | आवश्यक                  | वेब ब्राउज़िंग के लिए हाई-स्पीड     |

***

## पोर्ट्स

| पोर्ट | सेवा                   | नोट्स                            |
| ----- | ---------------------- | -------------------------------- |
| 22    | SSH                    | टर्मिनल पहुँच, वेब UI के लिए टनल |
| 8000  | Open Interpreter सर्वर | REST API और वैकल्पिक वेब UI      |

***

## Docker के साथ क्विक स्टार्ट

Open Interpreter के पास आधिकारिक Docker इमेज नहीं है, इसलिए हम एक साफ़ इमेज बनाते हैं। यह तरीका आपको किसी भी Clore.ai सर्वर पर एक पुनरुत्पाद्य, अलग-थलग वातावरण देता है।

### Dockerfile

```dockerfile
FROM python:3.11-slim

# सिस्टम निर्भरताएँ
RUN apt-get update && apt-get install -y \
    git \
    curl \
    wget \
    build-essential \
    nodejs \
    npm \
    chromium \
    chromium-driver \
    && rm -rf /var/lib/apt/lists/*

# सभी एक्स्ट्रा के साथ Open Interpreter इंस्टॉल करें
RUN pip install --no-cache-dir \
    open-interpreter \
    'open-interpreter[local]' \
    playwright \
    jupyter

# Playwright ब्राउज़र इंस्टॉल करें
RUN playwright install chromium

WORKDIR /workspace

# सर्वर पोर्ट एक्सपोज़ करें
EXPOSE 8000

# डिफ़ॉल्ट: इंटरैक्टिव टर्मिनल
CMD ["interpreter"]
```

### बिल्ड और चलाएँ

```bash
# इमेज बनाएं
docker build -t open-interpreter:latest .

# इंटरैक्टिव मोड चलाएँ (टर्मिनल चैट)
docker run -it --rm \
  -e OPENAI_API_KEY=sk-... \
  -v $(pwd)/workspace:/workspace \
  open-interpreter:latest

# REST API सर्वर के रूप में चलाएँ
docker run -d \
  --name open-interpreter \
  -p 8000:8000 \
  -e OPENAI_API_KEY=sk-... \
  -v $(pwd)/workspace:/workspace \
  open-interpreter:latest \
  interpreter --server --port 8000 --host 0.0.0.0
```

***

## Clore.ai पर इंस्टॉलेशन (बेर मेटल)

यदि आप Docker के बिना सीधे Clore.ai सर्वर पर चलाना पसंद करते हैं:

### चरण 1 — एक सर्वर किराए पर लें

1. जाएँ [Clore.ai मार्केटप्लेस](https://clore.ai/marketplace)
2. फ़िल्टर करें **RAM ≥ 16 GB**, **GPU** (वैकल्पिक लेकिन स्थानीय मॉडलों के लिए उपयोगी)
3. ऐसा सर्वर चुनें जिसमें **PyTorch** इमेज जेनरेट करें **Ubuntu** बेस इमेज
4. खुला **SSH पोर्ट 22** और वैकल्पिक रूप से **8000** आपके ऑर्डर में

### चरण 2 — SSH के द्वारा कनेक्ट करें

```bash
ssh root@<server-ip> -p <ssh-port>
```

### चरण 3 — निर्भरताएँ इंस्टॉल करें

```bash
# सिस्टम अपडेट करें
apt-get update && apt-get upgrade -y

# Python 3.11 इंस्टॉल करें
apt-get install -y python3.11 python3.11-venv python3.11-pip nodejs npm curl

# वर्चुअल एन्वायरनमेंट बनाएं
python3.11 -m venv /opt/open-interpreter
source /opt/open-interpreter/bin/activate
```

### चरण 4 — Open Interpreter इंस्टॉल करें

```bash
# बुनियादी इंस्टॉल
pip install open-interpreter

# स्थानीय LLM सपोर्ट के साथ (Ollama, LlamaCpp)
pip install 'open-interpreter[local]'

# ब्राउज़र/वेब सपोर्ट के साथ
pip install playwright
playwright install chromium
```

### चरण 5 — API की कॉन्फ़िगर करें

```bash
# एन्वायरनमेंट वेरिएबल सेट करें (स्थायी के लिए ~/.bashrc में जोड़ें)
export OPENAI_API_KEY=sk-your-key-here
export ANTHROPIC_API_KEY=sk-ant-your-key-here

# या .env फ़ाइल का उपयोग करें
cat > /workspace/.env << 'EOF'
OPENAI_API_KEY=sk-your-key-here
ANTHROPIC_API_KEY=sk-ant-your-key-here
EOF
```

### चरण 6 — पहली बार चलाएँ

```bash
# एन्वायरनमेंट सक्रिय करें
source /opt/open-interpreter/bin/activate

# इंटरैक्टिव चैट शुरू करें
interpreter

# या किसी विशेष मॉडल के साथ
interpreter --model gpt-4o
interpreter --model claude-3-5-sonnet-20241022
```

***

## स्थानीय LLMs का उपयोग करना (API की आवश्यक नहीं)

Clore.ai GPU सर्वर्स पर Open Interpreter की एक प्रमुख विशेषता पूरी तरह से स्थानीय मॉडल चलाना है:

### विकल्प A: Ollama बैकएंड

```bash
# Ollama इंस्टॉल करें
curl -fsSL https://ollama.ai/install.sh | sh

# एक कोड-सक्षम मॉडल पुल करें
ollama pull codellama:13b
ollama pull deepseek-coder:6.7b
ollama pull mistral:7b

# Ollama के साथ Open Interpreter चलाएँ
interpreter --model ollama/codellama:13b
```

### विकल्प B: LlamaCpp बैकएंड

```bash
# CUDA सपोर्ट के साथ llama-cpp-python इंस्टॉल करें
pip install 'llama-cpp-python[server]' --extra-index-url https://jllllll.github.io/llama-cpp-python-cuBLAS-wheels/AVX2/cu121

# एक GGUF मॉडल डाउनलोड करें
wget https://huggingface.co/TheBloke/CodeLlama-13B-GGUF/resolve/main/codellama-13b.Q4_K_M.gguf

# स्थानीय मॉडल के साथ चलाएँ
interpreter --local --model /path/to/codellama-13b.Q4_K_M.gguf
```

***

## सर्वर के रूप में चलाना (REST API)

Open Interpreter 0.2+ में प्रोग्रामेटिक एक्सेस के लिए बिल्ट-इन HTTP सर्वर शामिल है:

```bash
# सर्वर शुरू करें
interpreter --server --port 8000 --host 0.0.0.0

# किसी अन्य टर्मिनल या क्लाइंट में, अनुरोध भेजें:
curl -X POST http://<server-ip>:8000/run \
  -H "Content-Type: application/json" \
  -d '{"language": "python", "code": "import os; print(os.listdir(\".\"))"}'

# चैट एंडपॉइंट
curl -X POST http://<server-ip>:8000/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "List all Python files in /workspace and count lines of code"}'
```

### लोकल एक्सेस के लिए SSH टनल

यदि पोर्ट 8000 सार्वजनिक रूप से एक्सपोज़ नहीं है, तो SSH टनलिंग का उपयोग करें:

```bash
# आपकी स्थानीय मशीन पर
ssh -L 8000:localhost:8000 root@<server-ip> -p <ssh-port> -N
# फिर खोलें http://localhost:8000
```

***

## व्यावहारिक उदाहरण

### उदाहरण 1: डेटा विश्लेषण पाइपलाइन

```
यूज़र: MNIST डेटासेट डाउनलोड करें, एक साधारण CNN ट्रेन करें, और सटीकता वक्र प्लॉट करें। प्लॉट को mnist_results.png के रूप में सेव करें

Open Interpreter: ज़रूर! मैं इसे चरण दर चरण करूँगा...
[वास्तविक समय में Python कोड निष्पादित करता है]
```

```python
# Open Interpreter उत्पन्न करता है और चलाता है:
import tensorflow as tf
import matplotlib.pyplot as plt
import numpy as np

(x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data()
# ... मॉडल ट्रेन करता है, परिणाम प्लॉट करता है, PNG सहेजता है
```

### उदाहरण 2: वेब स्क्रैपिंग

```
यूज़र: आज के शीर्ष 10 ट्रेंडिंग GitHub रिपॉज़िटरी स्क्रैप करें और उन्हें एक CSV में सेव करें जिसमें नाम, स्टार्स और विवरण हो।
```

### उदाहरण 3: फ़ाइल प्रबंधन

```
यूज़र: /var/log में सभी .log फ़ाइलें ढूँढें जो 7 दिनों से पुरानी हैं और उन्हें /backup/logs-$(date).tar.gz पर एक टारबॉल में कम्प्रेस करें
```

### उदाहरण 4: सिस्टम मॉनिटरिंग स्क्रिप्ट

```
यूज़र: मुझे एक Python स्क्रिप्ट लिखें जो हर 5 सेकंड में GPU मेमोरी उपयोग की निगरानी करे और यदि यह 90% से अधिक हो तो अलर्ट करे। इसे बैकग्राउंड में चलाएँ।
```

***

## कॉन्फ़िगरेशन फ़ाइल

बनाएँ `~/.interpreter/config.yaml` डिफ़ॉल्ट सेट करने के लिए:

```yaml
model: gpt-4o
temperature: 0
system_message: |
  आप एक सहायक AI हैं जो Clore.ai GPU सर्वर पर चल रहा है।
  हमेशा कुशल, प्रोडक्शन-रेडी कोड को प्राथमिकता दें।
  महत्वपूर्ण आउटपुट /workspace/ में सहेज़ें।
safe_mode: false
auto_run: true
verbose: false
```

***

## systemd के साथ चलाना (स्थायी सेवा)

```ini
# /etc/systemd/system/open-interpreter.service
[Unit]
Description=Open Interpreter Server
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/workspace
Environment=OPENAI_API_KEY=sk-your-key
ExecStart=/opt/open-interpreter/bin/interpreter --server --port 8000 --host 0.0.0.0
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target
```

```bash
systemctl daemon-reload
systemctl enable open-interpreter
systemctl start open-interpreter
systemctl status open-interpreter
```

***

## समस्या निवारण

### `interpreter` command नहीं मिला

```bash
# सुनिश्चित करें कि venv सक्रिय है
source /opt/open-interpreter/bin/activate

# या ग्लोबली इंस्टॉल करें
pip install open-interpreter

# PATH जांचें
which interpreter
echo $PATH
```

### कोड निष्पादन ब्लॉक है / सेफ़्टी मोड

```bash
# सेफ मोड डिसेबल करें (विश्वसनीय सर्वर्स पर सावधानी के साथ उपयोग करें)
interpreter --safe_mode false

# या config.yaml में:
# safe_mode: false
# auto_run: true
```

### Playwright / ब्राउज़र त्रुटियाँ

```bash
# Chromium के लिए सिस्टम डिप्स इंस्टॉल करें
apt-get install -y \
    libnss3 libatk1.0-0 libatk-bridge2.0-0 \
    libcups2 libxcomposite1 libxdamage1 \
    libxrandr2 libgbm1 libxkbcommon0

playwright install chromium
playwright install-deps
```

### स्थानीय LLMs के साथ मेमोरी ख़त्म होना

```bash
# एक छोटा क्वांटाइज़्ड मॉडल उपयोग करें
ollama pull codellama:7b  # 13b के बजाय

# या कंटेक्स्ट विंडो घटाएँ
interpreter --model ollama/codellama:7b --context_window 4096
```

### पोर्ट 8000 पर कनेक्शन अस्वीकार

```bash
# जांचें कि सर्वर चल रहा है या नहीं
ss -tlnp | grep 8000

# फ़ायरवाल जांचें
ufw allow 8000/tcp

# सेवा पुनरारंभ करें
systemctl restart open-interpreter
```

### API दर सीमाएँ

```bash
# उच्च सीमाओं के लिए Anthropic Claude पर स्विच करें
export ANTHROPIC_API_KEY=sk-ant-...
interpreter --model claude-3-5-sonnet-20241022

# या API सीमाओं से पूरी तरह बचने के लिए लोकल मॉडल का उपयोग करें
interpreter --model ollama/codellama:13b
```

***

## सुरक्षा विचार

{% hint style="warning" %}
Open Interpreter आपके सर्वर पर सीधे कोड निष्पादित करता है। हमेशा:

* उत्पादन उपयोग के लिए Docker कंटेनर या VM में चलाएँ
* प्रमाणीकरण के बिना पोर्ट 8000 को सार्वजनिक रूप से कभी एक्सपोज़ न करें
* रिमोट एक्सेस के लिए SSH टनलिंग का उपयोग करें
* सक्षम करने से पहले कोड का ऑडिट करें `auto_run: true` अविश्वसनीय इनपुट्स के लिए
  {% endhint %}

***

## Clore.ai GPU सिफारिशें

Open Interpreter स्वयं हल्का है — GPU की आवश्यकता उस लोकल मॉडल से निर्धारित होती है जो **लोकल मॉडल** आप बैकएंड के रूप में चलाते हैं।

| GPU       | VRAM           | Clore.ai कीमत | लोकल मॉडल सिफारिश                                                           |
| --------- | -------------- | ------------- | --------------------------------------------------------------------------- |
| RTX 3090  | 24 GB          | \~$0.12/घंटा  | CodeLlama 13B Q8, Llama 3 8B, Mistral 7B — मजबूत कोडिंग गुणवत्ता            |
| RTX 4090  | 24 GB          | \~$0.70/घंटा  | CodeLlama 34B Q4, DeepSeek Coder 33B Q4 — GPT-4 के समीप कोडिंग गुणवत्ता     |
| A100 40GB | 40 GB          | \~$1.20/घंटा  | Llama 3 70B Q4 — उत्पादन-प्रमाण ऑटोनॉमस कोडिंग एजेंट                        |
| केवल CPU  | आणविक गतिशीलता | \~$0.02/घं    | OpenAI/Anthropic API के माध्यम से कोई भी मॉडल — किसी लोकल GPU की जरूरत नहीं |

{% hint style="info" %}
**यदि आप OpenAI/Anthropic API का उपयोग कर रहे हैं:** आपको केवल एक CPU इंस्टेंस की आवश्यकता है (\~$0.02/घं) — GPU अप्रासंगिक है क्योंकि इनफरेंस क्लाउड में चलता है। केवल तब GPU इंस्टेंस चुनें जब आप **लोकल मॉडल** प्रति-टोकन API लागत से बचने के लिए।

**श्रेष्ठ लोकल मॉडल सेटअप:** RTX 3090 + Ollama चल रहा है `codellama:13b` आपको लगभग \~$0.12/घं में एक पूर्ण रूप से स्वायत्त, गोपनीयता-संरक्षित कोडिंग एजेंट देता है जिसमें कोई API लागत नहीं है।
{% endhint %}

***

## उपयोगी लिंक

* **GitHub**: <https://github.com/OpenInterpreter/open-interpreter> ⭐ 57K+
* **दस्तावेज़ीकरण**: <https://docs.openinterpreter.com>
* **/ <support@clore.ai>**: <https://discord.gg/Hvz9Axh84z>
* **Clore.ai मार्केटप्लेस**: <https://clore.ai/marketplace>
* **Ollama मॉडल**: <https://ollama.ai/library>
* **HuggingFace GGUF मॉडल**: <https://huggingface.co/TheBloke>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-hi/ai-platforms-and-agents/open-interpreter.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
