Spaces:
Runtime error
Runtime error
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",
|