mocks

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockChat

type MockChat[RawRequest any, RawResponse any] struct {
	mock.Mock
}

MockChat is an autogenerated mock type for the Chat type

func NewMockChat

func NewMockChat[RawRequest any, RawResponse any](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockChat[RawRequest, RawResponse]

NewMockChat creates a new instance of MockChat. 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 (*MockChat[RawRequest, RawResponse]) Completion

func (_m *MockChat[RawRequest, RawResponse]) Completion(ctx context.Context, message golm.UserMessage, options golm.CompletionParams) (*golm.AssistantMessage, error)

Completion provides a mock function with given fields: ctx, message, options

func (*MockChat[RawRequest, RawResponse]) CompletionJSON

func (_m *MockChat[RawRequest, RawResponse]) CompletionJSON(ctx context.Context, message golm.UserMessage, options golm.CompletionParams, dest any) error

CompletionJSON provides a mock function with given fields: ctx, message, options, dest

func (*MockChat[RawRequest, RawResponse]) CompletionStream

func (_m *MockChat[RawRequest, RawResponse]) CompletionStream(ctx context.Context, message golm.UserMessage, options golm.CompletionParams) (<-chan string, utils.StreamWaitFn)

CompletionStream provides a mock function with given fields: ctx, message, options

func (*MockChat[RawRequest, RawResponse]) EXPECT

func (_m *MockChat[RawRequest, RawResponse]) EXPECT() *MockChat_Expecter[RawRequest, RawResponse]

func (*MockChat[RawRequest, RawResponse]) GetHistory

func (_m *MockChat[RawRequest, RawResponse]) GetHistory() golm.ChatHistory

GetHistory provides a mock function with no fields

func (*MockChat[RawRequest, RawResponse]) PushHistory

func (_m *MockChat[RawRequest, RawResponse]) PushHistory(messages ...golm.MessageWithRole)

PushHistory provides a mock function with given fields: messages

func (*MockChat[RawRequest, RawResponse]) RawQuery

func (_m *MockChat[RawRequest, RawResponse]) RawQuery(ctx context.Context, request RawRequest) (RawResponse, error)

RawQuery provides a mock function with given fields: ctx, request

func (*MockChat[RawRequest, RawResponse]) SetHistory

func (_m *MockChat[RawRequest, RawResponse]) SetHistory(history golm.ChatHistory)

SetHistory provides a mock function with given fields: history

func (*MockChat[RawRequest, RawResponse]) SetSystem

func (_m *MockChat[RawRequest, RawResponse]) SetSystem(system *golm.SystemMessage)

SetSystem provides a mock function with given fields: system

type MockChatBase

type MockChatBase struct {
	mock.Mock
}

MockChatBase is an autogenerated mock type for the ChatBase type

func NewMockChatBase

func NewMockChatBase(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockChatBase

NewMockChatBase creates a new instance of MockChatBase. 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 (*MockChatBase) Completion

func (_m *MockChatBase) Completion(ctx context.Context, message golm.UserMessage, options golm.CompletionParams) (*golm.AssistantMessage, error)

Completion provides a mock function with given fields: ctx, message, options

func (*MockChatBase) CompletionJSON

func (_m *MockChatBase) CompletionJSON(ctx context.Context, message golm.UserMessage, options golm.CompletionParams, dest any) error

CompletionJSON provides a mock function with given fields: ctx, message, options, dest

func (*MockChatBase) CompletionStream

func (_m *MockChatBase) CompletionStream(ctx context.Context, message golm.UserMessage, options golm.CompletionParams) (<-chan string, utils.StreamWaitFn)

CompletionStream provides a mock function with given fields: ctx, message, options

func (*MockChatBase) EXPECT

func (_m *MockChatBase) EXPECT() *MockChatBase_Expecter

func (*MockChatBase) GetHistory

func (_m *MockChatBase) GetHistory() golm.ChatHistory

GetHistory provides a mock function with no fields

func (*MockChatBase) PushHistory

func (_m *MockChatBase) PushHistory(messages ...golm.MessageWithRole)

PushHistory provides a mock function with given fields: messages

func (*MockChatBase) SetHistory

func (_m *MockChatBase) SetHistory(history golm.ChatHistory)

SetHistory provides a mock function with given fields: history

func (*MockChatBase) SetSystem

func (_m *MockChatBase) SetSystem(system *golm.SystemMessage)

SetSystem provides a mock function with given fields: system

type MockChatBase_CompletionJSON_Call

type MockChatBase_CompletionJSON_Call struct {
	*mock.Call
}

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

func (*MockChatBase_CompletionJSON_Call) Return

func (*MockChatBase_CompletionJSON_Call) Run

func (*MockChatBase_CompletionJSON_Call) RunAndReturn

type MockChatBase_CompletionStream_Call

type MockChatBase_CompletionStream_Call struct {
	*mock.Call
}

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

func (*MockChatBase_CompletionStream_Call) Return

func (*MockChatBase_CompletionStream_Call) Run

func (*MockChatBase_CompletionStream_Call) RunAndReturn

type MockChatBase_Completion_Call

type MockChatBase_Completion_Call struct {
	*mock.Call
}

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

func (*MockChatBase_Completion_Call) Return

func (*MockChatBase_Completion_Call) Run

type MockChatBase_Expecter

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

func (*MockChatBase_Expecter) Completion

func (_e *MockChatBase_Expecter) Completion(ctx interface{}, message interface{}, options interface{}) *MockChatBase_Completion_Call

Completion is a helper method to define mock.On call

  • ctx context.Context
  • message golm.UserMessage
  • options golm.CompletionParams

func (*MockChatBase_Expecter) CompletionJSON

func (_e *MockChatBase_Expecter) CompletionJSON(ctx interface{}, message interface{}, options interface{}, dest interface{}) *MockChatBase_CompletionJSON_Call

CompletionJSON is a helper method to define mock.On call

  • ctx context.Context
  • message golm.UserMessage
  • options golm.CompletionParams
  • dest any

func (*MockChatBase_Expecter) CompletionStream

func (_e *MockChatBase_Expecter) CompletionStream(ctx interface{}, message interface{}, options interface{}) *MockChatBase_CompletionStream_Call

CompletionStream is a helper method to define mock.On call

  • ctx context.Context
  • message golm.UserMessage
  • options golm.CompletionParams

func (*MockChatBase_Expecter) GetHistory

GetHistory is a helper method to define mock.On call

func (*MockChatBase_Expecter) PushHistory

func (_e *MockChatBase_Expecter) PushHistory(messages ...interface{}) *MockChatBase_PushHistory_Call

PushHistory is a helper method to define mock.On call

  • messages ...golm.MessageWithRole

func (*MockChatBase_Expecter) SetHistory

func (_e *MockChatBase_Expecter) SetHistory(history interface{}) *MockChatBase_SetHistory_Call

SetHistory is a helper method to define mock.On call

  • history golm.ChatHistory

func (*MockChatBase_Expecter) SetSystem

func (_e *MockChatBase_Expecter) SetSystem(system interface{}) *MockChatBase_SetSystem_Call

SetSystem is a helper method to define mock.On call

  • system *golm.SystemMessage

type MockChatBase_GetHistory_Call

type MockChatBase_GetHistory_Call struct {
	*mock.Call
}

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

func (*MockChatBase_GetHistory_Call) Return

func (*MockChatBase_GetHistory_Call) Run

func (*MockChatBase_GetHistory_Call) RunAndReturn

type MockChatBase_PushHistory_Call

type MockChatBase_PushHistory_Call struct {
	*mock.Call
}

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

func (*MockChatBase_PushHistory_Call) Return

func (*MockChatBase_PushHistory_Call) Run

func (*MockChatBase_PushHistory_Call) RunAndReturn

type MockChatBase_SetHistory_Call

type MockChatBase_SetHistory_Call struct {
	*mock.Call
}

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

func (*MockChatBase_SetHistory_Call) Return

func (*MockChatBase_SetHistory_Call) Run

func (*MockChatBase_SetHistory_Call) RunAndReturn

type MockChatBase_SetSystem_Call

type MockChatBase_SetSystem_Call struct {
	*mock.Call
}

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

func (*MockChatBase_SetSystem_Call) Return

func (*MockChatBase_SetSystem_Call) Run

func (*MockChatBase_SetSystem_Call) RunAndReturn

type MockChatBinding

type MockChatBinding[RawRequest any, RawResponse any, StreamResponse any] struct {
	mock.Mock
}

MockChatBinding is an autogenerated mock type for the ChatBinding type

func NewMockChatBinding

func NewMockChatBinding[RawRequest any, RawResponse any, StreamResponse any](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockChatBinding[RawRequest, RawResponse, StreamResponse]

NewMockChatBinding creates a new instance of MockChatBinding. 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 (*MockChatBinding[RawRequest, RawResponse, StreamResponse]) Completion

func (_m *MockChatBinding[RawRequest, RawResponse, StreamResponse]) Completion(ctx context.Context, message golm.UserMessage, options golm.CompletionParams, history golm.ChatHistory) (*golm.AssistantMessage, error)

Completion provides a mock function with given fields: ctx, message, options, history

func (*MockChatBinding[RawRequest, RawResponse, StreamResponse]) CompletionStream

func (_m *MockChatBinding[RawRequest, RawResponse, StreamResponse]) CompletionStream(ctx context.Context, message golm.UserMessage, options golm.CompletionParams, history golm.ChatHistory) (<-chan StreamResponse, utils.StreamWaitFn)

CompletionStream provides a mock function with given fields: ctx, message, options, history

func (*MockChatBinding[RawRequest, RawResponse, StreamResponse]) EXPECT

func (_m *MockChatBinding[RawRequest, RawResponse, StreamResponse]) EXPECT() *MockChatBinding_Expecter[RawRequest, RawResponse, StreamResponse]

func (*MockChatBinding[RawRequest, RawResponse, StreamResponse]) RawQuery

func (_m *MockChatBinding[RawRequest, RawResponse, StreamResponse]) RawQuery(ctx context.Context, request RawRequest, history golm.ChatHistory) (RawResponse, error)

RawQuery provides a mock function with given fields: ctx, request, history

func (*MockChatBinding[RawRequest, RawResponse, StreamResponse]) StreamResponseToMessage

func (_m *MockChatBinding[RawRequest, RawResponse, StreamResponse]) StreamResponseToMessage(response StreamResponse) string

StreamResponseToMessage provides a mock function with given fields: response

type MockChatBinding_CompletionStream_Call

type MockChatBinding_CompletionStream_Call[RawRequest any, RawResponse any, StreamResponse any] struct {
	*mock.Call
}

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

func (*MockChatBinding_CompletionStream_Call[RawRequest, RawResponse, StreamResponse]) Return

func (_c *MockChatBinding_CompletionStream_Call[RawRequest, RawResponse, StreamResponse]) Return(response <-chan StreamResponse, wait utils.StreamWaitFn) *MockChatBinding_CompletionStream_Call[RawRequest, RawResponse, StreamResponse]

func (*MockChatBinding_CompletionStream_Call[RawRequest, RawResponse, StreamResponse]) Run

func (_c *MockChatBinding_CompletionStream_Call[RawRequest, RawResponse, StreamResponse]) Run(run func(ctx context.Context, message golm.UserMessage, options golm.CompletionParams, history golm.ChatHistory)) *MockChatBinding_CompletionStream_Call[RawRequest, RawResponse, StreamResponse]

func (*MockChatBinding_CompletionStream_Call[RawRequest, RawResponse, StreamResponse]) RunAndReturn

func (_c *MockChatBinding_CompletionStream_Call[RawRequest, RawResponse, StreamResponse]) RunAndReturn(run func(context.Context, golm.UserMessage, golm.CompletionParams, golm.ChatHistory) (<-chan StreamResponse, utils.StreamWaitFn)) *MockChatBinding_CompletionStream_Call[RawRequest, RawResponse, StreamResponse]

type MockChatBinding_Completion_Call

type MockChatBinding_Completion_Call[RawRequest any, RawResponse any, StreamResponse any] struct {
	*mock.Call
}

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

func (*MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]) Return

func (_c *MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]) Return(response *golm.AssistantMessage, err error) *MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]

func (*MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]) Run

func (_c *MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]) Run(run func(ctx context.Context, message golm.UserMessage, options golm.CompletionParams, history golm.ChatHistory)) *MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]

func (*MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]) RunAndReturn

func (_c *MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]) RunAndReturn(run func(context.Context, golm.UserMessage, golm.CompletionParams, golm.ChatHistory) (*golm.AssistantMessage, error)) *MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]

type MockChatBinding_Expecter

type MockChatBinding_Expecter[RawRequest any, RawResponse any, StreamResponse any] struct {
	// contains filtered or unexported fields
}

func (*MockChatBinding_Expecter[RawRequest, RawResponse, StreamResponse]) Completion

func (_e *MockChatBinding_Expecter[RawRequest, RawResponse, StreamResponse]) Completion(ctx interface{}, message interface{}, options interface{}, history interface{}) *MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]

Completion is a helper method to define mock.On call

  • ctx context.Context
  • message golm.UserMessage
  • options golm.CompletionParams
  • history golm.ChatHistory

func (*MockChatBinding_Expecter[RawRequest, RawResponse, StreamResponse]) CompletionStream

func (_e *MockChatBinding_Expecter[RawRequest, RawResponse, StreamResponse]) CompletionStream(ctx interface{}, message interface{}, options interface{}, history interface{}) *MockChatBinding_CompletionStream_Call[RawRequest, RawResponse, StreamResponse]

CompletionStream is a helper method to define mock.On call

  • ctx context.Context
  • message golm.UserMessage
  • options golm.CompletionParams
  • history golm.ChatHistory

func (*MockChatBinding_Expecter[RawRequest, RawResponse, StreamResponse]) RawQuery

func (_e *MockChatBinding_Expecter[RawRequest, RawResponse, StreamResponse]) RawQuery(ctx interface{}, request interface{}, history interface{}) *MockChatBinding_RawQuery_Call[RawRequest, RawResponse, StreamResponse]

RawQuery is a helper method to define mock.On call

  • ctx context.Context
  • request RawRequest
  • history golm.ChatHistory

func (*MockChatBinding_Expecter[RawRequest, RawResponse, StreamResponse]) StreamResponseToMessage

func (_e *MockChatBinding_Expecter[RawRequest, RawResponse, StreamResponse]) StreamResponseToMessage(response interface{}) *MockChatBinding_StreamResponseToMessage_Call[RawRequest, RawResponse, StreamResponse]

StreamResponseToMessage is a helper method to define mock.On call

  • response StreamResponse

type MockChatBinding_RawQuery_Call

type MockChatBinding_RawQuery_Call[RawRequest any, RawResponse any, StreamResponse any] struct {
	*mock.Call
}

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

func (*MockChatBinding_RawQuery_Call[RawRequest, RawResponse, StreamResponse]) Return

func (_c *MockChatBinding_RawQuery_Call[RawRequest, RawResponse, StreamResponse]) Return(response RawResponse, err error) *MockChatBinding_RawQuery_Call[RawRequest, RawResponse, StreamResponse]

func (*MockChatBinding_RawQuery_Call[RawRequest, RawResponse, StreamResponse]) Run

func (_c *MockChatBinding_RawQuery_Call[RawRequest, RawResponse, StreamResponse]) Run(run func(ctx context.Context, request RawRequest, history golm.ChatHistory)) *MockChatBinding_RawQuery_Call[RawRequest, RawResponse, StreamResponse]

func (*MockChatBinding_RawQuery_Call[RawRequest, RawResponse, StreamResponse]) RunAndReturn

func (_c *MockChatBinding_RawQuery_Call[RawRequest, RawResponse, StreamResponse]) RunAndReturn(run func(context.Context, RawRequest, golm.ChatHistory) (RawResponse, error)) *MockChatBinding_RawQuery_Call[RawRequest, RawResponse, StreamResponse]

type MockChatBinding_StreamResponseToMessage_Call

type MockChatBinding_StreamResponseToMessage_Call[RawRequest any, RawResponse any, StreamResponse any] struct {
	*mock.Call
}

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

func (*MockChatBinding_StreamResponseToMessage_Call[RawRequest, RawResponse, StreamResponse]) Return

func (_c *MockChatBinding_StreamResponseToMessage_Call[RawRequest, RawResponse, StreamResponse]) Return(message string) *MockChatBinding_StreamResponseToMessage_Call[RawRequest, RawResponse, StreamResponse]

func (*MockChatBinding_StreamResponseToMessage_Call[RawRequest, RawResponse, StreamResponse]) Run

func (_c *MockChatBinding_StreamResponseToMessage_Call[RawRequest, RawResponse, StreamResponse]) Run(run func(response StreamResponse)) *MockChatBinding_StreamResponseToMessage_Call[RawRequest, RawResponse, StreamResponse]

func (*MockChatBinding_StreamResponseToMessage_Call[RawRequest, RawResponse, StreamResponse]) RunAndReturn

func (_c *MockChatBinding_StreamResponseToMessage_Call[RawRequest, RawResponse, StreamResponse]) RunAndReturn(run func(StreamResponse) string) *MockChatBinding_StreamResponseToMessage_Call[RawRequest, RawResponse, StreamResponse]

type MockChatRaw

type MockChatRaw[RawRequest any, RawResponse any] struct {
	mock.Mock
}

MockChatRaw is an autogenerated mock type for the ChatRaw type

func NewMockChatRaw

func NewMockChatRaw[RawRequest any, RawResponse any](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockChatRaw[RawRequest, RawResponse]

NewMockChatRaw creates a new instance of MockChatRaw. 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 (*MockChatRaw[RawRequest, RawResponse]) EXPECT

func (_m *MockChatRaw[RawRequest, RawResponse]) EXPECT() *MockChatRaw_Expecter[RawRequest, RawResponse]

func (*MockChatRaw[RawRequest, RawResponse]) RawQuery

func (_m *MockChatRaw[RawRequest, RawResponse]) RawQuery(ctx context.Context, request RawRequest) (RawResponse, error)

RawQuery provides a mock function with given fields: ctx, request

type MockChatRaw_Expecter

type MockChatRaw_Expecter[RawRequest any, RawResponse any] struct {
	// contains filtered or unexported fields
}

func (*MockChatRaw_Expecter[RawRequest, RawResponse]) RawQuery

func (_e *MockChatRaw_Expecter[RawRequest, RawResponse]) RawQuery(ctx interface{}, request interface{}) *MockChatRaw_RawQuery_Call[RawRequest, RawResponse]

RawQuery is a helper method to define mock.On call

  • ctx context.Context
  • request RawRequest

type MockChatRaw_RawQuery_Call

type MockChatRaw_RawQuery_Call[RawRequest any, RawResponse any] struct {
	*mock.Call
}

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

func (*MockChatRaw_RawQuery_Call[RawRequest, RawResponse]) Return

func (_c *MockChatRaw_RawQuery_Call[RawRequest, RawResponse]) Return(response RawResponse, err error) *MockChatRaw_RawQuery_Call[RawRequest, RawResponse]

func (*MockChatRaw_RawQuery_Call[RawRequest, RawResponse]) Run

func (_c *MockChatRaw_RawQuery_Call[RawRequest, RawResponse]) Run(run func(ctx context.Context, request RawRequest)) *MockChatRaw_RawQuery_Call[RawRequest, RawResponse]

func (*MockChatRaw_RawQuery_Call[RawRequest, RawResponse]) RunAndReturn

func (_c *MockChatRaw_RawQuery_Call[RawRequest, RawResponse]) RunAndReturn(run func(context.Context, RawRequest) (RawResponse, error)) *MockChatRaw_RawQuery_Call[RawRequest, RawResponse]

type MockChat_CompletionJSON_Call

type MockChat_CompletionJSON_Call[RawRequest any, RawResponse any] struct {
	*mock.Call
}

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

func (*MockChat_CompletionJSON_Call[RawRequest, RawResponse]) Return

func (_c *MockChat_CompletionJSON_Call[RawRequest, RawResponse]) Return(err error) *MockChat_CompletionJSON_Call[RawRequest, RawResponse]

func (*MockChat_CompletionJSON_Call[RawRequest, RawResponse]) Run

func (_c *MockChat_CompletionJSON_Call[RawRequest, RawResponse]) Run(run func(ctx context.Context, message golm.UserMessage, options golm.CompletionParams, dest any)) *MockChat_CompletionJSON_Call[RawRequest, RawResponse]

func (*MockChat_CompletionJSON_Call[RawRequest, RawResponse]) RunAndReturn

func (_c *MockChat_CompletionJSON_Call[RawRequest, RawResponse]) RunAndReturn(run func(context.Context, golm.UserMessage, golm.CompletionParams, any) error) *MockChat_CompletionJSON_Call[RawRequest, RawResponse]

type MockChat_CompletionStream_Call

type MockChat_CompletionStream_Call[RawRequest any, RawResponse any] struct {
	*mock.Call
}

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

func (*MockChat_CompletionStream_Call[RawRequest, RawResponse]) Return

func (_c *MockChat_CompletionStream_Call[RawRequest, RawResponse]) Return(response <-chan string, wait utils.StreamWaitFn) *MockChat_CompletionStream_Call[RawRequest, RawResponse]

func (*MockChat_CompletionStream_Call[RawRequest, RawResponse]) Run

func (_c *MockChat_CompletionStream_Call[RawRequest, RawResponse]) Run(run func(ctx context.Context, message golm.UserMessage, options golm.CompletionParams)) *MockChat_CompletionStream_Call[RawRequest, RawResponse]

func (*MockChat_CompletionStream_Call[RawRequest, RawResponse]) RunAndReturn

func (_c *MockChat_CompletionStream_Call[RawRequest, RawResponse]) RunAndReturn(run func(context.Context, golm.UserMessage, golm.CompletionParams) (<-chan string, utils.StreamWaitFn)) *MockChat_CompletionStream_Call[RawRequest, RawResponse]

type MockChat_Completion_Call

type MockChat_Completion_Call[RawRequest any, RawResponse any] struct {
	*mock.Call
}

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

func (*MockChat_Completion_Call[RawRequest, RawResponse]) Return

func (_c *MockChat_Completion_Call[RawRequest, RawResponse]) Return(response *golm.AssistantMessage, err error) *MockChat_Completion_Call[RawRequest, RawResponse]

func (*MockChat_Completion_Call[RawRequest, RawResponse]) Run

func (_c *MockChat_Completion_Call[RawRequest, RawResponse]) Run(run func(ctx context.Context, message golm.UserMessage, options golm.CompletionParams)) *MockChat_Completion_Call[RawRequest, RawResponse]

func (*MockChat_Completion_Call[RawRequest, RawResponse]) RunAndReturn

func (_c *MockChat_Completion_Call[RawRequest, RawResponse]) RunAndReturn(run func(context.Context, golm.UserMessage, golm.CompletionParams) (*golm.AssistantMessage, error)) *MockChat_Completion_Call[RawRequest, RawResponse]

type MockChat_Expecter

type MockChat_Expecter[RawRequest any, RawResponse any] struct {
	// contains filtered or unexported fields
}

func (*MockChat_Expecter[RawRequest, RawResponse]) Completion

func (_e *MockChat_Expecter[RawRequest, RawResponse]) Completion(ctx interface{}, message interface{}, options interface{}) *MockChat_Completion_Call[RawRequest, RawResponse]

Completion is a helper method to define mock.On call

  • ctx context.Context
  • message golm.UserMessage
  • options golm.CompletionParams

func (*MockChat_Expecter[RawRequest, RawResponse]) CompletionJSON

func (_e *MockChat_Expecter[RawRequest, RawResponse]) CompletionJSON(ctx interface{}, message interface{}, options interface{}, dest interface{}) *MockChat_CompletionJSON_Call[RawRequest, RawResponse]

CompletionJSON is a helper method to define mock.On call

  • ctx context.Context
  • message golm.UserMessage
  • options golm.CompletionParams
  • dest any

func (*MockChat_Expecter[RawRequest, RawResponse]) CompletionStream

func (_e *MockChat_Expecter[RawRequest, RawResponse]) CompletionStream(ctx interface{}, message interface{}, options interface{}) *MockChat_CompletionStream_Call[RawRequest, RawResponse]

CompletionStream is a helper method to define mock.On call

  • ctx context.Context
  • message golm.UserMessage
  • options golm.CompletionParams

func (*MockChat_Expecter[RawRequest, RawResponse]) GetHistory

func (_e *MockChat_Expecter[RawRequest, RawResponse]) GetHistory() *MockChat_GetHistory_Call[RawRequest, RawResponse]

GetHistory is a helper method to define mock.On call

func (*MockChat_Expecter[RawRequest, RawResponse]) PushHistory

func (_e *MockChat_Expecter[RawRequest, RawResponse]) PushHistory(messages ...interface{}) *MockChat_PushHistory_Call[RawRequest, RawResponse]

PushHistory is a helper method to define mock.On call

  • messages ...golm.MessageWithRole

func (*MockChat_Expecter[RawRequest, RawResponse]) RawQuery

func (_e *MockChat_Expecter[RawRequest, RawResponse]) RawQuery(ctx interface{}, request interface{}) *MockChat_RawQuery_Call[RawRequest, RawResponse]

RawQuery is a helper method to define mock.On call

  • ctx context.Context
  • request RawRequest

func (*MockChat_Expecter[RawRequest, RawResponse]) SetHistory

func (_e *MockChat_Expecter[RawRequest, RawResponse]) SetHistory(history interface{}) *MockChat_SetHistory_Call[RawRequest, RawResponse]

SetHistory is a helper method to define mock.On call

  • history golm.ChatHistory

func (*MockChat_Expecter[RawRequest, RawResponse]) SetSystem

func (_e *MockChat_Expecter[RawRequest, RawResponse]) SetSystem(system interface{}) *MockChat_SetSystem_Call[RawRequest, RawResponse]

SetSystem is a helper method to define mock.On call

  • system *golm.SystemMessage

type MockChat_GetHistory_Call

type MockChat_GetHistory_Call[RawRequest any, RawResponse any] struct {
	*mock.Call
}

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

func (*MockChat_GetHistory_Call[RawRequest, RawResponse]) Return

func (_c *MockChat_GetHistory_Call[RawRequest, RawResponse]) Return(_a0 golm.ChatHistory) *MockChat_GetHistory_Call[RawRequest, RawResponse]

func (*MockChat_GetHistory_Call[RawRequest, RawResponse]) Run

func (_c *MockChat_GetHistory_Call[RawRequest, RawResponse]) Run(run func()) *MockChat_GetHistory_Call[RawRequest, RawResponse]

func (*MockChat_GetHistory_Call[RawRequest, RawResponse]) RunAndReturn

func (_c *MockChat_GetHistory_Call[RawRequest, RawResponse]) RunAndReturn(run func() golm.ChatHistory) *MockChat_GetHistory_Call[RawRequest, RawResponse]

type MockChat_PushHistory_Call

type MockChat_PushHistory_Call[RawRequest any, RawResponse any] struct {
	*mock.Call
}

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

func (*MockChat_PushHistory_Call[RawRequest, RawResponse]) Return

func (_c *MockChat_PushHistory_Call[RawRequest, RawResponse]) Return() *MockChat_PushHistory_Call[RawRequest, RawResponse]

func (*MockChat_PushHistory_Call[RawRequest, RawResponse]) Run

func (_c *MockChat_PushHistory_Call[RawRequest, RawResponse]) Run(run func(messages ...golm.MessageWithRole)) *MockChat_PushHistory_Call[RawRequest, RawResponse]

func (*MockChat_PushHistory_Call[RawRequest, RawResponse]) RunAndReturn

func (_c *MockChat_PushHistory_Call[RawRequest, RawResponse]) RunAndReturn(run func(...golm.MessageWithRole)) *MockChat_PushHistory_Call[RawRequest, RawResponse]

type MockChat_RawQuery_Call

type MockChat_RawQuery_Call[RawRequest any, RawResponse any] struct {
	*mock.Call
}

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

func (*MockChat_RawQuery_Call[RawRequest, RawResponse]) Return

func (_c *MockChat_RawQuery_Call[RawRequest, RawResponse]) Return(response RawResponse, err error) *MockChat_RawQuery_Call[RawRequest, RawResponse]

func (*MockChat_RawQuery_Call[RawRequest, RawResponse]) Run

func (_c *MockChat_RawQuery_Call[RawRequest, RawResponse]) Run(run func(ctx context.Context, request RawRequest)) *MockChat_RawQuery_Call[RawRequest, RawResponse]

func (*MockChat_RawQuery_Call[RawRequest, RawResponse]) RunAndReturn

func (_c *MockChat_RawQuery_Call[RawRequest, RawResponse]) RunAndReturn(run func(context.Context, RawRequest) (RawResponse, error)) *MockChat_RawQuery_Call[RawRequest, RawResponse]

type MockChat_SetHistory_Call

type MockChat_SetHistory_Call[RawRequest any, RawResponse any] struct {
	*mock.Call
}

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

func (*MockChat_SetHistory_Call[RawRequest, RawResponse]) Return

func (_c *MockChat_SetHistory_Call[RawRequest, RawResponse]) Return() *MockChat_SetHistory_Call[RawRequest, RawResponse]

func (*MockChat_SetHistory_Call[RawRequest, RawResponse]) Run

func (_c *MockChat_SetHistory_Call[RawRequest, RawResponse]) Run(run func(history golm.ChatHistory)) *MockChat_SetHistory_Call[RawRequest, RawResponse]

func (*MockChat_SetHistory_Call[RawRequest, RawResponse]) RunAndReturn

func (_c *MockChat_SetHistory_Call[RawRequest, RawResponse]) RunAndReturn(run func(golm.ChatHistory)) *MockChat_SetHistory_Call[RawRequest, RawResponse]

type MockChat_SetSystem_Call

type MockChat_SetSystem_Call[RawRequest any, RawResponse any] struct {
	*mock.Call
}

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

func (*MockChat_SetSystem_Call[RawRequest, RawResponse]) Return

func (_c *MockChat_SetSystem_Call[RawRequest, RawResponse]) Return() *MockChat_SetSystem_Call[RawRequest, RawResponse]

func (*MockChat_SetSystem_Call[RawRequest, RawResponse]) Run

func (_c *MockChat_SetSystem_Call[RawRequest, RawResponse]) Run(run func(system *golm.SystemMessage)) *MockChat_SetSystem_Call[RawRequest, RawResponse]

func (*MockChat_SetSystem_Call[RawRequest, RawResponse]) RunAndReturn

func (_c *MockChat_SetSystem_Call[RawRequest, RawResponse]) RunAndReturn(run func(*golm.SystemMessage)) *MockChat_SetSystem_Call[RawRequest, RawResponse]

type MockMessage

type MockMessage struct {
	mock.Mock
}

MockMessage is an autogenerated mock type for the Message type

func NewMockMessage

func NewMockMessage(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMessage

NewMockMessage creates a new instance of MockMessage. 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 (*MockMessage) EXPECT

func (_m *MockMessage) EXPECT() *MockMessage_Expecter

func (*MockMessage) Message

func (_m *MockMessage) Message() models.Message

Message provides a mock function with no fields

type MockMessageWithRole

type MockMessageWithRole struct {
	mock.Mock
}

MockMessageWithRole is an autogenerated mock type for the MessageWithRole type

func NewMockMessageWithRole

func NewMockMessageWithRole(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMessageWithRole

NewMockMessageWithRole creates a new instance of MockMessageWithRole. 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 (*MockMessageWithRole) EXPECT

func (*MockMessageWithRole) GetContent

func (_m *MockMessageWithRole) GetContent() string

GetContent provides a mock function with no fields

func (*MockMessageWithRole) Role

Role provides a mock function with no fields

type MockMessageWithRole_Expecter

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

func (*MockMessageWithRole_Expecter) GetContent

GetContent is a helper method to define mock.On call

func (*MockMessageWithRole_Expecter) Role

Role is a helper method to define mock.On call

type MockMessageWithRole_GetContent_Call

type MockMessageWithRole_GetContent_Call struct {
	*mock.Call
}

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

func (*MockMessageWithRole_GetContent_Call) Return

func (*MockMessageWithRole_GetContent_Call) Run

func (*MockMessageWithRole_GetContent_Call) RunAndReturn

type MockMessageWithRole_Role_Call

type MockMessageWithRole_Role_Call struct {
	*mock.Call
}

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

func (*MockMessageWithRole_Role_Call) Return

func (*MockMessageWithRole_Role_Call) Run

func (*MockMessageWithRole_Role_Call) RunAndReturn

type MockMessage_Expecter

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

func (*MockMessage_Expecter) Message

Message is a helper method to define mock.On call

type MockMessage_Message_Call

type MockMessage_Message_Call struct {
	*mock.Call
}

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

func (*MockMessage_Message_Call) Return

func (*MockMessage_Message_Call) Run

func (*MockMessage_Message_Call) RunAndReturn

func (_c *MockMessage_Message_Call) RunAndReturn(run func() models.Message) *MockMessage_Message_Call

type MockMultipartMessage

type MockMultipartMessage struct {
	mock.Mock
}

MockMultipartMessage is an autogenerated mock type for the MultipartMessage type

func NewMockMultipartMessage

func NewMockMultipartMessage(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMultipartMessage

NewMockMultipartMessage creates a new instance of MockMultipartMessage. 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 (*MockMultipartMessage) EXPECT

func (*MockMultipartMessage) MultipartMessage

func (_m *MockMultipartMessage) MultipartMessage() models.MultipartMessage

MultipartMessage provides a mock function with no fields

type MockMultipartMessagePart

type MockMultipartMessagePart struct {
	mock.Mock
}

MockMultipartMessagePart is an autogenerated mock type for the MultipartMessagePart type

func NewMockMultipartMessagePart

func NewMockMultipartMessagePart(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMultipartMessagePart

NewMockMultipartMessagePart creates a new instance of MockMultipartMessagePart. 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 (*MockMultipartMessagePart) EXPECT

func (*MockMultipartMessagePart) MultipartMessagePart

func (_m *MockMultipartMessagePart) MultipartMessagePart() models.MultipartMessagePart

MultipartMessagePart provides a mock function with no fields

type MockMultipartMessagePart_Expecter

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

func (*MockMultipartMessagePart_Expecter) MultipartMessagePart

MultipartMessagePart is a helper method to define mock.On call

type MockMultipartMessagePart_MultipartMessagePart_Call

type MockMultipartMessagePart_MultipartMessagePart_Call struct {
	*mock.Call
}

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

func (*MockMultipartMessagePart_MultipartMessagePart_Call) Return

func (*MockMultipartMessagePart_MultipartMessagePart_Call) Run

func (*MockMultipartMessagePart_MultipartMessagePart_Call) RunAndReturn

type MockMultipartMessage_Expecter

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

func (*MockMultipartMessage_Expecter) MultipartMessage

MultipartMessage is a helper method to define mock.On call

type MockMultipartMessage_MultipartMessage_Call

type MockMultipartMessage_MultipartMessage_Call struct {
	*mock.Call
}

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

func (*MockMultipartMessage_MultipartMessage_Call) Return

func (*MockMultipartMessage_MultipartMessage_Call) Run

func (*MockMultipartMessage_MultipartMessage_Call) RunAndReturn

type MockStreamWaitFn

type MockStreamWaitFn struct {
	mock.Mock
}

MockStreamWaitFn is an autogenerated mock type for the StreamWaitFn type

func NewMockStreamWaitFn

func NewMockStreamWaitFn(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockStreamWaitFn

NewMockStreamWaitFn creates a new instance of MockStreamWaitFn. 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 (*MockStreamWaitFn) EXPECT

func (*MockStreamWaitFn) Execute

func (_m *MockStreamWaitFn) Execute() error

Execute provides a mock function with no fields

type MockStreamWaitFn_Execute_Call

type MockStreamWaitFn_Execute_Call struct {
	*mock.Call
}

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

func (*MockStreamWaitFn_Execute_Call) Return

func (*MockStreamWaitFn_Execute_Call) Run

func (*MockStreamWaitFn_Execute_Call) RunAndReturn

type MockStreamWaitFn_Expecter

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

func (*MockStreamWaitFn_Expecter) Execute

Execute is a helper method to define mock.On call

type MockStreamerCallback

type MockStreamerCallback[Data any] struct {
	mock.Mock
}

MockStreamerCallback is an autogenerated mock type for the StreamerCallback type

func NewMockStreamerCallback

func NewMockStreamerCallback[Data any](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockStreamerCallback[Data]

NewMockStreamerCallback creates a new instance of MockStreamerCallback. 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 (*MockStreamerCallback[Data]) EXPECT

func (_m *MockStreamerCallback[Data]) EXPECT() *MockStreamerCallback_Expecter[Data]

func (*MockStreamerCallback[Data]) Execute

func (_m *MockStreamerCallback[Data]) Execute(ctx context.Context, inC chan<- Data) error

Execute provides a mock function with given fields: ctx, inC

type MockStreamerCallback_Execute_Call

type MockStreamerCallback_Execute_Call[Data any] struct {
	*mock.Call
}

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

func (*MockStreamerCallback_Execute_Call[Data]) Return

func (*MockStreamerCallback_Execute_Call[Data]) Run

func (_c *MockStreamerCallback_Execute_Call[Data]) Run(run func(ctx context.Context, inC chan<- Data)) *MockStreamerCallback_Execute_Call[Data]

func (*MockStreamerCallback_Execute_Call[Data]) RunAndReturn

func (_c *MockStreamerCallback_Execute_Call[Data]) RunAndReturn(run func(context.Context, chan<- Data) error) *MockStreamerCallback_Execute_Call[Data]

type MockStreamerCallback_Expecter

type MockStreamerCallback_Expecter[Data any] struct {
	// contains filtered or unexported fields
}

func (*MockStreamerCallback_Expecter[Data]) Execute

func (_e *MockStreamerCallback_Expecter[Data]) Execute(ctx interface{}, inC interface{}) *MockStreamerCallback_Execute_Call[Data]

Execute is a helper method to define mock.On call

  • ctx context.Context
  • inC chan<- Data

Jump to

Keyboard shortcuts

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