SystemPrompt
type SystemPrompt = string | SystemContentBlock[];Defined in: src/types/messages.ts:437
System prompt for guiding model behavior. Can be a simple string or an array of content blocks for advanced caching.
Example
Section titled “Example”// Simple stringconst prompt: SystemPrompt = 'You are a helpful assistant'
// Array with cache points for advanced cachingconst prompt: SystemPrompt = [ { textBlock: new TextBlock('You are a helpful assistant') }, { textBlock: new TextBlock(largeContextDocument) }, { cachePointBlock: new CachePointBlock({ cacheType: 'default' }) }]