Choose your path
bài viết thử nghiệm
bài viết thử nghiệm
Dùng phần tóm tắt này để nhận câu trả lời nhanh, sau đó đọc hướng dẫn để hiểu thêm ngữ cảnh, ví dụ và chi tiết triển khai.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_COMETAPI_KEY",
base_url="https://api.cometapi.com/v1",
)
response = client.chat.completions.create(
model="gpt-5-mini",
messages=[{"role": "user", "content": "Build this workflow."}],
)
print(response.choices[0].message.content)