Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions plugins/superagent/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ const superagentPlugin: IntegrationPlugin = {
required: true,
rows: 4,
},
{
key: "systemPrompt",
label: "System Prompt",
type: "template-textarea",
placeholder: "Optional custom instructions for the guard...",
example: "Be extra strict with code-related inputs",
rows: 3,
},
],
},
{
Expand Down
2 changes: 2 additions & 0 deletions plugins/superagent/steps/guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type GuardResult = {

export type SuperagentGuardCoreInput = {
text: string;
systemPrompt?: string;
};

export type SuperagentGuardInput = StepInput &
Expand Down Expand Up @@ -45,6 +46,7 @@ async function stepHandler(
},
body: JSON.stringify({
text: input.text,
...(input.systemPrompt && { system_prompt: input.systemPrompt }),
}),
});

Expand Down