Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0cf07fa
chore: update cognee version
borisarzentar Apr 19, 2025
8a61e4b
fix: remove filesystem extra
borisarzentar Apr 21, 2025
fab80f3
version: v0.1.38
borisarzentar Apr 21, 2025
66da3d2
Document collection of usage data and how to opt out (#767)
jan-mue Apr 22, 2025
22f106c
feat: expose document deletion via the API (#768)
soobrosa Apr 23, 2025
9bceb98
fix: remove chromadb test from github workflow
borisarzentar Apr 23, 2025
012f1e0
fix: remove filesystem extra
borisarzentar Apr 23, 2025
c5cba01
fix: fixes cases when llm generates inconsistent output (#773)
hajdul88 Apr 23, 2025
60da1c8
fix: graph prompt path (#769)
dexters1 Apr 23, 2025
f404386
fix: hotfix 0.1.38 (#765)
dexters1 Apr 23, 2025
5daa991
Merge remote-tracking branch 'origin/main' into dev
borisarzentar Apr 23, 2025
94c892d
fix: return appropriate result type for chunks search in mcp (#777)
dexters1 Apr 23, 2025
c6ba7a4
version: v0.1.39
borisarzentar Apr 23, 2025
49f2e51
chore: upgrade cognee to 0.1.39 in cognee-mcp
borisarzentar Apr 23, 2025
b9a7c53
fix: run cognee in Docker [COG-1961] (#775) (#779)
borisarzentar Apr 23, 2025
e577363
fix: add missing build tools to mcp docker image
borisarzentar Apr 24, 2025
f94076b
fix: add missing clang build dependency
borisarzentar Apr 24, 2025
7d7df18
Add available languages (#776)
hande-k Apr 25, 2025
500fa9f
feat: Translate README into Portuguese (#762)
diegoabt Apr 30, 2025
0b8931e
Add Russian translations for README and graph visualization (#802)
dm1tryG May 6, 2025
6a1fca8
Update README.md
Vasilije1990 May 6, 2025
2faf238
Update README.md
Vasilije1990 May 6, 2025
0aac93e
Merge dev to main (#827)
borisarzentar May 15, 2025
b1b4ae3
fix: Add baseline overview (#832)
Vasilije1990 May 16, 2025
822cc55
Update Memgraph integration (#850)
matea16 May 23, 2025
4137986
Merge changes from cognee main
Sudhamsha May 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: hotfix 0.1.38 (topoteretes#765)
<!-- .github/pull_request_template.md -->

## Description
- db_engine was not dynamically gathered, with this a change in system
directory will be handled correctly
- Added top_k to all search types
- Reduced delete test threshold 
- Updated MCP version and info

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.

---------

Co-authored-by: Boris <boris@topoteretes.com>
  • Loading branch information
dexters1 and borisarzentar authored Apr 23, 2025
commit f404386df51547519f4bf9fec5a1bc69234b42d2
8 changes: 4 additions & 4 deletions cognee-mcp/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[project]
name = "cognee-mcp"
version = "0.2.2"
version = "0.2.3"
description = "A MCP server project"
readme = "README.md"
requires-python = ">=3.10"

dependencies = [
"cognee[postgres,codegraph,gemini,huggingface]==0.1.37",
"cognee[postgres,codegraph,gemini,huggingface]==0.1.38",
"mcp==1.5.0",
"uv>=0.6.3",
]

[[project.authors]]
name = "Rita Aleksziev"
email = "rita@topoteretes.com"
name = "Boris Arzentar"
email = "boris@topoteretes.com"

[build-system]
requires = [ "hatchling", ]
Expand Down
1,851 changes: 1,105 additions & 746 deletions cognee-mcp/uv.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

def record_graph_changes(func):
"""Decorator to record graph changes in the relationship database."""
db_engine = get_relational_engine()

@wraps(func)
async def wrapper(self, *args, **kwargs):
db_engine = get_relational_engine()
frame = inspect.currentframe()
while frame:
if frame.f_back and frame.f_back.f_code.co_name != "wrapper":
Expand Down
12 changes: 6 additions & 6 deletions cognee/modules/retrieval/code_retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class CodeQueryInfo(BaseModel):
filenames: List[str] = []
sourcecode: str

def __init__(self, limit: int = 3):
def __init__(self, top_k: int = 3):
"""Initialize retriever with search parameters."""
self.limit = limit
self.top_k = top_k
self.file_name_collections = ["CodeFile_name"]
self.classes_and_functions_collections = [
"ClassDefinition_source_code",
Expand Down Expand Up @@ -60,7 +60,7 @@ async def get_context(self, query: str) -> Any:
if not files_and_codeparts.filenames or not files_and_codeparts.sourcecode:
for collection in self.file_name_collections:
search_results_file = await vector_engine.search(
collection, query, limit=self.limit
collection, query, limit=self.top_k
)
for res in search_results_file:
similar_filenames.append(
Expand All @@ -69,7 +69,7 @@ async def get_context(self, query: str) -> Any:

for collection in self.classes_and_functions_collections:
search_results_code = await vector_engine.search(
collection, query, limit=self.limit
collection, query, limit=self.top_k
)
for res in search_results_code:
similar_codepieces.append(
Expand All @@ -79,7 +79,7 @@ async def get_context(self, query: str) -> Any:
for collection in self.file_name_collections:
for file_from_query in files_and_codeparts.filenames:
search_results_file = await vector_engine.search(
collection, file_from_query, limit=self.limit
collection, file_from_query, limit=self.top_k
)
for res in search_results_file:
similar_filenames.append(
Expand All @@ -88,7 +88,7 @@ async def get_context(self, query: str) -> Any:

for collection in self.classes_and_functions_collections:
search_results_code = await vector_engine.search(
collection, files_and_codeparts.sourcecode, limit=self.limit
collection, files_and_codeparts.sourcecode, limit=self.top_k
)
for res in search_results_code:
similar_codepieces.append(
Expand Down
6 changes: 3 additions & 3 deletions cognee/modules/retrieval/summaries_retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
class SummariesRetriever(BaseRetriever):
"""Retriever for handling summary-based searches."""

def __init__(self, limit: int = 5):
def __init__(self, top_k: int = 5):
"""Initialize retriever with search parameters."""
self.limit = limit
self.top_k = top_k

async def get_context(self, query: str) -> Any:
"""Retrieves summary context based on the query."""
vector_engine = get_vector_engine()

try:
summaries_results = await vector_engine.search(
"TextSummary_text", query, limit=self.limit
"TextSummary_text", query, limit=self.top_k
)
except CollectionNotFoundError as error:
raise NoDataError("No data found in the system, please add data first.") from error
Expand Down
8 changes: 4 additions & 4 deletions cognee/modules/search/methods/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ async def specific_search(
top_k: int = 10,
) -> list:
search_tasks: dict[SearchType, Callable] = {
SearchType.SUMMARIES: SummariesRetriever().get_completion,
SearchType.SUMMARIES: SummariesRetriever(top_k=top_k).get_completion,
SearchType.INSIGHTS: InsightsRetriever(top_k=top_k).get_completion,
SearchType.CHUNKS: ChunksRetriever().get_completion,
SearchType.CHUNKS: ChunksRetriever(top_k=top_k).get_completion,
SearchType.RAG_COMPLETION: CompletionRetriever(
system_prompt_path=system_prompt_path,
top_k=top_k,
Expand All @@ -71,9 +71,9 @@ async def specific_search(
top_k=top_k,
).get_completion,
SearchType.GRAPH_SUMMARY_COMPLETION: GraphSummaryCompletionRetriever(
system_prompt_path=system_prompt_path,
system_prompt_path=system_prompt_path, top_k=top_k
).get_completion,
SearchType.CODE: CodeRetriever().get_completion,
SearchType.CODE: CodeRetriever(top_k=top_k).get_completion,
SearchType.CYPHER: CypherSearchRetriever().get_completion,
SearchType.NATURAL_LANGUAGE: NaturalLanguageRetriever().get_completion,
}
Expand Down
2 changes: 1 addition & 1 deletion cognee/tests/test_deletion.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def main():

graph_engine = await get_graph_engine()
nodes, edges = await graph_engine.get_graph_data()
assert len(nodes) > 15 and len(edges) > 15, "Graph database is not loaded."
assert len(nodes) > 10 and len(edges) > 10, "Graph database is not loaded."

await cognee.delete([text_1, text_2], mode="hard")
nodes, edges = await graph_engine.get_graph_data()
Expand Down