> 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/open-interpreter.md).

# Open Interpreter

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

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

***

## ओपन इंटरप्रेटर क्या है?

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

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

{% hint style="info" %}
ओपन इंटरप्रेटर उन डेवलपर्स और शोधकर्ताओं के लिए बनाया गया है जो अपने पूरे कंप्यूट वातावरण के लिए एक संवादात्मक इंटरफ़ेस चाहते हैं। 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  | ओपन इंटरप्रेटर सर्वर | 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/*

# सभी extras के साथ 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 पर इंस्टॉलेशन (Bare Metal)

यदि आप 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": "/workspace में सभी Python फ़ाइलों की सूची बनाओ और कोड की पंक्तियाँ गिनो"}'
```

### स्थानीय पहुँच के लिए 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 में 7 दिनों से पुरानी सभी .log फ़ाइलें खोजें और उन्हें /backup/logs-$(date).tar.gz पर एक tarball में संपीड़ित करें।
```

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

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

***

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

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

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

***

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

```ini
# /etc/systemd/system/open-interpreter.service
[Unit]
Description=Open Interpreter सर्वर
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]
multi-user.target द्वारा वांछित
```

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

***

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

### `interpreter` कमांड नहीं मिली

```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 के बजाय

# या context window घटाएँ
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.07–0.21/hr                             | CodeLlama 13B Q8, Llama 3 8B, Mistral 7B — मजबूत कोडिंग गुणवत्ता             |
| RTX 4090  | 24 GB | $0.14–0.42/hr                             | CodeLlama 34B Q4, DeepSeek Coder 33B Q4 — GPT-4 के करीब कोडिंग गुणवत्ता      |
| A100 40GB | 40 GB | [bare metal](https://clore.ai/bare-metal) | Llama 3 70B Q4 — प्रोडक्शन-ग्रेड स्वायत्त कोडिंग एजेंट                       |
| केवल CPU  | —     | \~$0.02/hr                                | OpenAI/Anthropic API के माध्यम से कोई भी मॉडल — स्थानीय GPU की आवश्यकता नहीं |

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

**सर्वोत्तम स्थानीय मॉडल सेटअप:** चल रहा Ollama के साथ RTX 3090 `codellama:13b` आपको $0.07–0.21/hr में, बिना API लागत के, पूर्णतः स्वायत्त, गोपनीयता-संरक्षित कोडिंग एजेंट देता है।
{% endhint %}

***

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

* **GitHub**: <https://github.com/OpenInterpreter/open-interpreter> ⭐ 57K+
* **दस्तावेज़ीकरण**: <https://docs.openinterpreter.com>
* **Discord**: <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/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.
