您可以通过任何语言的 HTTP 请求、我们的官方 Python 绑定、我们的官方 Node.js 库或社区维护的库与 API 交互。
要安装官方 Python 绑定,请运行以下命令:
pip install openai
key='sk-xxxx' from openai import OpenAI client = OpenAI( base_url="https://api.aimanyi.top/v1", api_key=key ) response = client.chat.completions.create( model="gpt-4o", messages=[ {"role": "user", "content": "你好?"}, ], timeout=100, ) print(response)