Movatterモバイル変換


[0]ホーム

URL:


Notice  The highest tagged major version isv3.

ssestream

package
v1.12.0Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License:Apache-2.0Imports:8Imported by:36

Details

Repository

github.com/openai/openai-go

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcRegisterDecoder

func RegisterDecoder(contentTypestring, decoder func(io.ReadCloser)Decoder)

Types

typeDecoder

type Decoder interface {Event()EventNext()boolClose()errorErr()error}

funcNewDecoder

func NewDecoder(res *http.Response)Decoder

typeEvent

type Event struct {TypestringData []byte}

typeStream

type Stream[Tany] struct {// contains filtered or unexported fields}

funcNewStream

func NewStream[Tany](decoderDecoder, errerror) *Stream[T]

func (*Stream[T])Close

func (s *Stream[T]) Close()error

func (*Stream[T])Current

func (s *Stream[T]) Current() T

func (*Stream[T])Err

func (s *Stream[T]) Err()error

func (*Stream[T])Next

func (s *Stream[T]) Next()bool

Next returns false if the stream has ended or an error occurred.Call Stream.Current() to get the current value.Call Stream.Err() to get the error.

for stream.Next() {data := stream.Current()} if stream.Err() != nil {... }

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp