wa-chat-server
Version:
Watson Assistant powered chat server
14 lines (13 loc) • 598 B
TypeScript
import AssistantV1 from 'ibm-watson/assistant/v1';
import { IReducedMessageResponse } from '../interface/IReducedMessageResponse';
import { Session } from './Session/Session';
/**
* This class prunes the response from the Watson Assistant (in the V1 format)
* to the form that is propagated to frontend
*/
export declare class MessageResponseFilter {
private session;
constructor(session: Session);
applyTo(payload: AssistantV1.Response, addons?: Record<string, any>): IReducedMessageResponse;
error(input: AssistantV1.MessageInput, errorMsg: string): IReducedMessageResponse;
}