Documentation
¶
Index ¶
- type MockChatClient
- func (_mock *MockChatClient) Add(prompt string) error
- func (_mock *MockChatClient) Ask(question string, target any) error
- func (_mock *MockChatClient) Chat(ctx context.Context, prompt string) (string, error)
- func (_m *MockChatClient) EXPECT() *MockChatClient_Expecter
- func (_mock *MockChatClient) SetTools(tools []chat.Tool) error
- type MockChatClient_Add_Call
- type MockChatClient_Ask_Call
- type MockChatClient_Chat_Call
- func (_c *MockChatClient_Chat_Call) Return(s string, err error) *MockChatClient_Chat_Call
- func (_c *MockChatClient_Chat_Call) Run(run func(ctx context.Context, prompt string)) *MockChatClient_Chat_Call
- func (_c *MockChatClient_Chat_Call) RunAndReturn(run func(ctx context.Context, prompt string) (string, error)) *MockChatClient_Chat_Call
- type MockChatClient_Expecter
- func (_e *MockChatClient_Expecter) Add(prompt interface{}) *MockChatClient_Add_Call
- func (_e *MockChatClient_Expecter) Ask(question interface{}, target interface{}) *MockChatClient_Ask_Call
- func (_e *MockChatClient_Expecter) Chat(ctx interface{}, prompt interface{}) *MockChatClient_Chat_Call
- func (_e *MockChatClient_Expecter) SetTools(tools interface{}) *MockChatClient_SetTools_Call
- type MockChatClient_SetTools_Call
- func (_c *MockChatClient_SetTools_Call) Return(err error) *MockChatClient_SetTools_Call
- func (_c *MockChatClient_SetTools_Call) Run(run func(tools []chat.Tool)) *MockChatClient_SetTools_Call
- func (_c *MockChatClient_SetTools_Call) RunAndReturn(run func(tools []chat.Tool) error) *MockChatClient_SetTools_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockChatClient ¶
MockChatClient is an autogenerated mock type for the ChatClient type
func NewMockChatClient ¶
func NewMockChatClient(t interface {
mock.TestingT
Cleanup(func())
}) *MockChatClient
NewMockChatClient creates a new instance of MockChatClient. 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 (*MockChatClient) Add ¶
func (_mock *MockChatClient) Add(prompt string) error
Add provides a mock function for the type MockChatClient
func (*MockChatClient) Ask ¶
func (_mock *MockChatClient) Ask(question string, target any) error
Ask provides a mock function for the type MockChatClient
func (*MockChatClient) EXPECT ¶
func (_m *MockChatClient) EXPECT() *MockChatClient_Expecter
type MockChatClient_Add_Call ¶
MockChatClient_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'
func (*MockChatClient_Add_Call) Return ¶
func (_c *MockChatClient_Add_Call) Return(err error) *MockChatClient_Add_Call
func (*MockChatClient_Add_Call) Run ¶
func (_c *MockChatClient_Add_Call) Run(run func(prompt string)) *MockChatClient_Add_Call
func (*MockChatClient_Add_Call) RunAndReturn ¶
func (_c *MockChatClient_Add_Call) RunAndReturn(run func(prompt string) error) *MockChatClient_Add_Call
type MockChatClient_Ask_Call ¶
MockChatClient_Ask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ask'
func (*MockChatClient_Ask_Call) Return ¶
func (_c *MockChatClient_Ask_Call) Return(err error) *MockChatClient_Ask_Call
func (*MockChatClient_Ask_Call) Run ¶
func (_c *MockChatClient_Ask_Call) Run(run func(question string, target any)) *MockChatClient_Ask_Call
func (*MockChatClient_Ask_Call) RunAndReturn ¶
func (_c *MockChatClient_Ask_Call) RunAndReturn(run func(question string, target any) error) *MockChatClient_Ask_Call
type MockChatClient_Chat_Call ¶
MockChatClient_Chat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Chat'
func (*MockChatClient_Chat_Call) Return ¶
func (_c *MockChatClient_Chat_Call) Return(s string, err error) *MockChatClient_Chat_Call
func (*MockChatClient_Chat_Call) Run ¶
func (_c *MockChatClient_Chat_Call) Run(run func(ctx context.Context, prompt string)) *MockChatClient_Chat_Call
func (*MockChatClient_Chat_Call) RunAndReturn ¶
func (_c *MockChatClient_Chat_Call) RunAndReturn(run func(ctx context.Context, prompt string) (string, error)) *MockChatClient_Chat_Call
type MockChatClient_Expecter ¶
type MockChatClient_Expecter struct {
// contains filtered or unexported fields
}
func (*MockChatClient_Expecter) Add ¶
func (_e *MockChatClient_Expecter) Add(prompt interface{}) *MockChatClient_Add_Call
Add is a helper method to define mock.On call
- prompt string
func (*MockChatClient_Expecter) Ask ¶
func (_e *MockChatClient_Expecter) Ask(question interface{}, target interface{}) *MockChatClient_Ask_Call
Ask is a helper method to define mock.On call
- question string
- target any
func (*MockChatClient_Expecter) Chat ¶
func (_e *MockChatClient_Expecter) Chat(ctx interface{}, prompt interface{}) *MockChatClient_Chat_Call
Chat is a helper method to define mock.On call
- ctx context.Context
- prompt string
func (*MockChatClient_Expecter) SetTools ¶
func (_e *MockChatClient_Expecter) SetTools(tools interface{}) *MockChatClient_SetTools_Call
SetTools is a helper method to define mock.On call
- tools []chat.Tool
type MockChatClient_SetTools_Call ¶
MockChatClient_SetTools_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTools'
func (*MockChatClient_SetTools_Call) Return ¶
func (_c *MockChatClient_SetTools_Call) Return(err error) *MockChatClient_SetTools_Call
func (*MockChatClient_SetTools_Call) Run ¶
func (_c *MockChatClient_SetTools_Call) Run(run func(tools []chat.Tool)) *MockChatClient_SetTools_Call
func (*MockChatClient_SetTools_Call) RunAndReturn ¶
func (_c *MockChatClient_SetTools_Call) RunAndReturn(run func(tools []chat.Tool) error) *MockChatClient_SetTools_Call