fake

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: GPL-3.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 LLM

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

func NewFakeLLM

func NewFakeLLM(responses []string) *LLM

func (*LLM) AddResponse

func (f *LLM) AddResponse(response string)

AddResponse adds a response to the list of responses.

func (*LLM) Call

func (f *LLM) Call(ctx context.Context, prompt string, options ...llms.CallOption) (string, error)

Call chama o modelo com uma única string de prompt.

func (*LLM) GenerateContent

func (f *LLM) GenerateContent(_ context.Context, _ []llms.MessageContent, _ ...llms.CallOption) (*llms.ContentResponse, error)

GenerateContent generate fake content.

func (*LLM) Reset

func (f *LLM) Reset()

Reset the index to 0.

Jump to

Keyboard shortcuts

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