1- ### 基于LLM大模型的AI机器人
1+ # 基于LLM大模型的AI机器人
22一款开源的AI语言模型机器人,集成人机对话,信息检索生成,PDF和URL解析对话等功能。该平台优势为全部采用免费开源API,以最低成本实现LLM定制化功能。
33
44## 工具和平台
@@ -7,8 +7,6 @@ Langchain, Streamlit, Oracle Cloud, Groq,Google cloud, Baidu Cloud, Docker
77## DEMO链接
88[ Link] ( http://168.138.28.54:8501 )
99
10- ## DEMO链接
11- [ Link] ( http://168.138.28.54:8501 )
1210## 文件结构描述
1311<pre >
1412.
@@ -39,12 +37,12 @@ Langchain, Streamlit, Oracle Cloud, Groq,Google cloud, Baidu Cloud, Docker
3937├── web_ui.py # main interface
4038</pre >
4139
42- 以下是优化后的Markdown写法:
4340
4441## 功能描述
4542
4643### Crawler爬虫模块
4744
45+
4846* 该模块主要包含三种爬虫方法: [ Selenium] ( https://selenium-python.readthedocs.io/ ) ,[ Playwright] ( https://playwright.dev/python/docs/intro ) ,[ 基于Langchain的DuckDuckGo] ( https://api.python.langchain.com/en/latest/tools/langchain_community.tools.ddg_search.tool.DuckDuckGoSearchResults.html ) 。
4947
5048* 实验显示,Playwright的耗时只有Selenium的一半:
@@ -53,7 +51,8 @@ Langchain, Streamlit, Oracle Cloud, Groq,Google cloud, Baidu Cloud, Docker
5351 | selenium_url_crawler | 27s |
5452 | playwright_url_crawler | 11s |
5553
56- * 由于Streamlit和Playwright的同步方式会产生冲突,所以应使用异步方法。 [ 参考] ( https://discuss.streamlit.io/t/using-playwright-with-streamlit/28380/5 )
54+ * 由于Streamlit和Playwright的同步方式会产生冲突,所以应使用异步方法。[ 参考] ( https://discuss.streamlit.io/t/using-playwright-with-streamlit/28380/5 )
55+
5756
5857### Chat模块 (在线和离线)
5958
@@ -92,6 +91,13 @@ Langchain, Streamlit, Oracle Cloud, Groq,Google cloud, Baidu Cloud, Docker
9291 3 . 根据问题检索top_k个相关文档。
9392 4 . 基于文档内容回答问题。
9493
94+ ### PDF解析模块
95+ 1 . 基于[ Streamlit-PDF-API] ( https://discuss.streamlit.io/t/display-pdf-in-streamlit/62274 ) 和[ Langchain-PDFMinerLoader] ( https://api.python.langchain.com/en/latest/document_loaders/langchain_community.document_loaders.pdf.PDFMinerLoader.html )
96+ 2 . 使用流程:
97+ 1 . 上传PDF
98+ 2 . 解析PDF内容大模型基于prompt总结PDF
99+ 3 . 根据问题和PDF内容进行回答
100+
95101## 使用教程
96102
97103### 本地部署
@@ -125,11 +131,37 @@ Langchain, Streamlit, Oracle Cloud, Groq,Google cloud, Baidu Cloud, Docker
125131 streamlit run web_ui.py
126132 ` ` `
127133# ## 服务器部署
128- 1. [Docker链接](https://hub.docker.com/repository/docker/jiyuanc1/aibot/general)
129- 2. 服务器部署教程:[wiki链接](https://github.com/Boomm-shakalaka/AIBot-LLM/wiki/Oracle%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%90%AD%E5%BB%BA%E6%95%99%E7%A8%8B)
134+ 方法一: Linux环境本地安装和执行Docker
135+ * 服务器拉取github仓库
136+ * 构建镜像
137+
138+ 方法二: Docker Hub拉取和执行镜像
139+ * [Docker Hub链接](https://hub.docker.com/repository/docker/jiyuanc1/aibot/general)
140+
141+ 部署教程
142+ * 服务器部署教程:[wiki链接](https://github.com/Boomm-shakalaka/AIBot-LLM/wiki/Oracle%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%90%AD%E5%BB%BA%E6%95%99%E7%A8%8B)
143+
144+ # # Docker构建镜像已知问题
145+ 1. Google-genai打包失败,没有找到该问题原因
146+ ` ` ` bash
147+ ERROR: Could not find a version that satisfies the requirement langchain-google-genai (from -r requirements.txt (line 11)) (from > versions: none)
148+ ERROR: No matching distribution found for langchain-google-genai (from -r requirements.txt (line 11))
149+ ` ` `
150+ 2. 对于windows和linux 不同操作系统,异步方法也不同 [参考](https://stackoverflow.com/questions/67964463/what-are-selectoreventloop-and-proactoreventloop-in-python-asyncio)
151+ ` ` ` python
152+ if sys.platform == " win32" :
153+ loop = asyncio.ProactorEventLoop () # windows系统
154+ else:
155+ loop = asyncio.SelectorEventLoop ()# linux系统
156+ ` ` `
157+ 3. playwright无法直接打包进Docker! 需要基于Ubuntu镜像环境[参考](https://stackoverflow.com/questions/72181737/issue-running-playwright-python-in-docker-container)
158+
130159
131160# # 版本更新记录
132- v1.0.0 (oracle cloud)
161+ v1.0.1 (oracle)
162+ 1. 解决Docker构建镜像问题,解决不同操作系统存在的异步方法
163+
164+ v1.0.0
1331651. 优化pdf chat功能中的简历评估功能,增加对话
1341662. 新增playwright爬虫模块,优化异步调用
1351673. 新增url chat爬虫模块调用和来源检索选择功能
@@ -139,6 +171,7 @@ v1.0.0 (oracle cloud)
1391717. 整合prompt配置内容
1401728. 页面美化
1411739. 新增about页面
174+ 10. 更新Dockerfile
142175
143176v0.0.5
1441771. 新增百度千帆大模型(ERNIE-Lite-8K和ERNIE-Speed-128K免费开放)
0 commit comments