Documentation
¶
Index ¶
- Constants
- type ExtractionResult
- type Extractor
- type ProcessResult
- type ProcessResultBuilder
- func (b *ProcessResultBuilder) Build() *ProcessResult
- func (b *ProcessResultBuilder) WithArtifactID(id int64) *ProcessResultBuilder
- func (b *ProcessResultBuilder) WithDuration(d time.Duration) *ProcessResultBuilder
- func (b *ProcessResultBuilder) WithEntities(entities ...string) *ProcessResultBuilder
- func (b *ProcessResultBuilder) WithKeywords(keywords ...string) *ProcessResultBuilder
- func (b *ProcessResultBuilder) WithRAGHints(hints ...string) *ProcessResultBuilder
- func (b *ProcessResultBuilder) WithSummary(summary string) *ProcessResultBuilder
- func (b *ProcessResultBuilder) WithTokens(prompt, completion, total int) *ProcessResultBuilder
Constants ¶
const (
// ParamArtifact is the key for artifact to process (*storage.Artifact).
ParamArtifact = "artifact"
)
Request parameters for Extractor agent.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExtractionResult ¶
type ExtractionResult struct {
Summary string `json:"summary"` // 2-4 sentence description for semantic search
Keywords []string `json:"keywords"` // 5-10 tags for discovery
Entities []string `json:"entities"` // Named entities (people, companies, code mentioned)
RAGHints []string `json:"rag_hints"` // Questions this file might answer
}
ExtractionResult contains the structured output from Gemini Flash. This is metadata-only output (~500 tokens) - no full text extraction.
type Extractor ¶
type Extractor struct {
// contains filtered or unexported fields
}
Extractor processes artifact files using multimodal LLM. Generates metadata-only output (summary, keywords, entities, rag_hints).
func New ¶
func New( executor *agent.Executor, translator *i18n.Translator, cfg *config.Config, logger *slog.Logger, fileStorage *files.FileStorage, llmClient openrouter.Client, artifactRepo storage.ArtifactRepository, ) *Extractor
New creates a new Extractor agent.
func (*Extractor) Capabilities ¶
func (ex *Extractor) Capabilities() agent.Capabilities
Capabilities returns the agent's capabilities.
func (*Extractor) Description ¶
Description returns a human-readable description.
type ProcessResult ¶
type ProcessResult struct {
ArtifactID int64
Summary string
Keywords []string
Entities []string
RAGHints []string
Duration time.Duration
Tokens agent.TokenUsage
}
ProcessResult contains the final output of extraction.
type ProcessResultBuilder ¶ added in v0.6.1
type ProcessResultBuilder struct {
// contains filtered or unexported fields
}
ProcessResultBuilder builds ProcessResult objects for testing.
func NewProcessResultBuilder ¶ added in v0.6.1
func NewProcessResultBuilder() *ProcessResultBuilder
NewProcessResultBuilder creates a new ProcessResultBuilder.
func (*ProcessResultBuilder) Build ¶ added in v0.6.1
func (b *ProcessResultBuilder) Build() *ProcessResult
Build returns the constructed ProcessResult.
func (*ProcessResultBuilder) WithArtifactID ¶ added in v0.6.1
func (b *ProcessResultBuilder) WithArtifactID(id int64) *ProcessResultBuilder
WithArtifactID sets the artifact ID.
func (*ProcessResultBuilder) WithDuration ¶ added in v0.6.1
func (b *ProcessResultBuilder) WithDuration(d time.Duration) *ProcessResultBuilder
WithDuration sets the duration.
func (*ProcessResultBuilder) WithEntities ¶ added in v0.6.1
func (b *ProcessResultBuilder) WithEntities(entities ...string) *ProcessResultBuilder
WithEntities sets the entities (variadic for convenience).
func (*ProcessResultBuilder) WithKeywords ¶ added in v0.6.1
func (b *ProcessResultBuilder) WithKeywords(keywords ...string) *ProcessResultBuilder
WithKeywords sets the keywords (variadic for convenience).
func (*ProcessResultBuilder) WithRAGHints ¶ added in v0.6.1
func (b *ProcessResultBuilder) WithRAGHints(hints ...string) *ProcessResultBuilder
WithRAGHints sets the RAG hints (variadic for convenience).
func (*ProcessResultBuilder) WithSummary ¶ added in v0.6.1
func (b *ProcessResultBuilder) WithSummary(summary string) *ProcessResultBuilder
WithSummary sets the summary.
func (*ProcessResultBuilder) WithTokens ¶ added in v0.6.1
func (b *ProcessResultBuilder) WithTokens(prompt, completion, total int) *ProcessResultBuilder
WithTokens sets token usage.