qa-tools-family / data-center-for-qa-llm

QA测试领域的大模型数据中台
MIT License
0 stars 1 forks source link

Sweep: main函数增加 if __name__ == "__main__",支持直接启动程序 #8

Closed wangzhe0912 closed 1 year ago

wangzhe0912 commented 1 year ago

Details

支持main.py文件直接启动

Checklist - [X] `main.py` ❌ Failed
sweep-ai[bot] commented 1 year ago
Sweeping

50%

Actions (click)


❌ Unable to Complete PR

I'm sorry, but it looks like an error has occurred. Try changing the issue description to re-trigger Sweep. If this error persists report it at https://discord.gg/sweep.

For bonus GPT-4 tickets, please report this bug on Discord.


Please look at the generated plan. If something looks wrong, please add more details to your issue.

File Path Proposed Changes
main.py Modify main.py with contents:
• At the end of the file, add a new function named main. This function should call the FastAPI application.
• Inside the main function, use the command uvicorn.run(app, host="0.0.0.0", port=8000) to run the FastAPI application.
• After defining the main function, add the condition if name == "main". If this condition is true, call the main function.

🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request.