-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dm2' into ENG-472-Component-Wrap-up-LLMCommandGenerator
- Loading branch information
Showing
103 changed files
with
963 additions
and
83 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added Schema file and schema validation for flows. |
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
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
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,19 @@ | ||
from typing import Any, Text, Dict, List | ||
from rasa_sdk import Action, Tracker | ||
from rasa_sdk.executor import CollectingDispatcher | ||
from rasa_sdk.events import SlotSet | ||
|
||
class ActionCheckSufficientFunds(Action): | ||
def name(self) -> Text: | ||
return "action_check_sufficient_funds" | ||
|
||
def run(self, dispatcher: CollectingDispatcher, | ||
tracker: Tracker, | ||
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]: | ||
balance = 1000 # hard-coded for tutorial purposes | ||
# a real api call would look something like | ||
# result = requests.get("https://example.com/api/balance") | ||
# balance = result.json()["balance"] | ||
transfer_amount = tracker.get_slot("amount") | ||
has_sufficient_funds = transfer_amount <= balance | ||
return [SlotSet("has_sufficient_funds", has_sufficient_funds)] |
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,13 @@ | ||
recipe: default.v1 | ||
language: en | ||
pipeline: | ||
- name: LLMCommandGenerator | ||
llm: | ||
model_name: gpt-4 | ||
|
||
policies: | ||
- name: rasa.core.policies.flow_policy.FlowPolicy | ||
# - name: rasa_plus.ml.DocsearchPolicy | ||
# - name: RulePolicy | ||
|
||
assistant_id: 20230405-114328-tranquil-mustard |
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,23 @@ | ||
flows: | ||
transfer_money: | ||
description: This flow lets users send money to friends and family. | ||
steps: | ||
- collect: recipient | ||
- collect: amount | ||
- action: action_check_sufficient_funds | ||
next: | ||
- if: not has_sufficient_funds | ||
then: | ||
- action: utter_insufficient_funds | ||
next: END | ||
- else: final_confirmation | ||
- id: final_confirmation | ||
collect: final_confirmation | ||
next: | ||
- if: not final_confirmation | ||
then: | ||
- action: utter_transfer_cancelled | ||
next: END | ||
- else: transfer_successful | ||
- id: transfer_successful | ||
action: utter_transfer_complete |
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,43 @@ | ||
version: "3.1" | ||
|
||
slots: | ||
recipient: | ||
type: text | ||
mappings: | ||
- type: custom | ||
amount: | ||
type: float | ||
mappings: | ||
- type: custom | ||
final_confirmation: | ||
type: bool | ||
mappings: | ||
- type: custom | ||
has_sufficient_funds: | ||
type: bool | ||
mappings: | ||
- type: custom | ||
|
||
responses: | ||
utter_ask_recipient: | ||
- text: "Who would you like to send money to?" | ||
|
||
utter_ask_amount: | ||
- text: "How much money would you like to send?" | ||
|
||
utter_transfer_complete: | ||
- text: "All done. ${amount} has been sent to {recipient}." | ||
|
||
utter_ask_final_confirmation: | ||
- text: "Please confirm: you want to transfer ${amount} to {recipient}?" | ||
|
||
utter_transfer_cancelled: | ||
- text: "Your transfer has been cancelled." | ||
|
||
utter_insufficient_funds: | ||
- text: "You do not have enough funds to make this transaction." | ||
|
||
|
||
|
||
actions: | ||
- action_check_sufficient_funds |
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,7 @@ | ||
test_cases: | ||
- test_case: user corrects recipient in the next message | ||
steps: | ||
- user: I want to send 400 dollars to James | ||
- utter: utter_ask_final_confirmation | ||
- user: yes | ||
- utter: utter_transfer_complete |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,42 @@ | ||
# This file contains the different endpoints your bot can use. | ||
|
||
# Server where the models are pulled from. | ||
# https://rasa.com/docs/rasa/model-storage#fetching-models-from-a-server | ||
|
||
#models: | ||
# url: http://my-server.com/models/default_core@latest | ||
# wait_time_between_pulls: 10 # [optional](default: 100) | ||
|
||
# Server which runs your custom actions. | ||
# https://rasa.com/docs/rasa/custom-actions | ||
|
||
action_endpoint: | ||
url: "http://localhost:5055/webhook" | ||
|
||
# Tracker store which is used to store the conversations. | ||
# By default the conversations are stored in memory. | ||
# https://rasa.com/docs/rasa/tracker-stores | ||
|
||
#tracker_store: | ||
# type: redis | ||
# url: <host of the redis instance, e.g. localhost> | ||
# port: <port of your redis instance, usually 6379> | ||
# db: <number of your database within redis, e.g. 0> | ||
# password: <password used for authentication> | ||
# use_ssl: <whether or not the communication is encrypted, default false> | ||
|
||
#tracker_store: | ||
# type: mongod | ||
# url: <url to your mongo instance, e.g. mongodb://localhost:27017> | ||
# db: <name of the db within your mongo instance, e.g. rasa> | ||
# username: <username used for authentication> | ||
# password: <password used for authentication> | ||
|
||
# Event broker which all conversation events should be streamed to. | ||
# https://rasa.com/docs/rasa/event-brokers | ||
|
||
#event_broker: | ||
# url: localhost | ||
# username: username | ||
# password: password | ||
# queue: queue |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ exclude = "((.eggs | .git | .pytest_cache | build | dist))" | |
|
||
[tool.poetry] | ||
name = "rasa" | ||
version = "3.8.0a11" | ||
version = "3.8.0a12" | ||
description = "Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants" | ||
authors = [ "Rasa Technologies GmbH <[email protected]>",] | ||
maintainers = [ "Tom Bocklisch <[email protected]>",] | ||
|
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
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
Oops, something went wrong.