Documentation
¶
Overview ¶
Package observation classifies adapted model requests without retaining bodies.
Index ¶
Constants ¶
const ProviderKey = "sailry.observation"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context keeps exact byte ranges outside the adapted request text.
func NewContext ¶
func PersistedContext ¶
func (Context) MarshalJSON ¶
func (*Context) UnmarshalJSON ¶
type Inventory ¶
Inventory belongs to one frozen model request, never a cached provider. A nil inventory means provenance is unavailable; an empty one means known empty.
func (Inventory) MarshalJSON ¶
func (*Inventory) UnmarshalJSON ¶
type ResponsesHistory ¶ added in v0.2.7
type ResponsesHistory struct {
// contains filtered or unexported fields
}
ResponsesHistory carries one receipt per recently completed session in memory. The engine serializes Start and Complete with turn claims and durable ends.
func (*ResponsesHistory) Complete ¶ added in v0.2.7
func (history *ResponsesHistory) Complete(ctx context.Context)
Complete hands off only a receipt observed by this execution. A turn with no measurable last attempt cannot forward the previous turn's receipt.
type ResponsesShape ¶ added in v0.2.7
type ResponsesShape struct {
// contains filtered or unexported fields
}
type ResponsesTrace ¶ added in v0.2.7
type ResponsesTrace struct {
// contains filtered or unexported fields
}
ResponsesTrace belongs to one execution. Only the latest receipt's keyed digests and item sizes are retained, and only comparisons enter history.
func ResponsesTraceFrom ¶ added in v0.2.7
func ResponsesTraceFrom(ctx context.Context) *ResponsesTrace
func (*ResponsesTrace) Clear ¶ added in v0.2.7
func (trace *ResponsesTrace) Clear()
func (*ResponsesTrace) Prepare ¶ added in v0.2.7
func (trace *ResponsesTrace) Prepare(raw []byte, inventory *Inventory) (Result, *ResponsesShape)
func (*ResponsesTrace) Record ¶ added in v0.2.7
func (trace *ResponsesTrace) Record(request string, attempt uint64, cached *uint64, shape *ResponsesShape) *protocol.ConversationResponsesBoundary
Record advances in attempt order. Missing capture breaks adjacency, since an unobserved or unconfirmed request may have reached the upstream cache.
type Result ¶
type Result struct {
Categories []protocol.ConversationObservationCategory
Complete bool
}
type Source ¶
type Source struct {
Kind protocol.ConversationObservationCategoryKind
Text string
}