prompts

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package prompts provides typed parameter structs for agent prompt templates. These structs are used with i18n.Translator.GetTemplate() to provide compile-time safety and IDE autocomplete for prompt parameters.

Migration guide: Replace fmt.Sprintf positional args with struct fields. Example:

// Before: translator.Get(lang, "rag.enrichment_system_prompt", date, profile, topics)
// After:  translator.GetTemplate(lang, "rag.enrichment_system_prompt", prompts.EnricherParams{...})

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchivistParams

type ArchivistParams struct {
	Date           string // Current date
	UserFactsLimit int    // Maximum facts allowed for user
	UserFactsCount int    // Current count of user facts
	UserFacts      string // Formatted existing facts about user
	Conversation   string // Conversation to analyze
	KnownPeople    string // Formatted known people names for dedup (v0.5.1)
}

ArchivistParams for memory.system_prompt template. The Archivist agent extracts and manages facts and people from conversations. Note: Facts are now ONLY about User. Info about other people goes to the `people` table.

type EnricherParams

type EnricherParams struct {
	Date         string // Current date for time-aware queries
	Profile      string // Formatted <user_profile> block
	RecentTopics string // Formatted <recent_topics> block
}

EnricherParams for rag.enrichment_system_prompt template. The Enricher agent analyzes user queries and formulates search queries for vector retrieval of relevant conversation history.

type EnricherUserParams

type EnricherUserParams struct {
	History string // Recent conversation history
	Query   string // Current user query
}

EnricherUserParams for rag.enrichment_user_prompt template.

type ExtractorParams added in v0.6.0

type ExtractorParams struct {
	BotName      string // Bot's name (e.g., "Laplaced")
	Profile      string // Formatted <user_profile> block
	RecentTopics string // Formatted <recent_topics> block
	InnerCircle  string // Formatted <inner_circle> block
}

ExtractorParams for extractor.system_prompt template. The Extractor agent processes multimedia files and extracts structured content.

type ExtractorUserParams added in v0.6.0

type ExtractorUserParams struct {
	OriginalName string // Original filename
	FileType     string // File type (image, audio, pdf, etc.)
	MimeType     string // MIME type
	FileSize     int64  // File size in bytes
	UserContext  string // User's message text when file was sent (v0.6.0)
}

ExtractorUserParams for extractor.user_prompt template. User prompt for extractor with file metadata.

type LaplaceParams

type LaplaceParams struct {
	BotName string // Bot's name (e.g., "Laplaced")
}

LaplaceParams for bot.system_prompt template. The main chat agent system prompt.

type MergerParams

type MergerParams struct {
	Profile      string // Formatted <user_profile> block
	RecentTopics string // Formatted <recent_topics> block
}

MergerParams for rag.topic_consolidation_system_prompt template. The Merger agent determines whether consecutive topics should be merged.

type MergerUserParams

type MergerUserParams struct {
	Topic1Summary string // First topic summary
	Topic2Summary string // Second topic summary
}

MergerUserParams for rag.topic_consolidation_user_prompt template.

type RerankerParams

type RerankerParams struct {
	Profile       string // Formatted <user_profile> block
	RecentTopics  string // Formatted <recent_topics> block
	MaxTopics     int    // Maximum topics in final selection
	MinCandidates int    // Minimum candidates to consider before filtering
	MaxCandidates int    // Maximum candidates to load
	MaxPeople     int    // v0.6.0 - Maximum people in final selection
	MaxArtifacts  int    // v0.6.0 - Maximum artifacts in final selection
}

RerankerParams for rag.reranker_system_prompt template. The Reranker agent selects relevant topics from memory candidates.

type RerankerUserParams

type RerankerUserParams struct {
	Date               string // Current date
	Query              string // Original user query
	EnrichedQuery      string // Extended search context from Enricher
	CurrentMessages    string // Recent conversation messages
	Candidates         string // Formatted candidate list (ID | Date | Size | Topic)
	PeopleCandidates   string // Formatted people candidate list (v0.5.1)
	ArtifactCandidates string // Formatted artifact candidate list (v0.6.0)
}

RerankerUserParams for rag.reranker_user_prompt template.

type SplitterParams

type SplitterParams struct {
	Profile      string // Formatted <user_profile> block
	RecentTopics string // Formatted <recent_topics> block
	Goal         string // Optional goal section (e.g., topic_extraction_goal_split for large topics)
}

SplitterParams for rag.topic_extraction_prompt template. The Splitter agent breaks down conversation logs into logical topics.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL