providertesting

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const OllamaTestModel = "qwen:0.5b"

OllamaTestModel holds the smallest Ollama model that we use for testing.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockLoader added in v0.5.0

type MockLoader struct {
	mock.Mock
}

MockLoader is an autogenerated mock type for the Loader type

func NewMockLoader added in v0.5.0

func NewMockLoader(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockLoader

NewMockLoader creates a new instance of MockLoader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockLoader) Load added in v0.5.0

func (_m *MockLoader) Load(modelIdentifier string) error

Load provides a mock function with given fields: modelIdentifier

func (*MockLoader) Unload added in v0.5.0

func (_m *MockLoader) Unload(modelIdentifier string) error

Unload provides a mock function with given fields: modelIdentifier

type MockProvider added in v0.5.0

type MockProvider struct {
	mock.Mock
}

MockProvider is an autogenerated mock type for the Provider type

func NewMockProvider added in v0.5.0

func NewMockProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockProvider

NewMockProvider creates a new instance of MockProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func NewMockProviderNamedWithModels added in v0.5.0

func NewMockProviderNamedWithModels(t *testing.T, id string, models []model.Model) *MockProvider

NewMockProviderNamedWithModels returns a new mocked provider with models.

func (*MockProvider) Available added in v0.5.0

func (_m *MockProvider) Available(logger *log.Logger) error

Available provides a mock function with given fields: logger

func (*MockProvider) ID added in v0.5.0

func (_m *MockProvider) ID() string

ID provides a mock function with given fields:

func (*MockProvider) Models added in v0.5.0

func (_m *MockProvider) Models() ([]model.Model, error)

Models provides a mock function with given fields:

type MockPuller added in v0.6.0

type MockPuller struct {
	mock.Mock
}

MockPuller is an autogenerated mock type for the Puller type

func NewMockPuller added in v0.6.0

func NewMockPuller(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockPuller

NewMockPuller creates a new instance of MockPuller. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockPuller) Pull added in v0.6.0

func (_m *MockPuller) Pull(logger *log.Logger, modelIdentifier string) error

Pull provides a mock function with given fields: logger, modelIdentifier

type MockQuery added in v0.5.0

type MockQuery struct {
	mock.Mock
}

MockQuery is an autogenerated mock type for the Query type

func NewMockQuery added in v0.5.0

func NewMockQuery(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockQuery

NewMockQuery creates a new instance of MockQuery. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockQuery) Query added in v0.5.0

func (_m *MockQuery) Query(ctx context.Context, modelIdentifier string, promptText string) (string, error)

Query provides a mock function with given fields: ctx, modelIdentifier, promptText

Jump to

Keyboard shortcuts

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