class_docstr: Filters response variations based on the channel, action and condition.
class_docstr_tok: ["Filters","response","variations","based","on","the","channel",",","action","and","condition","."]
docstr: Returns the first matched response variation ID.
  
  This ID corresponds to the response variation that fits
  the channel, action and condition.
docstr_tok: ["Returns","the","first","matched","response","variation","ID",".","This","ID","corresponds","to","the","response","variation","that","fits","the","channel",",","action","and","condition","."]
code: def get_response_variation_id(
      self,
      utter_action: Text,
      tracker: DialogueStateTracker,
      output_channel: Text,
  ) -> Optional[Text]:
      """Returns the first matched response variation ID.
  
      This ID corresponds to the response variation that fits
      the channel, action and condition.
      """
      filled_slots = tracker.current_slot_values()
      if utter_action in self.responses:
          eligible_variations = self.responses_for_utter_action(
              utter_action, output_channel, filled_slots
          )
          response_ids_are_valid = self._validate_response_ids(
              eligible_variations
          )
  
          if eligible_variations and response_ids_are_valid:
              return eligible_variations[0].get("id")
  
      return None
  
file_path: rasa/rasa/core/nlg/generator.py
imports: import logging
  from typing import List, Optional, Union, Text, Any, Dict
  import rasa.shared.utils.common
  import rasa.shared.utils.io
  from rasa.shared.constants import CHANNEL, RESPONSE_CONDITION
  from rasa.shared.core.domain import Domain
  from rasa.utils.endpoints import EndpointConfig
  from rasa.shared.core.trackers import DialogueStateTracker
label_desc: Use image node_id 4 for calling the ResponseVariationFilter obj's underlying member method code with example usage: obj.get_response_variation_id(utter_action, tracker, output_channel) and returns: None, eligible_variations