askretrieve

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildChunkText

func BuildChunkText(retrieval RetrievalResult) string

func BuildChunkTextWithoutTopics

func BuildChunkTextWithoutTopics(retrieval RetrievalResult, excluded ...askcontext.Topic) string

Types

type Chunk

type Chunk struct {
	ID       string
	Source   string
	Label    string
	Topic    askcontext.Topic
	Content  string
	Score    int
	Evidence *EvidenceSummary
}

type EvidenceSummary added in v0.2.0

type EvidenceSummary struct {
	Provider       string   `json:"provider,omitempty"`
	SourceURL      string   `json:"sourceUrl,omitempty"`
	SourceID       string   `json:"sourceId,omitempty"`
	Domain         string   `json:"domain,omitempty"`
	DomainCategory string   `json:"domainCategory,omitempty"`
	Title          string   `json:"title,omitempty"`
	Excerpt        string   `json:"excerpt,omitempty"`
	Freshness      string   `json:"freshness,omitempty"`
	Official       bool     `json:"official,omitempty"`
	TrustLevel     string   `json:"trustLevel,omitempty"`
	VersionSupport string   `json:"versionSupport,omitempty"`
	ArtifactKinds  []string `json:"artifactKinds,omitempty"`
	InstallHints   []string `json:"installHints,omitempty"`
	OfflineHints   []string `json:"offlineHints,omitempty"`
}

type RetrievalResult

type RetrievalResult struct {
	Chunks   []Chunk
	Dropped  []string
	MaxBytes int
}

func Retrieve

func Retrieve(route askintent.Route, prompt string, target askintent.Target, workspace WorkspaceSummary, state askstate.Context, external []Chunk) RetrievalResult

type WorkspaceFile

type WorkspaceFile struct {
	Path    string
	Content string
}

type WorkspaceSummary

type WorkspaceSummary struct {
	Root            string
	HasWorkflowTree bool
	HasPrepare      bool
	HasApply        bool
	Files           []WorkspaceFile
}

func InspectWorkspace

func InspectWorkspace(root string) (WorkspaceSummary, error)

Jump to

Keyboard shortcuts

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