exampleutil

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintUsage

func PrintUsage(usage litellm.Usage)

func Stream added in v1.9.0

func Stream(ctx context.Context, client *litellm.Client, req litellm.Request) (*litellm.Response, error)

Stream runs req and prints reasoning and answer text as they arrive.

Types

type StreamPrinter

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

func (*StreamPrinter) Print added in v1.9.0

func (p *StreamPrinter) Print(event litellm.Event) error

Print is a litellm.Handle callback that prints reasoning and answer text.

func (*StreamPrinter) WriteAnswer

func (p *StreamPrinter) WriteAnswer(text string)

func (*StreamPrinter) WriteReasoning

func (p *StreamPrinter) WriteReasoning(text string)

Jump to

Keyboard shortcuts

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