cognee 0.3.5__py3-none-any.whl → 0.3.7__py3-none-any.whl
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.
- cognee/__init__.py +1 -0
- cognee/api/health.py +2 -12
- cognee/api/v1/add/add.py +46 -6
- cognee/api/v1/add/routers/get_add_router.py +5 -1
- cognee/api/v1/cognify/cognify.py +29 -9
- cognee/api/v1/datasets/datasets.py +11 -0
- cognee/api/v1/responses/default_tools.py +0 -1
- cognee/api/v1/responses/dispatch_function.py +1 -1
- cognee/api/v1/responses/routers/default_tools.py +0 -1
- cognee/api/v1/search/search.py +11 -9
- cognee/api/v1/settings/routers/get_settings_router.py +7 -1
- cognee/api/v1/ui/ui.py +47 -16
- cognee/api/v1/update/routers/get_update_router.py +1 -1
- cognee/api/v1/update/update.py +3 -3
- cognee/cli/_cognee.py +61 -10
- cognee/cli/commands/add_command.py +3 -3
- cognee/cli/commands/cognify_command.py +3 -3
- cognee/cli/commands/config_command.py +9 -7
- cognee/cli/commands/delete_command.py +3 -3
- cognee/cli/commands/search_command.py +3 -7
- cognee/cli/config.py +0 -1
- cognee/context_global_variables.py +5 -0
- cognee/exceptions/exceptions.py +1 -1
- cognee/infrastructure/databases/cache/__init__.py +2 -0
- cognee/infrastructure/databases/cache/cache_db_interface.py +79 -0
- cognee/infrastructure/databases/cache/config.py +44 -0
- cognee/infrastructure/databases/cache/get_cache_engine.py +67 -0
- cognee/infrastructure/databases/cache/redis/RedisAdapter.py +243 -0
- cognee/infrastructure/databases/exceptions/__init__.py +1 -0
- cognee/infrastructure/databases/exceptions/exceptions.py +18 -2
- cognee/infrastructure/databases/graph/get_graph_engine.py +1 -1
- cognee/infrastructure/databases/graph/graph_db_interface.py +5 -0
- cognee/infrastructure/databases/graph/kuzu/adapter.py +67 -44
- cognee/infrastructure/databases/graph/neo4j_driver/adapter.py +13 -3
- cognee/infrastructure/databases/graph/neo4j_driver/deadlock_retry.py +1 -1
- cognee/infrastructure/databases/graph/neptune_driver/neptune_utils.py +1 -1
- cognee/infrastructure/databases/relational/sqlalchemy/SqlAlchemyAdapter.py +1 -1
- cognee/infrastructure/databases/vector/embeddings/FastembedEmbeddingEngine.py +21 -3
- cognee/infrastructure/databases/vector/embeddings/LiteLLMEmbeddingEngine.py +17 -10
- cognee/infrastructure/databases/vector/embeddings/OllamaEmbeddingEngine.py +17 -4
- cognee/infrastructure/databases/vector/embeddings/config.py +2 -3
- cognee/infrastructure/databases/vector/exceptions/exceptions.py +1 -1
- cognee/infrastructure/databases/vector/lancedb/LanceDBAdapter.py +0 -1
- cognee/infrastructure/files/exceptions.py +1 -1
- cognee/infrastructure/files/storage/LocalFileStorage.py +9 -9
- cognee/infrastructure/files/storage/S3FileStorage.py +11 -11
- cognee/infrastructure/files/utils/guess_file_type.py +6 -0
- cognee/infrastructure/llm/prompts/search_type_selector_prompt.txt +0 -5
- cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/anthropic/adapter.py +19 -9
- cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/gemini/adapter.py +17 -5
- cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/generic_llm_api/adapter.py +17 -5
- cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/get_llm_client.py +32 -0
- cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/mistral/__init__.py +0 -0
- cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/mistral/adapter.py +109 -0
- cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/ollama/adapter.py +33 -8
- cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/openai/adapter.py +40 -18
- cognee/infrastructure/loaders/LoaderEngine.py +27 -7
- cognee/infrastructure/loaders/external/__init__.py +7 -0
- cognee/infrastructure/loaders/external/advanced_pdf_loader.py +2 -8
- cognee/infrastructure/loaders/external/beautiful_soup_loader.py +310 -0
- cognee/infrastructure/loaders/supported_loaders.py +7 -0
- cognee/modules/data/exceptions/exceptions.py +1 -1
- cognee/modules/data/methods/__init__.py +3 -0
- cognee/modules/data/methods/get_dataset_data.py +4 -1
- cognee/modules/data/methods/has_dataset_data.py +21 -0
- cognee/modules/engine/models/TableRow.py +0 -1
- cognee/modules/ingestion/save_data_to_file.py +9 -2
- cognee/modules/pipelines/exceptions/exceptions.py +1 -1
- cognee/modules/pipelines/operations/pipeline.py +12 -1
- cognee/modules/pipelines/operations/run_tasks.py +25 -197
- cognee/modules/pipelines/operations/run_tasks_data_item.py +260 -0
- cognee/modules/pipelines/operations/run_tasks_distributed.py +121 -38
- cognee/modules/retrieval/EntityCompletionRetriever.py +48 -8
- cognee/modules/retrieval/base_graph_retriever.py +3 -1
- cognee/modules/retrieval/base_retriever.py +3 -1
- cognee/modules/retrieval/chunks_retriever.py +5 -1
- cognee/modules/retrieval/code_retriever.py +20 -2
- cognee/modules/retrieval/completion_retriever.py +50 -9
- cognee/modules/retrieval/cypher_search_retriever.py +11 -1
- cognee/modules/retrieval/graph_completion_context_extension_retriever.py +47 -8
- cognee/modules/retrieval/graph_completion_cot_retriever.py +32 -1
- cognee/modules/retrieval/graph_completion_retriever.py +54 -10
- cognee/modules/retrieval/lexical_retriever.py +20 -2
- cognee/modules/retrieval/natural_language_retriever.py +10 -1
- cognee/modules/retrieval/summaries_retriever.py +5 -1
- cognee/modules/retrieval/temporal_retriever.py +62 -10
- cognee/modules/retrieval/user_qa_feedback.py +3 -2
- cognee/modules/retrieval/utils/completion.py +5 -0
- cognee/modules/retrieval/utils/description_to_codepart_search.py +1 -1
- cognee/modules/retrieval/utils/session_cache.py +156 -0
- cognee/modules/search/methods/get_search_type_tools.py +0 -5
- cognee/modules/search/methods/no_access_control_search.py +12 -1
- cognee/modules/search/methods/search.py +34 -2
- cognee/modules/search/types/SearchType.py +0 -1
- cognee/modules/settings/get_settings.py +23 -0
- cognee/modules/users/methods/get_authenticated_user.py +3 -1
- cognee/modules/users/methods/get_default_user.py +1 -6
- cognee/modules/users/roles/methods/create_role.py +2 -2
- cognee/modules/users/tenants/methods/create_tenant.py +2 -2
- cognee/shared/exceptions/exceptions.py +1 -1
- cognee/tasks/codingagents/coding_rule_associations.py +1 -2
- cognee/tasks/documents/exceptions/exceptions.py +1 -1
- cognee/tasks/graph/extract_graph_from_data.py +2 -0
- cognee/tasks/ingestion/data_item_to_text_file.py +3 -3
- cognee/tasks/ingestion/ingest_data.py +11 -5
- cognee/tasks/ingestion/save_data_item_to_storage.py +12 -1
- cognee/tasks/storage/add_data_points.py +3 -10
- cognee/tasks/storage/index_data_points.py +19 -14
- cognee/tasks/storage/index_graph_edges.py +25 -11
- cognee/tasks/web_scraper/__init__.py +34 -0
- cognee/tasks/web_scraper/config.py +26 -0
- cognee/tasks/web_scraper/default_url_crawler.py +446 -0
- cognee/tasks/web_scraper/models.py +46 -0
- cognee/tasks/web_scraper/types.py +4 -0
- cognee/tasks/web_scraper/utils.py +142 -0
- cognee/tasks/web_scraper/web_scraper_task.py +396 -0
- cognee/tests/cli_tests/cli_unit_tests/test_cli_utils.py +0 -1
- cognee/tests/integration/web_url_crawler/test_default_url_crawler.py +13 -0
- cognee/tests/integration/web_url_crawler/test_tavily_crawler.py +19 -0
- cognee/tests/integration/web_url_crawler/test_url_adding_e2e.py +344 -0
- cognee/tests/subprocesses/reader.py +25 -0
- cognee/tests/subprocesses/simple_cognify_1.py +31 -0
- cognee/tests/subprocesses/simple_cognify_2.py +31 -0
- cognee/tests/subprocesses/writer.py +32 -0
- cognee/tests/tasks/descriptive_metrics/metrics_test_utils.py +0 -2
- cognee/tests/tasks/descriptive_metrics/neo4j_metrics_test.py +8 -3
- cognee/tests/tasks/entity_extraction/entity_extraction_test.py +89 -0
- cognee/tests/tasks/web_scraping/web_scraping_test.py +172 -0
- cognee/tests/test_add_docling_document.py +56 -0
- cognee/tests/test_chromadb.py +7 -11
- cognee/tests/test_concurrent_subprocess_access.py +76 -0
- cognee/tests/test_conversation_history.py +240 -0
- cognee/tests/test_kuzu.py +27 -15
- cognee/tests/test_lancedb.py +7 -11
- cognee/tests/test_library.py +32 -2
- cognee/tests/test_neo4j.py +24 -16
- cognee/tests/test_neptune_analytics_vector.py +7 -11
- cognee/tests/test_permissions.py +9 -13
- cognee/tests/test_pgvector.py +4 -4
- cognee/tests/test_remote_kuzu.py +8 -11
- cognee/tests/test_s3_file_storage.py +1 -1
- cognee/tests/test_search_db.py +6 -8
- cognee/tests/unit/infrastructure/databases/cache/test_cache_config.py +89 -0
- cognee/tests/unit/modules/retrieval/conversation_history_test.py +154 -0
- {cognee-0.3.5.dist-info → cognee-0.3.7.dist-info}/METADATA +22 -7
- {cognee-0.3.5.dist-info → cognee-0.3.7.dist-info}/RECORD +155 -128
- {cognee-0.3.5.dist-info → cognee-0.3.7.dist-info}/entry_points.txt +1 -0
- distributed/Dockerfile +0 -3
- distributed/entrypoint.py +21 -9
- distributed/signal.py +5 -0
- distributed/workers/data_point_saving_worker.py +64 -34
- distributed/workers/graph_saving_worker.py +71 -47
- cognee/infrastructure/databases/graph/memgraph/memgraph_adapter.py +0 -1116
- cognee/modules/retrieval/insights_retriever.py +0 -133
- cognee/tests/test_memgraph.py +0 -109
- cognee/tests/unit/modules/retrieval/insights_retriever_test.py +0 -251
- distributed/poetry.lock +0 -12238
- distributed/pyproject.toml +0 -185
- {cognee-0.3.5.dist-info → cognee-0.3.7.dist-info}/WHEEL +0 -0
- {cognee-0.3.5.dist-info → cognee-0.3.7.dist-info}/licenses/LICENSE +0 -0
- {cognee-0.3.5.dist-info → cognee-0.3.7.dist-info}/licenses/NOTICE.md +0 -0
distributed/pyproject.toml
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "cognee"
|
|
3
|
-
version = "0.2.2.dev0"
|
|
4
|
-
description = "Cognee - is a library for enriching LLM context with a semantic layer for better understanding and reasoning."
|
|
5
|
-
authors = [
|
|
6
|
-
{ name = "Vasilije Markovic" },
|
|
7
|
-
{ name = "Boris Arzentar" },
|
|
8
|
-
]
|
|
9
|
-
requires-python = ">=3.10,<=3.13"
|
|
10
|
-
readme = "README.md"
|
|
11
|
-
license = "Apache-2.0"
|
|
12
|
-
classifiers = [
|
|
13
|
-
"Development Status :: 4 - Beta",
|
|
14
|
-
"Intended Audience :: Developers",
|
|
15
|
-
"License :: OSI Approved :: Apache Software License",
|
|
16
|
-
"Topic :: Software Development :: Libraries",
|
|
17
|
-
"Operating System :: MacOS :: MacOS X",
|
|
18
|
-
"Operating System :: POSIX :: Linux",
|
|
19
|
-
"Operating System :: Microsoft :: Windows",
|
|
20
|
-
]
|
|
21
|
-
dependencies = [
|
|
22
|
-
"openai>=1.80.1,<2",
|
|
23
|
-
"python-dotenv>=1.0.1,<2.0.0",
|
|
24
|
-
"pydantic>=2.11.7,<3.0.0",
|
|
25
|
-
"pydantic-settings>=2.10.1,<3",
|
|
26
|
-
"typing_extensions>=4.12.2,<5.0.0",
|
|
27
|
-
"nltk>=3.9.1,<4.0.0",
|
|
28
|
-
"numpy>=1.26.4, <=4.0.0",
|
|
29
|
-
"pandas>=2.2.2,<3.0.0",
|
|
30
|
-
# Note: New s3fs and boto3 versions don't work well together
|
|
31
|
-
# Always use comaptible fixed versions of these two dependencies
|
|
32
|
-
"s3fs[boto3]==2025.3.2",
|
|
33
|
-
"sqlalchemy>=2.0.39,<3.0.0",
|
|
34
|
-
"aiosqlite>=0.20.0,<1.0.0",
|
|
35
|
-
"tiktoken>=0.8.0,<1.0.0",
|
|
36
|
-
"litellm>=1.57.4, <1.71.0",
|
|
37
|
-
"instructor>=1.9.1,<2.0.0",
|
|
38
|
-
"langfuse>=2.32.0,<3",
|
|
39
|
-
"filetype>=1.2.0,<2.0.0",
|
|
40
|
-
"aiohttp>=3.11.14,<4.0.0",
|
|
41
|
-
"aiofiles>=23.2.1,<24.0.0",
|
|
42
|
-
"rdflib>=7.1.4,<7.2.0",
|
|
43
|
-
"pypdf>=4.1.0,<7.0.0",
|
|
44
|
-
"jinja2>=3.1.3,<4",
|
|
45
|
-
"matplotlib>=3.8.3,<4",
|
|
46
|
-
"networkx>=3.4.2,<4",
|
|
47
|
-
"lancedb>=0.24.0,<1.0.0",
|
|
48
|
-
"alembic>=1.13.3,<2",
|
|
49
|
-
"pre-commit>=4.0.1,<5",
|
|
50
|
-
"scikit-learn>=1.6.1,<2",
|
|
51
|
-
"limits>=4.4.1,<5",
|
|
52
|
-
"fastapi>=0.115.7,<1.0.0",
|
|
53
|
-
"python-multipart>=0.0.20,<1.0.0",
|
|
54
|
-
"fastapi-users[sqlalchemy]>=14.0.1,<15.0.0",
|
|
55
|
-
"dlt[sqlalchemy]>=1.9.0,<2",
|
|
56
|
-
"sentry-sdk[fastapi]>=2.9.0,<3",
|
|
57
|
-
"structlog>=25.2.0,<26",
|
|
58
|
-
"pympler>=1.1,<2.0.0",
|
|
59
|
-
"onnxruntime>=1.0.0,<2.0.0",
|
|
60
|
-
"pylance>=0.22.0,<1.0.0",
|
|
61
|
-
"kuzu (==0.11.0)"
|
|
62
|
-
]
|
|
63
|
-
|
|
64
|
-
[project.optional-dependencies]
|
|
65
|
-
api = [
|
|
66
|
-
"uvicorn>=0.34.0,<1.0.0",
|
|
67
|
-
"gunicorn>=20.1.0,<24",
|
|
68
|
-
"websockets>=15.0.1,<16.0.0"
|
|
69
|
-
]
|
|
70
|
-
distributed = [
|
|
71
|
-
"modal>=1.0.5,<2.0.0",
|
|
72
|
-
]
|
|
73
|
-
|
|
74
|
-
neo4j = ["neo4j>=5.28.0,<6"]
|
|
75
|
-
postgres = [
|
|
76
|
-
"psycopg2>=2.9.10,<3",
|
|
77
|
-
"pgvector>=0.3.5,<0.4",
|
|
78
|
-
"asyncpg>=0.30.0,<1.0.0",
|
|
79
|
-
]
|
|
80
|
-
postgres-binary = [
|
|
81
|
-
"psycopg2-binary>=2.9.10,<3.0.0",
|
|
82
|
-
"pgvector>=0.3.5,<0.4",
|
|
83
|
-
"asyncpg>=0.30.0,<1.0.0",
|
|
84
|
-
]
|
|
85
|
-
notebook = ["notebook>=7.1.0,<8"]
|
|
86
|
-
langchain = [
|
|
87
|
-
"langsmith>=0.2.3,<1.0.0",
|
|
88
|
-
"langchain_text_splitters>=0.3.2,<1.0.0",
|
|
89
|
-
]
|
|
90
|
-
llama-index = ["llama-index-core>=0.12.11,<0.13"]
|
|
91
|
-
gemini = ["google-generativeai>=0.8.4,<0.9"]
|
|
92
|
-
huggingface = ["transformers>=4.46.3,<5"]
|
|
93
|
-
ollama = ["transformers>=4.46.3,<5"]
|
|
94
|
-
mistral = ["mistral-common>=1.5.2,<2"]
|
|
95
|
-
anthropic = ["anthropic>=0.26.1,<0.27"]
|
|
96
|
-
deepeval = ["deepeval>=2.0.1,<3"]
|
|
97
|
-
posthog = ["posthog>=3.5.0,<4"]
|
|
98
|
-
groq = ["groq>=0.8.0,<1.0.0"]
|
|
99
|
-
chromadb = [
|
|
100
|
-
"chromadb>=0.3.0,<0.7",
|
|
101
|
-
"pypika==0.48.8",
|
|
102
|
-
]
|
|
103
|
-
docs = ["unstructured[csv, doc, docx, epub, md, odt, org, ppt, pptx, rst, rtf, tsv, xlsx]>=0.18.1,<19"]
|
|
104
|
-
codegraph = [
|
|
105
|
-
"fastembed<=0.6.0 ; python_version < '3.13'",
|
|
106
|
-
"transformers>=4.46.3,<5",
|
|
107
|
-
"tree-sitter>=0.24.0,<0.25",
|
|
108
|
-
"tree-sitter-python>=0.23.6,<0.24",
|
|
109
|
-
]
|
|
110
|
-
evals = [
|
|
111
|
-
"plotly>=6.0.0,<7",
|
|
112
|
-
"gdown>=5.2.0,<6",
|
|
113
|
-
]
|
|
114
|
-
gui = [
|
|
115
|
-
"pyside6>=6.8.3,<7",
|
|
116
|
-
"qasync>=0.27.1,<0.28",
|
|
117
|
-
]
|
|
118
|
-
graphiti = ["graphiti-core>=0.7.0,<0.8"]
|
|
119
|
-
# Note: New s3fs and boto3 versions don't work well together
|
|
120
|
-
# Always use comaptible fixed versions of these two dependencies
|
|
121
|
-
aws = ["s3fs[boto3]==2025.3.2"]
|
|
122
|
-
dev = [
|
|
123
|
-
"pytest>=7.4.0,<8",
|
|
124
|
-
"pytest-cov>=6.1.1,<7.0.0",
|
|
125
|
-
"pytest-asyncio>=0.21.1,<0.22",
|
|
126
|
-
"coverage>=7.3.2,<8",
|
|
127
|
-
"mypy>=1.7.1,<2",
|
|
128
|
-
"notebook>=7.1.0,<8",
|
|
129
|
-
"deptry>=0.20.0,<0.21",
|
|
130
|
-
"pylint>=3.0.3,<4",
|
|
131
|
-
"ruff>=0.9.2,<1.0.0",
|
|
132
|
-
"tweepy>=4.14.0,<5.0.0",
|
|
133
|
-
"gitpython>=3.1.43,<4",
|
|
134
|
-
"mkdocs-material>=9.5.42,<10",
|
|
135
|
-
"mkdocs-minify-plugin>=0.8.0,<0.9",
|
|
136
|
-
"mkdocstrings[python]>=0.26.2,<0.27",
|
|
137
|
-
]
|
|
138
|
-
debug = ["debugpy>=1.8.9,<2.0.0"]
|
|
139
|
-
|
|
140
|
-
[project.urls]
|
|
141
|
-
Homepage = "https://www.cognee.ai"
|
|
142
|
-
Repository = "https://github.com/topoteretes/cognee"
|
|
143
|
-
|
|
144
|
-
[build-system]
|
|
145
|
-
requires = ["hatchling"]
|
|
146
|
-
build-backend = "hatchling.build"
|
|
147
|
-
|
|
148
|
-
[tool.hatch.build]
|
|
149
|
-
exclude = [
|
|
150
|
-
"/bin",
|
|
151
|
-
"/dist",
|
|
152
|
-
"/.data",
|
|
153
|
-
"/.github",
|
|
154
|
-
"/alembic",
|
|
155
|
-
"/deployment",
|
|
156
|
-
"/cognee-mcp",
|
|
157
|
-
"/cognee-frontend",
|
|
158
|
-
"/examples",
|
|
159
|
-
"/helm",
|
|
160
|
-
"/licenses",
|
|
161
|
-
"/logs",
|
|
162
|
-
"/notebooks",
|
|
163
|
-
"/profiling",
|
|
164
|
-
"/tests",
|
|
165
|
-
"/tools",
|
|
166
|
-
]
|
|
167
|
-
|
|
168
|
-
[tool.hatch.build.targets.wheel]
|
|
169
|
-
packages = ["cognee", "distributed"]
|
|
170
|
-
|
|
171
|
-
[tool.ruff]
|
|
172
|
-
line-length = 100
|
|
173
|
-
exclude = [
|
|
174
|
-
"migrations/", # Ignore migrations directory
|
|
175
|
-
"notebooks/", # Ignore notebook files
|
|
176
|
-
"build/", # Ignore build directory
|
|
177
|
-
"cognee/pipelines.py",
|
|
178
|
-
"cognee/modules/users/models/Group.py",
|
|
179
|
-
"cognee/modules/users/models/ACL.py",
|
|
180
|
-
"cognee/modules/pipelines/models/Task.py",
|
|
181
|
-
"cognee/modules/data/models/Dataset.py"
|
|
182
|
-
]
|
|
183
|
-
|
|
184
|
-
[tool.ruff.lint]
|
|
185
|
-
ignore = ["F401"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|