class_docstr: Generate bot utterances by using a remote endpoint for the generation.
  
  The generator will call the endpoint for each message it wants to
  generate. The endpoint needs to respond with a properly formatted
  json. The generator will use this message to create a response for
  the bot.
class_docstr_tok: ["Generate","bot","utterances","by","using","a","remote","endpoint","for","the","generation",".","The","generator","will","call","the","endpoint","for","each","message","it","wants","to","generate",".","The","endpoint","needs","to","respond","with","a","properly","formatted","json",".","The","generator","will","use","this","message","to","create","a","response","for","the","bot","."]
docstr: Fetch the response id for the utter action.
  
  The response id is retrieved from the domain responses for the
  utter action given the tracker state and channel.
docstr_tok: ["Fetch","the","response","id","for","the","utter","action",".","The","response","id","is","retrieved","from","the","domain","responses","for","the","utter","action","given","the","tracker","state","and","channel","."]
code: def fetch_response_id(
      utter_action: Text,
      tracker: DialogueStateTracker,
      output_channel: Text,
      domain_responses: Optional[Dict[Text, List[Dict[Text, Any]]]],
  ) -> Optional[Text]:
      """Fetch the response id for the utter action.
  
      The response id is retrieved from the domain responses for the
      utter action given the tracker state and channel.
      """
      if domain_responses is None:
          logger.debug(
              "Failed to fetch response id. Responses not provided."
          )
          return None
  
      response_filter = ResponseVariationFilter(domain_responses)
      response_id = response_filter.get_response_variation_id(
          utter_action, tracker, output_channel
      )
  
      if response_id is None:
          logger.debug(
              f"Failed to fetch response id for action '{utter_action}'."
          )
  
      return response_id
  
file_path: rasa/rasa/core/nlg/callback.py
imports: import json
  import logging
  from typing import List, Text, Any, Dict, Optional
  from rasa.core.constants import DEFAULT_REQUEST_TIMEOUT
  from rasa.core.nlg.generator import NaturalLanguageGenerator, ResponseVariationFilter
  from rasa.shared.core.trackers import DialogueStateTracker, EventVerbosity
  from rasa.shared.exceptions import RasaException
  from rasa.utils.endpoints import EndpointConfig
label_desc: Use image node_id 3 for calling the CallbackNaturalLanguageGenerator obj's underlying member method code with example usage: obj.fetch_response_id(utter_action, tracker, output_channel, domain_responses) and returns: response_id, None