UNPKG

@promptbook/vercel

Version:

Promptbook: Turn your company's scattered knowledge into AI ready books

41 lines (40 loc) 1.63 kB
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements'; import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition'; /** * PERSONA commitment definition * * The PERSONA commitment modifies the agent's personality and character in the system message. * It defines who the agent is, their background, expertise, and personality traits. * * Key features: * - Multiple PERSONA commitments are automatically merged into one * - Content is placed at the beginning of the system message * - Original content with comments is preserved in metadata.PERSONA * - Comments (# PERSONA) are removed from the final system message * * Example usage in agent source: * * ```book * PERSONA You are a helpful programming assistant with expertise in TypeScript and React * PERSONA You have deep knowledge of modern web development practices * ``` * * The above will be merged into a single persona section at the beginning of the system message. * * @private [🪔] Maybe export the commitments through some package */ export declare class PersonaCommitmentDefinition extends BaseCommitmentDefinition<'PERSONA' | 'PERSONAE'> { constructor(type?: 'PERSONA' | 'PERSONAE'); /** * Short one-line description of PERSONA. */ get description(): string; /** * Markdown documentation for PERSONA commitment. */ get documentation(): string; applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements; } /** * Note: [💞] Ignore a discrepancy between file name and entity name */