1 Commits

Author SHA1 Message Date
b526e68660 Don't cache results 2025-12-27 20:20:40 -08:00
3 changed files with 6 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
{
"model": "openrouter/openai/gpt-4o",
"max_tokens": 1024,
"cache": false
"cache": true
}

View File

@@ -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",
)

View File

@@ -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": {},