Documentation
¶
Overview ¶
Package context estimates and prepares model context windows.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstimateRequest ¶
EstimateRequest returns a token estimate for a provider request, including the message list and tool schemas that providers count as prompt input.
func ObserveUsage ¶
ObserveUsage records provider input-token usage to calibrate future estimates.
Types ¶
type Breakdown ¶
type Breakdown struct {
SystemRuntime int
ToolSchema int
UserAssistant int
ToolResult int
Other int
Total int
}
Breakdown summarizes the uncalibrated request estimate by broad source.
func EstimateRequestBreakdown ¶
func EstimateRequestBreakdown(msgs []message.Message, tools []provider.ToolDefinition, model string) Breakdown
EstimateRequestBreakdown returns a lightweight request estimate breakdown.
Click to show internal directories.
Click to hide internal directories.