1. DeepSeek in Python
Welcome to the course! I'm James, and I'll be your host as we explore using DeepSeek models in Python!
2. Coming up...
In this course, you'll learn how to access and use DeepSeek models to solve a wide range of real-world tasks, leading up to creating chatbots for education and code generation.
To do this, we'll be using Python code throughout the course, and expect familiarity with a few Python programming topics like subsetting lists and dictionaries, control flow, and looping. However, no experience with AI or machine learning is required.
With that, let's dive in!
3. DeepSeek
DeepSeek is an AI company based in China developing cutting-edge, open-source large language models for the AI community.
DeepSeek made major waves with the release of the V3 and R1 models, which outperformed many market-leading models for a fraction of the development cost.
4. DeepSeek model types
V3 is a so-called chat model, which means it's designed to generate conversations, primarily for chatbot applications.
R1 is a so-called reasoning model, which means it's designed for deeper reasoning tasks like data analysis, research, and coding assistance. We'll begin to explore reasoning models in the third video of this course.
5. Accessing DeepSeek models
DeepSeek provides an API for accessing these models programmatically,
6. Accessing DeepSeek models
but we will not be using it in this course. This is avoid data sharing to servers outside of the US and EU.
Instead, other providers host DeepSeek's models for the community to access and run, and
7. Accessing DeepSeek models
we'll be using Together.ai for this.
Together AI hosts DeepSeek's chat and reasoning models, among other models like Llama, Qwen, and Mistral. Using Together AI's API will mean that data can be more securely exchanged with servers based in the U.S.
8. What is an API?
So what actually is an API? API stands for Application Programming Interface, and they act as messengers between software applications, taking a request to a system and receiving a response containing data or services.
9. What is an API?
APIs are like waiters in a restaurant; they take our order, or request, communicate it to the kitchen - the system providing the service - and finally, deliver the food, or response from the system, back to our table.
10. What is an API?
Many applications interact using APIs: a mobile weather app may send our location to an API and request the local weather forecast, which is returned back to our phones.
11. DeepSeek models via APIs
Similarly, we can write code to interact with Together.ai's API and request the use of DeepSeek models.
12. DeepSeek models via APIs
Our request, in this case, will specify which model we want, the data for the model to use, and any other parameters to customize the model's behavior.
The response, containing the model result, is then returned.
13. Why use DeepSeek via an API?
Some of DeepSeek's models can be used in a chatbot application, so why bother using an API at all?
A low-setup chatbot experience is often sufficient for augmenting our personal workflows with AI.
However, if we're looking to integrate AI into our products, customer experiences, or automate business processes and tasks, we'll need the flexibility of working with the models programmatically using an API.
14. Let's practice!
Time to start working with DeepSeek in Python!