Documentation ¶
Index ¶
- Variables
- type Error
- type Option
- func With(p *Params) Option
- func WithBatch(size int32) Option
- func WithNKeep(n int32) Option
- func WithPenalty(penalty float64) Option
- func WithRepeat(repeat int32) Option
- func WithSeed(s int64) Option
- func WithStopWords(stop ...string) Option
- func WithTemperature(temp float64) Option
- func WithTokens(tokens int) Option
- func WithTopK(topK int64) Option
- func WithTopP(topP float64) Option
- type Params
- type Prediction
Constants ¶
This section is empty.
Variables ¶
View Source
var (
MaxTokenSize = 1024
)
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Params)
func WithPenalty ¶
SetPenalty sets the repetition penalty for text generation.
func WithRepeat ¶
SetRepeat sets the number of times to repeat text generation.
func WithStopWords ¶
SetStopWords sets the prompts that will stop predictions.
func WithTemperature ¶
SetTemperature sets the temperature value for text generation.
func WithTokens ¶
SetTokens sets the number of tokens to generate.
type Prediction ¶
type Prediction uint32
func (Prediction) Cancel ¶
func (p Prediction) Cancel() error
func (Prediction) Next ¶
func (p Prediction) Next() (string, error)
func (Prediction) NextWithTimeout ¶
func (p Prediction) NextWithTimeout(timeout time.Duration) (string, error)
Click to show internal directories.
Click to hide internal directories.