Skip to content

Commit

Permalink
Add SQL example
Browse files Browse the repository at this point in the history
  • Loading branch information
InAnYan committed Nov 15, 2024
1 parent 2a2455b commit b7f95d2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion module/move/assistant/design/agents_design.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Those nodes perform intermediate processing of information. It can be either a m

**Paramters**:

- `path`: path to the executable.
- `cmd`: command to execute with path to the executable and arguments.

#### Agent completion node

Expand Down
32 changes: 32 additions & 0 deletions module/move/assistant/design/agents_examples/sql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
title: DB information extractor
description: >
This system accepts user query for the DB in natural language and converts it into SQL code, which is then passed to a script that will
execute this SQL and present the output.
This example requires that the script is correctly configured to the real DB.
nodes:
- id: question_input
type: trigger.stdin
prompt: 'Your query: '
next: translator

- id: translator
type: agent.completion
# In real life scenario you should specify here:
# - Which DB is used?
# - What are the tables and columns?
# - Schema of the DB.
system_message: 'Your task is to translate user query into SQL code for the database.'
user_message: '{{question_input}}'
next: query

- id: query
type: script
# In real life scenario you should add parameters for contacting the DB.
cmd: 'query_db {{translator}}'
next: output

- id: output
type: event.stdout
output: 'Output: {{query}}'
next: scenario.termination

0 comments on commit b7f95d2

Please sign in to comment.