Versions in this module Expand all Collapse all v0 v0.1.0 Aug 5, 2026 Changes in this version + const DefaultLimit + const PassageDelimiter + var ErrFabricatedCitation = errors.New("answer: cited a passage that was not retrieved") + var ErrUngrounded = errors.New("answer: no passage was cited") + func ResponseSchema() *jsonschema.Schema + func SystemPrompt() string + type Answer struct + Cites []int + DeclineReason string + Declined bool + Text string + type ChatComposer struct + func NewComposer(client chat.ChatClient) *ChatComposer + func (c *ChatComposer) Compose(ctx context.Context, question string, results []index.Result) (Answer, error) + type Citation struct + CommitSHA string + HeadingPath string + RepoPath string + SourcePath string + URL string + type Composer interface + Compose func(ctx context.Context, question string, results []index.Result) (Answer, error) + type Option func(*Service) + func WithLimit(n int) Option + func WithScoreFloor(f float64) Option + type Response struct + Cause error + Citations []Citation + DeclineReason string + Declined bool + Retrieved []index.Result + Text string + type Service struct + func New(r index.Retriever, c Composer, opts ...Option) *Service + func (s *Service) Ask(ctx context.Context, question string) (Response, error)