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.

Sample Source Code Try it
Agents.delete_agent source code Open in Cloud Shell
Agents.export_agent source code Open in Cloud Shell
Agents.get_agent source code Open in Cloud Shell
Agents.get_validation_result source code Open in Cloud Shell
Agents.import_agent source code Open in Cloud Shell
Agents.restore_agent source code Open in Cloud Shell
Agents.search_agents source code Open in Cloud Shell
Agents.set_agent source code Open in Cloud Shell
Agents.train_agent source code Open in Cloud Shell
Answer_records.list_answer_records source code Open in Cloud Shell
Answer_records.update_answer_record source code Open in Cloud Shell
Contexts.create_context source code Open in Cloud Shell
Contexts.delete_all_contexts source code Open in Cloud Shell
Contexts.delete_context source code Open in Cloud Shell
Contexts.get_context source code Open in Cloud Shell
Contexts.list_contexts source code Open in Cloud Shell
Contexts.update_context source code Open in Cloud Shell
Conversation_datasets.create_conversation_dataset source code Open in Cloud Shell
Conversation_datasets.delete_conversation_dataset source code Open in Cloud Shell
Conversation_datasets.get_conversation_dataset source code Open in Cloud Shell
Conversation_datasets.import_conversation_data source code Open in Cloud Shell
Conversation_datasets.list_conversation_datasets source code Open in Cloud Shell
Conversation_models.create_conversation_model source code Open in Cloud Shell
Conversation_models.create_conversation_model_evaluation source code Open in Cloud Shell
Conversation_models.delete_conversation_model source code Open in Cloud Shell
Conversation_models.deploy_conversation_model source code Open in Cloud Shell
Conversation_models.get_conversation_model source code Open in Cloud Shell
Conversation_models.get_conversation_model_evaluation source code Open in Cloud Shell
Conversation_models.list_conversation_model_evaluations source code Open in Cloud Shell
Conversation_models.list_conversation_models source code Open in Cloud Shell
Conversation_models.undeploy_conversation_model source code Open in Cloud Shell
Conversation_profiles.clear_suggestion_feature_config source code Open in Cloud Shell
Conversation_profiles.create_conversation_profile source code Open in Cloud Shell
Conversation_profiles.delete_conversation_profile source code Open in Cloud Shell
Conversation_profiles.get_conversation_profile source code Open in Cloud Shell
Conversation_profiles.list_conversation_profiles source code Open in Cloud Shell
Conversation_profiles.set_suggestion_feature_config source code Open in Cloud Shell
Conversation_profiles.update_conversation_profile source code Open in Cloud Shell
Conversations.complete_conversation source code Open in Cloud Shell
Conversations.create_conversation source code Open in Cloud Shell
Conversations.generate_stateless_summary source code Open in Cloud Shell
Conversations.get_conversation source code Open in Cloud Shell
Conversations.list_conversations source code Open in Cloud Shell
Conversations.list_messages source code Open in Cloud Shell
Conversations.search_knowledge source code Open in Cloud Shell
Conversations.suggest_conversation_summary source code Open in Cloud Shell
Documents.create_document source code Open in Cloud Shell
Documents.delete_document source code Open in Cloud Shell
Documents.export_document source code Open in Cloud Shell
Documents.get_document source code Open in Cloud Shell
Documents.import_documents source code Open in Cloud Shell
Documents.list_documents source code Open in Cloud Shell
Documents.reload_document source code Open in Cloud Shell
Documents.update_document source code Open in Cloud Shell
Entity_types.batch_create_entities source code Open in Cloud Shell
Entity_types.batch_delete_entities source code Open in Cloud Shell
Entity_types.batch_delete_entity_types source code Open in Cloud Shell
Entity_types.batch_update_entities source code Open in Cloud Shell
Entity_types.batch_update_entity_types source code Open in Cloud Shell
Entity_types.create_entity_type source code Open in Cloud Shell
Entity_types.delete_entity_type source code Open in Cloud Shell
Entity_types.get_entity_type source code Open in Cloud Shell
Entity_types.list_entity_types source code Open in Cloud Shell
Entity_types.update_entity_type source code Open in Cloud Shell
Environments.create_environment source code Open in Cloud Shell
Environments.delete_environment source code Open in Cloud Shell
Environments.get_environment source code Open in Cloud Shell
Environments.get_environment_history source code Open in Cloud Shell
Environments.list_environments source code Open in Cloud Shell
Environments.update_environment source code Open in Cloud Shell
Fulfillments.get_fulfillment source code Open in Cloud Shell
Fulfillments.update_fulfillment source code Open in Cloud Shell
Intents.batch_delete_intents source code Open in Cloud Shell
Intents.batch_update_intents source code Open in Cloud Shell
Intents.create_intent source code Open in Cloud Shell
Intents.delete_intent source code Open in Cloud Shell
Intents.get_intent source code Open in Cloud Shell
Intents.list_intents source code Open in Cloud Shell
Intents.update_intent source code Open in Cloud Shell
Knowledge_bases.create_knowledge_base source code Open in Cloud Shell
Knowledge_bases.delete_knowledge_base source code Open in Cloud Shell
Knowledge_bases.get_knowledge_base source code Open in Cloud Shell
Knowledge_bases.list_knowledge_bases source code Open in Cloud Shell
Knowledge_bases.update_knowledge_base source code Open in Cloud Shell
Participants.analyze_content source code Open in Cloud Shell
Participants.create_participant source code Open in Cloud Shell
Participants.get_participant source code Open in Cloud Shell
Participants.list_participants source code Open in Cloud Shell
Participants.streaming_analyze_content source code Open in Cloud Shell
Participants.suggest_articles source code Open in Cloud Shell
Participants.suggest_faq_answers source code Open in Cloud Shell
Participants.suggest_smart_replies source code Open in Cloud Shell
Participants.update_participant source code Open in Cloud Shell
Session_entity_types.create_session_entity_type source code Open in Cloud Shell
Session_entity_types.delete_session_entity_type source code Open in Cloud Shell
Session_entity_types.get_session_entity_type source code Open in Cloud Shell
Session_entity_types.list_session_entity_types source code Open in Cloud Shell
Session_entity_types.update_session_entity_type source code Open in Cloud Shell
Sessions.detect_intent source code Open in Cloud Shell
Sessions.streaming_detect_intent source code Open in Cloud Shell
Versions.create_version source code Open in Cloud Shell
Versions.delete_version source code Open in Cloud Shell
Versions.get_version source code Open in Cloud Shell
Versions.list_versions source code Open in Cloud Shell
Versions.update_version source code Open in Cloud Shell
Agents.delete_agent source code Open in Cloud Shell
Agents.export_agent source code Open in Cloud Shell
Agents.get_agent source code Open in Cloud Shell
Agents.get_validation_result source code Open in Cloud Shell
Agents.import_agent source code Open in Cloud Shell
Agents.restore_agent source code Open in Cloud Shell
Agents.search_agents source code Open in Cloud Shell
Agents.set_agent source code Open in Cloud Shell
Agents.train_agent source code Open in Cloud Shell
Answer_records.get_answer_record source code Open in Cloud Shell
Answer_records.list_answer_records source code Open in Cloud Shell
Answer_records.update_answer_record source code Open in Cloud Shell
Contexts.create_context source code Open in Cloud Shell
Contexts.delete_all_contexts source code Open in Cloud Shell
Contexts.delete_context source code Open in Cloud Shell
Contexts.get_context source code Open in Cloud Shell
Contexts.list_contexts source code Open in Cloud Shell
Contexts.update_context source code Open in Cloud Shell
Conversation_profiles.clear_suggestion_feature_config source code Open in Cloud Shell
Conversation_profiles.create_conversation_profile source code Open in Cloud Shell
Conversation_profiles.delete_conversation_profile source code Open in Cloud Shell
Conversation_profiles.get_conversation_profile source code Open in Cloud Shell
Conversation_profiles.list_conversation_profiles source code Open in Cloud Shell
Conversation_profiles.set_suggestion_feature_config source code Open in Cloud Shell
Conversation_profiles.update_conversation_profile source code Open in Cloud Shell
Conversations.batch_create_messages source code Open in Cloud Shell
Conversations.complete_conversation source code Open in Cloud Shell
Conversations.create_conversation source code Open in Cloud Shell
Conversations.generate_stateless_summary source code Open in Cloud Shell
Conversations.get_conversation source code Open in Cloud Shell
Conversations.list_conversations source code Open in Cloud Shell
Conversations.list_messages source code Open in Cloud Shell
Conversations.search_knowledge source code Open in Cloud Shell
Conversations.suggest_conversation_summary source code Open in Cloud Shell
Documents.create_document source code Open in Cloud Shell
Documents.delete_document source code Open in Cloud Shell
Documents.get_document source code Open in Cloud Shell
Documents.import_documents source code Open in Cloud Shell
Documents.list_documents source code Open in Cloud Shell
Documents.reload_document source code Open in Cloud Shell
Documents.update_document source code Open in Cloud Shell
Entity_types.batch_create_entities source code Open in Cloud Shell
Entity_types.batch_delete_entities source code Open in Cloud Shell
Entity_types.batch_delete_entity_types source code Open in Cloud Shell
Entity_types.batch_update_entities source code Open in Cloud Shell
Entity_types.batch_update_entity_types source code Open in Cloud Shell
Entity_types.create_entity_type source code Open in Cloud Shell
Entity_types.delete_entity_type source code Open in Cloud Shell
Entity_types.get_entity_type source code Open in Cloud Shell
Entity_types.list_entity_types source code Open in Cloud Shell
Entity_types.update_entity_type source code Open in Cloud Shell
Environments.create_environment source code Open in Cloud Shell
Environments.delete_environment source code Open in Cloud Shell
Environments.get_environment source code Open in Cloud Shell
Environments.get_environment_history source code Open in Cloud Shell
Environments.list_environments source code Open in Cloud Shell
Environments.update_environment source code Open in Cloud Shell
Fulfillments.get_fulfillment source code Open in Cloud Shell
Fulfillments.update_fulfillment source code Open in Cloud Shell
Intents.batch_delete_intents source code Open in Cloud Shell
Intents.batch_update_intents source code Open in Cloud Shell
Intents.create_intent source code Open in Cloud Shell
Intents.delete_intent source code Open in Cloud Shell
Intents.get_intent source code Open in Cloud Shell
Intents.list_intents source code Open in Cloud Shell
Intents.update_intent source code Open in Cloud Shell
Knowledge_bases.create_knowledge_base source code Open in Cloud Shell
Knowledge_bases.delete_knowledge_base source code Open in Cloud Shell
Knowledge_bases.get_knowledge_base source code Open in Cloud Shell
Knowledge_bases.list_knowledge_bases source code Open in Cloud Shell
Knowledge_bases.update_knowledge_base source code Open in Cloud Shell
Participants.analyze_content source code Open in Cloud Shell
Participants.compile_suggestion source code Open in Cloud Shell
Participants.create_participant source code Open in Cloud Shell
Participants.get_participant source code Open in Cloud Shell
Participants.list_participants source code Open in Cloud Shell
Participants.list_suggestions source code Open in Cloud Shell
Participants.streaming_analyze_content source code Open in Cloud Shell
Participants.suggest_articles source code Open in Cloud Shell
Participants.suggest_faq_answers source code Open in Cloud Shell
Participants.suggest_smart_replies source code Open in Cloud Shell
Participants.update_participant source code Open in Cloud Shell
Session_entity_types.create_session_entity_type source code Open in Cloud Shell
Session_entity_types.delete_session_entity_type source code Open in Cloud Shell
Session_entity_types.get_session_entity_type source code Open in Cloud Shell
Session_entity_types.list_session_entity_types source code Open in Cloud Shell
Session_entity_types.update_session_entity_type source code Open in Cloud Shell
Sessions.detect_intent source code Open in Cloud Shell
Sessions.streaming_detect_intent source code Open in Cloud Shell
Versions.create_version source code Open in Cloud Shell
Versions.delete_version source code Open in Cloud Shell
Versions.get_version source code Open in Cloud Shell
Versions.list_versions source code Open in Cloud Shell
Versions.update_version source code Open in Cloud Shell
Quickstart source code Open 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