actions.action_conf_sessions

Module Contents

Classes

ActionGiveSessionRecommendation

ValidateSessionRecommenderForm

ActionGiveSpeakerName

ActionInfoNextSession

ActionKeynoteSpeakers

ActionKeynoteInfo

ActionConferenceSchedule

ActionSessionInformation

Functions

check_day(→ str)

Matches the name of a day to a date.

get_session_information(→ list)

Gets information about sessions.

recommend_session(→ list)

Matches entered phrase with keywords and recommends session.

get_current_date_and_time(→ datetime.datetime)

Returns current date and time.

check_session_number(→ str)

Matches words and numbers.

format_timeslot(→ str)

Formats timeslot extracted from DB to text.

Attributes

ENDDATE

DB_NAME

actions.action_conf_sessions.ENDDATE
actions.action_conf_sessions.DB_NAME = 'conference'
class actions.action_conf_sessions.ActionGiveSessionRecommendation

Bases: rasa_sdk.Action

name() Text
run(dispatcher: rasa_sdk.executor.CollectingDispatcher, tracker: rasa_sdk.Tracker, domain: Dict[Text, Any]) List[Dict[Text, Any]]

Clears the slots after giving recommendation

Parameters
  • dispatcher – Class responsible for sending messages back to user.

  • tracker – Class that maintains the state of a conversation.

  • domain – Dictionary containing information stored in ‘domain.yml’.

class actions.action_conf_sessions.ValidateSessionRecommenderForm

Bases: rasa_sdk.FormValidationAction

name() Text
validate_session_topic(slot_value: Any, dispatcher: rasa_sdk.executor.CollectingDispatcher, tracker: rasa_sdk.Tracker, domain: rasa_sdk.types.DomainDict, index=0) Dict[Text, Any]

Checks the session topic

Parameters
  • slot_value – What the slot contains

  • dispatcher – Class responsible for sending messages back to user.

  • tracker – Class that maintains the state of a conversation.

  • domain – Dictionary containing information stored in ‘domain.yml’.

  • index – Number to pick from the top 5 recommendations

validate_session_new(slot_value: Any, dispatcher: rasa_sdk.executor.CollectingDispatcher, tracker: rasa_sdk.Tracker, domain: rasa_sdk.types.DomainDict) Dict[Text, Any]

Checks if user accepts or declines recommendation.

class actions.action_conf_sessions.ActionGiveSpeakerName

Bases: rasa_sdk.Action

name() Text
run(dispatcher: rasa_sdk.executor.CollectingDispatcher, tracker: rasa_sdk.Tracker, domain: Dict[Text, Any]) List[Dict[Text, Any]]

Finds information about a speaker.

Parameters
  • dispatcher – Class responsible for sending messages back to user.

  • tracker – Class that maintains the state of a conversation.

  • domain – Dictionary containing information stored in ‘domain.yml’.

class actions.action_conf_sessions.ActionInfoNextSession

Bases: rasa_sdk.Action

name() Text
run(dispatcher: rasa_sdk.executor.CollectingDispatcher, tracker: rasa_sdk.Tracker, domain: Dict[Text, Any]) List[Dict[Text, Any]]

Finds information about next session

Parameters
  • dispatcher – Class responsible for sending messages back to user.

  • tracker – Class that maintains the state of a conversation.

  • domain – Dictionary containing information stored in ‘domain.yml’.

class actions.action_conf_sessions.ActionKeynoteSpeakers

Bases: rasa_sdk.Action

name() Text
run(dispatcher: rasa_sdk.executor.CollectingDispatcher, tracker: rasa_sdk.Tracker, domain: Dict[Text, Any]) List[Dict[Text, Any]]

Gives information about the keynotes.

Parameters
  • dispatcher – Class responsible for sending messages back to user.

  • tracker – Class that maintains the state of a conversation.

  • domain – Dictionary containing information stored in ‘domain.yml’.

class actions.action_conf_sessions.ActionKeynoteInfo

Bases: rasa_sdk.Action

name() Text
run(dispatcher: rasa_sdk.executor.CollectingDispatcher, tracker: rasa_sdk.Tracker, domain: Dict[Text, Any]) List[Dict[Text, Any]]

Gives more information about keynotes.

Parameters
  • dispatcher – Class responsible for sending messages back to user.

  • tracker – Class that maintains the state of a conversation.

  • domain – Dictionary containing information stored in ‘domain.yml’.

class actions.action_conf_sessions.ActionConferenceSchedule

Bases: rasa_sdk.Action

name() Text
run(dispatcher: rasa_sdk.executor.CollectingDispatcher, tracker: rasa_sdk.Tracker, domain: Dict[Text, Any]) List[Dict[Text, Any]]

Gets the schedule for the conference.

Parameters
  • dispatcher – Class responsible for sending messages back to user.

  • tracker – Class that maintains the state of a conversation.

  • domain – Dictionary containing information stored in ‘domain.yml’.

class actions.action_conf_sessions.ActionSessionInformation

Bases: rasa_sdk.Action

name() Text
run(dispatcher: rasa_sdk.executor.CollectingDispatcher, tracker: rasa_sdk.Tracker, domain: Dict[Text, Any]) List[Dict[Text, Any]]

Gets information about a session.

Parameters
  • dispatcher – Class responsible for sending messages back to user.

  • tracker – Class that maintains the state of a conversation.

  • domain – Dictionary containing information stored in ‘domain.yml’.

actions.action_conf_sessions.check_day(day) str

Matches the name of a day to a date.

Parameters

day – The day

Returns

The date.

actions.action_conf_sessions.get_session_information(db) list

Gets information about sessions.

Parameters

db – The database it will use.

Returns

A list of sessions.

actions.action_conf_sessions.recommend_session(phrase) list

Matches entered phrase with keywords and recommends session.

Returns

A list with the 5 most relevant sessions.

actions.action_conf_sessions.get_current_date_and_time() datetime.datetime

Returns current date and time.

actions.action_conf_sessions.check_session_number(type) str

Matches words and numbers.

Parameters

type – A session type.

Returns

A session type with appropriate number.

actions.action_conf_sessions.format_timeslot(timeslot: Tuple) str

Formats timeslot extracted from DB to text.

Parameters

timeslot – DB entry.

Returns

Timeslot formatted in plain text.