Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatEvents ¶
FormatEvents formats a list of raw event strings back into SSE response payloads.
Types ¶
type ResponsesStreamTransformer ¶ added in v1.2.4
type ResponsesStreamTransformer struct {
// contains filtered or unexported fields
}
func (*ResponsesStreamTransformer) TranslateBlock ¶ added in v1.2.4
func (st *ResponsesStreamTransformer) TranslateBlock(block string) ([]string, error)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Addr ¶
Addr returns the bound listener address (useful if port is randomly allocated).
func (*Server) AvailableModels ¶
type StreamTransformer ¶
type StreamTransformer struct {
// contains filtered or unexported fields
}
StreamTransformer coordinates translating a stream of OpenAI chunks into Anthropic SSE chunks.
func (*StreamTransformer) Finish ¶ added in v1.2.4
func (st *StreamTransformer) Finish() []string
func (*StreamTransformer) TranslateChunk ¶
func (st *StreamTransformer) TranslateChunk(line string) ([]string, error)
TranslateChunk transforms a single raw line of "data: {...}" from OpenAI into one or more Anthropic SSE events.
Click to show internal directories.
Click to hide internal directories.