Documentation
¶
Overview ¶
Package fake provides a canned-response implementation of llms.Model for tests, in the spirit of testing/fstest's MapFS.
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 (*LLM) AddResponse ¶
AddResponse adds a response to the list of responses.
func (*LLM) GenerateContent ¶
func (f *LLM) GenerateContent(ctx context.Context, _ []llms.MessageContent, options ...llms.CallOption) (*llms.ContentResponse, error)
GenerateContent returns the next configured response. It honors context cancellation and, when llms.WithStreamingFunc is set, streams the response to the callback before returning it; a callback error aborts the request.
Click to show internal directories.
Click to hide internal directories.