From a401a4172a2100302f93e6839a1316438f055d72 Mon Sep 17 00:00:00 2001 From: Riceball LEE Date: Fri, 23 Aug 2024 18:59:20 +0800 Subject: [PATCH] refactor(example): update --- examples/calculator.ai.yaml | 11 ++++++----- examples/call-translator.ai.yaml | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/calculator.ai.yaml b/examples/calculator.ai.yaml index e18e304..4b976da 100644 --- a/examples/calculator.ai.yaml +++ b/examples/calculator.ai.yaml @@ -1,11 +1,12 @@ --- # Never use the LLM to calculate Math, this is just a demo # `-s examples` means to search the examples folder for the calc-result script. -# ai run -f examples/calculator.ai.yaml '{expression: "1+2*5"}' -s examples -expression: "1 + 2 * 3" +# ai run -f examples/calculator.ai.yaml '{content: "1+2*5"}' -s examples +content: "1 + 2 * 3" --- -system: Please as a calculator to calculate the result of the following expression, calculate it step by step. +system: Please as a calculator to calculate the result of the following expressions. --- -user: "{{expression}}" -assistant: "[[thinking]]" +user: "calculate the content and list results: {{content}}" +assistant: "Let's break down this problem step by step:\n[[thinking]]" +# call the `extract-calc-result` script file to extract the result from thinking output -> extract-calc-result diff --git a/examples/call-translator.ai.yaml b/examples/call-translator.ai.yaml index 9267286..96c7ae3 100644 --- a/examples/call-translator.ai.yaml +++ b/examples/call-translator.ai.yaml @@ -1,6 +1,6 @@ --- description: |- - call the translator + Demonstrate how to call the translator # Set the default value for the content and target input content: "I love my motherland and my hometown." target: "Chinese"