junyangwang0410 commited on
Commit
f11d61b
·
verified ·
1 Parent(s): 6b356fd

Update PCAgent/api.py

Browse files
Files changed (1) hide show
  1. 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['choice'][0]['message']['content']
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",