-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |