Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x | import {
IsNotEmpty,
IsString,
IsOptional,
IsBoolean,
IsUrl,
IsNumber,
} from 'class-validator';
import { Transform } from 'class-transformer';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
export class CreateSystemPromptDto {
@ApiProperty({
description: 'Name of the system prompt',
example: 'Default Assistant',
})
@IsString()
@IsNotEmpty()
prompt_name: string;
@ApiProperty({
description: 'Content of the system prompt (Eta template syntax supported)',
})
@IsString()
@IsNotEmpty()
prompt_content: string;
@ApiPropertyOptional({
description: 'URL associated with this prompt (e.g., AI Studio link)',
example: 'https://aistudio.google.com',
})
@IsOptional()
@Transform(({ value }) => (value === '' ? null : value))
@IsUrl()
url?: string;
@ApiPropertyOptional({
description: 'Token limit for follow-up context generation',
minimum: 1,
})
@IsOptional()
@IsNumber()
@Transform(({ value }) =>
value === '' || value === null ? null : Number(value),
)
followup_token_limit?: number | null;
@ApiPropertyOptional({
description: 'Enabled tools: "all" or array of tool names',
example: 'all',
})
@IsOptional()
enabledTools?: string[] | 'all';
@ApiPropertyOptional({
description:
'Enabled MCP tools: "all" or array of serverName__toolName identifiers',
example: 'all',
})
@IsOptional()
enabledMcpTools?: string[] | 'all';
@ApiPropertyOptional({
description: 'Whether this is a built-in prompt (only used by seeding)',
example: false,
})
@IsOptional()
@IsBoolean()
is_builtin?: boolean;
@ApiPropertyOptional({
description: 'Unique key for built-in prompts (only used by seeding)',
example: 'master-agent',
})
@IsOptional()
@IsString()
builtin_key?: string;
}
export class PreviewSystemPromptDto {
@ApiProperty({
description: 'Prompt content to preview (Eta template will be rendered)',
})
@IsString()
@IsNotEmpty()
prompt_content: string;
}
export class PreviewSystemPromptResponseDto {
@ApiProperty({
description: 'Rendered prompt content with tool definitions injected',
})
rendered_content: string;
}
export class UpdateSystemPromptDto {
@ApiPropertyOptional({
description: 'Name of the system prompt',
example: 'Updated Assistant',
})
@IsOptional()
@IsString()
@IsNotEmpty()
prompt_name?: string;
@ApiPropertyOptional({ description: 'Content of the system prompt' })
@IsOptional()
@IsString()
@IsNotEmpty()
prompt_content?: string;
@ApiPropertyOptional({ description: 'Set as default system prompt' })
@IsOptional()
@IsBoolean()
is_default?: boolean;
@ApiPropertyOptional({
description: 'URL associated with this prompt',
example: 'https://aistudio.google.com',
})
@IsOptional()
@Transform(({ value }) => (value === '' ? null : value))
@IsUrl()
url?: string;
@ApiPropertyOptional({
description: 'Token limit for follow-up context',
minimum: 1,
})
@IsOptional()
@IsNumber()
@Transform(({ value }) =>
value === '' || value === null ? null : Number(value),
)
followup_token_limit?: number | null;
@ApiPropertyOptional({
description:
'Enabled MCP tools: "all" or array of serverName__toolName identifiers',
example: 'all',
})
@IsOptional()
enabledMcpTools?: string[] | 'all';
}
|