tester

package
v0.9.5-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func (*Client) Call

func (c *Client) Call(_ context.Context, messageRequest types.CompletionRequest, _ chan<- types.CompletionStatus) (resp *types.CompletionMessage, respErr error)

type Result

type Result struct {
	Text    string
	Func    types.CompletionFunctionCall
	Content []types.ContentPart
	Err     error
}

type Runner

type Runner struct {
	*runner.Runner

	Client *Client
}

func NewRunner

func NewRunner(t *testing.T) *Runner

func (*Runner) AssertResponded added in v0.6.0

func (r *Runner) AssertResponded(t *testing.T)

func (*Runner) Load added in v0.6.0

func (r *Runner) Load(script string) (types.Program, error)

func (*Runner) RespondWith

func (r *Runner) RespondWith(result ...Result)

func (*Runner) Run

func (r *Runner) Run(script, input string) (string, error)

func (*Runner) RunDefault

func (r *Runner) RunDefault() string

Jump to

Keyboard shortcuts

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