Don't cache results

This commit is contained in:
2025-12-27 19:33:57 -08:00
parent 57e7b1fd36
commit fc9560cc50
3 changed files with 7 additions and 4 deletions

View File

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

View File

@@ -27,6 +27,7 @@ class CypherFromQuestion(dspy.Signature):
class GenerateCypherConfig(PrecompiledConfig): class GenerateCypherConfig(PrecompiledConfig):
model: str = "openrouter/openai/gpt-4o" # OPENROUTER ONLY model: str = "openrouter/openai/gpt-4o" # OPENROUTER ONLY
max_tokens: int = 1024 max_tokens: int = 1024
cache: bool = False
class GenerateCypher(PrecompiledProgram): class GenerateCypher(PrecompiledProgram):
@@ -38,6 +39,7 @@ class GenerateCypher(PrecompiledProgram):
model=config.model, model=config.model,
max_tokens=config.max_tokens, max_tokens=config.max_tokens,
api_base="https://openrouter.ai/api/v1", api_base="https://openrouter.ai/api/v1",
cache=config.cache,
) )
self.generate_cypher = dspy.ChainOfThought(CypherFromQuestion) self.generate_cypher = dspy.ChainOfThought(CypherFromQuestion)
self.generate_cypher.set_lm(self.lm) self.generate_cypher.set_lm(self.lm)
@@ -69,6 +71,6 @@ if __name__ == "__main__":
generate_cypher.push_to_hub( generate_cypher.push_to_hub(
"farouk1/text-to-cypher", "farouk1/text-to-cypher",
with_code=True, with_code=True,
tag="v1.0.0", tag="v1.0.1",
commit_message="Update README.md", commit_message="Don't cache results",
) )

View File

@@ -27,7 +27,7 @@
"lm": { "lm": {
"model": "openrouter/openai/gpt-4o", "model": "openrouter/openai/gpt-4o",
"model_type": "chat", "model_type": "chat",
"cache": true, "cache": false,
"num_retries": 3, "num_retries": 3,
"finetuning_model": null, "finetuning_model": null,
"launch_kwargs": {}, "launch_kwargs": {},