Documentation
¶
Index ¶
- type MockChat
- func (_m *MockChat[RawRequest, RawResponse]) Completion(ctx context.Context, message golm.UserMessage, options golm.CompletionParams) (*golm.AssistantMessage, error)
- func (_m *MockChat[RawRequest, RawResponse]) CompletionJSON(ctx context.Context, message golm.UserMessage, options golm.CompletionParams, ...) error
- func (_m *MockChat[RawRequest, RawResponse]) CompletionStream(ctx context.Context, message golm.UserMessage, options golm.CompletionParams) (<-chan string, utils.StreamWaitFn)
- func (_m *MockChat[RawRequest, RawResponse]) EXPECT() *MockChat_Expecter[RawRequest, RawResponse]
- func (_m *MockChat[RawRequest, RawResponse]) GetHistory() golm.ChatHistory
- func (_m *MockChat[RawRequest, RawResponse]) PushHistory(messages ...golm.MessageWithRole)
- func (_m *MockChat[RawRequest, RawResponse]) RawQuery(ctx context.Context, request RawRequest) (RawResponse, error)
- func (_m *MockChat[RawRequest, RawResponse]) SetHistory(history golm.ChatHistory)
- func (_m *MockChat[RawRequest, RawResponse]) SetSystem(system *golm.SystemMessage)
- type MockChatBase
- func (_m *MockChatBase) Completion(ctx context.Context, message golm.UserMessage, options golm.CompletionParams) (*golm.AssistantMessage, error)
- func (_m *MockChatBase) CompletionJSON(ctx context.Context, message golm.UserMessage, options golm.CompletionParams, ...) error
- func (_m *MockChatBase) CompletionStream(ctx context.Context, message golm.UserMessage, options golm.CompletionParams) (<-chan string, utils.StreamWaitFn)
- func (_m *MockChatBase) EXPECT() *MockChatBase_Expecter
- func (_m *MockChatBase) GetHistory() golm.ChatHistory
- func (_m *MockChatBase) PushHistory(messages ...golm.MessageWithRole)
- func (_m *MockChatBase) SetHistory(history golm.ChatHistory)
- func (_m *MockChatBase) SetSystem(system *golm.SystemMessage)
- type MockChatBase_CompletionJSON_Call
- func (_c *MockChatBase_CompletionJSON_Call) Return(err error) *MockChatBase_CompletionJSON_Call
- func (_c *MockChatBase_CompletionJSON_Call) Run(...) *MockChatBase_CompletionJSON_Call
- func (_c *MockChatBase_CompletionJSON_Call) RunAndReturn(run func(context.Context, golm.UserMessage, golm.CompletionParams, any) error) *MockChatBase_CompletionJSON_Call
- type MockChatBase_CompletionStream_Call
- func (_c *MockChatBase_CompletionStream_Call) Return(response <-chan string, wait utils.StreamWaitFn) *MockChatBase_CompletionStream_Call
- func (_c *MockChatBase_CompletionStream_Call) Run(...) *MockChatBase_CompletionStream_Call
- func (_c *MockChatBase_CompletionStream_Call) RunAndReturn(...) *MockChatBase_CompletionStream_Call
- type MockChatBase_Completion_Call
- type MockChatBase_Expecter
- func (_e *MockChatBase_Expecter) Completion(ctx interface{}, message interface{}, options interface{}) *MockChatBase_Completion_Call
- func (_e *MockChatBase_Expecter) CompletionJSON(ctx interface{}, message interface{}, options interface{}, dest interface{}) *MockChatBase_CompletionJSON_Call
- func (_e *MockChatBase_Expecter) CompletionStream(ctx interface{}, message interface{}, options interface{}) *MockChatBase_CompletionStream_Call
- func (_e *MockChatBase_Expecter) GetHistory() *MockChatBase_GetHistory_Call
- func (_e *MockChatBase_Expecter) PushHistory(messages ...interface{}) *MockChatBase_PushHistory_Call
- func (_e *MockChatBase_Expecter) SetHistory(history interface{}) *MockChatBase_SetHistory_Call
- func (_e *MockChatBase_Expecter) SetSystem(system interface{}) *MockChatBase_SetSystem_Call
- type MockChatBase_GetHistory_Call
- type MockChatBase_PushHistory_Call
- func (_c *MockChatBase_PushHistory_Call) Return() *MockChatBase_PushHistory_Call
- func (_c *MockChatBase_PushHistory_Call) Run(run func(messages ...golm.MessageWithRole)) *MockChatBase_PushHistory_Call
- func (_c *MockChatBase_PushHistory_Call) RunAndReturn(run func(...golm.MessageWithRole)) *MockChatBase_PushHistory_Call
- type MockChatBase_SetHistory_Call
- type MockChatBase_SetSystem_Call
- type MockChatBinding
- func (_m *MockChatBinding[RawRequest, RawResponse, StreamResponse]) Completion(ctx context.Context, message golm.UserMessage, options golm.CompletionParams, ...) (*golm.AssistantMessage, error)
- func (_m *MockChatBinding[RawRequest, RawResponse, StreamResponse]) CompletionStream(ctx context.Context, message golm.UserMessage, options golm.CompletionParams, ...) (<-chan StreamResponse, utils.StreamWaitFn)
- func (_m *MockChatBinding[RawRequest, RawResponse, StreamResponse]) EXPECT() *MockChatBinding_Expecter[RawRequest, RawResponse, StreamResponse]
- func (_m *MockChatBinding[RawRequest, RawResponse, StreamResponse]) RawQuery(ctx context.Context, request RawRequest, history golm.ChatHistory) (RawResponse, error)
- func (_m *MockChatBinding[RawRequest, RawResponse, StreamResponse]) StreamResponseToMessage(response StreamResponse) string
- type MockChatBinding_CompletionStream_Call
- func (_c *MockChatBinding_CompletionStream_Call[RawRequest, RawResponse, StreamResponse]) Return(response <-chan StreamResponse, wait utils.StreamWaitFn) ...
- func (_c *MockChatBinding_CompletionStream_Call[RawRequest, RawResponse, StreamResponse]) Run(...) ...
- func (_c *MockChatBinding_CompletionStream_Call[RawRequest, RawResponse, StreamResponse]) RunAndReturn(...) ...
- type MockChatBinding_Completion_Call
- func (_c *MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]) Return(response *golm.AssistantMessage, err error) *MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]
- func (_c *MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]) Run(...) *MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]
- func (_c *MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]) RunAndReturn(...) *MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]
- type MockChatBinding_Expecter
- func (_e *MockChatBinding_Expecter[RawRequest, RawResponse, StreamResponse]) Completion(ctx interface{}, message interface{}, options interface{}, history interface{}) *MockChatBinding_Completion_Call[RawRequest, RawResponse, StreamResponse]
- func (_e *MockChatBinding_Expecter[RawRequest, RawResponse, StreamResponse]) CompletionStream(ctx interface{}, message interface{}, options interface{}, history interface{}) ...
- func (_e *MockChatBinding_Expecter[RawRequest, RawResponse, StreamResponse]) RawQuery(ctx interface{}, request interface{}, history interface{}) *MockChatBinding_RawQuery_Call[RawRequest, RawResponse, StreamResponse]
- func (_e *MockChatBinding_Expecter[RawRequest, RawResponse, StreamResponse]) StreamResponseToMessage(response interface{}) ...
- type MockChatBinding_RawQuery_Call
- func (_c *MockChatBinding_RawQuery_Call[RawRequest, RawResponse, StreamResponse]) Return(response RawResponse, err error) *MockChatBinding_RawQuery_Call[RawRequest, RawResponse, StreamResponse]
- 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 (_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
- func (_c *MockChatBinding_StreamResponseToMessage_Call[RawRequest, RawResponse, StreamResponse]) Return(message string) ...
- func (_c *MockChatBinding_StreamResponseToMessage_Call[RawRequest, RawResponse, StreamResponse]) Run(run func(response StreamResponse)) ...
- func (_c *MockChatBinding_StreamResponseToMessage_Call[RawRequest, RawResponse, StreamResponse]) RunAndReturn(run func(StreamResponse) string) ...
- type MockChatRaw
- type MockChatRaw_Expecter
- type MockChatRaw_RawQuery_Call
- func (_c *MockChatRaw_RawQuery_Call[RawRequest, RawResponse]) Return(response RawResponse, err error) *MockChatRaw_RawQuery_Call[RawRequest, RawResponse]
- func (_c *MockChatRaw_RawQuery_Call[RawRequest, RawResponse]) Run(run func(ctx context.Context, request RawRequest)) *MockChatRaw_RawQuery_Call[RawRequest, RawResponse]
- func (_c *MockChatRaw_RawQuery_Call[RawRequest, RawResponse]) RunAndReturn(run func(context.Context, RawRequest) (RawResponse, error)) *MockChatRaw_RawQuery_Call[RawRequest, RawResponse]
- type MockChat_CompletionJSON_Call
- func (_c *MockChat_CompletionJSON_Call[RawRequest, RawResponse]) Return(err error) *MockChat_CompletionJSON_Call[RawRequest, RawResponse]
- func (_c *MockChat_CompletionJSON_Call[RawRequest, RawResponse]) Run(...) *MockChat_CompletionJSON_Call[RawRequest, RawResponse]
- 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
- func (_c *MockChat_CompletionStream_Call[RawRequest, RawResponse]) Return(response <-chan string, wait utils.StreamWaitFn) *MockChat_CompletionStream_Call[RawRequest, RawResponse]
- func (_c *MockChat_CompletionStream_Call[RawRequest, RawResponse]) Run(...) *MockChat_CompletionStream_Call[RawRequest, RawResponse]
- func (_c *MockChat_CompletionStream_Call[RawRequest, RawResponse]) RunAndReturn(...) *MockChat_CompletionStream_Call[RawRequest, RawResponse]
- type MockChat_Completion_Call
- func (_c *MockChat_Completion_Call[RawRequest, RawResponse]) Return(response *golm.AssistantMessage, err error) *MockChat_Completion_Call[RawRequest, RawResponse]
- func (_c *MockChat_Completion_Call[RawRequest, RawResponse]) Run(...) *MockChat_Completion_Call[RawRequest, RawResponse]
- func (_c *MockChat_Completion_Call[RawRequest, RawResponse]) RunAndReturn(...) *MockChat_Completion_Call[RawRequest, RawResponse]
- type MockChat_Expecter
- func (_e *MockChat_Expecter[RawRequest, RawResponse]) Completion(ctx interface{}, message interface{}, options interface{}) *MockChat_Completion_Call[RawRequest, RawResponse]
- func (_e *MockChat_Expecter[RawRequest, RawResponse]) CompletionJSON(ctx interface{}, message interface{}, options interface{}, dest interface{}) *MockChat_CompletionJSON_Call[RawRequest, RawResponse]
- func (_e *MockChat_Expecter[RawRequest, RawResponse]) CompletionStream(ctx interface{}, message interface{}, options interface{}) *MockChat_CompletionStream_Call[RawRequest, RawResponse]
- func (_e *MockChat_Expecter[RawRequest, RawResponse]) GetHistory() *MockChat_GetHistory_Call[RawRequest, RawResponse]
- func (_e *MockChat_Expecter[RawRequest, RawResponse]) PushHistory(messages ...interface{}) *MockChat_PushHistory_Call[RawRequest, RawResponse]
- func (_e *MockChat_Expecter[RawRequest, RawResponse]) RawQuery(ctx interface{}, request interface{}) *MockChat_RawQuery_Call[RawRequest, RawResponse]
- func (_e *MockChat_Expecter[RawRequest, RawResponse]) SetHistory(history interface{}) *MockChat_SetHistory_Call[RawRequest, RawResponse]
- func (_e *MockChat_Expecter[RawRequest, RawResponse]) SetSystem(system interface{}) *MockChat_SetSystem_Call[RawRequest, RawResponse]
- type MockChat_GetHistory_Call
- func (_c *MockChat_GetHistory_Call[RawRequest, RawResponse]) Return(_a0 golm.ChatHistory) *MockChat_GetHistory_Call[RawRequest, RawResponse]
- func (_c *MockChat_GetHistory_Call[RawRequest, RawResponse]) Run(run func()) *MockChat_GetHistory_Call[RawRequest, RawResponse]
- func (_c *MockChat_GetHistory_Call[RawRequest, RawResponse]) RunAndReturn(run func() golm.ChatHistory) *MockChat_GetHistory_Call[RawRequest, RawResponse]
- type MockChat_PushHistory_Call
- func (_c *MockChat_PushHistory_Call[RawRequest, RawResponse]) Return() *MockChat_PushHistory_Call[RawRequest, RawResponse]
- func (_c *MockChat_PushHistory_Call[RawRequest, RawResponse]) Run(run func(messages ...golm.MessageWithRole)) *MockChat_PushHistory_Call[RawRequest, RawResponse]
- func (_c *MockChat_PushHistory_Call[RawRequest, RawResponse]) RunAndReturn(run func(...golm.MessageWithRole)) *MockChat_PushHistory_Call[RawRequest, RawResponse]
- type MockChat_RawQuery_Call
- func (_c *MockChat_RawQuery_Call[RawRequest, RawResponse]) Return(response RawResponse, err error) *MockChat_RawQuery_Call[RawRequest, RawResponse]
- func (_c *MockChat_RawQuery_Call[RawRequest, RawResponse]) Run(run func(ctx context.Context, request RawRequest)) *MockChat_RawQuery_Call[RawRequest, RawResponse]
- func (_c *MockChat_RawQuery_Call[RawRequest, RawResponse]) RunAndReturn(run func(context.Context, RawRequest) (RawResponse, error)) *MockChat_RawQuery_Call[RawRequest, RawResponse]
- type MockChat_SetHistory_Call
- func (_c *MockChat_SetHistory_Call[RawRequest, RawResponse]) Return() *MockChat_SetHistory_Call[RawRequest, RawResponse]
- func (_c *MockChat_SetHistory_Call[RawRequest, RawResponse]) Run(run func(history golm.ChatHistory)) *MockChat_SetHistory_Call[RawRequest, RawResponse]
- func (_c *MockChat_SetHistory_Call[RawRequest, RawResponse]) RunAndReturn(run func(golm.ChatHistory)) *MockChat_SetHistory_Call[RawRequest, RawResponse]
- type MockChat_SetSystem_Call
- func (_c *MockChat_SetSystem_Call[RawRequest, RawResponse]) Return() *MockChat_SetSystem_Call[RawRequest, RawResponse]
- func (_c *MockChat_SetSystem_Call[RawRequest, RawResponse]) Run(run func(system *golm.SystemMessage)) *MockChat_SetSystem_Call[RawRequest, RawResponse]
- func (_c *MockChat_SetSystem_Call[RawRequest, RawResponse]) RunAndReturn(run func(*golm.SystemMessage)) *MockChat_SetSystem_Call[RawRequest, RawResponse]
- type MockMessage
- type MockMessageWithRole
- type MockMessageWithRole_Expecter
- type MockMessageWithRole_GetContent_Call
- func (_c *MockMessageWithRole_GetContent_Call) Return(_a0 string) *MockMessageWithRole_GetContent_Call
- func (_c *MockMessageWithRole_GetContent_Call) Run(run func()) *MockMessageWithRole_GetContent_Call
- func (_c *MockMessageWithRole_GetContent_Call) RunAndReturn(run func() string) *MockMessageWithRole_GetContent_Call
- type MockMessageWithRole_Role_Call
- func (_c *MockMessageWithRole_Role_Call) Return(_a0 golm.MessageRole) *MockMessageWithRole_Role_Call
- func (_c *MockMessageWithRole_Role_Call) Run(run func()) *MockMessageWithRole_Role_Call
- func (_c *MockMessageWithRole_Role_Call) RunAndReturn(run func() golm.MessageRole) *MockMessageWithRole_Role_Call
- type MockMessage_Expecter
- type MockMessage_Message_Call
- type MockMultipartMessage
- type MockMultipartMessagePart
- type MockMultipartMessagePart_Expecter
- type MockMultipartMessagePart_MultipartMessagePart_Call
- func (_c *MockMultipartMessagePart_MultipartMessagePart_Call) Return(_a0 models.MultipartMessagePart) *MockMultipartMessagePart_MultipartMessagePart_Call
- func (_c *MockMultipartMessagePart_MultipartMessagePart_Call) Run(run func()) *MockMultipartMessagePart_MultipartMessagePart_Call
- func (_c *MockMultipartMessagePart_MultipartMessagePart_Call) RunAndReturn(run func() models.MultipartMessagePart) *MockMultipartMessagePart_MultipartMessagePart_Call
- type MockMultipartMessage_Expecter
- type MockMultipartMessage_MultipartMessage_Call
- func (_c *MockMultipartMessage_MultipartMessage_Call) Return(_a0 models.MultipartMessage) *MockMultipartMessage_MultipartMessage_Call
- func (_c *MockMultipartMessage_MultipartMessage_Call) Run(run func()) *MockMultipartMessage_MultipartMessage_Call
- func (_c *MockMultipartMessage_MultipartMessage_Call) RunAndReturn(run func() models.MultipartMessage) *MockMultipartMessage_MultipartMessage_Call
- type MockStreamWaitFn
- type MockStreamWaitFn_Execute_Call
- type MockStreamWaitFn_Expecter
- type MockStreamerCallback
- type MockStreamerCallback_Execute_Call
- func (_c *MockStreamerCallback_Execute_Call[Data]) Return(_a0 error) *MockStreamerCallback_Execute_Call[Data]
- func (_c *MockStreamerCallback_Execute_Call[Data]) Run(run func(ctx context.Context, inC chan<- Data)) *MockStreamerCallback_Execute_Call[Data]
- func (_c *MockStreamerCallback_Execute_Call[Data]) RunAndReturn(run func(context.Context, chan<- Data) error) *MockStreamerCallback_Execute_Call[Data]
- type MockStreamerCallback_Expecter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockChat ¶
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 ¶
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 ¶
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 (_c *MockChatBase_CompletionJSON_Call) Return(err error) *MockChatBase_CompletionJSON_Call
func (*MockChatBase_CompletionJSON_Call) Run ¶
func (_c *MockChatBase_CompletionJSON_Call) Run(run func(ctx context.Context, message golm.UserMessage, options golm.CompletionParams, dest any)) *MockChatBase_CompletionJSON_Call
func (*MockChatBase_CompletionJSON_Call) RunAndReturn ¶
func (_c *MockChatBase_CompletionJSON_Call) RunAndReturn(run func(context.Context, golm.UserMessage, golm.CompletionParams, any) error) *MockChatBase_CompletionJSON_Call
type MockChatBase_CompletionStream_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 (_c *MockChatBase_CompletionStream_Call) Return(response <-chan string, wait utils.StreamWaitFn) *MockChatBase_CompletionStream_Call
func (*MockChatBase_CompletionStream_Call) Run ¶
func (_c *MockChatBase_CompletionStream_Call) Run(run func(ctx context.Context, message golm.UserMessage, options golm.CompletionParams)) *MockChatBase_CompletionStream_Call
func (*MockChatBase_CompletionStream_Call) RunAndReturn ¶
func (_c *MockChatBase_CompletionStream_Call) RunAndReturn(run func(context.Context, golm.UserMessage, golm.CompletionParams) (<-chan string, utils.StreamWaitFn)) *MockChatBase_CompletionStream_Call
type MockChatBase_Completion_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 (_c *MockChatBase_Completion_Call) Return(response *golm.AssistantMessage, err error) *MockChatBase_Completion_Call
func (*MockChatBase_Completion_Call) Run ¶
func (_c *MockChatBase_Completion_Call) Run(run func(ctx context.Context, message golm.UserMessage, options golm.CompletionParams)) *MockChatBase_Completion_Call
func (*MockChatBase_Completion_Call) RunAndReturn ¶
func (_c *MockChatBase_Completion_Call) RunAndReturn(run func(context.Context, golm.UserMessage, golm.CompletionParams) (*golm.AssistantMessage, error)) *MockChatBase_Completion_Call
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 ¶
func (_e *MockChatBase_Expecter) GetHistory() *MockChatBase_GetHistory_Call
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 ¶
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 (_c *MockChatBase_GetHistory_Call) Return(_a0 golm.ChatHistory) *MockChatBase_GetHistory_Call
func (*MockChatBase_GetHistory_Call) Run ¶
func (_c *MockChatBase_GetHistory_Call) Run(run func()) *MockChatBase_GetHistory_Call
func (*MockChatBase_GetHistory_Call) RunAndReturn ¶
func (_c *MockChatBase_GetHistory_Call) RunAndReturn(run func() golm.ChatHistory) *MockChatBase_GetHistory_Call
type MockChatBase_PushHistory_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 (_c *MockChatBase_PushHistory_Call) Return() *MockChatBase_PushHistory_Call
func (*MockChatBase_PushHistory_Call) Run ¶
func (_c *MockChatBase_PushHistory_Call) Run(run func(messages ...golm.MessageWithRole)) *MockChatBase_PushHistory_Call
func (*MockChatBase_PushHistory_Call) RunAndReturn ¶
func (_c *MockChatBase_PushHistory_Call) RunAndReturn(run func(...golm.MessageWithRole)) *MockChatBase_PushHistory_Call
type MockChatBase_SetHistory_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 (_c *MockChatBase_SetHistory_Call) Return() *MockChatBase_SetHistory_Call
func (*MockChatBase_SetHistory_Call) Run ¶
func (_c *MockChatBase_SetHistory_Call) Run(run func(history golm.ChatHistory)) *MockChatBase_SetHistory_Call
func (*MockChatBase_SetHistory_Call) RunAndReturn ¶
func (_c *MockChatBase_SetHistory_Call) RunAndReturn(run func(golm.ChatHistory)) *MockChatBase_SetHistory_Call
type MockChatBase_SetSystem_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 (_c *MockChatBase_SetSystem_Call) Return() *MockChatBase_SetSystem_Call
func (*MockChatBase_SetSystem_Call) Run ¶
func (_c *MockChatBase_SetSystem_Call) Run(run func(system *golm.SystemMessage)) *MockChatBase_SetSystem_Call
func (*MockChatBase_SetSystem_Call) RunAndReturn ¶
func (_c *MockChatBase_SetSystem_Call) RunAndReturn(run func(*golm.SystemMessage)) *MockChatBase_SetSystem_Call
type MockChatBinding ¶
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 ¶
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]
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 (_m *MockMessageWithRole) EXPECT() *MockMessageWithRole_Expecter
func (*MockMessageWithRole) GetContent ¶
func (_m *MockMessageWithRole) GetContent() string
GetContent provides a mock function with no fields
func (*MockMessageWithRole) Role ¶
func (_m *MockMessageWithRole) Role() golm.MessageRole
Role provides a mock function with no fields
type MockMessageWithRole_Expecter ¶
type MockMessageWithRole_Expecter struct {
// contains filtered or unexported fields
}
func (*MockMessageWithRole_Expecter) GetContent ¶
func (_e *MockMessageWithRole_Expecter) GetContent() *MockMessageWithRole_GetContent_Call
GetContent is a helper method to define mock.On call
func (*MockMessageWithRole_Expecter) Role ¶
func (_e *MockMessageWithRole_Expecter) Role() *MockMessageWithRole_Role_Call
Role is a helper method to define mock.On call
type MockMessageWithRole_GetContent_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 (_c *MockMessageWithRole_GetContent_Call) Return(_a0 string) *MockMessageWithRole_GetContent_Call
func (*MockMessageWithRole_GetContent_Call) Run ¶
func (_c *MockMessageWithRole_GetContent_Call) Run(run func()) *MockMessageWithRole_GetContent_Call
func (*MockMessageWithRole_GetContent_Call) RunAndReturn ¶
func (_c *MockMessageWithRole_GetContent_Call) RunAndReturn(run func() string) *MockMessageWithRole_GetContent_Call
type MockMessageWithRole_Role_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 (_c *MockMessageWithRole_Role_Call) Return(_a0 golm.MessageRole) *MockMessageWithRole_Role_Call
func (*MockMessageWithRole_Role_Call) Run ¶
func (_c *MockMessageWithRole_Role_Call) Run(run func()) *MockMessageWithRole_Role_Call
func (*MockMessageWithRole_Role_Call) RunAndReturn ¶
func (_c *MockMessageWithRole_Role_Call) RunAndReturn(run func() golm.MessageRole) *MockMessageWithRole_Role_Call
type MockMessage_Expecter ¶
type MockMessage_Expecter struct {
// contains filtered or unexported fields
}
func (*MockMessage_Expecter) Message ¶
func (_e *MockMessage_Expecter) Message() *MockMessage_Message_Call
Message is a helper method to define mock.On call
type MockMessage_Message_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 (_c *MockMessage_Message_Call) Return(_a0 models.Message) *MockMessage_Message_Call
func (*MockMessage_Message_Call) Run ¶
func (_c *MockMessage_Message_Call) Run(run func()) *MockMessage_Message_Call
func (*MockMessage_Message_Call) RunAndReturn ¶
func (_c *MockMessage_Message_Call) RunAndReturn(run func() models.Message) *MockMessage_Message_Call
type MockMultipartMessage ¶
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 (_m *MockMultipartMessage) EXPECT() *MockMultipartMessage_Expecter
func (*MockMultipartMessage) MultipartMessage ¶
func (_m *MockMultipartMessage) MultipartMessage() models.MultipartMessage
MultipartMessage provides a mock function with no fields
type MockMultipartMessagePart ¶
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 (_m *MockMultipartMessagePart) EXPECT() *MockMultipartMessagePart_Expecter
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 ¶
func (_e *MockMultipartMessagePart_Expecter) MultipartMessagePart() *MockMultipartMessagePart_MultipartMessagePart_Call
MultipartMessagePart is a helper method to define mock.On call
type MockMultipartMessagePart_MultipartMessagePart_Call ¶
MockMultipartMessagePart_MultipartMessagePart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MultipartMessagePart'
func (*MockMultipartMessagePart_MultipartMessagePart_Call) Run ¶
func (_c *MockMultipartMessagePart_MultipartMessagePart_Call) Run(run func()) *MockMultipartMessagePart_MultipartMessagePart_Call
func (*MockMultipartMessagePart_MultipartMessagePart_Call) RunAndReturn ¶
func (_c *MockMultipartMessagePart_MultipartMessagePart_Call) RunAndReturn(run func() models.MultipartMessagePart) *MockMultipartMessagePart_MultipartMessagePart_Call
type MockMultipartMessage_Expecter ¶
type MockMultipartMessage_Expecter struct {
// contains filtered or unexported fields
}
func (*MockMultipartMessage_Expecter) MultipartMessage ¶
func (_e *MockMultipartMessage_Expecter) MultipartMessage() *MockMultipartMessage_MultipartMessage_Call
MultipartMessage is a helper method to define mock.On call
type MockMultipartMessage_MultipartMessage_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 (_c *MockMultipartMessage_MultipartMessage_Call) Return(_a0 models.MultipartMessage) *MockMultipartMessage_MultipartMessage_Call
func (*MockMultipartMessage_MultipartMessage_Call) Run ¶
func (_c *MockMultipartMessage_MultipartMessage_Call) Run(run func()) *MockMultipartMessage_MultipartMessage_Call
func (*MockMultipartMessage_MultipartMessage_Call) RunAndReturn ¶
func (_c *MockMultipartMessage_MultipartMessage_Call) RunAndReturn(run func() models.MultipartMessage) *MockMultipartMessage_MultipartMessage_Call
type MockStreamWaitFn ¶
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 (_m *MockStreamWaitFn) EXPECT() *MockStreamWaitFn_Expecter
func (*MockStreamWaitFn) Execute ¶
func (_m *MockStreamWaitFn) Execute() error
Execute provides a mock function with no fields
type MockStreamWaitFn_Execute_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 (_c *MockStreamWaitFn_Execute_Call) Return(_a0 error) *MockStreamWaitFn_Execute_Call
func (*MockStreamWaitFn_Execute_Call) Run ¶
func (_c *MockStreamWaitFn_Execute_Call) Run(run func()) *MockStreamWaitFn_Execute_Call
func (*MockStreamWaitFn_Execute_Call) RunAndReturn ¶
func (_c *MockStreamWaitFn_Execute_Call) RunAndReturn(run func() error) *MockStreamWaitFn_Execute_Call
type MockStreamWaitFn_Expecter ¶
type MockStreamWaitFn_Expecter struct {
// contains filtered or unexported fields
}
func (*MockStreamWaitFn_Expecter) Execute ¶
func (_e *MockStreamWaitFn_Expecter) Execute() *MockStreamWaitFn_Execute_Call
Execute is a helper method to define mock.On call
type MockStreamerCallback ¶
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]
type MockStreamerCallback_Execute_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 (_c *MockStreamerCallback_Execute_Call[Data]) Return(_a0 error) *MockStreamerCallback_Execute_Call[Data]
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