Я пытался вызвать api диалогового потока, используя python, но получаю сообщение об ошибке, так как "Module 'dialogflow_v2.types" не имеет элемента "QueryInput" ", пожалуйста, помогите мне.
import dialogflow
defdetect_intent_texts (project_id, session_id, тексты, language_code): session_client = dialogflow.SessionsClient ()
session = session_client.session_path(project_id, session_id)
print('Session path: {}\n'.format(session))
for text in texts:
text_input = dialogflow.types.TextInput(text=text, language_code=language_code)
query_input = dialogflow.types.QueryInput(text=text_input)
response = session_client.detect_intent(session=session, query_input=query_input)
print('Fulfillment text: {}\n'.format(response.query_result.fulfillment_text))
detect_intent_texts ("upcl-b0ba9", "abcd", ["hello"], "en-US")