mocks

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockLanguageModel

type MockLanguageModel struct {
	mock.Mock
}

MockLanguageModel is an autogenerated mock type for the LanguageModel type

func NewMockLanguageModel

func NewMockLanguageModel(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockLanguageModel

NewMockLanguageModel creates a new instance of MockLanguageModel. 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 (*MockLanguageModel) ChatCompletion

func (_mock *MockLanguageModel) ChatCompletion(conversation llm.CompletionRequest, opts ...llm.LanguageModelOption) (*llm.TextStreamResult, error)

ChatCompletion provides a mock function for the type MockLanguageModel

func (*MockLanguageModel) ChatCompletionNoStream

func (_mock *MockLanguageModel) ChatCompletionNoStream(conversation llm.CompletionRequest, opts ...llm.LanguageModelOption) (string, error)

ChatCompletionNoStream provides a mock function for the type MockLanguageModel

func (*MockLanguageModel) CountTokens

func (_mock *MockLanguageModel) CountTokens(text string) int

CountTokens provides a mock function for the type MockLanguageModel

func (*MockLanguageModel) EXPECT

func (*MockLanguageModel) InputTokenLimit

func (_mock *MockLanguageModel) InputTokenLimit() int

InputTokenLimit provides a mock function for the type MockLanguageModel

type MockLanguageModel_ChatCompletionNoStream_Call

type MockLanguageModel_ChatCompletionNoStream_Call struct {
	*mock.Call
}

MockLanguageModel_ChatCompletionNoStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChatCompletionNoStream'

func (*MockLanguageModel_ChatCompletionNoStream_Call) Return

func (*MockLanguageModel_ChatCompletionNoStream_Call) Run

func (*MockLanguageModel_ChatCompletionNoStream_Call) RunAndReturn

type MockLanguageModel_ChatCompletion_Call

type MockLanguageModel_ChatCompletion_Call struct {
	*mock.Call
}

MockLanguageModel_ChatCompletion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChatCompletion'

func (*MockLanguageModel_ChatCompletion_Call) Return

func (*MockLanguageModel_ChatCompletion_Call) Run

func (*MockLanguageModel_ChatCompletion_Call) RunAndReturn

type MockLanguageModel_CountTokens_Call

type MockLanguageModel_CountTokens_Call struct {
	*mock.Call
}

MockLanguageModel_CountTokens_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountTokens'

func (*MockLanguageModel_CountTokens_Call) Return

func (*MockLanguageModel_CountTokens_Call) Run

func (*MockLanguageModel_CountTokens_Call) RunAndReturn

type MockLanguageModel_Expecter

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

func (*MockLanguageModel_Expecter) ChatCompletion

func (_e *MockLanguageModel_Expecter) ChatCompletion(conversation interface{}, opts ...interface{}) *MockLanguageModel_ChatCompletion_Call

ChatCompletion is a helper method to define mock.On call

  • conversation
  • opts

func (*MockLanguageModel_Expecter) ChatCompletionNoStream

func (_e *MockLanguageModel_Expecter) ChatCompletionNoStream(conversation interface{}, opts ...interface{}) *MockLanguageModel_ChatCompletionNoStream_Call

ChatCompletionNoStream is a helper method to define mock.On call

  • conversation
  • opts

func (*MockLanguageModel_Expecter) CountTokens

func (_e *MockLanguageModel_Expecter) CountTokens(text interface{}) *MockLanguageModel_CountTokens_Call

CountTokens is a helper method to define mock.On call

  • text

func (*MockLanguageModel_Expecter) InputTokenLimit

InputTokenLimit is a helper method to define mock.On call

type MockLanguageModel_InputTokenLimit_Call

type MockLanguageModel_InputTokenLimit_Call struct {
	*mock.Call
}

MockLanguageModel_InputTokenLimit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InputTokenLimit'

func (*MockLanguageModel_InputTokenLimit_Call) Return

func (*MockLanguageModel_InputTokenLimit_Call) Run

func (*MockLanguageModel_InputTokenLimit_Call) RunAndReturn

Jump to

Keyboard shortcuts

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