How to Use DeepSeek R1 to Build an Open Source ChatGPT Operator Alternative

y combining DeepSeek R1 with tools like Browser Use, you can build a powerful, fully open-source alternative to ChatGPT Operator. Here's the tutorial:

Emmanuel Mumba

Emmanuel Mumba

27 January 2025

How to Use DeepSeek R1 to Build an Open Source ChatGPT Operator Alternative

The rise of open-source large language models (LLMs) has made it easier than ever to create AI-driven tools that rival proprietary solutions like OpenAI’s ChatGPT Operator. Among these open-source models, DeepSeek R1 stands out for its robust reasoning capabilities, free accessibility, and adaptability. By combining DeepSeek R1 with tools like Browser Use, you can build a powerful, fully open-source alternative to ChatGPT Operator without spending hundreds of dollars on premium subscriptions.

This article will guide you through the process of setting up DeepSeek R1 and Browser Use to create an AI agent capable of performing complex tasks, including web automation, reasoning, and natural language interactions.

Whether you're a beginner or an experienced developer, this step-by-step guide will help you get started.


What is ChatGPT Operator and Why You Need an Open Source Alternative?

ChatGPT Operator is a premium feature offered by OpenAI that allows users to create advanced AI agents capable of performing complex tasks such as reasoning, web automation, and multi-step problem-solving.

ChatGPT Operator costs $200 per month, making it less accessible for individuals, small businesses, or organizations with limited budgets.

ChatGPT Operator was booking a plan ticket in the above video

Why You Need an Open Source Alternative

While ChatGPT Operator is powerful, it has several limitations that make an open source alternative appealing:

By opting for open-source tools like DeepSeek R1 and Browser Use, you can overcome these challenges and unlock several benefits:

An open source approach not only reduces dependency on proprietary platforms but also empowers you to build a solution tailored to your needs while maintaining control over costs and data.

💡
Tired of Postman? Want to find a Cheaper, Better Postman Alternative, that is Full featured?

You have to take a look at Apidog, the All-in-One API Testing tool that runs you through the whole cycle, from API design down to API Documentation, and turbo-charge your development team's productivity!
button

Key Components: DeepSeek R1 and Browser Use

DeepSeek R1

DeepSeek R1 is an open-source LLM optimized for reasoning tasks. It excels in chain-of-thought problem solving, coding assistance, and natural language understanding. It is available in multiple sizes (e.g., 1.5B, 7B parameters), making it adaptable to different hardware capabilities.

DeepSeek R1 Review: API Pricing & How to Use DeepSeek R1 API
In this comprehensive guide, we will talk about the technical details of DeepSeek-R1, its pricing structure, how to use its API, and its benchmarks.

Browser Use

Browser Use is an open-source tool that enables AI agents to perform browser-based tasks such as web scraping, form filling, and automated navigation. It provides a user-friendly interface and can be integrated with LLMs like DeepSeek R1 for enhanced functionality.

GitHub - browser-use/browser-use: Make websites accessible for AI agents
Make websites accessible for AI agents. Contribute to browser-use/browser-use development by creating an account on GitHub.

Step 1: Setting Up Your Environment

Hardware Requirements

Operating System

Python Environment

Create a Python virtual environment to isolate dependencies:

python -m venv venv
source venv/bin/activate  # On Linux/macOS
# On Windows:
# venv\Scripts\activate

Install the required libraries:

pip install torch torchvision transformers sentencepiece

Step 2: Run DeepSeek with API or Locally with Ollama

DeepSeek API Usage

To interact with the DeepSeek API, follow these updated steps:

Obtain an API Key:

Make Your First API Call:
The DeepSeek API is compatible with OpenAI's API format, making it easy to integrate with existing OpenAI SDKs or software. Below is an example of a Python implementation:

from openai import OpenAI

client = OpenAI(api_key="<Your_DeepSeek_API_Key>", base_url="https://api.deepseek.com")

response = client.chat.completions.create(
    model="deepseek-reasoner",  # Use 'deepseek-reasoner' for DeepSeek-R1
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Explain quantum entanglement."}
    ],
    stream=False  # Set to True if you want streaming responses
)

print(response.choices[0].message.content)

cURL Example:
If you prefer using cURL, here’s how you can make a request:

curl https://api.deepseek.com/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <Your_DeepSeek_API_Key>" \
-d '{
    "model": "deepseek-reasoner",
    "messages": [
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "What is the capital of France?"}
    ],
    "stream": false
}'

Model Selection:

The base_url can also be set to https://api.deepseek.com/v1 for OpenAI-compatible configurations, though the /v1 path has no relationship with model versions.


Running DeepSeek Locally with Ollama

Ollama simplifies running large language models like DeepSeek-R1 on your local machine. Here’s how to correctly set up and use it:

Install Ollama:

Pull the Desired Model:
Use the following commands to download specific versions of DeepSeek-R1:

# For the 7B model (default):
ollama pull deepseek-r1:7b

# For a smaller 1.5B model:
ollama pull deepseek-r1:1.5b

# For larger models like 70B:
ollama pull deepseek-r1:70b

Run the Model Locally:
Once downloaded, run the model using:

ollama run deepseek-r1:7b

This will start an interactive session where you can interact with the model directly.

Model Variants:
DeepSeek offers several distilled versions based on Qwen and Llama architectures, optimized for different use cases:

DeepSeek-R1-Distill-Qwen-7B:

ollama run deepseek-r1:7b-qwen-distill

DeepSeek-R1-Distill-Llama-70B:

ollama run deepseek-r1:70b-llama-distill

Hardware Considerations:

Interactive Chat via API:
Ollama provides an API to integrate locally running models into your applications:

curl http://localhost:11434/api/chat -d '{
    "model": "deepseek-r1:7b",
    "messages": [
        {"role": "user", "content": "Write a short poem about the stars."}
    ]
}'

Step 3: Installing Browser Use

Browser Use enables your AI agent to interact with web browsers. Follow these steps:

Installation

Clone the Browser Use repository from GitHub:

git clone https://github.com/browser-use/browser-use.git
cd browser-use
pip install -r requirements.txt

Configuration

Set up the Browser Use WebUI:

python webui.py

Open the WebUI in your browser to configure agent settings. You can specify:


Step 4: Combining DeepSeek R1 and Browser Use

To create a functional AI agent that integrates both tools:

Agent Configuration

Modify the agent settings in Browser Use to connect it with DeepSeek R1:

{
  "model": "deepseek-r1",
  "base_url": "http://localhost:5000",
  "browser_settings": {
    "window_height": 1080,
    "window_width": 1920,
    "keep_browser_open": true
  }
}

Running the Agent

Start both DeepSeek R1 and Browser Use:

# Start DeepSeek R1 API server
python -m deepseek.api_server

# Start Browser Use WebUI
python webui.py

Once both services are running, the agent can perform tasks such as filling forms, scraping data, or navigating websites autonomously.


Step 5: Prompt Engineering for Better Results

To optimize the performance of your AI agent, use prompt engineering techniques. For example:

General Prompt Template

<instructions>
You are an AI assistant tasked with automating web tasks using Browser Use.
Follow these steps:
1. Navigate to [website].
2. Perform [specific task].
3. Return results in a structured format.
</instructions>
<example>
Navigate to https://example.com and extract all hyperlinks.
</example>

This structure ensures clarity and improves task execution accuracy.

Here are some demos that you can try out by running:

uv pip install gradio

python examples/gradio_demo.py

Example 1.

Prompt: Write a letter in Google Docs to my Papa, thanking him for everything, and save the document as a PDF.

Example 2.

Prompt: Find flights on kayak.com from Zurich to Beijing from 25.12.2024 to 02.02.2025.

Example 3.

Prompt: Read my CV & find ML jobs, save them to a file, and then start applying for them in new tabs, if you need help, ask me.'

0:00
/

Conclusion

By combining DeepSeek R1 with Browser Use, you can build a fully functional ChatGPT Operator alternative that is free, open source, and highly customizable. This setup not only saves costs but also gives you full control over data privacy and system behavior.

Whether you're automating web tasks, building conversational agents, or experimenting with advanced AI features like Retrieval-Augmented Generation, this guide provides everything you need to get started. Embrace the power of open source and create your own intelligent assistant today!

💡
Tired of Postman? Want to find a Cheaper, Better Postman Alternative, that is Full featured?

You have to take a look at Apidog, the All-in-One API Testing tool that runs you through the whole cycle, from API design down to API Documentation, and turbo-charge your development team's productivity!
button

Explore more

How to Get 500 More Cursor Premium Requests with Interactive Feedback MCP Server

How to Get 500 More Cursor Premium Requests with Interactive Feedback MCP Server

If you're a Cursor Premium user, you've probably felt the frustration of hitting the 500 fast request limit faster than expected. One moment you're in a productive coding flow, and the next, you're staring at the dreaded "You've hit your limit of 500 fast requests" message. What if I told you there's a way to effectively double your request efficiency and make those 500 requests feel like 1000? 💡Want a great API Testing tool that generates beautiful API Documentation? Want an integrated, All-

5 June 2025

Is ChatGPT Pro Worth $200 Per Month?

Is ChatGPT Pro Worth $200 Per Month?

If you've been using ChatGPT regularly and find yourself repeatedly hitting usage limits or wishing for more advanced capabilities, you may have encountered mentions of ChatGPT Pro—OpenAI's premium subscription tier priced at 200 per month. This significant price jump from the more widely known ChatGPT Plus (20/month) raises an important question: Is ChatGPT Pro actually worth ten times the cost of Plus? The answer depends largely on your specific use cases, professional needs, and how you valu

5 June 2025

10 Fintech APIs and Solutions for Developers in 2025

10 Fintech APIs and Solutions for Developers in 2025

The financial technology landscape is undergoing a rapid transformation as innovative APIs (Application Programming Interfaces) revolutionize how we build banking services, payment systems, investment platforms, and other financial applications. For developers working in this space, selecting the right fintech API is critical—it can make the difference between a seamless user experience and a frustrating one, between robust security and potential vulnerabilities. As fintech applications become

5 June 2025

Practice API Design-first in Apidog

Discover an easier way to build and use APIs