From 5cb596e711e906bf9ce98d36a09c637e50ba7a78 Mon Sep 17 00:00:00 2001 From: willtai Date: Thu, 12 Sep 2024 16:39:32 +0100 Subject: [PATCH] Rename neo4j-genai references to neo4j-graphrag (#130) * Sunset neo4j-genai package * Rename references to neo4j-genai to neo4j-graphrag * Readded suffixes to neo4j-graphrag-python * Update pyproject * Update neo4j_genai in documentation to neo4j_graphrag * Removed warning in neo4j_graphrag's init * Ruff formatting + rename neo4j-genai in User Guide * Poetry lock * Revert test_orchestrator * Update CHANGELOG --- .github/workflows/minor-release.yaml | 2 +- .github/workflows/patch-release.yaml | 2 +- .github/workflows/pr-e2e-tests.yaml | 2 +- .github/workflows/pr.yaml | 2 +- .github/workflows/scheduled-e2e-tests.yaml | 2 +- CHANGELOG.md | 9 +- README.md | 22 +- docs/Makefile | 2 +- docs/source/api.rst | 130 +++++------ docs/source/conf.py | 2 +- docs/source/index.rst | 18 +- docs/source/types.rst | 30 +-- docs/source/user_guide_kg_builder.rst | 40 ++-- docs/source/user_guide_pipeline.rst | 10 +- docs/source/user_guide_rag.rst | 48 ++-- examples/graphrag.py | 12 +- examples/graphrag_custom_prompt.py | 12 +- examples/graphrag_with_langchain_llm.py | 8 +- examples/hybrid_cypher_search.py | 6 +- examples/hybrid_search.py | 6 +- examples/openai_search.py | 4 +- examples/pinecone/text_search.py | 2 +- examples/pinecone/vector_search.py | 2 +- examples/pipeline/kg_builder_from_pdf.py | 18 +- examples/pipeline/kg_builder_from_text.py | 22 +- examples/pipeline/rag.py | 18 +- examples/pipeline/visualization.py | 4 +- examples/similarity_search_for_text.py | 6 +- examples/similarity_search_for_vector.py | 4 +- examples/text2cypher_search.py | 4 +- examples/vector_cypher_retrieval.py | 6 +- examples/vector_search_with_filters.py | 6 +- .../weaviate/text_search_local_embedder.py | 2 +- .../weaviate/text_search_remote_embedder.py | 2 +- examples/weaviate/vector_search.py | 2 +- poetry.lock | 220 ++++++++++-------- pyproject.toml | 5 +- .../embeddings => neo4j_graphrag}/__init__.py | 0 .../embedder.py | 0 .../embeddings}/__init__.py | 0 .../embeddings/openai.py | 2 +- .../embeddings/sentence_transformers.py | 2 +- .../exceptions.py | 2 +- .../experimental/__init__.py | 0 .../experimental/components}/__init__.py | 0 .../experimental/components/embedder.py | 12 +- .../components/entity_relation_extractor.py | 20 +- .../experimental/components/kg_writer.py | 12 +- .../experimental/components/pdf_loader.py | 4 +- .../experimental/components/schema.py | 8 +- .../components/text_splitters/__init__.py | 0 .../components/text_splitters/base.py | 4 +- .../components/text_splitters/langchain.py | 8 +- .../components/text_splitters/llamaindex.py | 8 +- .../experimental/components/types.py | 2 +- .../experimental/pipeline/__init__.py | 0 .../experimental/pipeline/component.py | 2 +- .../experimental/pipeline/exceptions.py | 2 +- .../experimental/pipeline/pipeline.py | 10 +- .../experimental/pipeline/pipeline_graph.py | 0 .../experimental/pipeline/stores.py | 0 .../experimental/pipeline/types.py | 2 +- .../filters.py | 2 +- .../generation/__init__.py | 0 .../generation/graphrag.py | 18 +- .../generation/prompts.py | 2 +- .../generation/types.py | 6 +- .../indexes.py | 16 +- .../llm/__init__.py | 0 .../llm/base.py | 0 .../llm/openai_llm.py | 0 .../llm/types.py | 0 .../neo4j_queries.py | 4 +- .../retrievers/__init__.py | 0 .../retrievers/base.py | 4 +- .../retrievers/external/__init__.py | 0 .../retrievers/external/pinecone}/__init__.py | 0 .../retrievers/external/pinecone/pinecone.py | 16 +- .../retrievers/external/pinecone/types.py | 2 +- .../retrievers/external/utils.py | 2 +- .../retrievers/external/weaviate}/__init__.py | 7 - .../retrievers/external/weaviate/types.py | 2 +- .../retrievers/external/weaviate/weaviate.py | 19 +- .../retrievers/hybrid.py | 14 +- .../retrievers/text2cypher.py | 14 +- .../retrievers/vector.py | 14 +- src/{neo4j_genai => neo4j_graphrag}/schema.py | 0 src/{neo4j_genai => neo4j_graphrag}/types.py | 2 +- src/{neo4j_genai => neo4j_graphrag}/utils.py | 0 tests/e2e/conftest.py | 8 +- tests/e2e/pinecone_e2e/test_pinecone_e2e.py | 6 +- tests/e2e/test_graphrag_e2e.py | 12 +- tests/e2e/test_hybrid_e2e.py | 6 +- tests/e2e/test_kg_builder_pipeline_e2e.py | 20 +- tests/e2e/test_kg_writer_component_e2e.py | 4 +- tests/e2e/test_schema_e2e.py | 2 +- tests/e2e/test_schema_filters_e2e.py | 2 +- tests/e2e/test_text2cypher_e2e.py | 6 +- tests/e2e/test_vector_e2e.py | 6 +- tests/e2e/utils.py | 2 +- tests/e2e/weaviate_e2e/test_weaviate_e2e.py | 6 +- tests/unit/conftest.py | 16 +- .../embeddings/test_sentence_transformers.py | 6 +- .../experimental/components/test_embedder.py | 4 +- .../test_entity_relation_extractor.py | 10 +- .../experimental/components/test_kg_writer.py | 6 +- .../components/test_pdf_loader.py | 4 +- .../experimental/components/test_schema.py | 4 +- .../experimental/components/test_types.py | 2 +- .../text_splitters/test_langchain.py | 4 +- .../text_splitters/test_llamaindex.py | 4 +- .../unit/experimental/pipeline/components.py | 2 +- .../pipeline/test_orchestrator.py | 22 +- .../experimental/pipeline/test_pipeline.py | 4 +- .../pipeline/test_pipeline_graph.py | 2 +- .../unit/experimental/pipeline/test_store.py | 2 +- .../unit/retrievers/external/test_pinecone.py | 8 +- .../unit/retrievers/external/test_weaviate.py | 8 +- tests/unit/retrievers/test_base.py | 10 +- tests/unit/retrievers/test_hybrid.py | 39 ++-- tests/unit/retrievers/test_text2cypher.py | 40 ++-- tests/unit/retrievers/test_vector.py | 56 ++--- tests/unit/test_filters.py | 38 +-- tests/unit/test_graphrag.py | 12 +- tests/unit/test_indexes.py | 4 +- tests/unit/test_neo4j_queries.py | 8 +- tests/unit/test_prompt_template.py | 4 +- tests/unit/test_schema.py | 6 +- 128 files changed, 684 insertions(+), 657 deletions(-) rename src/{neo4j_genai/embeddings => neo4j_graphrag}/__init__.py (100%) rename src/{neo4j_genai => neo4j_graphrag}/embedder.py (100%) rename src/{neo4j_genai/experimental/components => neo4j_graphrag/embeddings}/__init__.py (100%) rename src/{neo4j_genai => neo4j_graphrag}/embeddings/openai.py (96%) rename src/{neo4j_genai => neo4j_graphrag}/embeddings/sentence_transformers.py (97%) rename src/{neo4j_genai => neo4j_graphrag}/exceptions.py (97%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/__init__.py (100%) rename src/{neo4j_genai/retrievers/external/pinecone => neo4j_graphrag/experimental/components}/__init__.py (100%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/components/embedder.py (84%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/components/entity_relation_extractor.py (95%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/components/kg_writer.py (95%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/components/pdf_loader.py (95%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/components/schema.py (96%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/components/text_splitters/__init__.py (100%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/components/text_splitters/base.py (86%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/components/text_splitters/langchain.py (84%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/components/text_splitters/llamaindex.py (84%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/components/types.py (97%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/pipeline/__init__.py (100%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/pipeline/component.py (97%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/pipeline/exceptions.py (95%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/pipeline/pipeline.py (98%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/pipeline/pipeline_graph.py (100%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/pipeline/stores.py (100%) rename src/{neo4j_genai => neo4j_graphrag}/experimental/pipeline/types.py (93%) rename src/{neo4j_genai => neo4j_graphrag}/filters.py (99%) rename src/{neo4j_genai => neo4j_graphrag}/generation/__init__.py (100%) rename src/{neo4j_genai => neo4j_graphrag}/generation/graphrag.py (90%) rename src/{neo4j_genai => neo4j_graphrag}/generation/prompts.py (98%) rename src/{neo4j_genai => neo4j_graphrag}/generation/types.py (90%) rename src/{neo4j_genai => neo4j_graphrag}/indexes.py (96%) rename src/{neo4j_genai => neo4j_graphrag}/llm/__init__.py (100%) rename src/{neo4j_genai => neo4j_graphrag}/llm/base.py (100%) rename src/{neo4j_genai => neo4j_graphrag}/llm/openai_llm.py (100%) rename src/{neo4j_genai => neo4j_graphrag}/llm/types.py (100%) rename src/{neo4j_genai => neo4j_graphrag}/neo4j_queries.py (98%) rename src/{neo4j_genai => neo4j_graphrag}/retrievers/__init__.py (100%) rename src/{neo4j_genai => neo4j_graphrag}/retrievers/base.py (98%) rename src/{neo4j_genai => neo4j_graphrag}/retrievers/external/__init__.py (100%) rename src/{neo4j_genai/retrievers/external/weaviate => neo4j_graphrag/retrievers/external/pinecone}/__init__.py (100%) rename src/{neo4j_genai => neo4j_graphrag}/retrievers/external/pinecone/pinecone.py (95%) rename src/{neo4j_genai => neo4j_graphrag}/retrievers/external/pinecone/types.py (98%) rename src/{neo4j_genai => neo4j_graphrag}/retrievers/external/utils.py (95%) rename src/{neo4j_genai => neo4j_graphrag/retrievers/external/weaviate}/__init__.py (75%) rename src/{neo4j_genai => neo4j_graphrag}/retrievers/external/weaviate/types.py (98%) rename src/{neo4j_genai => neo4j_graphrag}/retrievers/external/weaviate/weaviate.py (94%) rename src/{neo4j_genai => neo4j_graphrag}/retrievers/hybrid.py (97%) rename src/{neo4j_genai => neo4j_graphrag}/retrievers/text2cypher.py (93%) rename src/{neo4j_genai => neo4j_graphrag}/retrievers/vector.py (97%) rename src/{neo4j_genai => neo4j_graphrag}/schema.py (100%) rename src/{neo4j_genai => neo4j_graphrag}/types.py (99%) rename src/{neo4j_genai => neo4j_graphrag}/utils.py (100%) diff --git a/.github/workflows/minor-release.yaml b/.github/workflows/minor-release.yaml index ea41121c..1b211ead 100644 --- a/.github/workflows/minor-release.yaml +++ b/.github/workflows/minor-release.yaml @@ -39,7 +39,7 @@ jobs: sed -i.bak -e 's/## Next/## Next\n\n## ${{ steps.get-version.outputs.version }}/' CHANGELOG.md && rm CHANGELOG.md.bak - uses: EndBug/add-and-commit@v9 with: - author_name: 'Neo4j-GenAI GitHub Action' + author_name: 'Neo4j-GraphRAG GitHub Action' author_email: 'team-gen-ai@neo4j.com' message: 'Bump version to ${{ steps.get-version.outputs.version }}' add: "['pyproject.toml', 'CHANGELOG.md']" diff --git a/.github/workflows/patch-release.yaml b/.github/workflows/patch-release.yaml index be1c0265..4284b0e2 100644 --- a/.github/workflows/patch-release.yaml +++ b/.github/workflows/patch-release.yaml @@ -39,7 +39,7 @@ jobs: sed -i.bak -e 's/## Next/## Next\n\n## ${{ steps.get-version.outputs.version }}/' CHANGELOG.md && rm CHANGELOG.md.bak - uses: EndBug/add-and-commit@v9 with: - author_name: 'Neo4j-GenAI GitHub Action' + author_name: 'Neo4j-GraphRAG GitHub Action' author_email: 'team-gen-ai@neo4j.com' message: 'Bump version to ${{ steps.get-version.outputs.version }}' add: "['pyproject.toml', 'CHANGELOG.md']" diff --git a/.github/workflows/pr-e2e-tests.yaml b/.github/workflows/pr-e2e-tests.yaml index b315ba56..d4d29015 100644 --- a/.github/workflows/pr-e2e-tests.yaml +++ b/.github/workflows/pr-e2e-tests.yaml @@ -1,4 +1,4 @@ -name: 'Neo4j-GenAI PR E2E Tests' +name: 'Neo4j-GraphRAG PR E2E Tests' on: pull_request: diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index c69168bf..c93dd98a 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -1,4 +1,4 @@ -name: neo4j_genai PR +name: neo4j_graphrag PR on: pull_request jobs: diff --git a/.github/workflows/scheduled-e2e-tests.yaml b/.github/workflows/scheduled-e2e-tests.yaml index af1c8c57..ff1ea0bc 100644 --- a/.github/workflows/scheduled-e2e-tests.yaml +++ b/.github/workflows/scheduled-e2e-tests.yaml @@ -1,4 +1,4 @@ -name: 'Neo4j-GenAI Scheduled E2E Tests' +name: 'Neo4j-GraphRAG Scheduled E2E Tests' on: schedule: diff --git a/CHANGELOG.md b/CHANGELOG.md index bd59e0d7..4ca4d0f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,10 @@ -# @neo4j/neo4j-genai-python +# @neo4j/neo4j-graphrag-python ## Next +### Changed +- Officially renamed neo4j-genai to neo4j-graphrag. For the final release version of neo4j-genai, please visit https://pypi.org/project/neo4j-genai/. + ## 0.6.0 ### IMPORTANT NOTICE @@ -51,7 +54,7 @@ - Stopped embeddings from being returned when searching with `VectorRetriever`. Added `nodeLabels` and `id` to the metadata of `VectorRetriever` results. - Added `upsert_vector` utility function for attaching vectors to node properties. - Introduced `Neo4jInsertionError` for handling insertion failures in Neo4j. -- Included Pinecone and Weaviate retrievers in neo4j_genai.retrievers. +- Included Pinecone and Weaviate retrievers in neo4j_graphrag.retrievers. - Introduced the GraphRAG object, enabling a full RAG (Retrieval-Augmented Generation) pipeline with context retrieval, prompt formatting, and answer generation. - Added PromptTemplate and RagTemplate for customizable prompt generation. - Added LLMInterface with implementation for OpenAI LLM. @@ -62,7 +65,7 @@ - Introduced result_formatter argument to all retrievers, allowing custom formatting of retriever results. ### Changed -- Refactored import paths for retrievers to neo4j_genai.retrievers. +- Refactored import paths for retrievers to neo4j_graphrag.retrievers. - Implemented exception chaining for all re-raised exceptions to improve stack trace readability. - Made error messages in `index.py` more consistent. - Renamed `Retriever._get_search_results` to `Retriever.get_search_results` diff --git a/README.md b/README.md index 8b904662..e0b9e39c 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,4 @@ -# ⚠️ Deprecation Warning ⚠️ - -This package `neo4j-genai` is deprecated and will no longer be maintained. Please switch to our new package `neo4j-graphrag`, which is available at [neo4j-graphrag on GitHub](https://github.com/neo4j/neo4j-graphrag-python) and [neo4j-graphrag on PyPI](https://pypi.org/project/neo4j-graphrag/). - -`neo4j-graphrag` is a renamed continuation of this package. We encourage all users to migrate to the new package to continue receiving updates and support. - -# Neo4j GenAI package for Python +# Neo4j GraphRAG package for Python This repository contains the official Neo4j GenAI features for Python. @@ -31,7 +25,7 @@ This package requires Python (>=3.8.1). To install the latest stable version, use: ```shell -pip install neo4j-genai +pip install neo4j-graphrag ``` ## Examples @@ -44,7 +38,7 @@ Assumption: Neo4j running ```python from neo4j import GraphDatabase -from neo4j_genai.indexes import create_vector_index +from neo4j_graphrag.indexes import create_vector_index URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") @@ -74,7 +68,7 @@ Assumption: Neo4j running with a defined vector index ```python from neo4j import GraphDatabase -from neo4j_genai.indexes import upsert_vector +from neo4j_graphrag.indexes import upsert_vector URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") @@ -106,10 +100,10 @@ in Neo4j. ```python from neo4j import GraphDatabase -from neo4j_genai.retrievers import VectorRetriever -from neo4j_genai.llm import OpenAILLM -from neo4j_genai.generation import GraphRAG -from neo4j_genai.embeddings.openai import OpenAIEmbeddings +from neo4j_graphrag.retrievers import VectorRetriever +from neo4j_graphrag.llm import OpenAILLM +from neo4j_graphrag.generation import GraphRAG +from neo4j_graphrag.embeddings.openai import OpenAIEmbeddings URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") diff --git a/docs/Makefile b/docs/Makefile index 08bfa371..d2403af1 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -3,7 +3,7 @@ # You can set these variables from the command line. VERSION = SNAPSHOT -PRODUCT = neo4j-genai-python +PRODUCT = neo4j-graphrag-python SPHINXOPTS = SPHINXBUILD = poetry run sphinx-build PAPER = diff --git a/docs/source/api.rst b/docs/source/api.rst index 71e4a839..43db43bd 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -12,56 +12,56 @@ Components KGWriter ======== -.. autoclass:: neo4j_genai.experimental.components.kg_writer.KGWriter +.. autoclass:: neo4j_graphrag.experimental.components.kg_writer.KGWriter :members: run Neo4jWriter =========== -.. autoclass:: neo4j_genai.experimental.components.kg_writer.Neo4jWriter +.. autoclass:: neo4j_graphrag.experimental.components.kg_writer.Neo4jWriter :members: run TextSplitter ============ -.. autoclass:: neo4j_genai.experimental.components.text_splitters.base.TextSplitter +.. autoclass:: neo4j_graphrag.experimental.components.text_splitters.base.TextSplitter :members: run LangChainTextSplitterAdapter ============================ -.. autoclass:: neo4j_genai.experimental.components.text_splitters.langchain.LangChainTextSplitterAdapter +.. autoclass:: neo4j_graphrag.experimental.components.text_splitters.langchain.LangChainTextSplitterAdapter :members: run LlamaIndexTextSplitterAdapter ============================= -.. autoclass:: neo4j_genai.experimental.components.text_splitters.llamaindex.LlamaIndexTextSplitterAdapter +.. autoclass:: neo4j_graphrag.experimental.components.text_splitters.llamaindex.LlamaIndexTextSplitterAdapter :members: run TextChunkEmbedder ================= -.. autoclass:: neo4j_genai.experimental.components.embedder.TextChunkEmbedder +.. autoclass:: neo4j_graphrag.experimental.components.embedder.TextChunkEmbedder :members: run SchemaBuilder ============= -.. autoclass:: neo4j_genai.experimental.components.schema.SchemaBuilder +.. autoclass:: neo4j_graphrag.experimental.components.schema.SchemaBuilder :members: run EntityRelationExtractor ======================= -.. autoclass:: neo4j_genai.experimental.components.entity_relation_extractor.EntityRelationExtractor +.. autoclass:: neo4j_graphrag.experimental.components.entity_relation_extractor.EntityRelationExtractor :members: :undoc-members: component_inputs, component_outputs LLMEntityRelationExtractor ========================== -.. autoclass:: neo4j_genai.experimental.components.entity_relation_extractor.LLMEntityRelationExtractor +.. autoclass:: neo4j_graphrag.experimental.components.entity_relation_extractor.LLMEntityRelationExtractor :members: run .. _retrievers-section: @@ -73,40 +73,40 @@ Retrievers RetrieverInterface ================== -.. autoclass:: neo4j_genai.retrievers.base.Retriever +.. autoclass:: neo4j_graphrag.retrievers.base.Retriever :members: VectorRetriever =============== -.. autoclass:: neo4j_genai.retrievers.VectorRetriever +.. autoclass:: neo4j_graphrag.retrievers.VectorRetriever :members: search VectorCypherRetriever ===================== -.. autoclass:: neo4j_genai.retrievers.VectorCypherRetriever +.. autoclass:: neo4j_graphrag.retrievers.VectorCypherRetriever :members: search HybridRetriever =============== -.. autoclass:: neo4j_genai.retrievers.HybridRetriever +.. autoclass:: neo4j_graphrag.retrievers.HybridRetriever :members: search HybridCypherRetriever ===================== -.. autoclass:: neo4j_genai.retrievers.HybridCypherRetriever +.. autoclass:: neo4j_graphrag.retrievers.HybridCypherRetriever :members: search Text2CypherRetriever ===================== -.. autoclass:: neo4j_genai.retrievers.Text2CypherRetriever +.. autoclass:: neo4j_graphrag.retrievers.Text2CypherRetriever :members: search @@ -120,14 +120,14 @@ This section includes retrievers that integrate with databases external to Neo4j WeaviateNeo4jRetriever ====================== -.. autoclass:: neo4j_genai.retrievers.external.weaviate.weaviate.WeaviateNeo4jRetriever +.. autoclass:: neo4j_graphrag.retrievers.external.weaviate.weaviate.WeaviateNeo4jRetriever :members: search PineconeNeo4jRetriever ====================== -.. autoclass:: neo4j_genai.retrievers.external.pinecone.pinecone.PineconeNeo4jRetriever +.. autoclass:: neo4j_graphrag.retrievers.external.pinecone.pinecone.PineconeNeo4jRetriever :members: search @@ -135,13 +135,13 @@ PineconeNeo4jRetriever Embedder ******** -.. autoclass:: neo4j_genai.embedder.Embedder +.. autoclass:: neo4j_graphrag.embedder.Embedder :members: SentenceTransformerEmbeddings ============================= -.. autoclass:: neo4j_genai.embeddings.sentence_transformers.SentenceTransformerEmbeddings +.. autoclass:: neo4j_graphrag.embeddings.sentence_transformers.SentenceTransformerEmbeddings :members: ********** @@ -151,34 +151,34 @@ Generation LLMInterface ============ -.. autoclass:: neo4j_genai.llm.LLMInterface +.. autoclass:: neo4j_graphrag.llm.LLMInterface :members: OpenAILLM --------- -.. autoclass:: neo4j_genai.llm.OpenAILLM +.. autoclass:: neo4j_graphrag.llm.OpenAILLM :members: PromptTemplate ============== -.. autoclass:: neo4j_genai.generation.prompts.PromptTemplate +.. autoclass:: neo4j_graphrag.generation.prompts.PromptTemplate :members: RagTemplate ----------- -.. autoclass:: neo4j_genai.generation.prompts.RagTemplate +.. autoclass:: neo4j_graphrag.generation.prompts.RagTemplate :members: ERExtractionTemplate -------------------- -.. autoclass:: neo4j_genai.generation.prompts.ERExtractionTemplate +.. autoclass:: neo4j_graphrag.generation.prompts.ERExtractionTemplate :members: @@ -189,7 +189,7 @@ RAG GraphRAG ======== -.. autoclass:: neo4j_genai.generation.graphrag.GraphRAG +.. autoclass:: neo4j_graphrag.generation.graphrag.GraphRAG :members: @@ -201,174 +201,174 @@ Database Interaction .. _create-vector-index: -.. autofunction:: neo4j_genai.indexes.create_vector_index +.. autofunction:: neo4j_graphrag.indexes.create_vector_index .. _create-fulltext-index: -.. autofunction:: neo4j_genai.indexes.create_fulltext_index +.. autofunction:: neo4j_graphrag.indexes.create_fulltext_index -.. autofunction:: neo4j_genai.indexes.drop_index_if_exists +.. autofunction:: neo4j_graphrag.indexes.drop_index_if_exists -.. autofunction:: neo4j_genai.indexes.upsert_vector +.. autofunction:: neo4j_graphrag.indexes.upsert_vector -.. autofunction:: neo4j_genai.indexes.upsert_vector_on_relationship +.. autofunction:: neo4j_graphrag.indexes.upsert_vector_on_relationship -.. autofunction:: neo4j_genai.indexes.async_upsert_vector +.. autofunction:: neo4j_graphrag.indexes.async_upsert_vector -.. autofunction:: neo4j_genai.indexes.async_upsert_vector_on_relationship +.. autofunction:: neo4j_graphrag.indexes.async_upsert_vector_on_relationship ****** Errors ****** -* :class:`neo4j_genai.exceptions.Neo4jGenAiError` +* :class:`neo4j_graphrag.exceptions.Neo4jGenAiError` - * :class:`neo4j_genai.exceptions.RetrieverInitializationError` + * :class:`neo4j_graphrag.exceptions.RetrieverInitializationError` - * :class:`neo4j_genai.exceptions.SearchValidationError` + * :class:`neo4j_graphrag.exceptions.SearchValidationError` - * :class:`neo4j_genai.exceptions.FilterValidationError` + * :class:`neo4j_graphrag.exceptions.FilterValidationError` - * :class:`neo4j_genai.exceptions.EmbeddingRequiredError` + * :class:`neo4j_graphrag.exceptions.EmbeddingRequiredError` - * :class:`neo4j_genai.exceptions.InvalidRetrieverResultError` + * :class:`neo4j_graphrag.exceptions.InvalidRetrieverResultError` - * :class:`neo4j_genai.exceptions.Neo4jIndexError` + * :class:`neo4j_graphrag.exceptions.Neo4jIndexError` - * :class:`neo4j_genai.exceptions.Neo4jVersionError` + * :class:`neo4j_graphrag.exceptions.Neo4jVersionError` - * :class:`neo4j_genai.exceptions.Text2CypherRetrievalError` + * :class:`neo4j_graphrag.exceptions.Text2CypherRetrievalError` - * :class:`neo4j_genai.exceptions.SchemaFetchError` + * :class:`neo4j_graphrag.exceptions.SchemaFetchError` - * :class:`neo4j_genai.exceptions.RagInitializationError` + * :class:`neo4j_graphrag.exceptions.RagInitializationError` - * :class:`neo4j_genai.exceptions.PromptMissingInputError` + * :class:`neo4j_graphrag.exceptions.PromptMissingInputError` - * :class:`neo4j_genai.exceptions.LLMGenerationError` + * :class:`neo4j_graphrag.exceptions.LLMGenerationError` - * :class:`neo4j_genai.experimental.pipeline.exceptions.PipelineDefinitionError` + * :class:`neo4j_graphrag.experimental.pipeline.exceptions.PipelineDefinitionError` - * :class:`neo4j_genai.experimental.pipeline.exceptions.PipelineMissingDependencyError` + * :class:`neo4j_graphrag.experimental.pipeline.exceptions.PipelineMissingDependencyError` - * :class:`neo4j_genai.experimental.pipeline.exceptions.PipelineStatusUpdateError` + * :class:`neo4j_graphrag.experimental.pipeline.exceptions.PipelineStatusUpdateError` Neo4jGenAiError =============== -.. autoclass:: neo4j_genai.exceptions.Neo4jGenAiError +.. autoclass:: neo4j_graphrag.exceptions.Neo4jGenAiError :show-inheritance: RetrieverInitializationError ============================ -.. autoclass:: neo4j_genai.exceptions.RetrieverInitializationError +.. autoclass:: neo4j_graphrag.exceptions.RetrieverInitializationError :show-inheritance: SearchValidationError ===================== -.. autoclass:: neo4j_genai.exceptions.SearchValidationError +.. autoclass:: neo4j_graphrag.exceptions.SearchValidationError :show-inheritance: FilterValidationError ===================== -.. autoclass:: neo4j_genai.exceptions.FilterValidationError +.. autoclass:: neo4j_graphrag.exceptions.FilterValidationError :show-inheritance: EmbeddingRequiredError ====================== -.. autoclass:: neo4j_genai.exceptions.EmbeddingRequiredError +.. autoclass:: neo4j_graphrag.exceptions.EmbeddingRequiredError :show-inheritance: InvalidRetrieverResultError =========================== -.. autoclass:: neo4j_genai.exceptions.InvalidRetrieverResultError +.. autoclass:: neo4j_graphrag.exceptions.InvalidRetrieverResultError :show-inheritance: Neo4jIndexError =============== -.. autoclass:: neo4j_genai.exceptions.Neo4jIndexError +.. autoclass:: neo4j_graphrag.exceptions.Neo4jIndexError :show-inheritance: Neo4jInsertionError =================== -.. autoclass:: neo4j_genai.exceptions.Neo4jInsertionError +.. autoclass:: neo4j_graphrag.exceptions.Neo4jInsertionError :show-inheritance: Neo4jVersionError ================= -.. autoclass:: neo4j_genai.exceptions.Neo4jVersionError +.. autoclass:: neo4j_graphrag.exceptions.Neo4jVersionError :show-inheritance: Text2CypherRetrievalError ========================= -.. autoclass:: neo4j_genai.exceptions.Text2CypherRetrievalError +.. autoclass:: neo4j_graphrag.exceptions.Text2CypherRetrievalError :show-inheritance: SchemaFetchError ================ -.. autoclass:: neo4j_genai.exceptions.SchemaFetchError +.. autoclass:: neo4j_graphrag.exceptions.SchemaFetchError :show-inheritance: RagInitializationError ====================== -.. autoclass:: neo4j_genai.exceptions.RagInitializationError +.. autoclass:: neo4j_graphrag.exceptions.RagInitializationError :show-inheritance: PromptMissingInputError ======================= -.. autoclass:: neo4j_genai.exceptions.PromptMissingInputError +.. autoclass:: neo4j_graphrag.exceptions.PromptMissingInputError :show-inheritance: LLMGenerationError ================== -.. autoclass:: neo4j_genai.exceptions.LLMGenerationError +.. autoclass:: neo4j_graphrag.exceptions.LLMGenerationError :show-inheritance: PipelineDefinitionError ======================= -.. autoclass:: neo4j_genai.experimental.pipeline.exceptions.PipelineDefinitionError +.. autoclass:: neo4j_graphrag.experimental.pipeline.exceptions.PipelineDefinitionError :show-inheritance: PipelineMissingDependencyError ============================== -.. autoclass:: neo4j_genai.experimental.pipeline.exceptions.PipelineMissingDependencyError +.. autoclass:: neo4j_graphrag.experimental.pipeline.exceptions.PipelineMissingDependencyError :show-inheritance: PipelineStatusUpdateError ========================= -.. autoclass:: neo4j_genai.experimental.pipeline.exceptions.PipelineStatusUpdateError +.. autoclass:: neo4j_graphrag.experimental.pipeline.exceptions.PipelineStatusUpdateError :show-inheritance: diff --git a/docs/source/conf.py b/docs/source/conf.py index b7f2bbff..a7befab9 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -28,7 +28,7 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -project = "neo4j-genai-python" +project = "neo4j-graphrag-python" copyright = "2024, Neo4j, Inc." author = "Neo4j, Inc." diff --git a/docs/source/index.rst b/docs/source/index.rst index 2e555ece..3dfa4981 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,12 +1,12 @@ -.. neo4j-genai-python documentation master file, created by +.. neo4j-graphrag-python documentation master file, created by sphinx-quickstart on Tue Apr 9 16:36:43 2024. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Neo4j GenAI package for Python -============================== +Neo4j GraphRAG for Python +========================= -This repository contains the official Neo4j GenAI features for Python. +This repository contains the official Neo4j GraphRAG features for Python. The purpose of this package is to provide a first party package to developers, where Neo4j can guarantee long term commitment and maintenance as well as being @@ -61,7 +61,7 @@ To install the latest stable version, use: .. code:: bash - pip install neo4j-genai + pip install neo4j-graphrag .. note:: @@ -83,7 +83,7 @@ See :ref:`the API documentation` for more details. .. code:: python from neo4j import GraphDatabase - from neo4j_genai.indexes import create_vector_index + from neo4j_graphrag.indexes import create_vector_index URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") @@ -117,7 +117,7 @@ Note that the below example is not the only way you can upsert data into your Ne .. code:: python from neo4j import GraphDatabase - from neo4j_genai.indexes import upsert_vector + from neo4j_graphrag.indexes import upsert_vector URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") @@ -148,7 +148,7 @@ While the library has more retrievers than shown here, the following examples sh .. code:: python from neo4j import GraphDatabase - from neo4j_genai.retrievers import VectorRetriever + from neo4j_graphrag.retrievers import VectorRetriever from langchain_openai import OpenAIEmbeddings URI = "neo4j://localhost:7687" @@ -203,7 +203,7 @@ Issues If you have a bug to report or feature to request, first `search to see if an issue already exists `_. If a related issue doesn't exist, please raise a new issue using the relevant -`issue form `_. +`issue form `_. If you're a Neo4j Enterprise customer, you can also reach out to `Customer Support `_. diff --git a/docs/source/types.rst b/docs/source/types.rst index 2bc87ffb..b91b7e06 100644 --- a/docs/source/types.rst +++ b/docs/source/types.rst @@ -7,78 +7,78 @@ Types RawSearchResult =============== -.. autoclass:: neo4j_genai.types.RawSearchResult +.. autoclass:: neo4j_graphrag.types.RawSearchResult RetrieverResult =============== -.. autoclass:: neo4j_genai.types.RetrieverResult +.. autoclass:: neo4j_graphrag.types.RetrieverResult RetrieverResultItem =================== -.. autoclass:: neo4j_genai.types.RetrieverResultItem +.. autoclass:: neo4j_graphrag.types.RetrieverResultItem LLMResponse =========== -.. autoclass:: neo4j_genai.llm.types.LLMResponse +.. autoclass:: neo4j_graphrag.llm.types.LLMResponse RagResultModel ============== -.. autoclass:: neo4j_genai.generation.types.RagResultModel +.. autoclass:: neo4j_graphrag.generation.types.RagResultModel TextChunk ========= -.. autoclass:: neo4j_genai.experimental.components.types.TextChunk +.. autoclass:: neo4j_graphrag.experimental.components.types.TextChunk TextChunks ========== -.. autoclass:: neo4j_genai.experimental.components.types.TextChunks +.. autoclass:: neo4j_graphrag.experimental.components.types.TextChunks Neo4jNode ========= -.. autoclass:: neo4j_genai.experimental.components.types.Neo4jNode +.. autoclass:: neo4j_graphrag.experimental.components.types.Neo4jNode Neo4jRelationship ================= -.. autoclass:: neo4j_genai.experimental.components.types.Neo4jRelationship +.. autoclass:: neo4j_graphrag.experimental.components.types.Neo4jRelationship Neo4jGraph ========== -.. autoclass:: neo4j_genai.experimental.components.types.Neo4jGraph +.. autoclass:: neo4j_graphrag.experimental.components.types.Neo4jGraph KGWriterModel ============= -.. autoclass:: neo4j_genai.experimental.components.kg_writer.KGWriterModel +.. autoclass:: neo4j_graphrag.experimental.components.kg_writer.KGWriterModel SchemaProperty ============== -.. autoclass:: neo4j_genai.experimental.components.schema.SchemaProperty +.. autoclass:: neo4j_graphrag.experimental.components.schema.SchemaProperty SchemaEntity ============ -.. autoclass:: neo4j_genai.experimental.components.schema.SchemaEntity +.. autoclass:: neo4j_graphrag.experimental.components.schema.SchemaEntity SchemaRelation ============== -.. autoclass:: neo4j_genai.experimental.components.schema.SchemaEntity +.. autoclass:: neo4j_graphrag.experimental.components.schema.SchemaEntity SchemaConfig ============ -.. autoclass:: neo4j_genai.experimental.components.schema.SchemaConfig +.. autoclass:: neo4j_graphrag.experimental.components.schema.SchemaConfig diff --git a/docs/source/user_guide_kg_builder.rst b/docs/source/user_guide_kg_builder.rst index a868c24f..8d3662b0 100644 --- a/docs/source/user_guide_kg_builder.rst +++ b/docs/source/user_guide_kg_builder.rst @@ -47,7 +47,7 @@ Each of these components can be run individually: .. code:: python import asyncio - from neo4j_genai.experimental.components.pdf_loader import PdfLoader + from neo4j_graphrag.experimental.components.pdf_loader import PdfLoader my_component = PdfLoader() asyncio.run(my_component.run("my_file.pdf")) @@ -56,8 +56,8 @@ They can also be used within a pipeline: .. code:: python - from neo4j_genai.experimental.pipeline import Pipeline - from neo4j_genai.experimental.components.pdf_loader import PdfLoader + from neo4j_graphrag.experimental.pipeline import Pipeline + from neo4j_graphrag.experimental.components.pdf_loader import PdfLoader pipeline = Pipeline() my_component = PdfLoader() pipeline.add_component(my_component, "component_name") @@ -73,7 +73,7 @@ This package currently supports text extraction from PDFs: .. code:: python from pathlib import Path - from neo4j_genai.experimental.components.pdf_loader import PdfLoader + from neo4j_graphrag.experimental.components.pdf_loader import PdfLoader loader = PdfLoader() loader.run(path=Path("my_file.pdf")) @@ -83,7 +83,7 @@ To implement your own loader, use the `DataLoader` interface: .. code:: python from pathlib import Path - from neo4j_genai.experimental.components.pdf_loader import DataLoader, PdfDocument + from neo4j_graphrag.experimental.components.pdf_loader import DataLoader, PdfDocument class MyDataLoader(DataLoader): async def run(self, path: Path) -> PdfDocument: @@ -103,7 +103,7 @@ text splitters are included in this package: .. code:: python from langchain_text_splitters import CharacterTextSplitter - from neo4j_genai.experimental.components.text_splitters.langchain import LangChainTextSplitterAdapter + from neo4j_graphrag.experimental.components.text_splitters.langchain import LangChainTextSplitterAdapter splitter = LangChainTextSplitterAdapter( CharacterTextSplitter(chunk_size=500, chunk_overlap=100, separator=".") ) @@ -116,8 +116,8 @@ To implement a custom text splitter, the `TextSplitter` interface can be used: .. code:: python - from neo4j_genai.experimental.components.text_splitters.base import TextSplitter - from neo4j_genai.experimental.components.types import TextChunks, TextChunk + from neo4j_graphrag.experimental.components.text_splitters.base import TextSplitter + from neo4j_graphrag.experimental.components.types import TextChunks, TextChunk class MyTextSplitter(TextSplitter): @@ -144,8 +144,8 @@ Example usage: .. code:: python - from neo4j_genai.experimental.components.embedder import TextChunkEmbedder - from neo4j_genai.embeddings.openai import OpenAIEmbeddings + from neo4j_graphrag.experimental.components.embedder import TextChunkEmbedder + from neo4j_graphrag.embeddings.openai import OpenAIEmbeddings text_chunk_embedder = TextChunkEmbedder(embedder=OpenAIEmbeddings()) text_chunk_embedder.run(text_chunks=TextChunks(chunks=[TextChunk(text="my_text")])) @@ -179,7 +179,7 @@ Here is a code block illustrating these concepts: .. code:: python - from neo4j_genai.experimental.components.schema import ( + from neo4j_graphrag.experimental.components.schema import ( SchemaBuilder, SchemaEntity, SchemaProperty, @@ -235,10 +235,10 @@ It can be used in this way: .. code:: python - from neo4j_genai.experimental.components.entity_relation_extractor import ( + from neo4j_graphrag.experimental.components.entity_relation_extractor import ( LLMEntityRelationExtractor, ) - from neo4j_genai.llm import OpenAILLM + from neo4j_graphrag.llm import OpenAILLM extractor = LLMEntityRelationExtractor( llm=OpenAILLM( @@ -264,7 +264,7 @@ This behaviour can be changed by using the `on_error` flag in the `LLMEntityRela .. code:: python - from neo4j_genai.experimental.components.entity_relation_extractor import ( + from neo4j_graphrag.experimental.components.entity_relation_extractor import ( LLMEntityRelationExtractor, OnError, ) @@ -332,9 +332,9 @@ If more customization is needed, it is possible to subclass the `EntityRelationE .. code:: python from pydantic import validate_call - from neo4j_genai.experimental.components.entity_relation_extractor import EntityRelationExtractor - from neo4j_genai.experimental.components.schema import SchemaConfig - from neo4j_genai.experimental.components.types import ( + from neo4j_graphrag.experimental.components.entity_relation_extractor import EntityRelationExtractor + from neo4j_graphrag.experimental.components.schema import SchemaConfig + from neo4j_graphrag.experimental.components.types import ( Neo4jGraph, Neo4jNode, Neo4jRelationship, @@ -369,8 +369,8 @@ to a Neo4j database: .. code:: python import neo4j - from neo4j_genai.experimental.components.kg_writer import Neo4jWriter - from neo4j_genai.experimental.components.types import Neo4jGraph + from neo4j_graphrag.experimental.components.kg_writer import Neo4jWriter + from neo4j_graphrag.experimental.components.types import Neo4jGraph with neo4j.GraphDatabase.driver( "bolt://localhost:7687", auth=("neo4j", "password") @@ -387,7 +387,7 @@ It is possible to create a custom writer using the `KGWriter` interface: import json from pydantic import validate_call - from neo4j_genai.experimental.components.kg_writer import KGWriter + from neo4j_graphrag.experimental.components.kg_writer import KGWriter class JsonWriter(KGWriter): diff --git a/docs/source/user_guide_pipeline.rst b/docs/source/user_guide_pipeline.rst index dcaa81a2..81578f6f 100644 --- a/docs/source/user_guide_pipeline.rst +++ b/docs/source/user_guide_pipeline.rst @@ -20,8 +20,8 @@ such as chunking documents or saving results to Neo4j. This package includes a few default components, but developers can create their own by following these steps: -1. Create a subclass of the Pydantic `neo4j_genai.experimental.pipeline.DataModel` to represent the data being returned by the component -2. Create a subclass of `neo4j_genai.experimental.pipeline.Component` +1. Create a subclass of the Pydantic `neo4j_graphrag.experimental.pipeline.DataModel` to represent the data being returned by the component +2. Create a subclass of `neo4j_graphrag.experimental.pipeline.Component` 3. Create a run method in this new class and specify the required inputs and output model using the just created `DataModel` 4. Implement the run method: it's an `async` method, allowing tasks to be parallelized and awaited within this method. @@ -30,7 +30,7 @@ the resulting sum: .. code:: python - from neo4j_genai.experimental.pipeline import Component, DataModel + from neo4j_graphrag.experimental.pipeline import Component, DataModel class IntResultModel(DataModel): result: int @@ -54,7 +54,7 @@ Here's how to create a simple pipeline and propagate results from one component .. code:: python import asyncio - from neo4j_genai.experimental.pipeline import Pipeline + from neo4j_graphrag.experimental.pipeline import Pipeline pipe = Pipeline() pipe.add_component(ComponentAdd(), "a") @@ -107,7 +107,7 @@ Pipelines can be visualized using the `draw` method: .. code:: python import asyncio - from neo4j_genai.experimental.pipeline import Pipeline + from neo4j_graphrag.experimental.pipeline import Pipeline pipe = Pipeline() # ... define components and connections diff --git a/docs/source/user_guide_rag.rst b/docs/source/user_guide_rag.rst index f4f77124..2acacefb 100644 --- a/docs/source/user_guide_rag.rst +++ b/docs/source/user_guide_rag.rst @@ -3,7 +3,7 @@ User Guide: RAG ################# -This guide provides a starting point for using the Neo4j GenAI Python package +This guide provides a starting point for using the Neo4j GraphRAG package and configuring it according to specific requirements. @@ -11,21 +11,21 @@ and configuring it according to specific requirements. Quickstart ************ -To perform a GraphRAG query using the `neo4j-genai` package, a few components are needed: +To perform a GraphRAG query using the `neo4j-graphrag` package, a few components are needed: 1. A Neo4j driver: used to query your Neo4j database. -2. A Retriever: the `neo4j-genai` package provides some implementations (see the :ref:`dedicated section `) and lets you write your own if none of the provided implementations matches your needs (see :ref:`how to write a custom retriever `). -3. An LLM: to generate the answer, we need to call an LLM model. The neo4j-genai package currently only provides implementation for the OpenAI LLMs, but its interface is compatible with LangChain and let developers write their own interface if needed. +2. A Retriever: the `neo4j-graphrag` package provides some implementations (see the :ref:`dedicated section `) and lets you write your own if none of the provided implementations matches your needs (see :ref:`how to write a custom retriever `). +3. An LLM: to generate the answer, we need to call an LLM model. The neo4j-graphrag package currently only provides implementation for the OpenAI LLMs, but its interface is compatible with LangChain and let developers write their own interface if needed. In practice, it's done with only a few lines of code: .. code:: python from neo4j import GraphDatabase - from neo4j_genai.retrievers import VectorRetriever - from neo4j_genai.llm import OpenAILLM - from neo4j_genai.generation import GraphRAG - from neo4j_genai.embeddings.openai import OpenAIEmbeddings + from neo4j_graphrag.retrievers import VectorRetriever + from neo4j_graphrag.llm import OpenAILLM + from neo4j_graphrag.generation import GraphRAG + from neo4j_graphrag.embeddings.openai import OpenAIEmbeddings # 1. Neo4j driver URI = "neo4j://localhost:7687" @@ -83,7 +83,7 @@ Its interface is compatible with our `GraphRAG` interface, facilitating integrat .. code:: python - from neo4j_genai.generation import GraphRAG + from neo4j_graphrag.generation import GraphRAG from langchain_community.chat_models import ChatOllama # retriever = ... @@ -108,7 +108,7 @@ the `LLMInterface`. Here's an example using the Python Ollama client: .. code:: python import ollama - from neo4j_genai.llm import LLMInterface, LLMResponse + from neo4j_graphrag.llm import LLMInterface, LLMResponse class OllamaLLM(LLMInterface): @@ -145,7 +145,7 @@ class and pass it to the `GraphRAG` pipeline object during initialization: .. code:: python - from neo4j_genai.generation import RagTemplate, GraphRAG + from neo4j_graphrag.generation import RagTemplate, GraphRAG # retriever = ... # llm = ... @@ -207,7 +207,7 @@ The simplest method to instantiate a vector retriever is: .. code:: python - from neo4j_genai.retrievers import VectorRetriever + from neo4j_graphrag.retrievers import VectorRetriever retriever = VectorRetriever( driver, @@ -266,7 +266,7 @@ The `OpenAIEmbedder` was illustrated previously. Here is how to use the `Sentenc .. code:: python - from neo4j_genai.embeddings.sentence_transformers import SentenceTransformerEmbeddings + from neo4j_graphrag.embeddings.sentence_transformers import SentenceTransformerEmbeddings embedder = SentenceTransformerEmbeddings(model="all-MiniLM-L6-v2") # Note: this is the default model @@ -277,7 +277,7 @@ the following implementation of an embedder that wraps the `OllamaEmbedding` mod .. code:: python from llama_index.embeddings.ollama import OllamaEmbedding - from neo4j_genai.embedder import Embedder + from neo4j_graphrag.embedder import Embedder class OllamaEmbedder(Embedder): def __init__(self, ollama_embedding): @@ -307,7 +307,7 @@ using the `return_properties` parameter: .. code:: python - from neo4j_genai.retrievers import VectorRetriever + from neo4j_graphrag.retrievers import VectorRetriever retriever = VectorRetriever( driver, @@ -333,7 +333,7 @@ using `filters`. .. code:: python - from neo4j_genai.retrievers import VectorRetriever + from neo4j_graphrag.retrievers import VectorRetriever retriever = VectorRetriever( driver, @@ -485,7 +485,7 @@ Weaviate Retrievers .. code:: python from weaviate.connect.helpers import connect_to_local - from neo4j_genai.retrievers import WeaviateNeo4jRetriever + from neo4j_graphrag.retrievers import WeaviateNeo4jRetriever client = connect_to_local() retriever = WeaviateNeo4jRetriever( @@ -518,7 +518,7 @@ Pinecone Retrievers .. code:: python from pinecone import Pinecone - from neo4j_genai.retrievers import PineconeNeo4jRetriever + from neo4j_graphrag.retrievers import PineconeNeo4jRetriever client = Pinecone() # ... create your Pinecone client @@ -547,7 +547,7 @@ be provided when instantiating the retriever: .. code:: python - from neo4j_genai.retrievers import HybridRetriever + from neo4j_graphrag.retrievers import HybridRetriever INDEX_NAME = "embedding-name" FULLTEXT_INDEX_NAME = "fulltext-index-name" @@ -575,7 +575,7 @@ the graph and return more context: .. code:: python - from neo4j_genai.retrievers import HybridCypherRetriever + from neo4j_graphrag.retrievers import HybridCypherRetriever INDEX_NAME = "embedding-name" FULLTEXT_INDEX_NAME = "fulltext-index-name" @@ -606,8 +606,8 @@ LLMs can be different. .. code:: python from neo4j import GraphDatabase - from neo4j_genai.retrievers import Text2CypherRetriever - from neo4j_genai.llm import OpenAILLM + from neo4j_graphrag.retrievers import Text2CypherRetriever + from neo4j_graphrag.llm import OpenAILLM URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") @@ -676,7 +676,7 @@ a custom retriever using the `Retriever` interface: .. code:: python - from neo4j_genai.retrievers.base import Retriever + from neo4j_graphrag.retrievers.base import Retriever class MyCustomRetriever(Retriever): def __init__( @@ -711,7 +711,7 @@ Create a Vector Index .. code:: python from neo4j import GraphDatabase - from neo4j_genai.indexes import create_vector_index + from neo4j_graphrag.indexes import create_vector_index URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") diff --git a/examples/graphrag.py b/examples/graphrag.py index 63d81b18..ad4aef61 100644 --- a/examples/graphrag.py +++ b/examples/graphrag.py @@ -10,11 +10,11 @@ import logging import neo4j -from neo4j_genai.embeddings.openai import OpenAIEmbeddings -from neo4j_genai.generation import GraphRAG -from neo4j_genai.llm import OpenAILLM -from neo4j_genai.retrievers import VectorCypherRetriever -from neo4j_genai.types import RetrieverResultItem +from neo4j_graphrag.embeddings.openai import OpenAIEmbeddings +from neo4j_graphrag.generation import GraphRAG +from neo4j_graphrag.llm import OpenAILLM +from neo4j_graphrag.retrievers import VectorCypherRetriever +from neo4j_graphrag.types import RetrieverResultItem URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") @@ -23,7 +23,7 @@ # setup logger config -logger = logging.getLogger("neo4j_genai") +logger = logging.getLogger("neo4j_graphrag") logging.basicConfig(format="%(asctime)s - %(message)s") logger.setLevel(logging.DEBUG) diff --git a/examples/graphrag_custom_prompt.py b/examples/graphrag_custom_prompt.py index a03bd2c5..2625ef43 100644 --- a/examples/graphrag_custom_prompt.py +++ b/examples/graphrag_custom_prompt.py @@ -11,11 +11,11 @@ import logging import neo4j -from neo4j_genai.embeddings.openai import OpenAIEmbeddings -from neo4j_genai.generation import GraphRAG, RagTemplate -from neo4j_genai.llm import OpenAILLM -from neo4j_genai.retrievers import VectorCypherRetriever -from neo4j_genai.types import RetrieverResultItem +from neo4j_graphrag.embeddings.openai import OpenAIEmbeddings +from neo4j_graphrag.generation import GraphRAG, RagTemplate +from neo4j_graphrag.llm import OpenAILLM +from neo4j_graphrag.retrievers import VectorCypherRetriever +from neo4j_graphrag.types import RetrieverResultItem URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") @@ -24,7 +24,7 @@ # setup logger config -logger = logging.getLogger("neo4j_genai") +logger = logging.getLogger("neo4j_graphrag") logging.basicConfig(format="%(asctime)s - %(message)s") logger.setLevel(logging.DEBUG) diff --git a/examples/graphrag_with_langchain_llm.py b/examples/graphrag_with_langchain_llm.py index d45a4fb3..e3f11f7a 100644 --- a/examples/graphrag_with_langchain_llm.py +++ b/examples/graphrag_with_langchain_llm.py @@ -12,9 +12,9 @@ import neo4j from langchain.chat_models import ChatOpenAI from langchain.embeddings import OpenAIEmbeddings -from neo4j_genai.generation import GraphRAG -from neo4j_genai.retrievers import VectorCypherRetriever -from neo4j_genai.types import RetrieverResultItem +from neo4j_graphrag.generation import GraphRAG +from neo4j_graphrag.retrievers import VectorCypherRetriever +from neo4j_graphrag.types import RetrieverResultItem URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") @@ -23,7 +23,7 @@ # setup logger config -logger = logging.getLogger("neo4j_genai") +logger = logging.getLogger("neo4j_graphrag") logging.basicConfig(format="%(asctime)s - %(message)s") logger.setLevel(logging.DEBUG) diff --git a/examples/hybrid_cypher_search.py b/examples/hybrid_cypher_search.py index ae30f3ad..d150e542 100644 --- a/examples/hybrid_cypher_search.py +++ b/examples/hybrid_cypher_search.py @@ -3,9 +3,9 @@ from random import random from neo4j import GraphDatabase -from neo4j_genai.embedder import Embedder -from neo4j_genai.indexes import create_fulltext_index, create_vector_index -from neo4j_genai.retrievers import HybridCypherRetriever +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.indexes import create_fulltext_index, create_vector_index +from neo4j_graphrag.retrievers import HybridCypherRetriever URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") diff --git a/examples/hybrid_search.py b/examples/hybrid_search.py index 7fb533c5..b19bb09b 100644 --- a/examples/hybrid_search.py +++ b/examples/hybrid_search.py @@ -3,9 +3,9 @@ from random import random from neo4j import GraphDatabase -from neo4j_genai.embedder import Embedder -from neo4j_genai.indexes import create_fulltext_index, create_vector_index -from neo4j_genai.retrievers import HybridRetriever +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.indexes import create_fulltext_index, create_vector_index +from neo4j_graphrag.retrievers import HybridRetriever URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") diff --git a/examples/openai_search.py b/examples/openai_search.py index 36753a0a..cbbaeed6 100644 --- a/examples/openai_search.py +++ b/examples/openai_search.py @@ -2,8 +2,8 @@ from langchain_openai import OpenAIEmbeddings from neo4j import GraphDatabase -from neo4j_genai.indexes import create_vector_index -from neo4j_genai.retrievers import VectorRetriever +from neo4j_graphrag.indexes import create_vector_index +from neo4j_graphrag.retrievers import VectorRetriever URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") diff --git a/examples/pinecone/text_search.py b/examples/pinecone/text_search.py index df8de175..b48e187f 100644 --- a/examples/pinecone/text_search.py +++ b/examples/pinecone/text_search.py @@ -1,6 +1,6 @@ from langchain_huggingface.embeddings import HuggingFaceEmbeddings from neo4j import GraphDatabase -from neo4j_genai.retrievers import PineconeNeo4jRetriever +from neo4j_graphrag.retrievers import PineconeNeo4jRetriever from pinecone import Pinecone NEO4J_AUTH = ("neo4j", "password") diff --git a/examples/pinecone/vector_search.py b/examples/pinecone/vector_search.py index 48aa3f2e..c5779f25 100644 --- a/examples/pinecone/vector_search.py +++ b/examples/pinecone/vector_search.py @@ -1,5 +1,5 @@ from neo4j import GraphDatabase -from neo4j_genai.retrievers import PineconeNeo4jRetriever +from neo4j_graphrag.retrievers import PineconeNeo4jRetriever from pinecone import Pinecone from examples.embedding_biology import EMBEDDING_BIOLOGY diff --git a/examples/pipeline/kg_builder_from_pdf.py b/examples/pipeline/kg_builder_from_pdf.py index 47c41e9d..a6265fca 100644 --- a/examples/pipeline/kg_builder_from_pdf.py +++ b/examples/pipeline/kg_builder_from_pdf.py @@ -20,23 +20,23 @@ import neo4j from langchain_text_splitters import CharacterTextSplitter -from neo4j_genai.experimental.components.entity_relation_extractor import ( +from neo4j_graphrag.experimental.components.entity_relation_extractor import ( LLMEntityRelationExtractor, OnError, ) -from neo4j_genai.experimental.components.kg_writer import Neo4jWriter -from neo4j_genai.experimental.components.pdf_loader import PdfLoader -from neo4j_genai.experimental.components.schema import ( +from neo4j_graphrag.experimental.components.kg_writer import Neo4jWriter +from neo4j_graphrag.experimental.components.pdf_loader import PdfLoader +from neo4j_graphrag.experimental.components.schema import ( SchemaBuilder, SchemaEntity, SchemaRelation, ) -from neo4j_genai.experimental.components.text_splitters.langchain import ( +from neo4j_graphrag.experimental.components.text_splitters.langchain import ( LangChainTextSplitterAdapter, ) -from neo4j_genai.experimental.pipeline import Component, DataModel -from neo4j_genai.experimental.pipeline.pipeline import PipelineResult -from neo4j_genai.llm import OpenAILLM +from neo4j_graphrag.experimental.pipeline import Component, DataModel +from neo4j_graphrag.experimental.pipeline.pipeline import PipelineResult +from neo4j_graphrag.llm import OpenAILLM from pydantic import BaseModel, validate_call logging.basicConfig(level=logging.INFO) @@ -100,7 +100,7 @@ async def run(self, graph: Neo4jGraph) -> WriterModel: async def main(neo4j_driver: neo4j.Driver) -> PipelineResult: - from neo4j_genai.experimental.pipeline import Pipeline + from neo4j_graphrag.experimental.pipeline import Pipeline # Instantiate Entity and Relation objects entities = [ diff --git a/examples/pipeline/kg_builder_from_text.py b/examples/pipeline/kg_builder_from_text.py index 17978ae3..313422d2 100644 --- a/examples/pipeline/kg_builder_from_text.py +++ b/examples/pipeline/kg_builder_from_text.py @@ -19,27 +19,27 @@ import neo4j from langchain_text_splitters import CharacterTextSplitter -from neo4j_genai.embeddings.openai import OpenAIEmbeddings -from neo4j_genai.experimental.components.embedder import TextChunkEmbedder -from neo4j_genai.experimental.components.entity_relation_extractor import ( +from neo4j_graphrag.embeddings.openai import OpenAIEmbeddings +from neo4j_graphrag.experimental.components.embedder import TextChunkEmbedder +from neo4j_graphrag.experimental.components.entity_relation_extractor import ( LLMEntityRelationExtractor, OnError, ) -from neo4j_genai.experimental.components.kg_writer import Neo4jWriter -from neo4j_genai.experimental.components.schema import ( +from neo4j_graphrag.experimental.components.kg_writer import Neo4jWriter +from neo4j_graphrag.experimental.components.schema import ( SchemaBuilder, SchemaEntity, SchemaProperty, SchemaRelation, ) -from neo4j_genai.experimental.components.text_splitters.langchain import ( +from neo4j_graphrag.experimental.components.text_splitters.langchain import ( LangChainTextSplitterAdapter, ) -from neo4j_genai.experimental.pipeline import Pipeline -from neo4j_genai.experimental.pipeline.pipeline import PipelineResult -from neo4j_genai.llm import OpenAILLM +from neo4j_graphrag.experimental.pipeline import Pipeline +from neo4j_graphrag.experimental.pipeline.pipeline import PipelineResult +from neo4j_graphrag.llm import OpenAILLM -# set log level to DEBUG for all neo4j_genai.* loggers +# set log level to DEBUG for all neo4j_graphrag.* loggers logging.config.dictConfig( { "version": 1, @@ -52,7 +52,7 @@ "root": { "handlers": ["console"], }, - "neo4j_genai": { + "neo4j_graphrag": { "level": "DEBUG", }, }, diff --git a/examples/pipeline/rag.py b/examples/pipeline/rag.py index 5503b412..75b66af9 100644 --- a/examples/pipeline/rag.py +++ b/examples/pipeline/rag.py @@ -24,19 +24,19 @@ from typing import List import neo4j -from neo4j_genai.embeddings.openai import OpenAIEmbeddings -from neo4j_genai.experimental.pipeline import Component, Pipeline -from neo4j_genai.experimental.pipeline.component import DataModel -from neo4j_genai.experimental.pipeline.pipeline import PipelineResult -from neo4j_genai.experimental.pipeline.types import ( +from neo4j_graphrag.embeddings.openai import OpenAIEmbeddings +from neo4j_graphrag.experimental.pipeline import Component, Pipeline +from neo4j_graphrag.experimental.pipeline.component import DataModel +from neo4j_graphrag.experimental.pipeline.pipeline import PipelineResult +from neo4j_graphrag.experimental.pipeline.types import ( ComponentConfig, ConnectionConfig, PipelineConfig, ) -from neo4j_genai.generation import PromptTemplate, RagTemplate -from neo4j_genai.llm import LLMInterface, OpenAILLM -from neo4j_genai.retrievers import VectorRetriever -from neo4j_genai.retrievers.base import Retriever +from neo4j_graphrag.generation import PromptTemplate, RagTemplate +from neo4j_graphrag.llm import LLMInterface, OpenAILLM +from neo4j_graphrag.retrievers import VectorRetriever +from neo4j_graphrag.retrievers.base import Retriever class ComponentResultDataModel(DataModel): diff --git a/examples/pipeline/visualization.py b/examples/pipeline/visualization.py index deaf4b16..6445f780 100644 --- a/examples/pipeline/visualization.py +++ b/examples/pipeline/visualization.py @@ -14,8 +14,8 @@ # limitations under the License. """This example illustrates how to visualize a Pipeline""" -from neo4j_genai.experimental.pipeline import Component, Pipeline -from neo4j_genai.experimental.pipeline.component import DataModel +from neo4j_graphrag.experimental.pipeline import Component, Pipeline +from neo4j_graphrag.experimental.pipeline.component import DataModel from pydantic import validate_call diff --git a/examples/similarity_search_for_text.py b/examples/similarity_search_for_text.py index 2b83bf89..4e2404c8 100644 --- a/examples/similarity_search_for_text.py +++ b/examples/similarity_search_for_text.py @@ -3,9 +3,9 @@ from random import random from neo4j import GraphDatabase -from neo4j_genai.embedder import Embedder -from neo4j_genai.indexes import create_vector_index -from neo4j_genai.retrievers import VectorRetriever +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.indexes import create_vector_index +from neo4j_graphrag.retrievers import VectorRetriever URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") diff --git a/examples/similarity_search_for_vector.py b/examples/similarity_search_for_vector.py index 29b3c8f4..740cf579 100644 --- a/examples/similarity_search_for_vector.py +++ b/examples/similarity_search_for_vector.py @@ -1,8 +1,8 @@ from random import random from neo4j import GraphDatabase -from neo4j_genai.indexes import create_vector_index -from neo4j_genai.retrievers import VectorRetriever +from neo4j_graphrag.indexes import create_vector_index +from neo4j_graphrag.retrievers import VectorRetriever URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") diff --git a/examples/text2cypher_search.py b/examples/text2cypher_search.py index 9f5d9677..9f2635d6 100644 --- a/examples/text2cypher_search.py +++ b/examples/text2cypher_search.py @@ -1,6 +1,6 @@ from neo4j import GraphDatabase -from neo4j_genai.llm import OpenAILLM -from neo4j_genai.retrievers.text2cypher import Text2CypherRetriever +from neo4j_graphrag.llm import OpenAILLM +from neo4j_graphrag.retrievers.text2cypher import Text2CypherRetriever URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") diff --git a/examples/vector_cypher_retrieval.py b/examples/vector_cypher_retrieval.py index a3f249fc..cb7c6e66 100644 --- a/examples/vector_cypher_retrieval.py +++ b/examples/vector_cypher_retrieval.py @@ -4,9 +4,9 @@ import string from neo4j import GraphDatabase -from neo4j_genai.embedder import Embedder -from neo4j_genai.indexes import create_vector_index -from neo4j_genai.retrievers import VectorCypherRetriever +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.indexes import create_vector_index +from neo4j_graphrag.retrievers import VectorCypherRetriever URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") diff --git a/examples/vector_search_with_filters.py b/examples/vector_search_with_filters.py index 6da3eab3..39648a0b 100644 --- a/examples/vector_search_with_filters.py +++ b/examples/vector_search_with_filters.py @@ -4,9 +4,9 @@ import string from neo4j import GraphDatabase -from neo4j_genai.embedder import Embedder -from neo4j_genai.indexes import create_vector_index -from neo4j_genai.retrievers import VectorRetriever +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.indexes import create_vector_index +from neo4j_graphrag.retrievers import VectorRetriever URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") diff --git a/examples/weaviate/text_search_local_embedder.py b/examples/weaviate/text_search_local_embedder.py index ceaf076e..ad80d9c5 100644 --- a/examples/weaviate/text_search_local_embedder.py +++ b/examples/weaviate/text_search_local_embedder.py @@ -1,6 +1,6 @@ from langchain_huggingface.embeddings import HuggingFaceEmbeddings from neo4j import GraphDatabase -from neo4j_genai.retrievers import WeaviateNeo4jRetriever +from neo4j_graphrag.retrievers import WeaviateNeo4jRetriever from weaviate.connect.helpers import connect_to_local NEO4J_URL = "neo4j://localhost:7687" diff --git a/examples/weaviate/text_search_remote_embedder.py b/examples/weaviate/text_search_remote_embedder.py index 9742b3fb..e54debe3 100644 --- a/examples/weaviate/text_search_remote_embedder.py +++ b/examples/weaviate/text_search_remote_embedder.py @@ -1,5 +1,5 @@ from neo4j import GraphDatabase -from neo4j_genai.retrievers import WeaviateNeo4jRetriever +from neo4j_graphrag.retrievers import WeaviateNeo4jRetriever from weaviate.connect.helpers import connect_to_local NEO4J_URL = "neo4j://localhost:7687" diff --git a/examples/weaviate/vector_search.py b/examples/weaviate/vector_search.py index fb441039..6272df0d 100644 --- a/examples/weaviate/vector_search.py +++ b/examples/weaviate/vector_search.py @@ -1,5 +1,5 @@ from neo4j import GraphDatabase -from neo4j_genai.retrievers import WeaviateNeo4jRetriever +from neo4j_graphrag.retrievers import WeaviateNeo4jRetriever from weaviate.connect.helpers import connect_to_local from examples.embedding_biology import EMBEDDING_BIOLOGY diff --git a/poetry.lock b/poetry.lock index 517edf92..7cd96f71 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1187,13 +1187,13 @@ socks = ["socksio (==1.*)"] [[package]] name = "huggingface-hub" -version = "0.24.6" +version = "0.24.7" description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub" optional = false python-versions = ">=3.8.0" files = [ - {file = "huggingface_hub-0.24.6-py3-none-any.whl", hash = "sha256:a990f3232aa985fe749bc9474060cbad75e8b2f115f6665a9fda5b9c97818970"}, - {file = "huggingface_hub-0.24.6.tar.gz", hash = "sha256:cc2579e761d070713eaa9c323e3debe39d5b464ae3a7261c39a9195b27bb8000"}, + {file = "huggingface_hub-0.24.7-py3-none-any.whl", hash = "sha256:a212c555324c8a7b1ffdd07266bb7e7d69ca71aa238d27b7842d65e9a26ac3e5"}, + {file = "huggingface_hub-0.24.7.tar.gz", hash = "sha256:0ad8fb756e2831da0ac0491175b960f341fe06ebcf80ed6f8728313f95fc0207"}, ] [package.dependencies] @@ -1552,13 +1552,13 @@ langchain-core = ">=0.2.38,<0.3.0" [[package]] name = "langsmith" -version = "0.1.117" +version = "0.1.118" description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform." optional = false python-versions = "<4.0,>=3.8.1" files = [ - {file = "langsmith-0.1.117-py3-none-any.whl", hash = "sha256:e936ee9bcf8293b0496df7ba462a3702179fbe51f9dc28744b0fbec0dbf206ae"}, - {file = "langsmith-0.1.117.tar.gz", hash = "sha256:a1b532f49968b9339bcaff9118d141846d52ed3d803f342902e7448edf1d662b"}, + {file = "langsmith-0.1.118-py3-none-any.whl", hash = "sha256:f017127b3efb037da5e46ff4f8583e8192e7955191737240c327f3eadc144d7c"}, + {file = "langsmith-0.1.118.tar.gz", hash = "sha256:ff1ca06c92c6081250244ebbce5d0bb347b9d898d2e9b60a13b11f0f0720f09f"}, ] [package.dependencies] @@ -2795,22 +2795,22 @@ virtualenv = ">=20.10.0" [[package]] name = "protobuf" -version = "5.28.0" +version = "5.28.1" description = "" optional = false python-versions = ">=3.8" files = [ - {file = "protobuf-5.28.0-cp310-abi3-win32.whl", hash = "sha256:66c3edeedb774a3508ae70d87b3a19786445fe9a068dd3585e0cefa8a77b83d0"}, - {file = "protobuf-5.28.0-cp310-abi3-win_amd64.whl", hash = "sha256:6d7cc9e60f976cf3e873acb9a40fed04afb5d224608ed5c1a105db4a3f09c5b6"}, - {file = "protobuf-5.28.0-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:532627e8fdd825cf8767a2d2b94d77e874d5ddb0adefb04b237f7cc296748681"}, - {file = "protobuf-5.28.0-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:018db9056b9d75eb93d12a9d35120f97a84d9a919bcab11ed56ad2d399d6e8dd"}, - {file = "protobuf-5.28.0-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:6206afcb2d90181ae8722798dcb56dc76675ab67458ac24c0dd7d75d632ac9bd"}, - {file = "protobuf-5.28.0-cp38-cp38-win32.whl", hash = "sha256:eef7a8a2f4318e2cb2dee8666d26e58eaf437c14788f3a2911d0c3da40405ae8"}, - {file = "protobuf-5.28.0-cp38-cp38-win_amd64.whl", hash = "sha256:d001a73c8bc2bf5b5c1360d59dd7573744e163b3607fa92788b7f3d5fefbd9a5"}, - {file = "protobuf-5.28.0-cp39-cp39-win32.whl", hash = "sha256:dde9fcaa24e7a9654f4baf2a55250b13a5ea701493d904c54069776b99a8216b"}, - {file = "protobuf-5.28.0-cp39-cp39-win_amd64.whl", hash = "sha256:853db610214e77ee817ecf0514e0d1d052dff7f63a0c157aa6eabae98db8a8de"}, - {file = "protobuf-5.28.0-py3-none-any.whl", hash = "sha256:510ed78cd0980f6d3218099e874714cdf0d8a95582e7b059b06cabad855ed0a0"}, - {file = "protobuf-5.28.0.tar.gz", hash = "sha256:dde74af0fa774fa98892209992295adbfb91da3fa98c8f67a88afe8f5a349add"}, + {file = "protobuf-5.28.1-cp310-abi3-win32.whl", hash = "sha256:fc063acaf7a3d9ca13146fefb5b42ac94ab943ec6e978f543cd5637da2d57957"}, + {file = "protobuf-5.28.1-cp310-abi3-win_amd64.whl", hash = "sha256:4c7f5cb38c640919791c9f74ea80c5b82314c69a8409ea36f2599617d03989af"}, + {file = "protobuf-5.28.1-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:4304e4fceb823d91699e924a1fdf95cde0e066f3b1c28edb665bda762ecde10f"}, + {file = "protobuf-5.28.1-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:0dfd86d2b5edf03d91ec2a7c15b4e950258150f14f9af5f51c17fa224ee1931f"}, + {file = "protobuf-5.28.1-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:51f09caab818707ab91cf09cc5c156026599cf05a4520779ccbf53c1b352fb25"}, + {file = "protobuf-5.28.1-cp38-cp38-win32.whl", hash = "sha256:1b04bde117a10ff9d906841a89ec326686c48ececeb65690f15b8cabe7149495"}, + {file = "protobuf-5.28.1-cp38-cp38-win_amd64.whl", hash = "sha256:cabfe43044ee319ad6832b2fda332646f9ef1636b0130186a3ae0a52fc264bb4"}, + {file = "protobuf-5.28.1-cp39-cp39-win32.whl", hash = "sha256:4b4b9a0562a35773ff47a3df823177ab71a1f5eb1ff56d8f842b7432ecfd7fd2"}, + {file = "protobuf-5.28.1-cp39-cp39-win_amd64.whl", hash = "sha256:f24e5d70e6af8ee9672ff605d5503491635f63d5db2fffb6472be78ba62efd8f"}, + {file = "protobuf-5.28.1-py3-none-any.whl", hash = "sha256:c529535e5c0effcf417682563719e5d8ac8d2b93de07a56108b4c2d436d7a29a"}, + {file = "protobuf-5.28.1.tar.gz", hash = "sha256:42597e938f83bb7f3e4b35f03aa45208d49ae8d5bcb4bc10b9fc825e0ab5e423"}, ] [[package]] @@ -3198,90 +3198,105 @@ files = [ [[package]] name = "regex" -version = "2024.7.24" +version = "2024.9.11" description = "Alternative regular expression module, to replace re." optional = false python-versions = ">=3.8" files = [ - {file = "regex-2024.7.24-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:228b0d3f567fafa0633aee87f08b9276c7062da9616931382993c03808bb68ce"}, - {file = "regex-2024.7.24-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:3426de3b91d1bc73249042742f45c2148803c111d1175b283270177fdf669024"}, - {file = "regex-2024.7.24-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f273674b445bcb6e4409bf8d1be67bc4b58e8b46fd0d560055d515b8830063cd"}, - {file = "regex-2024.7.24-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23acc72f0f4e1a9e6e9843d6328177ae3074b4182167e34119ec7233dfeccf53"}, - {file = "regex-2024.7.24-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:65fd3d2e228cae024c411c5ccdffae4c315271eee4a8b839291f84f796b34eca"}, - {file = "regex-2024.7.24-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c414cbda77dbf13c3bc88b073a1a9f375c7b0cb5e115e15d4b73ec3a2fbc6f59"}, - {file = "regex-2024.7.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf7a89eef64b5455835f5ed30254ec19bf41f7541cd94f266ab7cbd463f00c41"}, - {file = "regex-2024.7.24-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19c65b00d42804e3fbea9708f0937d157e53429a39b7c61253ff15670ff62cb5"}, - {file = "regex-2024.7.24-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:7a5486ca56c8869070a966321d5ab416ff0f83f30e0e2da1ab48815c8d165d46"}, - {file = "regex-2024.7.24-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:6f51f9556785e5a203713f5efd9c085b4a45aecd2a42573e2b5041881b588d1f"}, - {file = "regex-2024.7.24-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:a4997716674d36a82eab3e86f8fa77080a5d8d96a389a61ea1d0e3a94a582cf7"}, - {file = "regex-2024.7.24-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:c0abb5e4e8ce71a61d9446040c1e86d4e6d23f9097275c5bd49ed978755ff0fe"}, - {file = "regex-2024.7.24-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:18300a1d78cf1290fa583cd8b7cde26ecb73e9f5916690cf9d42de569c89b1ce"}, - {file = "regex-2024.7.24-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:416c0e4f56308f34cdb18c3f59849479dde5b19febdcd6e6fa4d04b6c31c9faa"}, - {file = "regex-2024.7.24-cp310-cp310-win32.whl", hash = "sha256:fb168b5924bef397b5ba13aabd8cf5df7d3d93f10218d7b925e360d436863f66"}, - {file = "regex-2024.7.24-cp310-cp310-win_amd64.whl", hash = "sha256:6b9fc7e9cc983e75e2518496ba1afc524227c163e43d706688a6bb9eca41617e"}, - {file = "regex-2024.7.24-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:382281306e3adaaa7b8b9ebbb3ffb43358a7bbf585fa93821300a418bb975281"}, - {file = "regex-2024.7.24-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4fdd1384619f406ad9037fe6b6eaa3de2749e2e12084abc80169e8e075377d3b"}, - {file = "regex-2024.7.24-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3d974d24edb231446f708c455fd08f94c41c1ff4f04bcf06e5f36df5ef50b95a"}, - {file = "regex-2024.7.24-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a2ec4419a3fe6cf8a4795752596dfe0adb4aea40d3683a132bae9c30b81e8d73"}, - {file = "regex-2024.7.24-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eb563dd3aea54c797adf513eeec819c4213d7dbfc311874eb4fd28d10f2ff0f2"}, - {file = "regex-2024.7.24-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:45104baae8b9f67569f0f1dca5e1f1ed77a54ae1cd8b0b07aba89272710db61e"}, - {file = "regex-2024.7.24-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:994448ee01864501912abf2bad9203bffc34158e80fe8bfb5b031f4f8e16da51"}, - {file = "regex-2024.7.24-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3fac296f99283ac232d8125be932c5cd7644084a30748fda013028c815ba3364"}, - {file = "regex-2024.7.24-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7e37e809b9303ec3a179085415cb5f418ecf65ec98cdfe34f6a078b46ef823ee"}, - {file = "regex-2024.7.24-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:01b689e887f612610c869421241e075c02f2e3d1ae93a037cb14f88ab6a8934c"}, - {file = "regex-2024.7.24-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f6442f0f0ff81775eaa5b05af8a0ffa1dda36e9cf6ec1e0d3d245e8564b684ce"}, - {file = "regex-2024.7.24-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:871e3ab2838fbcb4e0865a6e01233975df3a15e6fce93b6f99d75cacbd9862d1"}, - {file = "regex-2024.7.24-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c918b7a1e26b4ab40409820ddccc5d49871a82329640f5005f73572d5eaa9b5e"}, - {file = "regex-2024.7.24-cp311-cp311-win32.whl", hash = "sha256:2dfbb8baf8ba2c2b9aa2807f44ed272f0913eeeba002478c4577b8d29cde215c"}, - {file = "regex-2024.7.24-cp311-cp311-win_amd64.whl", hash = "sha256:538d30cd96ed7d1416d3956f94d54e426a8daf7c14527f6e0d6d425fcb4cca52"}, - {file = "regex-2024.7.24-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:fe4ebef608553aff8deb845c7f4f1d0740ff76fa672c011cc0bacb2a00fbde86"}, - {file = "regex-2024.7.24-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:74007a5b25b7a678459f06559504f1eec2f0f17bca218c9d56f6a0a12bfffdad"}, - {file = "regex-2024.7.24-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7df9ea48641da022c2a3c9c641650cd09f0cd15e8908bf931ad538f5ca7919c9"}, - {file = "regex-2024.7.24-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a1141a1dcc32904c47f6846b040275c6e5de0bf73f17d7a409035d55b76f289"}, - {file = "regex-2024.7.24-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:80c811cfcb5c331237d9bad3bea2c391114588cf4131707e84d9493064d267f9"}, - {file = "regex-2024.7.24-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7214477bf9bd195894cf24005b1e7b496f46833337b5dedb7b2a6e33f66d962c"}, - {file = "regex-2024.7.24-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d55588cba7553f0b6ec33130bc3e114b355570b45785cebdc9daed8c637dd440"}, - {file = "regex-2024.7.24-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:558a57cfc32adcf19d3f791f62b5ff564922942e389e3cfdb538a23d65a6b610"}, - {file = "regex-2024.7.24-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a512eed9dfd4117110b1881ba9a59b31433caed0c4101b361f768e7bcbaf93c5"}, - {file = "regex-2024.7.24-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:86b17ba823ea76256b1885652e3a141a99a5c4422f4a869189db328321b73799"}, - {file = "regex-2024.7.24-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:5eefee9bfe23f6df09ffb6dfb23809f4d74a78acef004aa904dc7c88b9944b05"}, - {file = "regex-2024.7.24-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:731fcd76bbdbf225e2eb85b7c38da9633ad3073822f5ab32379381e8c3c12e94"}, - {file = "regex-2024.7.24-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:eaef80eac3b4cfbdd6de53c6e108b4c534c21ae055d1dbea2de6b3b8ff3def38"}, - {file = "regex-2024.7.24-cp312-cp312-win32.whl", hash = "sha256:185e029368d6f89f36e526764cf12bf8d6f0e3a2a7737da625a76f594bdfcbfc"}, - {file = "regex-2024.7.24-cp312-cp312-win_amd64.whl", hash = "sha256:2f1baff13cc2521bea83ab2528e7a80cbe0ebb2c6f0bfad15be7da3aed443908"}, - {file = "regex-2024.7.24-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:66b4c0731a5c81921e938dcf1a88e978264e26e6ac4ec96a4d21ae0354581ae0"}, - {file = "regex-2024.7.24-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:88ecc3afd7e776967fa16c80f974cb79399ee8dc6c96423321d6f7d4b881c92b"}, - {file = "regex-2024.7.24-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:64bd50cf16bcc54b274e20235bf8edbb64184a30e1e53873ff8d444e7ac656b2"}, - {file = "regex-2024.7.24-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb462f0e346fcf41a901a126b50f8781e9a474d3927930f3490f38a6e73b6950"}, - {file = "regex-2024.7.24-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a82465ebbc9b1c5c50738536fdfa7cab639a261a99b469c9d4c7dcbb2b3f1e57"}, - {file = "regex-2024.7.24-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:68a8f8c046c6466ac61a36b65bb2395c74451df2ffb8458492ef49900efed293"}, - {file = "regex-2024.7.24-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dac8e84fff5d27420f3c1e879ce9929108e873667ec87e0c8eeb413a5311adfe"}, - {file = "regex-2024.7.24-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ba2537ef2163db9e6ccdbeb6f6424282ae4dea43177402152c67ef869cf3978b"}, - {file = "regex-2024.7.24-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:43affe33137fcd679bdae93fb25924979517e011f9dea99163f80b82eadc7e53"}, - {file = "regex-2024.7.24-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:c9bb87fdf2ab2370f21e4d5636e5317775e5d51ff32ebff2cf389f71b9b13750"}, - {file = "regex-2024.7.24-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:945352286a541406f99b2655c973852da7911b3f4264e010218bbc1cc73168f2"}, - {file = "regex-2024.7.24-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:8bc593dcce679206b60a538c302d03c29b18e3d862609317cb560e18b66d10cf"}, - {file = "regex-2024.7.24-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:3f3b6ca8eae6d6c75a6cff525c8530c60e909a71a15e1b731723233331de4169"}, - {file = "regex-2024.7.24-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:c51edc3541e11fbe83f0c4d9412ef6c79f664a3745fab261457e84465ec9d5a8"}, - {file = "regex-2024.7.24-cp38-cp38-win32.whl", hash = "sha256:d0a07763776188b4db4c9c7fb1b8c494049f84659bb387b71c73bbc07f189e96"}, - {file = "regex-2024.7.24-cp38-cp38-win_amd64.whl", hash = "sha256:8fd5afd101dcf86a270d254364e0e8dddedebe6bd1ab9d5f732f274fa00499a5"}, - {file = "regex-2024.7.24-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:0ffe3f9d430cd37d8fa5632ff6fb36d5b24818c5c986893063b4e5bdb84cdf24"}, - {file = "regex-2024.7.24-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:25419b70ba00a16abc90ee5fce061228206173231f004437730b67ac77323f0d"}, - {file = "regex-2024.7.24-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:33e2614a7ce627f0cdf2ad104797d1f68342d967de3695678c0cb84f530709f8"}, - {file = "regex-2024.7.24-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d33a0021893ede5969876052796165bab6006559ab845fd7b515a30abdd990dc"}, - {file = "regex-2024.7.24-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:04ce29e2c5fedf296b1a1b0acc1724ba93a36fb14031f3abfb7abda2806c1535"}, - {file = "regex-2024.7.24-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b16582783f44fbca6fcf46f61347340c787d7530d88b4d590a397a47583f31dd"}, - {file = "regex-2024.7.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:836d3cc225b3e8a943d0b02633fb2f28a66e281290302a79df0e1eaa984ff7c1"}, - {file = "regex-2024.7.24-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:438d9f0f4bc64e8dea78274caa5af971ceff0f8771e1a2333620969936ba10be"}, - {file = "regex-2024.7.24-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:973335b1624859cb0e52f96062a28aa18f3a5fc77a96e4a3d6d76e29811a0e6e"}, - {file = "regex-2024.7.24-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:c5e69fd3eb0b409432b537fe3c6f44ac089c458ab6b78dcec14478422879ec5f"}, - {file = "regex-2024.7.24-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:fbf8c2f00904eaf63ff37718eb13acf8e178cb940520e47b2f05027f5bb34ce3"}, - {file = "regex-2024.7.24-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ae2757ace61bc4061b69af19e4689fa4416e1a04840f33b441034202b5cd02d4"}, - {file = "regex-2024.7.24-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:44fc61b99035fd9b3b9453f1713234e5a7c92a04f3577252b45feefe1b327759"}, - {file = "regex-2024.7.24-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:84c312cdf839e8b579f504afcd7b65f35d60b6285d892b19adea16355e8343c9"}, - {file = "regex-2024.7.24-cp39-cp39-win32.whl", hash = "sha256:ca5b2028c2f7af4e13fb9fc29b28d0ce767c38c7facdf64f6c2cd040413055f1"}, - {file = "regex-2024.7.24-cp39-cp39-win_amd64.whl", hash = "sha256:7c479f5ae937ec9985ecaf42e2e10631551d909f203e31308c12d703922742f9"}, - {file = "regex-2024.7.24.tar.gz", hash = "sha256:9cfd009eed1a46b27c14039ad5bbc5e71b6367c5b2e6d5f5da0ea91600817506"}, + {file = "regex-2024.9.11-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1494fa8725c285a81d01dc8c06b55287a1ee5e0e382d8413adc0a9197aac6408"}, + {file = "regex-2024.9.11-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0e12c481ad92d129c78f13a2a3662317e46ee7ef96c94fd332e1c29131875b7d"}, + {file = "regex-2024.9.11-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:16e13a7929791ac1216afde26f712802e3df7bf0360b32e4914dca3ab8baeea5"}, + {file = "regex-2024.9.11-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:46989629904bad940bbec2106528140a218b4a36bb3042d8406980be1941429c"}, + {file = "regex-2024.9.11-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a906ed5e47a0ce5f04b2c981af1c9acf9e8696066900bf03b9d7879a6f679fc8"}, + {file = "regex-2024.9.11-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e9a091b0550b3b0207784a7d6d0f1a00d1d1c8a11699c1a4d93db3fbefc3ad35"}, + {file = "regex-2024.9.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5ddcd9a179c0a6fa8add279a4444015acddcd7f232a49071ae57fa6e278f1f71"}, + {file = "regex-2024.9.11-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6b41e1adc61fa347662b09398e31ad446afadff932a24807d3ceb955ed865cc8"}, + {file = "regex-2024.9.11-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ced479f601cd2f8ca1fd7b23925a7e0ad512a56d6e9476f79b8f381d9d37090a"}, + {file = "regex-2024.9.11-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:635a1d96665f84b292e401c3d62775851aedc31d4f8784117b3c68c4fcd4118d"}, + {file = "regex-2024.9.11-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:c0256beda696edcf7d97ef16b2a33a8e5a875affd6fa6567b54f7c577b30a137"}, + {file = "regex-2024.9.11-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:3ce4f1185db3fbde8ed8aa223fc9620f276c58de8b0d4f8cc86fd1360829edb6"}, + {file = "regex-2024.9.11-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:09d77559e80dcc9d24570da3745ab859a9cf91953062e4ab126ba9d5993688ca"}, + {file = "regex-2024.9.11-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7a22ccefd4db3f12b526eccb129390942fe874a3a9fdbdd24cf55773a1faab1a"}, + {file = "regex-2024.9.11-cp310-cp310-win32.whl", hash = "sha256:f745ec09bc1b0bd15cfc73df6fa4f726dcc26bb16c23a03f9e3367d357eeedd0"}, + {file = "regex-2024.9.11-cp310-cp310-win_amd64.whl", hash = "sha256:01c2acb51f8a7d6494c8c5eafe3d8e06d76563d8a8a4643b37e9b2dd8a2ff623"}, + {file = "regex-2024.9.11-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:2cce2449e5927a0bf084d346da6cd5eb016b2beca10d0013ab50e3c226ffc0df"}, + {file = "regex-2024.9.11-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3b37fa423beefa44919e009745ccbf353d8c981516e807995b2bd11c2c77d268"}, + {file = "regex-2024.9.11-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:64ce2799bd75039b480cc0360907c4fb2f50022f030bf9e7a8705b636e408fad"}, + {file = "regex-2024.9.11-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a4cc92bb6db56ab0c1cbd17294e14f5e9224f0cc6521167ef388332604e92679"}, + {file = "regex-2024.9.11-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d05ac6fa06959c4172eccd99a222e1fbf17b5670c4d596cb1e5cde99600674c4"}, + {file = "regex-2024.9.11-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:040562757795eeea356394a7fb13076ad4f99d3c62ab0f8bdfb21f99a1f85664"}, + {file = "regex-2024.9.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6113c008a7780792efc80f9dfe10ba0cd043cbf8dc9a76ef757850f51b4edc50"}, + {file = "regex-2024.9.11-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8e5fb5f77c8745a60105403a774fe2c1759b71d3e7b4ca237a5e67ad066c7199"}, + {file = "regex-2024.9.11-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:54d9ff35d4515debf14bc27f1e3b38bfc453eff3220f5bce159642fa762fe5d4"}, + {file = "regex-2024.9.11-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:df5cbb1fbc74a8305b6065d4ade43b993be03dbe0f8b30032cced0d7740994bd"}, + {file = "regex-2024.9.11-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:7fb89ee5d106e4a7a51bce305ac4efb981536301895f7bdcf93ec92ae0d91c7f"}, + {file = "regex-2024.9.11-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:a738b937d512b30bf75995c0159c0ddf9eec0775c9d72ac0202076c72f24aa96"}, + {file = "regex-2024.9.11-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:e28f9faeb14b6f23ac55bfbbfd3643f5c7c18ede093977f1df249f73fd22c7b1"}, + {file = "regex-2024.9.11-cp311-cp311-win32.whl", hash = "sha256:18e707ce6c92d7282dfce370cd205098384b8ee21544e7cb29b8aab955b66fa9"}, + {file = "regex-2024.9.11-cp311-cp311-win_amd64.whl", hash = "sha256:313ea15e5ff2a8cbbad96ccef6be638393041b0a7863183c2d31e0c6116688cf"}, + {file = "regex-2024.9.11-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:b0d0a6c64fcc4ef9c69bd5b3b3626cc3776520a1637d8abaa62b9edc147a58f7"}, + {file = "regex-2024.9.11-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:49b0e06786ea663f933f3710a51e9385ce0cba0ea56b67107fd841a55d56a231"}, + {file = "regex-2024.9.11-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5b513b6997a0b2f10e4fd3a1313568e373926e8c252bd76c960f96fd039cd28d"}, + {file = "regex-2024.9.11-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ee439691d8c23e76f9802c42a95cfeebf9d47cf4ffd06f18489122dbb0a7ad64"}, + {file = "regex-2024.9.11-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a8f877c89719d759e52783f7fe6e1c67121076b87b40542966c02de5503ace42"}, + {file = "regex-2024.9.11-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:23b30c62d0f16827f2ae9f2bb87619bc4fba2044911e2e6c2eb1af0161cdb766"}, + {file = "regex-2024.9.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85ab7824093d8f10d44330fe1e6493f756f252d145323dd17ab6b48733ff6c0a"}, + {file = "regex-2024.9.11-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8dee5b4810a89447151999428fe096977346cf2f29f4d5e29609d2e19e0199c9"}, + {file = "regex-2024.9.11-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:98eeee2f2e63edae2181c886d7911ce502e1292794f4c5ee71e60e23e8d26b5d"}, + {file = "regex-2024.9.11-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:57fdd2e0b2694ce6fc2e5ccf189789c3e2962916fb38779d3e3521ff8fe7a822"}, + {file = "regex-2024.9.11-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:d552c78411f60b1fdaafd117a1fca2f02e562e309223b9d44b7de8be451ec5e0"}, + {file = "regex-2024.9.11-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:a0b2b80321c2ed3fcf0385ec9e51a12253c50f146fddb2abbb10f033fe3d049a"}, + {file = "regex-2024.9.11-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:18406efb2f5a0e57e3a5881cd9354c1512d3bb4f5c45d96d110a66114d84d23a"}, + {file = "regex-2024.9.11-cp312-cp312-win32.whl", hash = "sha256:e464b467f1588e2c42d26814231edecbcfe77f5ac414d92cbf4e7b55b2c2a776"}, + {file = "regex-2024.9.11-cp312-cp312-win_amd64.whl", hash = "sha256:9e8719792ca63c6b8340380352c24dcb8cd7ec49dae36e963742a275dfae6009"}, + {file = "regex-2024.9.11-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:c157bb447303070f256e084668b702073db99bbb61d44f85d811025fcf38f784"}, + {file = "regex-2024.9.11-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4db21ece84dfeefc5d8a3863f101995de646c6cb0536952c321a2650aa202c36"}, + {file = "regex-2024.9.11-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:220e92a30b426daf23bb67a7962900ed4613589bab80382be09b48896d211e92"}, + {file = "regex-2024.9.11-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb1ae19e64c14c7ec1995f40bd932448713d3c73509e82d8cd7744dc00e29e86"}, + {file = "regex-2024.9.11-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f47cd43a5bfa48f86925fe26fbdd0a488ff15b62468abb5d2a1e092a4fb10e85"}, + {file = "regex-2024.9.11-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9d4a76b96f398697fe01117093613166e6aa8195d63f1b4ec3f21ab637632963"}, + {file = "regex-2024.9.11-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ea51dcc0835eea2ea31d66456210a4e01a076d820e9039b04ae8d17ac11dee6"}, + {file = "regex-2024.9.11-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7aaa315101c6567a9a45d2839322c51c8d6e81f67683d529512f5bcfb99c802"}, + {file = "regex-2024.9.11-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c57d08ad67aba97af57a7263c2d9006d5c404d721c5f7542f077f109ec2a4a29"}, + {file = "regex-2024.9.11-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:f8404bf61298bb6f8224bb9176c1424548ee1181130818fcd2cbffddc768bed8"}, + {file = "regex-2024.9.11-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:dd4490a33eb909ef5078ab20f5f000087afa2a4daa27b4c072ccb3cb3050ad84"}, + {file = "regex-2024.9.11-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:eee9130eaad130649fd73e5cd92f60e55708952260ede70da64de420cdcad554"}, + {file = "regex-2024.9.11-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6a2644a93da36c784e546de579ec1806bfd2763ef47babc1b03d765fe560c9f8"}, + {file = "regex-2024.9.11-cp313-cp313-win32.whl", hash = "sha256:e997fd30430c57138adc06bba4c7c2968fb13d101e57dd5bb9355bf8ce3fa7e8"}, + {file = "regex-2024.9.11-cp313-cp313-win_amd64.whl", hash = "sha256:042c55879cfeb21a8adacc84ea347721d3d83a159da6acdf1116859e2427c43f"}, + {file = "regex-2024.9.11-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:35f4a6f96aa6cb3f2f7247027b07b15a374f0d5b912c0001418d1d55024d5cb4"}, + {file = "regex-2024.9.11-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:55b96e7ce3a69a8449a66984c268062fbaa0d8ae437b285428e12797baefce7e"}, + {file = "regex-2024.9.11-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cb130fccd1a37ed894824b8c046321540263013da72745d755f2d35114b81a60"}, + {file = "regex-2024.9.11-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:323c1f04be6b2968944d730e5c2091c8c89767903ecaa135203eec4565ed2b2b"}, + {file = "regex-2024.9.11-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:be1c8ed48c4c4065ecb19d882a0ce1afe0745dfad8ce48c49586b90a55f02366"}, + {file = "regex-2024.9.11-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b5b029322e6e7b94fff16cd120ab35a253236a5f99a79fb04fda7ae71ca20ae8"}, + {file = "regex-2024.9.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6fff13ef6b5f29221d6904aa816c34701462956aa72a77f1f151a8ec4f56aeb"}, + {file = "regex-2024.9.11-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:587d4af3979376652010e400accc30404e6c16b7df574048ab1f581af82065e4"}, + {file = "regex-2024.9.11-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:079400a8269544b955ffa9e31f186f01d96829110a3bf79dc338e9910f794fca"}, + {file = "regex-2024.9.11-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:f9268774428ec173654985ce55fc6caf4c6d11ade0f6f914d48ef4719eb05ebb"}, + {file = "regex-2024.9.11-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:23f9985c8784e544d53fc2930fc1ac1a7319f5d5332d228437acc9f418f2f168"}, + {file = "regex-2024.9.11-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:ae2941333154baff9838e88aa71c1d84f4438189ecc6021a12c7573728b5838e"}, + {file = "regex-2024.9.11-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:e93f1c331ca8e86fe877a48ad64e77882c0c4da0097f2212873a69bbfea95d0c"}, + {file = "regex-2024.9.11-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:846bc79ee753acf93aef4184c040d709940c9d001029ceb7b7a52747b80ed2dd"}, + {file = "regex-2024.9.11-cp38-cp38-win32.whl", hash = "sha256:c94bb0a9f1db10a1d16c00880bdebd5f9faf267273b8f5bd1878126e0fbde771"}, + {file = "regex-2024.9.11-cp38-cp38-win_amd64.whl", hash = "sha256:2b08fce89fbd45664d3df6ad93e554b6c16933ffa9d55cb7e01182baaf971508"}, + {file = "regex-2024.9.11-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:07f45f287469039ffc2c53caf6803cd506eb5f5f637f1d4acb37a738f71dd066"}, + {file = "regex-2024.9.11-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4838e24ee015101d9f901988001038f7f0d90dc0c3b115541a1365fb439add62"}, + {file = "regex-2024.9.11-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6edd623bae6a737f10ce853ea076f56f507fd7726bee96a41ee3d68d347e4d16"}, + {file = "regex-2024.9.11-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c69ada171c2d0e97a4b5aa78fbb835e0ffbb6b13fc5da968c09811346564f0d3"}, + {file = "regex-2024.9.11-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:02087ea0a03b4af1ed6ebab2c54d7118127fee8d71b26398e8e4b05b78963199"}, + {file = "regex-2024.9.11-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:69dee6a020693d12a3cf892aba4808fe168d2a4cef368eb9bf74f5398bfd4ee8"}, + {file = "regex-2024.9.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:297f54910247508e6e5cae669f2bc308985c60540a4edd1c77203ef19bfa63ca"}, + {file = "regex-2024.9.11-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ecea58b43a67b1b79805f1a0255730edaf5191ecef84dbc4cc85eb30bc8b63b9"}, + {file = "regex-2024.9.11-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:eab4bb380f15e189d1313195b062a6aa908f5bd687a0ceccd47c8211e9cf0d4a"}, + {file = "regex-2024.9.11-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:0cbff728659ce4bbf4c30b2a1be040faafaa9eca6ecde40aaff86f7889f4ab39"}, + {file = "regex-2024.9.11-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:54c4a097b8bc5bb0dfc83ae498061d53ad7b5762e00f4adaa23bee22b012e6ba"}, + {file = "regex-2024.9.11-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:73d6d2f64f4d894c96626a75578b0bf7d9e56dcda8c3d037a2118fdfe9b1c664"}, + {file = "regex-2024.9.11-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:e53b5fbab5d675aec9f0c501274c467c0f9a5d23696cfc94247e1fb56501ed89"}, + {file = "regex-2024.9.11-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:0ffbcf9221e04502fc35e54d1ce9567541979c3fdfb93d2c554f0ca583a19b35"}, + {file = "regex-2024.9.11-cp39-cp39-win32.whl", hash = "sha256:e4c22e1ac1f1ec1e09f72e6c44d8f2244173db7eb9629cc3a346a8d7ccc31142"}, + {file = "regex-2024.9.11-cp39-cp39-win_amd64.whl", hash = "sha256:faa3c142464efec496967359ca99696c896c591c56c53506bac1ad465f66e919"}, + {file = "regex-2024.9.11.tar.gz", hash = "sha256:6c188c307e8433bcb63dc1915022deb553b4203a70722fc542c363bf120a01fd"}, ] [[package]] @@ -4409,13 +4424,13 @@ files = [ [[package]] name = "urllib3" -version = "2.2.2" +version = "2.2.3" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" files = [ - {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, - {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, + {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, + {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, ] [package.extras] @@ -4684,9 +4699,8 @@ type = ["pytest-mypy"] [extras] external-clients = ["pinecone-client", "weaviate-client"] -kg-creation-tools = ["pygraphviz", "pygraphviz"] [metadata] lock-version = "2.0" python-versions = "^3.8.1" -content-hash = "30d3f785f9e878afce94706e84745cac151d8f10bb7735e78499ddb8e907c8dc" +content-hash = "f5e6fd7d04181c255b93f6322f266852b80c8ba04e665d8eb6b2b6bc846611b3" diff --git a/pyproject.toml b/pyproject.toml index 525dd500..3a179f96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ # limitations under the License. [tool.poetry] -name = "neo4j-genai" +name = "neo4j-graphrag" version = "0.6.0" description = "Python package to allow easy integration to Neo4j's GenAI features" authors = ["Neo4j, Inc "] @@ -24,7 +24,7 @@ homepage = "https://neo4j.com/" repository = "https://github.com/neo4j/neo4j-genai-python" [[tool.poetry.packages]] -include = "neo4j_genai" +include = "neo4j_graphrag" from = "src" [tool.poetry.dependencies] @@ -76,7 +76,6 @@ pygraphviz = [ [tool.poetry.extras] external_clients = ["weaviate-client", "pinecone-client"] -kg_creation_tools = ["pygraphviz"] [build-system] requires = ["poetry-core>=1.0.0"] diff --git a/src/neo4j_genai/embeddings/__init__.py b/src/neo4j_graphrag/__init__.py similarity index 100% rename from src/neo4j_genai/embeddings/__init__.py rename to src/neo4j_graphrag/__init__.py diff --git a/src/neo4j_genai/embedder.py b/src/neo4j_graphrag/embedder.py similarity index 100% rename from src/neo4j_genai/embedder.py rename to src/neo4j_graphrag/embedder.py diff --git a/src/neo4j_genai/experimental/components/__init__.py b/src/neo4j_graphrag/embeddings/__init__.py similarity index 100% rename from src/neo4j_genai/experimental/components/__init__.py rename to src/neo4j_graphrag/embeddings/__init__.py diff --git a/src/neo4j_genai/embeddings/openai.py b/src/neo4j_graphrag/embeddings/openai.py similarity index 96% rename from src/neo4j_genai/embeddings/openai.py rename to src/neo4j_graphrag/embeddings/openai.py index 46ff0934..a85ffe87 100644 --- a/src/neo4j_genai/embeddings/openai.py +++ b/src/neo4j_graphrag/embeddings/openai.py @@ -17,7 +17,7 @@ from typing import Any -from neo4j_genai.embedder import Embedder +from neo4j_graphrag.embedder import Embedder class OpenAIEmbeddings(Embedder): diff --git a/src/neo4j_genai/embeddings/sentence_transformers.py b/src/neo4j_graphrag/embeddings/sentence_transformers.py similarity index 97% rename from src/neo4j_genai/embeddings/sentence_transformers.py rename to src/neo4j_graphrag/embeddings/sentence_transformers.py index 4e5835ed..381e68ee 100644 --- a/src/neo4j_genai/embeddings/sentence_transformers.py +++ b/src/neo4j_graphrag/embeddings/sentence_transformers.py @@ -18,7 +18,7 @@ import numpy as np import torch -from neo4j_genai.embedder import Embedder +from neo4j_graphrag.embedder import Embedder class SentenceTransformerEmbeddings(Embedder): diff --git a/src/neo4j_genai/exceptions.py b/src/neo4j_graphrag/exceptions.py similarity index 97% rename from src/neo4j_genai/exceptions.py rename to src/neo4j_graphrag/exceptions.py index 92354b84..93db4f12 100644 --- a/src/neo4j_genai/exceptions.py +++ b/src/neo4j_graphrag/exceptions.py @@ -18,7 +18,7 @@ class Neo4jGenAiError(Exception): - """Global exception used for the neo4j-genai package.""" + """Global exception used for the neo4j-graphrag package.""" pass diff --git a/src/neo4j_genai/experimental/__init__.py b/src/neo4j_graphrag/experimental/__init__.py similarity index 100% rename from src/neo4j_genai/experimental/__init__.py rename to src/neo4j_graphrag/experimental/__init__.py diff --git a/src/neo4j_genai/retrievers/external/pinecone/__init__.py b/src/neo4j_graphrag/experimental/components/__init__.py similarity index 100% rename from src/neo4j_genai/retrievers/external/pinecone/__init__.py rename to src/neo4j_graphrag/experimental/components/__init__.py diff --git a/src/neo4j_genai/experimental/components/embedder.py b/src/neo4j_graphrag/experimental/components/embedder.py similarity index 84% rename from src/neo4j_genai/experimental/components/embedder.py rename to src/neo4j_graphrag/experimental/components/embedder.py index 7bee819c..4f4f08f5 100644 --- a/src/neo4j_genai/experimental/components/embedder.py +++ b/src/neo4j_graphrag/experimental/components/embedder.py @@ -14,9 +14,9 @@ # limitations under the License. from pydantic import validate_call -from neo4j_genai.embedder import Embedder -from neo4j_genai.experimental.components.types import TextChunk, TextChunks -from neo4j_genai.experimental.pipeline.component import Component +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.experimental.components.types import TextChunk, TextChunks +from neo4j_graphrag.experimental.pipeline.component import Component class TextChunkEmbedder(Component): @@ -29,9 +29,9 @@ class TextChunkEmbedder(Component): .. code-block:: python - from neo4j_genai.experimental.components.embedder import TextChunkEmbedder - from neo4j_genai.embeddings.openai import OpenAIEmbeddings - from neo4j_genai.experimental.pipeline import Pipeline + from neo4j_graphrag.experimental.components.embedder import TextChunkEmbedder + from neo4j_graphrag.embeddings.openai import OpenAIEmbeddings + from neo4j_graphrag.experimental.pipeline import Pipeline embedder = OpenAIEmbeddings(model="text-embedding-3-large") chunk_embedder = TextChunkEmbedder(embedder) diff --git a/src/neo4j_genai/experimental/components/entity_relation_extractor.py b/src/neo4j_graphrag/experimental/components/entity_relation_extractor.py similarity index 95% rename from src/neo4j_genai/experimental/components/entity_relation_extractor.py rename to src/neo4j_graphrag/experimental/components/entity_relation_extractor.py index 904d57d1..7d712e0a 100644 --- a/src/neo4j_genai/experimental/components/entity_relation_extractor.py +++ b/src/neo4j_graphrag/experimental/components/entity_relation_extractor.py @@ -26,19 +26,19 @@ from pydantic import ValidationError, validate_call -from neo4j_genai.exceptions import LLMGenerationError -from neo4j_genai.experimental.components.pdf_loader import DocumentInfo -from neo4j_genai.experimental.components.schema import SchemaConfig -from neo4j_genai.experimental.components.types import ( +from neo4j_graphrag.exceptions import LLMGenerationError +from neo4j_graphrag.experimental.components.pdf_loader import DocumentInfo +from neo4j_graphrag.experimental.components.schema import SchemaConfig +from neo4j_graphrag.experimental.components.types import ( Neo4jGraph, Neo4jNode, Neo4jRelationship, TextChunk, TextChunks, ) -from neo4j_genai.experimental.pipeline.component import Component -from neo4j_genai.generation.prompts import ERExtractionTemplate, PromptTemplate -from neo4j_genai.llm import LLMInterface +from neo4j_graphrag.experimental.pipeline.component import Component +from neo4j_graphrag.generation.prompts import ERExtractionTemplate, PromptTemplate +from neo4j_graphrag.llm import LLMInterface logger = logging.getLogger(__name__) @@ -289,9 +289,9 @@ class LLMEntityRelationExtractor(EntityRelationExtractor): .. code-block:: python - from neo4j_genai.experimental.components.entity_relation_extractor import LLMEntityRelationExtractor - from neo4j_genai.llm import OpenAILLM - from neo4j_genai.experimental.pipeline import Pipeline + from neo4j_graphrag.experimental.components.entity_relation_extractor import LLMEntityRelationExtractor + from neo4j_graphrag.llm import OpenAILLM + from neo4j_graphrag.experimental.pipeline import Pipeline llm = OpenAILLM(model_name="gpt-4o", model_params={"temperature": 0, "response_format": {"type": "object"}}) diff --git a/src/neo4j_genai/experimental/components/kg_writer.py b/src/neo4j_graphrag/experimental/components/kg_writer.py similarity index 95% rename from src/neo4j_genai/experimental/components/kg_writer.py rename to src/neo4j_graphrag/experimental/components/kg_writer.py index 6dc4fd6c..89a71578 100644 --- a/src/neo4j_genai/experimental/components/kg_writer.py +++ b/src/neo4j_graphrag/experimental/components/kg_writer.py @@ -22,19 +22,19 @@ import neo4j from pydantic import validate_call -from neo4j_genai.experimental.components.types import ( +from neo4j_graphrag.experimental.components.types import ( Neo4jGraph, Neo4jNode, Neo4jRelationship, ) -from neo4j_genai.experimental.pipeline.component import Component, DataModel -from neo4j_genai.indexes import ( +from neo4j_graphrag.experimental.pipeline.component import Component, DataModel +from neo4j_graphrag.indexes import ( async_upsert_vector, async_upsert_vector_on_relationship, upsert_vector, upsert_vector_on_relationship, ) -from neo4j_genai.neo4j_queries import UPSERT_NODE_QUERY, UPSERT_RELATIONSHIP_QUERY +from neo4j_graphrag.neo4j_queries import UPSERT_NODE_QUERY, UPSERT_RELATIONSHIP_QUERY logger = logging.getLogger(__name__) @@ -77,8 +77,8 @@ class Neo4jWriter(KGWriter): .. code-block:: python from neo4j import AsyncGraphDatabase - from neo4j_genai.experimental.components.kg_writer import Neo4jWriter - from neo4j_genai.experimental.pipeline import Pipeline + from neo4j_graphrag.experimental.components.kg_writer import Neo4jWriter + from neo4j_graphrag.experimental.pipeline import Pipeline URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") diff --git a/src/neo4j_genai/experimental/components/pdf_loader.py b/src/neo4j_graphrag/experimental/components/pdf_loader.py similarity index 95% rename from src/neo4j_genai/experimental/components/pdf_loader.py rename to src/neo4j_graphrag/experimental/components/pdf_loader.py index a8fa6e1c..f17e3b02 100644 --- a/src/neo4j_genai/experimental/components/pdf_loader.py +++ b/src/neo4j_graphrag/experimental/components/pdf_loader.py @@ -24,8 +24,8 @@ from fsspec import AbstractFileSystem from fsspec.implementations.local import LocalFileSystem -from neo4j_genai.exceptions import PdfLoaderError -from neo4j_genai.experimental.pipeline import Component, DataModel +from neo4j_graphrag.exceptions import PdfLoaderError +from neo4j_graphrag.experimental.pipeline import Component, DataModel class DocumentInfo(DataModel): diff --git a/src/neo4j_genai/experimental/components/schema.py b/src/neo4j_graphrag/experimental/components/schema.py similarity index 96% rename from src/neo4j_genai/experimental/components/schema.py rename to src/neo4j_graphrag/experimental/components/schema.py index a32d13c7..20919d8a 100644 --- a/src/neo4j_genai/experimental/components/schema.py +++ b/src/neo4j_graphrag/experimental/components/schema.py @@ -18,8 +18,8 @@ from pydantic import BaseModel, ValidationError, model_validator, validate_call -from neo4j_genai.exceptions import SchemaValidationError -from neo4j_genai.experimental.pipeline import Component, DataModel +from neo4j_graphrag.exceptions import SchemaValidationError +from neo4j_graphrag.experimental.pipeline import Component, DataModel class SchemaProperty(BaseModel): @@ -107,13 +107,13 @@ class SchemaBuilder(Component): .. code-block:: python - from neo4j_genai.experimental.components.schema import ( + from neo4j_graphrag.experimental.components.schema import ( SchemaBuilder, SchemaEntity, SchemaProperty, SchemaRelation, ) - from neo4j_genai.experimental.pipeline import Pipeline + from neo4j_graphrag.experimental.pipeline import Pipeline entities = [ SchemaEntity( diff --git a/src/neo4j_genai/experimental/components/text_splitters/__init__.py b/src/neo4j_graphrag/experimental/components/text_splitters/__init__.py similarity index 100% rename from src/neo4j_genai/experimental/components/text_splitters/__init__.py rename to src/neo4j_graphrag/experimental/components/text_splitters/__init__.py diff --git a/src/neo4j_genai/experimental/components/text_splitters/base.py b/src/neo4j_graphrag/experimental/components/text_splitters/base.py similarity index 86% rename from src/neo4j_genai/experimental/components/text_splitters/base.py rename to src/neo4j_graphrag/experimental/components/text_splitters/base.py index 5708d400..0d25b448 100644 --- a/src/neo4j_genai/experimental/components/text_splitters/base.py +++ b/src/neo4j_graphrag/experimental/components/text_splitters/base.py @@ -16,8 +16,8 @@ from abc import abstractmethod -from neo4j_genai.experimental.components.types import TextChunks -from neo4j_genai.experimental.pipeline.component import Component +from neo4j_graphrag.experimental.components.types import TextChunks +from neo4j_graphrag.experimental.pipeline.component import Component class TextSplitter(Component): diff --git a/src/neo4j_genai/experimental/components/text_splitters/langchain.py b/src/neo4j_graphrag/experimental/components/text_splitters/langchain.py similarity index 84% rename from src/neo4j_genai/experimental/components/text_splitters/langchain.py rename to src/neo4j_graphrag/experimental/components/text_splitters/langchain.py index 979004f1..f44f1b46 100644 --- a/src/neo4j_genai/experimental/components/text_splitters/langchain.py +++ b/src/neo4j_graphrag/experimental/components/text_splitters/langchain.py @@ -16,8 +16,8 @@ from langchain_text_splitters import TextSplitter as LangChainTextSplitter -from neo4j_genai.experimental.components.text_splitters.base import TextSplitter -from neo4j_genai.experimental.components.types import TextChunk, TextChunks +from neo4j_graphrag.experimental.components.text_splitters.base import TextSplitter +from neo4j_graphrag.experimental.components.types import TextChunk, TextChunks class LangChainTextSplitterAdapter(TextSplitter): @@ -32,8 +32,8 @@ class LangChainTextSplitterAdapter(TextSplitter): .. code-block:: python from langchain_text_splitters import RecursiveCharacterTextSplitter - from neo4j_genai.experimental.components.text_splitters.langchain import LangChainTextSplitterAdapter - from neo4j_genai.experimental.pipeline import Pipeline + from neo4j_graphrag.experimental.components.text_splitters.langchain import LangChainTextSplitterAdapter + from neo4j_graphrag.experimental.pipeline import Pipeline pipeline = Pipeline() text_splitter = LangChainTextSplitterAdapter(RecursiveCharacterTextSplitter()) diff --git a/src/neo4j_genai/experimental/components/text_splitters/llamaindex.py b/src/neo4j_graphrag/experimental/components/text_splitters/llamaindex.py similarity index 84% rename from src/neo4j_genai/experimental/components/text_splitters/llamaindex.py rename to src/neo4j_graphrag/experimental/components/text_splitters/llamaindex.py index b1920055..2b277e82 100644 --- a/src/neo4j_genai/experimental/components/text_splitters/llamaindex.py +++ b/src/neo4j_graphrag/experimental/components/text_splitters/llamaindex.py @@ -16,8 +16,8 @@ from llama_index.core.node_parser import TextSplitter as LlamaIndexTextSplitter -from neo4j_genai.experimental.components.text_splitters.base import TextSplitter -from neo4j_genai.experimental.components.types import TextChunk, TextChunks +from neo4j_graphrag.experimental.components.text_splitters.base import TextSplitter +from neo4j_graphrag.experimental.components.types import TextChunk, TextChunks class LlamaIndexTextSplitterAdapter(TextSplitter): @@ -32,8 +32,8 @@ class LlamaIndexTextSplitterAdapter(TextSplitter): .. code-block:: python from llama_index.core.node_parser.text.sentence import SentenceSplitter - from neo4j_genai.experimental.components.text_splitters.langchain import LangChainTextSplitterAdapter - from neo4j_genai.experimental.pipeline import Pipeline + from neo4j_graphrag.experimental.components.text_splitters.langchain import LangChainTextSplitterAdapter + from neo4j_graphrag.experimental.pipeline import Pipeline pipeline = Pipeline() text_splitter = LlamaIndexTextSplitterAdapter(SentenceSplitter()) diff --git a/src/neo4j_genai/experimental/components/types.py b/src/neo4j_graphrag/experimental/components/types.py similarity index 97% rename from src/neo4j_genai/experimental/components/types.py rename to src/neo4j_graphrag/experimental/components/types.py index cf6aadd7..b90e2450 100644 --- a/src/neo4j_genai/experimental/components/types.py +++ b/src/neo4j_graphrag/experimental/components/types.py @@ -18,7 +18,7 @@ from pydantic import BaseModel, field_validator -from neo4j_genai.experimental.pipeline.component import DataModel +from neo4j_graphrag.experimental.pipeline.component import DataModel class TextChunk(BaseModel): diff --git a/src/neo4j_genai/experimental/pipeline/__init__.py b/src/neo4j_graphrag/experimental/pipeline/__init__.py similarity index 100% rename from src/neo4j_genai/experimental/pipeline/__init__.py rename to src/neo4j_graphrag/experimental/pipeline/__init__.py diff --git a/src/neo4j_genai/experimental/pipeline/component.py b/src/neo4j_graphrag/experimental/pipeline/component.py similarity index 97% rename from src/neo4j_genai/experimental/pipeline/component.py rename to src/neo4j_graphrag/experimental/pipeline/component.py index 6625d11a..b6a5963e 100644 --- a/src/neo4j_genai/experimental/pipeline/component.py +++ b/src/neo4j_graphrag/experimental/pipeline/component.py @@ -20,7 +20,7 @@ from pydantic import BaseModel -from neo4j_genai.experimental.pipeline.exceptions import PipelineDefinitionError +from neo4j_graphrag.experimental.pipeline.exceptions import PipelineDefinitionError class DataModel(BaseModel): diff --git a/src/neo4j_genai/experimental/pipeline/exceptions.py b/src/neo4j_graphrag/experimental/pipeline/exceptions.py similarity index 95% rename from src/neo4j_genai/experimental/pipeline/exceptions.py rename to src/neo4j_graphrag/experimental/pipeline/exceptions.py index 2a35857d..c1f400a9 100644 --- a/src/neo4j_genai/experimental/pipeline/exceptions.py +++ b/src/neo4j_graphrag/experimental/pipeline/exceptions.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from neo4j_genai.exceptions import Neo4jGenAiError +from neo4j_graphrag.exceptions import Neo4jGenAiError class PipelineDefinitionError(Neo4jGenAiError): diff --git a/src/neo4j_genai/experimental/pipeline/pipeline.py b/src/neo4j_graphrag/experimental/pipeline/pipeline.py similarity index 98% rename from src/neo4j_genai/experimental/pipeline/pipeline.py rename to src/neo4j_graphrag/experimental/pipeline/pipeline.py index 5a3f4dc7..31088c8b 100644 --- a/src/neo4j_genai/experimental/pipeline/pipeline.py +++ b/src/neo4j_graphrag/experimental/pipeline/pipeline.py @@ -27,19 +27,19 @@ import pygraphviz as pgv from pydantic import BaseModel, Field -from neo4j_genai.experimental.pipeline.component import Component, DataModel -from neo4j_genai.experimental.pipeline.exceptions import ( +from neo4j_graphrag.experimental.pipeline.component import Component, DataModel +from neo4j_graphrag.experimental.pipeline.exceptions import ( PipelineDefinitionError, PipelineMissingDependencyError, PipelineStatusUpdateError, ) -from neo4j_genai.experimental.pipeline.pipeline_graph import ( +from neo4j_graphrag.experimental.pipeline.pipeline_graph import ( PipelineEdge, PipelineGraph, PipelineNode, ) -from neo4j_genai.experimental.pipeline.stores import InMemoryStore, ResultStore -from neo4j_genai.experimental.pipeline.types import ( +from neo4j_graphrag.experimental.pipeline.stores import InMemoryStore, ResultStore +from neo4j_graphrag.experimental.pipeline.types import ( ComponentConfig, ConnectionConfig, PipelineConfig, diff --git a/src/neo4j_genai/experimental/pipeline/pipeline_graph.py b/src/neo4j_graphrag/experimental/pipeline/pipeline_graph.py similarity index 100% rename from src/neo4j_genai/experimental/pipeline/pipeline_graph.py rename to src/neo4j_graphrag/experimental/pipeline/pipeline_graph.py diff --git a/src/neo4j_genai/experimental/pipeline/stores.py b/src/neo4j_graphrag/experimental/pipeline/stores.py similarity index 100% rename from src/neo4j_genai/experimental/pipeline/stores.py rename to src/neo4j_graphrag/experimental/pipeline/stores.py diff --git a/src/neo4j_genai/experimental/pipeline/types.py b/src/neo4j_graphrag/experimental/pipeline/types.py similarity index 93% rename from src/neo4j_genai/experimental/pipeline/types.py rename to src/neo4j_graphrag/experimental/pipeline/types.py index 9f03b8db..e5ec66b9 100644 --- a/src/neo4j_genai/experimental/pipeline/types.py +++ b/src/neo4j_graphrag/experimental/pipeline/types.py @@ -16,7 +16,7 @@ from pydantic import BaseModel, ConfigDict -from neo4j_genai.experimental.pipeline.component import Component +from neo4j_graphrag.experimental.pipeline.component import Component class ComponentConfig(BaseModel): diff --git a/src/neo4j_genai/filters.py b/src/neo4j_graphrag/filters.py similarity index 99% rename from src/neo4j_genai/filters.py rename to src/neo4j_graphrag/filters.py index aabaffc1..b88f2ed4 100644 --- a/src/neo4j_genai/filters.py +++ b/src/neo4j_graphrag/filters.py @@ -18,7 +18,7 @@ from collections import Counter from typing import Any, Type, Union -from neo4j_genai.exceptions import FilterValidationError +from neo4j_graphrag.exceptions import FilterValidationError DEFAULT_NODE_ALIAS = "node" diff --git a/src/neo4j_genai/generation/__init__.py b/src/neo4j_graphrag/generation/__init__.py similarity index 100% rename from src/neo4j_genai/generation/__init__.py rename to src/neo4j_graphrag/generation/__init__.py diff --git a/src/neo4j_genai/generation/graphrag.py b/src/neo4j_graphrag/generation/graphrag.py similarity index 90% rename from src/neo4j_genai/generation/graphrag.py rename to src/neo4j_graphrag/generation/graphrag.py index fd917e93..3f402e97 100644 --- a/src/neo4j_genai/generation/graphrag.py +++ b/src/neo4j_graphrag/generation/graphrag.py @@ -20,15 +20,15 @@ from pydantic import ValidationError -from neo4j_genai.exceptions import ( +from neo4j_graphrag.exceptions import ( RagInitializationError, SearchValidationError, ) -from neo4j_genai.generation.prompts import RagTemplate -from neo4j_genai.generation.types import RagInitModel, RagResultModel, RagSearchModel -from neo4j_genai.llm import LLMInterface -from neo4j_genai.retrievers.base import Retriever -from neo4j_genai.types import RetrieverResult +from neo4j_graphrag.generation.prompts import RagTemplate +from neo4j_graphrag.generation.types import RagInitModel, RagResultModel, RagSearchModel +from neo4j_graphrag.llm import LLMInterface +from neo4j_graphrag.retrievers.base import Retriever +from neo4j_graphrag.types import RetrieverResult logger = logging.getLogger(__name__) @@ -42,9 +42,9 @@ class GraphRAG: .. code-block:: python import neo4j - from neo4j_genai.retrievers import VectorRetriever - from neo4j_genai.llm.openai_llm import OpenAILLM - from neo4j_genai.generation import GraphRAG + from neo4j_graphrag.retrievers import VectorRetriever + from neo4j_graphrag.llm.openai_llm import OpenAILLM + from neo4j_graphrag.generation import GraphRAG driver = neo4j.GraphDatabase.driver(URI, auth=AUTH) diff --git a/src/neo4j_genai/generation/prompts.py b/src/neo4j_graphrag/generation/prompts.py similarity index 98% rename from src/neo4j_genai/generation/prompts.py rename to src/neo4j_graphrag/generation/prompts.py index bff5765f..b5236cf1 100644 --- a/src/neo4j_genai/generation/prompts.py +++ b/src/neo4j_graphrag/generation/prompts.py @@ -16,7 +16,7 @@ from typing import Any, Optional -from neo4j_genai.exceptions import PromptMissingInputError +from neo4j_graphrag.exceptions import PromptMissingInputError class PromptTemplate: diff --git a/src/neo4j_genai/generation/types.py b/src/neo4j_graphrag/generation/types.py similarity index 90% rename from src/neo4j_genai/generation/types.py rename to src/neo4j_graphrag/generation/types.py index cf477c07..3d9852d2 100644 --- a/src/neo4j_genai/generation/types.py +++ b/src/neo4j_graphrag/generation/types.py @@ -18,9 +18,9 @@ from pydantic import BaseModel, ConfigDict, field_validator -from neo4j_genai.generation.prompts import RagTemplate -from neo4j_genai.retrievers.base import Retriever -from neo4j_genai.types import RetrieverResult +from neo4j_graphrag.generation.prompts import RagTemplate +from neo4j_graphrag.retrievers.base import Retriever +from neo4j_graphrag.types import RetrieverResult class RagInitModel(BaseModel): diff --git a/src/neo4j_genai/indexes.py b/src/neo4j_graphrag/indexes.py similarity index 96% rename from src/neo4j_genai/indexes.py rename to src/neo4j_graphrag/indexes.py index e80e1880..cdbc38d7 100644 --- a/src/neo4j_genai/indexes.py +++ b/src/neo4j_graphrag/indexes.py @@ -20,7 +20,7 @@ import neo4j from pydantic import ValidationError -from neo4j_genai.neo4j_queries import ( +from neo4j_graphrag.neo4j_queries import ( UPSERT_VECTOR_ON_NODE_QUERY, UPSERT_VECTOR_ON_RELATIONSHIP_QUERY, ) @@ -54,7 +54,7 @@ def create_vector_index( .. code-block:: python from neo4j import GraphDatabase - from neo4j_genai.indexes import create_vector_index + from neo4j_graphrag.indexes import create_vector_index URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") @@ -139,7 +139,7 @@ def create_fulltext_index( .. code-block:: python from neo4j import GraphDatabase - from neo4j_genai.indexes import create_fulltext_index + from neo4j_graphrag.indexes import create_fulltext_index URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") @@ -205,7 +205,7 @@ def drop_index_if_exists( .. code-block:: python from neo4j import GraphDatabase - from neo4j_genai.indexes import drop_index_if_exists + from neo4j_graphrag.indexes import drop_index_if_exists URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") @@ -256,7 +256,7 @@ def upsert_vector( .. code-block:: python from neo4j import GraphDatabase - from neo4j_genai.indexes import upsert_vector + from neo4j_graphrag.indexes import upsert_vector URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") @@ -312,7 +312,7 @@ def upsert_vector_on_relationship( .. code-block:: python from neo4j import GraphDatabase - from neo4j_genai.indexes import upsert_vector_on_relationship + from neo4j_graphrag.indexes import upsert_vector_on_relationship URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") @@ -369,7 +369,7 @@ async def async_upsert_vector( .. code-block:: python from neo4j import AsyncGraphDatabase - from neo4j_genai.indexes import upsert_vector + from neo4j_graphrag.indexes import upsert_vector URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") @@ -426,7 +426,7 @@ async def async_upsert_vector_on_relationship( .. code-block:: python from neo4j import AsyncGraphDatabase - from neo4j_genai.indexes import upsert_vector_on_relationship + from neo4j_graphrag.indexes import upsert_vector_on_relationship URI = "neo4j://localhost:7687" AUTH = ("neo4j", "password") diff --git a/src/neo4j_genai/llm/__init__.py b/src/neo4j_graphrag/llm/__init__.py similarity index 100% rename from src/neo4j_genai/llm/__init__.py rename to src/neo4j_graphrag/llm/__init__.py diff --git a/src/neo4j_genai/llm/base.py b/src/neo4j_graphrag/llm/base.py similarity index 100% rename from src/neo4j_genai/llm/base.py rename to src/neo4j_graphrag/llm/base.py diff --git a/src/neo4j_genai/llm/openai_llm.py b/src/neo4j_graphrag/llm/openai_llm.py similarity index 100% rename from src/neo4j_genai/llm/openai_llm.py rename to src/neo4j_graphrag/llm/openai_llm.py diff --git a/src/neo4j_genai/llm/types.py b/src/neo4j_graphrag/llm/types.py similarity index 100% rename from src/neo4j_genai/llm/types.py rename to src/neo4j_graphrag/llm/types.py diff --git a/src/neo4j_genai/neo4j_queries.py b/src/neo4j_graphrag/neo4j_queries.py similarity index 98% rename from src/neo4j_genai/neo4j_queries.py rename to src/neo4j_graphrag/neo4j_queries.py index 1c65ffb6..da0c48db 100644 --- a/src/neo4j_genai/neo4j_queries.py +++ b/src/neo4j_graphrag/neo4j_queries.py @@ -16,8 +16,8 @@ from typing import Any, Optional -from neo4j_genai.filters import get_metadata_filter -from neo4j_genai.types import SearchType +from neo4j_graphrag.filters import get_metadata_filter +from neo4j_graphrag.types import SearchType VECTOR_INDEX_QUERY = ( "CALL db.index.vector.queryNodes($vector_index_name, $top_k, $query_vector) " diff --git a/src/neo4j_genai/retrievers/__init__.py b/src/neo4j_graphrag/retrievers/__init__.py similarity index 100% rename from src/neo4j_genai/retrievers/__init__.py rename to src/neo4j_graphrag/retrievers/__init__.py diff --git a/src/neo4j_genai/retrievers/base.py b/src/neo4j_graphrag/retrievers/base.py similarity index 98% rename from src/neo4j_genai/retrievers/base.py rename to src/neo4j_graphrag/retrievers/base.py index 1325d6d3..29cf128c 100644 --- a/src/neo4j_genai/retrievers/base.py +++ b/src/neo4j_graphrag/retrievers/base.py @@ -22,8 +22,8 @@ import neo4j from typing_extensions import ParamSpec -from neo4j_genai.exceptions import Neo4jVersionError -from neo4j_genai.types import RawSearchResult, RetrieverResult, RetrieverResultItem +from neo4j_graphrag.exceptions import Neo4jVersionError +from neo4j_graphrag.types import RawSearchResult, RetrieverResult, RetrieverResultItem T = ParamSpec("T") P = TypeVar("P") diff --git a/src/neo4j_genai/retrievers/external/__init__.py b/src/neo4j_graphrag/retrievers/external/__init__.py similarity index 100% rename from src/neo4j_genai/retrievers/external/__init__.py rename to src/neo4j_graphrag/retrievers/external/__init__.py diff --git a/src/neo4j_genai/retrievers/external/weaviate/__init__.py b/src/neo4j_graphrag/retrievers/external/pinecone/__init__.py similarity index 100% rename from src/neo4j_genai/retrievers/external/weaviate/__init__.py rename to src/neo4j_graphrag/retrievers/external/pinecone/__init__.py diff --git a/src/neo4j_genai/retrievers/external/pinecone/pinecone.py b/src/neo4j_graphrag/retrievers/external/pinecone/pinecone.py similarity index 95% rename from src/neo4j_genai/retrievers/external/pinecone/pinecone.py rename to src/neo4j_graphrag/retrievers/external/pinecone/pinecone.py index 59e627f2..c5df28d7 100644 --- a/src/neo4j_genai/retrievers/external/pinecone/pinecone.py +++ b/src/neo4j_graphrag/retrievers/external/pinecone/pinecone.py @@ -21,20 +21,20 @@ from pinecone import Pinecone from pydantic import ValidationError -from neo4j_genai.embedder import Embedder -from neo4j_genai.exceptions import ( +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.exceptions import ( EmbeddingRequiredError, RetrieverInitializationError, SearchValidationError, ) -from neo4j_genai.retrievers.base import ExternalRetriever -from neo4j_genai.retrievers.external.pinecone.types import ( +from neo4j_graphrag.retrievers.base import ExternalRetriever +from neo4j_graphrag.retrievers.external.pinecone.types import ( PineconeClientModel, PineconeNeo4jRetrieverModel, PineconeSearchModel, ) -from neo4j_genai.retrievers.external.utils import get_match_query -from neo4j_genai.types import ( +from neo4j_graphrag.retrievers.external.utils import get_match_query +from neo4j_graphrag.types import ( EmbedderModel, Neo4jDriverModel, RawSearchResult, @@ -54,7 +54,7 @@ class PineconeNeo4jRetriever(ExternalRetriever): .. code-block:: python from neo4j import GraphDatabase - from neo4j_genai.retrievers import PineconeNeo4jRetriever + from neo4j_graphrag.retrievers import PineconeNeo4jRetriever from pinecone import Pinecone with GraphDatabase.driver(NEO4J_URL, auth=NEO4J_AUTH) as neo4j_driver: @@ -161,7 +161,7 @@ def get_search_results( .. code-block:: python from neo4j import GraphDatabase - from neo4j_genai.retrievers import PineconeNeo4jRetriever + from neo4j_graphrag.retrievers import PineconeNeo4jRetriever from pinecone import Pinecone with GraphDatabase.driver(NEO4J_URL, auth=NEO4J_AUTH) as neo4j_driver: diff --git a/src/neo4j_genai/retrievers/external/pinecone/types.py b/src/neo4j_graphrag/retrievers/external/pinecone/types.py similarity index 98% rename from src/neo4j_genai/retrievers/external/pinecone/types.py rename to src/neo4j_graphrag/retrievers/external/pinecone/types.py index 7ee8930b..397894fd 100644 --- a/src/neo4j_genai/retrievers/external/pinecone/types.py +++ b/src/neo4j_graphrag/retrievers/external/pinecone/types.py @@ -24,7 +24,7 @@ field_validator, ) -from neo4j_genai.types import ( +from neo4j_graphrag.types import ( EmbedderModel, Neo4jDriverModel, RetrieverResultItem, diff --git a/src/neo4j_genai/retrievers/external/utils.py b/src/neo4j_graphrag/retrievers/external/utils.py similarity index 95% rename from src/neo4j_genai/retrievers/external/utils.py rename to src/neo4j_graphrag/retrievers/external/utils.py index 61699230..a0a97b44 100644 --- a/src/neo4j_genai/retrievers/external/utils.py +++ b/src/neo4j_graphrag/retrievers/external/utils.py @@ -16,7 +16,7 @@ from typing import Optional -from neo4j_genai.neo4j_queries import get_query_tail +from neo4j_graphrag.neo4j_queries import get_query_tail def get_match_query( diff --git a/src/neo4j_genai/__init__.py b/src/neo4j_graphrag/retrievers/external/weaviate/__init__.py similarity index 75% rename from src/neo4j_genai/__init__.py rename to src/neo4j_graphrag/retrievers/external/weaviate/__init__.py index f9177886..c0199c14 100644 --- a/src/neo4j_genai/__init__.py +++ b/src/neo4j_graphrag/retrievers/external/weaviate/__init__.py @@ -12,10 +12,3 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - -import warnings - -warnings.warn( - "This package 'neo4j-genai' is deprecated and replaced by 'neo4j-graphrag'. Please upgrade to 'neo4j-graphrag' for ongoing updates and support.", - DeprecationWarning, -) diff --git a/src/neo4j_genai/retrievers/external/weaviate/types.py b/src/neo4j_graphrag/retrievers/external/weaviate/types.py similarity index 98% rename from src/neo4j_genai/retrievers/external/weaviate/types.py rename to src/neo4j_graphrag/retrievers/external/weaviate/types.py index 39cc4571..2eaa0e5c 100644 --- a/src/neo4j_genai/retrievers/external/weaviate/types.py +++ b/src/neo4j_graphrag/retrievers/external/weaviate/types.py @@ -25,7 +25,7 @@ from weaviate.client import WeaviateClient from weaviate.collections.classes.filters import _Filters -from neo4j_genai.types import ( +from neo4j_graphrag.types import ( EmbedderModel, Neo4jDriverModel, RetrieverResultItem, diff --git a/src/neo4j_genai/retrievers/external/weaviate/weaviate.py b/src/neo4j_graphrag/retrievers/external/weaviate/weaviate.py similarity index 94% rename from src/neo4j_genai/retrievers/external/weaviate/weaviate.py rename to src/neo4j_graphrag/retrievers/external/weaviate/weaviate.py index 0eaa226a..48c86917 100644 --- a/src/neo4j_genai/retrievers/external/weaviate/weaviate.py +++ b/src/neo4j_graphrag/retrievers/external/weaviate/weaviate.py @@ -22,16 +22,19 @@ from pydantic import ValidationError from weaviate.client import WeaviateClient -from neo4j_genai.embedder import Embedder -from neo4j_genai.exceptions import RetrieverInitializationError, SearchValidationError -from neo4j_genai.retrievers.base import ExternalRetriever -from neo4j_genai.retrievers.external.utils import get_match_query -from neo4j_genai.retrievers.external.weaviate.types import ( +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.exceptions import ( + RetrieverInitializationError, + SearchValidationError, +) +from neo4j_graphrag.retrievers.base import ExternalRetriever +from neo4j_graphrag.retrievers.external.utils import get_match_query +from neo4j_graphrag.retrievers.external.weaviate.types import ( WeaviateModel, WeaviateNeo4jRetrieverModel, WeaviateNeo4jSearchModel, ) -from neo4j_genai.types import ( +from neo4j_graphrag.types import ( EmbedderModel, Neo4jDriverModel, RawSearchResult, @@ -51,7 +54,7 @@ class WeaviateNeo4jRetriever(ExternalRetriever): .. code-block:: python from neo4j import GraphDatabase - from neo4j_genai.retrievers import WeaviateNeo4jRetriever + from neo4j_graphrag.retrievers import WeaviateNeo4jRetriever from weaviate.connect.helpers import connect_to_local with GraphDatabase.driver(NEO4J_URL, auth=NEO4J_AUTH) as neo4j_driver: @@ -149,7 +152,7 @@ def get_search_results( .. code-block:: python import neo4j - from neo4j_genai.retrievers import WeaviateNeo4jRetriever + from neo4j_graphrag.retrievers import WeaviateNeo4jRetriever driver = neo4j.GraphDatabase.driver(URI, auth=AUTH) diff --git a/src/neo4j_genai/retrievers/hybrid.py b/src/neo4j_graphrag/retrievers/hybrid.py similarity index 97% rename from src/neo4j_genai/retrievers/hybrid.py rename to src/neo4j_graphrag/retrievers/hybrid.py index 59c26df6..92fb2566 100644 --- a/src/neo4j_genai/retrievers/hybrid.py +++ b/src/neo4j_graphrag/retrievers/hybrid.py @@ -20,15 +20,15 @@ import neo4j from pydantic import ValidationError -from neo4j_genai.embedder import Embedder -from neo4j_genai.exceptions import ( +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.exceptions import ( EmbeddingRequiredError, RetrieverInitializationError, SearchValidationError, ) -from neo4j_genai.neo4j_queries import get_search_query -from neo4j_genai.retrievers.base import Retriever -from neo4j_genai.types import ( +from neo4j_graphrag.neo4j_queries import get_search_query +from neo4j_graphrag.retrievers.base import Retriever +from neo4j_graphrag.types import ( EmbedderModel, HybridCypherRetrieverModel, HybridCypherSearchModel, @@ -54,7 +54,7 @@ class HybridRetriever(Retriever): .. code-block:: python import neo4j - from neo4j_genai.retrievers import HybridRetriever + from neo4j_graphrag.retrievers import HybridRetriever driver = neo4j.GraphDatabase.driver(URI, auth=AUTH) @@ -211,7 +211,7 @@ class HybridCypherRetriever(Retriever): .. code-block:: python import neo4j - from neo4j_genai.retrievers import HybridCypherRetriever + from neo4j_graphrag.retrievers import HybridCypherRetriever driver = neo4j.GraphDatabase.driver(URI, auth=AUTH) diff --git a/src/neo4j_genai/retrievers/text2cypher.py b/src/neo4j_graphrag/retrievers/text2cypher.py similarity index 93% rename from src/neo4j_genai/retrievers/text2cypher.py rename to src/neo4j_graphrag/retrievers/text2cypher.py index 71a8281f..663a33ef 100644 --- a/src/neo4j_genai/retrievers/text2cypher.py +++ b/src/neo4j_graphrag/retrievers/text2cypher.py @@ -21,17 +21,17 @@ from neo4j.exceptions import CypherSyntaxError, DriverError, Neo4jError from pydantic import ValidationError -from neo4j_genai.exceptions import ( +from neo4j_graphrag.exceptions import ( RetrieverInitializationError, SchemaFetchError, SearchValidationError, Text2CypherRetrievalError, ) -from neo4j_genai.generation.prompts import Text2CypherTemplate -from neo4j_genai.llm import LLMInterface -from neo4j_genai.retrievers.base import Retriever -from neo4j_genai.schema import get_schema -from neo4j_genai.types import ( +from neo4j_graphrag.generation.prompts import Text2CypherTemplate +from neo4j_graphrag.llm import LLMInterface +from neo4j_graphrag.retrievers.base import Retriever +from neo4j_graphrag.schema import get_schema +from neo4j_graphrag.types import ( LLMModel, Neo4jDriverModel, Neo4jSchemaModel, @@ -52,7 +52,7 @@ class Text2CypherRetriever(Retriever): Args: driver (neo4j.driver): The Neo4j Python driver. - llm (neo4j_genai.generation.llm.LLMInterface): LLM object to generate the Cypher query. + llm (neo4j_graphrag.generation.llm.LLMInterface): LLM object to generate the Cypher query. neo4j_schema (Optional[str]): Neo4j schema used to generate the Cypher query. examples (Optional[list[str], optional): Optional user input/query pairs for the LLM to use as examples. custom_prompt (Optional[str]): Optional custom prompt to use instead of auto generated prompt. Will not include the neo4j_schema or examples args, if provided. diff --git a/src/neo4j_genai/retrievers/vector.py b/src/neo4j_graphrag/retrievers/vector.py similarity index 97% rename from src/neo4j_genai/retrievers/vector.py rename to src/neo4j_graphrag/retrievers/vector.py index 17bc3088..98690f97 100644 --- a/src/neo4j_genai/retrievers/vector.py +++ b/src/neo4j_graphrag/retrievers/vector.py @@ -20,15 +20,15 @@ import neo4j from pydantic import ValidationError -from neo4j_genai.embedder import Embedder -from neo4j_genai.exceptions import ( +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.exceptions import ( EmbeddingRequiredError, RetrieverInitializationError, SearchValidationError, ) -from neo4j_genai.neo4j_queries import get_search_query -from neo4j_genai.retrievers.base import Retriever -from neo4j_genai.types import ( +from neo4j_graphrag.neo4j_queries import get_search_query +from neo4j_graphrag.retrievers.base import Retriever +from neo4j_graphrag.types import ( EmbedderModel, Neo4jDriverModel, RawSearchResult, @@ -53,7 +53,7 @@ class VectorRetriever(Retriever): .. code-block:: python import neo4j - from neo4j_genai.retrievers import VectorRetriever + from neo4j_graphrag.retrievers import VectorRetriever driver = neo4j.GraphDatabase.driver(URI, auth=AUTH) @@ -219,7 +219,7 @@ class VectorCypherRetriever(Retriever): .. code-block:: python import neo4j - from neo4j_genai.retrievers import VectorCypherRetriever + from neo4j_graphrag.retrievers import VectorCypherRetriever driver = neo4j.GraphDatabase.driver(URI, auth=AUTH) diff --git a/src/neo4j_genai/schema.py b/src/neo4j_graphrag/schema.py similarity index 100% rename from src/neo4j_genai/schema.py rename to src/neo4j_graphrag/schema.py diff --git a/src/neo4j_genai/types.py b/src/neo4j_graphrag/types.py similarity index 99% rename from src/neo4j_genai/types.py rename to src/neo4j_graphrag/types.py index 1f4888bf..d2aa10a3 100644 --- a/src/neo4j_genai/types.py +++ b/src/neo4j_graphrag/types.py @@ -26,7 +26,7 @@ model_validator, ) -from neo4j_genai.utils import validate_search_query_input +from neo4j_graphrag.utils import validate_search_query_input class RawSearchResult(BaseModel): diff --git a/src/neo4j_genai/utils.py b/src/neo4j_graphrag/utils.py similarity index 100% rename from src/neo4j_genai/utils.py rename to src/neo4j_graphrag/utils.py diff --git a/tests/e2e/conftest.py b/tests/e2e/conftest.py index e1092313..212bcc2b 100644 --- a/tests/e2e/conftest.py +++ b/tests/e2e/conftest.py @@ -22,14 +22,14 @@ import pytest from neo4j import Driver, GraphDatabase -from neo4j_genai.embedder import Embedder -from neo4j_genai.indexes import ( +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.indexes import ( create_fulltext_index, create_vector_index, drop_index_if_exists, ) -from neo4j_genai.llm import LLMInterface -from neo4j_genai.retrievers import VectorRetriever +from neo4j_graphrag.llm import LLMInterface +from neo4j_graphrag.retrievers import VectorRetriever from ..e2e.utils import EMBEDDING_BIOLOGY diff --git a/tests/e2e/pinecone_e2e/test_pinecone_e2e.py b/tests/e2e/pinecone_e2e/test_pinecone_e2e.py index 52754e1f..9b2ac467 100644 --- a/tests/e2e/pinecone_e2e/test_pinecone_e2e.py +++ b/tests/e2e/pinecone_e2e/test_pinecone_e2e.py @@ -19,9 +19,9 @@ import pytest from langchain_huggingface.embeddings import HuggingFaceEmbeddings -from neo4j_genai.embedder import Embedder -from neo4j_genai.retrievers import PineconeNeo4jRetriever -from neo4j_genai.types import RetrieverResult, RetrieverResultItem +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.retrievers import PineconeNeo4jRetriever +from neo4j_graphrag.types import RetrieverResult, RetrieverResultItem from pinecone import Pinecone from ..utils import EMBEDDING_BIOLOGY, build_data_objects, populate_neo4j diff --git a/tests/e2e/test_graphrag_e2e.py b/tests/e2e/test_graphrag_e2e.py index 0c23eca0..56136d1b 100644 --- a/tests/e2e/test_graphrag_e2e.py +++ b/tests/e2e/test_graphrag_e2e.py @@ -17,12 +17,12 @@ import neo4j import pytest -from neo4j_genai.exceptions import LLMGenerationError -from neo4j_genai.generation.graphrag import GraphRAG -from neo4j_genai.generation.types import RagResultModel -from neo4j_genai.llm import LLMResponse -from neo4j_genai.retrievers import VectorCypherRetriever -from neo4j_genai.types import RetrieverResult +from neo4j_graphrag.exceptions import LLMGenerationError +from neo4j_graphrag.generation.graphrag import GraphRAG +from neo4j_graphrag.generation.types import RagResultModel +from neo4j_graphrag.llm import LLMResponse +from neo4j_graphrag.retrievers import VectorCypherRetriever +from neo4j_graphrag.types import RetrieverResult from tests.e2e.conftest import BiologyEmbedder from tests.e2e.utils import build_data_objects, populate_neo4j diff --git a/tests/e2e/test_hybrid_e2e.py b/tests/e2e/test_hybrid_e2e.py index 3b31b2c9..d5c9c638 100644 --- a/tests/e2e/test_hybrid_e2e.py +++ b/tests/e2e/test_hybrid_e2e.py @@ -15,12 +15,12 @@ import pytest from neo4j import Driver -from neo4j_genai.embedder import Embedder -from neo4j_genai.retrievers import ( +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.retrievers import ( HybridCypherRetriever, HybridRetriever, ) -from neo4j_genai.types import RetrieverResult, RetrieverResultItem +from neo4j_graphrag.types import RetrieverResult, RetrieverResultItem @pytest.mark.usefixtures("setup_neo4j_for_retrieval") diff --git a/tests/e2e/test_kg_builder_pipeline_e2e.py b/tests/e2e/test_kg_builder_pipeline_e2e.py index db27d825..5ad9dfd9 100644 --- a/tests/e2e/test_kg_builder_pipeline_e2e.py +++ b/tests/e2e/test_kg_builder_pipeline_e2e.py @@ -21,26 +21,26 @@ import neo4j import pytest from langchain_text_splitters import CharacterTextSplitter -from neo4j_genai.embedder import Embedder -from neo4j_genai.exceptions import LLMGenerationError -from neo4j_genai.experimental.components.embedder import TextChunkEmbedder -from neo4j_genai.experimental.components.entity_relation_extractor import ( +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.exceptions import LLMGenerationError +from neo4j_graphrag.experimental.components.embedder import TextChunkEmbedder +from neo4j_graphrag.experimental.components.entity_relation_extractor import ( LLMEntityRelationExtractor, OnError, ) -from neo4j_genai.experimental.components.kg_writer import Neo4jWriter -from neo4j_genai.experimental.components.schema import ( +from neo4j_graphrag.experimental.components.kg_writer import Neo4jWriter +from neo4j_graphrag.experimental.components.schema import ( SchemaBuilder, SchemaEntity, SchemaProperty, SchemaRelation, ) -from neo4j_genai.experimental.components.text_splitters.langchain import ( +from neo4j_graphrag.experimental.components.text_splitters.langchain import ( LangChainTextSplitterAdapter, ) -from neo4j_genai.experimental.pipeline import Pipeline -from neo4j_genai.experimental.pipeline.pipeline import PipelineResult -from neo4j_genai.llm import LLMInterface, LLMResponse +from neo4j_graphrag.experimental.pipeline import Pipeline +from neo4j_graphrag.experimental.pipeline.pipeline import PipelineResult +from neo4j_graphrag.llm import LLMInterface, LLMResponse BASE_DIR = os.path.dirname(os.path.abspath(__file__)) diff --git a/tests/e2e/test_kg_writer_component_e2e.py b/tests/e2e/test_kg_writer_component_e2e.py index 5c9cf42a..0bd64039 100644 --- a/tests/e2e/test_kg_writer_component_e2e.py +++ b/tests/e2e/test_kg_writer_component_e2e.py @@ -15,8 +15,8 @@ import neo4j import pytest -from neo4j_genai.experimental.components.kg_writer import Neo4jWriter -from neo4j_genai.experimental.components.types import ( +from neo4j_graphrag.experimental.components.kg_writer import Neo4jWriter +from neo4j_graphrag.experimental.components.types import ( Neo4jGraph, Neo4jNode, Neo4jRelationship, diff --git a/tests/e2e/test_schema_e2e.py b/tests/e2e/test_schema_e2e.py index 7024388a..68d90cea 100644 --- a/tests/e2e/test_schema_e2e.py +++ b/tests/e2e/test_schema_e2e.py @@ -16,7 +16,7 @@ import pytest from neo4j import Driver -from neo4j_genai.schema import ( +from neo4j_graphrag.schema import ( BASE_ENTITY_LABEL, NODE_PROPERTIES_QUERY, REL_PROPERTIES_QUERY, diff --git a/tests/e2e/test_schema_filters_e2e.py b/tests/e2e/test_schema_filters_e2e.py index d4a9138a..5e79cdca 100644 --- a/tests/e2e/test_schema_filters_e2e.py +++ b/tests/e2e/test_schema_filters_e2e.py @@ -15,7 +15,7 @@ import pytest from neo4j import Driver -from neo4j_genai.schema import ( +from neo4j_graphrag.schema import ( BASE_ENTITY_LABEL, EXCLUDED_LABELS, EXCLUDED_RELS, diff --git a/tests/e2e/test_text2cypher_e2e.py b/tests/e2e/test_text2cypher_e2e.py index 7582a5bc..67a2a22b 100644 --- a/tests/e2e/test_text2cypher_e2e.py +++ b/tests/e2e/test_text2cypher_e2e.py @@ -1,9 +1,9 @@ from unittest.mock import MagicMock import pytest -from neo4j_genai.llm import LLMResponse -from neo4j_genai.retrievers import Text2CypherRetriever -from neo4j_genai.types import RetrieverResult, RetrieverResultItem +from neo4j_graphrag.llm import LLMResponse +from neo4j_graphrag.retrievers import Text2CypherRetriever +from neo4j_graphrag.types import RetrieverResult, RetrieverResultItem @pytest.mark.usefixtures("setup_neo4j_for_schema_query") diff --git a/tests/e2e/test_vector_e2e.py b/tests/e2e/test_vector_e2e.py index 89cdea84..f88576af 100644 --- a/tests/e2e/test_vector_e2e.py +++ b/tests/e2e/test_vector_e2e.py @@ -15,9 +15,9 @@ import pytest from neo4j import Driver -from neo4j_genai.embedder import Embedder -from neo4j_genai.retrievers import VectorCypherRetriever, VectorRetriever -from neo4j_genai.types import RetrieverResult, RetrieverResultItem +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.retrievers import VectorCypherRetriever, VectorRetriever +from neo4j_graphrag.types import RetrieverResult, RetrieverResultItem @pytest.mark.usefixtures("setup_neo4j_for_retrieval") diff --git a/tests/e2e/utils.py b/tests/e2e/utils.py index 6597955e..934e72fc 100644 --- a/tests/e2e/utils.py +++ b/tests/e2e/utils.py @@ -21,7 +21,7 @@ import neo4j import weaviate.classes as wvc -from neo4j_genai.indexes import create_vector_index, drop_index_if_exists +from neo4j_graphrag.indexes import create_vector_index, drop_index_if_exists BASE_DIR = os.path.dirname(os.path.abspath(__file__)) diff --git a/tests/e2e/weaviate_e2e/test_weaviate_e2e.py b/tests/e2e/weaviate_e2e/test_weaviate_e2e.py index 318f6e70..f223926b 100644 --- a/tests/e2e/weaviate_e2e/test_weaviate_e2e.py +++ b/tests/e2e/weaviate_e2e/test_weaviate_e2e.py @@ -19,9 +19,9 @@ import pytest from langchain_huggingface.embeddings import HuggingFaceEmbeddings from neo4j import Driver -from neo4j_genai.embedder import Embedder -from neo4j_genai.retrievers import WeaviateNeo4jRetriever -from neo4j_genai.types import RetrieverResult, RetrieverResultItem +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.retrievers import WeaviateNeo4jRetriever +from neo4j_graphrag.types import RetrieverResult, RetrieverResultItem from weaviate.client import WeaviateClient from weaviate.connect.helpers import connect_to_local diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index 3d792e1e..557f7833 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -18,15 +18,15 @@ import neo4j import pytest -from neo4j_genai.embedder import Embedder -from neo4j_genai.llm import LLMInterface -from neo4j_genai.retrievers import ( +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.llm import LLMInterface +from neo4j_graphrag.retrievers import ( HybridRetriever, Text2CypherRetriever, VectorCypherRetriever, VectorRetriever, ) -from neo4j_genai.types import RetrieverResultItem +from neo4j_graphrag.types import RetrieverResultItem @pytest.fixture(scope="function") @@ -50,7 +50,7 @@ def retriever_mock() -> MagicMock: @pytest.fixture(scope="function") -@patch("neo4j_genai.retrievers.VectorRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.VectorRetriever._verify_version") def vector_retriever( _verify_version_mock: MagicMock, driver: MagicMock ) -> VectorRetriever: @@ -58,7 +58,7 @@ def vector_retriever( @pytest.fixture(scope="function") -@patch("neo4j_genai.retrievers.VectorCypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.VectorCypherRetriever._verify_version") def vector_cypher_retriever( _verify_version_mock: MagicMock, driver: MagicMock ) -> VectorCypherRetriever: @@ -69,7 +69,7 @@ def vector_cypher_retriever( @pytest.fixture(scope="function") -@patch("neo4j_genai.retrievers.HybridRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.HybridRetriever._verify_version") def hybrid_retriever( _verify_version_mock: MagicMock, driver: MagicMock ) -> HybridRetriever: @@ -77,7 +77,7 @@ def hybrid_retriever( @pytest.fixture(scope="function") -@patch("neo4j_genai.retrievers.Text2CypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.Text2CypherRetriever._verify_version") def t2c_retriever( _verify_version_mock: MagicMock, driver: MagicMock, llm: MagicMock ) -> Text2CypherRetriever: diff --git a/tests/unit/embeddings/test_sentence_transformers.py b/tests/unit/embeddings/test_sentence_transformers.py index c7f08fc1..d94271c9 100644 --- a/tests/unit/embeddings/test_sentence_transformers.py +++ b/tests/unit/embeddings/test_sentence_transformers.py @@ -2,8 +2,10 @@ import numpy as np import pytest -from neo4j_genai.embedder import Embedder -from neo4j_genai.embeddings.sentence_transformers import SentenceTransformerEmbeddings +from neo4j_graphrag.embedder import Embedder +from neo4j_graphrag.embeddings.sentence_transformers import ( + SentenceTransformerEmbeddings, +) @patch("sentence_transformers.SentenceTransformer") diff --git a/tests/unit/experimental/components/test_embedder.py b/tests/unit/experimental/components/test_embedder.py index cbeb5d5d..5c72e0d2 100644 --- a/tests/unit/experimental/components/test_embedder.py +++ b/tests/unit/experimental/components/test_embedder.py @@ -15,8 +15,8 @@ from unittest.mock import MagicMock import pytest -from neo4j_genai.experimental.components.embedder import TextChunkEmbedder -from neo4j_genai.experimental.components.types import TextChunk, TextChunks +from neo4j_graphrag.experimental.components.embedder import TextChunkEmbedder +from neo4j_graphrag.experimental.components.types import TextChunk, TextChunks @pytest.mark.asyncio diff --git a/tests/unit/experimental/components/test_entity_relation_extractor.py b/tests/unit/experimental/components/test_entity_relation_extractor.py index e919b647..552d792c 100644 --- a/tests/unit/experimental/components/test_entity_relation_extractor.py +++ b/tests/unit/experimental/components/test_entity_relation_extractor.py @@ -18,22 +18,22 @@ from unittest.mock import MagicMock import pytest -from neo4j_genai.exceptions import LLMGenerationError -from neo4j_genai.experimental.components.entity_relation_extractor import ( +from neo4j_graphrag.exceptions import LLMGenerationError +from neo4j_graphrag.experimental.components.entity_relation_extractor import ( LexicalGraphBuilder, LLMEntityRelationExtractor, OnError, balance_curly_braces, fix_invalid_json, ) -from neo4j_genai.experimental.components.pdf_loader import DocumentInfo -from neo4j_genai.experimental.components.types import ( +from neo4j_graphrag.experimental.components.pdf_loader import DocumentInfo +from neo4j_graphrag.experimental.components.types import ( Neo4jGraph, Neo4jNode, TextChunk, TextChunks, ) -from neo4j_genai.llm import LLMInterface, LLMResponse +from neo4j_graphrag.llm import LLMInterface, LLMResponse def test_create_chunk_node_no_metadata() -> None: diff --git a/tests/unit/experimental/components/test_kg_writer.py b/tests/unit/experimental/components/test_kg_writer.py index 23a0c6f8..d4587337 100644 --- a/tests/unit/experimental/components/test_kg_writer.py +++ b/tests/unit/experimental/components/test_kg_writer.py @@ -17,13 +17,13 @@ from unittest.mock import MagicMock import pytest -from neo4j_genai.experimental.components.kg_writer import Neo4jWriter -from neo4j_genai.experimental.components.types import ( +from neo4j_graphrag.experimental.components.kg_writer import Neo4jWriter +from neo4j_graphrag.experimental.components.types import ( Neo4jGraph, Neo4jNode, Neo4jRelationship, ) -from neo4j_genai.neo4j_queries import UPSERT_NODE_QUERY, UPSERT_RELATIONSHIP_QUERY +from neo4j_graphrag.neo4j_queries import UPSERT_NODE_QUERY, UPSERT_RELATIONSHIP_QUERY def test_upsert_node(driver: MagicMock) -> None: diff --git a/tests/unit/experimental/components/test_pdf_loader.py b/tests/unit/experimental/components/test_pdf_loader.py index 28db7eb5..949e2322 100644 --- a/tests/unit/experimental/components/test_pdf_loader.py +++ b/tests/unit/experimental/components/test_pdf_loader.py @@ -18,8 +18,8 @@ import pytest from fsspec.implementations.local import LocalFileSystem -from neo4j_genai.exceptions import PdfLoaderError -from neo4j_genai.experimental.components.pdf_loader import PdfLoader +from neo4j_graphrag.exceptions import PdfLoaderError +from neo4j_graphrag.experimental.components.pdf_loader import PdfLoader BASE_DIR = Path(__file__).parent diff --git a/tests/unit/experimental/components/test_schema.py b/tests/unit/experimental/components/test_schema.py index 6be43a19..5d0e3450 100644 --- a/tests/unit/experimental/components/test_schema.py +++ b/tests/unit/experimental/components/test_schema.py @@ -15,8 +15,8 @@ from __future__ import annotations import pytest -from neo4j_genai.exceptions import SchemaValidationError -from neo4j_genai.experimental.components.schema import ( +from neo4j_graphrag.exceptions import SchemaValidationError +from neo4j_graphrag.experimental.components.schema import ( SchemaBuilder, SchemaEntity, SchemaProperty, diff --git a/tests/unit/experimental/components/test_types.py b/tests/unit/experimental/components/test_types.py index c812f599..4e6d7766 100644 --- a/tests/unit/experimental/components/test_types.py +++ b/tests/unit/experimental/components/test_types.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import pytest -from neo4j_genai.experimental.components.types import Neo4jNode +from neo4j_graphrag.experimental.components.types import Neo4jNode def test_neo4j_node_invalid_property() -> None: diff --git a/tests/unit/experimental/components/text_splitters/test_langchain.py b/tests/unit/experimental/components/text_splitters/test_langchain.py index af95dc29..3fbde4df 100644 --- a/tests/unit/experimental/components/text_splitters/test_langchain.py +++ b/tests/unit/experimental/components/text_splitters/test_langchain.py @@ -14,10 +14,10 @@ # limitations under the License. import pytest from langchain_text_splitters import RecursiveCharacterTextSplitter -from neo4j_genai.experimental.components.text_splitters.langchain import ( +from neo4j_graphrag.experimental.components.text_splitters.langchain import ( LangChainTextSplitterAdapter, ) -from neo4j_genai.experimental.components.types import TextChunk, TextChunks +from neo4j_graphrag.experimental.components.types import TextChunk, TextChunks text = """ Lorem ipsum dolor sit amet, consectetur adipiscing elit. diff --git a/tests/unit/experimental/components/text_splitters/test_llamaindex.py b/tests/unit/experimental/components/text_splitters/test_llamaindex.py index a9e0832d..15908148 100644 --- a/tests/unit/experimental/components/text_splitters/test_llamaindex.py +++ b/tests/unit/experimental/components/text_splitters/test_llamaindex.py @@ -14,10 +14,10 @@ # limitations under the License. import pytest from llama_index.core.node_parser.text.sentence import SentenceSplitter -from neo4j_genai.experimental.components.text_splitters.llamaindex import ( +from neo4j_graphrag.experimental.components.text_splitters.llamaindex import ( LlamaIndexTextSplitterAdapter, ) -from neo4j_genai.experimental.components.types import TextChunk, TextChunks +from neo4j_graphrag.experimental.components.types import TextChunk, TextChunks text = """ Lorem ipsum dolor sit amet, consectetur adipiscing elit. diff --git a/tests/unit/experimental/pipeline/components.py b/tests/unit/experimental/pipeline/components.py index 93e74370..5c3a5427 100644 --- a/tests/unit/experimental/pipeline/components.py +++ b/tests/unit/experimental/pipeline/components.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from neo4j_genai.experimental.pipeline import Component, DataModel +from neo4j_graphrag.experimental.pipeline import Component, DataModel class StringResultModel(DataModel): diff --git a/tests/unit/experimental/pipeline/test_orchestrator.py b/tests/unit/experimental/pipeline/test_orchestrator.py index e76124e3..7d10041e 100644 --- a/tests/unit/experimental/pipeline/test_orchestrator.py +++ b/tests/unit/experimental/pipeline/test_orchestrator.py @@ -15,9 +15,13 @@ from unittest.mock import Mock, patch import pytest -from neo4j_genai.experimental.pipeline import Component -from neo4j_genai.experimental.pipeline.exceptions import PipelineDefinitionError -from neo4j_genai.experimental.pipeline.pipeline import Orchestrator, Pipeline, RunStatus +from neo4j_graphrag.experimental.pipeline import Component +from neo4j_graphrag.experimental.pipeline.exceptions import PipelineDefinitionError +from neo4j_graphrag.experimental.pipeline.pipeline import ( + Orchestrator, + Pipeline, + RunStatus, +) from tests.unit.experimental.pipeline.components import ( ComponentNoParam, @@ -52,7 +56,7 @@ async def test_orchestrator_get_component_inputs_from_user_only() -> None: @patch( - "neo4j_genai.experimental.pipeline.pipeline.Orchestrator.get_results_for_component" + "neo4j_graphrag.experimental.pipeline.pipeline.Orchestrator.get_results_for_component" ) @pytest.mark.asyncio async def test_pipeline_get_component_inputs_from_parent_specific( @@ -75,7 +79,7 @@ async def test_pipeline_get_component_inputs_from_parent_specific( @patch( - "neo4j_genai.experimental.pipeline.pipeline.Orchestrator.get_results_for_component" + "neo4j_graphrag.experimental.pipeline.pipeline.Orchestrator.get_results_for_component" ) @pytest.mark.asyncio async def test_orchestrator_get_component_inputs_from_parent_all( @@ -100,7 +104,7 @@ async def test_orchestrator_get_component_inputs_from_parent_all( @patch( - "neo4j_genai.experimental.pipeline.pipeline.Orchestrator.get_results_for_component" + "neo4j_graphrag.experimental.pipeline.pipeline.Orchestrator.get_results_for_component" ) @pytest.mark.asyncio async def test_orchestrator_get_component_inputs_from_parent_and_input( @@ -128,7 +132,7 @@ async def test_orchestrator_get_component_inputs_from_parent_and_input( @patch( - "neo4j_genai.experimental.pipeline.pipeline.Orchestrator.get_results_for_component" + "neo4j_graphrag.experimental.pipeline.pipeline.Orchestrator.get_results_for_component" ) @pytest.mark.asyncio async def test_orchestrator_get_component_inputs_ignore_user_input_if_input_def_provided( @@ -184,7 +188,7 @@ def pipeline_aggregation() -> Pipeline: @pytest.mark.asyncio @patch( - "neo4j_genai.experimental.pipeline.pipeline.Orchestrator.get_status_for_component" + "neo4j_graphrag.experimental.pipeline.pipeline.Orchestrator.get_status_for_component" ) async def test_orchestrator_branch( mock_status: Mock, pipeline_branch: Pipeline @@ -209,7 +213,7 @@ async def test_orchestrator_branch( @pytest.mark.asyncio @patch( - "neo4j_genai.experimental.pipeline.pipeline.Orchestrator.get_status_for_component" + "neo4j_graphrag.experimental.pipeline.pipeline.Orchestrator.get_status_for_component" ) async def test_orchestrator_aggregation( mock_status: Mock, pipeline_aggregation: Pipeline diff --git a/tests/unit/experimental/pipeline/test_pipeline.py b/tests/unit/experimental/pipeline/test_pipeline.py index af28024e..89602503 100644 --- a/tests/unit/experimental/pipeline/test_pipeline.py +++ b/tests/unit/experimental/pipeline/test_pipeline.py @@ -20,8 +20,8 @@ from unittest.mock import AsyncMock, call import pytest -from neo4j_genai.experimental.pipeline import Component, Pipeline -from neo4j_genai.experimental.pipeline.exceptions import PipelineDefinitionError +from neo4j_graphrag.experimental.pipeline import Component, Pipeline +from neo4j_graphrag.experimental.pipeline.exceptions import PipelineDefinitionError from .components import ( ComponentAdd, diff --git a/tests/unit/experimental/pipeline/test_pipeline_graph.py b/tests/unit/experimental/pipeline/test_pipeline_graph.py index a0fb52b9..162c788b 100644 --- a/tests/unit/experimental/pipeline/test_pipeline_graph.py +++ b/tests/unit/experimental/pipeline/test_pipeline_graph.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import pytest -from neo4j_genai.experimental.pipeline.pipeline_graph import ( +from neo4j_graphrag.experimental.pipeline.pipeline_graph import ( PipelineEdge, PipelineGraph, PipelineNode, diff --git a/tests/unit/experimental/pipeline/test_store.py b/tests/unit/experimental/pipeline/test_store.py index bcaee20b..a83e0946 100644 --- a/tests/unit/experimental/pipeline/test_store.py +++ b/tests/unit/experimental/pipeline/test_store.py @@ -1,5 +1,5 @@ import pytest -from neo4j_genai.experimental.pipeline.stores import InMemoryStore +from neo4j_graphrag.experimental.pipeline.stores import InMemoryStore @pytest.mark.asyncio diff --git a/tests/unit/retrievers/external/test_pinecone.py b/tests/unit/retrievers/external/test_pinecone.py index 5e1b65e9..dd6def4f 100644 --- a/tests/unit/retrievers/external/test_pinecone.py +++ b/tests/unit/retrievers/external/test_pinecone.py @@ -17,10 +17,10 @@ import neo4j import pytest -from neo4j_genai.exceptions import RetrieverInitializationError -from neo4j_genai.retrievers import PineconeNeo4jRetriever -from neo4j_genai.retrievers.external.utils import get_match_query -from neo4j_genai.types import RetrieverResult, RetrieverResultItem +from neo4j_graphrag.exceptions import RetrieverInitializationError +from neo4j_graphrag.retrievers import PineconeNeo4jRetriever +from neo4j_graphrag.retrievers.external.utils import get_match_query +from neo4j_graphrag.types import RetrieverResult, RetrieverResultItem from pinecone import Pinecone diff --git a/tests/unit/retrievers/external/test_weaviate.py b/tests/unit/retrievers/external/test_weaviate.py index b6bd3815..b7fd06a5 100644 --- a/tests/unit/retrievers/external/test_weaviate.py +++ b/tests/unit/retrievers/external/test_weaviate.py @@ -19,10 +19,10 @@ import neo4j import pytest -from neo4j_genai.exceptions import RetrieverInitializationError -from neo4j_genai.retrievers import WeaviateNeo4jRetriever -from neo4j_genai.retrievers.external.utils import get_match_query -from neo4j_genai.types import RetrieverResult, RetrieverResultItem +from neo4j_graphrag.exceptions import RetrieverInitializationError +from neo4j_graphrag.retrievers import WeaviateNeo4jRetriever +from neo4j_graphrag.retrievers.external.utils import get_match_query +from neo4j_graphrag.types import RetrieverResult, RetrieverResultItem from weaviate.client import WeaviateClient diff --git a/tests/unit/retrievers/test_base.py b/tests/unit/retrievers/test_base.py index e24e16ff..bcd9e020 100644 --- a/tests/unit/retrievers/test_base.py +++ b/tests/unit/retrievers/test_base.py @@ -19,9 +19,9 @@ from unittest.mock import MagicMock, patch import pytest -from neo4j_genai.exceptions import Neo4jVersionError -from neo4j_genai.retrievers.base import Retriever -from neo4j_genai.types import RawSearchResult, RetrieverResult +from neo4j_graphrag.exceptions import Neo4jVersionError +from neo4j_graphrag.retrievers.base import Retriever +from neo4j_graphrag.types import RawSearchResult, RetrieverResult @pytest.mark.parametrize( @@ -50,7 +50,7 @@ def get_search_results(self, *args: Any, **kwargs: Any) -> RawSearchResult: MockRetriever(driver=driver) -@patch("neo4j_genai.retrievers.base.Retriever._verify_version") +@patch("neo4j_graphrag.retrievers.base.Retriever._verify_version") def test_retriever_search_docstring_copied( _verify_version_mock: MagicMock, driver: MagicMock, @@ -73,7 +73,7 @@ def get_search_results(self, query: str, top_k: int = 10) -> RawSearchResult: assert top_k_param.annotation == "int" -@patch("neo4j_genai.retrievers.base.Retriever._verify_version") +@patch("neo4j_graphrag.retrievers.base.Retriever._verify_version") def test_retriever_search_docstring_unchanged( _verify_version_mock: MagicMock, driver: MagicMock, diff --git a/tests/unit/retrievers/test_hybrid.py b/tests/unit/retrievers/test_hybrid.py index 9737ffa1..c9f2f9b0 100644 --- a/tests/unit/retrievers/test_hybrid.py +++ b/tests/unit/retrievers/test_hybrid.py @@ -16,14 +16,19 @@ from unittest.mock import MagicMock, patch import pytest -from neo4j_genai.exceptions import EmbeddingRequiredError, RetrieverInitializationError -from neo4j_genai.neo4j_queries import get_search_query -from neo4j_genai.retrievers import HybridCypherRetriever, HybridRetriever -from neo4j_genai.types import RetrieverResult, RetrieverResultItem, SearchType +from neo4j_graphrag.exceptions import ( + EmbeddingRequiredError, + RetrieverInitializationError, +) +from neo4j_graphrag.neo4j_queries import get_search_query +from neo4j_graphrag.retrievers import HybridCypherRetriever, HybridRetriever +from neo4j_graphrag.types import RetrieverResult, RetrieverResultItem, SearchType def test_vector_retriever_initialization(driver: MagicMock) -> None: - with patch("neo4j_genai.retrievers.base.Retriever._verify_version") as mock_verify: + with patch( + "neo4j_graphrag.retrievers.base.Retriever._verify_version" + ) as mock_verify: HybridRetriever( driver=driver, vector_index_name="vector-index", @@ -33,7 +38,9 @@ def test_vector_retriever_initialization(driver: MagicMock) -> None: def test_vector_cypher_retriever_initialization(driver: MagicMock) -> None: - with patch("neo4j_genai.retrievers.base.Retriever._verify_version") as mock_verify: + with patch( + "neo4j_graphrag.retrievers.base.Retriever._verify_version" + ) as mock_verify: HybridCypherRetriever( driver=driver, vector_index_name="vector-index", @@ -43,7 +50,7 @@ def test_vector_cypher_retriever_initialization(driver: MagicMock) -> None: mock_verify.assert_called_once() -@patch("neo4j_genai.retrievers.HybridRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.HybridRetriever._verify_version") def test_hybrid_retriever_invalid_fulltext_index_name( _verify_version_mock: MagicMock, driver: MagicMock ) -> None: @@ -58,7 +65,7 @@ def test_hybrid_retriever_invalid_fulltext_index_name( assert "Input should be a valid string" in str(exc_info.value) -@patch("neo4j_genai.retrievers.HybridRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.HybridRetriever._verify_version") def test_hybrid_retriever_with_result_format_function( _verify_version_mock: MagicMock, driver: MagicMock, @@ -98,7 +105,7 @@ def test_hybrid_retriever_with_result_format_function( ) -@patch("neo4j_genai.retrievers.HybridRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.HybridRetriever._verify_version") def test_hybrid_retriever_invalid_database_name( _verify_version_mock: MagicMock, driver: MagicMock ) -> None: @@ -114,7 +121,7 @@ def test_hybrid_retriever_invalid_database_name( assert "Input should be a valid string" in str(exc_info.value) -@patch("neo4j_genai.retrievers.HybridCypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.HybridCypherRetriever._verify_version") def test_hybrid_cypher_retriever_invalid_retrieval_query( _verify_version_mock: MagicMock, driver: MagicMock ) -> None: @@ -130,7 +137,7 @@ def test_hybrid_cypher_retriever_invalid_retrieval_query( assert "Input should be a valid string" in str(exc_info.value) -@patch("neo4j_genai.retrievers.HybridCypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.HybridCypherRetriever._verify_version") def test_hybrid_cypher_retriever_invalid_database_name( _verify_version_mock: MagicMock, driver: MagicMock ) -> None: @@ -150,7 +157,7 @@ def test_hybrid_cypher_retriever_invalid_database_name( assert "Input should be a valid string" in str(exc_info.value) -@patch("neo4j_genai.retrievers.HybridRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.HybridRetriever._verify_version") def test_hybrid_search_text_happy_path( _verify_version_mock: MagicMock, driver: MagicMock, @@ -196,7 +203,7 @@ def test_hybrid_search_text_happy_path( ) -@patch("neo4j_genai.retrievers.HybridRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.HybridRetriever._verify_version") def test_hybrid_search_favors_query_vector_over_embedding_vector( _verify_version_mock: MagicMock, driver: MagicMock, @@ -272,7 +279,7 @@ def test_hybrid_search_retriever_search_missing_embedder_for_text( ) -@patch("neo4j_genai.retrievers.HybridRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.HybridRetriever._verify_version") def test_hybrid_retriever_return_properties( _verify_version_mock: MagicMock, driver: MagicMock, @@ -322,7 +329,7 @@ def test_hybrid_retriever_return_properties( ) -@patch("neo4j_genai.retrievers.HybridCypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.HybridCypherRetriever._verify_version") def test_hybrid_cypher_retrieval_query_with_params( _verify_version_mock: MagicMock, driver: MagicMock, @@ -389,7 +396,7 @@ def test_hybrid_cypher_retrieval_query_with_params( ) -@patch("neo4j_genai.retrievers.HybridCypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.HybridCypherRetriever._verify_version") def test_hybrid_cypher_retriever_with_result_format_function( _verify_version_mock: MagicMock, driver: MagicMock, diff --git a/tests/unit/retrievers/test_text2cypher.py b/tests/unit/retrievers/test_text2cypher.py index 4bd7cf02..feeb2f81 100644 --- a/tests/unit/retrievers/test_text2cypher.py +++ b/tests/unit/retrievers/test_text2cypher.py @@ -17,25 +17,27 @@ import pytest from neo4j.exceptions import CypherSyntaxError, Neo4jError -from neo4j_genai.exceptions import ( +from neo4j_graphrag.exceptions import ( RetrieverInitializationError, SearchValidationError, Text2CypherRetrievalError, ) -from neo4j_genai.generation.prompts import Text2CypherTemplate -from neo4j_genai.llm import LLMResponse -from neo4j_genai.retrievers import Text2CypherRetriever -from neo4j_genai.types import RetrieverResult, RetrieverResultItem +from neo4j_graphrag.generation.prompts import Text2CypherTemplate +from neo4j_graphrag.llm import LLMResponse +from neo4j_graphrag.retrievers import Text2CypherRetriever +from neo4j_graphrag.types import RetrieverResult, RetrieverResultItem def test_t2c_retriever_initialization(driver: MagicMock, llm: MagicMock) -> None: - with patch("neo4j_genai.retrievers.base.Retriever._verify_version") as mock_verify: + with patch( + "neo4j_graphrag.retrievers.base.Retriever._verify_version" + ) as mock_verify: Text2CypherRetriever(driver, llm, neo4j_schema="dummy-text") mock_verify.assert_called_once() -@patch("neo4j_genai.retrievers.base.Retriever._verify_version") -@patch("neo4j_genai.retrievers.text2cypher.get_schema") +@patch("neo4j_graphrag.retrievers.base.Retriever._verify_version") +@patch("neo4j_graphrag.retrievers.text2cypher.get_schema") def test_t2c_retriever_schema_retrieval( _verify_version_mock: MagicMock, get_schema_mock: MagicMock, @@ -46,8 +48,8 @@ def test_t2c_retriever_schema_retrieval( get_schema_mock.assert_called_once() -@patch("neo4j_genai.retrievers.base.Retriever._verify_version") -@patch("neo4j_genai.retrievers.text2cypher.get_schema") +@patch("neo4j_graphrag.retrievers.base.Retriever._verify_version") +@patch("neo4j_graphrag.retrievers.text2cypher.get_schema") def test_t2c_retriever_schema_retrieval_failure( _verify_version_mock: MagicMock, get_schema_mock: MagicMock, @@ -59,7 +61,7 @@ def test_t2c_retriever_schema_retrieval_failure( Text2CypherRetriever(driver, llm) -@patch("neo4j_genai.retrievers.Text2CypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.Text2CypherRetriever._verify_version") def test_t2c_retriever_invalid_neo4j_schema( _verify_version_mock: MagicMock, driver: MagicMock, llm: MagicMock ) -> None: @@ -74,7 +76,7 @@ def test_t2c_retriever_invalid_neo4j_schema( assert "Input should be a valid string" in str(exc_info.value) -@patch("neo4j_genai.retrievers.Text2CypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.Text2CypherRetriever._verify_version") def test_t2c_retriever_invalid_search_query( _verify_version_mock: MagicMock, driver: MagicMock, llm: MagicMock ) -> None: @@ -88,7 +90,7 @@ def test_t2c_retriever_invalid_search_query( assert "Input should be a valid string" in str(exc_info.value) -@patch("neo4j_genai.retrievers.Text2CypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.Text2CypherRetriever._verify_version") def test_t2c_retriever_invalid_search_examples( _verify_version_mock: MagicMock, driver: MagicMock, llm: MagicMock ) -> None: @@ -104,7 +106,7 @@ def test_t2c_retriever_invalid_search_examples( assert "Initialization failed" in str(exc_info.value) -@patch("neo4j_genai.retrievers.Text2CypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.Text2CypherRetriever._verify_version") def test_t2c_retriever_happy_path( _verify_version_mock: MagicMock, driver: MagicMock, @@ -135,7 +137,7 @@ def test_t2c_retriever_happy_path( driver.execute_query.assert_called_once_with(query_=t2c_query) -@patch("neo4j_genai.retrievers.Text2CypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.Text2CypherRetriever._verify_version") def test_t2c_retriever_cypher_error( _verify_version_mock: MagicMock, driver: MagicMock, llm: MagicMock ) -> None: @@ -153,7 +155,7 @@ def test_t2c_retriever_cypher_error( assert "Failed to get search result" in str(e) -@patch("neo4j_genai.retrievers.Text2CypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.Text2CypherRetriever._verify_version") def test_t2c_retriever_with_result_format_function( _verify_version_mock: MagicMock, driver: MagicMock, @@ -186,7 +188,7 @@ def test_t2c_retriever_with_result_format_function( @pytest.mark.usefixtures("caplog") -@patch("neo4j_genai.retrievers.base.Retriever._verify_version") +@patch("neo4j_graphrag.retrievers.base.Retriever._verify_version") def test_t2c_retriever_initialization_with_custom_prompt( _verify_version_mock: MagicMock, driver: MagicMock, @@ -208,7 +210,7 @@ def test_t2c_retriever_initialization_with_custom_prompt( @pytest.mark.usefixtures("caplog") -@patch("neo4j_genai.retrievers.base.Retriever._verify_version") +@patch("neo4j_graphrag.retrievers.base.Retriever._verify_version") def test_t2c_retriever_initialization_with_custom_prompt_and_schema_and_examples( _verify_version_mock: MagicMock, driver: MagicMock, @@ -238,7 +240,7 @@ def test_t2c_retriever_initialization_with_custom_prompt_and_schema_and_examples assert f"Text2CypherRetriever prompt: {prompt}" in caplog.text -@patch("neo4j_genai.retrievers.Text2CypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.Text2CypherRetriever._verify_version") def test_t2c_retriever_invalid_custom_prompt_type( _verify_version_mock: MagicMock, driver: MagicMock, llm: MagicMock ) -> None: diff --git a/tests/unit/retrievers/test_vector.py b/tests/unit/retrievers/test_vector.py index 60bdc4a3..2d074d34 100644 --- a/tests/unit/retrievers/test_vector.py +++ b/tests/unit/retrievers/test_vector.py @@ -19,14 +19,14 @@ import neo4j import pytest from neo4j.exceptions import CypherSyntaxError -from neo4j_genai.exceptions import ( +from neo4j_graphrag.exceptions import ( EmbeddingRequiredError, RetrieverInitializationError, SearchValidationError, ) -from neo4j_genai.neo4j_queries import get_search_query -from neo4j_genai.retrievers import VectorCypherRetriever, VectorRetriever -from neo4j_genai.types import ( +from neo4j_graphrag.neo4j_queries import get_search_query +from neo4j_graphrag.retrievers import VectorCypherRetriever, VectorRetriever +from neo4j_graphrag.types import ( RetrieverResult, RetrieverResultItem, SearchType, @@ -34,12 +34,14 @@ def test_vector_retriever_initialization(driver: MagicMock) -> None: - with patch("neo4j_genai.retrievers.base.Retriever._verify_version") as mock_verify: + with patch( + "neo4j_graphrag.retrievers.base.Retriever._verify_version" + ) as mock_verify: VectorRetriever(driver=driver, index_name="my-index") mock_verify.assert_called_once() -@patch("neo4j_genai.retrievers.VectorRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.VectorRetriever._verify_version") def test_vector_retriever_invalid_index_name( _verify_version_mock: MagicMock, driver: MagicMock ) -> None: @@ -50,7 +52,7 @@ def test_vector_retriever_invalid_index_name( assert "Input should be a valid string" in str(exc_info.value) -@patch("neo4j_genai.retrievers.VectorRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.VectorRetriever._verify_version") def test_vector_retriever_invalid_database_name( _verify_version_mock: MagicMock, driver: MagicMock ) -> None: @@ -65,7 +67,7 @@ def test_vector_retriever_invalid_database_name( assert "Input should be a valid string" in str(exc_info.value) -@patch("neo4j_genai.retrievers.VectorCypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.VectorCypherRetriever._verify_version") def test_vector_cypher_retriever_invalid_retrieval_query( _verify_version_mock: MagicMock, driver: MagicMock ) -> None: @@ -76,7 +78,7 @@ def test_vector_cypher_retriever_invalid_retrieval_query( assert "Input should be a valid string" in str(exc_info.value) -@patch("neo4j_genai.retrievers.VectorCypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.VectorCypherRetriever._verify_version") def test_vector_cypher_retriever_invalid_database_name( _verify_version_mock: MagicMock, driver: MagicMock ) -> None: @@ -96,13 +98,15 @@ def test_vector_cypher_retriever_invalid_database_name( def test_vector_cypher_retriever_initialization(driver: MagicMock) -> None: - with patch("neo4j_genai.retrievers.base.Retriever._verify_version") as mock_verify: + with patch( + "neo4j_graphrag.retrievers.base.Retriever._verify_version" + ) as mock_verify: VectorCypherRetriever(driver=driver, index_name="my-index", retrieval_query="") mock_verify.assert_called_once() -@patch("neo4j_genai.retrievers.VectorRetriever._fetch_index_infos") -@patch("neo4j_genai.retrievers.VectorRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.VectorRetriever._fetch_index_infos") +@patch("neo4j_graphrag.retrievers.VectorRetriever._verify_version") def test_similarity_search_vector_happy_path( _verify_version_mock: MagicMock, _fetch_index_infos: MagicMock, @@ -145,8 +149,8 @@ def test_similarity_search_vector_happy_path( ) -@patch("neo4j_genai.retrievers.VectorRetriever._fetch_index_infos") -@patch("neo4j_genai.retrievers.VectorRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.VectorRetriever._fetch_index_infos") +@patch("neo4j_graphrag.retrievers.VectorRetriever._verify_version") def test_similarity_search_text_happy_path( _verify_version_mock: MagicMock, _fetch_index_infos: MagicMock, @@ -190,8 +194,8 @@ def test_similarity_search_text_happy_path( ) -@patch("neo4j_genai.retrievers.VectorRetriever._fetch_index_infos") -@patch("neo4j_genai.retrievers.VectorRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.VectorRetriever._fetch_index_infos") +@patch("neo4j_graphrag.retrievers.VectorRetriever._verify_version") def test_similarity_search_text_return_properties( _verify_version_mock: MagicMock, _fetch_index_infos: MagicMock, @@ -272,8 +276,8 @@ def test_vector_retriever_search_both_text_and_vector( ) -@patch("neo4j_genai.retrievers.VectorRetriever._fetch_index_infos") -@patch("neo4j_genai.retrievers.VectorRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.VectorRetriever._fetch_index_infos") +@patch("neo4j_graphrag.retrievers.VectorRetriever._verify_version") def test_vector_retriever_with_result_format_function( _verify_version_mock: MagicMock, _fetch_index_infos: MagicMock, @@ -345,8 +349,8 @@ def test_vector_cypher_retriever_search_both_text_and_vector( ) -@patch("neo4j_genai.retrievers.VectorCypherRetriever._fetch_index_infos") -@patch("neo4j_genai.retrievers.VectorCypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.VectorCypherRetriever._fetch_index_infos") +@patch("neo4j_graphrag.retrievers.VectorCypherRetriever._verify_version") def test_retrieval_query_happy_path( _verify_version_mock: MagicMock, _fetch_index_infos: MagicMock, @@ -405,8 +409,8 @@ def test_retrieval_query_happy_path( ) -@patch("neo4j_genai.retrievers.VectorCypherRetriever._fetch_index_infos") -@patch("neo4j_genai.retrievers.VectorCypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.VectorCypherRetriever._fetch_index_infos") +@patch("neo4j_graphrag.retrievers.VectorCypherRetriever._verify_version") def test_retrieval_query_with_result_format_function( _verify_version_mock: MagicMock, _fetch_index_infos: MagicMock, @@ -465,8 +469,8 @@ def test_retrieval_query_with_result_format_function( ) -@patch("neo4j_genai.retrievers.VectorCypherRetriever._fetch_index_infos") -@patch("neo4j_genai.retrievers.VectorCypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.VectorCypherRetriever._fetch_index_infos") +@patch("neo4j_graphrag.retrievers.VectorCypherRetriever._verify_version") def test_retrieval_query_with_params( _verify_version_mock: MagicMock, _fetch_index_infos: MagicMock, @@ -529,8 +533,8 @@ def test_retrieval_query_with_params( ) -@patch("neo4j_genai.retrievers.VectorCypherRetriever._fetch_index_infos") -@patch("neo4j_genai.retrievers.VectorCypherRetriever._verify_version") +@patch("neo4j_graphrag.retrievers.VectorCypherRetriever._fetch_index_infos") +@patch("neo4j_graphrag.retrievers.VectorCypherRetriever._verify_version") def test_retrieval_query_cypher_error( _verify_version_mock: MagicMock, _fetch_index_infos: MagicMock, diff --git a/tests/unit/test_filters.py b/tests/unit/test_filters.py index 6f80cfb5..14065cce 100644 --- a/tests/unit/test_filters.py +++ b/tests/unit/test_filters.py @@ -18,8 +18,8 @@ from unittest.mock import MagicMock, call, patch import pytest -from neo4j_genai.exceptions import FilterValidationError -from neo4j_genai.filters import ( +from neo4j_graphrag.exceptions import FilterValidationError +from neo4j_graphrag.filters import ( EqOperator, GteOperator, GtOperator, @@ -269,7 +269,7 @@ def test_handle_field_filter_operator_between_not_enough_parameters( assert "Expected lower and upper bounds in a list, got [0]" in str(excinfo) -@patch("neo4j_genai.filters._single_condition_cypher", return_value="condition") +@patch("neo4j_graphrag.filters._single_condition_cypher", return_value="condition") def test_handle_field_filter_implicit_eq( _single_condition_cypher_mocked: MagicMock, param_store_empty: ParameterStore ) -> None: @@ -282,7 +282,7 @@ def test_handle_field_filter_implicit_eq( assert generated == "condition" -@patch("neo4j_genai.filters._single_condition_cypher") +@patch("neo4j_graphrag.filters._single_condition_cypher") def test_handle_field_filter_eq( _single_condition_cypher_mocked: MagicMock, param_store_empty: ParameterStore ) -> None: @@ -294,7 +294,7 @@ def test_handle_field_filter_eq( ) -@patch("neo4j_genai.filters._single_condition_cypher") +@patch("neo4j_graphrag.filters._single_condition_cypher") def test_handle_field_filter_neq( _single_condition_cypher_mocked: MagicMock, param_store_empty: ParameterStore ) -> None: @@ -306,7 +306,7 @@ def test_handle_field_filter_neq( ) -@patch("neo4j_genai.filters._single_condition_cypher") +@patch("neo4j_graphrag.filters._single_condition_cypher") def test_handle_field_filter_lt( _single_condition_cypher_mocked: MagicMock, param_store_empty: ParameterStore ) -> None: @@ -316,7 +316,7 @@ def test_handle_field_filter_lt( ) -@patch("neo4j_genai.filters._single_condition_cypher") +@patch("neo4j_graphrag.filters._single_condition_cypher") def test_handle_field_filter_gt( _single_condition_cypher_mocked: MagicMock, param_store_empty: ParameterStore ) -> None: @@ -326,7 +326,7 @@ def test_handle_field_filter_gt( ) -@patch("neo4j_genai.filters._single_condition_cypher") +@patch("neo4j_graphrag.filters._single_condition_cypher") def test_handle_field_filter_lte( _single_condition_cypher_mocked: MagicMock, param_store_empty: ParameterStore ) -> None: @@ -336,7 +336,7 @@ def test_handle_field_filter_lte( ) -@patch("neo4j_genai.filters._single_condition_cypher") +@patch("neo4j_graphrag.filters._single_condition_cypher") def test_handle_field_filter_gte( _single_condition_cypher_mocked: MagicMock, param_store_empty: ParameterStore ) -> None: @@ -346,7 +346,7 @@ def test_handle_field_filter_gte( ) -@patch("neo4j_genai.filters._single_condition_cypher") +@patch("neo4j_graphrag.filters._single_condition_cypher") def test_handle_field_filter_in( _single_condition_cypher_mocked: MagicMock, param_store_empty: ParameterStore ) -> None: @@ -356,7 +356,7 @@ def test_handle_field_filter_in( ) -@patch("neo4j_genai.filters._single_condition_cypher") +@patch("neo4j_graphrag.filters._single_condition_cypher") def test_handle_field_filter_nin( _single_condition_cypher_mocked: MagicMock, param_store_empty: ParameterStore ) -> None: @@ -366,7 +366,7 @@ def test_handle_field_filter_nin( ) -@patch("neo4j_genai.filters._single_condition_cypher") +@patch("neo4j_graphrag.filters._single_condition_cypher") def test_handle_field_filter_like( _single_condition_cypher_mocked: MagicMock, param_store_empty: ParameterStore ) -> None: @@ -378,7 +378,7 @@ def test_handle_field_filter_like( ) -@patch("neo4j_genai.filters._single_condition_cypher") +@patch("neo4j_graphrag.filters._single_condition_cypher") def test_handle_field_filter_ilike( _single_condition_cypher_mocked: MagicMock, param_store_empty: ParameterStore ) -> None: @@ -390,7 +390,7 @@ def test_handle_field_filter_ilike( ) -@patch("neo4j_genai.filters._handle_field_filter") +@patch("neo4j_graphrag.filters._handle_field_filter") def test_construct_metadata_filter_filter_is_not_a_dict( _handle_field_filter_mock: MagicMock, param_store_empty: ParameterStore ) -> None: @@ -399,7 +399,7 @@ def test_construct_metadata_filter_filter_is_not_a_dict( assert "Filter must be a dictionary, got " in str(excinfo) -@patch("neo4j_genai.filters._handle_field_filter") +@patch("neo4j_graphrag.filters._handle_field_filter") def test_construct_metadata_filter_no_operator( _handle_field_filter_mock: MagicMock, param_store_empty: ParameterStore ) -> None: @@ -409,7 +409,7 @@ def test_construct_metadata_filter_no_operator( ) -@patch("neo4j_genai.filters._construct_metadata_filter") +@patch("neo4j_graphrag.filters._construct_metadata_filter") def test_construct_metadata_filter_implicit_and( _construct_metadata_filter_mock: MagicMock, param_store_empty: ParameterStore ) -> None: @@ -428,7 +428,8 @@ def test_construct_metadata_filter_implicit_and( @patch( - "neo4j_genai.filters._construct_metadata_filter", side_effect=["filter1", "filter2"] + "neo4j_graphrag.filters._construct_metadata_filter", + side_effect=["filter1", "filter2"], ) def test_construct_metadata_filter_explicit_and( _construct_metadata_filter_mock: MagicMock, param_store_empty: ParameterStore @@ -448,7 +449,8 @@ def test_construct_metadata_filter_explicit_and( @patch( - "neo4j_genai.filters._construct_metadata_filter", side_effect=["filter1", "filter2"] + "neo4j_graphrag.filters._construct_metadata_filter", + side_effect=["filter1", "filter2"], ) def test_construct_metadata_filter_or( _construct_metadata_filter_mock: MagicMock, param_store_empty: ParameterStore diff --git a/tests/unit/test_graphrag.py b/tests/unit/test_graphrag.py index 3c1e9622..9bb8b65b 100644 --- a/tests/unit/test_graphrag.py +++ b/tests/unit/test_graphrag.py @@ -16,12 +16,12 @@ from warnings import catch_warnings import pytest -from neo4j_genai.exceptions import RagInitializationError, SearchValidationError -from neo4j_genai.generation.graphrag import GraphRAG -from neo4j_genai.generation.prompts import RagTemplate -from neo4j_genai.generation.types import RagResultModel -from neo4j_genai.llm import LLMResponse -from neo4j_genai.types import RetrieverResult, RetrieverResultItem +from neo4j_graphrag.exceptions import RagInitializationError, SearchValidationError +from neo4j_graphrag.generation.graphrag import GraphRAG +from neo4j_graphrag.generation.prompts import RagTemplate +from neo4j_graphrag.generation.types import RagResultModel +from neo4j_graphrag.llm import LLMResponse +from neo4j_graphrag.types import RetrieverResult, RetrieverResultItem from pydantic import ValidationError diff --git a/tests/unit/test_indexes.py b/tests/unit/test_indexes.py index d0c6dbc0..a9f4cd1c 100644 --- a/tests/unit/test_indexes.py +++ b/tests/unit/test_indexes.py @@ -18,8 +18,8 @@ import neo4j.exceptions import pytest -from neo4j_genai.exceptions import Neo4jIndexError, Neo4jInsertionError -from neo4j_genai.indexes import ( +from neo4j_graphrag.exceptions import Neo4jIndexError, Neo4jInsertionError +from neo4j_graphrag.indexes import ( create_fulltext_index, create_vector_index, drop_index_if_exists, diff --git a/tests/unit/test_neo4j_queries.py b/tests/unit/test_neo4j_queries.py index e40eea9a..4e790337 100644 --- a/tests/unit/test_neo4j_queries.py +++ b/tests/unit/test_neo4j_queries.py @@ -15,8 +15,8 @@ from typing import Any from unittest.mock import patch -from neo4j_genai.neo4j_queries import get_query_tail, get_search_query -from neo4j_genai.types import SearchType +from neo4j_graphrag.neo4j_queries import get_query_tail, get_search_query +from neo4j_graphrag.types import SearchType def test_vector_search_basic() -> None: @@ -72,7 +72,7 @@ def test_vector_search_with_retrieval_query() -> None: assert result.strip() == expected.strip() -@patch("neo4j_genai.neo4j_queries.get_metadata_filter", return_value=["True", {}]) +@patch("neo4j_graphrag.neo4j_queries.get_metadata_filter", return_value=["True", {}]) def test_vector_search_with_filters(_mock: Any) -> None: expected = ( "MATCH (node:`Label`) " @@ -96,7 +96,7 @@ def test_vector_search_with_filters(_mock: Any) -> None: @patch( - "neo4j_genai.neo4j_queries.get_metadata_filter", + "neo4j_graphrag.neo4j_queries.get_metadata_filter", return_value=["True", {"param": "value"}], ) def test_vector_search_with_params_from_filters(_mock: Any) -> None: diff --git a/tests/unit/test_prompt_template.py b/tests/unit/test_prompt_template.py index 265d6717..f74ff75d 100644 --- a/tests/unit/test_prompt_template.py +++ b/tests/unit/test_prompt_template.py @@ -1,6 +1,6 @@ import pytest -from neo4j_genai.exceptions import PromptMissingInputError -from neo4j_genai.generation.prompts import PromptTemplate +from neo4j_graphrag.exceptions import PromptMissingInputError +from neo4j_graphrag.generation.prompts import PromptTemplate def test_prompt_template_all_default() -> None: diff --git a/tests/unit/test_schema.py b/tests/unit/test_schema.py index 0b275906..793c974a 100644 --- a/tests/unit/test_schema.py +++ b/tests/unit/test_schema.py @@ -18,7 +18,7 @@ from unittest.mock import MagicMock, patch from neo4j import Driver -from neo4j_genai.schema import ( +from neo4j_graphrag.schema import ( BASE_ENTITY_LABEL, EXCLUDED_LABELS, EXCLUDED_RELS, @@ -64,7 +64,7 @@ def _query_return_value(*args: Any, **kwargs: Any) -> list[Any]: raise AssertionError("Unexpected query") -@patch("neo4j_genai.schema.query_database", side_effect=_query_return_value) +@patch("neo4j_graphrag.schema.query_database", side_effect=_query_return_value) def test_get_schema_ensure_formatted_response(driver: Driver) -> None: result = get_schema(driver) assert ( @@ -98,7 +98,7 @@ def test_get_structured_schema_happy_path(driver: MagicMock) -> None: driver.execute_query.assert_any_call(INDEX_QUERY, {}) -@patch("neo4j_genai.schema.query_database", side_effect=_query_return_value) +@patch("neo4j_graphrag.schema.query_database", side_effect=_query_return_value) def test_get_schema_ensure_structured_response(driver: MagicMock) -> None: result = get_structured_schema(driver)