Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

DeepSeek vs. OpenAI: A Simple Chatbot Demo

This project is a minimal example of using DeepSeek's local model for chatbot responses. Its purpose is to demonstrate just how inefficient DeepSeek can be when compared to OpenAI's models—and why many developers continue to choose OpenAI.

Note:
This project is for educational purposes only. It highlights the performance and response quality differences between DeepSeek and OpenAI.

Features

  • Quick & Simple Setup: Get a working chatbot in minutes.
  • Flask Web Interface: Chat with the model using your browser.
  • Clean Output: Only the final answer is shown (no internal reasoning).
  • Educational Comparison: See firsthand how DeepSeek falls short compared to OpenAI.

Prerequisites

  • Python 3.8 or higher
  • pip

Optional: A CUDA-capable GPU if you want to speed up model inference.

Installation

  1. Clone the Repository:

    git clone https://github.com/yourusername/deepseek-vs-openai.git
    cd deepseek-vs-openai
  2. Install the Dependencies:

    pip install -r requirements.txt
  3. Download the DeepSeek Model:

    This will automatically download the model via Hugging Face (please be patient as it might take a while):

    python deepseek_model.py

Usage

Start the Chatbot Server

Run the following command:

python app.py

Then, open your browser and navigate to http://127.0.0.1:5000/ to start chatting.

Run a Sample Script

If you prefer a command-line test of the chatbot, run:

python main.py

This script generates a response to a sample query and prints the output.

How It Works

  • Simplified Prompt: The chatbot builds a prompt that includes any previous conversation history and instructs the model to output only a final answer (prefixed with Final Answer:) without internal reasoning.
  • Post-Processing: The application extracts and displays only the final answer.
  • Token Limit: Although the model can use up to 12,000 tokens, DeepSeek’s inefficiency may result in shorter or less coherent outputs compared to OpenAI.

Contributing

Contributions are welcome! Feel free to fork this project and submit a pull request if you have ideas to improve the demo or add new features.

License

This project is licensed under the MIT License.


Enjoy exploring the differences between DeepSeek and OpenAI!


---

About

Lets have fun

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages