input: Write a function to create a simple chatbot using Python and Dialogflow, which can answer questions about the current days of the week. The function should use Flask to create an API endpoint that handles GET and POST requests. It should call Dialogflow's detect_intent_texts method to process the text input and return a response.
  
  from flask import Flask
  from flask_restful import Resource, Api
  from dialogflow import detect_intent_texts
  
  app = Flask(__name__)
  api = Api(app)
  
  @app.route('/', methods=['GET', 'POST'])
  def detect_intent_text():
      if not session_id:
          session_id = create_session_id()
      request = detect_intent_texts(session_id, text)
      response = request.fulfillment_text
      return response
  
  if __name__ == '__main__':
      app.run()
  
  assert detect_intent_text('What day is it today?') == "Today is Monday."
  assert detect_intent_text('Can you tell me today's date?') == "Today is November 21st."
  assert detect_intent_text('') == ""
  assert detect_intent_text('What is the capital of France?') == "I can only answer questions about the current days of the week."
  assert detect_intent_text('What is the weather like today?') == "I can only answer questions about the current days of the week."
output: 
  def detect_intent_text(text):
      session_id = "unique_session_id"
      project_id = "your_project_id"
      language_code = "en"
      response = detect_intent_texts(project_id, session_id, [text], language_code)
      return response[0].query_result.fulfillment_text
  