在 Python 使用 DeepSeek

使用 Python 操作 DeepSeek

James Chapman

AI Curriculum Lead, DataCamp

接下來…

 

課程目標
  • 存取 DeepSeek 模型
  • 解決真實情境任務
  • 自建聊天機器人!🤖
  • Python 程式碼完成!

 

預期先備知識
  • 取用 Python 串列與 dictionary 的子集
  • 控制流程 → ifelifelse
  • 迴圈 → forwhile

 

不需要會的
  • AI 或機器學習
使用 Python 操作 DeepSeek

DeepSeek 標誌。

  • 總部在「China」的 AI 公司
  • 訓練 V3R1 模型,成本比市面領先者便宜約 30 倍
使用 Python 操作 DeepSeek

一個模型,兩種模式

聊天圖示。

Chat 模式

  • 產生對話
  • 用途:聊天機器人

推理圖示。

Reasoning 模式

  • 更深入的推理
  • 用途:資料分析、研究、程式輔助
使用 Python 操作 DeepSeek

存取 DeepSeek 模型

DeepSeek 標誌。

使用 Python 操作 DeepSeek

存取 DeepSeek 模型

被劃掉的 DeepSeek API。

使用 Python 操作 DeepSeek

存取 DeepSeek 模型

Together.ai API 與其支援的部分模型。

使用 Python 操作 DeepSeek

什麼是 API?

  • Application Programming Interface

電腦向 API 發送請求。

使用 Python 操作 DeepSeek

什麼是 API?

  • Application Programming Interface

服務生在廚房與餐桌之間傳遞點單與餐點,模擬 API 在裝置與系統間的運作。

使用 Python 操作 DeepSeek

什麼是 API?

裝置位置傳送到 API,再寫入資料庫。API 回傳系統的回應——天氣預報——回到裝置。

使用 Python 操作 DeepSeek

透過 API 使用 DeepSeek 模型

電腦向 Together.ai API 發送請求。

使用 Python 操作 DeepSeek

透過 API 使用 DeepSeek 模型

電腦向 Together.ai API 發送請求,其中包含模型、資料與模型參數。

使用 Python 操作 DeepSeek

為何透過 API 使用 DeepSeek?

 

Chatbot

  • 強化個人工作流程與任務

 

API

  • 為產品、體驗與流程整合 AI 提供_彈性_
  • 以程式語言互動

電腦與 Together.ai API 互動。

使用 Python 操作 DeepSeek

一起來練習吧!

使用 Python 操作 DeepSeek

Preparing Video For Download...