import openai
from openai import OpenAI
API_SECRET_KEY = "你的智增增获取的api_key";
BASE_URL = "https://api.zhizengzeng.com/v1/"; #智增增的base_url
# 连续对话的实例,自己根据业务逻辑填充messages即可
def lianxu():
    client = OpenAI(api_key=API_SECRET_KEY, base_url=BASE_URL)
    resp = client.chat.completions.create(
        model="gpt-3.5-turbo",
        messages=[
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": "Who won the world series in 2020?"},
            {"role": "assistant", "content": "The Los Angeles Dodgers won the World Series in 2020."},
            {"role": "user", "content": "Where was it played?"}
        ]
    )
    print(resp)