Skip to content

Commit

Permalink
Release 3.11 (#67)
Browse files Browse the repository at this point in the history
* Ato 2960 update bot with persist slot config (#64)

* update rasa-pro

* swap property `reset_after_flow_ends` for `persist_slots`

* update e2e test cases

* update verify account flow to persist a slot filled in a set_slots step

* Update rasa-pro to 3.11.0rc2

* Revert "Update rasa-pro to 3.11.0rc2"

This reverts commit 894f444.

* Update rasa-pro to 3.11.0rc2 (#66)

* update readme

* use model groups

* Update pyproject.toml

* update poetry.lock

---------

Co-authored-by: Github Actions <[email protected]>
Co-authored-by: Tanja Bunk <[email protected]>
  • Loading branch information
3 people authored Jan 7, 2025
1 parent 7b396c6 commit 79f664f
Show file tree
Hide file tree
Showing 12 changed files with 837 additions and 580 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This demo showcases a chatbot built with Rasa's LLM-native approach: [CALM](http
> CALM's current stage of development.
> [!NOTE]
> This demo bot is currently compatible with `3.10.1`.
> This demo bot is currently compatible with `3.11.2`.
## Terms of Use

Expand Down
5 changes: 1 addition & 4 deletions config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ pipeline:
- name: NLUCommandAdapter
- name: SingleStepLLMCommandGenerator
llm:
model: gpt-4
timeout: 7
temperature: 0.0
top_p: 0.0
model_group: openai-direct-gpt-4

policies:
- name: RulePolicy
Expand Down
5 changes: 1 addition & 4 deletions config/multistep-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ pipeline:
- name: NLUCommandAdapter
- name: MultiStepLLMCommandGenerator
llm:
model: gpt-3.5-turbo-0125
timeout: 7
temperature: 0.0
top_p: 0.0
model_group: openai-direct-gpt-3.5-turbo

policies:
- name: RulePolicy
Expand Down
5 changes: 1 addition & 4 deletions config/qdrant-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ pipeline:
- name: NLUCommandAdapter
- name: SingleStepLLMCommandGenerator
llm:
model: gpt-4
timeout: 7
temperature: 0.0
top_p: 0.0
model_group: openai-direct-gpt-4

policies:
- name: RulePolicy
Expand Down
6 changes: 5 additions & 1 deletion data/flows/verify_account.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ flows:
- intent:
name: verify_account
confidence_threshold: 0.9
persisted_slots:
- based_in_california
- based_in_the_us
steps:
- collect: verify_account_email
ask_before_filling: true
- collect: based_in_california
ask_before_filling: false
reset_after_flow_ends: false
next:
- if: slots.based_in_california
then:
- set_slots:
- based_in_the_us: true
- collect: verify_account_sufficient_california_income
ask_before_filling: true
next:
Expand Down
5 changes: 5 additions & 0 deletions domain/flows/verify_account.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ slots:
shared_for_coexistence: True
mappings:
- type: from_llm
based_in_the_us:
type: bool
shared_for_coexistence: True
mappings:
- type: from_llm
verify_account_sufficient_california_income:
type: bool
mappings:
Expand Down
29 changes: 28 additions & 1 deletion e2e_tests/passing/happy_path/user_verifies_account.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ test_cases:
- slot_was_set:
- verify_account_confirmation: true
- utter: utter_verify_account_success
# verify slot reset
- slot_was_set:
- verify_account_email: null
- verify_account_confirmation: null
- verify_account_sufficient_california_income: null
# verify slot persistence
- slot_was_not_set:
- based_in_california
- based_in_the_us

- test_case: Verify account for California resident with insufficient income
steps:
Expand All @@ -36,6 +45,15 @@ test_cases:
- slot_was_set:
- verify_account_sufficient_california_income: false
- utter: utter_ca_income_insufficient
# verify slot reset
- slot_was_set:
- verify_account_email: null
- verify_account_confirmation: null
- verify_account_sufficient_california_income: null
# verify slot persistence
- slot_was_not_set:
- based_in_california
- based_in_the_us
- utter: utter_can_do_something_else

- test_case: Verify account for California resident with sufficient income
Expand All @@ -60,4 +78,13 @@ test_cases:
- slot_was_set:
- verify_account_confirmation: true
- utter: utter_verify_account_success
- utter: utter_can_do_something_else
# verify slot reset
- slot_was_set:
- verify_account_email: null
- verify_account_confirmation: null
- verify_account_sufficient_california_income: null
# verify slot persistence
- slot_was_not_set:
- based_in_california
- based_in_the_us
- utter: utter_can_do_something_else
36 changes: 36 additions & 0 deletions e2e_tests_with_assertions/passing/happy_path/user_orders_pizza.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,23 @@ test_cases:
value: 1234 5678 9012 3456
- bot_uttered:
utter_name: utter_execute_payment
- flow_completed:
flow_id: order_pizza
# verify slot reset
- slot_was_set:
- name: pizza
value: null
- name: num_pizza
value: null
- name: address
value: null
- name: card_details
value: null
- name: payment_option
value: null
# verify slot persistence
- slot_was_not_set:
- name: confirmation_order

- test_case: user_orders_pizza_stating_which_type_and_pays_with_points
steps:
Expand Down Expand Up @@ -117,4 +134,23 @@ test_cases:
utter_name: utter_execute_payment
- flow_completed:
flow_id: order_pizza
# verify slot reset
- slot_was_set:
- name: pizza
value: null
- name: num_pizza
value: null
- name: address
value: null
- name: card_details
value: null
- name: payment_option
value: null
- name: user_name
value: null
- name: user_password
value: null
# verify slot persistence
- slot_was_not_set:
- name: confirmation_order

Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ test_cases:
value: true
- bot_uttered:
utter_name: utter_verify_account_success
# verify slot reset
- slot_was_set:
- name: verify_account_email
value: null
- name: verify_account_confirmation
value: null
- name: verify_account_sufficient_california_income
value: null
# verify slot persistence
- slot_was_not_set:
- name: based_in_california
- name: based_in_the_us

- test_case: Verify account for California resident with insufficient income
steps:
Expand All @@ -57,6 +69,8 @@ test_cases:
- slot_was_set:
- name: based_in_california
value: true
- name: based_in_the_us
value: true
- bot_uttered:
utter_name: utter_ask_verify_account_sufficient_california_income
- user: "no"
Expand All @@ -66,6 +80,18 @@ test_cases:
value: false
- bot_uttered:
utter_name: utter_ca_income_insufficient
# verify slot reset
- slot_was_set:
- name: verify_account_email
value: null
- name: verify_account_confirmation
value: null
- name: verify_account_sufficient_california_income
value: null
# verify slot persistence
- slot_was_not_set:
- name: based_in_california
- name: based_in_the_us
- bot_uttered:
utter_name: utter_can_do_something_else

Expand All @@ -90,6 +116,8 @@ test_cases:
- slot_was_set:
- name: based_in_california
value: true
- name: based_in_the_us
value: true
- bot_uttered:
utter_name: utter_ask_verify_account_sufficient_california_income
- user: "yes"
Expand All @@ -108,5 +136,17 @@ test_cases:
value: true
- bot_uttered:
utter_name: utter_verify_account_success
# verify slot reset
- slot_was_set:
- name: verify_account_email
value: null
- name: verify_account_confirmation
value: null
- name: verify_account_sufficient_california_income
value: null
# verify slot persistence
- slot_was_not_set:
- name: based_in_california
- name: based_in_the_us
- bot_uttered:
utter_name: utter_can_do_something_else
18 changes: 17 additions & 1 deletion endpoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,20 @@ vector_store:
host: 0.0.0.0
port: 6334
content_payload_key: page_content
metadata_payload_key: metadata
metadata_payload_key: metadata

model_groups:
- id: openai-direct-gpt-4
models:
- provider: openai
model: gpt-4
timeout: 7
temperature: 0.0
top_p: 0.0
- id: openai-direct-gpt-3.5-turbo
models:
- provider: openai
model: gpt-3.5-turbo-0125
timeout: 7
temperature: 0.0
top_p: 0.0
Loading

0 comments on commit 79f664f

Please sign in to comment.