diff --git a/examples/demo/1-hello.pdl b/examples/demo/1-hello.pdl index 8f0a85019..f7da0a46a 100644 --- a/examples/demo/1-hello.pdl +++ b/examples/demo/1-hello.pdl @@ -4,5 +4,5 @@ text: - model: ollama_chat/granite3.2:2b parameters: stop: ["!"] - # include_stop_sequence: true + diff --git a/examples/demo/9-react.pdl b/examples/demo/9-react.pdl index 7f5bf8f16..2f1c73378 100644 --- a/examples/demo/9-react.pdl +++ b/examples/demo/9-react.pdl @@ -59,18 +59,18 @@ text: [{"name": "Finish", "arguments": {"topic": "1,800 to 7,000 ft"}}] contribute: [context] -- "How many years ago was the discoverer of the Hudson River born? Keep in mind we are in 2025.\n" +- "How many years ago was the discoverer of the Hudson River born? Keep in mind we are in 2025. When searching for a birthday for a person, simply ask for the name of that person.\n" - repeat: text: - def: thought model: ollama_chat/granite3.2:8b parameters: - stop_sequences: "Action:" + stop: ["Action:"] - "Action:\n" - def: action model: ollama_chat/granite3.2:8b parameters: - stop_sequences: "\n" + stop: ["\n"] parser: json - "\nObservation: " - match: ${ action[0].name } diff --git a/examples/react/demo.pdl b/examples/react/demo.pdl index e710cdc27..a7264d441 100644 --- a/examples/react/demo.pdl +++ b/examples/react/demo.pdl @@ -59,18 +59,18 @@ text: [{"name": "Finish", "arguments": {"topic": "1,800 to 7,000 ft"}}] contribute: [context] -- "How many years ago was the discoverer of the Hudson River born? Keep in mind we are in 2025.\n" +- "How many years ago was the discoverer of the Hudson River born? Keep in mind we are in 2025. When searching for a birthday for a person, simply ask for the name of that person.\n" - repeat: text: - def: thought model: ollama_chat/granite3.2:8b parameters: - stop_sequences: "Action:" + stop: ["Action:"] - "Action:\n" - def: action model: ollama_chat/granite3.2:8b parameters: - stop_sequences: "\n" + stop: ["\n"] parser: json - match: ${ action[0].name } with: diff --git a/examples/react/react_call.pdl b/examples/react/react_call.pdl index f0c24a8cd..ae439ac7b 100644 --- a/examples/react/react_call.pdl +++ b/examples/react/react_call.pdl @@ -4,7 +4,7 @@ text: def: lib - call: ${ lib.react } args: - question: How many years ago was the discoverer of the Hudson River born? Keep in mind we are in 2025. + question: "How many years ago was the discoverer of the Hudson River born? Keep in mind we are in 2025. When searching avoid using the words discovery or birthday.\n" model: ollama_chat/granite3.2:8b diff --git a/examples/react/react_fun.pdl b/examples/react/react_fun.pdl index 0d5a4187e..3ccaaafda 100644 --- a/examples/react/react_fun.pdl +++ b/examples/react/react_fun.pdl @@ -10,23 +10,35 @@ defs: - defs: tools: data: - - name: Calc - description: Calculator function - arguments: - expr: - type: string - description: Arithmetic expression to calculate - - name: Search - description: Wikipedia search - arguments: - topic: - type: string - description: Topic to search + - type: function + function: + name: Calc + description: Calculator function + parameters: + type: object + properties: + expr: + type: string + description: Arithmetic expression to calculate + required: + - expr + - type: function + function: + name: Search + description: Wikipedia search + parameters: + type: object + properties: + topic: + type: string + description: Topic to search + required: + - topic - for: ex: ${ examples } repeat: "${ ex }\n" - - "\n" + contribute: [context] - ${ question } - "\n" - role: system @@ -47,13 +59,13 @@ defs: model: ${ model } parameters: temperature: 0 - stop_sequences: "Action:" + stop: ["Action:"] - "Action:\n" - def: action model: ${ model } parameters: temperature: 0 - stop_sequences: "\n" + stop: ["\n"] parser: json - if: ${ action != prev_action} then: