需要从文本键获取数据一直在尝试它不起作用并给出错误:list indices must be integers or slice, not str
resp = json.loads(str(result))
resp['choices']['text]
JSON:
{
"choices": [
{
"finason": "stop",
"index": 0,
"logprobs": null,
"text": "hihihiii"
}
],
"created": 1595021770,
"id": "cmp pvu4OUC5Qbh4C",
"model": " 2020-05-03",
"object": "tex tion"
}
DIEA
相关分类