Skip to content

Commit

Permalink
Fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
stellasia committed Dec 30, 2024
1 parent 0b06bdb commit 5691312
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions docs/source/user_guide_kg_builder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ Example usage:
from neo4j_graphrag.experimental.pipeline.components.lexical_graph_builder import LexicalGraphBuilder
from neo4j_graphrag.experimental.pipeline.components.types import LexicalGraphConfig
lexical_graph_builder = LexicalGraphBuilder(config=LexicalGraphConfig(id_prefix="example"))
lexical_graph_builder = LexicalGraphBuilder(config=LexicalGraphConfig())
graph = await lexical_graph_builder.run(
text_chunks=TextChunks(chunks=[
TextChunk(text="some text", index=0),
Expand Down Expand Up @@ -713,7 +713,6 @@ Optionally, the document and chunk node labels can be configured using a `Lexica
# optionally, define a LexicalGraphConfig object
# shown below with the default values
config = LexicalGraphConfig(
id_prefix="", # used to prefix the chunk and document IDs
chunk_node_label="Chunk",
document_node_label="Document",
chunk_to_document_relationship_type="PART_OF_DOCUMENT",
Expand Down
2 changes: 1 addition & 1 deletion src/neo4j_graphrag/experimental/components/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class ResolutionStats(DataModel):
class LexicalGraphConfig(BaseModel):
"""Configure all labels and property names in the lexical graph."""

id_prefix: str = Field(deprecated=True)
id_prefix: str = Field(deprecated=True, default="")
document_node_label: str = DEFAULT_DOCUMENT_NODE_LABEL
chunk_node_label: str = DEFAULT_CHUNK_NODE_LABEL
chunk_to_document_relationship_type: str = (
Expand Down

0 comments on commit 5691312

Please sign in to comment.