Documentation
¶
Index ¶
- type MockLanguageModel
- func (_mock *MockLanguageModel) ChatCompletion(conversation llm.CompletionRequest, opts ...llm.LanguageModelOption) (*llm.TextStreamResult, error)
- func (_mock *MockLanguageModel) ChatCompletionNoStream(conversation llm.CompletionRequest, opts ...llm.LanguageModelOption) (string, error)
- func (_mock *MockLanguageModel) CountTokens(text string) int
- func (_m *MockLanguageModel) EXPECT() *MockLanguageModel_Expecter
- func (_mock *MockLanguageModel) InputTokenLimit() int
- type MockLanguageModel_ChatCompletionNoStream_Call
- func (_c *MockLanguageModel_ChatCompletionNoStream_Call) Return(s string, err error) *MockLanguageModel_ChatCompletionNoStream_Call
- func (_c *MockLanguageModel_ChatCompletionNoStream_Call) Run(run func(conversation llm.CompletionRequest, opts ...llm.LanguageModelOption)) *MockLanguageModel_ChatCompletionNoStream_Call
- func (_c *MockLanguageModel_ChatCompletionNoStream_Call) RunAndReturn(...) *MockLanguageModel_ChatCompletionNoStream_Call
- type MockLanguageModel_ChatCompletion_Call
- func (_c *MockLanguageModel_ChatCompletion_Call) Return(textStreamResult *llm.TextStreamResult, err error) *MockLanguageModel_ChatCompletion_Call
- func (_c *MockLanguageModel_ChatCompletion_Call) Run(run func(conversation llm.CompletionRequest, opts ...llm.LanguageModelOption)) *MockLanguageModel_ChatCompletion_Call
- func (_c *MockLanguageModel_ChatCompletion_Call) RunAndReturn(...) *MockLanguageModel_ChatCompletion_Call
- type MockLanguageModel_CountTokens_Call
- func (_c *MockLanguageModel_CountTokens_Call) Return(n int) *MockLanguageModel_CountTokens_Call
- func (_c *MockLanguageModel_CountTokens_Call) Run(run func(text string)) *MockLanguageModel_CountTokens_Call
- func (_c *MockLanguageModel_CountTokens_Call) RunAndReturn(run func(text string) int) *MockLanguageModel_CountTokens_Call
- type MockLanguageModel_Expecter
- func (_e *MockLanguageModel_Expecter) ChatCompletion(conversation interface{}, opts ...interface{}) *MockLanguageModel_ChatCompletion_Call
- func (_e *MockLanguageModel_Expecter) ChatCompletionNoStream(conversation interface{}, opts ...interface{}) *MockLanguageModel_ChatCompletionNoStream_Call
- func (_e *MockLanguageModel_Expecter) CountTokens(text interface{}) *MockLanguageModel_CountTokens_Call
- func (_e *MockLanguageModel_Expecter) InputTokenLimit() *MockLanguageModel_InputTokenLimit_Call
- type MockLanguageModel_InputTokenLimit_Call
- func (_c *MockLanguageModel_InputTokenLimit_Call) Return(n int) *MockLanguageModel_InputTokenLimit_Call
- func (_c *MockLanguageModel_InputTokenLimit_Call) Run(run func()) *MockLanguageModel_InputTokenLimit_Call
- func (_c *MockLanguageModel_InputTokenLimit_Call) RunAndReturn(run func() int) *MockLanguageModel_InputTokenLimit_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockLanguageModel ¶
MockLanguageModel is an autogenerated mock type for the LanguageModel type
func NewMockLanguageModel ¶
func NewMockLanguageModel(t interface {
mock.TestingT
Cleanup(func())
}) *MockLanguageModel
NewMockLanguageModel creates a new instance of MockLanguageModel. 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 (*MockLanguageModel) ChatCompletion ¶
func (_mock *MockLanguageModel) ChatCompletion(conversation llm.CompletionRequest, opts ...llm.LanguageModelOption) (*llm.TextStreamResult, error)
ChatCompletion provides a mock function for the type MockLanguageModel
func (*MockLanguageModel) ChatCompletionNoStream ¶
func (_mock *MockLanguageModel) ChatCompletionNoStream(conversation llm.CompletionRequest, opts ...llm.LanguageModelOption) (string, error)
ChatCompletionNoStream provides a mock function for the type MockLanguageModel
func (*MockLanguageModel) CountTokens ¶
func (_mock *MockLanguageModel) CountTokens(text string) int
CountTokens provides a mock function for the type MockLanguageModel
func (*MockLanguageModel) EXPECT ¶
func (_m *MockLanguageModel) EXPECT() *MockLanguageModel_Expecter
func (*MockLanguageModel) InputTokenLimit ¶
func (_mock *MockLanguageModel) InputTokenLimit() int
InputTokenLimit provides a mock function for the type MockLanguageModel
type MockLanguageModel_ChatCompletionNoStream_Call ¶
MockLanguageModel_ChatCompletionNoStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChatCompletionNoStream'
func (*MockLanguageModel_ChatCompletionNoStream_Call) Return ¶
func (_c *MockLanguageModel_ChatCompletionNoStream_Call) Return(s string, err error) *MockLanguageModel_ChatCompletionNoStream_Call
func (*MockLanguageModel_ChatCompletionNoStream_Call) Run ¶
func (_c *MockLanguageModel_ChatCompletionNoStream_Call) Run(run func(conversation llm.CompletionRequest, opts ...llm.LanguageModelOption)) *MockLanguageModel_ChatCompletionNoStream_Call
func (*MockLanguageModel_ChatCompletionNoStream_Call) RunAndReturn ¶
func (_c *MockLanguageModel_ChatCompletionNoStream_Call) RunAndReturn(run func(conversation llm.CompletionRequest, opts ...llm.LanguageModelOption) (string, error)) *MockLanguageModel_ChatCompletionNoStream_Call
type MockLanguageModel_ChatCompletion_Call ¶
MockLanguageModel_ChatCompletion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChatCompletion'
func (*MockLanguageModel_ChatCompletion_Call) Return ¶
func (_c *MockLanguageModel_ChatCompletion_Call) Return(textStreamResult *llm.TextStreamResult, err error) *MockLanguageModel_ChatCompletion_Call
func (*MockLanguageModel_ChatCompletion_Call) Run ¶
func (_c *MockLanguageModel_ChatCompletion_Call) Run(run func(conversation llm.CompletionRequest, opts ...llm.LanguageModelOption)) *MockLanguageModel_ChatCompletion_Call
func (*MockLanguageModel_ChatCompletion_Call) RunAndReturn ¶
func (_c *MockLanguageModel_ChatCompletion_Call) RunAndReturn(run func(conversation llm.CompletionRequest, opts ...llm.LanguageModelOption) (*llm.TextStreamResult, error)) *MockLanguageModel_ChatCompletion_Call
type MockLanguageModel_CountTokens_Call ¶
MockLanguageModel_CountTokens_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountTokens'
func (*MockLanguageModel_CountTokens_Call) Return ¶
func (_c *MockLanguageModel_CountTokens_Call) Return(n int) *MockLanguageModel_CountTokens_Call
func (*MockLanguageModel_CountTokens_Call) Run ¶
func (_c *MockLanguageModel_CountTokens_Call) Run(run func(text string)) *MockLanguageModel_CountTokens_Call
func (*MockLanguageModel_CountTokens_Call) RunAndReturn ¶
func (_c *MockLanguageModel_CountTokens_Call) RunAndReturn(run func(text string) int) *MockLanguageModel_CountTokens_Call
type MockLanguageModel_Expecter ¶
type MockLanguageModel_Expecter struct {
// contains filtered or unexported fields
}
func (*MockLanguageModel_Expecter) ChatCompletion ¶
func (_e *MockLanguageModel_Expecter) ChatCompletion(conversation interface{}, opts ...interface{}) *MockLanguageModel_ChatCompletion_Call
ChatCompletion is a helper method to define mock.On call
- conversation
- opts
func (*MockLanguageModel_Expecter) ChatCompletionNoStream ¶
func (_e *MockLanguageModel_Expecter) ChatCompletionNoStream(conversation interface{}, opts ...interface{}) *MockLanguageModel_ChatCompletionNoStream_Call
ChatCompletionNoStream is a helper method to define mock.On call
- conversation
- opts
func (*MockLanguageModel_Expecter) CountTokens ¶
func (_e *MockLanguageModel_Expecter) CountTokens(text interface{}) *MockLanguageModel_CountTokens_Call
CountTokens is a helper method to define mock.On call
- text
func (*MockLanguageModel_Expecter) InputTokenLimit ¶
func (_e *MockLanguageModel_Expecter) InputTokenLimit() *MockLanguageModel_InputTokenLimit_Call
InputTokenLimit is a helper method to define mock.On call
type MockLanguageModel_InputTokenLimit_Call ¶
MockLanguageModel_InputTokenLimit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InputTokenLimit'
func (*MockLanguageModel_InputTokenLimit_Call) Return ¶
func (_c *MockLanguageModel_InputTokenLimit_Call) Return(n int) *MockLanguageModel_InputTokenLimit_Call
func (*MockLanguageModel_InputTokenLimit_Call) Run ¶
func (_c *MockLanguageModel_InputTokenLimit_Call) Run(run func()) *MockLanguageModel_InputTokenLimit_Call
func (*MockLanguageModel_InputTokenLimit_Call) RunAndReturn ¶
func (_c *MockLanguageModel_InputTokenLimit_Call) RunAndReturn(run func() int) *MockLanguageModel_InputTokenLimit_Call