input: Write a function to implement an AI-based chatbot in Python that can answer simple queries about a product or service by referencing a predefined dictionary of answers. If the query is not found in the dictionary, the chatbot should return a randomly selected default response. The function should continuously prompt the user for input until the user types "Goodbye". If "Goodbye" is entered, the chatbot should terminate the conversation. The function should also print a welcome message at the beginning and a goodbye message at the end.
  def generate_response(question, answers):
      if question in answers:
          return answers[question]
      else:
          return random.choice(['I am not sure I understand.', 'Can you give me more information?', 'Can I help you with something else?'])
  
  assert generate_response("What is XYZ?", {'What is XYZ?': 'XYZ is a company that provides XYZ services.'}) == 'XYZ is a company that provides XYZ services.'
  assert generate_response("Where is XYZ located?", {'Where is XYZ located?': 'XYZ is located in ABC city.'}) == 'XYZ is located in ABC city.'
  assert generate_response("What does XYZ do?", {'What does XYZ do?': 'XYZ helps customers find solutions to their problems.'}) == 'XYZ helps customers find solutions to their problems.'
  assert generate_response("What are the benefits of using XYZ?", {'What are the benefits of using XYZ?': 'XYZ provides a quick and easy way to find solutions to your problems.'}) == 'XYZ provides a quick and easy way to find solutions to your problems.'
  assert generate_response("Unsupported query", {}) in ['I am not sure I understand.', 'Can you give me more information?', 'Can I help you with something else?']
output: 
  import random
  
  def chatbot(answers):
      print("Welcome to the AI chatbot! How can I assist you today?")
      while True:
          user_input = input("You: ")
          if user_input == "Goodbye":
              print("Goodbye! Have a great day!")
              break
          response = generate_response(user_input, answers)
          print(f"Bot: {response}")
  