Skip to main content

easy use the deepseek model

Project description

🚀 DeepSeekAI: easy use the deepseek model

Install

  • Install from source (Recommend)
cd deepseek_ai
pip install -e .
  • Install from PyPI
pip install deepseek-ai

Quick Start

  • All the code can be found in the examples
  • Set DeepSeek API key in environment if using DeepSeek models: export DEEPSEEK_API_KEY="sk-...".
  • Maybe you can try loading environment variables like this. Create a new .env file
DEEPSEEK_API_KEY="sk-..."
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv(), override=True)
It works with the Langchain library
from deepseek_ai import DeepSeekAI

client = DeepSeekAI(
    api_key="sk-...",
)

messages = [{"role": "user", "content": "9.11 and 9.8, which is greater?"}]

response = client.chat.completions.create(
    model="deepseek_ai-chat",
    messages=messages
)

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deepseek_ai-0.0.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deepseek_ai-0.0.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file deepseek_ai-0.0.1.tar.gz.

File metadata

  • Download URL: deepseek_ai-0.0.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.10.14 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for deepseek_ai-0.0.1.tar.gz
Algorithm Hash digest
SHA256 bd5e660e19ef64a8eed05a0613a5e070d46b2c869c67a87135234e1f963a0db6
MD5 7712f87faacb1b79047a7298ee1e8d58
BLAKE2b-256 d03540ab4e870a27efe737798e0d06531504cc9518389298ddae73a61a8365e8

See more details on using hashes here.

File details

Details for the file deepseek_ai-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: deepseek_ai-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.10.14 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for deepseek_ai-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 04eef34cc411436d9cd38f39642267e456fbcf9b75714e998a3bc8e1717bf731
MD5 5f68d5c69bcdf2c4db94136e19a4de26
BLAKE2b-256 0737ace0d573e7cd0c59fdfe9872afc6abe19c143a4bd456196a73e0f9eccdbb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page