提交 d6ac509d 编写于 作者: C chenjian

fix

上级 2aeceff2
...@@ -149,12 +149,11 @@ class ErnieVilG: ...@@ -149,12 +149,11 @@ class ErnieVilG:
raise RuntimeError("API服务内部错误,可能引起原因有请求超时、模型推理错误等") raise RuntimeError("API服务内部错误,可能引起原因有请求超时、模型推理错误等")
elif res['code'] == 100 or res['code'] == 110 or res['code'] == 111: elif res['code'] == 100 or res['code'] == 110 or res['code'] == 111:
token = self._apply_token(ak, sk) token = self._apply_token(ak, sk)
res = requests.post(create_url, res = requests.post(get_url,
headers={'Content-Type': 'application/x-www-form-urlencoded'}, headers={'Content-Type': 'application/x-www-form-urlencoded'},
data={ data={
'access_token': token, 'access_token': token,
"text": text_prompt, 'taskId': {taskid}
"style": style
}) })
res = res.json() res = res.json()
if res['code'] != 0: if res['code'] != 0:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册