responses

package
v0.0.0-...-76cab00 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

Generator handles response generation

func NewGenerator

func NewGenerator(cfg *config.Config) *Generator

NewGenerator creates a new response generator

func (*Generator) GenerateImage

func (g *Generator) GenerateImage(prompt string) string

GenerateImage generates a real PNG image and returns base64 encoded data

func (*Generator) GenerateStream

func (g *Generator) GenerateStream(prompt string) <-chan string

GenerateStream generates streaming text chunks

func (*Generator) GenerateText

func (g *Generator) GenerateText(prompt string) string

GenerateText generates mock text response

func (*Generator) GetTTFT

func (g *Generator) GetTTFT() time.Duration

GetTTFT returns time to first token delay

func (*Generator) ShouldReturnError

func (g *Generator) ShouldReturnError() bool

ShouldReturnError determines if an error should be returned

Jump to

Keyboard shortcuts

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