Skip to content

Instantly share code, notes, and snippets.

@hitherejoe
Created February 10, 2019 20:45
Show Gist options
  • Save hitherejoe/7249bbfd4ff74687dff47762a883c2ff to your computer and use it in GitHub Desktop.
Save hitherejoe/7249bbfd4ff74687dff47762a883c2ff to your computer and use it in GitHub Desktop.
import dialogflow_v2 as dialogflow
session_client = dialogflow.SessionsClient()
session = session_client.session_path("google_project_id", session_id)
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)
self.lastResponse = response.query_result.fulfillment_text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment