Skip to content

Commit

Permalink
add kbfaq trace
Browse files Browse the repository at this point in the history
  • Loading branch information
e-vandenberg committed Oct 10, 2023
1 parent 6194525 commit 0c8baa6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/base-types/src/node/knowledgeBaseFaq.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { BaseResponseTrace, BaseTraceFrame, TraceType } from './utils';


export interface TraceFramePayload extends BaseResponseTrace {
faqQuestion?: string;
faqAnswer?: string;
query?: string;
}

export interface TraceFrame extends BaseTraceFrame<TraceFramePayload> {
type: TraceType.KNOWLEDGE_BASE_FAQ;
}
1 change: 1 addition & 0 deletions packages/base-types/src/node/utils/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export enum TraceType {
NO_REPLY = 'no-reply',
ENTITY_FILLING = 'entity-filling',
CHANNEL_ACTION = 'channel-action',
KNOWLEDGE_BASE_FAQ = 'knowledge-base-faq',
}

export interface BaseTraceFramePath<Event extends BaseEvent = BaseEvent> {
Expand Down
1 change: 1 addition & 0 deletions packages/base-types/src/trace/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export { TraceFrame as Stream } from '@base-types/node/stream';
export { TraceFrame as Text } from '@base-types/node/text';
export { BaseTraceFrame, TraceType } from '@base-types/node/utils/trace';
export { TraceFrame as Visual } from '@base-types/node/visual';
export { TraceFrame as KnowledgeBaseFaq } from '@base-types/node/knowledgeBaseFaq';

/** @deprecated */
export { TraceFrame as CarouselTrace } from '@base-types/node/carousel';
Expand Down

0 comments on commit 0c8baa6

Please sign in to comment.