ask

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SearchText

func SearchText(question string) string

Types

type Evidence

type Evidence = retrieval.EvidenceDocument

type Options

type Options struct {
	Limit          int
	RetrieveOnly   bool
	Model          string
	CLI            string
	Length         string
	Timeout        time.Duration
	Binary         string
	MaxCharsPerDoc int
	SourceTypes    []string
	IncludeRelated bool
	RelatedLimit   int
	EntityIndex    []entities.Entity
	SearchLimit    int
	// DisableEntityExpansion keeps broad research retrieval off the expensive
	// global entity index path. Direct ask calls keep the previous default.
	DisableEntityExpansion bool
	// DisableTagExpansion skips broad LIKE/INSTR tag scans. FTS still searches
	// indexed user tags; exact tag examples can be gathered by callers that need
	// them without paying this cost for every query variant.
	DisableTagExpansion bool
}

type QueryHints

type QueryHints struct {
	TextQuery  string   `json:"text_query"`
	Terms      []string `json:"terms"`
	TagQueries []string `json:"tag_queries"`
}

func Hints

func Hints(question string) QueryHints

type Response

type Response struct {
	Question string     `json:"question"`
	Answer   string     `json:"answer"`
	Evidence []Evidence `json:"evidence"`
}

func Run

func Run(ctx context.Context, cfg config.Config, st *store.Store, question string, opts Options) (Response, error)

type RetrievalInfo

type RetrievalInfo = retrieval.RetrievalInfo

type RetrievalSignal

type RetrievalSignal = retrieval.RetrievalSignal

Jump to

Keyboard shortcuts

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