支持的模型

支持 deepseek API 的模型:

  • deepseek-chat
  • deepseek-coder
from openai import OpenAI

client = OpenAI(
    api_key = "自己的API key",
    base_url = "https://api.fe8.cn/v1"
)

chat_completion = client.chat.completions.create(
    messages=[
        {
            "role": "user",
            "content": "讲个笑话",
        }
    ],
    model="deepseek-chat",
)
print(chat_completion.choices[0].message.content)

Was this page helpful?