ask

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultDBPath is where the index lives when configuration says nothing.
	DefaultDBPath = "phpbotscout.db"

	// DefaultProvider keeps development off metered APIs. claude-local drives a
	// local Claude Code instance against an existing subscription, which for the
	// volume a benchmark run makes is the difference between free and not.
	DefaultProvider = chat.ProviderClaudeLocal
)

Defaults for asking from the terminal.

Variables

View Source
var ErrNoQuestion = errors.New("ask: a question is required")

ErrNoQuestion is returned when the command is run with nothing to ask.

Functions

func NewCmdAsk

func NewCmdAsk(props *props.Props) *setup.Command

func Question

func Question(args []string) string

Question joins the arguments into one question, so an unquoted question at the shell asks what was typed rather than only its first word.

func Render

func Render(w io.Writer, r answer.Response)

Render prints an answer, or a decline.

func RenderRetrieval

func RenderRetrieval(w io.Writer, results []index.Result)

RenderRetrieval prints the ranked passages without composing.

func RunAsk

func RunAsk(ctx context.Context, p *props.Props, opts *AskOptions, args []string) error

RunAsk answers a question from the terminal.

This is the same retrieval and answering path the Discord flow will use, not a parallel one. A divergent path tests nothing, and a fast development loop is only worth having if what it exercises is what ships.

Types

type AskOptions

type AskOptions struct {
	RetrievalOnly bool
	Limit         int
}

Jump to

Keyboard shortcuts

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