UNPKG

node-nlp

Version:

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

32 lines (31 loc) 1.34 kB
import { BotState } from './botState'; import { Storage } from './storage'; import { TurnContext } from './turnContext'; /** * Reads and writes PrivateConversation state for your bot to storage. * * @remarks * Each PrivateConversation your bot has with a user or group will have its own isolated storage object * that can be used to persist PrivateConversation tracking information between turns of the PrivateConversation. * This state information can be reset at any point by calling [clear()](#clear). * * ```JavaScript * const { PrivateConversationState, MemoryStorage } = require('botbuilder'); * * const PrivateConversationState = new PrivateConversationState(new MemoryStorage()); * ``` */ export declare class PrivateConversationState extends BotState { private namespace; /** * Creates a new PrivateConversationState instance. * @param storage Storage provider to persist PrivateConversation 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 PrivateConversation state. * @param context Context for current turn of PrivateConversation with the user. */ getStorageKey(context: TurnContext): string | undefined; }