refactor(ch1-4): align filenames and update corresponding README sections

This commit is contained in:
Annyfee
2026-01-03 15:35:39 +08:00
parent b6482f1cf6
commit 43fc1717b5
12 changed files with 9 additions and 9 deletions
@@ -0,0 +1,17 @@
from config import OPENAI_API_KEY
from openai import OpenAI
client = OpenAI(
api_key=OPENAI_API_KEY,
base_url="https://api.deepseek.com")
response = client.chat.completions.create(
model="deepseek-chat",
messages=[
{"role": "system", "content": "You are a helpful assistant"}, # 提示词角色
{"role": "user", "content": "Hello"}, # 用户输入的对话
],
stream=False # 非流式输出, 只会等语句全部生成才返回
)
print(response.choices[0].message.content)