Documentation
¶
Index ¶
- func EnableTerminal(next http.Handler) http.Handler
- func MarkFirstToken(r *http.Request, started time.Time)
- func MarkLLMRequestDone(r *http.Request, started time.Time)
- func RegisterLogging(r *http.Request, summaries bool, payloads bool, protocol ai_protocols.Protocol, ...)
- func SelectedInstanceName(r *http.Request) (string, bool)
- func StartLLMRequest(r *http.Request) time.Time
- func TerminalEnabled(r *http.Request) bool
- func TerminalHandler(next http.Handler) http.Handler
- func WithExecution(r *http.Request, instanceName string, execute ExecuteFunc) *http.Request
- func WithSelectedInstanceName(r *http.Request, instanceName string) *http.Request
- type ExecuteFunc
- type State
- func (s *State) AdvanceRateLimitTarget() bool
- func (s *State) ConfigureRateLimitFallback(enabled bool, advance func() bool)
- func (s *State) Consume(w http.ResponseWriter, r *http.Request) bool
- func (s *State) Execute(w http.ResponseWriter, r *http.Request) bool
- func (s *State) InstanceName() string
- func (s *State) RateLimitFallbackEnabled() bool
- func (s *State) SetInstanceName(instanceName string)
- func (s *State) SetStreamingIntent(streaming bool)
- func (s *State) StreamingIntent() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterLogging ¶
func TerminalEnabled ¶
func WithExecution ¶
Types ¶
type ExecuteFunc ¶
type ExecuteFunc func(http.ResponseWriter, *http.Request)
type State ¶
type State struct {
// contains filtered or unexported fields
}
func FromRequest ¶
func (*State) AdvanceRateLimitTarget ¶
func (*State) ConfigureRateLimitFallback ¶
func (*State) Consume ¶
Consume executes the request-local AI operation at most once. The route response plan owns protocol execution; this guard keeps direct compatibility handlers from forwarding the same request twice when both layers observe it.