UNPKG

node-nlp

Version:

Library for NLU (Natural Language Understanding) done in Node.js

32 lines (31 loc) 1.26 kB
import { BotState } from './botState'; import { Storage } from './storage'; import { TurnContext } from './turnContext'; /** * Reads and writes conversation state for your bot to storage. * * @remarks * Each conversation your bot has with a user or group will have its own isolated storage object * that can be used to persist conversation tracking information between turns of the conversation. * This state information can be reset at any point by calling [clear()](#clear). * * ```JavaScript * const { ConversationState, MemoryStorage } = require('botbuilder'); * * const conversationState = new ConversationState(new MemoryStorage()); * ``` */ export declare class ConversationState extends BotState { private namespace; /** * Creates a new ConversationState instance. * @param storage Storage provider to persist conversation state to. * @param namespace (Optional) namespace to append to storage keys. Defaults to an empty string. */ constructor(storage: Storage, namespace?: string); /** * Returns the storage key for the current conversation state. * @param context Context for current turn of conversation with the user. */ getStorageKey(context: TurnContext): string | undefined; }