Skip to content

Commit

Permalink
fix: ai capture
Browse files Browse the repository at this point in the history
  • Loading branch information
DecathectZero committed Dec 19, 2023
1 parent bfa70e5 commit 5eef908
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
44 changes: 44 additions & 0 deletions packages/base-types/src/node/aiCapture.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { AIModelParams } from '../utils/ai';
import { NodeType } from './constants';
import {
BaseNode,
BaseNoMatchNodeData,
BaseNoMatchStepData,
BaseNoReplyNodeData,
BaseNoReplyStepData,
BaseStep,
BaseStepPorts,
BuiltInFailPort,
BuiltInNextPort,
BuiltInNoMatchNoReplyPorts,
NodeElseID,
NodeIntentScope,
NodeNextID,
StepIntentScope,
} from './utils';

export interface StepData extends AIModelParams {}

export interface Step extends BaseStep<StepData, BaseStepPorts<BuiltInNextPort & BuiltInFailPort>> {
type: NodeType.AI_CAPTURE;

rules: string[];
entities: string[];
exitScenerios: string[];
}

export interface Node extends BaseNode, StepData, NodeNextID, NodeElseID {
type: NodeType.AI_CAPTURE;
}

export interface BaseCaptureData extends BaseNoReplyStepData, StepIntentScope, BaseNoMatchStepData {}

export interface StepData extends AIModelParams {}

export interface StepBuiltInPorts extends BuiltInNextPort, BuiltInNoMatchNoReplyPorts {}

export interface StepPorts extends BaseStepPorts<StepBuiltInPorts, []> {}

export interface Node extends BaseNode, StepData, NodeNextID, NodeIntentScope, BaseNoReplyNodeData, BaseNoMatchNodeData {
type: NodeType.AI_CAPTURE;
}
1 change: 1 addition & 0 deletions packages/base-types/src/node/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export enum NodeType {
INTERACTION = 'interaction',

// ai
AI_CAPTURE = 'ai_capture',
AI_RESPONSE = 'generative',
AI_SET = 'ai_set',

Expand Down
4 changes: 4 additions & 0 deletions packages/base-types/src/node/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as _v1 from './_v1';
import * as AICapture from './aiCapture';
import * as AIResponse from './aiResponse';
import * as AISet from './aiSet';
import * as Api from './api';
Expand Down Expand Up @@ -28,6 +29,7 @@ import { BaseNode, NodeNextID } from './utils';
import * as Zapier from './zapier';

export * as _v1 from './_v1';
export * as AICapture from './aiCapture';
export * as AIResponse from './aiResponse';
export * as AISet from './aiSet';
export * as Api from './api';
Expand Down Expand Up @@ -107,6 +109,7 @@ export type AnyCommonStep =
| CustomBlockPointer.Step
| AIResponse.Step
| AISet.Step
| AICapture.Step
| _v1.Step;

/**
Expand Down Expand Up @@ -136,6 +139,7 @@ export type AnyCommonNode =
| ChannelAction.Node
| AIResponse.Node
| AISet.Node
| AICapture.Node
| _v1.Node;

export type AnyCommonCommand = Intent.Command | Command.Command;

0 comments on commit 5eef908

Please sign in to comment.