feat: add prompt level config (#7445)

This commit is contained in:
darkskygit
2024-07-08 08:11:22 +00:00
parent 9ef8829ef1
commit bf6c9a5955
12 changed files with 125 additions and 41 deletions

View File

@@ -17,6 +17,7 @@ import {
CopilotTextToEmbeddingProvider,
CopilotTextToImageProvider,
CopilotTextToTextProvider,
PromptConfig,
PromptMessage,
} from '../../src/plugins/copilot/types';
import { NodeExecutorType } from '../../src/plugins/copilot/workflow/executor';
@@ -383,7 +384,12 @@ export async function getHistories(
return res.body.data.currentUser?.copilot?.histories || [];
}
type Prompt = { name: string; model: string; messages: PromptMessage[] };
type Prompt = {
name: string;
model: string;
messages: PromptMessage[];
config?: PromptConfig;
};
type WorkflowTestCase = {
graph: WorkflowGraph;
prompts: Prompt[];