-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
188 lines (161 loc) · 6.59 KB
/
pyproject.toml
File metadata and controls
188 lines (161 loc) · 6.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
[project]
name = "langchain-graphrag"
version = "0.0.9"
description = "Implementation of GraphRAG (https://arxiv.org/pdf/2404.16130)"
authors = [{ name = "Kapil Sachdeva", email = "notan@email.com" }]
dependencies = [
"pandas>=2.2.2",
"networkx>=3.3",
"langchain-core>=0.3.0",
"langchain-text-splitters>=0.3.0",
"tiktoken>=0.7.0",
"graspologic>=3.4.1",
"tableprint>=0.9.1",
"typer>=0.16.0",
"python-dotenv>=1.1.0",
"pyarrow>=20.0.0",
"tqdm>=4.67.1",
"langchain-community>=0.3.21",
"langchain-chroma>=0.2.2",
"langchain-ollama>=0.3.3",
"langchain-openai>=0.3.24",
"langchain-google-genai>=2.1.12",
"obonet>=1.0.0",
"pyvis>=0.3.2",
"matplotlib>=3.8.0",
"poethepoet>=0.35.0",
"streamlit>=1.39.0",
"chardet>=5.2.0",
]
readme = "README.md"
requires-python = ">= 3.10"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project.urls]
repository = "https://github.com/dineshkrishna9999/langchain-graphrag.git"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["src/langchain_graphrag"]
# ===== TEMPLATE VARIABLES (environment-based) =====
[tool.poe.env]
APP_CMD = "python examples/simple-app/app/main.py"
DIRS = "--output-dir tmp --cache-dir tmp/cache"
INPUT = "--input-file examples/input-data/book.txt"
ARTIFACTS = "--artifacts-dir tmp/artifacts_gpt-4o"
AZURE_LLM = "--llm-type azure_openai --llm-model gpt-4o"
AZURE_EMBED = "--embedding-type ollama --embedding-model bge-m3"
OPENAI_LLM = "--llm-type openai --llm-model gpt-4o"
OPENAI_EMBED = "--embedding-type openai --embedding-model text-embedding-3-small"
OLLAMA_LLM = "--llm-type ollama --llm-model llama2"
OLLAMA_EMBED = "--embedding-type ollama --embedding-model bge-m3"
GEMINI_LLM = "--llm-type gemini --llm-model gemini-2.5-flash"
GEMINI_EMBED = "--embedding-type gemini --embedding-model gemini-embedding-001"
[tool.poe.tasks]
# ===== INTERNAL TASKS (using template variables) =====
# Basic commands
_app-help = "${APP_CMD} --help"
_indexer-help = "${APP_CMD} indexer --help"
_query-help = "${APP_CMD} query --help"
_indexer-base = "${APP_CMD} indexer index"
_local-search-base = "${APP_CMD} query local-search ${DIRS}"
_global-search-base = "${APP_CMD} query global-search ${DIRS}"
_report = "${APP_CMD} indexer report ${ARTIFACTS}"
_visualize = "${APP_CMD} indexer visualize --llm-model gpt-4o --output tmp/graph.gexf"
_visualize-html = "${APP_CMD} indexer visualize --llm-model gpt-4o --output tmp/graph.html"
_visualize-ollama = "${APP_CMD} indexer visualize --llm-model llama2 --output tmp/graph.gexf"
_visualize-gemini = "${APP_CMD} indexer visualize --llm-model gemini-2.5-flash --output tmp/graph.html"
# Full configured indexer commands (template composition)
_index-azure = "${APP_CMD} indexer index ${INPUT} ${DIRS} ${AZURE_LLM} ${AZURE_EMBED}"
_index-openai = "${APP_CMD} indexer index ${INPUT} ${DIRS} ${OPENAI_LLM} ${OPENAI_EMBED}"
_index-ollama = "${APP_CMD} indexer index ${INPUT} ${DIRS} ${OLLAMA_LLM} ${OLLAMA_EMBED}"
_index-gemini = "${APP_CMD} indexer index ${INPUT} ${DIRS} ${GEMINI_LLM} ${GEMINI_EMBED}"
# Full configured search commands (template composition)
_local-azure = "${APP_CMD} query local-search ${DIRS} ${AZURE_LLM} ${AZURE_EMBED}"
_local-openai = "${APP_CMD} query local-search ${DIRS} ${OPENAI_LLM} ${OPENAI_EMBED}"
_local-ollama = "${APP_CMD} query local-search ${DIRS} ${OLLAMA_LLM} ${OLLAMA_EMBED}"
_local-gemini = "${APP_CMD} query local-search ${DIRS} ${GEMINI_LLM} ${GEMINI_EMBED}"
_global-azure = "${APP_CMD} query global-search ${DIRS} ${AZURE_LLM}"
_global-openai = "${APP_CMD} query global-search ${DIRS} ${OPENAI_LLM}"
_global-ollama = "${APP_CMD} query global-search ${DIRS} ${OLLAMA_LLM}"
_global-gemini = "${APP_CMD} query global-search ${DIRS} ${GEMINI_LLM}"
# Base app command
simple-app = "${APP_CMD}"
# UI
simple-app-ui = "streamlit run examples/simple-app/app/ui.py"
# Help commands
simple-app-help = { ref = "_app-help" }
simple-app-indexer-help = { ref = "_indexer-help" }
simple-app-query-help = { ref = "_query-help" }
# Basic indexer commands
simple-app-indexer = { ref = "_indexer-base" }
# Indexer with different providers
simple-app-indexer-azure = { ref = "_index-azure" }
simple-app-indexer-openai = { ref = "_index-openai" }
simple-app-indexer-ollama = { ref = "_index-ollama" }
simple-app-indexer-gemini = { ref = "_index-gemini" }
# Report generation
simple-app-report = { ref = "_report" }
simple-app-visualize = { ref = "_visualize" }
simple-app-visualize-html = { ref = "_visualize-html" }
simple-app-visualize-ollama = { ref = "_visualize-ollama" }
simple-app-visualize-gemini = { ref = "_visualize-gemini" }
# Search commands - basic
simple-app-local-search = { ref = "_local-search-base" }
simple-app-global-search = { ref = "_global-search-base" }
# Search commands with provider configurations
simple-app-local-search-azure = { ref = "_local-azure" }
simple-app-local-search-openai = { ref = "_local-openai" }
simple-app-local-search-ollama = { ref = "_local-ollama" }
simple-app-local-search-gemini = { ref = "_local-gemini" }
simple-app-global-search-azure = { ref = "_global-azure" }
simple-app-global-search-openai = { ref = "_global-openai" }
simple-app-global-search-ollama = { ref = "_global-ollama" }
simple-app-global-search-gemini = { ref = "_global-gemini" }
# Development tasks
test = "pytest"
test-verbose = "pytest -v"
lint = "ruff check"
lint-fix = "ruff check --fix"
format = "ruff format"
format-check = "ruff format --check"
typecheck = "mypy src"
clean = "python -c \"import shutil, os; [shutil.rmtree(d, ignore_errors=True) for d in ['tmp', '__pycache__', '.pytest_cache', '.mypy_cache', '.ruff_cache'] if os.path.exists(d)]\""
# Documentation tasks
docs-serve = "mkdocs serve"
docs-build = "mkdocs build"
# Combined tasks
check = ["lint", "format-check", "typecheck"]
fix = ["lint-fix", "format"]
check-all = ["lint", "format-check", "typecheck"]
[tool.uv]
dev-dependencies = [
"pytest>=8.3.2",
"ipykernel>=6.29.5",
"mkdocs>=1.6.0",
"mkdocstrings[python]>=0.25.2",
"markdown-include>=0.8.1",
"pre-commit>=3.8.0",
"mkdocs-gen-files>=0.5.0",
"mkdocs-literate-nav>=0.6.1",
"mkdocs-section-index>=0.3.9",
"mkdocs-material>=9.5.31",
"mkdocs-jupyter>=0.24.8",
"fastparquet>=2024.11.0",
"langchain-chroma>=0.2.2",
"langchain-community>=0.3.21",
"langchain-ollama>=0.3.3",
"langchain-openai>=0.3.24",
"langchain-google-genai>=1.0.0",
"pyvis>=0.3.2",
"jinja2>=3.1.0",
"mypy>=1.16.1",
"poethepoet>=0.35.0",
"pyarrow>=20.0.0",
"python-dotenv>=1.1.0",
"ruff>=0.12.0",
"typer>=0.16.0"
]
[tool.isort]
profile = "black"