rasa_sdk v0.5.0 RasaSDK.Responses.Context

Link to this section Summary

Functions

Return the currently set values of the slots

Get entity values found for the passed entity name in latest msg.

Retrieves the value of a slot.

Get the name of the input_channel of the latest UserUttered event

Link to this section Types

Specs

t() :: %RasaSDK.Responses.Context{
  error: RasaSDK.Model.NLGResponseRejected.t() | nil,
  request: RasaSDK.Model.NLGRequest.t(),
  response: RasaSDK.Model.NLGResponseOk.t()
}

Link to this section Functions

Link to this function

current_slot_values(context)

Return the currently set values of the slots

Link to this function

get_latest_entities(context, entity_type, opts \\ [])

Get entity values found for the passed entity name in latest msg.

If you are only interested in the first entity of a given type use get_latest_entities(tracker, "my_entity_name") |> List.first(). If no entity is found nil is the default result.

Link to this function

get_slot(context, key)

Retrieves the value of a slot.

Link to this function

latest_event_time(context)

Link to this function

latest_input_channel(context)

Get the name of the input_channel of the latest UserUttered event

Link to this function

set_error(context, response_name, error)

Link to this function

set_response(context, response)

Link to this function

set_response(context, response, personality)