You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add custom prompt option to text2cypher, tested (#84)
* Update CHANGELOG.md
* Update CHANGELOG.md
* add custom prompt option to text2cypher, tested
* add test for RetrieverInitializationError
* Update tests/unit/retrievers/test_text2cypher.py
Co-authored-by: Alex Thomas <alexthomas93@users.noreply.github.com>
* Update tests/unit/retrievers/test_text2cypher.py
Co-authored-by: Alex Thomas <alexthomas93@users.noreply.github.com>
* Update tests/unit/retrievers/test_text2cypher.py
Co-authored-by: Alex Thomas <alexthomas93@users.noreply.github.com>
* Update tests/unit/retrievers/test_text2cypher.py
Co-authored-by: Alex Thomas <alexthomas93@users.noreply.github.com>
* Update tests/unit/retrievers/test_text2cypher.py
Co-authored-by: Alex Thomas <alexthomas93@users.noreply.github.com>
* Pre-commit fix
---------
Co-authored-by: Alex Thomas <alexthomas93@users.noreply.github.com>
Copy file name to clipboardExpand all lines: src/neo4j_genai/retrievers/text2cypher.py
+23-11
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,7 @@ class Text2CypherRetriever(Retriever):
55
55
llm (neo4j_genai.generation.llm.LLMInterface): LLM object to generate the Cypher query.
56
56
neo4j_schema (Optional[str]): Neo4j schema used to generate the Cypher query.
57
57
examples (Optional[list[str], optional): Optional user input/query pairs for the LLM to use as examples.
58
+
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.
58
59
59
60
Raises:
60
61
RetrieverInitializationError: If validation of the input arguments fail.
0 commit comments