def detect_intent_knowledge(project_id, session_id, language_code,<EOL>knowledge_base_id, texts):
import dialogflow_v2beta1 as dialogflow<EOL>session_client = dialogflow.SessionsClient()<EOL>session_path = session_client.session_path(project_id, session_id)<EOL>print('<STR_LIT>'.format(session_path))<EOL>for text in texts:<EOL><INDENT>text_input = dialogflow.types.TextInput(<EOL>text=text, language_code=language_code)<EOL>query_input = dialogflow.types.QueryInput(text=text_input)<EOL>knowledge_base_path = dialogflow.knowledge_bases_client.KnowledgeBasesClient.knowledge_base_path(project_id, knowledge_base_id)<EOL>query_params = dialogflow.types.QueryParameters(<EOL>knowledge_base_names=[knowledge_base_path])<EOL>response = session_client.detect_intent(<EOL>session=session_path, query_input=query_input,<EOL>query_params=query_params)<EOL>print('<STR_LIT:=>' * <NUM_LIT:20>)<EOL>print('<STR_LIT>'.format(response.query_result.query_text))<EOL>print('<STR_LIT>'.format(<EOL>response.query_result.intent.display_name,<EOL>response.query_result.intent_detection_confidence))<EOL>print('<STR_LIT>'.format(<EOL>response.query_result.fulfillment_text))<EOL>print('<STR_LIT>')<EOL>knowledge_answers = response.query_result.knowledge_answers<EOL>for answers in knowledge_answers.answers:<EOL><INDENT>print('<STR_LIT>'.format(answers.answer))<EOL>print('<STR_LIT>'.format(<EOL>answers.match_confidence))<EOL><DEDENT><DEDENT>
Returns the result of detect intent with querying Knowledge Connector.

    Args:
    project_id: The GCP project linked with the agent you are going to query.
    session_id: Id of the session, using the same `session_id` between requests
              allows continuation of the conversation.
    language_code: Language of the queries.
    knowledge_base_id: The Knowledge base's id to query against.
    texts: A list of text queries to send.