owenliang/aippt

试了一下

Opened this issue · 0 comments

排除了一些问题,在api上报了个错
输入主题:你好
输入页数:5
message:
[{'role': 'system', 'content': 'You are a helpful assistant.'}, {'role': 'user', 'content': '我要准备1个关于你好的PPT,要求一共写5页,请你根据主题生成详细内容,不要省略。\n 按这个JSON格式输出{"title": "example title", "pages": [{"title": "title for page 1", "content": [{"title": "title for paragraph 1", "description": "detail for paragraph 1"}, {"title": "title for paragraph 2", "description": "detail for paragraph 2"}]}, {"title": "title for page 2", "content": [{"title": "title for paragraph 1", "description": "detail for paragraph 1"}, {"title": "title for paragraph 2", "description": "detail for paragraph 2"}, {"title": "title for paragraph 3", "description": "detail for paragraph 3"}]}]},只能返回JSON,且JSON不要用```包裹,内容要用中文。'}]
返回:
{'Success': False, 'Code': '200006', 'Message': 'field required: payload.input.messages.1.content', 'Data': {'ResponseId': 'ce2d330fbd33485faf4d20ba502150cf', 'SessionId': 'ae94fe5dbd424eb38c19a2e20214a89e', 'Thoughts': [], 'Debug': {}, 'DocReferences': [], 'Finished': True, 'Choices': [], 'Usage': []}, 'RequestId': 'c8dae2f7c4904b3c90da25b3faf9ae91'}
Traceback (most recent call last):
File "E:\Project\Xinference\pythonProject\aippt.py", line 119, in
ppt_content = generate_ppt_content(topic, pages)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Project\Xinference\pythonProject\aippt.py", line 80, in generate_ppt_content
ppt_content = json.loads(bailian_llm(prompt))
^^^^^^^^^^^^^^^^^^^
File "E:\Project\Xinference\pythonProject\aippt.py", line 31, in bailian_llm
return resp['Data']['Choices'][0]['Message']['Content']
~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range