class_docstr: Natural language generator that generates messages based on responses.
  
  The responses can use variables to customize the utterances based on the
  state of the dialogue.
class_docstr_tok: ["Natural","language","generator","that","generates","messages","based","on","responses",".","The","responses","can","use","variables","to","customize","the","utterances","based","on","the","state","of","the","dialogue","."]
docstr: Generate a response for the requested utter action.
docstr_tok: ["Generate","a","response","for","the","requested","utter","action","."]
code: def generate_from_slots(
      self,
      utter_action: Text,
      filled_slots: Dict[Text, Any],
      output_channel: Text,
      **kwargs: Any,
  ) -> Optional[Dict[Text, Any]]:
      """Generate a response for the requested utter action."""
      # Fetching a random response for the passed utter action
      r = copy.deepcopy(
          self._random_response_for(
              utter_action, output_channel, filled_slots
          )
      )
      # Filling the slots in the response with placeholders and returning the response
      if r is not None:
          return self._fill_response(r, filled_slots, **kwargs)
      else:
          return None
  
file_path: rasa/rasa/core/nlg/response.py
imports: import copy
  import logging
  from rasa.shared.core.trackers import DialogueStateTracker
  from typing import Text, Any, Dict, Optional, List
  from rasa.core.nlg import interpolator
  from rasa.core.nlg.generator import NaturalLanguageGenerator, ResponseVariationFilter
  from rasa.shared.constants import RESPONSE_CONDITION
label_desc: Use image node_id 3 for calling the TemplatedNaturalLanguageGenerator obj's underlying member method code with example usage: obj.generate_from_slots(utter_action, filled_slots, output_channel) and returns: self, None