Documentation
¶
Overview ¶
Package agent contains yai's core (non-UI) logic.
It resolves the model/provider configuration, prepares the request (including MCP tools), and starts a streaming completion.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyProxyConfig ¶
func ApplyProxyConfig(httpProxy string, providerCfg *fantasybridge.Config) error
ApplyProxyConfig configures the provider HTTP client to use an HTTP proxy.
func NewFantasyClient ¶
func NewFantasyClient(cfg fantasybridge.Config) (stream.Client, error)
NewFantasyClient creates the fantasy bridge client.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the core orchestration layer for starting LLM streams.
It is intentionally UI-agnostic and can be used by both the TUI and headless commands.
func (*Service) ActionForStreamError ¶
func (s *Service) ActionForStreamError(err error, mod config.Model, prompt string) StreamErrorAction
ActionForStreamError decides whether a provider error should be retried, and if so which prompt/model override should be used.
type StreamErrorAction ¶
StreamErrorAction describes how yai should respond to a streaming error.