Documentation
¶
Overview ¶
Package composition implements identity prompt composition. Transforms identity snapshots into prompts injectable into LLM context window.
Index ¶
- type SoulComposerService
- func (s *SoulComposerService) ComposeDiffusionAlert(ctx context.Context, drift *valueobjects.IdentityDriftReport) (*valueobjects.IdentityContextPrompt, error)
- func (s *SoulComposerService) ComposeIdentityPrompt(ctx context.Context, identity *entities.IdentitySnapshot, budgetTokens int) (*valueobjects.IdentityContextPrompt, error)
- func (s *SoulComposerService) ComposeReinforcementPrompt(ctx context.Context, identity *entities.IdentitySnapshot, ...) (*valueobjects.IdentityContextPrompt, error)
- func (s *SoulComposerService) EstimateTokenCount(ctx context.Context, prompt string) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SoulComposerService ¶
type SoulComposerService struct {
// contains filtered or unexported fields
}
SoulComposerService implements ports.IdentityComposer. Generates natural and effective identity prompts for LLMs.
func NewSoulComposerService ¶
func NewSoulComposerService() *SoulComposerService
NewSoulComposerService creates a new composition service.
func (*SoulComposerService) ComposeDiffusionAlert ¶
func (s *SoulComposerService) ComposeDiffusionAlert(ctx context.Context, drift *valueobjects.IdentityDriftReport) (*valueobjects.IdentityContextPrompt, error)
ComposeDiffusionAlert génère une alerte de diffusion identitaire
func (*SoulComposerService) ComposeIdentityPrompt ¶
func (s *SoulComposerService) ComposeIdentityPrompt(ctx context.Context, identity *entities.IdentitySnapshot, budgetTokens int) (*valueobjects.IdentityContextPrompt, error)
ComposeIdentityPrompt generates a complete identity prompt
func (*SoulComposerService) ComposeReinforcementPrompt ¶
func (s *SoulComposerService) ComposeReinforcementPrompt(ctx context.Context, identity *entities.IdentitySnapshot, swap *valueobjects.ModelSwapContext) (*valueobjects.IdentityContextPrompt, error)
ComposeReinforcementPrompt génère un prompt de renforcement post-model-swap
func (*SoulComposerService) EstimateTokenCount ¶
EstimateTokenCount estimates the number of tokens in a text.
Click to show internal directories.
Click to hide internal directories.