This commit is contained in:
p18457032 2024-07-19 17:38:57 +08:00
parent 69c247df84
commit 3aa6172211
1 changed files with 2 additions and 0 deletions

View File

@ -495,7 +495,9 @@ INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
2. 调用API
启动服务端成功后重新打开一个终端可参考执行以下python脚本
``` python
# client.py
from openai import OpenAI
# 如果启动服务时指定了api密钥需要修改为对应的密钥否则为"EMPTY"
openai_api_key = "CPMAPI"