Documentation
¶
Overview ¶
Package web is the operator dashboard: server-rendered HTML with HTMX for partial updates and an SSE feed for live refresh.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelView ¶
type ChannelView struct {
sqlcgen.Channel
InFlight int64
ModelList []string
AvgLatencyMs int64
TokenName string
Closed bool
}
ChannelView decorates a channel.
type ChartBar ¶
type ChartBar struct {
Label string
Total, Completed, Failed int64
X, W, Y, H float64
YOk, HOk, YFail, HFail float64
}
ChartBar is one bucket in the throughput chart.
type ChartView ¶
type ChartView struct {
Bars []ChartBar
Labels []ChartLabel
W, H int
Max int64
}
ChartView renders buckets as an SVG bar chart.
type Counts ¶
type Counts struct{ Queued, InFlight, Online int64 }
Counts are the live gauges shown in the sidebar.
type EventTable ¶
EventTable is the data for the event-table partial.
type Flash ¶
type Flash struct{ Kind, Message string }
Flash is a one-shot message shown at the top of the next page.
type MessageView ¶
type MessageView struct {
Role string
Text string
Name string
ToolCallID string
ToolCalls []openai.ToolCall
Index int
}
MessageView is one chat message.
type Page ¶
type Page struct {
Title string
Instance string
Version string
CSRF string
Path string
Flash *Flash
Counts Counts
Now time.Time
}
Page is embedded by every page view.
type Pager ¶
Pager paginates a list. Base is the path plus query (without page=), ending in '?' or '&'.
type RequestTable ¶
type RequestTable struct {
Rows []RequestView
Pager Pager
ID string
URL string
ShowKey bool
ShowChannel bool
ShowConversation bool
EmptyText string
}
RequestTable is the data for the request-table partial.
type RequestView ¶
type RequestView struct {
sqlcgen.Request
KeyName string
ChannelName string
Prompt string
Answer string
LatencyMs int64
QueueMs int64
TTFTMs int64
ToolCallCount int
}
RequestView decorates a request row for templates.
type Server ¶
type Server struct {
DBPath string
// contains filtered or unexported fields
}
Server serves the dashboard.
type TurnView ¶
type TurnView struct {
Request RequestView
Messages []MessageView
Answer *openai.Answer
HasAnswer bool
}
TurnView is one exchange in a reconstructed conversation.