Spaces:
Running
Running
Update PCAgent/api.py
Browse files- PCAgent/api.py +1 -1
PCAgent/api.py
CHANGED
@@ -50,7 +50,7 @@ def inference_chat(chat, model, api_url, token):
|
|
50 |
response = requests.request("POST", api_url, headers=headers, data=payload)
|
51 |
data = response.json()
|
52 |
print(data)
|
53 |
-
return data['
|
54 |
|
55 |
# client = OpenAI(
|
56 |
# # 若没有配置环境变量,请用百炼API Key将下行替换为:api_key="sk-xxx",
|
|
|
50 |
response = requests.request("POST", api_url, headers=headers, data=payload)
|
51 |
data = response.json()
|
52 |
print(data)
|
53 |
+
return data['choices'][0]['message']['content']
|
54 |
|
55 |
# client = OpenAI(
|
56 |
# # 若没有配置环境变量,请用百炼API Key将下行替换为:api_key="sk-xxx",
|