Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1087651663 | |||
| 71b7d59419 |
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"model": "openrouter/openai/gpt-4o",
|
||||
"max_tokens": 1024
|
||||
"max_tokens": 1024,
|
||||
"cache": true
|
||||
}
|
||||
@@ -27,6 +27,7 @@ class CypherFromQuestion(dspy.Signature):
|
||||
class GenerateCypherConfig(PrecompiledConfig):
|
||||
model: str = "openrouter/openai/gpt-4o" # OPENROUTER ONLY
|
||||
max_tokens: int = 1024
|
||||
cache: bool = True
|
||||
|
||||
|
||||
class GenerateCypher(PrecompiledProgram):
|
||||
@@ -38,6 +39,7 @@ class GenerateCypher(PrecompiledProgram):
|
||||
model=config.model,
|
||||
max_tokens=config.max_tokens,
|
||||
api_base="https://openrouter.ai/api/v1",
|
||||
cache=config.cache,
|
||||
)
|
||||
self.generate_cypher = dspy.ChainOfThought(CypherFromQuestion)
|
||||
self.generate_cypher.set_lm(self.lm)
|
||||
@@ -69,6 +71,6 @@ if __name__ == "__main__":
|
||||
generate_cypher.push_to_hub(
|
||||
"farouk1/text-to-cypher",
|
||||
with_code=True,
|
||||
tag="v0.0.9",
|
||||
commit_message="Update README.md",
|
||||
tag="v1.0.1",
|
||||
commit_message="Don't cache results",
|
||||
)
|
||||
|
||||
@@ -61,7 +61,7 @@ train_set, val_set, test_set = process_dataset()
|
||||
|
||||
optimizer = GEPA(
|
||||
metric=metric,
|
||||
auto="light",
|
||||
auto="medium",
|
||||
num_threads=32,
|
||||
track_stats=True,
|
||||
reflection_minibatch_size=3,
|
||||
@@ -75,4 +75,4 @@ if __name__ == "__main__":
|
||||
trainset=train_set,
|
||||
valset=val_set,
|
||||
)
|
||||
optimized_program.push_to_hub("farouk1/text-to-cypher-gepa", tag="v1.0.1", commit_message="Optimized program with code")
|
||||
optimized_program.push_to_hub("farouk1/text-to-cypher-gepa", tag="v1.0.4", commit_message="Optimized program with code")
|
||||
|
||||
Reference in New Issue
Block a user