main
HuangHai 4 weeks ago
parent 33e3e6bdb4
commit 06157070f2

@ -94,7 +94,7 @@ async def save_to_word(request: Request):
# 使用pandoc转换
output_file = os.path.join(tempfile.gettempdir(), "【理想大模型】问答.docx")
subprocess.run(['pandoc', temp_html, '-o', output_file], check=True)
subprocess.run(['pandoc', temp_html, '-o', output_file,'--resource-path=static'], check=True)
# 读取生成的Word文件
with open(output_file, "rb") as f:

Loading…
Cancel
Save