oaistream

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StreamAdapter

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

StreamAdapter adapts the OpenAI stream to our interface

func NewStreamAdapter

func NewStreamAdapter(stream *openai.ChatCompletionStream, trackUsage bool) *StreamAdapter

func (*StreamAdapter) Close

func (a *StreamAdapter) Close()

Close closes the stream

func (*StreamAdapter) Recv

Recv gets the next completion chunk

Jump to

Keyboard shortcuts

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