Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/colang doc related cleanups #467

Merged
merged 17 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
f117d3d
Update some CSL function docstrings
schuellc-nvidia Apr 19, 2024
9eeafe2
Restructure language reference event section examples folder
schuellc-nvidia Apr 22, 2024
da1510f
Rename language reference example folder `working_with_actions` to `a…
schuellc-nvidia Apr 22, 2024
775fd7a
Rename language reference example folder `defining_flows` to `flows`
schuellc-nvidia Apr 22, 2024
803de56
Add language reference examples about `working with variables` section
schuellc-nvidia Apr 22, 2024
334a5bc
Add Colang language reference examples for section `flow control`
schuellc-nvidia Apr 22, 2024
22986e8
Rename a llm standard library flow
schuellc-nvidia Apr 22, 2024
d149f35
Add Colang language reference examples for section `making use of llms`
schuellc-nvidia Apr 22, 2024
efcac23
Pass on Colang language reference examples for section `more on flows`
schuellc-nvidia Apr 22, 2024
63b525f
Fix Colang language reference examples for debugging section
schuellc-nvidia Apr 22, 2024
bba5d18
Import core in a flow control colang reference example
schuellc-nvidia Apr 22, 2024
315fa30
Remove gesture actions from default llm general prompt context
schuellc-nvidia Apr 23, 2024
1c683fc
Improve a Colang language reference example
schuellc-nvidia Apr 23, 2024
5f96d5f
Improve flow order in Colang 2 examples
schuellc-nvidia Apr 30, 2024
adc6eed
Fix and update getting started Colang 2 examples
schuellc-nvidia Apr 30, 2024
97a38f3
Fix tutorial test
schuellc-nvidia May 2, 2024
ed3c161
Fix Colang 2 tutorial READMEs
schuellc-nvidia May 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import core

flow main
start pattern a
when pattern b
bot say "Pattern b has finished"
else
bot say "Pattern b has failed"

flow pattern a
user said "Hello"
bot say "Hello"

flow pattern b
user said something
bot say "Hi"
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import core

flow main
start pattern a
when pattern b
Expand All @@ -12,12 +14,3 @@ flow pattern a
flow pattern b
user said something
bot say "Hi"

flow bot say $text
await UtteranceBotAction(script=$text)

flow user said $text
match UtteranceUserAction.Finished(final_transcript=$text)

flow user said something
match UtteranceUserAction.Finished()
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import core

flow main
bot say "How are you?"
bot react to user feeling good or bot react to user feeling bad

flow bot react to user feeling good
user said "Good" or user said "Great"
bot say "Great"

flow bot react to user feeling bad
user said "Bad" or user said "Terrible"
bot say "Sorry to hear"
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import core

flow main
$number_of_users = 1
if $number_of_users == 0
await user became present
elif $number_of_users > 1
bot say "I am sorry, I can only interact with a single user!"
else
bot say "Welcome! Nice to meet you!"
match RestartEvent()
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import core

flow main
bot say "How are you?"
bot react to user wellbeing

flow bot react to user wellbeing
when user said "Good" or user said "Great"
bot say "Great"
or when user said "Bad" or user said "Terrible"
bot say "Sorry to hear"
10 changes: 10 additions & 0 deletions examples/v2_x/language_reference/control_flow_tools/loop/main.co
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import core

flow main
bot count to 10

flow bot count to $number
$current_number = 1
while $current_number < $number
bot say "{$current_number}"
$current_number = $current_number + 1

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
flow main
await a
match RestartEvent()

flow a
$info = flows_info($self.uid)
print pretty_str($info)
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
colang_version: "2.x"

import_paths:
- tests/test_configs/multi_modal_demo_v2_x/
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import core

flow main
user said something as $flow
log $flow.transcript

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
flow main
send StartUtteranceBotAction(script="Smile") as $event_ref
send StartGestureBotAction(gesture=$event_ref.script)
match RestartEvent()

This file was deleted.

This file was deleted.

Loading
Loading