testfakes

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ModelID = fakellm.ModelID

Model id every scripted completion of the loopback provider reports

Variables

This section is empty.

Functions

func WriteFakeLLMHome

func WriteFakeLLMHome(home, baseURL, apiKey, extraConfig string) error

Writes a minimal config.yaml and .env routing the main model of a home to baseURL

Types

type Call

type Call = fakellm.Call

Responses, records and the server of the scripted loopback provider, the same types the packages under pkg use

type DropMidStream

type DropMidStream = fakellm.DropMidStream

Responses, records and the server of the scripted loopback provider, the same types the packages under pkg use

type Error

type Error = fakellm.Error

Responses, records and the server of the scripted loopback provider, the same types the packages under pkg use

type Hang

type Hang = fakellm.Hang

Responses, records and the server of the scripted loopback provider, the same types the packages under pkg use

type Options

type Options = fakellm.Options

Responses, records and the server of the scripted loopback provider, the same types the packages under pkg use

type Raw

type Raw = fakellm.Raw

Responses, records and the server of the scripted loopback provider, the same types the packages under pkg use

type Request

type Request = fakellm.Request

Responses, records and the server of the scripted loopback provider, the same types the packages under pkg use

type Responder

type Responder = fakellm.Responder

Responses, records and the server of the scripted loopback provider, the same types the packages under pkg use

type Server

type Server = fakellm.Server

Responses, records and the server of the scripted loopback provider, the same types the packages under pkg use

func NewFakeLLM

func NewFakeLLM(script []any, opts Options) (*Server, error)

Starts a provider answering main turns from script in order, then with the default text

func NewFakeLLMResponder

func NewFakeLLMResponder(responder Responder, opts Options) (*Server, error)

Starts a provider whose every main turn is answered by responder

type StallMidStream

type StallMidStream = fakellm.StallMidStream

Responses, records and the server of the scripted loopback provider, the same types the packages under pkg use

type Text

type Text = fakellm.Text

Responses, records and the server of the scripted loopback provider, the same types the packages under pkg use

type ToolCall

type ToolCall = fakellm.ToolCall

Responses, records and the server of the scripted loopback provider, the same types the packages under pkg use

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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