Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockClient ¶
func NewMockClient ¶
func NewMockClient() *MockClient
func (*MockClient) Chat ¶
func (m *MockClient) Chat(messages []chat.Message, options *chat.ChatOptions) (*chat.Message, chat.ResponseInfo, error)
func (*MockClient) ChatWithFunctions ¶ added in v0.0.6
func (c *MockClient) ChatWithFunctions(messages []chat.Message, functions []tools.FunctionConfig, options *chat.ChatOptions) (*chat.Message, chat.ResponseInfo, error)
type MockServer ¶
type MockServer struct { *httptest.Server RequestHandler func(w http.ResponseWriter, r *http.Request) }
func NewTestServer ¶
func NewTestServer() *MockServer
func (*MockServer) Close ¶
func (m *MockServer) Close()
func (*MockServer) Init ¶
func (m *MockServer) Init()
func (*MockServer) SetRequestHandler ¶
func (m *MockServer) SetRequestHandler(handler func(w http.ResponseWriter, r *http.Request))
func (*MockServer) Start ¶
func (m *MockServer) Start()
func (*MockServer) URL ¶
func (m *MockServer) URL() string
Click to show internal directories.
Click to hide internal directories.