Forms aren't activated on rasa 2.0.2 - forms

Ok so I'm running Rasa 2.0.2 and whenever I try to activate my forms, rasa seems to fail loading them. I'm pretty sure that my code runs properly since it runs on rasa 2.7.0. Also note that through some threads that I read online I knew that older versions of rasa need the utters with a certain naming such as: "utter_ask_name" so I did that and also slots need to be named like this: "slot_date". So I used both of these methods but still came to no success.
Any help?
domain.yml:
version: "2.0"
intents:
- greet
- inform
- subscribe
- bot_challenge
- name
- age
- learn
- book demo
- describe
- describe more
- learn more
- learn less
- date
- time
- firstname
- lastname
- email
- country
- kai101
slots:
email1:
type: unfeaturized
influence_conversation: false
slot_date:
type: unfeaturized
influence_conversation: false
slot_time:
type: unfeaturized
influence_conversation: false
slot_firstname:
type: unfeaturized
influence_conversation: false
slot_lastname:
type: unfeaturized
influence_conversation: false
slot_email:
type: unfeaturized
influence_conversation: false
slot_country:
type: unfeaturized
influence_conversation: false
responses:
utter_greet:
- text: |
Hello & welcome to achatbotAgancy.com! Your one-stop shop to the world of chatbots.
How may I assist you?
buttons:
- title: "Learn about chatbots"
payload: '/learn'
- title: "What do you want your chatbot to do? In a few words describe the purpose of your chatbot:"
payload: '/describe'
- title: "Book a demo to test drive us"
payload: '/book demo'
utter_kuh:
- text: |
What is your email address?
utter_subscribed:
- text: |
Check your inbox at {email} in order to finish subscribing to the newsletter!
- text: You're all set! Check your inbox at {email} to confirm your subscription.
- text: You've been subscribed, the newsletter will be sent to {email} shotly.
utter_i_am_a_bot:
- text: |
I am a bot powered by RASA
utter_my_name:
- text: |
I am KAI The Chatbot
utter_my_age:
- text: |
I was made on June 2 2021 and I'm still being developed on a regular basis.
utter_learn:
- text: |
A chatbot is a software application used to conduct an on-line chat conversation via text or text-to-speech, in lieu of providing direct contact with a live human agent.
Did that answer help your question or do need more information?
buttons:
- title: "No thank you"
payload: '/learn less'
- title: "I am intrested in learning more"
payload: '/learn more'
utter_description:
- text: |
What do you want your chatbot to do? In a few words describe the purpose of your chatbot:
utter_description_reply:
- text: |
Ah yes, we can definitely help with that. May I book an appointment for you with one of my colleagues?
utter_book_demo:
- text: |
Sure. I will ask one of our humans to reach out. May I know:
utter_learn_more:
- text: |
A chatbot is a software application used to conduct an on-line chat conversation via text or text-to-speech, in lieu of providing direct contact with a live human agent.
Did that answer help your question or do need more information?
buttons:
- title: "No thank you"
payload: '/learn less'
- title: "I am intrested in learning more"
payload: '/learn more'
utter_learn_less:
- text: |
Ok great.Well, I am one message away. Don’t be shy.
utter_learn_more1:
- text: |
Sure, I am more than happy to book an appointment for you.
utter_ask_date:
- text: |
May I know the best date that works for you?
utter_ask_time:
- text: |
Great, and what time??
utter_ask_firstname:
- text: |
May I know your first name?
utter_ask_lastname:
- text: |
May I know your last name?
utter_ask_email:
- text: |
May I know your email address?
utter_ask_country:
- text: |
Which country are you in?
utter_done_requesting:
- text: |
Awesome Mr.{slot_firstname} {slot_lastname}, one of my colleagues will contact you shortly on your email {slot_email} to book an appointment on {slot_date} at {slot_time}
actions:
- '...'
- utter_greet
- utter_kuh
- utter_subscribed
- utter_i_am_a_bot
- utter_my_name
- utter_my_age
- utter_learn
- utter_description
- utter_description_reply
- utter_book_demo
- utter_learn_more
- utter_learn_less
- utter_learn_more1
- utter_ask_date
- utter_ask_time
- utter_ask_firstname
- utter_ask_lastname
- utter_ask_email
- utter_ask_country
- utter_done_requesting
forms:
informative_form:
required_slots:
slot_date:
- type: from_text
slot_time:
- type: from_text
slot_firstname:
- type: from_text
slot_lastname:
- type: from_text
slot_email:
- type: from_text
slot_country:
- type: from_text
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true
forms.yml:
forms:
informative_form:
required_slots:
slot_date:
- type: from_text
slot_time:
- type: from_text
slot_firstname:
- type: from_text
slot_lastname:
- type: from_text
slot_email:
- type: from_text
slot_country:
- type: from_text
nlu.yml:
version: "2.0"
nlu:
- intent: greet
examples: |
- Hi
- Hey!
- Hallo
- Good day
- Good morning
- howdy
- intent: subscribe
examples: |
- I want to get the newsletter
- Can you send me the newsletter?
- Can you sign me up for the newsletter?
- Can I on your mailing list?
- intent: inform
examples: |
- My email is example#example.com
- random#example.com
- Please send it to anything#example.com
- Email is something#example.com
- intent: bot_challenge
examples: |
- Are you a bot?
- Am I talking to a human?
- is this a chatbot?
- is this a real person?
- you're a bot, aren't you
- intent: name
examples: |
- What's your name?
- What did they name you??
- what are you called?
- What should I call you ?
- intent: learn
examples: |
- Learn about chatbots
- intent: describe
examples: |
- What do you want your chatbot to do? In a few words describe the purpose of your chatbot:
- intent: describe more
examples: |
- I want my chatbot to
- I want it to do something
- I want it to be something
- I want it
- To do something
- want it to be something
- do something
- intent: book demo
examples: |
- Book a demo to test drive us
- intent: learn less
examples: |
- No, thank you.
- intent: learn
examples: |
- I am interested in learning more.
- intent: kai101
examples: |
- Ask me your questions.
- Ask me about the form.
- intent: date
examples: |
- May 31 1999
- 31/05/1999
- July 16 1978
- 16/07/1978
- January 4 1974
- 04/01/1974
- September 10 2003
- 10/09/2003
- intent: time
examples: |
- 3:00 PM
- 8:00 AM
- 16:00
- 8 in the morning
- 4 afternoon
- 12 in the morning
- 4 in the evening
- intent: firstname
examples: |
- Kareem
- Yehya
- Mariam
- Johnny
- Charbel
- Nour
- Hanin
- Hussein
- John
- intent: lastname
examples: |
- Aridi
- Abou Dargham
- Harfouch
- Abou Dagher
- Smith
- Malaeb
- intent: email
examples: |
- My email is example#example.com
- random#example.com
- Please send it to anything#example.com
- Email is something#example.com
- intent: country
examples: |
- Lebanon
- USA
- UAE
- Palestine
- Syria
- Iraq
- Kuwait
- United States
- United Arab Emirates
- Kuwait
- Bahrain
- Saudi Arabia
- germany

I have a few observations to kicktart finding the right answer:
could you please offer more context behind the problem you're facing? What command were you trying, what was the error stacktrace? It would be helpful if you could run rasa shell --debug and post the full debug log in your question.
if you specify the form in domain.yml, you don't need to have a separate forms.yml file as per the docs
if you specified influence_conversation property as false, you don't need to use type: unfeaturized particularly because this has been deprecated. Perhaps these should all be type: text?
how are you using the form in stories and rules? are you able to share the contents of these files too? The formbot example is a good guideline to follow.

Related

esphome adding timestamp data to my mqtt broker

My goal is move my C++ scripts to yaml and use esphome. I´ve started with something easy, esp8266+dht22+mqtt, really easy, but if i want to add also the timestamp in addition to temperature and humidity. I guess to use lambda?, text_sensor?. Any help will be appreciated.
This is my code:
sensor:
- platform: dht
pin: D5
model: AM2302
temperature:
name: "temperature_test"
filters:
- multiply: 0.92
humidity:
name: "humidity_test"
id: tempdht22
update_interval: 10s
mqtt:
#discovery_prefix: esphome_test
broker: 192.168.1.185
id: mqtt_client

How to Reduce Parameters in CloudFormation Parent Stacks

I'm trying to follow AWS CloudFormation best practices, and set up lots of little stacks that nest under a parent stack. Mostly, this is working fine; however, in an intermediate stack I've now exceeded the max 60 parameter count. This will only get worse when I go the next level up and aggregate these intermediate stacks into a master parent stack.
The CloudFormation documentation says, "To specify more parameters, you can use mappings or lists in order to assign multiple values to a single parameter." In fact, that exact quotation has been given at least twice here in response to the 60 parameter limit question. However, how does one go about doing that? I can see how the mapping capability could work when you're selecting from a bunch of pre-defined sets of values (e.g., select from these AMI IDs, or these subnets), but don't see how it could work when the parameters are strings or numbers or other user-entered data; and I can't see an example at all of how lists do it.
Does anyone have an example or two of how they've used mappings and or lists to consolidate multiple user-entered parameters into a single parameter?
Edit, per a request in comments, I'm adding more details on what my templates look like. Here is the ParameterGroups section of the parent stack in question. It rolls up nested stacks for "mail storage" (which creates EBS volumes), "mail" which launches a primary and backup MX server and configures Postfix, Dovecot, etc..., and "Roundcube" which launches a autoscaling group of web servers running roundcube. All of this sits on top of another nested stack, "infrastructure", which deploys VPC, Subnets, ELB, NAT, RDS, security groups, and phpmyadmin.
AWS::CloudFormation::Interface:
ParameterGroups:
-
Label:
default: Mandatory Parameters
Parameters:
- Vpc
- NumberOfAZs
- AvailabilityZones
- AMIID
- WantRoundCube
-
Label:
default: Recommended Parameters
Parameters:
- AdminUser
- AdminPubKey
-
Label:
default: Mail Storage Parameters
Parameters:
- SpoolSize
- LogSize
- CreateSwap
- SwwapSize
- EncryptedBoolean
- Cmk
- SpoolDelPolicy
- LogDelPolicy
- MasterSpoolSnapshot
- MasterLogSnapshot
- BackupSpoolSnapshot
- BackupLogSnapshot
-
Label:
default: Primary MX EC2 Instance Parameters
Parameters:
- PrimaryServerName
- VirtualUID
- EC2KeyName
- MailInstanceType
- MailSecurityGroup
- StorageStackName
- PrimarySubnet
- InsertTestData
-
Label:
default: Backup MX EC2 Instance Parameters
Parameters:
- BackupServerName
- BackupMailInstanceType
- BackupSubnet
-
Label:
default: Database Parameters
Parameters:
- DatabaseStackName
- MailDBName
- MailDBUser
- MailDBPassword
- MailDBBackup
-
Label:
default: Postfix Primary Parameters
Parameters:
- Origin
- Banner
- RelayHost
- RootMailRecipient
- InetProtocols
- EnableSpfChecks
- EnableOpenDkim
- OpenDkimDomains
-
Label:
default: SSL Parameters
Parameters:
- CertSource
- AccountEmail
- DNSZone
- DNSSleep
- CertFileDir
-
Label:
default: Dovecot Parameters
Parameters:
- MaxUserConnections
-
Label:
default: Amavisd, SpamAssassin, ClamAV
Parameters:
- SAFinalDest
- SAKillLevelDeflt
- SetMyHost
-
Label:
default: Roundcube
Parameters:
- AllowPasswdChange
- AlternativeIAMRole
- AlternativeInitializationScript
- DnsName
- EnableDebug
- EnvironmentVariables
- Hash
- PublicAlbListenerArn
- RoundcubeDBName
- RoundcubeDBUser
- RoundcubeDBPass
- RoundcubeInstanceType
- RoundcubeSecurityGroup
- Skin
-
Label:
default: AWS S3 Configuration
Parameters:
- MirovoyCFAssetsBucket
- MailS3KeyPrefix
- RoundcubeS3KeyPrefix
- SkelFileDir
- Label:
default: Testing Configuration
Parameters:
- UnknownLocalErrorCode
- XandrosPass
- VivitaPass
- ExternalTestEmail
- SSLDebug
- ADLogLevel
- DisableVirusChecks
- DisableSpamChecks
- DisableServices
-
Label:
default: Postfix Optional Parameters
Parameters:
- DelayWarningTime
- MaxQueueLifetime
- MinBackoffTime
- MaxBackoffTime
- HeloTimeout
- RecipientLimit
- SoftErrLimit
- HardErrLimit
- SpfTimeLimit
I'm happy to post more of the template as necessary, but it's obviously already getting quite long :)
Thanks!

Alert Manager SMS Notification

I have a Prometheus monitoring running on Kubernetes cluster. I want to receive SMS notification when my alerts firing.
How should i set my number for receive SMS in Alertmanager?
Couple options coming from official docs: https://prometheus.io/docs/alerting/configuration/
Option 1. If you have PagerDuty / VictorOps subscription use https://prometheus.io/docs/alerting/configuration/#pagerduty_config receiver, and setup SMS rule inside the service.
Option 2. Use a webhook receiver https://prometheus.io/docs/alerting/configuration/#webhook_config
Set it to send notification to AWS SNS https://docs.aws.amazon.com/sns/latest/dg/sns-http-https-endpoint-as-subscriber.html, then use AWS SNS to send an SMS. Or use any other webhook based SMS sender.
The best and most simple option is just to use the sns_configs in alert-manager, This is my configuration on the prometheus-operator helm-chart in the alert-manager section, Just create an SNS topic give the pod/node permissions to that topic and use the configuration below in the values.yaml file:
alertmanager:
enabled: true
config:
inhibit_rules:
- source_matchers:
- 'severity = critical'
target_matchers:
- 'severity =~ warning|info'
equal:
- 'namespace'
- 'alertname'
- source_matchers:
- 'severity = warning'
target_matchers:
- 'severity = info'
equal:
- 'namespace'
- 'alertname'
- source_matchers:
- 'alertname = InfoInhibitor'
target_matchers:
- 'severity = info'
equal:
- 'namespace'
global:
resolve_timeout: 5m
smtp_require_tls: true
smtp_smarthost: 'email-smtp.eu-central-1.amazonaws.com:587'
smtp_from: 'alertmanager#bubu.energy'
smtp_auth_username: 'ZZZZ'
smtp_auth_password: 'ZZZZ'
slack_api_url: 'https://hooks.slack.com/services/T02GV75J1HP/B03QN9JL0J0/lXXCX'
route:
receiver: 'weev-sns'
group_by: ['alertname', 'service']
routes:
- receiver: 'weev-sns'
match:
alertname: 'Watchdog'
group_wait: '120s'
group_interval: '1m'
repeat_interval: '1m'
receivers:
- name: 'weev-sns'
sns_configs:
- sigv4:
region: 'eu-central-1'
attributes:
key: severity
value: "critical"
topic_arn: 'arn:aws:sns:eu-central-1:104553556165:alertmanagertopic'
send_resolved: false

Storm-kafka: set startOffsetTime to kafka.api.OffsetRequest.LatestTime in apache Flux Yaml topology

I am working on a topology using apache flux. Currently, strom fetches messages from beginning but I want it to fetch only the latest messages from kafka.
I am writing topology in YAML file.
This is how my spoutConfig looks like:
- id: "stringScheme"
className: "org.apache.storm.kafka.StringScheme"
- id: "stringMultiScheme"
className: "org.apache.storm.spout.SchemeAsMultiScheme"
constructorArgs:
- ref: "stringScheme"
- id: "zkHosts"
className: "org.apache.storm.kafka.ZkHosts"
constructorArgs:
- "172.25.33.191:2181"
- id: "spoutConfig"
className: "org.apache.storm.kafka.SpoutConfig"
constructorArgs:
- ref: "zkHosts"
- "blockdata"
- ""
- "myId"
properties:
- name: "scheme"
ref: "stringMultiScheme"
- name: "ignoreZkOffsets"
value: true
- name: "startOffsetTime"
ref: "XXXXXXXXX"
Now, I am stuck. How do I set startOffsetTime to proper function to get only the latest messages from kafka?
I have tried ref:"LatestTime", but no matter what I put in there, it give me error :
java.lang.IllegalArgumentException: Can not set long field org.apache.storm.kafka.KafkaConfig.startOffsetTime to null value
I believe Flux can handle calling static factory methods.
- id: "startingOffsetTime"
className: "kafka.api.OffsetRequest"
factory: "LatestTime"
and then use it in your SpoutConfig definition like
properties:
- name: "startOffsetTime"
ref: "startingOffsetTime"
I haven't tested this, but I think it should work. The ability to call static factory methods was merged a while back https://issues.apache.org/jira/browse/STORM-2796, but it seems to be missing from the documentation. I've raised an issue to update the docs https://issues.apache.org/jira/browse/STORM-3086.
In case you'd like to see an example of this feature, take a look at https://github.com/apache/storm/blob/master/flux/flux-core/src/test/resources/configs/config-methods-test.yaml#L38

(<unknown>): did not find expected alphabetic or numeric character while scanning an anchor at line 74 column 16

(full file: http://pastebin.com/jpTn5wqH)
groups:
Member:
options:
default: true
prefix: '&f[&7Nomad&f]’
permissions:
- essentials.kits.Nomad
- essentials.kit.Nomad
- bungeechat.global
- bungeecord.command.server
- essentials.msg
- essentials.message
- towny.leave
- essentials.mail
- essentials.mail.send
- essentials.warp.list
- essentials.warp
- libsdisguise.disguise.*
- essentials.balancetop
- essentials.balance
- bukkit.command.plugins
- towny.command.town.add
- towny.claimed.owntown.build.*
- ChestShop.shop.buy
- ChestShop.shop.sell
- ChestShop.shop.create
- essentials.plugins
- essentials.ping
- essentials.rules
- essentials.balance.others
- MyPet.command.trade.offer
- essentials.killall
- bukkit.plugins
- bukkit.plugin
- essentials.kit.peasant
- essentials.pay
- ontime.player.*
- towny.chat.town
- towny.chat.general
- towny.wild.*
- towny.command.town.buy
- towny.command.plot.claim
- mcmmo.repair.*
- essentials.ignore
- essentials.money
- essentials.help
- essentials.build
- essentials.list
- essentials.help
- essentials.kit
- essentials.spawn
- essentials.afk
- essentials.r
- essentials.respond
- essentials.talk
- essentials.home
- essentials.tpdeny
- essentials.tpaccept
- essentials.tpask
- essentials.tpa
- essentials.sethome
- essentials.delhome
- auctions.command.start
- auctions.command.info
- auctions.command.queue
- auctions.command.end
- auctions.command.ignore
- auctions.command.bid
- auctions.command.cancel
inheritance:
- Member
Builder:
options:
prefix: '&0[&2Builder&0]&r'
inheritance:
- Member
permissions:
- worldguard.region.bypass.world
- essentials.gamemode.Adventure
- essentials.gamemode.survival
- essentials.gamemode.spectator
- essentials.gamemode.creative
- essentials.mute
- essentials.gamemode.others
- essentials.gamemode.*
- essentials.gamemode
- worldedit.*
Head Builder:
options:
prefix: '&r[&aHead Builder&r]&r' # line 74
inheritance:
- Builder
- Member
- King
Perms For PermX Minecraft Plugin
What is wrong with the file?
Your YAML file starts with:
groups:
Member:
options:
default: true
prefix: '&f[&7Nomad&f]’
permissions:
- essentials.kits.Nomad
- essentials.kit.Nomad
and around line 74 has:
Builder:
options:
prefix: '&0[&2Builder&0]&r'
inheritance:
- Member
permissions:
- worldguard.region.bypass.world
- essentials.gamemode.Adventure
The line:
prefix: '&f[&7Nomad&f]’
starts a string (with the ') that ends on the line 74 followed by an unexpected character. You most likely want to change the ’ at the end of that line 5, as it is probably a typo and should be '.
With that change the file parses correctly.