Dialogflow API: Node.js Client

release level npm version

Dialogflow API client for Node.js

A comprehensive list of changes in each version may be found in the CHANGELOG.

Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in Client Libraries Explained.

Table of contents:

Quickstart

Before you begin

  1. Select or create a Cloud Platform project.
  2. Enable billing for your project.
  3. Enable the Dialogflow API API.
  4. Set up authentication with a service account so you can access the API from your local workstation.

Installing the client library

npm install @google-cloud/dialogflow

Samples

Samples are in the samples/ directory. Each sample's README.md has instructions for running its sample.

SampleSource CodeTry it
Agents.delete_agentsource codeOpen in Cloud Shell
Agents.export_agentsource codeOpen in Cloud Shell
Agents.get_agentsource codeOpen in Cloud Shell
Agents.get_validation_resultsource codeOpen in Cloud Shell
Agents.import_agentsource codeOpen in Cloud Shell
Agents.restore_agentsource codeOpen in Cloud Shell
Agents.search_agentssource codeOpen in Cloud Shell
Agents.set_agentsource codeOpen in Cloud Shell
Agents.train_agentsource codeOpen in Cloud Shell
Answer_records.list_answer_recordssource codeOpen in Cloud Shell
Answer_records.update_answer_recordsource codeOpen in Cloud Shell
Contexts.create_contextsource codeOpen in Cloud Shell
Contexts.delete_all_contextssource codeOpen in Cloud Shell
Contexts.delete_contextsource codeOpen in Cloud Shell
Contexts.get_contextsource codeOpen in Cloud Shell
Contexts.list_contextssource codeOpen in Cloud Shell
Contexts.update_contextsource codeOpen in Cloud Shell
Conversation_datasets.create_conversation_datasetsource codeOpen in Cloud Shell
Conversation_datasets.delete_conversation_datasetsource codeOpen in Cloud Shell
Conversation_datasets.get_conversation_datasetsource codeOpen in Cloud Shell
Conversation_datasets.import_conversation_datasource codeOpen in Cloud Shell
Conversation_datasets.list_conversation_datasetssource codeOpen in Cloud Shell
Conversation_models.create_conversation_modelsource codeOpen in Cloud Shell
Conversation_models.create_conversation_model_evaluationsource codeOpen in Cloud Shell
Conversation_models.delete_conversation_modelsource codeOpen in Cloud Shell
Conversation_models.deploy_conversation_modelsource codeOpen in Cloud Shell
Conversation_models.get_conversation_modelsource codeOpen in Cloud Shell
Conversation_models.get_conversation_model_evaluationsource codeOpen in Cloud Shell
Conversation_models.list_conversation_model_evaluationssource codeOpen in Cloud Shell
Conversation_models.list_conversation_modelssource codeOpen in Cloud Shell
Conversation_models.undeploy_conversation_modelsource codeOpen in Cloud Shell
Conversation_profiles.clear_suggestion_feature_configsource codeOpen in Cloud Shell
Conversation_profiles.create_conversation_profilesource codeOpen in Cloud Shell
Conversation_profiles.delete_conversation_profilesource codeOpen in Cloud Shell
Conversation_profiles.get_conversation_profilesource codeOpen in Cloud Shell
Conversation_profiles.list_conversation_profilessource codeOpen in Cloud Shell
Conversation_profiles.set_suggestion_feature_configsource codeOpen in Cloud Shell
Conversation_profiles.update_conversation_profilesource codeOpen in Cloud Shell
Conversations.complete_conversationsource codeOpen in Cloud Shell
Conversations.create_conversationsource codeOpen in Cloud Shell
Conversations.generate_stateless_summarysource codeOpen in Cloud Shell
Conversations.get_conversationsource codeOpen in Cloud Shell
Conversations.list_conversationssource codeOpen in Cloud Shell
Conversations.list_messagessource codeOpen in Cloud Shell
Conversations.search_knowledgesource codeOpen in Cloud Shell
Conversations.suggest_conversation_summarysource codeOpen in Cloud Shell
Documents.create_documentsource codeOpen in Cloud Shell
Documents.delete_documentsource codeOpen in Cloud Shell
Documents.export_documentsource codeOpen in Cloud Shell
Documents.get_documentsource codeOpen in Cloud Shell
Documents.import_documentssource codeOpen in Cloud Shell
Documents.list_documentssource codeOpen in Cloud Shell
Documents.reload_documentsource codeOpen in Cloud Shell
Documents.update_documentsource codeOpen in Cloud Shell
Entity_types.batch_create_entitiessource codeOpen in Cloud Shell
Entity_types.batch_delete_entitiessource codeOpen in Cloud Shell
Entity_types.batch_delete_entity_typessource codeOpen in Cloud Shell
Entity_types.batch_update_entitiessource codeOpen in Cloud Shell
Entity_types.batch_update_entity_typessource codeOpen in Cloud Shell
Entity_types.create_entity_typesource codeOpen in Cloud Shell
Entity_types.delete_entity_typesource codeOpen in Cloud Shell
Entity_types.get_entity_typesource codeOpen in Cloud Shell
Entity_types.list_entity_typessource codeOpen in Cloud Shell
Entity_types.update_entity_typesource codeOpen in Cloud Shell
Environments.create_environmentsource codeOpen in Cloud Shell
Environments.delete_environmentsource codeOpen in Cloud Shell
Environments.get_environmentsource codeOpen in Cloud Shell
Environments.get_environment_historysource codeOpen in Cloud Shell
Environments.list_environmentssource codeOpen in Cloud Shell
Environments.update_environmentsource codeOpen in Cloud Shell
Fulfillments.get_fulfillmentsource codeOpen in Cloud Shell
Fulfillments.update_fulfillmentsource codeOpen in Cloud Shell
Intents.batch_delete_intentssource codeOpen in Cloud Shell
Intents.batch_update_intentssource codeOpen in Cloud Shell
Intents.create_intentsource codeOpen in Cloud Shell
Intents.delete_intentsource codeOpen in Cloud Shell
Intents.get_intentsource codeOpen in Cloud Shell
Intents.list_intentssource codeOpen in Cloud Shell
Intents.update_intentsource codeOpen in Cloud Shell
Knowledge_bases.create_knowledge_basesource codeOpen in Cloud Shell
Knowledge_bases.delete_knowledge_basesource codeOpen in Cloud Shell
Knowledge_bases.get_knowledge_basesource codeOpen in Cloud Shell
Knowledge_bases.list_knowledge_basessource codeOpen in Cloud Shell
Knowledge_bases.update_knowledge_basesource codeOpen in Cloud Shell
Participants.analyze_contentsource codeOpen in Cloud Shell
Participants.create_participantsource codeOpen in Cloud Shell
Participants.get_participantsource codeOpen in Cloud Shell
Participants.list_participantssource codeOpen in Cloud Shell
Participants.streaming_analyze_contentsource codeOpen in Cloud Shell
Participants.suggest_articlessource codeOpen in Cloud Shell
Participants.suggest_faq_answerssource codeOpen in Cloud Shell
Participants.suggest_smart_repliessource codeOpen in Cloud Shell
Participants.update_participantsource codeOpen in Cloud Shell
Session_entity_types.create_session_entity_typesource codeOpen in Cloud Shell
Session_entity_types.delete_session_entity_typesource codeOpen in Cloud Shell
Session_entity_types.get_session_entity_typesource codeOpen in Cloud Shell
Session_entity_types.list_session_entity_typessource codeOpen in Cloud Shell
Session_entity_types.update_session_entity_typesource codeOpen in Cloud Shell
Sessions.detect_intentsource codeOpen in Cloud Shell
Sessions.streaming_detect_intentsource codeOpen in Cloud Shell
Versions.create_versionsource codeOpen in Cloud Shell
Versions.delete_versionsource codeOpen in Cloud Shell
Versions.get_versionsource codeOpen in Cloud Shell
Versions.list_versionssource codeOpen in Cloud Shell
Versions.update_versionsource codeOpen in Cloud Shell
Agents.delete_agentsource codeOpen in Cloud Shell
Agents.export_agentsource codeOpen in Cloud Shell
Agents.get_agentsource codeOpen in Cloud Shell
Agents.get_validation_resultsource codeOpen in Cloud Shell
Agents.import_agentsource codeOpen in Cloud Shell
Agents.restore_agentsource codeOpen in Cloud Shell
Agents.search_agentssource codeOpen in Cloud Shell
Agents.set_agentsource codeOpen in Cloud Shell
Agents.train_agentsource codeOpen in Cloud Shell
Answer_records.get_answer_recordsource codeOpen in Cloud Shell
Answer_records.list_answer_recordssource codeOpen in Cloud Shell
Answer_records.update_answer_recordsource codeOpen in Cloud Shell
Contexts.create_contextsource codeOpen in Cloud Shell
Contexts.delete_all_contextssource codeOpen in Cloud Shell
Contexts.delete_contextsource codeOpen in Cloud Shell
Contexts.get_contextsource codeOpen in Cloud Shell
Contexts.list_contextssource codeOpen in Cloud Shell
Contexts.update_contextsource codeOpen in Cloud Shell
Conversation_profiles.clear_suggestion_feature_configsource codeOpen in Cloud Shell
Conversation_profiles.create_conversation_profilesource codeOpen in Cloud Shell
Conversation_profiles.delete_conversation_profilesource codeOpen in Cloud Shell
Conversation_profiles.get_conversation_profilesource codeOpen in Cloud Shell
Conversation_profiles.list_conversation_profilessource codeOpen in Cloud Shell
Conversation_profiles.set_suggestion_feature_configsource codeOpen in Cloud Shell
Conversation_profiles.update_conversation_profilesource codeOpen in Cloud Shell
Conversations.batch_create_messagessource codeOpen in Cloud Shell
Conversations.complete_conversationsource codeOpen in Cloud Shell
Conversations.create_conversationsource codeOpen in Cloud Shell
Conversations.generate_stateless_summarysource codeOpen in Cloud Shell
Conversations.get_conversationsource codeOpen in Cloud Shell
Conversations.list_conversationssource codeOpen in Cloud Shell
Conversations.list_messagessource codeOpen in Cloud Shell
Conversations.search_knowledgesource codeOpen in Cloud Shell
Conversations.suggest_conversation_summarysource codeOpen in Cloud Shell
Documents.create_documentsource codeOpen in Cloud Shell
Documents.delete_documentsource codeOpen in Cloud Shell
Documents.get_documentsource codeOpen in Cloud Shell
Documents.import_documentssource codeOpen in Cloud Shell
Documents.list_documentssource codeOpen in Cloud Shell
Documents.reload_documentsource codeOpen in Cloud Shell
Documents.update_documentsource codeOpen in Cloud Shell
Entity_types.batch_create_entitiessource codeOpen in Cloud Shell
Entity_types.batch_delete_entitiessource codeOpen in Cloud Shell
Entity_types.batch_delete_entity_typessource codeOpen in Cloud Shell
Entity_types.batch_update_entitiessource codeOpen in Cloud Shell
Entity_types.batch_update_entity_typessource codeOpen in Cloud Shell
Entity_types.create_entity_typesource codeOpen in Cloud Shell
Entity_types.delete_entity_typesource codeOpen in Cloud Shell
Entity_types.get_entity_typesource codeOpen in Cloud Shell
Entity_types.list_entity_typessource codeOpen in Cloud Shell
Entity_types.update_entity_typesource codeOpen in Cloud Shell
Environments.create_environmentsource codeOpen in Cloud Shell
Environments.delete_environmentsource codeOpen in Cloud Shell
Environments.get_environmentsource codeOpen in Cloud Shell
Environments.get_environment_historysource codeOpen in Cloud Shell
Environments.list_environmentssource codeOpen in Cloud Shell
Environments.update_environmentsource codeOpen in Cloud Shell
Fulfillments.get_fulfillmentsource codeOpen in Cloud Shell
Fulfillments.update_fulfillmentsource codeOpen in Cloud Shell
Intents.batch_delete_intentssource codeOpen in Cloud Shell
Intents.batch_update_intentssource codeOpen in Cloud Shell
Intents.create_intentsource codeOpen in Cloud Shell
Intents.delete_intentsource codeOpen in Cloud Shell
Intents.get_intentsource codeOpen in Cloud Shell
Intents.list_intentssource codeOpen in Cloud Shell
Intents.update_intentsource codeOpen in Cloud Shell
Knowledge_bases.create_knowledge_basesource codeOpen in Cloud Shell
Knowledge_bases.delete_knowledge_basesource codeOpen in Cloud Shell
Knowledge_bases.get_knowledge_basesource codeOpen in Cloud Shell
Knowledge_bases.list_knowledge_basessource codeOpen in Cloud Shell
Knowledge_bases.update_knowledge_basesource codeOpen in Cloud Shell
Participants.analyze_contentsource codeOpen in Cloud Shell
Participants.compile_suggestionsource codeOpen in Cloud Shell
Participants.create_participantsource codeOpen in Cloud Shell
Participants.get_participantsource codeOpen in Cloud Shell
Participants.list_participantssource codeOpen in Cloud Shell
Participants.list_suggestionssource codeOpen in Cloud Shell
Participants.streaming_analyze_contentsource codeOpen in Cloud Shell
Participants.suggest_articlessource codeOpen in Cloud Shell
Participants.suggest_faq_answerssource codeOpen in Cloud Shell
Participants.suggest_smart_repliessource codeOpen in Cloud Shell
Participants.update_participantsource codeOpen in Cloud Shell
Session_entity_types.create_session_entity_typesource codeOpen in Cloud Shell
Session_entity_types.delete_session_entity_typesource codeOpen in Cloud Shell
Session_entity_types.get_session_entity_typesource codeOpen in Cloud Shell
Session_entity_types.list_session_entity_typessource codeOpen in Cloud Shell
Session_entity_types.update_session_entity_typesource codeOpen in Cloud Shell
Sessions.detect_intentsource codeOpen in Cloud Shell
Sessions.streaming_detect_intentsource codeOpen in Cloud Shell
Versions.create_versionsource codeOpen in Cloud Shell
Versions.delete_versionsource codeOpen in Cloud Shell
Versions.get_versionsource codeOpen in Cloud Shell
Versions.list_versionssource codeOpen in Cloud Shell
Versions.update_versionsource codeOpen in Cloud Shell
Quickstartsource codeOpen in Cloud Shell

The Dialogflow API Node.js Client API Reference documentation also contains samples.

Supported Node.js Versions

Our client libraries follow the Node.js release schedule. Libraries are compatible with all current active and maintenance versions of Node.js. If you are using an end-of-life version of Node.js, we recommend that you update as soon as possible to an actively supported LTS version.

Google's client libraries support legacy versions of Node.js runtimes on a best-efforts basis with the following warnings:

  • Legacy versions are not tested in continuous integration.
  • Some security patches and features cannot be backported.
  • Dependencies cannot be kept up-to-date.

Client libraries targeting some end-of-life versions of Node.js are available, and can be installed through npm dist-tags. The dist-tags follow the naming convention legacy-(version). For example, npm install @google-cloud/dialogflow@legacy-8 installs client libraries for versions compatible with Node.js 8.

Versioning

This library follows Semantic Versioning.

This library is considered to be stable. The code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation period. Issues and requests against stable libraries are addressed with the highest priority.

More Information: Google Cloud Platform Launch Stages

Contributing

Contributions welcome! See the Contributing Guide.

Please note that this README.md, the samples/README.md, and a variety of configuration files in this repository (including .nycrc and tsconfig.json) are generated from a central template. To edit one of these files, make an edit to its templates in directory.

License

Apache Version 2.0

See LICENSE