Microsoft Bot Framework SDK for JavaScript

repository·main·Indexed 20 days ago

https://github.com/microsoft/botbuilder-js

A comprehensive framework for building enterprise-grade conversational AI experiences and bot applications using JavaScript. Version 4.13.0 includes the botbuilder-ai module for NLU integration with LUIS and QnA Maker/Custom Question Answering, as well as the adaptive-expressions library for evaluating runtime conditions in dialogs and language generation.

Tokens
139K
Snippets
492
Records
714
Agent score
72%

What's inside botbuilder-js

  1. Overview of botbuilder-ai module

    main

    The botbuilder-ai module provides AI-powered capabilities for the Bot Framework SDK, specifically focusing on integration with Natural Language Understanding (NLU) services. It includes support for:

    • LUIS (Language Understanding): Classes and interfaces for using LUIS recognizers, including adaptive recognizers and component registrations.
    • QnA Maker / Custom Question Answering: Tools for integrating question-and-answer services, including dialogs, clients, and card builders.
    • Data Structures: Specialized types for handling entities like DynamicList, GeographyV2, DateTimeSpec, and ExternalEntity within AI contexts.
  2. Overview of published Bot Framework SDK packages

    main

    The Bot Framework SDK for JavaScript is composed of several specialized packages. When choosing a package, note its stability status: Stable packages are recommended for production, while Preview packages are subject to change and should be used with caution.

    Key functional areas include:

    • Core Bot Logic: botbuilder, botbuilder-core, and botbuilder-dialogs.
    • AI & Orchestration: botbuilder-ai, botbuilder-ai-orchestrator (Preview), and botbuilder-ai-luis.
    • Azure Integration: botbuilder-azure and botbuilder-azure-blobs (Preview).
    • Adaptive Expressions: adaptive-expressions and adaptive-expressions-ie11 for evaluating expressions.
  3. Overview of Microsoft Bot Framework SDK for JavaScript

    main

    The Microsoft Bot Framework SDK for JavaScript is a framework for building enterprise-grade conversational AI experiences. It allows developers to model conversations and build sophisticated bot applications using JavaScript.

    While this repository focuses on JavaScript, SDKs are also available for .NET, Python, and Java (preview).

  4. What is included in botbuilder-azure

    main

    The botbuilder-azure package provides interfaces to use common Azure services as backends for Bot Builder's state storage. When used with UserState, ConversationState, or BotState, these interfaces automatically handle reading and writing values to the specified Azure service.

    Supported storage services:

    • Cosmos DB: via CosmosDbPartitionedStorage()
    • Azure Blob Storage: via BlobStorage()

    Additional features:

    • Chat Transcript Storage: AzureBlobTranscriptStore() allows you to store and retrieve chat transcripts in Azure Blob Storage.
  5. Use LuisBotComponent in Adaptive Dialogs

    main

    The botbuilder-ai-luis package provides the LuisBotComponent repackaged specifically for use as a component within the Adaptive Dialogs runtime. This allows you to integrate LUIS (Language Understanding Intelligent Service) capabilities directly into your adaptive dialog flows.

    For detailed information on the underlying implementation and AI capabilities, refer to the botbuilder-ai package documentation.

  6. Overview of Bot Builder plugins

    main

    The core botbuilder library handles basic connectivity. For advanced functionality, you can extend your bot with the following plugins:

    • botbuilder-dialogs: Provides a composable dialog system with built-in prompts (e.g., Yes/No, strings, numbers, enumerations).
    • botbuilder-ai: Integrates AI frameworks like LUIS and QnA Maker.
    • botbuilder-azure: Provides integration with Azure services like Cosmos DB and Blob Storage.
  7. What is QnAMakerDialog and when to use it

    main

    The QnAMakerDialog is a specialized dialog in the botbuilder-ai library designed to interface with QnA Maker services. It is used to implement multi-step conversations and support adaptive-learning features.

    Key capabilities include:

    • Targeting a specific QnA Maker knowledge base.
    • Supporting knowledge bases with follow-up prompts.
    • Handling active learning by presenting users with appropriate multi-turn prompts or active learning options.
    • Managing responses when no match is found in the knowledge base.
  8. What is Language Generation (LG)?

    main

    Language Generation (LG) is a subsystem that allows developers to separate presentation logic from business logic by using .lg files. It enables you to define multiple variations of a phrase, execute simple expressions based on context, and refer to conversational memory (state).

    LG supports:

    • Template expansion: Providing one-of variations for phrases.
    • Entity substitution: Dynamically injecting data into templates.
    • Structured LG: Generating complex JSON objects instead of just simple strings.
    • Conditional expansion: Expanding templates based on specific conditions.