一、FastAPI部署
1、克隆handy-ollama仓库
通过git下载gandy-ollama仓库,在路径handy-ollama\notebook\C6下找到fastapi_chat_app文件夹。
git clone https://github.com/AXYZdong/handy-ollama
2、目录结构
fastapi_chat_app/
│
├── app.py
├── websocket_handler.py
├── static/
│ └── index.html
└── requirements.txt
fastapi_chat_app文件夹包括四部分:
- app.py:FastAPI应用程序的主要设置和路由
- websocket_handler.py:处理WebSocket链接和消息流
- atatic/index.html:HTML页面
- requirements.txt:环境依赖
3、安装环境依赖
pip install -r requirements.txt

除了安装dw给的环境外,还需要进行完整版本的Uvicorn

最低0.47元/天 解锁文章
4057

被折叠的 条评论
为什么被折叠?



