Skip to content

Commit

Permalink
fix: add instructions to ai context
Browse files Browse the repository at this point in the history
  • Loading branch information
DecathectZero committed Nov 14, 2023
1 parent 2c45395 commit 414d03a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/base-types/src/node/aiResponse.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { AIContextParams, AIKnowledgeParams, AIModelParams } from '../utils/ai';
import { AIKnowledgeContextParams, AIKnowledgeParams, AIModelParams } from '../utils/ai';
import { NodeType } from './constants';
import { BaseNode, BaseStep, BaseStepPorts, BuiltInFailPort, BuiltInNextPort, NodeElseID, NodeNextID } from './utils';

export interface StepData extends AIModelParams, AIContextParams, AIKnowledgeParams {
export interface StepData extends AIModelParams, AIKnowledgeContextParams, AIKnowledgeParams {
notFoundPath?: boolean;

// the existance of this property is also a flag if the step is a legacy version or not
Expand Down
4 changes: 2 additions & 2 deletions packages/base-types/src/node/aiSet.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { AIContextParams, AIKnowledgeParams, AIModelParams } from '../utils/ai';
import { AIKnowledgeContextParams, AIKnowledgeParams, AIModelParams } from '../utils/ai';
import { NodeType } from './constants';
import { BaseNode, BaseStep, NodeNextID } from './utils';

export interface Set extends AIContextParams {
export interface Set extends AIKnowledgeContextParams {
variable: string | null;
}

Expand Down
6 changes: 6 additions & 0 deletions packages/base-types/src/utils/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ export interface AIContextParams {
prompt: string;
}

export interface AIKnowledgeContextParams {
mode: PROMPT_MODE;
prompt: string;
instruction?: string;
}

export interface AIKnowledgeParams {
// make it optional for backward compatibility
source?: DATA_SOURCE;
Expand Down

0 comments on commit 414d03a

Please sign in to comment.