assembler

package
v0.260411.2300-preview Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2026 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnthropicStreamAssembler

type AnthropicStreamAssembler struct {
	// contains filtered or unexported fields
}

AnthropicStreamAssembler assembles Anthropic streaming responses It is a pure assembler that doesn't depend on recording logic

func NewAnthropicStreamAssembler

func NewAnthropicStreamAssembler() *AnthropicStreamAssembler

NewAnthropicStreamAssembler creates a new assembler for Anthropic streams

func (*AnthropicStreamAssembler) Finish

func (a *AnthropicStreamAssembler) Finish(model string, inputTokens, outputTokens int) *anthropic.Message

Finish assembles the final response and returns it as anthropic.Message

func (*AnthropicStreamAssembler) RecordV1BetaEvent

RecordV1BetaEvent processes a v1 beta stream event

func (*AnthropicStreamAssembler) RecordV1Event

RecordV1Event processes a v1 stream event

func (*AnthropicStreamAssembler) SetUsage

func (a *AnthropicStreamAssembler) SetUsage(inputTokens, outputTokens int)

SetUsage sets the usage data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL