Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 38e9965d2e |
3
main.py
3
main.py
@@ -35,6 +35,7 @@ class GenerateCypher(PrecompiledProgram):
|
|||||||
max_tokens=config.max_tokens,
|
max_tokens=config.max_tokens,
|
||||||
)
|
)
|
||||||
self.generate_cypher = dspy.ChainOfThought(CypherFromText)
|
self.generate_cypher = dspy.ChainOfThought(CypherFromText)
|
||||||
|
self.generate_cypher.set_lm(self.lm)
|
||||||
|
|
||||||
def forward(self, text: str, neo4j_schema: list[str]):
|
def forward(self, text: str, neo4j_schema: list[str]):
|
||||||
return self.generate_cypher(text=text, neo4j_schema=neo4j_schema)
|
return self.generate_cypher(text=text, neo4j_schema=neo4j_schema)
|
||||||
@@ -42,6 +43,6 @@ class GenerateCypher(PrecompiledProgram):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
generate_cypher = GenerateCypher(GenerateCypherConfig())
|
generate_cypher = GenerateCypher(GenerateCypherConfig())
|
||||||
generate_cypher.push_to_hub("farouk1/text-to-cypher", with_code=True, tag="v0.0.1", commit_message="init")
|
generate_cypher.push_to_hub("farouk1/text-to-cypher", with_code=True, tag="v0.0.2", commit_message="set LM")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user