iflow-mcp_pingcy_app_chatppt 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,102 @@
1
+ Metadata-Version: 2.4
2
+ Name: iflow-mcp_pingcy_app_chatppt
3
+ Version: 0.1.0
4
+ Summary: Add your description here
5
+ Requires-Python: >=3.11
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: asyncpg>=0.30.0
8
+ Requires-Dist: browser-use>=0.1.24
9
+ Requires-Dist: chroma>=0.2.0
10
+ Requires-Dist: fastapi>=0.115.12
11
+ Requires-Dist: langchain-core>=0.3.65
12
+ Requires-Dist: langchain-mcp-adapters>=0.1.7
13
+ Requires-Dist: langchain-openai>=0.3.14
14
+ Requires-Dist: langgraph>=0.4.1
15
+ Requires-Dist: llama-index-agent-openai>=0.4.6
16
+ Requires-Dist: llama-index-core>=0.12.34.post1
17
+ Requires-Dist: llama-index-embeddings-ollama>=0.6.0
18
+ Requires-Dist: llama-index-embeddings-openai>=0.3.1
19
+ Requires-Dist: llama-index-llms-openai>=0.3.38
20
+ Requires-Dist: llama-index-tools-mcp>=0.1.2
21
+ Requires-Dist: llama-index-vector-stores-chroma>=0.4.1
22
+ Requires-Dist: mcp[cli]>=1.9.4
23
+ Requires-Dist: openpyxl>=3.1.5
24
+ Requires-Dist: pandas>=2.2.3
25
+ Requires-Dist: pdf2image>=1.17.0
26
+ Requires-Dist: pypdfium2>=4.30.1
27
+ Requires-Dist: python-socks>=2.7.1
28
+ Requires-Dist: redis>=6.1.0
29
+ Requires-Dist: requests>=2.32.4
30
+ Requires-Dist: streamlit>=1.45.0
31
+ Requires-Dist: uvicorn>=0.34.3
32
+ Requires-Dist: websockets>=15.0.1
33
+
34
+ # ChatPPT-MCP: 多文档RAG引擎的 MCP Server
35
+
36
+ 一个基于MCP(Model Context Protocol)的多文档RAG(Retrieval-Augmented Generation)引擎应用,支持PPT文档的智能问答和分析。
37
+
38
+ ## 功能特性
39
+
40
+ - 🔍 **多文档处理**: 支持索引多个PPT文档,基于视觉模型
41
+ - 🤖 **智能问答**: 基于RAG技术的文档问答
42
+ - 🔄 **MCP集成**: 使用Model Context Protocol进行工具调用
43
+ - 📊 **交互式测试**: 提供命令行交互测试界面
44
+
45
+ ## 技术栈
46
+
47
+ - **后端框架**: FastAPI
48
+ - **向量数据库**: ChromaDB
49
+ - **LLM**: Doubao Vision
50
+ - **文档处理**: LibreOffice, pypdfium2
51
+ - **协议**: Model Context Protocol (MCP)
52
+ - **向量化**: OpenAI Embeddings
53
+
54
+ ## 安装使用
55
+
56
+ ### 1. 安装依赖
57
+
58
+ ```bash
59
+ pip install -e .
60
+ ```
61
+
62
+ ### 2. 环境配置
63
+
64
+ 复制环境变量模板文件,并修改:
65
+
66
+ ```bash
67
+ cp .env.example .env
68
+ ```
69
+
70
+ ### 3. 运行应用
71
+
72
+ #### RAG引擎测试模式
73
+
74
+ ```bash
75
+ python rag_interactive_test.py
76
+ ```
77
+
78
+ #### MCP测试模式(先sse启动:python mcp_ppt_server.py --transport sse)
79
+
80
+ ```bash
81
+ python mcp_interactive_test.py
82
+ ```
83
+
84
+ ## 项目结构
85
+
86
+ ```
87
+ app_chatppt/
88
+ ├── src/ # 源代码目录
89
+ │ ├── multi_doc_rag_engine.py # RAG引擎核心
90
+ │ ├── document_processor.py # 文档处理器
91
+ │ └── ...
92
+ ├── data/ # 示例数据
93
+ ├── rag_interactive_test.py # 交互式测试入口
94
+ ├── mcp_interactive_test.py # MCP集成测试
95
+ ├── pyproject.toml # 项目配置
96
+ ├── .env.example # 环境变量模板
97
+ └── README.md # 项目文档
98
+ ```
99
+
100
+ ## 许可证
101
+
102
+ MIT License
@@ -0,0 +1,69 @@
1
+ # ChatPPT-MCP: 多文档RAG引擎的 MCP Server
2
+
3
+ 一个基于MCP(Model Context Protocol)的多文档RAG(Retrieval-Augmented Generation)引擎应用,支持PPT文档的智能问答和分析。
4
+
5
+ ## 功能特性
6
+
7
+ - 🔍 **多文档处理**: 支持索引多个PPT文档,基于视觉模型
8
+ - 🤖 **智能问答**: 基于RAG技术的文档问答
9
+ - 🔄 **MCP集成**: 使用Model Context Protocol进行工具调用
10
+ - 📊 **交互式测试**: 提供命令行交互测试界面
11
+
12
+ ## 技术栈
13
+
14
+ - **后端框架**: FastAPI
15
+ - **向量数据库**: ChromaDB
16
+ - **LLM**: Doubao Vision
17
+ - **文档处理**: LibreOffice, pypdfium2
18
+ - **协议**: Model Context Protocol (MCP)
19
+ - **向量化**: OpenAI Embeddings
20
+
21
+ ## 安装使用
22
+
23
+ ### 1. 安装依赖
24
+
25
+ ```bash
26
+ pip install -e .
27
+ ```
28
+
29
+ ### 2. 环境配置
30
+
31
+ 复制环境变量模板文件,并修改:
32
+
33
+ ```bash
34
+ cp .env.example .env
35
+ ```
36
+
37
+ ### 3. 运行应用
38
+
39
+ #### RAG引擎测试模式
40
+
41
+ ```bash
42
+ python rag_interactive_test.py
43
+ ```
44
+
45
+ #### MCP测试模式(先sse启动:python mcp_ppt_server.py --transport sse)
46
+
47
+ ```bash
48
+ python mcp_interactive_test.py
49
+ ```
50
+
51
+ ## 项目结构
52
+
53
+ ```
54
+ app_chatppt/
55
+ ├── src/ # 源代码目录
56
+ │ ├── multi_doc_rag_engine.py # RAG引擎核心
57
+ │ ├── document_processor.py # 文档处理器
58
+ │ └── ...
59
+ ├── data/ # 示例数据
60
+ ├── rag_interactive_test.py # 交互式测试入口
61
+ ├── mcp_interactive_test.py # MCP集成测试
62
+ ├── pyproject.toml # 项目配置
63
+ ├── .env.example # 环境变量模板
64
+ └── README.md # 项目文档
65
+ ```
66
+
67
+ ## 许可证
68
+
69
+ MIT License
@@ -0,0 +1,37 @@
1
+ [project]
2
+ name = "iflow-mcp_pingcy_app_chatppt"
3
+ version = "0.1.0"
4
+ description = "Add your description here"
5
+ readme = "README.md"
6
+ requires-python = ">=3.11"
7
+ dependencies = [
8
+ "asyncpg>=0.30.0",
9
+ "browser-use>=0.1.24",
10
+ "chroma>=0.2.0",
11
+ "fastapi>=0.115.12",
12
+ "langchain-core>=0.3.65",
13
+ "langchain-mcp-adapters>=0.1.7",
14
+ "langchain-openai>=0.3.14",
15
+ "langgraph>=0.4.1",
16
+ "llama-index-agent-openai>=0.4.6",
17
+ "llama-index-core>=0.12.34.post1",
18
+ "llama-index-embeddings-ollama>=0.6.0",
19
+ "llama-index-embeddings-openai>=0.3.1",
20
+ "llama-index-llms-openai>=0.3.38",
21
+ "llama-index-tools-mcp>=0.1.2",
22
+ "llama-index-vector-stores-chroma>=0.4.1",
23
+ "mcp[cli]>=1.9.4",
24
+ "openpyxl>=3.1.5",
25
+ "pandas>=2.2.3",
26
+ "pdf2image>=1.17.0",
27
+ "pypdfium2>=4.30.1",
28
+ "python-socks>=2.7.1",
29
+ "redis>=6.1.0",
30
+ "requests>=2.32.4",
31
+ "streamlit>=1.45.0",
32
+ "uvicorn>=0.34.3",
33
+ "websockets>=15.0.1",
34
+ ]
35
+
36
+ [project.scripts]
37
+ mcp_ppt_server = "src.mcp_ppt_server:main"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ """App ChatPPT MCP Server - PowerPoint processing and chat capabilities."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,58 @@
1
+ import base64
2
+ from openai import OpenAI
3
+ from typing import List, Optional
4
+ import os
5
+
6
+ class DoubaoVisionLLM:
7
+ def __init__(
8
+ self,
9
+ model_name: str,
10
+ api_key: Optional[str] = None,
11
+ base_url: str = "https://ark.cn-beijing.volces.com/api/v3"
12
+ ):
13
+ self.model_name = model_name
14
+ self.client = OpenAI(
15
+ base_url=base_url,
16
+ api_key=api_key or os.getenv("ARK_API_KEY")
17
+ )
18
+
19
+ def _get_image_mime_type(self, image_path: str) -> str:
20
+ """Get the MIME type based on the image file extension."""
21
+ ext = image_path.lower().split('.')[-1]
22
+ mime_types = {
23
+ 'jpg': 'image/jpeg',
24
+ 'jpeg': 'image/jpeg',
25
+ 'png': 'image/png'
26
+ }
27
+ return mime_types.get(ext, 'image/jpeg')
28
+
29
+ def _image_to_base64(self, image_path: str) -> str:
30
+ with open(image_path, "rb") as image_file:
31
+ return base64.b64encode(image_file.read()).decode('utf-8')
32
+
33
+ def generate_response(
34
+ self,
35
+ prompt: str,
36
+ image_paths: List[str],
37
+ system_prompt: str = "你是一个结合文本与图片回答问题的AI助手。"
38
+ ) -> str:
39
+ completion = self.client.chat.completions.create(
40
+ model=self.model_name,
41
+ messages=[
42
+ {"role": "system", "content": system_prompt},
43
+ {"role": "user",
44
+ "content": [
45
+ {"type": "text", "text": prompt},
46
+ *[
47
+ {
48
+ "type": "image_url",
49
+ "image_url": {
50
+ "url": image_path if image_path.startswith(("http://", "https://")) else f"data:{self._get_image_mime_type(image_path)};base64,{self._image_to_base64(image_path)}" ,
51
+ },
52
+ }
53
+ for image_path in image_paths
54
+ ]
55
+ ]},
56
+ ],
57
+ )
58
+ return completion.choices[0].message.content
@@ -0,0 +1,102 @@
1
+ Metadata-Version: 2.4
2
+ Name: iflow-mcp_pingcy_app_chatppt
3
+ Version: 0.1.0
4
+ Summary: Add your description here
5
+ Requires-Python: >=3.11
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: asyncpg>=0.30.0
8
+ Requires-Dist: browser-use>=0.1.24
9
+ Requires-Dist: chroma>=0.2.0
10
+ Requires-Dist: fastapi>=0.115.12
11
+ Requires-Dist: langchain-core>=0.3.65
12
+ Requires-Dist: langchain-mcp-adapters>=0.1.7
13
+ Requires-Dist: langchain-openai>=0.3.14
14
+ Requires-Dist: langgraph>=0.4.1
15
+ Requires-Dist: llama-index-agent-openai>=0.4.6
16
+ Requires-Dist: llama-index-core>=0.12.34.post1
17
+ Requires-Dist: llama-index-embeddings-ollama>=0.6.0
18
+ Requires-Dist: llama-index-embeddings-openai>=0.3.1
19
+ Requires-Dist: llama-index-llms-openai>=0.3.38
20
+ Requires-Dist: llama-index-tools-mcp>=0.1.2
21
+ Requires-Dist: llama-index-vector-stores-chroma>=0.4.1
22
+ Requires-Dist: mcp[cli]>=1.9.4
23
+ Requires-Dist: openpyxl>=3.1.5
24
+ Requires-Dist: pandas>=2.2.3
25
+ Requires-Dist: pdf2image>=1.17.0
26
+ Requires-Dist: pypdfium2>=4.30.1
27
+ Requires-Dist: python-socks>=2.7.1
28
+ Requires-Dist: redis>=6.1.0
29
+ Requires-Dist: requests>=2.32.4
30
+ Requires-Dist: streamlit>=1.45.0
31
+ Requires-Dist: uvicorn>=0.34.3
32
+ Requires-Dist: websockets>=15.0.1
33
+
34
+ # ChatPPT-MCP: 多文档RAG引擎的 MCP Server
35
+
36
+ 一个基于MCP(Model Context Protocol)的多文档RAG(Retrieval-Augmented Generation)引擎应用,支持PPT文档的智能问答和分析。
37
+
38
+ ## 功能特性
39
+
40
+ - 🔍 **多文档处理**: 支持索引多个PPT文档,基于视觉模型
41
+ - 🤖 **智能问答**: 基于RAG技术的文档问答
42
+ - 🔄 **MCP集成**: 使用Model Context Protocol进行工具调用
43
+ - 📊 **交互式测试**: 提供命令行交互测试界面
44
+
45
+ ## 技术栈
46
+
47
+ - **后端框架**: FastAPI
48
+ - **向量数据库**: ChromaDB
49
+ - **LLM**: Doubao Vision
50
+ - **文档处理**: LibreOffice, pypdfium2
51
+ - **协议**: Model Context Protocol (MCP)
52
+ - **向量化**: OpenAI Embeddings
53
+
54
+ ## 安装使用
55
+
56
+ ### 1. 安装依赖
57
+
58
+ ```bash
59
+ pip install -e .
60
+ ```
61
+
62
+ ### 2. 环境配置
63
+
64
+ 复制环境变量模板文件,并修改:
65
+
66
+ ```bash
67
+ cp .env.example .env
68
+ ```
69
+
70
+ ### 3. 运行应用
71
+
72
+ #### RAG引擎测试模式
73
+
74
+ ```bash
75
+ python rag_interactive_test.py
76
+ ```
77
+
78
+ #### MCP测试模式(先sse启动:python mcp_ppt_server.py --transport sse)
79
+
80
+ ```bash
81
+ python mcp_interactive_test.py
82
+ ```
83
+
84
+ ## 项目结构
85
+
86
+ ```
87
+ app_chatppt/
88
+ ├── src/ # 源代码目录
89
+ │ ├── multi_doc_rag_engine.py # RAG引擎核心
90
+ │ ├── document_processor.py # 文档处理器
91
+ │ └── ...
92
+ ├── data/ # 示例数据
93
+ ├── rag_interactive_test.py # 交互式测试入口
94
+ ├── mcp_interactive_test.py # MCP集成测试
95
+ ├── pyproject.toml # 项目配置
96
+ ├── .env.example # 环境变量模板
97
+ └── README.md # 项目文档
98
+ ```
99
+
100
+ ## 许可证
101
+
102
+ MIT License
@@ -0,0 +1,13 @@
1
+ README.md
2
+ pyproject.toml
3
+ src/__init__.py
4
+ src/doubao.py
5
+ src/mcp_ppt_server.py
6
+ src/multi_doc_rag_engine.py
7
+ src/ppt_utils.py
8
+ src/iflow_mcp_pingcy_app_chatppt.egg-info/PKG-INFO
9
+ src/iflow_mcp_pingcy_app_chatppt.egg-info/SOURCES.txt
10
+ src/iflow_mcp_pingcy_app_chatppt.egg-info/dependency_links.txt
11
+ src/iflow_mcp_pingcy_app_chatppt.egg-info/entry_points.txt
12
+ src/iflow_mcp_pingcy_app_chatppt.egg-info/requires.txt
13
+ src/iflow_mcp_pingcy_app_chatppt.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ mcp_ppt_server = src.mcp_ppt_server:main
@@ -0,0 +1,26 @@
1
+ asyncpg>=0.30.0
2
+ browser-use>=0.1.24
3
+ chroma>=0.2.0
4
+ fastapi>=0.115.12
5
+ langchain-core>=0.3.65
6
+ langchain-mcp-adapters>=0.1.7
7
+ langchain-openai>=0.3.14
8
+ langgraph>=0.4.1
9
+ llama-index-agent-openai>=0.4.6
10
+ llama-index-core>=0.12.34.post1
11
+ llama-index-embeddings-ollama>=0.6.0
12
+ llama-index-embeddings-openai>=0.3.1
13
+ llama-index-llms-openai>=0.3.38
14
+ llama-index-tools-mcp>=0.1.2
15
+ llama-index-vector-stores-chroma>=0.4.1
16
+ mcp[cli]>=1.9.4
17
+ openpyxl>=3.1.5
18
+ pandas>=2.2.3
19
+ pdf2image>=1.17.0
20
+ pypdfium2>=4.30.1
21
+ python-socks>=2.7.1
22
+ redis>=6.1.0
23
+ requests>=2.32.4
24
+ streamlit>=1.45.0
25
+ uvicorn>=0.34.3
26
+ websockets>=15.0.1
@@ -0,0 +1,5 @@
1
+ __init__
2
+ doubao
3
+ mcp_ppt_server
4
+ multi_doc_rag_engine
5
+ ppt_utils