btw

package
v2026.701.6 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const CatchUpPause = 20

Variables

This section is empty.

Functions

func CompleteMessages

func CompleteMessages(msgs []chatstore.Message) []chatstore.Message

func Execute

func Execute(ctx context.Context, h Host, out io.Writer, question, assistantPrefix string) error

Types

type Host

type Host interface {
	SessionMessagesSnapshot() ([]chatstore.Message, map[int]string)
	SystemPromptBtw(disableThinking bool) (string, error)
	BtwLinePrefixes() (userPrefix, assistantPrefix string)
	ReadBtwInput(out io.Writer, userPrefix, initial string) (string, error)
	Config() *config.Root
	ModelName() string
	Backend() llm.CompletionBackend
}

type OutputMux

type OutputMux struct {
	// contains filtered or unexported fields
}

func NewOutputMux

func NewOutputMux(live io.Writer) *OutputMux

func (*OutputMux) Buffering

func (m *OutputMux) Buffering() bool

func (*OutputMux) FlushBurst

func (m *OutputMux) FlushBurst()

func (*OutputMux) Live

func (m *OutputMux) Live() io.Writer

func (*OutputMux) SetBufferMain

func (m *OutputMux) SetBufferMain()

func (*OutputMux) Write

func (m *OutputMux) Write(p []byte) (int, error)

func (*OutputMux) WriteLive

func (m *OutputMux) WriteLive(p []byte) (int, error)

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(host Host, mux *OutputMux, runCtx context.Context, stopRun func(error), stopErr error) *Service

func (*Service) Start

func (s *Service) Start()

func (*Service) Stop

func (s *Service) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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