Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.

Enable webhook for a intent #64

Closed
Akashutreja opened this issue Jun 21, 2018 · 2 comments
Closed

Enable webhook for a intent #64

Akashutreja opened this issue Jun 21, 2018 · 2 comments
Assignees
Labels
api: dialogflow Issues related to the googleapis/python-dialogflow API. 🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@Akashutreja
Copy link

can anyone please tell how to enable webhook of a intent as defined here:
https://cloud.google.com/dialogflow-enterprise/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.Intent.WebhookState

I am not able to access how to use webhookstate enum.
I am doing
intent = dialogflow.types.Intent(
display_name=display_name,
training_phrases=training_phrases,
messages=[message],
output_contexts=[
dialogflow.types.Context(
name=contexts_client.context_path("fir-chatbot-ccc2d", "-", "next-output"),lifespan_count=1)],
input_context_names=["projects/project_id/agent/sessions/-/contexts/name"],
webhook_state=webhookstate.WEBHOOK_STATE_ENABLED
)

it is showing following error NameError: name 'webhookstate' is not defined.
please help!
Thanks

@dysnomia
Copy link

The enum value is in dialogflow.enums.Intent.WebhookState.WEBHOOK_STATE_ENABLED.

@Akashutreja
Copy link
Author

Thanks @dysnomia it worked!

@google-cloud-label-sync google-cloud-label-sync bot added the api: dialogflow Issues related to the googleapis/python-dialogflow API. label Jan 31, 2020
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: dialogflow Issues related to the googleapis/python-dialogflow API. 🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants