feat: implement Agentic Skill and Negative Prompt injection
This commit is contained in:
+8
-2
@@ -85,7 +85,9 @@ export class AgentExecutor {
|
||||
visionContent?: any[],
|
||||
temperature?: number,
|
||||
systemPrompt?: string,
|
||||
runId?: number
|
||||
runId?: number,
|
||||
agentSkillContext?: string,
|
||||
negativePrompt?: string
|
||||
}
|
||||
) {
|
||||
const {
|
||||
@@ -191,7 +193,11 @@ export class AgentExecutor {
|
||||
const internetCtx = internetEnabled
|
||||
? `\n\n[CRITICAL: INTERNET ACCESS ENABLED]\nYou can use <read_url> to search. Current time: ${new Date().toLocaleString()}`
|
||||
: '';
|
||||
const fullSystemPrompt = `${systemPrompt}${internetCtx}\n\n[CONTEXT]\n${brainContext}\n${contextBlock}`;
|
||||
|
||||
const agentSkillCtx = options.agentSkillContext ? `\n\n[AGENT PERSONA & SKILLS]\n${options.agentSkillContext}` : '';
|
||||
const negativeCtx = options.negativePrompt ? `\n\n[STRICT NEGATIVE PROMPT - DO NOT DO THIS]\n${options.negativePrompt}` : '';
|
||||
|
||||
const fullSystemPrompt = `${systemPrompt}${internetCtx}\n\n[CONTEXT]\n${brainContext}\n${contextBlock}${agentSkillCtx}${negativeCtx}`;
|
||||
const messagesForRequest: ChatMessage[] = [
|
||||
{ role: 'system', content: fullSystemPrompt, internal: true },
|
||||
...reqMessages
|
||||
|
||||
Reference in New Issue
Block a user