From b526e68660594f3e26e0494a9010969a2e7fef91 Mon Sep 17 00:00:00 2001 From: Farouk Adeleke Date: Sat, 27 Dec 2025 20:20:40 -0800 Subject: [PATCH] Don't cache results --- config.json | 2 +- modules.py | 6 +++--- program.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config.json b/config.json index ec4fd24..753b689 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { "model": "openrouter/openai/gpt-4o", "max_tokens": 1024, - "cache": false + "cache": true } \ No newline at end of file diff --git a/modules.py b/modules.py index 331d7c3..ba701d7 100644 --- a/modules.py +++ b/modules.py @@ -7,7 +7,7 @@ load_dotenv() class CypherFromQuestion(dspy.Signature): - """Task: Generate Cypher statement to query a graph database. + """Task: Generate a Cypher statement to query a graph database. Instructions: Use only the provided relationship types and properties in the schema. Do not use any other relationship types or properties that are not provided in the schema. Do not include any explanations or apologies in your responses. @@ -27,7 +27,7 @@ class CypherFromQuestion(dspy.Signature): class GenerateCypherConfig(PrecompiledConfig): model: str = "openrouter/openai/gpt-4o" # OPENROUTER ONLY max_tokens: int = 1024 - cache: bool = False + cache: bool = True class GenerateCypher(PrecompiledProgram): @@ -71,6 +71,6 @@ if __name__ == "__main__": generate_cypher.push_to_hub( "farouk1/text-to-cypher", with_code=True, - tag="v1.0.1", + tag="v1.0.2", commit_message="Don't cache results", ) diff --git a/program.json b/program.json index 3c0db41..7f6659b 100644 --- a/program.json +++ b/program.json @@ -4,7 +4,7 @@ "train": [], "demos": [], "signature": { - "instructions": "Task: Generate Cypher statement to query a graph database.\nInstructions: Use only the provided relationship types and properties in the schema.\nDo not use any other relationship types or properties that are not provided in the schema.\nDo not include any explanations or apologies in your responses.\nDo not respond to any questions that might ask anything else than for you to construct a Cypher statement.\nDo not include any text except the generated Cypher statement.", + "instructions": "Task: Generate a Cypher statement to query a graph database.\nInstructions: Use only the provided relationship types and properties in the schema.\nDo not use any other relationship types or properties that are not provided in the schema.\nDo not include any explanations or apologies in your responses.\nDo not respond to any questions that might ask anything else than for you to construct a Cypher statement.\nDo not include any text except the generated Cypher statement.", "fields": [ { "prefix": "Question:", @@ -27,7 +27,7 @@ "lm": { "model": "openrouter/openai/gpt-4o", "model_type": "chat", - "cache": false, + "cache": true, "num_retries": 3, "finetuning_model": null, "launch_kwargs": {},