Don't cache results
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"model": "openrouter/openai/gpt-4o",
|
"model": "openrouter/openai/gpt-4o",
|
||||||
"max_tokens": 1024,
|
"max_tokens": 1024,
|
||||||
"cache": false
|
"cache": true
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@ load_dotenv()
|
|||||||
|
|
||||||
|
|
||||||
class CypherFromQuestion(dspy.Signature):
|
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.
|
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 use any other relationship types or properties that are not provided in the schema.
|
||||||
Do not include any explanations or apologies in your responses.
|
Do not include any explanations or apologies in your responses.
|
||||||
@@ -27,7 +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
|
cache: bool = True
|
||||||
|
|
||||||
|
|
||||||
class GenerateCypher(PrecompiledProgram):
|
class GenerateCypher(PrecompiledProgram):
|
||||||
@@ -71,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.1",
|
tag="v1.0.2",
|
||||||
commit_message="Don't cache results",
|
commit_message="Don't cache results",
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"train": [],
|
"train": [],
|
||||||
"demos": [],
|
"demos": [],
|
||||||
"signature": {
|
"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": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"prefix": "Question:",
|
"prefix": "Question:",
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
"lm": {
|
"lm": {
|
||||||
"model": "openrouter/openai/gpt-4o",
|
"model": "openrouter/openai/gpt-4o",
|
||||||
"model_type": "chat",
|
"model_type": "chat",
|
||||||
"cache": false,
|
"cache": true,
|
||||||
"num_retries": 3,
|
"num_retries": 3,
|
||||||
"finetuning_model": null,
|
"finetuning_model": null,
|
||||||
"launch_kwargs": {},
|
"launch_kwargs": {},
|
||||||
|
|||||||
Reference in New Issue
Block a user