pip install openai
#encoding='utf-8'from openai import OpenAIclient = OpenAI(api_key="sk-c24d07ed505e4626a3c9721613b43888", 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.encode('utf-8'))

