chat

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockChatClient

type MockChatClient struct {
	mock.Mock
}

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) Chat

func (_mock *MockChatClient) Chat(ctx context.Context, prompt string) (string, error)

Chat provides a mock function for the type MockChatClient

func (*MockChatClient) EXPECT

func (*MockChatClient) SetTools

func (_mock *MockChatClient) SetTools(tools []chat.Tool) error

SetTools provides a mock function for the type MockChatClient

type MockChatClient_Add_Call

type MockChatClient_Add_Call struct {
	*mock.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 (*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

type MockChatClient_Ask_Call struct {
	*mock.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 (*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

type MockChatClient_Chat_Call struct {
	*mock.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 (*MockChatClient_Chat_Call) Run

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

type MockChatClient_SetTools_Call struct {
	*mock.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 (*MockChatClient_SetTools_Call) Run

func (*MockChatClient_SetTools_Call) RunAndReturn

func (_c *MockChatClient_SetTools_Call) RunAndReturn(run func(tools []chat.Tool) error) *MockChatClient_SetTools_Call

Jump to

Keyboard shortcuts

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