Skip to content

Commit

Permalink
refactor(example): update
Browse files Browse the repository at this point in the history
  • Loading branch information
snowyu committed Aug 23, 2024
1 parent b12a4d4 commit a401a41
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions examples/calculator.ai.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion examples/call-translator.ai.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit a401a41

Please sign in to comment.