wu981526092 commited on
Commit
d6c7c85
·
1 Parent(s): 81a0a78

Fix: Add missing langchain dependencies for text processing

Browse files

🐛 Problem:
- Backend startup fails with: No module named 'langchain_community'
- text_chunking_strategies.py imports langchain modules
- langchain/langchain-community not in pyproject.toml dependencies

✅ Solution:
Added to dependencies:
- langchain>=0.3.0 (for RecursiveCharacterTextSplitter)
- langchain-community>=0.3.0 (for JSONLoader)

🔧 Used By:
- agentgraph/input/text_processing/text_chunking_strategies.py
- backend/services/processing_service.py
- backend/routers/traces.py
- agentgraph/extraction/graph_processing/knowledge_graph_processor.py

🎯 Result:
- Backend should start successfully
- Text chunking functionality available
- No more import errors on startup

Files changed (1) hide show
  1. pyproject.toml +2 -0
pyproject.toml CHANGED
@@ -43,6 +43,8 @@ dependencies = [
43
  "litellm>=1.60.0", # ✅ 核心
44
  "langfuse>=3.0.0", # ✅ 核心 (15+ 使用)
45
  "langsmith>=0.3.38", # ✅ 核心 (12+ 使用)
 
 
46
  "crewai>=0.108.0", # ✅ 功能性 (2+ 使用)
47
  "crewai-tools>=0.38.1", # ✅ 功能性
48
  "langgraph>=0.5.3", # ✅ 功能性
 
43
  "litellm>=1.60.0", # ✅ 核心
44
  "langfuse>=3.0.0", # ✅ 核心 (15+ 使用)
45
  "langsmith>=0.3.38", # ✅ 核心 (12+ 使用)
46
+ "langchain>=0.3.0", # ✅ 核心 (text splitting)
47
+ "langchain-community>=0.3.0", # ✅ 核心 (document loaders)
48
  "crewai>=0.108.0", # ✅ 功能性 (2+ 使用)
49
  "crewai-tools>=0.38.1", # ✅ 功能性
50
  "langgraph>=0.5.3", # ✅ 功能性