Documentation
¶
Index ¶
- type MockChatClient
- func (_mock *MockChatClient) Add(ctx context.Context, prompt string) error
- func (_mock *MockChatClient) Ask(ctx context.Context, 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
- func (_c *MockChatClient_Add_Call) Return(err error) *MockChatClient_Add_Call
- func (_c *MockChatClient_Add_Call) Run(run func(ctx context.Context, prompt string)) *MockChatClient_Add_Call
- func (_c *MockChatClient_Add_Call) RunAndReturn(run func(ctx context.Context, prompt string) error) *MockChatClient_Add_Call
- type MockChatClient_Ask_Call
- func (_c *MockChatClient_Ask_Call) Return(err error) *MockChatClient_Ask_Call
- func (_c *MockChatClient_Ask_Call) Run(run func(ctx context.Context, question string, target any)) *MockChatClient_Ask_Call
- func (_c *MockChatClient_Ask_Call) RunAndReturn(run func(ctx context.Context, question string, target any) error) *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(ctx interface{}, prompt interface{}) *MockChatClient_Add_Call
- func (_e *MockChatClient_Expecter) Ask(ctx interface{}, 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
- type MockConversationStore
- func (_mock *MockConversationStore) Delete(ctx context.Context, id string) error
- func (_m *MockConversationStore) EXPECT() *MockConversationStore_Expecter
- func (_mock *MockConversationStore) List(ctx context.Context) ([]chat.SnapshotSummary, error)
- func (_mock *MockConversationStore) Load(ctx context.Context, id string) (*chat.Snapshot, error)
- func (_mock *MockConversationStore) Save(ctx context.Context, snapshot *chat.Snapshot) error
- type MockConversationStore_Delete_Call
- func (_c *MockConversationStore_Delete_Call) Return(err error) *MockConversationStore_Delete_Call
- func (_c *MockConversationStore_Delete_Call) Run(run func(ctx context.Context, id string)) *MockConversationStore_Delete_Call
- func (_c *MockConversationStore_Delete_Call) RunAndReturn(run func(ctx context.Context, id string) error) *MockConversationStore_Delete_Call
- type MockConversationStore_Expecter
- func (_e *MockConversationStore_Expecter) Delete(ctx interface{}, id interface{}) *MockConversationStore_Delete_Call
- func (_e *MockConversationStore_Expecter) List(ctx interface{}) *MockConversationStore_List_Call
- func (_e *MockConversationStore_Expecter) Load(ctx interface{}, id interface{}) *MockConversationStore_Load_Call
- func (_e *MockConversationStore_Expecter) Save(ctx interface{}, snapshot interface{}) *MockConversationStore_Save_Call
- type MockConversationStore_List_Call
- func (_c *MockConversationStore_List_Call) Return(snapshotSummarys []chat.SnapshotSummary, err error) *MockConversationStore_List_Call
- func (_c *MockConversationStore_List_Call) Run(run func(ctx context.Context)) *MockConversationStore_List_Call
- func (_c *MockConversationStore_List_Call) RunAndReturn(run func(ctx context.Context) ([]chat.SnapshotSummary, error)) *MockConversationStore_List_Call
- type MockConversationStore_Load_Call
- func (_c *MockConversationStore_Load_Call) Return(snapshot *chat.Snapshot, err error) *MockConversationStore_Load_Call
- func (_c *MockConversationStore_Load_Call) Run(run func(ctx context.Context, id string)) *MockConversationStore_Load_Call
- func (_c *MockConversationStore_Load_Call) RunAndReturn(run func(ctx context.Context, id string) (*chat.Snapshot, error)) *MockConversationStore_Load_Call
- type MockConversationStore_Save_Call
- func (_c *MockConversationStore_Save_Call) Return(err error) *MockConversationStore_Save_Call
- func (_c *MockConversationStore_Save_Call) Run(run func(ctx context.Context, snapshot *chat.Snapshot)) *MockConversationStore_Save_Call
- func (_c *MockConversationStore_Save_Call) RunAndReturn(run func(ctx context.Context, snapshot *chat.Snapshot) error) *MockConversationStore_Save_Call
- type MockPersistentChatClient
- func (_mock *MockPersistentChatClient) Add(ctx context.Context, prompt string) error
- func (_mock *MockPersistentChatClient) Ask(ctx context.Context, question string, target any) error
- func (_mock *MockPersistentChatClient) Chat(ctx context.Context, prompt string) (string, error)
- func (_m *MockPersistentChatClient) EXPECT() *MockPersistentChatClient_Expecter
- func (_mock *MockPersistentChatClient) Restore(snapshot *chat.Snapshot) error
- func (_mock *MockPersistentChatClient) Save() (*chat.Snapshot, error)
- func (_mock *MockPersistentChatClient) SetTools(tools []chat.Tool) error
- type MockPersistentChatClient_Add_Call
- func (_c *MockPersistentChatClient_Add_Call) Return(err error) *MockPersistentChatClient_Add_Call
- func (_c *MockPersistentChatClient_Add_Call) Run(run func(ctx context.Context, prompt string)) *MockPersistentChatClient_Add_Call
- func (_c *MockPersistentChatClient_Add_Call) RunAndReturn(run func(ctx context.Context, prompt string) error) *MockPersistentChatClient_Add_Call
- type MockPersistentChatClient_Ask_Call
- func (_c *MockPersistentChatClient_Ask_Call) Return(err error) *MockPersistentChatClient_Ask_Call
- func (_c *MockPersistentChatClient_Ask_Call) Run(run func(ctx context.Context, question string, target any)) *MockPersistentChatClient_Ask_Call
- func (_c *MockPersistentChatClient_Ask_Call) RunAndReturn(run func(ctx context.Context, question string, target any) error) *MockPersistentChatClient_Ask_Call
- type MockPersistentChatClient_Chat_Call
- func (_c *MockPersistentChatClient_Chat_Call) Return(s string, err error) *MockPersistentChatClient_Chat_Call
- func (_c *MockPersistentChatClient_Chat_Call) Run(run func(ctx context.Context, prompt string)) *MockPersistentChatClient_Chat_Call
- func (_c *MockPersistentChatClient_Chat_Call) RunAndReturn(run func(ctx context.Context, prompt string) (string, error)) *MockPersistentChatClient_Chat_Call
- type MockPersistentChatClient_Expecter
- func (_e *MockPersistentChatClient_Expecter) Add(ctx interface{}, prompt interface{}) *MockPersistentChatClient_Add_Call
- func (_e *MockPersistentChatClient_Expecter) Ask(ctx interface{}, question interface{}, target interface{}) *MockPersistentChatClient_Ask_Call
- func (_e *MockPersistentChatClient_Expecter) Chat(ctx interface{}, prompt interface{}) *MockPersistentChatClient_Chat_Call
- func (_e *MockPersistentChatClient_Expecter) Restore(snapshot interface{}) *MockPersistentChatClient_Restore_Call
- func (_e *MockPersistentChatClient_Expecter) Save() *MockPersistentChatClient_Save_Call
- func (_e *MockPersistentChatClient_Expecter) SetTools(tools interface{}) *MockPersistentChatClient_SetTools_Call
- type MockPersistentChatClient_Restore_Call
- func (_c *MockPersistentChatClient_Restore_Call) Return(err error) *MockPersistentChatClient_Restore_Call
- func (_c *MockPersistentChatClient_Restore_Call) Run(run func(snapshot *chat.Snapshot)) *MockPersistentChatClient_Restore_Call
- func (_c *MockPersistentChatClient_Restore_Call) RunAndReturn(run func(snapshot *chat.Snapshot) error) *MockPersistentChatClient_Restore_Call
- type MockPersistentChatClient_Save_Call
- func (_c *MockPersistentChatClient_Save_Call) Return(snapshot *chat.Snapshot, err error) *MockPersistentChatClient_Save_Call
- func (_c *MockPersistentChatClient_Save_Call) Run(run func()) *MockPersistentChatClient_Save_Call
- func (_c *MockPersistentChatClient_Save_Call) RunAndReturn(run func() (*chat.Snapshot, error)) *MockPersistentChatClient_Save_Call
- type MockPersistentChatClient_SetTools_Call
- func (_c *MockPersistentChatClient_SetTools_Call) Return(err error) *MockPersistentChatClient_SetTools_Call
- func (_c *MockPersistentChatClient_SetTools_Call) Run(run func(tools []chat.Tool)) *MockPersistentChatClient_SetTools_Call
- func (_c *MockPersistentChatClient_SetTools_Call) RunAndReturn(run func(tools []chat.Tool) error) *MockPersistentChatClient_SetTools_Call
- type MockStreamingChatClient
- func (_mock *MockStreamingChatClient) Add(ctx context.Context, prompt string) error
- func (_mock *MockStreamingChatClient) Ask(ctx context.Context, question string, target any) error
- func (_mock *MockStreamingChatClient) Chat(ctx context.Context, prompt string) (string, error)
- func (_m *MockStreamingChatClient) EXPECT() *MockStreamingChatClient_Expecter
- func (_mock *MockStreamingChatClient) SetTools(tools []chat.Tool) error
- func (_mock *MockStreamingChatClient) StreamChat(ctx context.Context, prompt string, callback chat.StreamCallback) (string, error)
- type MockStreamingChatClient_Add_Call
- func (_c *MockStreamingChatClient_Add_Call) Return(err error) *MockStreamingChatClient_Add_Call
- func (_c *MockStreamingChatClient_Add_Call) Run(run func(ctx context.Context, prompt string)) *MockStreamingChatClient_Add_Call
- func (_c *MockStreamingChatClient_Add_Call) RunAndReturn(run func(ctx context.Context, prompt string) error) *MockStreamingChatClient_Add_Call
- type MockStreamingChatClient_Ask_Call
- func (_c *MockStreamingChatClient_Ask_Call) Return(err error) *MockStreamingChatClient_Ask_Call
- func (_c *MockStreamingChatClient_Ask_Call) Run(run func(ctx context.Context, question string, target any)) *MockStreamingChatClient_Ask_Call
- func (_c *MockStreamingChatClient_Ask_Call) RunAndReturn(run func(ctx context.Context, question string, target any) error) *MockStreamingChatClient_Ask_Call
- type MockStreamingChatClient_Chat_Call
- func (_c *MockStreamingChatClient_Chat_Call) Return(s string, err error) *MockStreamingChatClient_Chat_Call
- func (_c *MockStreamingChatClient_Chat_Call) Run(run func(ctx context.Context, prompt string)) *MockStreamingChatClient_Chat_Call
- func (_c *MockStreamingChatClient_Chat_Call) RunAndReturn(run func(ctx context.Context, prompt string) (string, error)) *MockStreamingChatClient_Chat_Call
- type MockStreamingChatClient_Expecter
- func (_e *MockStreamingChatClient_Expecter) Add(ctx interface{}, prompt interface{}) *MockStreamingChatClient_Add_Call
- func (_e *MockStreamingChatClient_Expecter) Ask(ctx interface{}, question interface{}, target interface{}) *MockStreamingChatClient_Ask_Call
- func (_e *MockStreamingChatClient_Expecter) Chat(ctx interface{}, prompt interface{}) *MockStreamingChatClient_Chat_Call
- func (_e *MockStreamingChatClient_Expecter) SetTools(tools interface{}) *MockStreamingChatClient_SetTools_Call
- func (_e *MockStreamingChatClient_Expecter) StreamChat(ctx interface{}, prompt interface{}, callback interface{}) *MockStreamingChatClient_StreamChat_Call
- type MockStreamingChatClient_SetTools_Call
- func (_c *MockStreamingChatClient_SetTools_Call) Return(err error) *MockStreamingChatClient_SetTools_Call
- func (_c *MockStreamingChatClient_SetTools_Call) Run(run func(tools []chat.Tool)) *MockStreamingChatClient_SetTools_Call
- func (_c *MockStreamingChatClient_SetTools_Call) RunAndReturn(run func(tools []chat.Tool) error) *MockStreamingChatClient_SetTools_Call
- type MockStreamingChatClient_StreamChat_Call
- func (_c *MockStreamingChatClient_StreamChat_Call) Return(s string, err error) *MockStreamingChatClient_StreamChat_Call
- func (_c *MockStreamingChatClient_StreamChat_Call) Run(run func(ctx context.Context, prompt string, callback chat.StreamCallback)) *MockStreamingChatClient_StreamChat_Call
- func (_c *MockStreamingChatClient_StreamChat_Call) RunAndReturn(...) *MockStreamingChatClient_StreamChat_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(ctx context.Context, prompt string) error
Add 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(ctx context.Context, prompt string)) *MockChatClient_Add_Call
func (*MockChatClient_Add_Call) RunAndReturn ¶
func (_c *MockChatClient_Add_Call) RunAndReturn(run func(ctx context.Context, 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(ctx context.Context, question string, target any)) *MockChatClient_Ask_Call
func (*MockChatClient_Ask_Call) RunAndReturn ¶
func (_c *MockChatClient_Ask_Call) RunAndReturn(run func(ctx context.Context, 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(ctx interface{}, prompt interface{}) *MockChatClient_Add_Call
Add is a helper method to define mock.On call
- ctx context.Context
- prompt string
func (*MockChatClient_Expecter) Ask ¶
func (_e *MockChatClient_Expecter) Ask(ctx interface{}, question interface{}, target interface{}) *MockChatClient_Ask_Call
Ask is a helper method to define mock.On call
- ctx context.Context
- 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
type MockConversationStore ¶ added in v1.11.0
MockConversationStore is an autogenerated mock type for the ConversationStore type
func NewMockConversationStore ¶ added in v1.11.0
func NewMockConversationStore(t interface {
mock.TestingT
Cleanup(func())
}) *MockConversationStore
NewMockConversationStore creates a new instance of MockConversationStore. 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 (*MockConversationStore) Delete ¶ added in v1.11.0
func (_mock *MockConversationStore) Delete(ctx context.Context, id string) error
Delete provides a mock function for the type MockConversationStore
func (*MockConversationStore) EXPECT ¶ added in v1.11.0
func (_m *MockConversationStore) EXPECT() *MockConversationStore_Expecter
func (*MockConversationStore) List ¶ added in v1.11.0
func (_mock *MockConversationStore) List(ctx context.Context) ([]chat.SnapshotSummary, error)
List provides a mock function for the type MockConversationStore
type MockConversationStore_Delete_Call ¶ added in v1.11.0
MockConversationStore_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
func (*MockConversationStore_Delete_Call) Return ¶ added in v1.11.0
func (_c *MockConversationStore_Delete_Call) Return(err error) *MockConversationStore_Delete_Call
func (*MockConversationStore_Delete_Call) Run ¶ added in v1.11.0
func (_c *MockConversationStore_Delete_Call) Run(run func(ctx context.Context, id string)) *MockConversationStore_Delete_Call
func (*MockConversationStore_Delete_Call) RunAndReturn ¶ added in v1.11.0
func (_c *MockConversationStore_Delete_Call) RunAndReturn(run func(ctx context.Context, id string) error) *MockConversationStore_Delete_Call
type MockConversationStore_Expecter ¶ added in v1.11.0
type MockConversationStore_Expecter struct {
// contains filtered or unexported fields
}
func (*MockConversationStore_Expecter) Delete ¶ added in v1.11.0
func (_e *MockConversationStore_Expecter) Delete(ctx interface{}, id interface{}) *MockConversationStore_Delete_Call
Delete is a helper method to define mock.On call
- ctx context.Context
- id string
func (*MockConversationStore_Expecter) List ¶ added in v1.11.0
func (_e *MockConversationStore_Expecter) List(ctx interface{}) *MockConversationStore_List_Call
List is a helper method to define mock.On call
- ctx context.Context
func (*MockConversationStore_Expecter) Load ¶ added in v1.11.0
func (_e *MockConversationStore_Expecter) Load(ctx interface{}, id interface{}) *MockConversationStore_Load_Call
Load is a helper method to define mock.On call
- ctx context.Context
- id string
func (*MockConversationStore_Expecter) Save ¶ added in v1.11.0
func (_e *MockConversationStore_Expecter) Save(ctx interface{}, snapshot interface{}) *MockConversationStore_Save_Call
Save is a helper method to define mock.On call
- ctx context.Context
- snapshot *chat.Snapshot
type MockConversationStore_List_Call ¶ added in v1.11.0
MockConversationStore_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
func (*MockConversationStore_List_Call) Return ¶ added in v1.11.0
func (_c *MockConversationStore_List_Call) Return(snapshotSummarys []chat.SnapshotSummary, err error) *MockConversationStore_List_Call
func (*MockConversationStore_List_Call) Run ¶ added in v1.11.0
func (_c *MockConversationStore_List_Call) Run(run func(ctx context.Context)) *MockConversationStore_List_Call
func (*MockConversationStore_List_Call) RunAndReturn ¶ added in v1.11.0
func (_c *MockConversationStore_List_Call) RunAndReturn(run func(ctx context.Context) ([]chat.SnapshotSummary, error)) *MockConversationStore_List_Call
type MockConversationStore_Load_Call ¶ added in v1.11.0
MockConversationStore_Load_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Load'
func (*MockConversationStore_Load_Call) Return ¶ added in v1.11.0
func (_c *MockConversationStore_Load_Call) Return(snapshot *chat.Snapshot, err error) *MockConversationStore_Load_Call
func (*MockConversationStore_Load_Call) Run ¶ added in v1.11.0
func (_c *MockConversationStore_Load_Call) Run(run func(ctx context.Context, id string)) *MockConversationStore_Load_Call
func (*MockConversationStore_Load_Call) RunAndReturn ¶ added in v1.11.0
func (_c *MockConversationStore_Load_Call) RunAndReturn(run func(ctx context.Context, id string) (*chat.Snapshot, error)) *MockConversationStore_Load_Call
type MockConversationStore_Save_Call ¶ added in v1.11.0
MockConversationStore_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
func (*MockConversationStore_Save_Call) Return ¶ added in v1.11.0
func (_c *MockConversationStore_Save_Call) Return(err error) *MockConversationStore_Save_Call
func (*MockConversationStore_Save_Call) Run ¶ added in v1.11.0
func (_c *MockConversationStore_Save_Call) Run(run func(ctx context.Context, snapshot *chat.Snapshot)) *MockConversationStore_Save_Call
func (*MockConversationStore_Save_Call) RunAndReturn ¶ added in v1.11.0
func (_c *MockConversationStore_Save_Call) RunAndReturn(run func(ctx context.Context, snapshot *chat.Snapshot) error) *MockConversationStore_Save_Call
type MockPersistentChatClient ¶ added in v1.11.0
MockPersistentChatClient is an autogenerated mock type for the PersistentChatClient type
func NewMockPersistentChatClient ¶ added in v1.11.0
func NewMockPersistentChatClient(t interface {
mock.TestingT
Cleanup(func())
}) *MockPersistentChatClient
NewMockPersistentChatClient creates a new instance of MockPersistentChatClient. 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 (*MockPersistentChatClient) Add ¶ added in v1.11.0
func (_mock *MockPersistentChatClient) Add(ctx context.Context, prompt string) error
Add provides a mock function for the type MockPersistentChatClient
func (*MockPersistentChatClient) Ask ¶ added in v1.11.0
Ask provides a mock function for the type MockPersistentChatClient
func (*MockPersistentChatClient) Chat ¶ added in v1.11.0
Chat provides a mock function for the type MockPersistentChatClient
func (*MockPersistentChatClient) EXPECT ¶ added in v1.11.0
func (_m *MockPersistentChatClient) EXPECT() *MockPersistentChatClient_Expecter
func (*MockPersistentChatClient) Restore ¶ added in v1.11.0
func (_mock *MockPersistentChatClient) Restore(snapshot *chat.Snapshot) error
Restore provides a mock function for the type MockPersistentChatClient
type MockPersistentChatClient_Add_Call ¶ added in v1.11.0
MockPersistentChatClient_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'
func (*MockPersistentChatClient_Add_Call) Return ¶ added in v1.11.0
func (_c *MockPersistentChatClient_Add_Call) Return(err error) *MockPersistentChatClient_Add_Call
func (*MockPersistentChatClient_Add_Call) Run ¶ added in v1.11.0
func (_c *MockPersistentChatClient_Add_Call) Run(run func(ctx context.Context, prompt string)) *MockPersistentChatClient_Add_Call
func (*MockPersistentChatClient_Add_Call) RunAndReturn ¶ added in v1.11.0
func (_c *MockPersistentChatClient_Add_Call) RunAndReturn(run func(ctx context.Context, prompt string) error) *MockPersistentChatClient_Add_Call
type MockPersistentChatClient_Ask_Call ¶ added in v1.11.0
MockPersistentChatClient_Ask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ask'
func (*MockPersistentChatClient_Ask_Call) Return ¶ added in v1.11.0
func (_c *MockPersistentChatClient_Ask_Call) Return(err error) *MockPersistentChatClient_Ask_Call
func (*MockPersistentChatClient_Ask_Call) Run ¶ added in v1.11.0
func (_c *MockPersistentChatClient_Ask_Call) Run(run func(ctx context.Context, question string, target any)) *MockPersistentChatClient_Ask_Call
func (*MockPersistentChatClient_Ask_Call) RunAndReturn ¶ added in v1.11.0
func (_c *MockPersistentChatClient_Ask_Call) RunAndReturn(run func(ctx context.Context, question string, target any) error) *MockPersistentChatClient_Ask_Call
type MockPersistentChatClient_Chat_Call ¶ added in v1.11.0
MockPersistentChatClient_Chat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Chat'
func (*MockPersistentChatClient_Chat_Call) Return ¶ added in v1.11.0
func (_c *MockPersistentChatClient_Chat_Call) Return(s string, err error) *MockPersistentChatClient_Chat_Call
func (*MockPersistentChatClient_Chat_Call) Run ¶ added in v1.11.0
func (_c *MockPersistentChatClient_Chat_Call) Run(run func(ctx context.Context, prompt string)) *MockPersistentChatClient_Chat_Call
func (*MockPersistentChatClient_Chat_Call) RunAndReturn ¶ added in v1.11.0
func (_c *MockPersistentChatClient_Chat_Call) RunAndReturn(run func(ctx context.Context, prompt string) (string, error)) *MockPersistentChatClient_Chat_Call
type MockPersistentChatClient_Expecter ¶ added in v1.11.0
type MockPersistentChatClient_Expecter struct {
// contains filtered or unexported fields
}
func (*MockPersistentChatClient_Expecter) Add ¶ added in v1.11.0
func (_e *MockPersistentChatClient_Expecter) Add(ctx interface{}, prompt interface{}) *MockPersistentChatClient_Add_Call
Add is a helper method to define mock.On call
- ctx context.Context
- prompt string
func (*MockPersistentChatClient_Expecter) Ask ¶ added in v1.11.0
func (_e *MockPersistentChatClient_Expecter) Ask(ctx interface{}, question interface{}, target interface{}) *MockPersistentChatClient_Ask_Call
Ask is a helper method to define mock.On call
- ctx context.Context
- question string
- target any
func (*MockPersistentChatClient_Expecter) Chat ¶ added in v1.11.0
func (_e *MockPersistentChatClient_Expecter) Chat(ctx interface{}, prompt interface{}) *MockPersistentChatClient_Chat_Call
Chat is a helper method to define mock.On call
- ctx context.Context
- prompt string
func (*MockPersistentChatClient_Expecter) Restore ¶ added in v1.11.0
func (_e *MockPersistentChatClient_Expecter) Restore(snapshot interface{}) *MockPersistentChatClient_Restore_Call
Restore is a helper method to define mock.On call
- snapshot *chat.Snapshot
func (*MockPersistentChatClient_Expecter) Save ¶ added in v1.11.0
func (_e *MockPersistentChatClient_Expecter) Save() *MockPersistentChatClient_Save_Call
Save is a helper method to define mock.On call
func (*MockPersistentChatClient_Expecter) SetTools ¶ added in v1.11.0
func (_e *MockPersistentChatClient_Expecter) SetTools(tools interface{}) *MockPersistentChatClient_SetTools_Call
SetTools is a helper method to define mock.On call
- tools []chat.Tool
type MockPersistentChatClient_Restore_Call ¶ added in v1.11.0
MockPersistentChatClient_Restore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Restore'
func (*MockPersistentChatClient_Restore_Call) Return ¶ added in v1.11.0
func (_c *MockPersistentChatClient_Restore_Call) Return(err error) *MockPersistentChatClient_Restore_Call
func (*MockPersistentChatClient_Restore_Call) Run ¶ added in v1.11.0
func (_c *MockPersistentChatClient_Restore_Call) Run(run func(snapshot *chat.Snapshot)) *MockPersistentChatClient_Restore_Call
func (*MockPersistentChatClient_Restore_Call) RunAndReturn ¶ added in v1.11.0
func (_c *MockPersistentChatClient_Restore_Call) RunAndReturn(run func(snapshot *chat.Snapshot) error) *MockPersistentChatClient_Restore_Call
type MockPersistentChatClient_Save_Call ¶ added in v1.11.0
MockPersistentChatClient_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
func (*MockPersistentChatClient_Save_Call) Return ¶ added in v1.11.0
func (_c *MockPersistentChatClient_Save_Call) Return(snapshot *chat.Snapshot, err error) *MockPersistentChatClient_Save_Call
func (*MockPersistentChatClient_Save_Call) Run ¶ added in v1.11.0
func (_c *MockPersistentChatClient_Save_Call) Run(run func()) *MockPersistentChatClient_Save_Call
func (*MockPersistentChatClient_Save_Call) RunAndReturn ¶ added in v1.11.0
func (_c *MockPersistentChatClient_Save_Call) RunAndReturn(run func() (*chat.Snapshot, error)) *MockPersistentChatClient_Save_Call
type MockPersistentChatClient_SetTools_Call ¶ added in v1.11.0
MockPersistentChatClient_SetTools_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTools'
func (*MockPersistentChatClient_SetTools_Call) Return ¶ added in v1.11.0
func (_c *MockPersistentChatClient_SetTools_Call) Return(err error) *MockPersistentChatClient_SetTools_Call
func (*MockPersistentChatClient_SetTools_Call) Run ¶ added in v1.11.0
func (_c *MockPersistentChatClient_SetTools_Call) Run(run func(tools []chat.Tool)) *MockPersistentChatClient_SetTools_Call
func (*MockPersistentChatClient_SetTools_Call) RunAndReturn ¶ added in v1.11.0
func (_c *MockPersistentChatClient_SetTools_Call) RunAndReturn(run func(tools []chat.Tool) error) *MockPersistentChatClient_SetTools_Call
type MockStreamingChatClient ¶ added in v1.11.0
MockStreamingChatClient is an autogenerated mock type for the StreamingChatClient type
func NewMockStreamingChatClient ¶ added in v1.11.0
func NewMockStreamingChatClient(t interface {
mock.TestingT
Cleanup(func())
}) *MockStreamingChatClient
NewMockStreamingChatClient creates a new instance of MockStreamingChatClient. 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 (*MockStreamingChatClient) Add ¶ added in v1.11.0
func (_mock *MockStreamingChatClient) Add(ctx context.Context, prompt string) error
Add provides a mock function for the type MockStreamingChatClient
func (*MockStreamingChatClient) Ask ¶ added in v1.11.0
Ask provides a mock function for the type MockStreamingChatClient
func (*MockStreamingChatClient) Chat ¶ added in v1.11.0
Chat provides a mock function for the type MockStreamingChatClient
func (*MockStreamingChatClient) EXPECT ¶ added in v1.11.0
func (_m *MockStreamingChatClient) EXPECT() *MockStreamingChatClient_Expecter
func (*MockStreamingChatClient) SetTools ¶ added in v1.11.0
func (_mock *MockStreamingChatClient) SetTools(tools []chat.Tool) error
SetTools provides a mock function for the type MockStreamingChatClient
func (*MockStreamingChatClient) StreamChat ¶ added in v1.11.0
func (_mock *MockStreamingChatClient) StreamChat(ctx context.Context, prompt string, callback chat.StreamCallback) (string, error)
StreamChat provides a mock function for the type MockStreamingChatClient
type MockStreamingChatClient_Add_Call ¶ added in v1.11.0
MockStreamingChatClient_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'
func (*MockStreamingChatClient_Add_Call) Return ¶ added in v1.11.0
func (_c *MockStreamingChatClient_Add_Call) Return(err error) *MockStreamingChatClient_Add_Call
func (*MockStreamingChatClient_Add_Call) Run ¶ added in v1.11.0
func (_c *MockStreamingChatClient_Add_Call) Run(run func(ctx context.Context, prompt string)) *MockStreamingChatClient_Add_Call
func (*MockStreamingChatClient_Add_Call) RunAndReturn ¶ added in v1.11.0
func (_c *MockStreamingChatClient_Add_Call) RunAndReturn(run func(ctx context.Context, prompt string) error) *MockStreamingChatClient_Add_Call
type MockStreamingChatClient_Ask_Call ¶ added in v1.11.0
MockStreamingChatClient_Ask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ask'
func (*MockStreamingChatClient_Ask_Call) Return ¶ added in v1.11.0
func (_c *MockStreamingChatClient_Ask_Call) Return(err error) *MockStreamingChatClient_Ask_Call
func (*MockStreamingChatClient_Ask_Call) Run ¶ added in v1.11.0
func (_c *MockStreamingChatClient_Ask_Call) Run(run func(ctx context.Context, question string, target any)) *MockStreamingChatClient_Ask_Call
func (*MockStreamingChatClient_Ask_Call) RunAndReturn ¶ added in v1.11.0
func (_c *MockStreamingChatClient_Ask_Call) RunAndReturn(run func(ctx context.Context, question string, target any) error) *MockStreamingChatClient_Ask_Call
type MockStreamingChatClient_Chat_Call ¶ added in v1.11.0
MockStreamingChatClient_Chat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Chat'
func (*MockStreamingChatClient_Chat_Call) Return ¶ added in v1.11.0
func (_c *MockStreamingChatClient_Chat_Call) Return(s string, err error) *MockStreamingChatClient_Chat_Call
func (*MockStreamingChatClient_Chat_Call) Run ¶ added in v1.11.0
func (_c *MockStreamingChatClient_Chat_Call) Run(run func(ctx context.Context, prompt string)) *MockStreamingChatClient_Chat_Call
func (*MockStreamingChatClient_Chat_Call) RunAndReturn ¶ added in v1.11.0
func (_c *MockStreamingChatClient_Chat_Call) RunAndReturn(run func(ctx context.Context, prompt string) (string, error)) *MockStreamingChatClient_Chat_Call
type MockStreamingChatClient_Expecter ¶ added in v1.11.0
type MockStreamingChatClient_Expecter struct {
// contains filtered or unexported fields
}
func (*MockStreamingChatClient_Expecter) Add ¶ added in v1.11.0
func (_e *MockStreamingChatClient_Expecter) Add(ctx interface{}, prompt interface{}) *MockStreamingChatClient_Add_Call
Add is a helper method to define mock.On call
- ctx context.Context
- prompt string
func (*MockStreamingChatClient_Expecter) Ask ¶ added in v1.11.0
func (_e *MockStreamingChatClient_Expecter) Ask(ctx interface{}, question interface{}, target interface{}) *MockStreamingChatClient_Ask_Call
Ask is a helper method to define mock.On call
- ctx context.Context
- question string
- target any
func (*MockStreamingChatClient_Expecter) Chat ¶ added in v1.11.0
func (_e *MockStreamingChatClient_Expecter) Chat(ctx interface{}, prompt interface{}) *MockStreamingChatClient_Chat_Call
Chat is a helper method to define mock.On call
- ctx context.Context
- prompt string
func (*MockStreamingChatClient_Expecter) SetTools ¶ added in v1.11.0
func (_e *MockStreamingChatClient_Expecter) SetTools(tools interface{}) *MockStreamingChatClient_SetTools_Call
SetTools is a helper method to define mock.On call
- tools []chat.Tool
func (*MockStreamingChatClient_Expecter) StreamChat ¶ added in v1.11.0
func (_e *MockStreamingChatClient_Expecter) StreamChat(ctx interface{}, prompt interface{}, callback interface{}) *MockStreamingChatClient_StreamChat_Call
StreamChat is a helper method to define mock.On call
- ctx context.Context
- prompt string
- callback chat.StreamCallback
type MockStreamingChatClient_SetTools_Call ¶ added in v1.11.0
MockStreamingChatClient_SetTools_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTools'
func (*MockStreamingChatClient_SetTools_Call) Return ¶ added in v1.11.0
func (_c *MockStreamingChatClient_SetTools_Call) Return(err error) *MockStreamingChatClient_SetTools_Call
func (*MockStreamingChatClient_SetTools_Call) Run ¶ added in v1.11.0
func (_c *MockStreamingChatClient_SetTools_Call) Run(run func(tools []chat.Tool)) *MockStreamingChatClient_SetTools_Call
func (*MockStreamingChatClient_SetTools_Call) RunAndReturn ¶ added in v1.11.0
func (_c *MockStreamingChatClient_SetTools_Call) RunAndReturn(run func(tools []chat.Tool) error) *MockStreamingChatClient_SetTools_Call
type MockStreamingChatClient_StreamChat_Call ¶ added in v1.11.0
MockStreamingChatClient_StreamChat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StreamChat'
func (*MockStreamingChatClient_StreamChat_Call) Return ¶ added in v1.11.0
func (_c *MockStreamingChatClient_StreamChat_Call) Return(s string, err error) *MockStreamingChatClient_StreamChat_Call
func (*MockStreamingChatClient_StreamChat_Call) Run ¶ added in v1.11.0
func (_c *MockStreamingChatClient_StreamChat_Call) Run(run func(ctx context.Context, prompt string, callback chat.StreamCallback)) *MockStreamingChatClient_StreamChat_Call
func (*MockStreamingChatClient_StreamChat_Call) RunAndReturn ¶ added in v1.11.0
func (_c *MockStreamingChatClient_StreamChat_Call) RunAndReturn(run func(ctx context.Context, prompt string, callback chat.StreamCallback) (string, error)) *MockStreamingChatClient_StreamChat_Call