SYMBOL INDEX (4823 symbols across 633 files) FILE: agents/agents.go type Agent (line 12) | type Agent interface FILE: agents/conversational.go constant _conversationalFinalAnswerAction (line 19) | _conversationalFinalAnswerAction = "AI:" type ConversationalAgent (line 29) | type ConversationalAgent struct method Plan (line 62) | func (a *ConversationalAgent) Plan( method GetInputKeys (line 104) | func (a *ConversationalAgent) GetInputKeys() []string { method GetOutputKeys (line 119) | func (a *ConversationalAgent) GetOutputKeys() []string { method GetTools (line 123) | func (a *ConversationalAgent) GetTools() []tools.Tool { method parseOutput (line 140) | func (a *ConversationalAgent) parseOutput(output string) ([]schema.Age... function NewConversationalAgent (line 43) | func NewConversationalAgent(llm llms.Model, tools []tools.Tool, opts ...... function constructScratchPad (line 127) | func constructScratchPad(steps []schema.AgentStep) string { function createConversationalPrompt (line 174) | func createConversationalPrompt(tools []tools.Tool, prefix, instructions... FILE: agents/conversational_test.go function hasExistingRecording (line 20) | func hasExistingRecording(t *testing.T) bool { function TestConversationalWithMemory (line 28) | func TestConversationalWithMemory(t *testing.T) { FILE: agents/errors.go type ParserErrorHandler (line 29) | type ParserErrorHandler struct function NewParserErrorHandler (line 36) | func NewParserErrorHandler(formatFunc func(string) string) *ParserErrorH... FILE: agents/executor.go constant _intermediateStepsOutputKey (line 15) | _intermediateStepsOutputKey = "intermediateSteps" type Executor (line 18) | type Executor struct method Call (line 50) | func (e *Executor) Call(ctx context.Context, inputValues map[string]an... method doIteration (line 77) | func (e *Executor) doIteration( // nolint method doAction (line 120) | func (e *Executor) doAction( method getReturn (line 149) | func (e *Executor) getReturn(finish *schema.AgentFinish, steps []schem... method GetInputKeys (line 159) | func (e *Executor) GetInputKeys() []string { method GetOutputKeys (line 164) | func (e *Executor) GetOutputKeys() []string { method GetMemory (line 168) | func (e *Executor) GetMemory() schema.Memory { //nolint:ireturn method GetCallbackHandler (line 172) | func (e *Executor) GetCallbackHandler() callbacks.Handler { //nolint:i... function NewExecutor (line 34) | func NewExecutor(agent Agent, opts ...Option) *Executor { function inputsToString (line 176) | func inputsToString(inputValues map[string]any) (map[string]string, erro... function getNameToTool (line 190) | func getNameToTool(t []tools.Tool) map[string]tools.Tool { FILE: agents/executor_test.go type testAgent (line 20) | type testAgent struct method Plan (line 33) | func (a *testAgent) Plan( method GetInputKeys (line 46) | func (a testAgent) GetInputKeys() []string { method GetOutputKeys (line 50) | func (a testAgent) GetOutputKeys() []string { method GetTools (line 54) | func (a *testAgent) GetTools() []tools.Tool { function TestExecutorWithErrorHandler (line 58) | func TestExecutorWithErrorHandler(t *testing.T) { function TestExecutorWithMRKLAgent (line 80) | func TestExecutorWithMRKLAgent(t *testing.T) { function TestExecutorWithOpenAIFunctionAgent (line 133) | func TestExecutorWithOpenAIFunctionAgent(t *testing.T) { type mockTool (line 194) | type mockTool struct method Name (line 200) | func (m *mockTool) Name() string { method Description (line 204) | func (m *mockTool) Description() string { method Call (line 208) | func (m *mockTool) Call(_ context.Context, input string) (string, erro... function TestExecutorTrimsObservationSuffix (line 213) | func TestExecutorTrimsObservationSuffix(t *testing.T) { FILE: agents/initialize.go constant _defaultMaxIterations (line 8) | _defaultMaxIterations = 5 type AgentType (line 11) | type AgentType constant ZeroShotReactDescription (line 16) | ZeroShotReactDescription AgentType = "zeroShotReactDescription" constant ConversationalReactDescription (line 19) | ConversationalReactDescription AgentType = "conversationalReactDescription" function Initialize (line 26) | func Initialize( FILE: agents/markl_test.go function TestMRKLOutputParser (line 10) | func TestMRKLOutputParser(t *testing.T) { FILE: agents/mrkl.go constant _finalAnswerAction (line 17) | _finalAnswerAction = "Final Answer:" constant _defaultOutputKey (line 18) | _defaultOutputKey = "output" type OneShotZeroAgent (line 26) | type OneShotZeroAgent struct method Plan (line 62) | func (a *OneShotZeroAgent) Plan( method GetInputKeys (line 104) | func (a *OneShotZeroAgent) GetInputKeys() []string { method GetOutputKeys (line 119) | func (a *OneShotZeroAgent) GetOutputKeys() []string { method GetTools (line 123) | func (a *OneShotZeroAgent) GetTools() []tools.Tool { method parseOutput (line 139) | func (a *OneShotZeroAgent) parseOutput(output string) ([]schema.AgentA... function NewOneShotAgent (line 43) | func NewOneShotAgent(llm llms.Model, tools []tools.Tool, opts ...Option)... function constructMrklScratchPad (line 127) | func constructMrklScratchPad(steps []schema.AgentStep) string { FILE: agents/mrkl_prompt.go constant _defaultMrklPrefix (line 12) | _defaultMrklPrefix = `Answer the following questions as best you can. Yo... constant _defaultMrklFormatInstructions (line 16) | _defaultMrklFormatInstructions = `Use the following format: constant _defaultMrklSuffix (line 27) | _defaultMrklSuffix = `Begin! function createMRKLPrompt (line 33) | func createMRKLPrompt(tools []tools.Tool, prefix, instructions, suffix s... function toolNames (line 47) | func toolNames(tools []tools.Tool) string { function toolDescriptions (line 59) | func toolDescriptions(tools []tools.Tool) string { FILE: agents/openai_functions_agent.go constant agentScratchpad (line 17) | agentScratchpad = "agent_scratchpad" type OpenAIFunctionsAgent (line 20) | type OpenAIFunctionsAgent struct method functions (line 52) | func (o *OpenAIFunctionsAgent) functions() []llms.FunctionDefinition { method Plan (line 71) | func (o *OpenAIFunctionsAgent) Plan( method GetInputKeys (line 164) | func (o *OpenAIFunctionsAgent) GetInputKeys() []string { method GetOutputKeys (line 179) | func (o *OpenAIFunctionsAgent) GetOutputKeys() []string { method GetTools (line 183) | func (o *OpenAIFunctionsAgent) GetTools() []tools.Tool { method constructScratchPad (line 199) | func (o *OpenAIFunctionsAgent) constructScratchPad(steps []schema.Agen... method ParseOutput (line 263) | func (o *OpenAIFunctionsAgent) ParseOutput(contentResp *llms.ContentRe... function NewOpenAIFunctionsAgent (line 37) | func NewOpenAIFunctionsAgent(llm llms.Model, tools []tools.Tool, opts ..... function createOpenAIFunctionPrompt (line 187) | func createOpenAIFunctionPrompt(opts Options) prompts.ChatPromptTemplate { FILE: agents/openai_functions_agent_test.go function hasExistingRecording (line 22) | func hasExistingRecording(t *testing.T) bool { function TestOpenAIFunctionsAgentWithHTTPRR (line 30) | func TestOpenAIFunctionsAgentWithHTTPRR(t *testing.T) { function TestOpenAIFunctionsAgentComplexCalculation (line 86) | func TestOpenAIFunctionsAgentComplexCalculation(t *testing.T) { function TestOpenAIFunctionsAgent_ParseOutput_NilResponse (line 146) | func TestOpenAIFunctionsAgent_ParseOutput_NilResponse(t *testing.T) { function TestOpenAIFunctionsAgent_ParseOutput_EmptyChoices (line 158) | func TestOpenAIFunctionsAgent_ParseOutput_EmptyChoices(t *testing.T) { function TestOpenAIFunctionsAgent_ParseOutput_MultipleToolCalls (line 173) | func TestOpenAIFunctionsAgent_ParseOutput_MultipleToolCalls(t *testing.T) { FILE: agents/options.go type Options (line 11) | type Options struct method getMrklPrompt (line 65) | func (co Options) getMrklPrompt(tools []tools.Tool) prompts.PromptTemp... method getConversationalPrompt (line 78) | func (co Options) getConversationalPrompt(tools []tools.Tool) prompts.... type Option (line 30) | type Option function executorDefaultOptions (line 32) | func executorDefaultOptions() Options { function mrklDefaultOptions (line 40) | func mrklDefaultOptions() Options { function conversationalDefaultOptions (line 49) | func conversationalDefaultOptions() Options { function openAIFunctionsDefaultOptions (line 58) | func openAIFunctionsDefaultOptions() Options { function WithMaxIterations (line 93) | func WithMaxIterations(iterations int) Option { function WithOutputKey (line 100) | func WithOutputKey(outputKey string) Option { function WithPromptPrefix (line 107) | func WithPromptPrefix(prefix string) Option { function WithPromptFormatInstructions (line 115) | func WithPromptFormatInstructions(instructions string) Option { function WithPromptSuffix (line 122) | func WithPromptSuffix(suffix string) Option { function WithPrompt (line 129) | func WithPrompt(prompt prompts.PromptTemplate) Option { function WithReturnIntermediateSteps (line 137) | func WithReturnIntermediateSteps() Option { function WithMemory (line 144) | func WithMemory(m schema.Memory) Option { function WithCallbacksHandler (line 151) | func WithCallbacksHandler(handler callbacks.Handler) Option { function WithParserErrorHandler (line 158) | func WithParserErrorHandler(errorHandler *ParserErrorHandler) Option { type OpenAIOption (line 164) | type OpenAIOption struct method WithSystemMessage (line 170) | func (o OpenAIOption) WithSystemMessage(msg string) Option { method WithExtraMessages (line 176) | func (o OpenAIOption) WithExtraMessages(extraMessages []prompts.Messag... function NewOpenAIOption (line 166) | func NewOpenAIOption() OpenAIOption { FILE: callbacks/agent_final_stream.go type AgentFinalStreamHandler (line 13) | type AgentFinalStreamHandler struct method GetEgress (line 47) | func (handler *AgentFinalStreamHandler) GetEgress() chan []byte { method ReadFromEgress (line 57) | func (handler *AgentFinalStreamHandler) ReadFromEgress( method HandleStreamingFunc (line 76) | func (handler *AgentFinalStreamHandler) HandleStreamingFunc(_ context.... function NewFinalStreamHandler (line 32) | func NewFinalStreamHandler(keywords ...string) *AgentFinalStreamHandler { function filterFinalString (line 114) | func filterFinalString(chunkStr, keyword string) string { FILE: callbacks/agent_final_stream_test.go function TestFilterFinalString (line 9) | func TestFilterFinalString(t *testing.T) { FILE: callbacks/callbacks.go type Handler (line 14) | type Handler interface type HandlerHaver (line 34) | type HandlerHaver interface FILE: callbacks/callbacks_unit_test.go type testHandlerHaver (line 15) | type testHandlerHaver struct method GetCallbackHandler (line 19) | func (t *testHandlerHaver) GetCallbackHandler() Handler { type mockHandler (line 23) | type mockHandler struct method HandleText (line 27) | func (m *mockHandler) HandleText(ctx context.Context, text string) { method HandleLLMStart (line 31) | func (m *mockHandler) HandleLLMStart(ctx context.Context, prompts []st... method HandleLLMGenerateContentStart (line 35) | func (m *mockHandler) HandleLLMGenerateContentStart(ctx context.Contex... method HandleLLMGenerateContentEnd (line 39) | func (m *mockHandler) HandleLLMGenerateContentEnd(ctx context.Context,... method HandleLLMError (line 43) | func (m *mockHandler) HandleLLMError(ctx context.Context, err error) { method HandleChainStart (line 47) | func (m *mockHandler) HandleChainStart(ctx context.Context, inputs map... method HandleChainEnd (line 51) | func (m *mockHandler) HandleChainEnd(ctx context.Context, outputs map[... method HandleChainError (line 55) | func (m *mockHandler) HandleChainError(ctx context.Context, err error) { method HandleToolStart (line 59) | func (m *mockHandler) HandleToolStart(ctx context.Context, input strin... method HandleToolEnd (line 63) | func (m *mockHandler) HandleToolEnd(ctx context.Context, output string) { method HandleToolError (line 67) | func (m *mockHandler) HandleToolError(ctx context.Context, err error) { method HandleAgentAction (line 71) | func (m *mockHandler) HandleAgentAction(ctx context.Context, action sc... method HandleAgentFinish (line 75) | func (m *mockHandler) HandleAgentFinish(ctx context.Context, finish sc... method HandleRetrieverStart (line 79) | func (m *mockHandler) HandleRetrieverStart(ctx context.Context, query ... method HandleRetrieverEnd (line 83) | func (m *mockHandler) HandleRetrieverEnd(ctx context.Context, query st... method HandleStreamingFunc (line 87) | func (m *mockHandler) HandleStreamingFunc(ctx context.Context, chunk [... function TestSimpleHandler (line 91) | func TestSimpleHandler(t *testing.T) { function TestCombiningHandler (line 121) | func TestCombiningHandler(t *testing.T) { function TestCombiningHandlerStructure (line 218) | func TestCombiningHandlerStructure(t *testing.T) { function TestHandlerInterfaceCompleteness (line 239) | func TestHandlerInterfaceCompleteness(t *testing.T) { function TestHandlerHaverInterface (line 252) | func TestHandlerHaverInterface(t *testing.T) { function TestComplexCombiningScenario (line 265) | func TestComplexCombiningScenario(t *testing.T) { function TestCombiningHandlerWithMixedTypes (line 289) | func TestCombiningHandlerWithMixedTypes(t *testing.T) { function TestCallbackTypes (line 310) | func TestCallbackTypes(t *testing.T) { FILE: callbacks/combining.go type CombiningHandler (line 11) | type CombiningHandler struct method HandleText (line 17) | func (l CombiningHandler) HandleText(ctx context.Context, text string) { method HandleLLMStart (line 23) | func (l CombiningHandler) HandleLLMStart(ctx context.Context, prompts ... method HandleLLMGenerateContentStart (line 29) | func (l CombiningHandler) HandleLLMGenerateContentStart(ctx context.Co... method HandleLLMGenerateContentEnd (line 35) | func (l CombiningHandler) HandleLLMGenerateContentEnd(ctx context.Cont... method HandleChainStart (line 41) | func (l CombiningHandler) HandleChainStart(ctx context.Context, inputs... method HandleChainEnd (line 47) | func (l CombiningHandler) HandleChainEnd(ctx context.Context, outputs ... method HandleToolStart (line 53) | func (l CombiningHandler) HandleToolStart(ctx context.Context, input s... method HandleToolEnd (line 59) | func (l CombiningHandler) HandleToolEnd(ctx context.Context, output st... method HandleAgentAction (line 65) | func (l CombiningHandler) HandleAgentAction(ctx context.Context, actio... method HandleAgentFinish (line 71) | func (l CombiningHandler) HandleAgentFinish(ctx context.Context, finis... method HandleRetrieverStart (line 77) | func (l CombiningHandler) HandleRetrieverStart(ctx context.Context, qu... method HandleRetrieverEnd (line 83) | func (l CombiningHandler) HandleRetrieverEnd(ctx context.Context, quer... method HandleStreamingFunc (line 89) | func (l CombiningHandler) HandleStreamingFunc(ctx context.Context, chu... method HandleChainError (line 95) | func (l CombiningHandler) HandleChainError(ctx context.Context, err er... method HandleLLMError (line 101) | func (l CombiningHandler) HandleLLMError(ctx context.Context, err erro... method HandleToolError (line 107) | func (l CombiningHandler) HandleToolError(ctx context.Context, err err... FILE: callbacks/log.go type LogHandler (line 14) | type LogHandler struct method HandleLLMGenerateContentStart (line 18) | func (l LogHandler) HandleLLMGenerateContentStart(_ context.Context, m... method HandleLLMGenerateContentEnd (line 33) | func (l LogHandler) HandleLLMGenerateContentEnd(_ context.Context, res... method HandleStreamingFunc (line 54) | func (l LogHandler) HandleStreamingFunc(_ context.Context, chunk []byt... method HandleText (line 58) | func (l LogHandler) HandleText(_ context.Context, text string) { method HandleLLMStart (line 62) | func (l LogHandler) HandleLLMStart(_ context.Context, prompts []string) { method HandleLLMError (line 66) | func (l LogHandler) HandleLLMError(_ context.Context, err error) { method HandleChainStart (line 70) | func (l LogHandler) HandleChainStart(_ context.Context, inputs map[str... method HandleChainEnd (line 74) | func (l LogHandler) HandleChainEnd(_ context.Context, outputs map[stri... method HandleChainError (line 78) | func (l LogHandler) HandleChainError(_ context.Context, err error) { method HandleToolStart (line 82) | func (l LogHandler) HandleToolStart(_ context.Context, input string) { method HandleToolEnd (line 86) | func (l LogHandler) HandleToolEnd(_ context.Context, output string) { method HandleToolError (line 90) | func (l LogHandler) HandleToolError(_ context.Context, err error) { method HandleAgentAction (line 94) | func (l LogHandler) HandleAgentAction(_ context.Context, action schema... method HandleAgentFinish (line 98) | func (l LogHandler) HandleAgentFinish(_ context.Context, finish schema... method HandleRetrieverStart (line 102) | func (l LogHandler) HandleRetrieverStart(_ context.Context, query stri... method HandleRetrieverEnd (line 106) | func (l LogHandler) HandleRetrieverEnd(_ context.Context, query string... function formatChainValues (line 110) | func formatChainValues(values map[string]any) string { function formatAgentAction (line 119) | func formatAgentAction(action schema.AgentAction) string { function removeNewLines (line 123) | func removeNewLines(s any) string { FILE: callbacks/log_stream.go type StreamLogHandler (line 10) | type StreamLogHandler struct method HandleStreamingFunc (line 16) | func (StreamLogHandler) HandleStreamingFunc(_ context.Context, chunk [... FILE: callbacks/simple.go type SimpleHandler (line 11) | type SimpleHandler struct method HandleText (line 15) | func (SimpleHandler) HandleText(context.Context, string) ... method HandleLLMStart (line 16) | func (SimpleHandler) HandleLLMStart(context.Context, []string) ... method HandleLLMGenerateContentStart (line 17) | func (SimpleHandler) HandleLLMGenerateContentStart(context.Context, []... method HandleLLMGenerateContentEnd (line 18) | func (SimpleHandler) HandleLLMGenerateContentEnd(context.Context, *llm... method HandleLLMError (line 19) | func (SimpleHandler) HandleLLMError(context.Context, error) ... method HandleChainStart (line 20) | func (SimpleHandler) HandleChainStart(context.Context, map[string]any)... method HandleChainEnd (line 21) | func (SimpleHandler) HandleChainEnd(context.Context, map[string]any) ... method HandleChainError (line 22) | func (SimpleHandler) HandleChainError(context.Context, error) ... method HandleToolStart (line 23) | func (SimpleHandler) HandleToolStart(context.Context, string) ... method HandleToolEnd (line 24) | func (SimpleHandler) HandleToolEnd(context.Context, string) ... method HandleToolError (line 25) | func (SimpleHandler) HandleToolError(context.Context, error) ... method HandleAgentAction (line 26) | func (SimpleHandler) HandleAgentAction(context.Context, schema.AgentAc... method HandleAgentFinish (line 27) | func (SimpleHandler) HandleAgentFinish(context.Context, schema.AgentFi... method HandleRetrieverStart (line 28) | func (SimpleHandler) HandleRetrieverStart(context.Context, string) ... method HandleRetrieverEnd (line 29) | func (SimpleHandler) HandleRetrieverEnd(context.Context, string, []sch... method HandleStreamingFunc (line 30) | func (SimpleHandler) HandleStreamingFunc(context.Context, []byte) ... FILE: chains/api.go type HTTPRequest (line 28) | type HTTPRequest interface type APIChain (line 32) | type APIChain struct method Call (line 60) | func (a APIChain) Call(ctx context.Context, values map[string]any, opt... method GetMemory (line 112) | func (a APIChain) GetMemory() schema.Memory { //nolint:ireturn method GetInputKeys (line 120) | func (a APIChain) GetInputKeys() []string { method GetOutputKeys (line 128) | func (a APIChain) GetOutputKeys() []string { method runRequest (line 132) | func (a APIChain) runRequest( function NewAPIChain (line 42) | func NewAPIChain(llm llms.Model, request HTTPRequest) APIChain { FILE: chains/api_test.go constant MeteoDocs (line 14) | MeteoDocs = `BASE URL: https://api.open-meteo.com/ function TestAPI (line 47) | func TestAPI(t *testing.T) { FILE: chains/chains.go constant _intermediateStepsOutputKey (line 13) | _intermediateStepsOutputKey = "intermediateSteps" type Chain (line 16) | type Chain interface function Call (line 30) | func Call(ctx context.Context, c Chain, inputValues map[string]any, opti... function callChain (line 69) | func callChain( function Run (line 92) | func Run(ctx context.Context, c Chain, input any, options ...ChainCallOp... function Predict (line 135) | func Predict(ctx context.Context, c Chain, inputValues map[string]any, o... constant _defaultApplyMaxNumberWorkers (line 154) | _defaultApplyMaxNumberWorkers = 5 type applyInputJob (line 156) | type applyInputJob struct type applyResult (line 161) | type applyResult struct function Apply (line 168) | func Apply(ctx context.Context, c Chain, inputValues []map[string]any, m... function sendApplyInputJobs (line 210) | func sendApplyInputJobs(inputJobs chan applyInputJob, inputValues []map[... function getApplyResults (line 220) | func getApplyResults(ctx context.Context, resultsChan chan applyResult, ... function validateInputs (line 237) | func validateInputs(c Chain, inputValues map[string]any) error { function validateOutputs (line 246) | func validateOutputs(c Chain, outputValues map[string]any) error { function getChainCallbackHandler (line 255) | func getChainCallbackHandler(c Chain) callbacks.Handler { FILE: chains/chains_test.go type testLanguageModel (line 16) | type testLanguageModel struct method Call (line 38) | func (l *testLanguageModel) Call(ctx context.Context, prompt string, o... method GenerateContent (line 42) | func (l *testLanguageModel) GenerateContent(_ context.Context, mc []ll... type stringPromptValue (line 26) | type stringPromptValue struct method String (line 30) | func (spv stringPromptValue) String() string { method Messages (line 34) | func (spv stringPromptValue) Messages() []llms.ChatMessage { function TestApply (line 77) | func TestApply(t *testing.T) { function TestApplyWithCanceledContext (line 96) | func TestApplyWithCanceledContext(t *testing.T) { FILE: chains/chains_unit_test.go type mockChain (line 17) | type mockChain struct method Call (line 24) | func (m *mockChain) Call(ctx context.Context, inputs map[string]any, o... method GetMemory (line 32) | func (m *mockChain) GetMemory() schema.Memory { method GetInputKeys (line 39) | func (m *mockChain) GetInputKeys() []string { method GetOutputKeys (line 43) | func (m *mockChain) GetOutputKeys() []string { type mockMemory (line 47) | type mockMemory struct method MemoryVariables (line 51) | func (m *mockMemory) MemoryVariables(ctx context.Context) []string { method LoadMemoryVariables (line 56) | func (m *mockMemory) LoadMemoryVariables(ctx context.Context, inputs m... method SaveContext (line 64) | func (m *mockMemory) SaveContext(ctx context.Context, inputs, outputs ... method Clear (line 69) | func (m *mockMemory) Clear(ctx context.Context) error { method GetMemoryKey (line 74) | func (m *mockMemory) GetMemoryKey(ctx context.Context) string { function TestValidateInputs (line 79) | func TestValidateInputs(t *testing.T) { function TestValidateOutputs (line 133) | func TestValidateOutputs(t *testing.T) { function TestGetChainCallbackHandler (line 180) | func TestGetChainCallbackHandler(t *testing.T) { type mockHandlerHaver (line 200) | type mockHandlerHaver struct method GetCallbackHandler (line 204) | func (m *mockHandlerHaver) GetCallbackHandler() callbacks.Handler { method Call (line 208) | func (m *mockHandlerHaver) Call(ctx context.Context, inputs map[string... method GetMemory (line 212) | func (m *mockHandlerHaver) GetMemory() schema.Memory { method GetInputKeys (line 216) | func (m *mockHandlerHaver) GetInputKeys() []string { method GetOutputKeys (line 220) | func (m *mockHandlerHaver) GetOutputKeys() []string { function TestSendApplyInputJobs (line 224) | func TestSendApplyInputJobs(t *testing.T) { function TestConstants (line 253) | func TestConstants(t *testing.T) { function TestErrorConstants (line 260) | func TestErrorConstants(t *testing.T) { function TestChainInterface (line 337) | func TestChainInterface(t *testing.T) { function TestRunErrors (line 344) | func TestRunErrors(t *testing.T) { function TestPredictErrors (line 405) | func TestPredictErrors(t *testing.T) { function TestCallChainWithValidationErrors (line 456) | func TestCallChainWithValidationErrors(t *testing.T) { function TestApplyStructs (line 514) | func TestApplyStructs(t *testing.T) { function TestApplyWithZeroMaxWorkers (line 538) | func TestApplyWithZeroMaxWorkers(t *testing.T) { function TestRunWithMemoryKeys (line 567) | func TestRunWithMemoryKeys(t *testing.T) { FILE: chains/constitution/constitutional.go type pair (line 22) | type pair struct type ConstitutionalPrinciple (line 27) | type ConstitutionalPrinciple struct type Constitutional (line 35) | type Constitutional struct method Call (line 96) | func (c *Constitutional) Call(ctx context.Context, inputs map[string]any, method processCritiquesAndRevisions (line 128) | func (c *Constitutional) processCritiquesAndRevisions(ctx context.Cont... method GetMemory (line 199) | func (c *Constitutional) GetMemory() schema.Memory { method GetInputKeys (line 203) | func (c *Constitutional) GetInputKeys() []string { method GetOutputKeys (line 207) | func (c *Constitutional) GetOutputKeys() []string { function NewConstitutionalPrinciple (line 46) | func NewConstitutionalPrinciple(critique, revision string, names ...stri... function NewConstitutional (line 61) | func NewConstitutional(llm llms.Model, chain chains.LLMChain, function parseCritique (line 188) | func parseCritique(rawCritique string) string { FILE: chains/constitution/constitutional_test.go function hasExistingRecording (line 20) | func hasExistingRecording(t *testing.T) bool { function TestConstitutionCritiqueParsing (line 28) | func TestConstitutionCritiqueParsing(t *testing.T) { function TestConstitutionalChain (line 51) | func TestConstitutionalChain(t *testing.T) { FILE: chains/constitution/prompts.go type constitutionalExample (line 5) | type constitutionalExample struct function getConstitutionalExample (line 16) | func getConstitutionalExample() []constitutionalExample { function initCritiqueRevision (line 104) | func initCritiqueRevision() (*prompts.FewShotPrompt, *prompts.FewShotPro... FILE: chains/constitutional.go type ConstitutionalPrinciple (line 354) | type ConstitutionalPrinciple struct type Pair (line 360) | type Pair struct type ConstitutionalExample (line 364) | type ConstitutionalExample struct type Constitutional (line 373) | type Constitutional struct method Call (line 595) | func (c *Constitutional) Call(ctx context.Context, inputs map[string]a... method processCritiquesAndRevisions (line 627) | func (c *Constitutional) processCritiquesAndRevisions(ctx context.Cont... method GetMemory (line 702) | func (c *Constitutional) GetMemory() schema.Memory { method GetInputKeys (line 706) | func (c *Constitutional) GetInputKeys() []string { method GetOutputKeys (line 710) | func (c *Constitutional) GetOutputKeys() []string { function getConstitutionalExample (line 385) | func getConstitutionalExample() []ConstitutionalExample { function initCritiqueRevision (line 473) | func initCritiqueRevision() (*prompts.FewShotPrompt, *prompts.FewShotPro... function NewConstitutionalPrinciple (line 545) | func NewConstitutionalPrinciple(critique, revision string, names ...stri... function NewConstitutional (line 560) | func NewConstitutional(llm llms.Model, chain LLMChain, constitutionalPri... function parseCritique (line 691) | func parseCritique(rawCritique string) string { FILE: chains/constitutional_test.go function TestConstitutionCritiqueParsing (line 16) | func TestConstitutionCritiqueParsing(t *testing.T) { function TestConstitutionalChainBasic (line 39) | func TestConstitutionalChainBasic(t *testing.T) { FILE: chains/conversation.go constant _conversationTemplate (line 11) | _conversationTemplate = `The following is a friendly conversation betwee... function NewConversation (line 18) | func NewConversation(llm llms.Model, memory schema.Memory) LLMChain { FILE: chains/conversation_test.go function TestConversation (line 20) | func TestConversation(t *testing.T) { function TestConversationWithZepMemory (line 54) | func TestConversationWithZepMemory(t *testing.T) { function TestConversationWithChatLLM (line 102) | func TestConversationWithChatLLM(t *testing.T) { FILE: chains/conversational_retrieval_qa.go constant _conversationalRetrievalQADefaultInputKey (line 12) | _conversationalRetrievalQADefaultInputKey = "question" constant _conversationalRetrievalQADefaultSourceDocumentKey (line 13) | _conversationalRetrievalQADefaultSourceDocumentKey = "source_documents" constant _conversationalRetrievalQADefaultGeneratedQuestionKey (line 14) | _conversationalRetrievalQADefaultGeneratedQuestionKey = "generated_quest... type ConversationalRetrievalQA (line 18) | type ConversationalRetrievalQA struct method Call (line 91) | func (c ConversationalRetrievalQA) Call(ctx context.Context, values ma... method GetMemory (line 142) | func (c ConversationalRetrievalQA) GetMemory() schema.Memory { method GetInputKeys (line 146) | func (c ConversationalRetrievalQA) GetInputKeys() []string { method GetOutputKeys (line 150) | func (c ConversationalRetrievalQA) GetOutputKeys() []string { method getQuestion (line 159) | func (c ConversationalRetrievalQA) getQuestion( method rephraseQuestion (line 188) | func (c ConversationalRetrievalQA) rephraseQuestion(question string, n... function NewConversationalRetrievalQA (line 57) | func NewConversationalRetrievalQA( function NewConversationalRetrievalQAFromLLM (line 76) | func NewConversationalRetrievalQAFromLLM( FILE: chains/conversational_retrieval_qa_test.go type testConversationalRetriever (line 16) | type testConversationalRetriever struct method GetRelevantDocuments (line 18) | func (t testConversationalRetriever) GetRelevantDocuments(_ context.Co... function createOpenAILLMForConversationalRetrievalQA (line 62) | func createOpenAILLMForConversationalRetrievalQA(t *testing.T) *openai.L... function TestConversationalRetrievalQA (line 78) | func TestConversationalRetrievalQA(t *testing.T) { function TestConversationalRetrievalQAWithReturnMessages (line 105) | func TestConversationalRetrievalQAWithReturnMessages(t *testing.T) { function TestConversationalRetrievalQAFromLLM (line 132) | func TestConversationalRetrievalQAFromLLM(t *testing.T) { function TestConversationalRetrievalQAFromLLMWithConversationTokenBuffer (line 151) | func TestConversationalRetrievalQAFromLLMWithConversationTokenBuffer(t *... FILE: chains/llm.go constant _llmChainDefaultOutputKey (line 14) | _llmChainDefaultOutputKey = "text" type LLMChain (line 16) | type LLMChain struct method Call (line 53) | func (c LLMChain) Call(ctx context.Context, values map[string]any, opt... method GetMemory (line 73) | func (c LLMChain) GetMemory() schema.Memory { //nolint:ireturn method GetCallbackHandler (line 77) | func (c LLMChain) GetCallbackHandler() callbacks.Handler { //nolint:ir... method GetInputKeys (line 82) | func (c LLMChain) GetInputKeys() []string { method GetOutputKeys (line 87) | func (c LLMChain) GetOutputKeys() []string { function NewLLMChain (line 32) | func NewLLMChain(llm llms.Model, prompt prompts.FormatPrompter, opts ...... FILE: chains/llm_azure_test.go function TestLLMChainAzure (line 16) | func TestLLMChainAzure(t *testing.T) { FILE: chains/llm_math.go type LLMMathChain (line 22) | type LLMMathChain struct method Call (line 37) | func (c LLMMathChain) Call(ctx context.Context, values map[string]any,... method GetMemory (line 52) | func (c LLMMathChain) GetMemory() schema.Memory { //nolint:ireturn method GetInputKeys (line 56) | func (c LLMMathChain) GetInputKeys() []string { method GetOutputKeys (line 60) | func (c LLMMathChain) GetOutputKeys() []string { method processLLMResult (line 66) | func (c LLMMathChain) processLLMResult(llmOutput string) (string, erro... method evaluateExpression (line 83) | func (c LLMMathChain) evaluateExpression(expression string) (string, e... function NewLLMMathChain (line 28) | func NewLLMMathChain(llm llms.Model) LLMMathChain { FILE: chains/llm_math_test.go function TestLLMMath (line 14) | func TestLLMMath(t *testing.T) { FILE: chains/llm_test.go function hasExistingRecording (line 21) | func hasExistingRecording(t *testing.T) bool { function TestLLMChain (line 29) | func TestLLMChain(t *testing.T) { function TestLLMChainWithChatPromptTemplate (line 68) | func TestLLMChainWithChatPromptTemplate(t *testing.T) { function TestLLMChainWithGoogleAI (line 87) | func TestLLMChainWithGoogleAI(t *testing.T) { FILE: chains/map_reduce.go type MapReduceDocuments (line 14) | type MapReduceDocuments struct method Call (line 59) | func (c MapReduceDocuments) Call(ctx context.Context, values map[strin... method getInputVariable (line 84) | func (c MapReduceDocuments) getInputVariable(givenInputName string, ch... method maybeAddIntermediateSteps (line 92) | func (c MapReduceDocuments) maybeAddIntermediateSteps(result map[strin... method getApplyInputs (line 101) | func (c MapReduceDocuments) getApplyInputs(values map[string]any, docs... method mapResultsToReduceInputs (line 113) | func (c MapReduceDocuments) mapResultsToReduceInputs( method copyInputValuesWithoutInputKey (line 138) | func (c MapReduceDocuments) copyInputValuesWithoutInputKey(inputValues... method GetInputKeys (line 145) | func (c MapReduceDocuments) GetInputKeys() []string { method GetOutputKeys (line 168) | func (c MapReduceDocuments) GetOutputKeys() []string { method GetMemory (line 177) | func (c MapReduceDocuments) GetMemory() schema.Memory { //nolint:ireturn function NewMapReduceDocuments (line 46) | func NewMapReduceDocuments(llmChain *LLMChain, reduceChain Chain) MapRed... FILE: chains/map_reduce_test.go function TestMapReduceInputVariables (line 12) | func TestMapReduceInputVariables(t *testing.T) { function TestMapReduce (line 34) | func TestMapReduce(t *testing.T) { FILE: chains/map_rerank_documents.go constant _mapRerankDocumentsDefaultDocumentTemplate (line 16) | _mapRerankDocumentsDefaultDocumentTemplate = "{{.page_content}}" constant _mapRerankDocumentsDefaultRankKey (line 17) | _mapRerankDocumentsDefaultRankKey = "score" constant _mapRerankDocumentsDefaultAnswerKey (line 18) | _mapRerankDocumentsDefaultAnswerKey = "answer" type MapRerankDocuments (line 21) | type MapRerankDocuments struct method Call (line 70) | func (c MapRerankDocuments) Call(ctx context.Context, values map[strin... method getInputVariable (line 118) | func (c MapRerankDocuments) getInputVariable(givenInputName string, ch... method getApplyInputs (line 127) | func (c MapRerankDocuments) getApplyInputs(values map[string]any, docs... method copyInputValuesWithoutInputKey (line 140) | func (c MapRerankDocuments) copyInputValuesWithoutInputKey(inputValues... method parseMapResults (line 148) | func (c MapRerankDocuments) parseMapResults(inputs map[string]string) ... method formatOutputs (line 159) | func (c MapRerankDocuments) formatOutputs(outputs []map[string]any) ma... method GetInputKeys (line 179) | func (c MapRerankDocuments) GetInputKeys() []string { method GetOutputKeys (line 192) | func (c MapRerankDocuments) GetOutputKeys() []string { method GetMemory (line 203) | func (c MapRerankDocuments) GetMemory() schema.Memory { //nolint:ireturn function NewMapRerankDocuments (line 53) | func NewMapRerankDocuments(mapRerankLLMChain *LLMChain) *MapRerankDocume... FILE: chains/map_rerank_documents_test.go function TestMapRerankInputVariables (line 12) | func TestMapRerankInputVariables(t *testing.T) { function TestMapRerankDocumentsCall (line 32) | func TestMapRerankDocumentsCall(t *testing.T) { FILE: chains/options.go type ChainCallOption (line 11) | type ChainCallOption type chainCallOption (line 21) | type chainCallOption struct function WithModel (line 71) | func WithModel(model string) ChainCallOption { function WithMaxTokens (line 79) | func WithMaxTokens(maxTokens int) ChainCallOption { function WithTemperature (line 87) | func WithTemperature(temperature float64) ChainCallOption { function WithStreamingFunc (line 95) | func WithStreamingFunc(streamingFunc func(ctx context.Context, chunk []b... function WithTopK (line 102) | func WithTopK(topK int) ChainCallOption { function WithTopP (line 110) | func WithTopP(topP float64) ChainCallOption { function WithSeed (line 118) | func WithSeed(seed int) ChainCallOption { function WithMinLength (line 126) | func WithMinLength(minLength int) ChainCallOption { function WithMaxLength (line 134) | func WithMaxLength(maxLength int) ChainCallOption { function WithRepetitionPenalty (line 142) | func WithRepetitionPenalty(repetitionPenalty float64) ChainCallOption { function WithStopWords (line 150) | func WithStopWords(stopWords []string) ChainCallOption { function WithCallback (line 158) | func WithCallback(callbackHandler callbacks.Handler) ChainCallOption { function GetLLMCallOptions (line 167) | func GetLLMCallOptions(options ...ChainCallOption) []llms.CallOption { /... function getLLMCallOptions (line 217) | func getLLMCallOptions(options ...ChainCallOption) []llms.CallOption { FILE: chains/prompt_selector.go type PromptSelector (line 10) | type PromptSelector interface type ConditionalPromptSelector (line 16) | type ConditionalPromptSelector struct method GetPrompt (line 26) | func (s ConditionalPromptSelector) GetPrompt(llm llms.Model) prompts.P... FILE: chains/question_answering.go constant _defaultStuffQATemplate (line 9) | _defaultStuffQATemplate = `Use the following pieces of context to answer... constant _defaultRefineQATemplate (line 16) | _defaultRefineQATemplate = `The original question is as follows: {{.ques... constant _defaultMapReduceGetInformationQATemplate (line 27) | _defaultMapReduceGetInformationQATemplate = `Use the following portion o... constant _defaultMapReduceCombineQATemplate (line 34) | _defaultMapReduceCombineQATemplate = `Given the following extracted part... constant _defaultMapRerankTemplate (line 44) | _defaultMapRerankTemplate = `Use the following pieces of context to answ... constant _defaultCondenseQuestionTemplate (line 87) | _defaultCondenseQuestionTemplate = `Given the following conversation and... function LoadCondenseQuestionGenerator (line 95) | func LoadCondenseQuestionGenerator(llm llms.Model) *LLMChain { function LoadStuffQA (line 104) | func LoadStuffQA(llm llms.Model) StuffDocuments { function LoadRefineQA (line 121) | func LoadRefineQA(llm llms.Model) RefineDocuments { function LoadMapReduceQA (line 139) | func LoadMapReduceQA(llm llms.Model) MapReduceDocuments { function LoadMapRerankQA (line 159) | func LoadMapRerankQA(llm llms.Model) MapRerankDocuments { FILE: chains/question_answering_test.go function createOpenAILLMForQA (line 15) | func createOpenAILLMForQA(t *testing.T) *openai.LLM { function TestRefineQA (line 41) | func TestRefineQA(t *testing.T) { function TestMapReduceQA (line 63) | func TestMapReduceQA(t *testing.T) { function TestMapRerankQA (line 84) | func TestMapRerankQA(t *testing.T) { FILE: chains/refine_documents.go constant _refineDocumentsDefaultDocumentTemplate (line 13) | _refineDocumentsDefaultDocumentTemplate = "{{.page_content}}" constant _refineDocumentsDefaultInitialResponseName (line 14) | _refineDocumentsDefaultInitialResponseName = "existing_answer" type RefineDocuments (line 21) | type RefineDocuments struct method Call (line 60) | func (c RefineDocuments) Call(ctx context.Context, values map[string]a... method constructInitialInputs (line 106) | func (c RefineDocuments) constructInitialInputs(doc schema.Document, r... method constructRefineInputs (line 110) | func (c RefineDocuments) constructRefineInputs(doc schema.Document, la... method getBaseInputs (line 122) | func (c RefineDocuments) getBaseInputs(doc schema.Document, rest map[s... method GetInputKeys (line 153) | func (c RefineDocuments) GetInputKeys() []string { method GetOutputKeys (line 165) | func (c RefineDocuments) GetOutputKeys() []string { method GetMemory (line 169) | func (c RefineDocuments) GetMemory() schema.Memory { //nolint:ireturn function NewRefineDocuments (line 44) | func NewRefineDocuments(initialLLMChain, refineLLMChain *LLMChain) Refin... FILE: chains/retrieval_qa.go constant _retrievalQADefaultInputKey (line 13) | _retrievalQADefaultInputKey = "query" constant _retrievalQADefaultSourceDocumentKey (line 14) | _retrievalQADefaultSourceDocumentKey = "source_documents" type RetrievalQA (line 21) | type RetrievalQA struct method Call (line 62) | func (c RetrievalQA) Call(ctx context.Context, values map[string]any, ... method GetMemory (line 88) | func (c RetrievalQA) GetMemory() schema.Memory { //nolint:ireturn method GetInputKeys (line 92) | func (c RetrievalQA) GetInputKeys() []string { method GetOutputKeys (line 96) | func (c RetrievalQA) GetOutputKeys() []string { function NewRetrievalQA (line 42) | func NewRetrievalQA(combineDocumentsChain Chain, retriever schema.Retrie... function NewRetrievalQAFromLLM (line 53) | func NewRetrievalQAFromLLM(llm llms.Model, retriever schema.Retriever) R... FILE: chains/retrieval_qa_test.go type testRetriever (line 16) | type testRetriever struct method GetRelevantDocuments (line 20) | func (r testRetriever) GetRelevantDocuments(_ context.Context, _ strin... function createOpenAILLMForRetrieval (line 28) | func createOpenAILLMForRetrieval(t *testing.T) *openai.LLM { function TestRetrievalQA (line 54) | func TestRetrievalQA(t *testing.T) { function TestRetrievalQAFromLLM (line 74) | func TestRetrievalQAFromLLM(t *testing.T) { FILE: chains/sequential.go constant delimiter (line 15) | delimiter = "," type SequentialChain (line 19) | type SequentialChain struct method validateSeqChain (line 45) | func (c *SequentialChain) validateSeqChain() error { method Call (line 101) | func (c *SequentialChain) Call(ctx context.Context, inputs map[string]... method GetMemory (line 116) | func (c *SequentialChain) GetMemory() schema.Memory { method GetInputKeys (line 121) | func (c *SequentialChain) GetInputKeys() []string { method GetOutputKeys (line 126) | func (c *SequentialChain) GetOutputKeys() []string { function NewSequentialChain (line 26) | func NewSequentialChain(chains []Chain, inputKeys []string, outputKeys [... constant input (line 131) | input = "input" constant output (line 132) | output = "output" type SimpleSequentialChain (line 143) | type SimpleSequentialChain struct method Call (line 178) | func (c *SimpleSequentialChain) Call(ctx context.Context, inputs map[s... method GetMemory (line 191) | func (c *SimpleSequentialChain) GetMemory() schema.Memory { method GetInputKeys (line 196) | func (c *SimpleSequentialChain) GetInputKeys() []string { method GetOutputKeys (line 201) | func (c *SimpleSequentialChain) GetOutputKeys() []string { function NewSimpleSequentialChain (line 148) | func NewSimpleSequentialChain(chains []Chain) (*SimpleSequentialChain, e... function validateSimpleSeq (line 156) | func validateSimpleSeq(chains []Chain) error { type SequentialChainOption (line 205) | type SequentialChainOption function WithSeqChainMemory (line 207) | func WithSeqChainMemory(memory schema.Memory) SequentialChainOption { FILE: chains/sequential_test.go function TestSimpleSequential (line 17) | func TestSimpleSequential(t *testing.T) { function TestSimpleSequentialErrors (line 43) | func TestSimpleSequentialErrors(t *testing.T) { function TestSequentialChain (line 85) | func TestSequentialChain(t *testing.T) { function TestSequentialChainErrors (line 126) | func TestSequentialChainErrors(t *testing.T) { type testLLMChain (line 200) | type testLLMChain struct method Call (line 209) | func (c *testLLMChain) Call(_ context.Context, _ map[string]any, _ ...... method GetMemory (line 214) | func (c *testLLMChain) GetMemory() schema.Memory { method GetInputKeys (line 219) | func (c *testLLMChain) GetInputKeys() []string { method GetOutputKeys (line 224) | func (c *testLLMChain) GetOutputKeys() []string { FILE: chains/sql_database.go constant _defaultSQLTemplate (line 16) | _defaultSQLTemplate = `Given an input question, first create a syntactic... constant _defaultSQLSuffix (line 32) | _defaultSQLSuffix = `Only use the following tables: constant _sqlChainDefaultInputKeyQuery (line 38) | _sqlChainDefaultInputKeyQuery = "query" constant _sqlChainDefaultInputKeyTableNames (line 39) | _sqlChainDefaultInputKeyTableNames = "table_names_to_use" constant _sqlChainDefaultOutputKey (line 40) | _sqlChainDefaultOutputKey = "result" type SQLDatabaseChain (line 44) | type SQLDatabaseChain struct method Call (line 77) | func (s SQLDatabaseChain) Call(ctx context.Context, inputs map[string]... method GetMemory (line 145) | func (s SQLDatabaseChain) GetMemory() schema.Memory { //nolint:ireturn method GetInputKeys (line 149) | func (s SQLDatabaseChain) GetInputKeys() []string { method GetOutputKeys (line 153) | func (s SQLDatabaseChain) GetOutputKeys() []string { function NewSQLDatabaseChain (line 53) | func NewSQLDatabaseChain(llm llms.Model, topK int, database *sqldatabase... function extractSQLQuery (line 162) | func extractSQLQuery(rawOut string) string { FILE: chains/sql_database_test.go function TestSQLDatabaseChain_Call (line 16) | func TestSQLDatabaseChain_Call(t *testing.T) { function TestExtractSQLQuery (line 66) | func TestExtractSQLQuery(t *testing.T) { FILE: chains/stuff_documents.go constant _combineDocumentsDefaultInputKey (line 12) | _combineDocumentsDefaultInputKey = "input_documents" constant _combineDocumentsDefaultOutputKey (line 13) | _combineDocumentsDefaultOutputKey = "text" constant _combineDocumentsDefaultDocumentVariableName (line 14) | _combineDocumentsDefaultDocumentVariableName = "context" constant _stuffDocumentsDefaultSeparator (line 15) | _stuffDocumentsDefaultSeparator = "\n\n" type StuffDocuments (line 23) | type StuffDocuments struct method Call (line 54) | func (c StuffDocuments) Call( method GetMemory (line 72) | func (c StuffDocuments) GetMemory() schema.Memory { method GetInputKeys (line 77) | func (c StuffDocuments) GetInputKeys() []string { method GetOutputKeys (line 82) | func (c StuffDocuments) GetOutputKeys() []string { method joinDocuments (line 87) | func (c StuffDocuments) joinDocuments(docs []schema.Document) string { function NewStuffDocuments (line 43) | func NewStuffDocuments(llmChain *LLMChain) StuffDocuments { FILE: chains/stuff_documents_test.go function TestStuffDocuments (line 15) | func TestStuffDocuments(t *testing.T) { function TestStuffDocuments_joinDocs (line 65) | func TestStuffDocuments_joinDocs(t *testing.T) { FILE: chains/summarization.go constant _stuffSummarizationTemplate (line 8) | _stuffSummarizationTemplate = `Write a concise summary of the following: constant _refineSummarizationTemplate (line 16) | _refineSummarizationTemplate = `Your job is to produce a final concise s... function LoadStuffSummarization (line 31) | func LoadStuffSummarization(llm llms.Model) StuffDocuments { function LoadRefineSummarization (line 41) | func LoadRefineSummarization(llm llms.Model) RefineDocuments { function LoadMapReduceSummarization (line 54) | func LoadMapReduceSummarization(llm llms.Model) MapReduceDocuments { FILE: chains/summarization_test.go function loadTestData (line 17) | func loadTestData(t *testing.T) []schema.Document { function createOpenAILLMForTest (line 34) | func createOpenAILLMForTest(t *testing.T) *openai.LLM { function TestStuffSummarization (line 60) | func TestStuffSummarization(t *testing.T) { function TestRefineSummarization (line 76) | func TestRefineSummarization(t *testing.T) { function TestMapReduceSummarization (line 92) | func TestMapReduceSummarization(t *testing.T) { FILE: chains/transform.go type TransformFunc (line 11) | type TransformFunc type Transform (line 14) | type Transform struct method Call (line 35) | func (c Transform) Call(ctx context.Context, inputs map[string]any, op... method GetMemory (line 40) | func (c Transform) GetMemory() schema.Memory { method GetInputKeys (line 45) | func (c Transform) GetInputKeys() []string { method GetOutputKeys (line 50) | func (c Transform) GetOutputKeys() []string { function NewTransform (line 25) | func NewTransform(f TransformFunc, inputVariables []string, outputVariab... FILE: chains/transform_test.go function TestTransform (line 11) | func TestTransform(t *testing.T) { FILE: docs/.eslintrc.js constant OFF (line 10) | const OFF = 0; constant WARNING (line 11) | const WARNING = 1; constant ERROR (line 12) | const ERROR = 2; FILE: docs/code-block-loader.js function webpackLoader (line 14) | async function webpackLoader(content, map, meta) { FILE: docs/docusaurus.config.js method sidebarItemsGenerator (line 75) | async sidebarItemsGenerator({ FILE: docs/search-indexer.go type SearchEntry (line 27) | type SearchEntry struct type SearchIndex (line 40) | type SearchIndex struct type IndexMeta (line 46) | type IndexMeta struct type Config (line 54) | type Config struct function main (line 72) | func main() { function parseFlags (line 102) | func parseFlags() Config { type Indexer (line 118) | type Indexer struct method ParseDocs (line 133) | func (idx *Indexer) ParseDocs() error { method parseMarkdownFile (line 180) | func (idx *Indexer) parseMarkdownFile(md goldmark.Markdown, filePath s... method generateDocURL (line 218) | func (idx *Indexer) generateDocURL(relPath string) string { method extractTitle (line 236) | func (idx *Indexer) extractTitle(metaData map[string]interface{}, relP... method cleanMarkdownContent (line 271) | func (idx *Indexer) cleanMarkdownContent(content string) string { method extractKeywords (line 302) | func (idx *Indexer) extractKeywords(content string) []string { method ParseGoSource (line 346) | func (idx *Indexer) ParseGoSource() error { method parseGoFile (line 427) | func (idx *Indexer) parseGoFile(fileSet *token.FileSet, filePath strin... method createFunctionEntry (line 494) | func (idx *Indexer) createFunctionEntry(fn *doc.Func, packagePath, pac... method createTypeEntry (line 513) | func (idx *Indexer) createTypeEntry(typ *doc.Type, packagePath, packag... method createMethodEntry (line 532) | func (idx *Indexer) createMethodEntry(method *doc.Func, typeName, pack... method WriteIndex (line 551) | func (idx *Indexer) WriteIndex() error { function NewIndexer (line 125) | func NewIndexer(config Config) *Indexer { function copyFile (line 622) | func copyFile(src, dst string) error { function convertMetadata (line 639) | func convertMetadata(metaData map[string]interface{}) map[string]string { function formatFuncSignature (line 649) | func formatFuncSignature(fn *doc.Func) string { function formatTypeSignature (line 659) | func formatTypeSignature(typ *doc.Type) string { function isCommonWord (line 668) | func isCommonWord(word string) bool { FILE: docs/src/pages/index.js function Home (line 13) | function Home() { FILE: docs/src/theme/CodeBlock/index.js function CodeBlockWrapper (line 5) | function CodeBlockWrapper({ children, ...props }) { FILE: docs/src/theme/SearchBar/index.js function SearchBar (line 6) | function SearchBar() { FILE: documentloaders/assemblyai.go type TranscriptFormat (line 19) | type TranscriptFormat constant TranscriptFormatText (line 23) | TranscriptFormatText TranscriptFormat = iota constant TranscriptFormatSentences (line 26) | TranscriptFormatSentences constant TranscriptFormatParagraphs (line 29) | TranscriptFormatParagraphs constant TranscriptFormatSubtitlesSRT (line 32) | TranscriptFormatSubtitlesSRT constant TranscriptFormatSubtitlesVTT (line 35) | TranscriptFormatSubtitlesVTT type AssemblyAIAudioTranscriptLoader (line 46) | type AssemblyAIAudioTranscriptLoader struct method Load (line 113) | func (a *AssemblyAIAudioTranscriptLoader) Load(ctx context.Context) ([... method transcribe (line 129) | func (a *AssemblyAIAudioTranscriptLoader) transcribe(ctx context.Conte... method formatTranscript (line 143) | func (a *AssemblyAIAudioTranscriptLoader) formatTranscript(ctx context... method LoadAndSplit (line 241) | func (a *AssemblyAIAudioTranscriptLoader) LoadAndSplit(ctx context.Con... type AssemblyAIOption (line 65) | type AssemblyAIOption function NewAssemblyAIAudioTranscript (line 69) | func NewAssemblyAIAudioTranscript(apiKey string, opts ...AssemblyAIOptio... function WithAudioURL (line 84) | func WithAudioURL(url string) AssemblyAIOption { function WithAudioReader (line 91) | func WithAudioReader(r io.Reader) AssemblyAIOption { function WithTranscriptFormat (line 98) | func WithTranscriptFormat(format TranscriptFormat) AssemblyAIOption { function WithTranscriptParams (line 105) | func WithTranscriptParams(params *assemblyai.TranscriptOptionalParams) A... function documentsFromSentences (line 185) | func documentsFromSentences(sentences []assemblyai.TranscriptSentence) (... function documentsFromParagraphs (line 203) | func documentsFromParagraphs(paragraphs []assemblyai.TranscriptParagraph... function toMetadata (line 222) | func toMetadata(obj any) (map[string]any, error) { FILE: documentloaders/assemblyai_test.go function TestAssemblyAIAudioTranscriptLoader_Load (line 12) | func TestAssemblyAIAudioTranscriptLoader_Load(t *testing.T) { function TestAssemblyAIAudioTranscriptLoader_toMetadata (line 47) | func TestAssemblyAIAudioTranscriptLoader_toMetadata(t *testing.T) { FILE: documentloaders/csv.go type CSV (line 17) | type CSV struct method Load (line 33) | func (c CSV) Load(_ context.Context) ([]schema.Document, error) { method LoadAndSplit (line 75) | func (c CSV) LoadAndSplit(ctx context.Context, splitter textsplitter.T... function NewCSV (line 25) | func NewCSV(r io.Reader, columns ...string) CSV { FILE: documentloaders/csv_test.go function TestCSVLoader (line 12) | func TestCSVLoader(t *testing.T) { function TestCSVLoaderWithFilteringColumns (line 34) | func TestCSVLoaderWithFilteringColumns(t *testing.T) { FILE: documentloaders/directory.go type Option (line 16) | type Option function WithRoot (line 18) | func WithRoot(root string) Option { function WithMaxDepth (line 22) | func WithMaxDepth(d int) Option { function WithAllowExts (line 26) | func WithAllowExts(exts ...string) Option { function WithCSVOpts (line 36) | func WithCSVOpts(cols []string) Option { function WithPDFOpts (line 42) | func WithPDFOpts(pwd string) Option { type RecursiveDirectoryLoader (line 47) | type RecursiveDirectoryLoader struct method newLoader (line 71) | func (l *RecursiveDirectoryLoader) newLoader(f *os.File) (Loader, erro... method Load (line 95) | func (l *RecursiveDirectoryLoader) Load(ctx context.Context) ([]schema... method LoadAndSplit (line 154) | func (l *RecursiveDirectoryLoader) LoadAndSplit(ctx context.Context, s... function NewRecursiveDirLoader (line 59) | func NewRecursiveDirLoader(opts ...Option) *RecursiveDirectoryLoader { FILE: documentloaders/directory_test.go function TestNewRecursiveDirLoader_Options (line 11) | func TestNewRecursiveDirLoader_Options(t *testing.T) { function TestLoad_AllSupportedTypes (line 37) | func TestLoad_AllSupportedTypes(t *testing.T) { FILE: documentloaders/documentloaders.go type Loader (line 11) | type Loader interface FILE: documentloaders/html.go type HTML (line 15) | type HTML struct method Load (line 27) | func (h HTML) Load(_ context.Context) ([]schema.Document, error) { method LoadAndSplit (line 53) | func (h HTML) LoadAndSplit(ctx context.Context, splitter textsplitter.... function NewHTML (line 22) | func NewHTML(r io.Reader) HTML { FILE: documentloaders/html_test.go function TestHTMLLoader (line 12) | func TestHTMLLoader(t *testing.T) { FILE: documentloaders/notion.go type NotionDirectoryLoader (line 11) | type NotionDirectoryLoader struct method Load (line 34) | func (n *NotionDirectoryLoader) Load() ([]schema.Document, error) { function NewNotionDirectory (line 17) | func NewNotionDirectory(filePath string, encoding ...string) *NotionDire... FILE: documentloaders/notion_test.go function TestNotionDirectoryLoader_Load (line 13) | func TestNotionDirectoryLoader_Load(t *testing.T) { FILE: documentloaders/pdf.go type PDF (line 13) | type PDF struct method getPassword (line 46) | func (p *PDF) getPassword() string { method Load (line 54) | func (p PDF) Load(_ context.Context) ([]schema.Document, error) { method LoadAndSplit (line 106) | func (p PDF) LoadAndSplit(ctx context.Context, splitter textsplitter.T... type PDFOptions (line 22) | type PDFOptions function WithPassword (line 25) | func WithPassword(password string) PDFOptions { function NewPDF (line 32) | func NewPDF(r io.ReaderAt, size int64, opts ...PDFOptions) PDF { FILE: documentloaders/pdf_test.go function TestPDFLoader (line 14) | func TestPDFLoader(t *testing.T) { function TestPDFTextSplit (line 93) | func TestPDFTextSplit(t *testing.T) { FILE: documentloaders/text.go type Text (line 13) | type Text struct method Load (line 27) | func (l Text) Load(_ context.Context) ([]schema.Document, error) { method LoadAndSplit (line 44) | func (l Text) LoadAndSplit(ctx context.Context, splitter textsplitter.... function NewText (line 20) | func NewText(r io.Reader) Text { FILE: documentloaders/text_test.go function TestTextLoader (line 12) | func TestTextLoader(t *testing.T) { FILE: embeddings/bedrock/bedrock.go type Bedrock (line 13) | type Bedrock struct method EmbedDocuments (line 36) | func (b *Bedrock) EmbedDocuments(ctx context.Context, texts []string) ... method EmbedQuery (line 67) | func (b *Bedrock) EmbedQuery(ctx context.Context, text string) ([]floa... function NewBedrock (line 21) | func NewBedrock(opts ...Option) (*Bedrock, error) { function getProvider (line 30) | func getProvider(modelID string) string { FILE: embeddings/bedrock/bedrock_test.go function TestEmbedQuery (line 14) | func TestEmbedQuery(t *testing.T) { function TestEmbedDocuments (line 39) | func TestEmbedDocuments(t *testing.T) { FILE: embeddings/bedrock/bedrock_unit_test.go function TestNewBedrock (line 10) | func TestNewBedrock(t *testing.T) { function TestBedrockOptions (line 46) | func TestBedrockOptions(t *testing.T) { function TestGetProvider (line 73) | func TestGetProvider(t *testing.T) { function TestDefaultValues (line 114) | func TestDefaultValues(t *testing.T) { FILE: embeddings/bedrock/options.go constant _defaultBatchSize (line 11) | _defaultBatchSize = 512 constant _defaultStripNewLines (line 12) | _defaultStripNewLines = true constant _defaultModel (line 13) | _defaultModel = ModelTitanEmbedG1 type Option (line 17) | type Option function WithStripNewLines (line 20) | func WithStripNewLines(stripNewLines bool) Option { function WithBatchSize (line 28) | func WithBatchSize(batchSize int) Option { function WithModel (line 35) | func WithModel(model string) Option { function WithClient (line 42) | func WithClient(client *bedrockruntime.Client) Option { function applyOptions (line 48) | func applyOptions(opts ...Option) (*Bedrock, error) { FILE: embeddings/bedrock/provider_amazon.go constant ModelTitanEmbedG1 (line 19) | ModelTitanEmbedG1 = "amazon.titan-embed-text-v1" type amazonEmbeddingsInput (line 22) | type amazonEmbeddingsInput struct type amazonEmbeddingsOutput (line 26) | type amazonEmbeddingsOutput struct function FetchAmazonTextEmbeddings (line 30) | func FetchAmazonTextEmbeddings(ctx context.Context, FILE: embeddings/bedrock/provider_cohere.go constant ModelCohereEn (line 19) | ModelCohereEn = "cohere.embed-english-v3" constant ModelCohereMulti (line 28) | ModelCohereMulti = "cohere.embed-multilingual-v3" constant CohereInputTypeText (line 33) | CohereInputTypeText = "search_document" constant CohereInputTypeQuery (line 35) | CohereInputTypeQuery = "search_query" type cohereTextEmbeddingsInput (line 38) | type cohereTextEmbeddingsInput struct type cohereTextEmbeddingsOutput (line 43) | type cohereTextEmbeddingsOutput struct function FetchCohereTextEmbeddings (line 48) | func FetchCohereTextEmbeddings( FILE: embeddings/cybertron/cybertron.go type Cybertron (line 12) | type Cybertron struct method CreateEmbedding (line 31) | func (c *Cybertron) CreateEmbedding(ctx context.Context, texts []strin... function NewCybertron (line 25) | func NewCybertron(opts ...Option) (*Cybertron, error) { FILE: embeddings/cybertron/cybertron_test.go function TestCybertronEmbeddings (line 11) | func TestCybertronEmbeddings(t *testing.T) { FILE: embeddings/cybertron/cybertron_unit_test.go function TestOptions (line 10) | func TestOptions(t *testing.T) { function TestDefaultValues (line 33) | func TestDefaultValues(t *testing.T) { function TestApplyOptions (line 39) | func TestApplyOptions(t *testing.T) { FILE: embeddings/cybertron/options.go constant _defaultModel (line 10) | _defaultModel = "sentence-transformers/all-MiniLM-L6-v2" constant _defaultModelsDir (line 11) | _defaultModelsDir = "models" constant _defaultPoolingStrategy (line 12) | _defaultPoolingStrategy = bert.MeanPooling type Option (line 16) | type Option method apply (line 19) | func (o Option) apply(c *Cybertron) { function WithModel (line 26) | func WithModel(model string) Option { function WithModelsDir (line 34) | func WithModelsDir(dir string) Option { function WithPoolingStrategy (line 41) | func WithPoolingStrategy(strategy bert.PoolingStrategyType) Option { function WithEncoder (line 48) | func WithEncoder(encoder textencoding.Interface) Option { function applyOptions (line 54) | func applyOptions(opts ...Option) (*Cybertron, error) { FILE: embeddings/embedding.go function NewEmbedder (line 13) | func NewEmbedder(client EmbedderClient, opts ...Option) (*EmbedderImpl, ... type Embedder (line 27) | type Embedder interface type EmbedderClient (line 35) | type EmbedderClient interface type EmbedderClientFunc (line 42) | type EmbedderClientFunc method CreateEmbedding (line 44) | func (e EmbedderClientFunc) CreateEmbedding(ctx context.Context, texts... type EmbedderImpl (line 48) | type EmbedderImpl struct method EmbedQuery (line 56) | func (ei *EmbedderImpl) EmbedQuery(ctx context.Context, text string) (... method EmbedDocuments (line 70) | func (ei *EmbedderImpl) EmbedDocuments(ctx context.Context, texts []st... function MaybeRemoveNewLines (line 75) | func MaybeRemoveNewLines(texts []string, removeNewLines bool) []string { function BatchTexts (line 88) | func BatchTexts(texts []string, batchSize int) [][]string { function BatchedEmbed (line 100) | func BatchedEmbed(ctx context.Context, embedder EmbedderClient, texts []... FILE: embeddings/embedding_test.go function TestBatchTexts (line 9) | func TestBatchTexts(t *testing.T) { FILE: embeddings/example_test.go function Example (line 11) | func Example() { //nolint:testableexamples FILE: embeddings/huggingface/huggingface.go type Huggingface (line 12) | type Huggingface struct method EmbedDocuments (line 32) | func (e *Huggingface) EmbedDocuments(ctx context.Context, texts []stri... method EmbedQuery (line 50) | func (e *Huggingface) EmbedQuery(ctx context.Context, text string) ([]... function NewHuggingface (line 23) | func NewHuggingface(opts ...Option) (*Huggingface, error) { FILE: embeddings/huggingface/huggingface_test.go function TestHuggingfaceEmbeddings (line 14) | func TestHuggingfaceEmbeddings(t *testing.T) { FILE: embeddings/huggingface/huggingface_unit_test.go function TestOptions (line 10) | func TestOptions(t *testing.T) { function TestDefaultValues (line 45) | func TestDefaultValues(t *testing.T) { function TestNewHuggingface (line 52) | func TestNewHuggingface(t *testing.T) { FILE: embeddings/huggingface/options.go constant _defaultBatchSize (line 8) | _defaultBatchSize = 512 constant _defaultStripNewLines (line 9) | _defaultStripNewLines = true constant _defaultModel (line 10) | _defaultModel = "BAAI/bge-small-en-v1.5" constant _defaultTask (line 11) | _defaultTask = "feature-extraction" type Option (line 15) | type Option function WithModel (line 18) | func WithModel(model string) Option { function WithTask (line 25) | func WithTask(task string) Option { function WithClient (line 32) | func WithClient(client huggingface.LLM) Option { function WithStripNewLines (line 39) | func WithStripNewLines(stripNewLines bool) Option { function WithBatchSize (line 46) | func WithBatchSize(batchSize int) Option { function applyOptions (line 52) | func applyOptions(opts ...Option) (*Huggingface, error) { FILE: embeddings/jina/jina.go type Jina (line 15) | type Jina struct method EmbedDocuments (line 52) | func (j *Jina) EmbedDocuments(ctx context.Context, texts []string) ([]... method EmbedQuery (line 70) | func (j *Jina) EmbedQuery(ctx context.Context, text string) ([]float32... method CreateEmbedding (line 84) | func (j *Jina) CreateEmbedding(ctx context.Context, texts []string) ([... type EmbeddingRequest (line 25) | type EmbeddingRequest struct type EmbeddingResponse (line 30) | type EmbeddingResponse struct function NewJina (line 46) | func NewJina(opts ...Option) (*Jina, error) { FILE: embeddings/jina/jina_test.go function TestJina_EmbedDocuments (line 13) | func TestJina_EmbedDocuments(t *testing.T) { function TestJina_EmbedQuery (line 46) | func TestJina_EmbedQuery(t *testing.T) { function TestJina_WithBatchSize (line 72) | func TestJina_WithBatchSize(t *testing.T) { function TestJina_StripNewLines (line 109) | func TestJina_StripNewLines(t *testing.T) { FILE: embeddings/jina/jina_unit_test.go function TestNewJina (line 14) | func TestNewJina(t *testing.T) { //nolint:funlen // comprehensive test function TestJinaOptions (line 194) | func TestJinaOptions(t *testing.T) { function TestJina_EmbedQuery_Error (line 233) | func TestJina_EmbedQuery_Error(t *testing.T) { function TestJina_EmbedDocuments_Error (line 256) | func TestJina_EmbedDocuments_Error(t *testing.T) { function TestApplyOptions (line 280) | func TestApplyOptions(t *testing.T) { FILE: embeddings/jina/options.go constant _defaultStripNewLines (line 11) | _defaultStripNewLines = true constant _defaultModel (line 12) | _defaultModel = "jina-embeddings-v2-small-en" constant _defaultTask (line 13) | _defaultTask = "feature-extraction" constant SmallModel (line 14) | SmallModel = "jina-embeddings-v2-small-en" constant BaseModel (line 15) | BaseModel = "jina-embeddings-v2-base-en" constant LargeModel (line 16) | LargeModel = "jina-embeddings-v2-large-en" constant APIBaseURL (line 17) | APIBaseURL = "https://api.jina.ai/v1/embeddings" type Option (line 21) | type Option function WithModel (line 24) | func WithModel(model string) Option { function WithStripNewLines (line 31) | func WithStripNewLines(stripNewLines bool) Option { function WithBatchSize (line 38) | func WithBatchSize(batchSize int) Option { function WithAPIBaseURL (line 45) | func WithAPIBaseURL(apiBaseURL string) Option { function WithAPIKey (line 52) | func WithAPIKey(apiKey string) Option { function WithClient (line 59) | func WithClient(client *http.Client) Option { function applyOptions (line 65) | func applyOptions(opts ...Option) *Jina { FILE: embeddings/openai_test.go function newOpenAIEmbedder (line 15) | func newOpenAIEmbedder(t *testing.T, opts ...Option) *EmbedderImpl { function TestOpenaiEmbeddings (line 44) | func TestOpenaiEmbeddings(t *testing.T) { function TestOpenaiEmbeddingsQueryVsDocuments (line 56) | func TestOpenaiEmbeddingsQueryVsDocuments(t *testing.T) { function TestOpenaiEmbeddingsWithOptions (line 74) | func TestOpenaiEmbeddingsWithOptions(t *testing.T) { function TestOpenaiEmbeddingsWithAzureAPI (line 87) | func TestOpenaiEmbeddingsWithAzureAPI(t *testing.T) { FILE: embeddings/options.go constant defaultBatchSize (line 4) | defaultBatchSize = 512 constant defaultStripNewLines (line 5) | defaultStripNewLines = true type Option (line 8) | type Option function WithStripNewLines (line 11) | func WithStripNewLines(stripNewLines bool) Option { function WithBatchSize (line 18) | func WithBatchSize(batchSize int) Option { FILE: embeddings/vector_math.go function CombineVectors (line 17) | func CombineVectors(vectors [][]float32, weights []int) ([]float32, erro... function getAverage (line 34) | func getAverage(vectors [][]float32, weights []int) ([]float32, error) { function getNorm (line 76) | func getNorm(v []float32) float32 { FILE: embeddings/vector_math_test.go function TestCombineVectors (line 9) | func TestCombineVectors(t *testing.T) { function TestGetAverage (line 39) | func TestGetAverage(t *testing.T) { function TestGetNorm (line 81) | func TestGetNorm(t *testing.T) { FILE: embeddings/voyageai/options.go constant _defaultBaseURL (line 12) | _defaultBaseURL = "https://api.voyageai.com/v1" constant _defaultBatchSize (line 13) | _defaultBatchSize = 512 constant _defaultStripNewLines (line 14) | _defaultStripNewLines = true constant _defaultModel (line 15) | _defaultModel = "voyage-2" type Option (line 19) | type Option function WithModel (line 22) | func WithModel(model string) Option { function WithClient (line 30) | func WithClient(client http.Client) Option { function WithToken (line 37) | func WithToken(token string) Option { function WithStripNewLines (line 44) | func WithStripNewLines(stripNewLines bool) Option { function WithBatchSize (line 51) | func WithBatchSize(batchSize int) Option { function applyOptions (line 57) | func applyOptions(opts ...Option) (*VoyageAI, error) { FILE: embeddings/voyageai/voyageai.go type VoyageAI (line 16) | type VoyageAI struct method EmbedDocuments (line 48) | func (v *VoyageAI) EmbedDocuments(ctx context.Context, texts []string)... method EmbedQuery (line 91) | func (v *VoyageAI) EmbedQuery(ctx context.Context, text string) ([]flo... method request (line 114) | func (v *VoyageAI) request(ctx context.Context, path string, body any)... method decodeError (line 131) | func (v *VoyageAI) decodeError(resp *http.Response) error { function NewVoyageAI (line 27) | func NewVoyageAI(opts ...Option) (*VoyageAI, error) { type embeddingResponse (line 35) | type embeddingResponse struct type embedDocumentsRequest (line 41) | type embedDocumentsRequest struct type embedQueryRequest (line 84) | type embedQueryRequest struct FILE: embeddings/voyageai/voyageai_test.go function TestVoyageAI_EmbedDocuments (line 15) | func TestVoyageAI_EmbedDocuments(t *testing.T) { function TestVoyageAI_EmbedQuery (line 58) | func TestVoyageAI_EmbedQuery(t *testing.T) { function TestVoyageAI_WithBatchSize (line 94) | func TestVoyageAI_WithBatchSize(t *testing.T) { function TestVoyageAI_WithModel (line 141) | func TestVoyageAI_WithModel(t *testing.T) { FILE: embeddings/voyageai/voyageai_unit_test.go function TestNewVoyageAI (line 14) | func TestNewVoyageAI(t *testing.T) { //nolint:funlen // comprehensive test function TestVoyageAIOptions (line 164) | func TestVoyageAIOptions(t *testing.T) { function TestVoyageAI_EmbedQuery_InvalidURL (line 197) | func TestVoyageAI_EmbedQuery_InvalidURL(t *testing.T) { function TestVoyageAI_EmbedDocuments_InvalidURL (line 214) | func TestVoyageAI_EmbedDocuments_InvalidURL(t *testing.T) { function TestApplyOptions (line 231) | func TestApplyOptions(t *testing.T) { FILE: examples/anthropic-completion-example/anthropic_completion_example.go function main (line 12) | func main() { FILE: examples/anthropic-extended-capabilities/main.go function main (line 13) | func main() { FILE: examples/anthropic-interleaved-thinking/main.go type debugTransport (line 151) | type debugTransport struct method RoundTrip (line 156) | func (d *debugTransport) RoundTrip(req *http.Request) (*http.Response,... function main (line 192) | func main() { function convertToolCallsToParts (line 633) | func convertToolCallsToParts(toolCalls []llms.ToolCall) []llms.ContentPa... function executeToolCall (line 646) | func executeToolCall(name string, arguments string) string { FILE: examples/anthropic-tool-call-example/anthropic-tool-call-example.go function main (line 14) | func main() { function executeToolCalls (line 95) | func executeToolCalls(ctx context.Context, llm llms.Model, messageHistor... function getCurrentWeather (line 152) | func getCurrentWeather(location string, unit string) (string, error) { FILE: examples/anthropic-vision-example/anthropic_vision_example.go function main (line 16) | func main() { FILE: examples/bedrock-claude3-vision-example/becrock_claude3_vision_example.go function main (line 16) | func main() { FILE: examples/bedrock-provider-example/main.go function main (line 13) | func main() { FILE: examples/caching-llm-example/caching_llm_example.go constant WIDTH (line 17) | WIDTH = 80 function main (line 19) | func main() { FILE: examples/chains-conversation-memory-sqlite/chains_conversation_memory_sqlite.go function main (line 18) | func main() { function prepare (line 25) | func prepare(ctx context.Context, db *sql.DB) error { function run (line 51) | func run() error { FILE: examples/chroma-vectorstore-example/chroma_vectorstore_example.go function main (line 17) | func main() { FILE: examples/cohere-llm-example/cohere_completion_example.go function main (line 12) | func main() { FILE: examples/cybertron-embedding-example/cybertron-embedding.go function cosineSimilarity (line 19) | func cosineSimilarity(x, y []float32) float32 { function randomIndexName (line 35) | func randomIndexName() string { function exampleInMemory (line 39) | func exampleInMemory(ctx context.Context, emb embeddings.Embedder) { function exampleWeaviate (line 62) | func exampleWeaviate(ctx context.Context, emb embeddings.Embedder) { function main (line 110) | func main() { FILE: examples/deepseek-completion-example/deepseek-completion-example.go function main (line 12) | func main() { FILE: examples/document-qa-example/document_qa.go function main (line 13) | func main() { function run (line 20) | func run() error { FILE: examples/ernie-chat-example/ernie_chat_example.go function main (line 12) | func main() { FILE: examples/ernie-completion-example/ernie_completion_example.go function main (line 13) | func main() { FILE: examples/ernie-function-call-example/ernie_function_call_example.go function main (line 14) | func main() { function getCurrentWeather (line 42) | func getCurrentWeather(location string, unit string) (string, error) { FILE: examples/google-alloydb-chat-message-history-example/google_alloydb_chat_message_history_example.go function getEnvVariables (line 16) | func getEnvVariables() (string, string, string, string, string, string, ... function printMessages (line 66) | func printMessages(ctx context.Context, cmh alloydb.ChatMessageHistory) { function main (line 76) | func main() { FILE: examples/google-alloydb-vectorstore-example/google_alloydb_vectorstore_example.go function getEnvVariables (line 18) | func getEnvVariables() (string, string, string, string, string, string, ... function main (line 69) | func main() { FILE: examples/google-cloudsql-chat-message-history-example/google_cloudsql_chat_message_history_example.go function getEnvVariables (line 16) | func getEnvVariables() (string, string, string, string, string, string, ... function printMessages (line 61) | func printMessages(ctx context.Context, cmh cloudsql.ChatMessageHistory) { function main (line 71) | func main() { FILE: examples/google-cloudsql-vectorstore-example/google_cloudsql_vectorstore_example.go function getEnvVariables (line 18) | func getEnvVariables() (string, string, string, string, string, string, ... function main (line 64) | func main() { FILE: examples/googleai-completion-example/googleai-completion-example.go function main (line 14) | func main() { FILE: examples/googleai-reasoning-caching/main.go function main (line 16) | func main() { function demonstrateReasoning (line 38) | func demonstrateReasoning(ctx context.Context, apiKey string) { function demonstrateCaching (line 91) | func demonstrateCaching(ctx context.Context, apiKey string) { function setupCachingHelper (line 102) | func setupCachingHelper(ctx context.Context, apiKey string) *googleai.Ca... function createCachedContent (line 110) | func createCachedContent(ctx context.Context, helper *googleai.CachingHe... function runCachedRequests (line 148) | func runCachedRequests(ctx context.Context, apiKey, cachedContentName st... FILE: examples/googleai-streaming-example/googleai-stremaing-example.go function main (line 14) | func main() { FILE: examples/googleai-tool-call-example/googleai-tool-call-example.go function main (line 15) | func main() { FILE: examples/groq-completion-example/groq_completion_example.go function main (line 13) | func main() { FILE: examples/huggingface-llm-example/huggingface_example.go function main (line 12) | func main() { FILE: examples/huggingface-milvus-vectorstore-example/milvus_vectorstore_example.go constant poolSize (line 20) | poolSize = 5 constant baseURL (line 21) | baseURL = "http://localhost:5500" function main (line 24) | func main() { function newStore (line 32) | func newStore() (vectorstores.VectorStore, error) { function citiesExample (line 63) | func citiesExample(store vectorstores.VectorStore) { FILE: examples/json-mode-example/json_mode_example.go function main (line 18) | func main() { function initBackend (line 38) | func initBackend(ctx context.Context) (llms.Model, error) { FILE: examples/llamafile-completion-example/llamafile_completion_example.go function main (line 11) | func main() { FILE: examples/llm-chain-example/llm_chain.go function main (line 13) | func main() { function run (line 20) | func run() error { FILE: examples/llmmath-chain-example/llm_math_chain.go function main (line 12) | func main() { function run (line 19) | func run() error { FILE: examples/llmsummarization-chain-example/llm_summarization_example.go function main (line 15) | func main() { FILE: examples/local-llm-example/local_llm_example.go function main (line 12) | func main() { FILE: examples/maritaca-example/maritaca-chat-example.go function main (line 11) | func main() { FILE: examples/mistral-completion-example/mistral_completion_example.go function main (line 12) | func main() { FILE: examples/mistral-embedding-example/mistral-embedding-example.go function main (line 17) | func main() { FILE: examples/mistral-summarization-example/mistral_summarization_example.go function main (line 15) | func main() { FILE: examples/mongovector-vectorstore-example/mongovector_vectorstore_example.go function main (line 20) | func main() { type vectorField (line 188) | type vectorField struct function createVectorSearchIndex (line 198) | func createVectorSearchIndex( function searchIndexExists (line 243) | func searchIndexExists(ctx context.Context, coll *mongo.Collection, idx ... FILE: examples/mrkl-agent-example/mrkl_agent.go function main (line 15) | func main() { function run (line 22) | func run() error { FILE: examples/nvidia-chat-completion/nvidia_chat_completion_example.go function main (line 13) | func main() { FILE: examples/ollama-chat-example/ollama_chat_example.go function main (line 12) | func main() { FILE: examples/ollama-chroma-vectorstore-example/chroma_vectorstore_example.go function main (line 18) | func main() { FILE: examples/ollama-completion-example/ollama_completion_example.go function main (line 12) | func main() { FILE: examples/ollama-functions-example/ollama_functions_example.go function main (line 18) | func main() { type Call (line 74) | type Call struct function unmarshalCall (line 79) | func unmarshalCall(input string) *Call { function dispatchCall (line 87) | func dispatchCall(c *Call) (llms.MessageContent, bool) { function validTool (line 128) | func validTool(name string) bool { function systemMessage (line 136) | func systemMessage() string { function getCurrentWeather (line 154) | func getCurrentWeather(location string, unit string) (string, error) { FILE: examples/ollama-reasoning-caching/main.go function main (line 15) | func main() { function demonstrateReasoning (line 38) | func demonstrateReasoning(ctx context.Context, serverURL string) { function demonstrateCaching (line 117) | func demonstrateCaching(ctx context.Context, serverURL string) { function setupCachingClient (line 127) | func setupCachingClient(serverURL string) (llms.Model, *ollama.ContextCa... function runCachingDemo (line 144) | func runCachingDemo(ctx context.Context, llm llms.Model, cache *ollama.C... function processQuestion (line 173) | func processQuestion(ctx context.Context, llm llms.Model, cache *ollama.... FILE: examples/ollama-stream-example/ollama_stream_example.go function main (line 12) | func main() { FILE: examples/openai-chat-example/openai_chat_example.go function main (line 12) | func main() { FILE: examples/openai-completion-example-with-http-debugging/openai_completion_example.go function main (line 16) | func main() { FILE: examples/openai-completion-example/openai_completion_example.go function main (line 12) | func main() { FILE: examples/openai-embeddings-example/openai-embeddings-example.go function main (line 11) | func main() { FILE: examples/openai-function-call-example/openai_function_call_example.go function main (line 14) | func main() { function updateMessageHistory (line 49) | func updateMessageHistory(messageHistory []llms.MessageContent, resp *ll... function executeToolCalls (line 61) | func executeToolCalls(ctx context.Context, llm llms.Model, messageHistor... function getCurrentWeather (line 98) | func getCurrentWeather(location string, unit string) (string, error) { function showResponse (line 143) | func showResponse(resp *llms.ContentResponse) string { FILE: examples/openai-function-call-streaming-example/openai_function_call_example.go function main (line 14) | func main() { function getCurrentWeather (line 39) | func getCurrentWeather(location string, unit string) (string, error) { FILE: examples/openai-gpt4-turbo-example/openai_gpt4_turbo.go function main (line 12) | func main() { FILE: examples/openai-gpt4o-example/openai_gpt4o_example.go function main (line 12) | func main() { FILE: examples/openai-gpt4o-mutil-content/openai-gpt4o-mutil-content.go function main (line 12) | func main() { FILE: examples/openai-jsonformat-example/openai-jsonformat.go type User (line 11) | type User struct function main (line 16) | func main() { FILE: examples/openai-o1-example/openai_o1_chat_example.go function main (line 17) | func main() { FILE: examples/openai-readme/openai-readme.go function main (line 12) | func main() { FILE: examples/openrouter-llm-example/openrouter_llm_example.go function main (line 15) | func main() { FILE: examples/perplexity-completion-example/perplexity_completion_example.go function main (line 14) | func main() { FILE: examples/pgvector-vectorstore-example/pgvector_vectorstore_example.go function main (line 16) | func main() { FILE: examples/pinecone-vectorstore-example/pinecone_vectorstore_example.go function main (line 16) | func main() { FILE: examples/postgresql-database-chain-example/postgresql_database_chain.go function main (line 16) | func main() { function makeSample (line 23) | func makeSample(dsn string) { function run (line 75) | func run() error { FILE: examples/prompt-caching/main.go function main (line 13) | func main() { type CacheUsage (line 217) | type CacheUsage struct function extractCacheUsage (line 226) | func extractCacheUsage(genInfo map[string]any) *CacheUsage { FILE: examples/prompt-template-example/main.go function main (line 10) | func main() { FILE: examples/qdrant-vectorstore-example/qdrant_vectorstore_example.go function main (line 16) | func main() { FILE: examples/reasoning-tokens/main.go function main (line 14) | func main() { function testReasoning (line 88) | func testReasoning(ctx context.Context, llm llms.Model, modelName string... FILE: examples/redis-vectorstore-example/redis_vectorstore_example.go function main (line 19) | func main() { function getEmbedding (line 68) | func getEmbedding(model string, connectionStr ...string) (llms.Model, *e... FILE: examples/sequential-chain-example/sequential_chain_example.go function main (line 13) | func main() { function simpleSequentialChainExample (line 20) | func simpleSequentialChainExample() { function sequentialChainExample (line 56) | func sequentialChainExample() { FILE: examples/sql-database-chain-example/sql_database_chain.go function main (line 16) | func main() { function makeSample (line 23) | func makeSample(dsn string) { function run (line 75) | func run() error { FILE: examples/tutorial-basic-chat-app/main.go function main (line 17) | func main() { function runBasicChat (line 39) | func runBasicChat() { function runInteractiveChat (line 65) | func runInteractiveChat() { function runChatWithMemory (line 100) | func runChatWithMemory() { function runAdvancedChat (line 154) | func runAdvancedChat() { FILE: examples/tutorial-basic-chat-app/step3_basic.go function basicChat (line 13) | func basicChat() { FILE: examples/tutorial-basic-chat-app/step4_interactive.go function interactiveChat (line 16) | func interactiveChat() { FILE: examples/tutorial-basic-chat-app/step5_memory.go function chatWithMemory (line 17) | func chatWithMemory() { FILE: examples/tutorial-basic-chat-app/step6_advanced.go function advancedChat (line 17) | func advancedChat() { FILE: examples/vertex-completion-example/vertex-completion-example.go function main (line 19) | func main() { FILE: examples/vertex-embedding-example/vertex-embedding-example.go function main (line 16) | func main() { FILE: examples/watsonx-llm-example/watsonx_example.go function main (line 12) | func main() { FILE: examples/zapier-llm-example/main.go function main (line 14) | func main() { FILE: examples/zep-memory-chain-example/main.go function main (line 16) | func main() { FILE: httputil/logging_transport.go type LoggingTransport (line 66) | type LoggingTransport struct method RoundTrip (line 80) | func (t *LoggingTransport) RoundTrip(req *http.Request) (*http.Respons... constant colorBlue (line 113) | colorBlue = "\033[34m" constant colorGreen (line 114) | colorGreen = "\033[32m" constant colorYellow (line 115) | colorYellow = "\033[33m" constant colorPurple (line 116) | colorPurple = "\033[35m" constant colorGrey (line 117) | colorGrey = "\033[90m" constant colorReset (line 118) | colorReset = "\033[0m" type jsonDebugTransport (line 121) | type jsonDebugTransport struct method RoundTrip (line 137) | func (t *jsonDebugTransport) RoundTrip(req *http.Request) (*http.Respo... method wrapSSEResponse (line 183) | func (t *jsonDebugTransport) wrapSSEResponse(resp *http.Response) *htt... method parseEvent (line 224) | func (t *jsonDebugTransport) parseEvent(text string) { method logJSON (line 261) | func (t *jsonDebugTransport) logJSON(contentType string, body *io.Read... method printUsage (line 278) | func (t *jsonDebugTransport) printUsage(usage map[string]interface{}) { function scrubSensitive (line 125) | func scrubSensitive(key, value string) string { FILE: httputil/transport.go type Transport (line 32) | type Transport struct method RoundTrip (line 42) | func (t *Transport) RoundTrip(req *http.Request) (*http.Response, erro... type ApiKeyTransport (line 67) | type ApiKeyTransport struct method RoundTrip (line 78) | func (t *ApiKeyTransport) RoundTrip(req *http.Request) (*http.Response... FILE: httputil/transport_test.go type mockRoundTripper (line 13) | type mockRoundTripper struct method RoundTrip (line 19) | func (m *mockRoundTripper) RoundTrip(req *http.Request) (*http.Respons... function TestTransport_RoundTrip (line 30) | func TestTransport_RoundTrip(t *testing.T) { function TestTransport_NilTransport (line 88) | func TestTransport_NilTransport(t *testing.T) { function TestDefaultTransport (line 107) | func TestDefaultTransport(t *testing.T) { function TestDefaultClient (line 117) | func TestDefaultClient(t *testing.T) { function TestApiKeyTransport_RoundTrip (line 136) | func TestApiKeyTransport_RoundTrip(t *testing.T) { function TestApiKeyTransport_NilTransport (line 207) | func TestApiKeyTransport_NilTransport(t *testing.T) { function TestApiKeyTransport_PreservesOtherParams (line 228) | func TestApiKeyTransport_PreservesOtherParams(t *testing.T) { FILE: httputil/useragent.go function UserAgent (line 19) | func UserAgent() string { FILE: httputil/useragent_test.go function TestUserAgent (line 10) | func TestUserAgent(t *testing.T) { function TestUserAgentFormat (line 33) | func TestUserAgentFormat(t *testing.T) { function TestUserAgentComponents (line 47) | func TestUserAgentComponents(t *testing.T) { FILE: internal/devtools/examples-updater/main.go function main (line 21) | func main() { function updateExamples (line 44) | func updateExamples(newVersion string, dryRun bool) error { function findGoModFiles (line 129) | func findGoModFiles(root string) ([]string, error) { function removeReplaceDirective (line 143) | func removeReplaceDirective(content string) string { FILE: internal/devtools/lint/lint.go function main (line 32) | func main() { function changeToRepoRoot (line 51) | func changeToRepoRoot() error { function run (line 112) | func run(fix bool) error { function mapKeys (line 163) | func mapKeys(m map[string]bool) []string { function checkMissingExampleGoModFiles (line 172) | func checkMissingExampleGoModFiles(fix bool) error { function fixMissingExampleGoModFile (line 203) | func fixMissingExampleGoModFile(dir string) error { function checkModuleNameMatchesDirectory (line 216) | func checkModuleNameMatchesDirectory(fix bool) error { function fixModuleName (line 309) | func fixModuleName(dir, expectedModuleName string) error { function checkMissingReplaceDirectives (line 325) | func checkMissingReplaceDirectives(fix bool) error { function fixAddReplaceDirective (line 429) | func fixAddReplaceDirective(dir, rootModName string) error { function checkNoReplaceDirectives (line 463) | func checkNoReplaceDirectives(fix bool) error { function fixRemoveReplaceDirectives (line 531) | func fixRemoveReplaceDirectives(dir string) error { function checkHttprrCompression (line 564) | func checkHttprrCompression(fix bool) error { function checkHttprrTestPatterns (line 655) | func checkHttprrTestPatterns(fix bool) error { type HttprrIssue (line 812) | type HttprrIssue struct type HttprrIssueType (line 821) | type HttprrIssueType constant IssueHardcodedToken (line 824) | IssueHardcodedToken HttprrIssueType = iota constant IssueParallelBeforeHttprr (line 825) | IssueParallelBeforeHttprr constant IssueRedundantCleanup (line 826) | IssueRedundantCleanup constant IssueDirectOsGetenv (line 827) | IssueDirectOsGetenv constant IssueNotRecordingPattern (line 828) | IssueNotRecordingPattern function analyzeHttprrPatternsInFile (line 832) | func analyzeHttprrPatternsInFile(filePath string) ([]HttprrIssue, error) { type HttprrAnalyzer (line 865) | type HttprrAnalyzer struct method Visit (line 876) | func (a *HttprrAnalyzer) Visit(node ast.Node) ast.Visitor { method isHttprrOpenForTest (line 934) | func (a *HttprrAnalyzer) isHttprrOpenForTest(call *ast.CallExpr) bool { method isWithTokenCall (line 944) | func (a *HttprrAnalyzer) isWithTokenCall(call *ast.CallExpr) bool { method isRecordingCheck (line 961) | func (a *HttprrAnalyzer) isRecordingCheck(ifStmt *ast.IfStmt) bool { method isNotRecordingCheck (line 986) | func (a *HttprrAnalyzer) isNotRecordingCheck(ifStmt *ast.IfStmt) bool { method checkNotRecordingUsage (line 1006) | func (a *HttprrAnalyzer) checkNotRecordingUsage(ifStmt *ast.IfStmt) { method checkTokenUsage (line 1018) | func (a *HttprrAnalyzer) checkTokenUsage(call *ast.CallExpr) { method checkParallelUsage (line 1033) | func (a *HttprrAnalyzer) checkParallelUsage(fn *ast.FuncDecl) { method isCleanupCall (line 1083) | func (a *HttprrAnalyzer) isCleanupCall(call *ast.CallExpr) bool { method checkCleanupUsage (line 1093) | func (a *HttprrAnalyzer) checkCleanupUsage(call *ast.CallExpr) { method containsRRClose (line 1122) | func (a *HttprrAnalyzer) containsRRClose(stmt ast.Stmt) bool { method isOsGetenvCall (line 1141) | func (a *HttprrAnalyzer) isOsGetenvCall(call *ast.CallExpr) bool { method checkOsGetenvUsage (line 1151) | func (a *HttprrAnalyzer) checkOsGetenvUsage(call *ast.CallExpr) { method isCredentialEnvVar (line 1187) | func (a *HttprrAnalyzer) isCredentialEnvVar(envVar string) bool { method hasTrailingComment (line 1217) | func (a *HttprrAnalyzer) hasTrailingComment(call *ast.CallExpr) bool { method isInRecordingCondition (line 1238) | func (a *HttprrAnalyzer) isInRecordingCondition(call *ast.CallExpr) bo... method statementContainsRecordingCall (line 1265) | func (a *HttprrAnalyzer) statementContainsRecordingCall(stmt ast.Stmt)... function fixHttprrPatternsInFileAST (line 1284) | func fixHttprrPatternsInFileAST(filePath string, issues []HttprrIssue) e... type HttprrFixer (line 1322) | type HttprrFixer struct method containsRRClose (line 1328) | func (f *HttprrFixer) containsRRClose(stmt ast.Stmt) bool { method Visit (line 1347) | func (f *HttprrFixer) Visit(node ast.Node) ast.Visitor { method fixParallelUsageInFunction (line 1373) | func (f *HttprrFixer) fixParallelUsageInFunction(fn *ast.FuncDecl) { method fixRedundantCleanupInFunction (line 1420) | func (f *HttprrFixer) fixRedundantCleanupInFunction(fn *ast.FuncDecl) { method fixTokenUsageInCall (line 1478) | func (f *HttprrFixer) fixTokenUsageInCall(call *ast.CallExpr) { method fixNotRecordingPattern (line 1493) | func (f *HttprrFixer) fixNotRecordingPattern(ifStmt *ast.IfStmt) { function checkArchitecturalRules (line 1527) | func checkArchitecturalRules(fix bool) error { type ArchitecturalIssueType (line 1642) | type ArchitecturalIssueType constant IssueDirectHttpClientUsage (line 1645) | IssueDirectHttpClientUsage ArchitecturalIssueType = iota constant IssueProviderCrossDependency (line 1646) | IssueProviderCrossDependency constant IssueMissingOptionsPattern (line 1647) | IssueMissingOptionsPattern constant IssueInterfaceViolation (line 1648) | IssueInterfaceViolation constant IssueTestPlacement (line 1649) | IssueTestPlacement constant IssueInternalPackageUsage (line 1650) | IssueInternalPackageUsage constant IssueTestHttpClientUsage (line 1651) | IssueTestHttpClientUsage constant IssueTestMissingHttprr (line 1652) | IssueTestMissingHttprr constant IssueTestHttpGetUsage (line 1653) | IssueTestHttpGetUsage constant IssueTestHttpClientModification (line 1654) | IssueTestHttpClientModification constant IssueTestProviderConstructorWithoutHttprr (line 1655) | IssueTestProviderConstructorWithoutHttprr constant IssueTestHardcodedApiUrl (line 1656) | IssueTestHardcodedApiUrl constant IssueTestSkipsHttprrCheck (line 1657) | IssueTestSkipsHttprrCheck type ArchitecturalIssue (line 1661) | type ArchitecturalIssue struct function shouldSkipArchitecturalCheck (line 1670) | func shouldSkipArchitecturalCheck(file string) bool { function checkArchitecturalRulesInFile (line 1690) | func checkArchitecturalRulesInFile(filePath string) ([]ArchitecturalIssu... type ArchitecturalAnalyzer (line 1718) | type ArchitecturalAnalyzer struct method Visit (line 1728) | func (a *ArchitecturalAnalyzer) Visit(node ast.Node) ast.Visitor { method checkImportUsage (line 1755) | func (a *ArchitecturalAnalyzer) checkImportUsage(imp *ast.ImportSpec) { method checkHttpClientUsage (line 1798) | func (a *ArchitecturalAnalyzer) checkHttpClientUsage(sel *ast.Selector... method checkOptionsPatternUsage (line 1837) | func (a *ArchitecturalAnalyzer) checkOptionsPatternUsage(call *ast.Cal... method checkConstructorPattern (line 1862) | func (a *ArchitecturalAnalyzer) checkConstructorPattern(fn *ast.FuncDe... method checkInterfaceCompliance (line 1899) | func (a *ArchitecturalAnalyzer) checkInterfaceCompliance(fn *ast.FuncD... method checkTypeDefinition (line 1906) | func (a *ArchitecturalAnalyzer) checkTypeDefinition(typeSpec *ast.Type... method isValidInternalImport (line 1931) | func (a *ArchitecturalAnalyzer) isValidInternalImport(importPath strin... method isProviderPackage (line 1974) | func (a *ArchitecturalAnalyzer) isProviderPackage() bool { method isMainPackage (line 1980) | func (a *ArchitecturalAnalyzer) isMainPackage() bool { method isTestFile (line 1987) | func (a *ArchitecturalAnalyzer) isTestFile() bool { method isImportingOtherProvider (line 1991) | func (a *ArchitecturalAnalyzer) isImportingOtherProvider(importPath st... method extractProviderName (line 2021) | func (a *ArchitecturalAnalyzer) extractProviderName(path, providerType... method usesOptionsPattern (line 2036) | func (a *ArchitecturalAnalyzer) usesOptionsPattern(call *ast.CallExpr)... method shouldUseOptionsPattern (line 2054) | func (a *ArchitecturalAnalyzer) shouldUseOptionsPattern(functionName s... method followsProviderNamingConvention (line 2104) | func (a *ArchitecturalAnalyzer) followsProviderNamingConvention(typeNa... method isStandardLibraryCall (line 2124) | func (a *ArchitecturalAnalyzer) isStandardLibraryCall(sel *ast.Selecto... method checkTestHttpPatterns (line 2166) | func (a *ArchitecturalAnalyzer) checkTestHttpPatterns(call *ast.CallEx... method checkTestFunctionHttprr (line 2197) | func (a *ArchitecturalAnalyzer) checkTestFunctionHttprr(fn *ast.FuncDe... method isHttpGetCall (line 2226) | func (a *ArchitecturalAnalyzer) isHttpGetCall(call *ast.CallExpr) bool { method isHttpClientTransportModification (line 2236) | func (a *ArchitecturalAnalyzer) isHttpClientTransportModification(call... method functionMakesHttpCalls (line 2243) | func (a *ArchitecturalAnalyzer) functionMakesHttpCalls(fn *ast.FuncDec... method functionUsesHttptest (line 2326) | func (a *ArchitecturalAnalyzer) functionUsesHttptest(fn *ast.FuncDecl)... method isCallOnTestInstance (line 2350) | func (a *ArchitecturalAnalyzer) isCallOnTestInstance(sel *ast.Selector... method isVariableCreatedByMockFunction (line 2384) | func (a *ArchitecturalAnalyzer) isVariableCreatedByMockFunction(varNam... method isVariableDefinedAsTestStruct (line 2425) | func (a *ArchitecturalAnalyzer) isVariableDefinedAsTestStruct(varName ... method isInPackage (line 2459) | func (a *ArchitecturalAnalyzer) isInPackage(packageName string) bool { method functionUsesHttprr (line 2464) | func (a *ArchitecturalAnalyzer) functionUsesHttprr(fn *ast.FuncDecl) b... method checkProviderConstructorUsage (line 2513) | func (a *ArchitecturalAnalyzer) checkProviderConstructorUsage(call *as... method checkTestProviderConstructors (line 2569) | func (a *ArchitecturalAnalyzer) checkTestProviderConstructors(fn *ast.... method isProviderConstructorCall (line 2634) | func (a *ArchitecturalAnalyzer) isProviderConstructorCall(call *ast.Ca... method getConstructorName (line 2669) | func (a *ArchitecturalAnalyzer) getConstructorName(call *ast.CallExpr)... method getCurrentFunction (line 2679) | func (a *ArchitecturalAnalyzer) getCurrentFunction(node ast.Node) *ast... method functionSkipsHttprr (line 2695) | func (a *ArchitecturalAnalyzer) functionSkipsHttprr(fn *ast.FuncDecl) ... method functionSkipsHttprrCheck (line 2736) | func (a *ArchitecturalAnalyzer) functionSkipsHttprrCheck(fn *ast.FuncD... method functionUsesProviderConstructors (line 2811) | func (a *ArchitecturalAnalyzer) functionUsesProviderConstructors(fn *a... method isAssertOrEqualsCall (line 2831) | func (a *ArchitecturalAnalyzer) isAssertOrEqualsCall(call *ast.CallExp... method containsHardcodedApiUrl (line 2844) | func (a *ArchitecturalAnalyzer) containsHardcodedApiUrl(call *ast.Call... FILE: internal/devtools/normalize-recordings/main.go function main (line 20) | func main() { function normalizeRecording (line 69) | func normalizeRecording(filename string) error { function normalizeHTTPRRFile (line 107) | func normalizeHTTPRRFile(content string) string { function normalizeContent (line 191) | func normalizeContent(content string) string { function showChanges (line 211) | func showChanges(original, normalized string) { FILE: internal/devtools/rrtool/main.go function main (line 14) | func main() { function checkCmd (line 35) | func checkCmd() { function listPackagesCmd (line 78) | func listPackagesCmd() { function findPackagesWithHttprr (line 112) | func findPackagesWithHttprr(rootDir string) ([]string, error) { function fileImportsHttprr (line 172) | func fileImportsHttprr(filePath string) (bool, error) { function showUsage (line 190) | func showUsage() { FILE: internal/httprr/normalization_test.go function TestNormalizeGoogleAPIClientHeader (line 8) | func TestNormalizeGoogleAPIClientHeader(t *testing.T) { function TestNormalizeVersionHeader (line 50) | func TestNormalizeVersionHeader(t *testing.T) { function TestVersionNormalizationConsistency (line 93) | func TestVersionNormalizationConsistency(t *testing.T) { function TestOpenAIProjectHeaderScrubbing (line 112) | func TestOpenAIProjectHeaderScrubbing(t *testing.T) { FILE: internal/httprr/rr.go function init (line 49) | func init() { type RecordReplay (line 65) | type RecordReplay struct method ScrubReq (line 89) | func (rr *RecordReplay) ScrubReq(scrubs ...func(req *http.Request) err... method ScrubResp (line 107) | func (rr *RecordReplay) ScrubResp(scrubs ...func(*bytes.Buffer) error) { method Recording (line 112) | func (rr *RecordReplay) Recording() bool { method Replaying (line 117) | func (rr *RecordReplay) Replaying() bool { method Client (line 294) | func (rr *RecordReplay) Client() *http.Client { method RoundTrip (line 330) | func (rr *RecordReplay) RoundTrip(req *http.Request) (*http.Response, ... method reqWire (line 456) | func (rr *RecordReplay) reqWire(req *http.Request) (string, error) { method respWire (line 526) | func (rr *RecordReplay) respWire(resp *http.Response) (string, error) { method replayRoundTrip (line 568) | func (rr *RecordReplay) replayRoundTrip(req *http.Request, reqLog stri... method writeError (line 625) | func (rr *RecordReplay) writeError() error { method writeLog (line 634) | func (rr *RecordReplay) writeLog(reqWire, respWire string) error { method Close (line 659) | func (rr *RecordReplay) Close() error { function Open (line 133) | func Open(file string, rt http.RoundTripper) (*RecordReplay, error) { function Recording (line 155) | func Recording(file string) (bool, error) { function getRecordForTesting (line 171) | func getRecordForTesting() string { function setRecordForTesting (line 179) | func setRecordForTesting(value string) func() { function create (line 192) | func create(file string, rt http.RoundTripper) (*RecordReplay, error) { function open (line 217) | func open(file string, rt http.RoundTripper) (*RecordReplay, error) { type Body (line 301) | type Body struct method Read (line 307) | func (b *Body) Read(p []byte) (int, error) { method Close (line 317) | func (b *Body) Close() error { function CleanFileName (line 674) | func CleanFileName(testName string) string { function logWriter (line 699) | func logWriter(t *testing.T) io.Writer { type testWriter (line 704) | type testWriter struct method Write (line 706) | func (w testWriter) Write(b []byte) (int, error) { function OpenForEmbeddingTest (line 741) | func OpenForEmbeddingTest(t *testing.T, rt http.RoundTripper) *RecordRep... function OpenForTest (line 747) | func OpenForTest(t *testing.T, rt http.RoundTripper) *RecordReplay { function cleanupExistingFiles (line 812) | func cleanupExistingFiles(t *testing.T, baseFilename string) { function findBestReplayFile (line 826) | func findBestReplayFile(t *testing.T, baseFilename string) string { function SkipIfNoCredentialsAndRecordingMissing (line 869) | func SkipIfNoCredentialsAndRecordingMissing(t *testing.T, envVars ...str... function hasRequiredCredentials (line 889) | func hasRequiredCredentials(envVars []string) bool { function hasExistingRecording (line 899) | func hasExistingRecording(t *testing.T) bool { function normalizeGoogleAPIClientHeader (line 916) | func normalizeGoogleAPIClientHeader(header string) string { function normalizeVersionHeader (line 991) | func normalizeVersionHeader(header string) string { function getDefaultRequestScrubbers (line 1019) | func getDefaultRequestScrubbers() []func(*http.Request) error { function getDefaultResponseScrubbers (line 1102) | func getDefaultResponseScrubbers() []func(*bytes.Buffer) error { function conditionalEmbeddingFormatter (line 1140) | func conditionalEmbeddingFormatter() func(*bytes.Buffer) error { function EmbeddingJSONFormatter (line 1164) | func EmbeddingJSONFormatter() func(*bytes.Buffer) error { function formatJSONBody (line 1203) | func formatJSONBody(data []byte) []byte { function formatJSONValue (line 1226) | func formatJSONValue(v interface{}, indent int) string { FILE: internal/httprr/rr_test.go function handler (line 19) | func handler(w http.ResponseWriter, r *http.Request) { function always555 (line 42) | func always555(w http.ResponseWriter, r *http.Request) { function dropPort (line 46) | func dropPort(r *http.Request) error { function dropSecretHeader (line 54) | func dropSecretHeader(r *http.Request) error { function hideSecretBody (line 59) | func hideSecretBody(r *http.Request) error { function doNothing (line 67) | func doNothing(b *bytes.Buffer) error { function doRefresh (line 71) | func doRefresh(b *bytes.Buffer) error { function TestRecordReplay (line 78) | func TestRecordReplay(t *testing.T) { function TestErrors (line 192) | func TestErrors(t *testing.T) { type errTransport (line 368) | type errTransport struct method RoundTrip (line 370) | func (e errTransport) RoundTrip(req *http.Request) (*http.Response, er... type badRespTransport (line 374) | type badRespTransport struct method RoundTrip (line 376) | func (badRespTransport) RoundTrip(req *http.Request) (*http.Response, ... FILE: internal/httprr/rr_unit_test.go function TestCleanFileName (line 16) | func TestCleanFileName(t *testing.T) { function TestBodyReadClose (line 84) | func TestBodyReadClose(t *testing.T) { function TestRecordReplayBasics (line 116) | func TestRecordReplayBasics(t *testing.T) { function TestScrubReqResp (line 134) | func TestScrubReqResp(t *testing.T) { function TestRecordingFlag (line 161) | func TestRecordingFlag(t *testing.T) { function TestWriteError (line 221) | func TestWriteError(t *testing.T) { function TestClient (line 238) | func TestClient(t *testing.T) { function TestDefaultRequestScrubbers (line 248) | func TestDefaultRequestScrubbers(t *testing.T) { function TestDefaultResponseScrubbers (line 277) | func TestDefaultResponseScrubbers(t *testing.T) { function TestEmbeddingJSONFormatter (line 316) | func TestEmbeddingJSONFormatter(t *testing.T) { function TestFormatJSONValue (line 335) | func TestFormatJSONValue(t *testing.T) { function TestFormatJSONBody (line 400) | func TestFormatJSONBody(t *testing.T) { function TestHasRequiredCredentials (line 445) | func TestHasRequiredCredentials(t *testing.T) { function TestConstants (line 495) | func TestConstants(t *testing.T) { function TestTestWriter (line 505) | func TestTestWriter(t *testing.T) { function TestSetRecordForTesting (line 518) | func TestSetRecordForTesting(t *testing.T) { function TestRecordReplayClose (line 533) | func TestRecordReplayClose(t *testing.T) { function TestInternalStructs (line 551) | func TestInternalStructs(t *testing.T) { FILE: internal/imageutil/download.go function DownloadImageData (line 14) | func DownloadImageData(url string) (string, []byte, error) { FILE: internal/imageutil/download_test.go function requireHttprrRecording (line 14) | func requireHttprrRecording(t *testing.T) *httprr.RecordReplay { function TestDownloadImageData_Integration (line 31) | func TestDownloadImageData_Integration(t *testing.T) { function TestDownloadImageData_JPEG (line 52) | func TestDownloadImageData_JPEG(t *testing.T) { function TestDownloadImageData_InvalidURL_Integration (line 73) | func TestDownloadImageData_InvalidURL_Integration(t *testing.T) { function TestDownloadImageData_NotFound (line 92) | func TestDownloadImageData_NotFound(t *testing.T) { function TestDownloadImageData_InvalidMimeType (line 113) | func TestDownloadImageData_InvalidMimeType(t *testing.T) { FILE: internal/imageutil/download_unit_test.go function TestDownloadImageData (line 12) | func TestDownloadImageData(t *testing.T) { function TestDownloadImageData_InvalidURL (line 111) | func TestDownloadImageData_InvalidURL(t *testing.T) { FILE: internal/maputil/map.go function ListKeys (line 3) | func ListKeys[T any](m map[string]T) []string { FILE: internal/maputil/map_test.go function TestListKeys (line 10) | func TestListKeys(t *testing.T) { function TestListKeys_TypedMaps (line 72) | func TestListKeys_TypedMaps(t *testing.T) { FILE: internal/mongodb/client.go function NewClient (line 11) | func NewClient(ctx context.Context, url string) (*mongo.Client, error) { FILE: internal/setutil/set.go function ToSet (line 4) | func ToSet(list []string) map[string]struct{} { function Difference (line 13) | func Difference(list []string, set map[string]struct{}) []string { function Intersection (line 24) | func Intersection(list []string, set map[string]struct{}) []string { FILE: internal/setutil/set_test.go function TestToSet (line 9) | func TestToSet(t *testing.T) { function TestDifference (line 63) | func TestDifference(t *testing.T) { function TestIntersection (line 132) | func TestIntersection(t *testing.T) { function TestSetOperationsCombined (line 204) | func TestSetOperationsCombined(t *testing.T) { FILE: internal/sliceutil/slice.go function MinInt (line 5) | func MinInt(nums []int) int { FILE: internal/sliceutil/slice_test.go function TestMinInt (line 7) | func TestMinInt(t *testing.T) { FILE: internal/testutil/testctr/testctr.go function EnsureTestEnv (line 50) | func EnsureTestEnv() int { function SkipIfDockerNotAvailable (line 122) | func SkipIfDockerNotAvailable(t *testing.T) { FILE: jsonschema/json.go type DataType (line 9) | type DataType constant Object (line 12) | Object DataType = "object" constant Number (line 13) | Number DataType = "number" constant Integer (line 14) | Integer DataType = "integer" constant String (line 15) | String DataType = "string" constant Array (line 16) | Array DataType = "array" constant Null (line 17) | Null DataType = "null" constant Boolean (line 18) | Boolean DataType = "boolean" type Definition (line 23) | type Definition struct method MarshalJSON (line 39) | func (d Definition) MarshalJSON() ([]byte, error) { FILE: jsonschema/json_test.go function TestDefinition_MarshalJSON (line 11) | func TestDefinition_MarshalJSON(t *testing.T) { //nolint:funlen function structToMap (line 198) | func structToMap(t *testing.T, v any) map[string]any { FILE: llms/anthropic/anthropicllm.go constant RoleUser (line 28) | RoleUser = "user" constant RoleAssistant (line 29) | RoleAssistant = "assistant" constant RoleSystem (line 30) | RoleSystem = "system" type LLM (line 33) | type LLM struct method Call (line 79) | func (o *LLM) Call(ctx context.Context, prompt string, options ...llms... method GenerateContent (line 84) | func (o *LLM) GenerateContent(ctx context.Context, messages []llms.Mes... method SupportsReasoning (line 441) | func (o *LLM) SupportsReasoning() bool { function New (line 45) | func New(opts ...Option) (*LLM, error) { function newClient (line 56) | func newClient(opts ...Option) (*anthropicclient.Client, error) { function generateCompletionsContent (line 100) | func generateCompletionsContent(ctx context.Context, o *LLM, messages []... function generateMessagesContent (line 138) | func generateMessagesContent(ctx context.Context, o *LLM, messages []llm... function processAnthropicResponse (line 172) | func processAnthropicResponse(result *anthropicclient.MessageResponsePay... function toolsToTools (line 255) | func toolsToTools(tools []llms.Tool) []anthropicclient.Tool { function processMessages (line 267) | func processMessages(messages []llms.MessageContent) ([]anthropicclient.... function handleSystemMessage (line 305) | func handleSystemMessage(msg llms.MessageContent) (string, error) { function handleHumanMessage (line 322) | func handleHumanMessage(msg llms.MessageContent) (anthropicclient.ChatMe... function handleAIMessage (line 386) | func handleAIMessage(msg llms.MessageContent) (anthropicclient.ChatMessa... type ToolResult (line 417) | type ToolResult struct function handleToolMessage (line 423) | func handleToolMessage(msg llms.MessageContent) (anthropicclient.ChatMes... function supportsReasoningForModel (line 447) | func supportsReasoningForModel(model string) bool { function extractThinkingOptions (line 479) | func extractThinkingOptions(o *LLM, opts *llms.CallOptions) ([]string, *... function extractThinkingFromText (line 537) | func extractThinkingFromText(fullText string) (thinkingContent, outputCo... FILE: llms/anthropic/anthropicllm_option.go constant tokenEnvVarName (line 8) | tokenEnvVarName = "ANTHROPIC_API_KEY" constant MaxTokensAnthropicSonnet35 (line 13) | MaxTokensAnthropicSonnet35 = "max-tokens-3-5-sonnet-2024-07-15" type options (line 15) | type options struct type Option (line 27) | type Option function WithToken (line 31) | func WithToken(token string) Option { function WithModel (line 38) | func WithModel(model string) Option { function WithBaseURL (line 46) | func WithBaseURL(baseURL string) Option { function WithHTTPClient (line 54) | func WithHTTPClient(client anthropicclient.Doer) Option { function WithLegacyTextCompletionsAPI (line 61) | func WithLegacyTextCompletionsAPI() Option { function WithAnthropicBetaHeader (line 68) | func WithAnthropicBetaHeader(value string) Option { FILE: llms/anthropic/anthropicllm_test.go function TestNew (line 10) | func TestNew(t *testing.T) { function TestProcessMessages (line 63) | func TestProcessMessages(t *testing.T) { function TestToolsToTools (line 146) | func TestToolsToTools(t *testing.T) { function TestOptions (line 180) | func TestOptions(t *testing.T) { function TestCall (line 222) | func TestCall(t *testing.T) { function TestGenerateMessagesContent_EmptyContent (line 227) | func TestGenerateMessagesContent_EmptyContent(t *testing.T) { FILE: llms/anthropic/errors.go type errorMapping (line 10) | type errorMapping struct function MapError (line 61) | func MapError(err error) error { FILE: llms/anthropic/internal/anthropicclient/anthropicclient.go constant DefaultBaseURL (line 16) | DefaultBaseURL = "https://api.anthropic.com/v1" constant defaultModel (line 18) | defaultModel = "claude-3-5-sonnet-20240620" type Client (line 25) | type Client struct method CreateCompletion (line 110) | func (c *Client) CreateCompletion(ctx context.Context, r *CompletionRe... method CreateMessage (line 150) | func (c *Client) CreateMessage(ctx context.Context, r *MessageRequest)... method setHeaders (line 171) | func (c *Client) setHeaders(req *http.Request, betaHeaders []string) { method do (line 189) | func (c *Client) do(ctx context.Context, path string, payloadBytes []b... method doWithHeaders (line 193) | func (c *Client) doWithHeaders(ctx context.Context, path string, paylo... method decodeError (line 221) | func (c *Client) decodeError(resp *http.Response) error { type Option (line 39) | type Option type Doer (line 42) | type Doer interface function WithHTTPClient (line 47) | func WithHTTPClient(client Doer) Option { function WithLegacyTextCompletionsAPI (line 56) | func WithLegacyTextCompletionsAPI(val bool) Option { function WithAnthropicBetaHeader (line 64) | func WithAnthropicBetaHeader(val string) Option { function New (line 72) | func New(token string, model string, baseURL string, opts ...Option) (*C... type CompletionRequest (line 90) | type CompletionRequest struct type Completion (line 105) | type Completion struct type MessageRequest (line 129) | type MessageRequest struct type errorMessage (line 214) | type errorMessage struct FILE: llms/anthropic/internal/anthropicclient/anthropicclient_test.go function TestClient_CreateCompletion (line 14) | func TestClient_CreateCompletion(t *testing.T) { function TestClient_CreateMessage (line 44) | func TestClient_CreateMessage(t *testing.T) { function TestClient_CreateMessageStream (line 75) | func TestClient_CreateMessageStream(t *testing.T) { function TestClient_WithAnthropicBetaHeader (line 112) | func TestClient_WithAnthropicBetaHeader(t *testing.T) { FILE: llms/anthropic/internal/anthropicclient/completions.go type completionPayload (line 14) | type completionPayload struct type CompletionResponsePayload (line 26) | type CompletionResponsePayload struct method setCompletionDefaults (line 34) | func (c *Client) setCompletionDefaults(payload *completionPayload) { method createCompletion (line 61) | func (c *Client) createCompletion(ctx context.Context, payload *completi... type CompletionEvent (line 91) | type CompletionEvent struct function parseStreamingCompletionResponse (line 96) | func parseStreamingCompletionResponse(ctx context.Context, r *http.Respo... FILE: llms/anthropic/internal/anthropicclient/messages.go type ChatMessage (line 31) | type ChatMessage struct type messagePayload (line 36) | type messagePayload struct type ThinkingConfig (line 55) | type ThinkingConfig struct type Tool (line 61) | type Tool struct type CacheControl (line 68) | type CacheControl struct type Content (line 73) | type Content interface type TextContent (line 77) | type TextContent struct method GetType (line 83) | func (tc TextContent) GetType() string { type ImageContent (line 87) | type ImageContent struct method GetType (line 93) | func (ic ImageContent) GetType() string { type ImageSource (line 97) | type ImageSource struct type ToolUseContent (line 103) | type ToolUseContent struct method GetType (line 113) | func (tuc ToolUseContent) GetType() string { type ToolResultContent (line 117) | type ToolResultContent struct method GetType (line 124) | func (trc ToolResultContent) GetType() string { type ThinkingContent (line 129) | type ThinkingContent struct method GetType (line 135) | func (tc ThinkingContent) GetType() string { type MessageResponsePayload (line 139) | type MessageResponsePayload struct method UnmarshalJSON (line 155) | func (m *MessageResponsePayload) UnmarshalJSON(data []byte) error { method setMessageDefaults (line 202) | func (c *Client) setMessageDefaults(payload *messagePayload) { method createMessage (line 228) | func (c *Client) createMessage(ctx context.Context, payload *messagePayl... type MessageEvent (line 258) | type MessageEvent struct function parseStreamingMessageResponse (line 263) | func parseStreamingMessageResponse(ctx context.Context, r *http.Response... function parseStreamEvent (line 302) | func parseStreamEvent(data string) (map[string]interface{}, error) { function processStreamEvent (line 308) | func processStreamEvent(ctx context.Context, event map[string]interface{... function handleMessageStartEvent (line 336) | func handleMessageStartEvent(event map[string]interface{}, response Mess... function handleContentBlockStartEvent (line 369) | func handleContentBlockStartEvent(event map[string]interface{}, response... function handleContentBlockDeltaEvent (line 418) | func handleContentBlockDeltaEvent(ctx context.Context, event map[string]... function handleTextDelta (line 451) | func handleTextDelta(ctx context.Context, delta map[string]interface{}, ... function handleJSONDelta (line 474) | func handleJSONDelta(delta map[string]interface{}, response MessageRespo... function handleThinkingDelta (line 489) | func handleThinkingDelta(ctx context.Context, delta map[string]interface... function handleContentBlockStop (line 513) | func handleContentBlockStop(event map[string]interface{}, response Messa... function handleMessageDeltaEvent (line 537) | func handleMessageDeltaEvent(event map[string]interface{}, response Mess... function getString (line 566) | func getString(m map[string]interface{}, key string) string { function getFloat64 (line 574) | func getFloat64(m map[string]interface{}, key string) (float64, error) { FILE: llms/anthropic/internal/anthropicclient/messages_test.go function Test_parseStreamingMessageResponse_withEmptyInput (line 12) | func Test_parseStreamingMessageResponse_withEmptyInput(t *testing.T) { function Test_parseStreamingMessageResponse_withInputJSONDeltas (line 41) | func Test_parseStreamingMessageResponse_withInputJSONDeltas(t *testing.T) { function createSSEResponse (line 74) | func createSSEResponse(data string) *http.Response { constant SSEDataWithEmptyInput (line 85) | SSEDataWithEmptyInput = `event: message_start constant SSEDataWithInputJSONDeltas (line 121) | SSEDataWithInputJSONDeltas = `event: message_start FILE: llms/anthropic/llmtest_test.go function TestLLM (line 10) | func TestLLM(t *testing.T) { FILE: llms/anthropic/options.go function WithPromptCaching (line 18) | func WithPromptCaching() llms.CallOption { function WithExtendedOutput (line 37) | func WithExtendedOutput() llms.CallOption { function WithInterleavedThinking (line 61) | func WithInterleavedThinking() llms.CallOption { function WithBetaHeader (line 83) | func WithBetaHeader(header string) llms.CallOption { function EphemeralCache (line 98) | func EphemeralCache() *llms.CacheControl { function EphemeralCacheOneHour (line 106) | func EphemeralCacheOneHour() *llms.CacheControl { FILE: llms/anthropic/options_test.go function TestEphemeralCache (line 11) | func TestEphemeralCache(t *testing.T) { function TestEphemeralCacheOneHour (line 23) | func TestEphemeralCacheOneHour(t *testing.T) { function TestWithPromptCaching (line 35) | func TestWithPromptCaching(t *testing.T) { function TestWithExtendedOutput (line 55) | func TestWithExtendedOutput(t *testing.T) { function TestWithInterleavedThinking (line 75) | func TestWithInterleavedThinking(t *testing.T) { function TestWithBetaHeader (line 95) | func TestWithBetaHeader(t *testing.T) { function TestMultipleBetaHeaders (line 115) | func TestMultipleBetaHeaders(t *testing.T) { FILE: llms/anthropic/prompt_caching_test.go function TestAnthropicPromptCaching (line 11) | func TestAnthropicPromptCaching(t *testing.T) { function TestAnthropicCacheControlInMessages (line 102) | func TestAnthropicCacheControlInMessages(t *testing.T) { function TestAnthropicBetaHeaders (line 142) | func TestAnthropicBetaHeaders(t *testing.T) { FILE: llms/bedrock/bedrock_tool_integration_test.go function TestBedrockAnthropicToolCalling (line 16) | func TestBedrockAnthropicToolCalling(t *testing.T) { //nolint:funlen function hasAWSCredentials (line 181) | func hasAWSCredentials() bool { FILE: llms/bedrock/bedrockllm.go constant defaultModel (line 14) | defaultModel = ModelAmazonTitanTextLiteV1 type LLM (line 17) | type LLM struct method Call (line 64) | func (l *LLM) Call(ctx context.Context, prompt string, options ...llms... method GenerateContent (line 69) | func (l *LLM) GenerateContent(ctx context.Context, messages []llms.Mes... function New (line 25) | func New(opts ...Option) (*LLM, error) { function NewWithContext (line 30) | func NewWithContext(ctx context.Context, opts ...Option) (*LLM, error) { function newClient (line 43) | func newClient(ctx context.Context, opts ...Option) (*options, *bedrockc... function processMessages (line 101) | func processMessages(messages []llms.MessageContent) ([]bedrockclient.Me... FILE: llms/bedrock/bedrockllm_option.go type Option (line 9) | type Option type options (line 11) | type options struct function WithModel (line 22) | func WithModel(modelID string) Option { function WithModelProvider (line 32) | func WithModelProvider(modelProvider string) Option { function WithClient (line 45) | func WithClient(client *bedrockruntime.Client) Option { function WithCallback (line 52) | func WithCallback(callbackHandler callbacks.Handler) Option { FILE: llms/bedrock/bedrockllm_test.go function hasExistingRecording (line 20) | func hasExistingRecording(t *testing.T) bool { function setUpTestWithTransport (line 28) | func setUpTestWithTransport(transport http.RoundTripper) (*bedrockruntim... function TestAmazonOutput (line 43) | func TestAmazonOutput(t *testing.T) { function TestAmazonNova (line 125) | func TestAmazonNova(t *testing.T) { function TestAnthropicNovaImage (line 192) | func TestAnthropicNovaImage(t *testing.T) { function TestBedrockWithTools (line 265) | func TestBedrockWithTools(t *testing.T) { //nolint:funlen function TestBedrockToolCallMultipleIterations (line 391) | func TestBedrockToolCallMultipleIterations(t *testing.T) { //nolint:funlen FILE: llms/bedrock/bedrockllm_unit_test.go function TestNew (line 12) | func TestNew(t *testing.T) { function TestNewWithContext (line 59) | func TestNewWithContext(t *testing.T) { function TestProcessMessages (line 70) | func TestProcessMessages(t *testing.T) { function TestOptions (line 142) | func TestOptions(t *testing.T) { function TestModelConstants (line 170) | func TestModelConstants(t *testing.T) { function containsProvider (line 193) | func containsProvider(model string) bool { type testCallbackHandler (line 204) | type testCallbackHandler struct method HandleLLMGenerateContentStart (line 206) | func (h *testCallbackHandler) HandleLLMGenerateContentStart(ctx contex... method HandleLLMGenerateContentEnd (line 208) | func (h *testCallbackHandler) HandleLLMGenerateContentEnd(ctx context.... method HandleLLMError (line 210) | func (h *testCallbackHandler) HandleLLMError(ctx context.Context, err ... method HandleText (line 211) | func (h *testCallbackHandler) HandleText(ctx context.Context, text str... method HandleLLMStart (line 212) | func (h *testCallbackHandler) HandleLLMStart(ctx context.Context, prom... method HandleChainStart (line 213) | func (h *testCallbackHandler) HandleChainStart(ctx context.Context, in... method HandleChainEnd (line 214) | func (h *testCallbackHandler) HandleChainEnd(ctx context.Context, outp... method HandleChainError (line 215) | func (h *testCallbackHandler) HandleChainError(ctx context.Context, er... method HandleToolStart (line 216) | func (h *testCallbackHandler) HandleToolStart(ctx context.Context, inp... method HandleToolEnd (line 217) | func (h *testCallbackHandler) HandleToolEnd(ctx context.Context, outpu... method HandleToolError (line 218) | func (h *testCallbackHandler) HandleToolError(ctx context.Context, err... method HandleAgentAction (line 219) | func (h *testCallbackHandler) HandleAgentAction(ctx context.Context, a... method HandleAgentFinish (line 220) | func (h *testCallbackHandler) HandleAgentFinish(ctx context.Context, f... method HandleRetrieverStart (line 221) | func (h *testCallbackHandler) HandleRetrieverStart(ctx context.Context... method HandleRetrieverEnd (line 222) | func (h *testCallbackHandler) HandleRetrieverEnd(ctx context.Context, ... method HandleStreamingFunc (line 224) | func (h *testCallbackHandler) HandleStreamingFunc(ctx context.Context,... FILE: llms/bedrock/errors.go type errorMapping (line 10) | type errorMapping struct function MapError (line 61) | func MapError(err error) error { FILE: llms/bedrock/internal/bedrockclient/bedrockclient.go type Client (line 13) | type Client struct method CreateCompletion (line 74) | func (c *Client) CreateCompletion(ctx context.Context, type Message (line 22) | type Message struct function getProvider (line 37) | func getProvider(modelID string) string { function NewClient (line 66) | func NewClient(client *bedrockruntime.Client) *Client { function processInputMessagesGeneric (line 103) | func processInputMessagesGeneric(messages []Message) string { function getMaxTokens (line 124) | func getMaxTokens(maxTokens, defaultValue int) int { FILE: llms/bedrock/internal/bedrockclient/bedrockclient_integration_test.go type mockBedrockClient (line 20) | type mockBedrockClient struct method InvokeModel (line 25) | func (m *mockBedrockClient) InvokeModel(ctx context.Context, params *b... method InvokeModelWithResponseStream (line 32) | func (m *mockBedrockClient) InvokeModelWithResponseStream(ctx context.... type mockEventStream (line 40) | type mockEventStream struct method Events (line 46) | func (m *mockEventStream) Events() <-chan types.ResponseStream { method Close (line 50) | func (m *mockEventStream) Close() error { method Err (line 58) | func (m *mockEventStream) Err() error { function TestClient_CreateCompletion (line 63) | func TestClient_CreateCompletion(t *testing.T) { function testCreateCompletionWithMock (line 379) | func testCreateCompletionWithMock(ctx context.Context, client *mockBedro... function TestClient_CreateCompletion_Streaming (line 398) | func TestClient_CreateCompletion_Streaming(t *testing.T) { function TestClient_CreateCompletion_StreamingErrors (line 530) | func TestClient_CreateCompletion_StreamingErrors(t *testing.T) { function TestClient_CreateCompletion_EdgeCases (line 592) | func TestClient_CreateCompletion_EdgeCases(t *testing.T) { function TestNewClient (line 720) | func TestNewClient(t *testing.T) { function TestClient_CreateCompletion_StreamingCancellation (line 729) | func TestClient_CreateCompletion_StreamingCancellation(t *testing.T) { function testCreateAi21CompletionWithMock (line 799) | func testCreateAi21CompletionWithMock(ctx context.Context, client *mockB... function testCreateAmazonCompletionWithMock (line 864) | func testCreateAmazonCompletionWithMock(ctx context.Context, client *moc... function testCreateAnthropicCompletionWithMock (line 920) | func testCreateAnthropicCompletionWithMock(ctx context.Context, client *... function testCreateCohereCompletionWithMock (line 988) | func testCreateCohereCompletionWithMock(ctx context.Context, client *moc... function testCreateMetaCompletionWithMock (line 1040) | func testCreateMetaCompletionWithMock(ctx context.Context, client *mockB... function testParseStreamingCompletionResponse (line 1089) | func testParseStreamingCompletionResponse(ctx context.Context, stream *m... FILE: llms/bedrock/internal/bedrockclient/bedrockclient_nova_test.go function TestGetProvider_NovaModels (line 7) | func TestGetProvider_NovaModels(t *testing.T) { function TestGetProvider_EdgeCases (line 87) | func TestGetProvider_EdgeCases(t *testing.T) { FILE: llms/bedrock/internal/bedrockclient/bedrockclient_test.go function TestGetProvider (line 15) | func TestGetProvider(t *testing.T) { function TestProcessInputMessagesGeneric (line 61) | func TestProcessInputMessagesGeneric(t *testing.T) { function TestGetMaxTokens (line 114) | func TestGetMaxTokens(t *testing.T) { function TestCreateCompletion_UnsupportedProvider (line 149) | func TestCreateCompletion_UnsupportedProvider(t *testing.T) { function TestCreateAi21Completion_RequestStructure (line 167) | func TestCreateAi21Completion_RequestStructure(t *testing.T) { function TestCreateAmazonCompletion_RequestStructure (line 218) | func TestCreateAmazonCompletion_RequestStructure(t *testing.T) { function TestProcessInputMessagesAnthropic (line 256) | func TestProcessInputMessagesAnthropic(t *testing.T) { function TestGetAnthropicRole (line 347) | func TestGetAnthropicRole(t *testing.T) { function TestGetAnthropicInputContent (line 400) | func TestGetAnthropicInputContent(t *testing.T) { function TestCreateCohereCompletion_RequestStructure (line 445) | func TestCreateCohereCompletion_RequestStructure(t *testing.T) { function TestCreateMetaCompletion_RequestStructure (line 486) | func TestCreateMetaCompletion_RequestStructure(t *testing.T) { function TestAi21ResponseParsing (line 518) | func TestAi21ResponseParsing(t *testing.T) { function TestAmazonResponseParsing (line 580) | func TestAmazonResponseParsing(t *testing.T) { function TestCohereResponseParsing (line 610) | func TestCohereResponseParsing(t *testing.T) { function TestMetaResponseParsing (line 642) | func TestMetaResponseParsing(t *testing.T) { function TestAnthropicResponseParsing (line 663) | func TestAnthropicResponseParsing(t *testing.T) { function TestEmptyResponses (line 702) | func TestEmptyResponses(t *testing.T) { function TestAnthropicStreamingResponseChunk (line 731) | func TestAnthropicStreamingResponseChunk(t *testing.T) { function TestBedrockRequestStructures (line 829) | func TestBedrockRequestStructures(t *testing.T) { FILE: llms/bedrock/internal/bedrockclient/provider_ai21.go type ai21TextGenerationInput (line 13) | type ai21TextGenerationInput struct type ai21TextGenerationOutput (line 41) | type ai21TextGenerationOutput struct constant Ai21CompletionReasonLength (line 73) | Ai21CompletionReasonLength = "length" constant Ai21CompletionReasonStop (line 74) | Ai21CompletionReasonStop = "stop" constant Ai21CompletionReasonEndOfText (line 75) | Ai21CompletionReasonEndOfText = "endoftext" function createAi21Completion (line 78) | func createAi21Completion(ctx context.Context, client *bedrockruntime.Cl... FILE: llms/bedrock/internal/bedrockclient/provider_amazon.go type amazonTextGenerationConfigInput (line 16) | type amazonTextGenerationConfigInput struct type amazonTextGenerationInput (line 29) | type amazonTextGenerationInput struct type amazonTextGenerationOutput (line 37) | type amazonTextGenerationOutput struct constant AmazonCompletionReasonFinish (line 54) | AmazonCompletionReasonFinish = "FINISH" constant AmazonCompletionReasonMaxTokens (line 55) | AmazonCompletionReasonMaxTokens = "LENGTH" constant AmazonCompletionReasonContentFiltered (line 56) | AmazonCompletionReasonContentFiltered = "CONTENT_FILTERED" function createAmazonCompletion (line 59) | func createAmazonCompletion(ctx context.Context, FILE: llms/bedrock/internal/bedrockclient/provider_anthropic.go type anthropicBinGenerationInputSource (line 21) | type anthropicBinGenerationInputSource struct type anthropicTextGenerationInputContent (line 34) | type anthropicTextGenerationInputContent struct type anthropicTextGenerationInputMessage (line 51) | type anthropicTextGenerationInputMessage struct type anthropicTextGenerationInput (line 61) | type anthropicTextGenerationInput struct type anthropicTextGenerationOutput (line 87) | type anthropicTextGenerationOutput struct type anthropicContentBlock (line 109) | type anthropicContentBlock struct constant AnthropicCompletionReasonEndTurn (line 120) | AnthropicCompletionReasonEndTurn = "end_turn" constant AnthropicCompletionReasonMaxTokens (line 121) | AnthropicCompletionReasonMaxTokens = "max_tokens" constant AnthropicCompletionReasonStopSequence (line 122) | AnthropicCompletionReasonStopSequence = "stop_sequence" constant AnthropicLatestVersion (line 127) | AnthropicLatestVersion = "bedrock-2023-05-31" constant AnthropicSystem (line 132) | AnthropicSystem = "system" constant AnthropicRoleUser (line 133) | AnthropicRoleUser = "user" constant AnthropicRoleAssistant (line 134) | AnthropicRoleAssistant = "assistant" constant AnthropicMessageTypeText (line 139) | AnthropicMessageTypeText = "text" constant AnthropicMessageTypeImage (line 140) | AnthropicMessageTypeImage = "image" constant AnthropicMessageTypeToolUse (line 141) | AnthropicMessageTypeToolUse = "tool_use" constant AnthropicMessageTypeToolResult (line 142) | AnthropicMessageTypeToolResult = "tool_result" function createAnthropicCompletion (line 145) | func createAnthropicCompletion(ctx context.Context, type streamingCompletionResponseChunk (line 266) | type streamingCompletionResponseChunk struct function parseStreamingCompletionResponse (line 299) | func parseStreamingCompletionResponse(ctx context.Context, client *bedro... function processInputMessagesAnthropic (line 348) | func processInputMessagesAnthropic(messages []Message) ([]*anthropicText... function getAnthropicRole (line 399) | func getAnthropicRole(role llms.ChatMessageType) (string, error) { function getAnthropicInputContent (line 418) | func getAnthropicInputContent(message Message) anthropicTextGenerationIn... FILE: llms/bedrock/internal/bedrockclient/provider_cohere.go type cohereTextGenerationInput (line 16) | type cohereTextGenerationInput struct constant CohereCompletionReasonComplete (line 38) | CohereCompletionReasonComplete = "COMPLETE" constant CohereCompletionReasonMaxTokens (line 39) | CohereCompletionReasonMaxTokens = "MAX_TOKENS" constant CohereCompletionReasonError (line 40) | CohereCompletionReasonError = "ERROR" constant CohereCompletionReasonErrorToxic (line 41) | CohereCompletionReasonErrorToxic = "ERROR_TOXIC" type cohereTextGenerationOutput (line 45) | type cohereTextGenerationOutput struct type cohereTextGenerationOutputGeneration (line 53) | type cohereTextGenerationOutputGeneration struct function createCohereCompletion (line 64) | func createCohereCompletion(ctx context.Context, FILE: llms/bedrock/internal/bedrockclient/provider_meta.go type metaTextGenerationInput (line 15) | type metaTextGenerationInput struct type metaTextGenerationOutput (line 29) | type metaTextGenerationOutput struct constant MetaCompletionReasonStop (line 43) | MetaCompletionReasonStop = "stop" constant MetaCompletionReasonLength (line 44) | MetaCompletionReasonLength = "length" function createMetaCompletion (line 47) | func createMetaCompletion(ctx context.Context, FILE: llms/bedrock/internal/bedrockclient/provider_nova.go type novaBinGenerationInputSource (line 21) | type novaBinGenerationInputSource struct type novaImageInput (line 27) | type novaImageInput struct type novaTextGenerationInputContent (line 37) | type novaTextGenerationInputContent struct type novaTextGenerationInputMessage (line 45) | type novaTextGenerationInputMessage struct type novaSystemPrompt (line 56) | type novaSystemPrompt struct type novaInferenceConfigInput (line 61) | type novaInferenceConfigInput struct type novaTextGenerationInput (line 74) | type novaTextGenerationInput struct type novaTextGenerationOutput (line 84) | type novaTextGenerationOutput struct constant NovaCompletionReasonEndTurn (line 105) | NovaCompletionReasonEndTurn = "end_turn" constant NovaCompletionReasonStopSequence (line 106) | NovaCompletionReasonStopSequence = "stop_sequence" constant NovaCompletionReasonMaxTokens (line 107) | NovaCompletionReasonMaxTokens = "max_tokens" constant NovaCompletionReasonContentFiltered (line 108) | NovaCompletionReasonContentFiltered = "content_filtered" constant NovaSystem (line 113) | NovaSystem = "system" constant NovaRoleUser (line 114) | NovaRoleUser = "user" constant NovaRoleAssistant (line 115) | NovaRoleAssistant = "assistant" constant NovaMessageTypeText (line 120) | NovaMessageTypeText = "text" constant NovaMessageTypeImage (line 121) | NovaMessageTypeImage = "image" function novaInputToJSON (line 124) | func novaInputToJSON(inputContents []*novaTextGenerationInputMessage, sy... function parseNovaResponseBody (line 138) | func parseNovaResponseBody(body []byte) (*novaTextGenerationOutput, erro... function createNovaCompletion (line 144) | func createNovaCompletion(ctx context.Context, function processInputMessagesNova (line 207) | func processInputMessagesNova(messages []Message) ([]*novaTextGeneration... function getNovaRole (line 255) | func getNovaRole(role llms.ChatMessageType) (string, error) { function getNovaInputContent (line 274) | func getNovaInputContent(message Message) novaTextGenerationInputContent { function mimeTypeToFormat (line 292) | func mimeTypeToFormat(mimeType string) string { FILE: llms/bedrock/internal/bedrockclient/tool_call_test.go function TestAnthropicToolCallSupport (line 11) | func TestAnthropicToolCallSupport(t *testing.T) { FILE: llms/bedrock/internal/bedrockclient/tools.go type BedrockTool (line 11) | type BedrockTool struct type BedrockToolChoice (line 18) | type BedrockToolChoice struct type BedrockToolCall (line 24) | type BedrockToolCall struct function convertToolsToBedrockTools (line 32) | func convertToolsToBedrockTools(tools []llms.Tool) ([]BedrockTool, error) { function convertToolChoiceToBedrockToolChoice (line 52) | func convertToolChoiceToBedrockToolChoice(toolChoice interface{}) (*Bedr... function convertBedrockToolCallToLLMToolCall (line 85) | func convertBedrockToolCallToLLMToolCall(bedrockCall BedrockToolCall) (l... FILE: llms/bedrock/llmtest_test.go function TestLLM (line 10) | func TestLLM(t *testing.T) { FILE: llms/bedrock/models_list.go constant ModelAi21J2UltraV1 (line 13) | ModelAi21J2UltraV1 = "ai21.j2-ultra-v1" constant ModelAi21J2MidV1 (line 24) | ModelAi21J2MidV1 = "ai21.j2-mid-v1" constant ModelAmazonTitanTextLiteV1 (line 31) | ModelAmazonTitanTextLiteV1 = "amazon.titan-text-lite-v1" constant ModelAmazonTitanTextExpressV1 (line 40) | ModelAmazonTitanTextExpressV1 = "amazon.titan-text-express-v1" constant ModelAmazonNovaMicroV1 (line 49) | ModelAmazonNovaMicroV1 = "us.amazon.nova-micro-v1:0" constant ModelAmazonNovaLiteV1 (line 59) | ModelAmazonNovaLiteV1 = "us.amazon.nova-lite-v1:0" constant ModelAmazonNovaProV1 (line 73) | ModelAmazonNovaProV1 = "us.amazon.nova-pro-v1:0" constant ModelAnthropicClaudeV3Sonnet (line 84) | ModelAnthropicClaudeV3Sonnet = "anthropic.claude-3-sonnet-20240229-v1:0" constant ModelAnthropicClaudeV3Haiku (line 93) | ModelAnthropicClaudeV3Haiku = "anthropic.claude-3-haiku-20240307-v1:0" constant ModelAnthropicClaudeV21 (line 100) | ModelAnthropicClaudeV21 = "anthropic.claude-v2:1" constant ModelAnthropicClaudeV2 (line 107) | ModelAnthropicClaudeV2 = "anthropic.claude-v2" constant ModelAnthropicClaudeInstantV1 (line 114) | ModelAnthropicClaudeInstantV1 = "anthropic.claude-instant-v1" constant ModelCohereCommandTextV14 (line 121) | ModelCohereCommandTextV14 = "cohere.command-text-v14" constant ModelCohereCommandLightTextV14 (line 128) | ModelCohereCommandLightTextV14 = "cohere.command-light-text-v14" constant ModelMetaLlama213bChatV1 (line 137) | ModelMetaLlama213bChatV1 = "meta.llama2-13b-chat-v1" constant ModelMetaLlama270bChatV1 (line 146) | ModelMetaLlama270bChatV1 = "meta.llama2-70b-chat-v1" constant ModelMetaLlama38bInstructV1 (line 155) | ModelMetaLlama38bInstructV1 = "meta.llama3-8b-instruct-v1:0" constant ModelMetaLlama370bInstructV1 (line 164) | ModelMetaLlama370bInstructV1 = "meta.llama3-70b-instruct-v1:0" FILE: llms/bedrock/tool_call_test.go function TestToolCallProcessing (line 10) | func TestToolCallProcessing(t *testing.T) { FILE: llms/cache/cache.go type Backend (line 13) | type Backend interface type Cacher (line 21) | type Cacher struct method Call (line 45) | func (c *Cacher) Call(ctx context.Context, prompt string, options ...l... method GenerateContent (line 52) | func (c *Cacher) GenerateContent(ctx context.Context, messages []llms.... function New (line 31) | func New(llm llms.Model, backend Backend) *Cacher { function hashKeyForCache (line 86) | func hashKeyForCache(messages []llms.MessageContent, opts llms.CallOptio... FILE: llms/cache/cache_test.go function TestCache_hashKeyForCache (line 11) | func TestCache_hashKeyForCache(t *testing.T) { function TestCache_Call (line 66) | func TestCache_Call(t *testing.T) { function TestCache_Call_Streaming (line 122) | func TestCache_Call_Streaming(t *testing.T) { FILE: llms/cache/inmemory/inmemory.go type InMemory (line 11) | type InMemory struct method Get (line 32) | func (im *InMemory) Get(_ context.Context, key string) *llms.ContentRe... method Put (line 41) | func (im *InMemory) Put(_ context.Context, key string, value *llms.Con... function New (line 19) | func New(ctx context.Context, opts ...Option) (*InMemory, error) { FILE: llms/cache/inmemory/inmemory_test.go function TestInMemory (line 14) | func TestInMemory(t *testing.T) { FILE: llms/cache/inmemory/options.go type Option (line 11) | type Option type Options (line 14) | type Options struct function WithCacheOptions (line 22) | func WithCacheOptions(opts ...cache.Option[string, *llms.ContentResponse... function WithItemOptions (line 34) | func WithItemOptions(opts ...cache.ItemOption) Option { function WithExpiration (line 44) | func WithExpiration(expiration time.Duration) Option { function applyOptions (line 52) | func applyOptions(opts ...Option) (*Options, error) { FILE: llms/cache/mocks_test.go function newMockLLM (line 11) | func newMockLLM(response *llms.ContentResponse, err error) *mockLLM { type mockLLM (line 20) | type mockLLM struct method Call (line 26) | func (m *mockLLM) Call(ctx context.Context, prompt string, options ...... method GenerateContent (line 30) | func (m *mockLLM) GenerateContent(ctx context.Context, _ []llms.Messag... function newMockCache (line 49) | func newMockCache() *mockCache { type mockCache (line 58) | type mockCache struct method Get (line 64) | func (m *mockCache) Get(_ context.Context, key string) *llms.ContentRe... method Put (line 71) | func (m *mockCache) Put(_ context.Context, key string, response *llms.... FILE: llms/chat_messages.go type ChatMessageType (line 12) | type ChatMessageType constant ChatMessageTypeAI (line 20) | ChatMessageTypeAI ChatMessageType = "ai" constant ChatMessageTypeHuman (line 22) | ChatMessageTypeHuman ChatMessageType = "human" constant ChatMessageTypeSystem (line 24) | ChatMessageTypeSystem ChatMessageType = "system" constant ChatMessageTypeGeneric (line 26) | ChatMessageTypeGeneric ChatMessageType = "generic" constant ChatMessageTypeFunction (line 28) | ChatMessageTypeFunction ChatMessageType = "function" constant ChatMessageTypeTool (line 30) | ChatMessageTypeTool ChatMessageType = "tool" type ChatMessage (line 34) | type ChatMessage interface type Named (line 42) | type Named interface type AIChatMessage (line 57) | type AIChatMessage struct method GetType (line 71) | func (m AIChatMessage) GetType() ChatMessageType { return ChatMe... method GetContent (line 72) | func (m AIChatMessage) GetContent() string { return m.Cont... method GetFunctionCall (line 73) | func (m AIChatMessage) GetFunctionCall() *FunctionCall { return m.Func... type HumanChatMessage (line 76) | type HumanChatMessage struct method GetType (line 80) | func (m HumanChatMessage) GetType() ChatMessageType { return ChatMessa... method GetContent (line 81) | func (m HumanChatMessage) GetContent() string { return m.Content } type SystemChatMessage (line 84) | type SystemChatMessage struct method GetType (line 88) | func (m SystemChatMessage) GetType() ChatMessageType { return ChatMess... method GetContent (line 89) | func (m SystemChatMessage) GetContent() string { return m.Content } type GenericChatMessage (line 92) | type GenericChatMessage struct method GetType (line 98) | func (m GenericChatMessage) GetType() ChatMessageType { return ChatMes... method GetContent (line 99) | func (m GenericChatMessage) GetContent() string { return m.Conte... method GetName (line 100) | func (m GenericChatMessage) GetName() string { return m.Name } type FunctionChatMessage (line 104) | type FunctionChatMessage struct method GetType (line 111) | func (m FunctionChatMessage) GetType() ChatMessageType { return ChatMe... method GetContent (line 112) | func (m FunctionChatMessage) GetContent() string { return m.Cont... method GetName (line 113) | func (m FunctionChatMessage) GetName() string { return m.Name } type ToolChatMessage (line 116) | type ToolChatMessage struct method GetType (line 123) | func (m ToolChatMessage) GetType() ChatMessageType { return ChatMessag... method GetContent (line 124) | func (m ToolChatMessage) GetContent() string { return m.Content } method GetID (line 125) | func (m ToolChatMessage) GetID() string { return m.ID } function GetBufferString (line 128) | func GetBufferString(messages []ChatMessage, humanPrefix string, aiPrefi... function getMessageRole (line 148) | func getMessageRole(m ChatMessage, humanPrefix, aiPrefix string) (string... type ChatMessageModelData (line 173) | type ChatMessageModelData struct type ChatMessageModel (line 178) | type ChatMessageModel struct method ToChatMessage (line 183) | func (c ChatMessageModel) ToChatMessage() ChatMessage { function ConvertChatMessageToModel (line 196) | func ConvertChatMessageToModel(m ChatMessage) ChatMessageModel { FILE: llms/chat_messages_test.go function TestGetBufferString (line 9) | func TestGetBufferString(t *testing.T) { type unsupportedChatMessage (line 67) | type unsupportedChatMessage struct method GetType (line 69) | func (m unsupportedChatMessage) GetType() llms.ChatMessageType { retur... method GetContent (line 70) | func (m unsupportedChatMessage) GetContent() string { retur... FILE: llms/cloudflare/cloudflarellm.go type LLM (line 19) | type LLM struct method Call (line 56) | func (o *LLM) Call(ctx context.Context, prompt string, options ...llms... method GenerateContent (line 61) | func (o *LLM) GenerateContent(ctx context.Context, messages []llms.Mes... method CreateEmbedding (line 147) | func (o *LLM) CreateEmbedding(ctx context.Context, inputTexts []string... function New (line 28) | func New(opts ...Option) (*LLM, error) { function typeToRole (line 166) | func typeToRole(typ llms.ChatMessageType) cloudflareclient.Role { FILE: llms/cloudflare/cloudflarellm_test.go function TestNew (line 16) | func TestNew(t *testing.T) { function TestNewWithServerURL (line 77) | func TestNewWithServerURL(t *testing.T) { function TestTypeToRole (line 94) | func TestTypeToRole(t *testing.T) { function TestGenerateContentErrors (line 147) | func TestGenerateContentErrors(t *testing.T) { function TestCall (line 214) | func TestCall(t *testing.T) { function TestCreateEmbedding (line 249) | func TestCreateEmbedding(t *testing.T) { function TestGenerateContentWithSystemPrompt (line 325) | func TestGenerateContentWithSystemPrompt(t *testing.T) { function TestGenerateContentWithErrors (line 369) | func TestGenerateContentWithErrors(t *testing.T) { FILE: llms/cloudflare/internal/cloudflareclient/api.go method CreateEmbedding (line 15) | func (c *Client) CreateEmbedding(ctx context.Context, texts *CreateEmbed... constant maxBufferSize (line 53) | maxBufferSize = 512 * 1000 method GenerateContent (line 56) | func (c *Client) GenerateContent(ctx context.Context, request *GenerateC... method Summarize (line 143) | func (c *Client) Summarize(ctx context.Context, inputText string, maxLen... FILE: llms/cloudflare/internal/cloudflareclient/api_test.go function TestClient_GenerateContent (line 12) | func TestClient_GenerateContent(t *testing.T) { FILE: llms/cloudflare/internal/cloudflareclient/client.go type httpClient (line 8) | type httpClient interface type Client (line 12) | type Client struct function NewClient (line 23) | func NewClient(client httpClient, accountID, baseURL, token, modelName, ... FILE: llms/cloudflare/internal/cloudflareclient/cloudflareclient_test.go constant testBaseURL (line 15) | testBaseURL = "https://api.cloudflare.com/client/v4/accounts" function requireCloudflareCredentialsOrHTTPRR (line 17) | func requireCloudflareCredentialsOrHTTPRR(t *testing.T) *httprr.RecordRe... function TestClient_GenerateContentWithHTTPRR (line 38) | func TestClient_GenerateContentWithHTTPRR(t *testing.T) { function TestClient_GenerateContentStream (line 75) | func TestClient_GenerateContentStream(t *testing.T) { function TestClient_CreateEmbedding (line 116) | func TestClient_CreateEmbedding(t *testing.T) { FILE: llms/cloudflare/internal/cloudflareclient/model.go type GenerateContentRequest (line 5) | type GenerateContentRequest struct type Message (line 14) | type Message struct type GenerateContentResponse (line 19) | type GenerateContentResponse struct type StreamingResponse (line 28) | type StreamingResponse struct type APIError (line 33) | type APIError struct type SummarizeRequest (line 37) | type SummarizeRequest struct type SummarizeResponse (line 42) | type SummarizeResponse struct type CreateEmbeddingRequest (line 49) | type CreateEmbeddingRequest struct type CreateEmbeddingResponse (line 53) | type CreateEmbeddingResponse struct FILE: llms/cloudflare/internal/cloudflareclient/role.go constant RoleSystem (line 4) | RoleSystem = "system" constant RoleTypeUser (line 5) | RoleTypeUser = "user" constant RoleAssistant (line 6) | RoleAssistant = "assistant" type Role (line 9) | type Role FILE: llms/cloudflare/llmtest_test.go function TestLLM (line 10) | func TestLLM(t *testing.T) { FILE: llms/cloudflare/options.go type options (line 9) | type options struct type Option (line 19) | type Option function WithModel (line 22) | func WithModel(model string) Option { function WithSystemPrompt (line 32) | func WithSystemPrompt(p string) Option { function WithAccountID (line 39) | func WithAccountID(accountID string) Option { function WithServerURL (line 46) | func WithServerURL(rawURL string) Option { function WithCloudflareServerURL (line 57) | func WithCloudflareServerURL(serverURL *url.URL) Option { function WithToken (line 64) | func WithToken(token string) Option { function WithEmbeddingModel (line 70) | func WithEmbeddingModel(model string) Option { function WithHTTPClient (line 77) | func WithHTTPClient(client *http.Client) Option { FILE: llms/cohere/coherellm.go type LLM (line 20) | type LLM struct method Call (line 27) | func (o *LLM) Call(ctx context.Context, prompt string, options ...llms... method GenerateContent (line 32) | func (o *LLM) GenerateContent(ctx context.Context, messages []llms.Mes... function New (line 71) | func New(opts ...Option) (*LLM, error) { function newClient (line 78) | func newClient(opts ...Option) (*cohereclient.Client, error) { FILE: llms/cohere/coherellm_option.go constant tokenEnvVarName (line 4) | tokenEnvVarName = "COHERE_API_KEY" constant modelEnvVarName (line 5) | modelEnvVarName = "COHERE_MODEL" constant baseURLEnvVarName (line 6) | baseURLEnvVarName = "COHERE_BASE_URL" type options (line 9) | type options struct type Option (line 15) | type Option function WithToken (line 19) | func WithToken(token string) Option { function WithModel (line 27) | func WithModel(model string) Option { function WithBaseURL (line 36) | func WithBaseURL(baseURL string) Option { FILE: llms/cohere/coherellm_test.go function newClientWithHTTPClient (line 16) | func newClientWithHTTPClient(httpClient *http.Client, opts ...Option) (*... function TestNew (line 34) | func TestNew(t *testing.T) { function TestCall (line 108) | func TestCall(t *testing.T) { function TestGenerateContent (line 138) | func TestGenerateContent(t *testing.T) { type testCallbackHandler (line 184) | type testCallbackHandler struct method HandleLLMGenerateContentStart (line 190) | func (h *testCallbackHandler) HandleLLMGenerateContentStart(ctx contex... method HandleLLMGenerateContentEnd (line 194) | func (h *testCallbackHandler) HandleLLMGenerateContentEnd(ctx context.... method HandleLLMError (line 198) | func (h *testCallbackHandler) HandleLLMError(ctx context.Context, err ... method HandleText (line 202) | func (h *testCallbackHandler) HandleText(ctx context.Context, text str... method HandleLLMStart (line 203) | func (h *testCallbackHandler) HandleLLMStart(ctx context.Context, prom... method HandleChainStart (line 204) | func (h *testCallbackHandler) HandleChainStart(ctx context.Context, in... method HandleChainEnd (line 205) | func (h *testCallbackHandler) HandleChainEnd(ctx context.Context, outp... method HandleChainError (line 206) | func (h *testCallbackHandler) HandleChainError(ctx context.Context, er... method HandleToolStart (line 207) | func (h *testCallbackHandler) HandleToolStart(ctx context.Context, inp... method HandleToolEnd (line 208) | func (h *testCallbackHandler) HandleToolEnd(ctx context.Context, outpu... method HandleToolError (line 209) | func (h *testCallbackHandler) HandleToolError(ctx context.Context, err... method HandleAgentAction (line 210) | func (h *testCallbackHandler) HandleAgentAction(ctx context.Context, a... method HandleAgentFinish (line 211) | func (h *testCallbackHandler) HandleAgentFinish(ctx context.Context, f... method HandleRetrieverStart (line 212) | func (h *testCallbackHandler) HandleRetrieverStart(ctx context.Context... method HandleRetrieverEnd (line 213) | func (h *testCallbackHandler) HandleRetrieverEnd(ctx context.Context, ... method HandleStreamingFunc (line 215) | func (h *testCallbackHandler) HandleStreamingFunc(ctx context.Context,... function TestCallbacksHandler (line 217) | func TestCallbacksHandler(t *testing.T) { type mockHTTPClient (line 272) | type mockHTTPClient struct method Do (line 277) | func (m *mockHTTPClient) Do(req *http.Request) (*http.Response, error) { type mockBody (line 285) | type mockBody struct method Read (line 294) | func (m *mockBody) Read(p []byte) (n int, err error) { method Close (line 303) | func (m *mockBody) Close() error { function newMockBody (line 290) | func newMockBody(content string) *mockBody { FILE: llms/cohere/errors.go type errorMapping (line 10) | type errorMapping struct function MapError (line 61) | func MapError(err error) error { FILE: llms/cohere/internal/cohereclient/cohereclient.go type Client (line 21) | type Client struct method CreateGeneration (line 90) | func (c *Client) CreateGeneration(ctx context.Context, r *GenerationRe... type Option (line 29) | type Option type Doer (line 32) | type Doer interface function WithHTTPClient (line 37) | func WithHTTPClient(client Doer) Option { function New (line 45) | func New(token string, baseURL string, model string, opts ...Option) (*C... type GenerationRequest (line 68) | type GenerationRequest struct type Generation (line 72) | type Generation struct type generateRequestPayload (line 76) | type generateRequestPayload struct type generateResponsePayload (line 81) | type generateResponsePayload struct FILE: llms/cohere/internal/cohereclient/cohereclient_test.go function setupTestClient (line 15) | func setupTestClient(t *testing.T, baseURL, model string) (*Client, *htt... function TestClient_CreateGeneration (line 31) | func TestClient_CreateGeneration(t *testing.T) { function TestClient_CreateGenerationWithCustomModel (line 48) | func TestClient_CreateGenerationWithCustomModel(t *testing.T) { FILE: llms/cohere/llmtest_test.go function TestLLM (line 10) | func TestLLM(t *testing.T) { FILE: llms/compliance/example_test.go function TestFakeProviderCompliance (line 12) | func TestFakeProviderCompliance(t *testing.T) { function TestOpenAIComplianceExample (line 46) | func TestOpenAIComplianceExample(t *testing.T) { FILE: llms/compliance/suite.go type Suite (line 13) | type Suite struct method Skip (line 38) | func (s *Suite) Skip(testName string) { method Run (line 43) | func (s *Suite) Run(t *testing.T) { method testBasicGeneration (line 65) | func (s *Suite) testBasicGeneration(t *testing.T) { method testMultiMessage (line 88) | func (s *Suite) testMultiMessage(t *testing.T) { method testTemperature (line 113) | func (s *Suite) testTemperature(t *testing.T) { method testMaxTokens (line 149) | func (s *Suite) testMaxTokens(t *testing.T) { method testStopSequences (line 174) | func (s *Suite) testStopSequences(t *testing.T) { function NewSuite (line 28) | func NewSuite(provider string, model llms.Model) *Suite { FILE: llms/count_tokens.go constant _tokenApproximation (line 10) | _tokenApproximation = 4 constant _gpt35TurboContextSize (line 14) | _gpt35TurboContextSize = 16385 constant _gpt35Turbo16KContextSize (line 15) | _gpt35Turbo16KContextSize = 16385 constant _gpt4ContextSize (line 16) | _gpt4ContextSize = 8192 constant _gpt432KContextSize (line 17) | _gpt432KContextSize = 32768 constant _gpt4TurboContextSize (line 18) | _gpt4TurboContextSize = 128000 constant _gpt4oContextSize (line 19) | _gpt4oContextSize = 128000 constant _gpt4oMiniContextSize (line 20) | _gpt4oMiniContextSize = 128000 constant _textDavinci3ContextSize (line 21) | _textDavinci3ContextSize = 4097 constant _textBabbage1ContextSize (line 22) | _textBabbage1ContextSize = 2048 constant _textAda1ContextSize (line 23) | _textAda1ContextSize = 2048 constant _textCurie1ContextSize (line 24) | _textCurie1ContextSize = 2048 constant _codeDavinci2ContextSize (line 25) | _codeDavinci2ContextSize = 8000 constant _codeCushman1ContextSize (line 26) | _codeCushman1ContextSize = 2048 constant _defaultContextSize (line 27) | _defaultContextSize = 2048 function GetModelContextSize (line 65) | func GetModelContextSize(model string) int { function CountTokens (line 74) | func CountTokens(model, text string) int { function CalculateMaxTokens (line 87) | func CalculateMaxTokens(model, text string) int { FILE: llms/count_tokens_test.go function TestCountTokens (line 9) | func TestCountTokens(t *testing.T) { function TestGetModelContextSize (line 16) | func TestGetModelContextSize(t *testing.T) { FILE: llms/ernie/erniellm.go type LLM (line 19) | type LLM struct method Call (line 69) | func (o *LLM) Call(ctx context.Context, prompt string, options ...llms... method GenerateContent (line 74) | func (o *LLM) GenerateContent(ctx context.Context, messages []llms.Mes... method CreateEmbedding (line 129) | func (o *LLM) CreateEmbedding(ctx context.Context, texts []string) ([]... method getModelPath (line 148) | func (o *LLM) getModelPath(opts llms.CallOptions) ernieclient.ModelPath { function New (line 28) | func New(opts ...Option) (*LLM, error) { function newClient (line 47) | func newClient(opts *options) (*ernieclient.Client, error) { function modelToPath (line 158) | func modelToPath(model ModelName) ernieclient.ModelPath { FILE: llms/ernie/erniellm_option.go constant ernieAPIKey (line 10) | ernieAPIKey = "ERNIE_API_KEY" constant ernieSecretKey (line 11) | ernieSecretKey = "ERNIE_SECRET_KEY" type ModelName (line 14) | type ModelName constant ModelNameERNIEBot (line 17) | ModelNameERNIEBot = "ERNIE-Bot" constant ModelNameERNIEBotTurbo (line 18) | ModelNameERNIEBotTurbo = "ERNIE-Bot-turbo" constant ModelNameERNIEBotPro (line 19) | ModelNameERNIEBotPro = "ERNIE-Bot-pro" constant ModelNameBloomz7B (line 20) | ModelNameBloomz7B = "BLOOMZ-7B" constant ModelNameLlama2_7BChat (line 21) | ModelNameLlama2_7BChat = "Llama-2-7b-chat" constant ModelNameLlama2_13BChat (line 22) | ModelNameLlama2_13BChat = "Llama-2-13b-chat" constant ModelNameLlama2_70BChat (line 23) | ModelNameLlama2_70BChat = "Llama-2-70b-chat" type options (line 26) | type options struct type Option (line 38) | type Option function WithAKSK (line 49) | func WithAKSK(apiKey, secretKey string) Option { function WithAccessToken (line 57) | func WithAccessToken(accessToken string) Option { function WithModelName (line 64) | func WithModelName(modelName ModelName) Option { function WithCallbackHandler (line 71) | func WithCallbackHandler(callbacksHandler callbacks.Handler) Option { function WithAPIKey (line 78) | func WithAPIKey(apiKey string) Option { function WithSecretKey (line 85) | func WithSecretKey(secretKey string) Option { function WithModel (line 92) | func WithModel(modelName string) Option { function WithBaseURL (line 99) | func WithBaseURL(baseURL string) Option { function WithModelPath (line 106) | func WithModelPath(modelPath string) Option { function WithCacheType (line 113) | func WithCacheType(cacheType string) Option { function WithHTTPClient (line 120) | func WithHTTPClient(client *http.Client) Option { FILE: llms/ernie/erniellm_test.go function TestNew (line 18) | func TestNew(t *testing.T) { function TestOptions (line 90) | func TestOptions(t *testing.T) { function newErnieTestLLM (line 141) | func newErnieTestLLM(t *testing.T, opts ...Option) *LLM { function hasExistingRecording (line 176) | func hasExistingRecording(t *testing.T) bool { function TestLLM_Call (line 184) | func TestLLM_Call(t *testing.T) { function TestLLM_GenerateContent (line 193) | func TestLLM_GenerateContent(t *testing.T) { function TestLLM_CreateEmbedding (line 212) | func TestLLM_CreateEmbedding(t *testing.T) { FILE: llms/ernie/internal/ernieclient/chat.go constant defaultBaseURL (line 18) | defaultBaseURL = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1" constant streamStopFlag (line 19) | streamStopFlag = "\"is_end\": true" type ChatRequest (line 23) | type ChatRequest struct type ChatMessage (line 52) | type ChatMessage struct type ChatChoice (line 66) | type ChatChoice struct type ChatUsage (line 73) | type ChatUsage struct type ChatResponse (line 79) | type ChatResponse struct type FunctionCallRes (line 94) | type FunctionCallRes struct type StreamedChatResponsePayload (line 100) | type StreamedChatResponsePayload struct type FunctionDefinition (line 118) | type FunctionDefinition struct type FunctionCallBehavior (line 128) | type FunctionCallBehavior constant FunctionCallBehaviorUnspecified (line 132) | FunctionCallBehaviorUnspecified FunctionCallBehavior = "" constant FunctionCallBehaviorNone (line 134) | FunctionCallBehaviorNone FunctionCallBehavior = "none" constant FunctionCallBehaviorAuto (line 136) | FunctionCallBehaviorAuto FunctionCallBehavior = "auto" type FunctionCall (line 140) | type FunctionCall struct method createChat (line 147) | func (c *Client) createChat(ctx context.Context, payload *ChatRequest) (... function parseStreamingChatResponse (line 193) | func parseStreamingChatResponse(ctx context.Context, r *http.Response, p... type errorMessage (line 247) | type errorMessage struct FILE: llms/ernie/internal/ernieclient/client_unit_test.go type mockHTTPClient (line 20) | type mockHTTPClient struct method Do (line 35) | func (m *mockHTTPClient) Do(req *http.Request) (*http.Response, error) { method getRequests (line 64) | func (m *mockHTTPClient) getRequests() []*http.Request { type mockResponse (line 29) | type mockResponse struct function TestNew (line 70) | func TestNew(t *testing.T) { function TestClient_CreateCompletion_Unit (line 171) | func TestClient_CreateCompletion_Unit(t *testing.T) { function TestClient_CreateEmbedding_Unit (line 310) | func TestClient_CreateEmbedding_Unit(t *testing.T) { function TestClient_CreateChat_Unit (line 394) | func TestClient_CreateChat_Unit(t *testing.T) { function TestClient_getAccessToken (line 535) | func TestClient_getAccessToken(t *testing.T) { function TestClient_buildURL (line 614) | func TestClient_buildURL(t *testing.T) { function TestClient_setHeaders (line 644) | func TestClient_setHeaders(t *testing.T) { function TestParseStreamingCompletionResponse (line 654) | func TestParseStreamingCompletionResponse(t *testing.T) { function TestParseStreamingChatResponse (line 717) | func TestParseStreamingChatResponse(t *testing.T) { function TestAutoRefresh (line 776) | func TestAutoRefresh(t *testing.T) { function TestChatMessageMarshaling (line 824) | func TestChatMessageMarshaling(t *testing.T) { function TestCompletionRequestMarshaling (line 870) | func TestCompletionRequestMarshaling(t *testing.T) { function TestErrorScenarios (line 895) | func TestErrorScenarios(t *testing.T) { function TestConcurrentAccessTokenUpdate (line 965) | func TestConcurrentAccessTokenUpdate(t *testing.T) { function TestRequestBodyReading (line 1002) | func TestRequestBodyReading(t *testing.T) { function TestInvalidJSONResponse (line 1037) | func TestInvalidJSONResponse(t *testing.T) { function TestResponseBodyClosure (line 1093) | func TestResponseBodyClosure(t *testing.T) { type trackingCloser (line 1135) | type trackingCloser struct method Close (line 1140) | func (t *trackingCloser) Close() error { function TestEmptyModelPath (line 1147) | func TestEmptyModelPath(t *testing.T) { function TestCreateChatWithoutFunctions (line 1159) | func TestCreateChatWithoutFunctions(t *testing.T) { function TestEmbeddingRequestMarshaling (line 1192) | func TestEmbeddingRequestMarshaling(t *testing.T) { function TestHTTPClientNilCheck (line 1208) | func TestHTTPClientNilCheck(t *testing.T) { function TestWithAKSKOption (line 1215) | func TestWithAKSKOption(t *testing.T) { function TestResponseReaderError (line 1226) | func TestResponseReaderError(t *testing.T) { type failingReader (line 1256) | type failingReader struct method Read (line 1262) | func (f *failingReader) Read(p []byte) (n int, err error) { FILE: llms/ernie/internal/ernieclient/ernieclient.go type Client (line 28) | type Client struct method CreateCompletion (line 192) | func (c *Client) CreateCompletion(ctx context.Context, modelPath Model... method CreateEmbedding (line 230) | func (c *Client) CreateEmbedding(ctx context.Context, texts []string) ... method getAccessToken (line 265) | func (c *Client) getAccessToken(ctx context.Context) (*authResponse, e... method CreateChat (line 290) | func (c *Client) CreateChat(ctx context.Context, r *ChatRequest) (*Cha... method buildURL (line 355) | func (c *Client) buildURL(modelpath ModelPath) string { method setHeaders (line 369) | func (c *Client) setHeaders(req *http.Request) { type ModelPath (line 39) | type ModelPath constant DefaultCompletionModelPath (line 43) | DefaultCompletionModelPath = "completions" constant tryPeriod (line 44) | tryPeriod = 3 constant defaultFunctionCallBehavior (line 45) | defaultFunctionCallBehavior = "auto" type Option (line 49) | type Option type Doer (line 52) | type Doer interface type Message (line 56) | type Message struct type CompletionRequest (line 62) | type CompletionRequest struct type Completion (line 73) | type Completion struct type EmbeddingResponse (line 92) | type EmbeddingResponse struct type authResponse (line 110) | type authResponse struct function WithHTTPClient (line 120) | func WithHTTPClient(client Doer) Option { function WithAKSK (line 128) | func WithAKSK(apiKey, secretKey string) Option { function WithAccessToken (line 137) | func WithAccessToken(accessToken string) Option { function New (line 145) | func New(opts ...Option) (*Client, error) { function autoRefresh (line 169) | func autoRefresh(c *Client) error { function parseStreamingCompletionResponse (line 306) | func parseStreamingCompletionResponse(ctx context.Context, resp *http.Re... FILE: llms/ernie/internal/ernieclient/ernieclient_test.go function requireErnieCredentialsOrHTTPRR (line 15) | func requireErnieCredentialsOrHTTPRR(t *testing.T) *httprr.RecordReplay { function TestClient_CreateCompletion (line 36) | func TestClient_CreateCompletion(t *testing.T) { function TestClient_CreateCompletionStream (line 84) | func TestClient_CreateCompletionStream(t *testing.T) { function newErnieTestClient (line 137) | func newErnieTestClient(t *testing.T) *Client { function TestClient_CreateChat (line 169) | func TestClient_CreateChat(t *testing.T) { function TestClient_CreateEmbedding (line 191) | func TestClient_CreateEmbedding(t *testing.T) { FILE: llms/ernie/llmtest_test.go function TestLLM (line 10) | func TestLLM(t *testing.T) { FILE: llms/errors.go type ErrorCode (line 10) | type ErrorCode constant ErrCodeUnknown (line 14) | ErrCodeUnknown ErrorCode = "unknown" constant ErrCodeAuthentication (line 17) | ErrCodeAuthentication ErrorCode = "authentication" constant ErrCodeRateLimit (line 20) | ErrCodeRateLimit ErrorCode = "rate_limit" constant ErrCodeInvalidRequest (line 23) | ErrCodeInvalidRequest ErrorCode = "invalid_request" constant ErrCodeResourceNotFound (line 26) | ErrCodeResourceNotFound ErrorCode = "resource_not_found" constant ErrCodeTimeout (line 29) | ErrCodeTimeout ErrorCode = "timeout" constant ErrCodeCanceled (line 32) | ErrCodeCanceled ErrorCode = "canceled" constant ErrCodeQuotaExceeded (line 35) | ErrCodeQuotaExceeded ErrorCode = "quota_exceeded" constant ErrCodeContentFilter (line 38) | ErrCodeContentFilter ErrorCode = "content_filter" constant ErrCodeTokenLimit (line 41) | ErrCodeTokenLimit ErrorCode = "token_limit" constant ErrCodeProviderUnavailable (line 44) | ErrCodeProviderUnavailable ErrorCode = "provider_unavailable" constant ErrCodeNotImplemented (line 47) | ErrCodeNotImplemented ErrorCode = "not_implemented" type Error (line 51) | type Error struct method Error (line 69) | func (e *Error) Error() string { method Unwrap (line 77) | func (e *Error) Unwrap() error { method Is (line 82) | func (e *Error) Is(target error) bool { method WithCause (line 114) | func (e *Error) WithCause(cause error) *Error { method WithDetail (line 120) | func (e *Error) WithDetail(key string, value interface{}) *Error { function NewError (line 104) | func NewError(code ErrorCode, provider, message string) *Error { function IsAuthenticationError (line 129) | func IsAuthenticationError(err error) bool { function IsRateLimitError (line 135) | func IsRateLimitError(err error) bool { function IsInvalidRequestError (line 141) | func IsInvalidRequestError(err error) bool { function IsTimeoutError (line 147) | func IsTimeoutError(err error) bool { function IsCanceledError (line 153) | func IsCanceledError(err error) bool { function IsQuotaExceededError (line 159) | func IsQuotaExceededError(err error) bool { function IsContentFilterError (line 165) | func IsContentFilterError(err error) bool { function IsTokenLimitError (line 171) | func IsTokenLimitError(err error) bool { function IsProviderUnavailableError (line 177) | func IsProviderUnavailableError(err error) bool { function IsNotImplementedError (line 183) | func IsNotImplementedError(err error) bool { FILE: llms/errors_mapper.go type ErrorMapper (line 11) | type ErrorMapper struct method AddMatcher (line 115) | func (m *ErrorMapper) AddMatcher(matcher ErrorMatcher) *ErrorMapper { method WrapError (line 122) | func (m *ErrorMapper) WrapError(err error) error { method Map (line 151) | func (m *ErrorMapper) Map(err error) error { type ErrorMatcher (line 17) | type ErrorMatcher struct function NewErrorMapper (line 27) | func NewErrorMapper(provider string) *ErrorMapper { function defaultMatchers (line 35) | func defaultMatchers() []ErrorMatcher { function contextErrorMatchers (line 48) | func contextErrorMatchers() []ErrorMatcher { function stringPatternMatchers (line 73) | func stringPatternMatchers() []ErrorMatcher { function makeStringMatcher (line 99) | func makeStringMatcher(patterns []string, code ErrorCode) ErrorMatcher { function OpenAIErrorMapper (line 156) | func OpenAIErrorMapper() *ErrorMapper { function AnthropicErrorMapper (line 186) | func AnthropicErrorMapper() *ErrorMapper { function GoogleAIErrorMapper (line 216) | func GoogleAIErrorMapper() *ErrorMapper { FILE: llms/errors_test.go function TestStandardError (line 13) | func TestStandardError(t *testing.T) { function TestErrorIs (line 53) | func TestErrorIs(t *testing.T) { function TestErrorHelpers (line 98) | func TestErrorHelpers(t *testing.T) { function TestErrorMapper (line 146) | func TestErrorMapper(t *testing.T) { function TestProviderSpecificMappers (line 225) | func TestProviderSpecificMappers(t *testing.T) { function TestCustomMatcher (line 264) | func TestCustomMatcher(t *testing.T) { type timeoutError (line 296) | type timeoutError struct method Error (line 298) | func (e *timeoutError) Error() string { return "timeout" } method Timeout (line 299) | func (e *timeoutError) Timeout() bool { return true } method Temporary (line 300) | func (e *timeoutError) Temporary() bool { return true } FILE: llms/fake/fakellm.go type LLM (line 10) | type LLM struct method GenerateContent (line 23) | func (f *LLM) GenerateContent(_ context.Context, _ []llms.MessageConte... method Call (line 38) | func (f *LLM) Call(ctx context.Context, prompt string, options ...llms... method Reset (line 50) | func (f *LLM) Reset() { method AddResponse (line 55) | func (f *LLM) AddResponse(response string) { function NewFakeLLM (line 15) | func NewFakeLLM(responses []string) *LLM { FILE: llms/fake/fakellm_test.go function TestFakeLLM_CallMethod (line 12) | func TestFakeLLM_CallMethod(t *testing.T) { function TestFakeLLM_GenerateContentMethod (line 36) | func TestFakeLLM_GenerateContentMethod(t *testing.T) { function TestFakeLLM_ResetMethod (line 71) | func TestFakeLLM_ResetMethod(t *testing.T) { function TestFakeLLM_AddResponseMethod (line 83) | func TestFakeLLM_AddResponseMethod(t *testing.T) { function TestFakeLLM_WithChain (line 109) | func TestFakeLLM_WithChain(t *testing.T) { function setupResponses (line 129) | func setupResponses() []string { function NextToResponse (line 137) | func NextToResponse(fakeLLM *LLM, n int) { FILE: llms/fake/llmtest_test.go function TestLLM (line 9) | func TestLLM(t *testing.T) { FILE: llms/generatecontent.go type MessageContent (line 14) | type MessageContent struct function TextPart (line 20) | func TextPart(s string) TextContent { function BinaryPart (line 26) | func BinaryPart(mime string, data []byte) BinaryContent { function ImageURLPart (line 34) | func ImageURLPart(url string) ImageURLContent { function ImageURLWithDetailPart (line 41) | func ImageURLWithDetailPart(url string, detail string) ImageURLContent { type ContentPart (line 49) | type ContentPart interface type TextContent (line 54) | type TextContent struct method String (line 58) | func (tc TextContent) String() string { method isPart (line 62) | func (TextContent) isPart() {} type ImageURLContent (line 65) | type ImageURLContent struct method String (line 70) | func (iuc ImageURLContent) String() string { method isPart (line 74) | func (ImageURLContent) isPart() {} type BinaryContent (line 77) | type BinaryContent struct method String (line 82) | func (bc BinaryContent) String() string { method isPart (line 87) | func (BinaryContent) isPart() {} type FunctionCall (line 90) | type FunctionCall struct type ToolCall (line 98) | type ToolCall struct method isPart (line 107) | func (ToolCall) isPart() {} type ToolCallResponse (line 110) | type ToolCallResponse struct method isPart (line 119) | func (ToolCallResponse) isPart() {} type ContentResponse (line 123) | type ContentResponse struct type ContentChoice (line 129) | type ContentChoice struct function TextParts (line 153) | func TextParts(role ChatMessageType, parts ...string) MessageContent { function ShowMessageContents (line 165) | func ShowMessageContents(w io.Writer, msgs []MessageContent) { FILE: llms/generatecontent_test.go function TestTextParts (line 8) | func TestTextParts(t *testing.T) { FILE: llms/googleai/caching.go type CachingHelper (line 15) | type CachingHelper struct method CreateCachedContent (line 50) | func (ch *CachingHelper) CreateCachedContent( method GetCachedContent (line 107) | func (ch *CachingHelper) GetCachedContent(ctx context.Context, name st... method DeleteCachedContent (line 112) | func (ch *CachingHelper) DeleteCachedContent(ctx context.Context, name... method ListCachedContents (line 117) | func (ch *CachingHelper) ListCachedContents(ctx context.Context) *gena... function NewCachingHelper (line 20) | func NewCachingHelper(ctx context.Context, opts ...Option) (*CachingHelp... FILE: llms/googleai/embeddings.go method CreateEmbedding (line 11) | func (g *GoogleAI) CreateEmbedding(ctx context.Context, texts []string) ... FILE: llms/googleai/embeddings_unit_test.go type MockEmbeddingModel (line 15) | type MockEmbeddingModel struct method NewBatch (line 19) | func (m *MockEmbeddingModel) NewBatch() *MockBatchEmbedder { method BatchEmbedContents (line 24) | func (m *MockEmbeddingModel) BatchEmbedContents(ctx context.Context, b... type MockBatchEmbedder (line 29) | type MockBatchEmbedder struct method AddContent (line 34) | func (m *MockBatchEmbedder) AddContent(content genai.Text) *MockBatchE... type MockGenAIClient (line 39) | type MockGenAIClient struct method EmbeddingModel (line 43) | func (m *MockGenAIClient) EmbeddingModel(name string) *MockEmbeddingMo... function TestCreateEmbedding_ConceptualTests (line 52) | func TestCreateEmbedding_ConceptualTests(t *testing.T) { function TestEmbeddingBatchLogic (line 112) | func TestEmbeddingBatchLogic(t *testing.T) { function TestEmbeddingConstants (line 147) | func TestEmbeddingConstants(t *testing.T) { function TestCreateEmbedding_ErrorScenarios (line 161) | func TestCreateEmbedding_ErrorScenarios(t *testing.T) { function TestCreateEmbedding_Integration_Placeholder (line 178) | func TestCreateEmbedding_Integration_Placeholder(t *testing.T) { function TestEmbeddingInputValidation (line 191) | func TestEmbeddingInputValidation(t *testing.T) { function TestEmbeddingOutputValidation (line 223) | func TestEmbeddingOutputValidation(t *testing.T) { FILE: llms/googleai/errors.go type errorMapping (line 10) | type errorMapping struct function MapError (line 61) | func MapError(err error) error { FILE: llms/googleai/googleai.go constant CITATIONS (line 25) | CITATIONS = "citations" constant SAFETY (line 26) | SAFETY = "safety" constant RoleSystem (line 27) | RoleSystem = "system" constant RoleModel (line 28) | RoleModel = "model" constant RoleUser (line 29) | RoleUser = "user" constant RoleTool (line 30) | RoleTool = "tool" constant ResponseMIMETypeJson (line 31) | ResponseMIMETypeJson = "application/json" method Call (line 35) | func (g *GoogleAI) Call(ctx context.Context, prompt string, options ...l... method GenerateContent (line 40) | func (g *GoogleAI) GenerateContent( function convertCandidates (line 136) | func convertCandidates(candidates []*genai.Candidate, usage *genai.Usage... function convertParts (line 210) | func convertParts(parts []llms.ContentPart) ([]genai.Part, error) { function convertContent (line 251) | func convertContent(content llms.MessageContent) (*genai.Content, error) { function generateFromSingleMessage (line 283) | func generateFromSingleMessage( function generateFromMessages (line 311) | func generateFromMessages( function convertAndStreamFromIterator (line 359) | func convertAndStreamFromIterator( function convertSchemaRecursive (line 405) | func convertSchemaRecursive(schemaMap map[string]any, toolIndex int, pro... function convertTools (line 493) | func convertTools(tools []llms.Tool) ([]*genai.Tool, error) { function convertToolSchemaType (line 538) | func convertToolSchemaType(ty string) genai.Type { function showContent (line 558) | func showContent(w io.Writer, cs []*genai.Content) { FILE: llms/googleai/googleai_core_unit_test.go function TestConvertParts (line 12) | func TestConvertParts(t *testing.T) { //nolint:funlen // comprehensive test function TestConvertContent (line 122) | func TestConvertContent(t *testing.T) { //nolint:funlen // comprehensive... function TestConvertCandidates (line 235) | func TestConvertCandidates(t *testing.T) { //nolint:funlen // comprehens... function TestCall (line 372) | func TestCall(t *testing.T) { function TestGenerateContentOptionsHandling (line 385) | func TestGenerateContentOptionsHandling(t *testing.T) { function TestRoleMapping (line 429) | func TestRoleMapping(t *testing.T) { function TestFunctionCallConversion (line 467) | func TestFunctionCallConversion(t *testing.T) { function TestSafetySettings (line 512) | func TestSafetySettings(t *testing.T) { FILE: llms/googleai/googleai_test.go function hasExistingRecording (line 19) | func hasExistingRecording(t *testing.T) bool { function newHTTPRRClient (line 27) | func newHTTPRRClient(t *testing.T, opts ...Option) *GoogleAI { function TestGoogleAIGenerateContent (line 76) | func TestGoogleAIGenerateContent(t *testing.T) { function TestGoogleAIGenerateContentWithMultipleMessages (line 102) | func TestGoogleAIGenerateContentWithMultipleMessages(t *testing.T) { function TestGoogleAIGenerateContentWithSystemMessage (line 140) | func TestGoogleAIGenerateContentWithSystemMessage(t *testing.T) { function TestGoogleAICall (line 171) | func TestGoogleAICall(t *testing.T) { function TestGoogleAICreateEmbedding (line 187) | func TestGoogleAICreateEmbedding(t *testing.T) { function TestGoogleAIWithOptions (line 209) | func TestGoogleAIWithOptions(t *testing.T) { function TestGoogleAIWithStreaming (line 238) | func TestGoogleAIWithStreaming(t *testing.T) { function TestGoogleAIWithTools (line 281) | func TestGoogleAIWithTools(t *testing.T) { function TestGoogleAIWithJSONMode (line 338) | func TestGoogleAIWithJSONMode(t *testing.T) { function TestGoogleAIErrorHandling (line 371) | func TestGoogleAIErrorHandling(t *testing.T) { function TestGoogleAIMultiModalContent (line 415) | func TestGoogleAIMultiModalContent(t *testing.T) { function TestGoogleAIBatchEmbedding (line 456) | func TestGoogleAIBatchEmbedding(t *testing.T) { function TestGoogleAIWithHarmThreshold (line 481) | func TestGoogleAIWithHarmThreshold(t *testing.T) { function TestGoogleAIToolCallResponse (line 508) | func TestGoogleAIToolCallResponse(t *testing.T) { FILE: llms/googleai/googleai_unit_test.go function TestNew (line 11) | func TestNew(t *testing.T) { function TestDefaultOptions (line 84) | func TestDefaultOptions(t *testing.T) { function TestOptions (line 101) | func TestOptions(t *testing.T) { //nolint:funlen // comprehensive test /... function TestEnsureAuthPresent (line 208) | func TestEnsureAuthPresent(t *testing.T) { function TestHasAuthOptions (line 236) | func TestHasAuthOptions(t *testing.T) { function TestHarmBlockThresholdConstants (line 248) | func TestHarmBlockThresholdConstants(t *testing.T) { function TestConstants (line 258) | func TestConstants(t *testing.T) { function TestErrorConstants (line 270) | func TestErrorConstants(t *testing.T) { function TestGoogleAIImplementsModelInterface (line 278) | func TestGoogleAIImplementsModelInterface(t *testing.T) { function TestConvertToolSchemaType (line 285) | func TestConvertToolSchemaType(t *testing.T) { function TestConvertTools (line 310) | func TestConvertTools(t *testing.T) { //nolint:funlen // comprehensive t... FILE: llms/googleai/internal/cmd/generate-vertex.go function main (line 18) | func main() { constant preamble (line 47) | preamble = ` function rewriteImport (line 52) | func rewriteImport(x *ast.ImportSpec) { function rewriteReceiverName (line 58) | func rewriteReceiverName(fun *ast.FuncDecl) { function addCastToTopK (line 65) | func addCastToTopK(fun *ast.FuncDecl) { function removeTokenCount (line 85) | func removeTokenCount(fun *ast.FuncDecl) { function getIdentName (line 109) | func getIdentName(x ast.Expr) string { FILE: llms/googleai/internal/palmclient/palm_client_option.go constant embeddingModelName (line 8) | embeddingModelName = "text-embedding-005" constant TextModelName (line 9) | TextModelName = "text-bison" constant ChatModelName (line 10) | ChatModelName = "chat-bison" type Options (line 14) | type Options struct type Option (line 22) | type Option function WithEmbeddingModelName (line 25) | func WithEmbeddingModelName(modelName string) Option { function WithTextModelName (line 34) | func WithTextModelName(modelName string) Option { function WithChatModelName (line 43) | func WithChatModelName(modelName string) Option { function WithClientOptions (line 52) | func WithClientOptions(opts ...option.ClientOption) Option { function defaultOptions (line 58) | func defaultOptions() Options { FILE: llms/googleai/internal/palmclient/palmclient.go constant defaultMaxConns (line 31) | defaultMaxConns = 4 type PaLMClient (line 35) | type PaLMClient struct method CreateCompletion (line 95) | func (c *PaLMClient) CreateCompletion(ctx context.Context, r *Completi... method CreateEmbedding (line 127) | func (c *PaLMClient) CreateEmbedding(ctx context.Context, r *Embedding... method CreateChat (line 204) | func (c *PaLMClient) CreateChat(ctx context.Context, r *ChatRequest) (... method batchPredict (line 289) | func (c *PaLMClient) batchPredict(ctx context.Context, model string, p... method chat (line 312) | func (c *PaLMClient) chat(ctx context.Context, r *ChatRequest) ([]*str... method projectLocationPublisherModelPath (line 351) | func (c *PaLMClient) projectLocationPublisherModelPath(projectID, loca... function New (line 44) | func New(ctx context.Context, projectID, location string, opts ...Option... type CompletionRequest (line 80) | type CompletionRequest struct type Completion (line 90) | type Completion struct type EmbeddingRequest (line 122) | type EmbeddingRequest struct type ChatRequest (line 163) | type ChatRequest struct type ChatMessage (line 173) | type ChatMessage struct method GetType (line 184) | func (m ChatMessage) GetType() llms.ChatMessageType { method GetContent (line 194) | func (m ChatMessage) GetContent() string { type ChatResponse (line 199) | type ChatResponse struct function mergeParams (line 237) | func mergeParams(defaultParams, params map[string]interface{}) *structpb... function convertToOutputStruct (line 264) | func convertToOutputStruct(defaultParams map[string]interface{}, mergedP... function cloneDefaultParameters (line 273) | func cloneDefaultParameters() map[string]interface{} { function convertArray (line 281) | func convertArray(value []string) interface{} { FILE: llms/googleai/internal/palmclient/palmclient_unit_test.go function TestChatMessage_GetType (line 13) | func TestChatMessage_GetType(t *testing.T) { function TestChatMessage_GetContent (line 51) | func TestChatMessage_GetContent(t *testing.T) { function TestConvertArray (line 59) | func TestConvertArray(t *testing.T) { function TestCloneDefaultParameters (line 71) | func TestCloneDefaultParameters(t *testing.T) { function TestMergeParams (line 85) | func TestMergeParams(t *testing.T) { function TestConvertToOutputStruct (line 160) | func TestConvertToOutputStruct(t *testing.T) { function TestProjectLocationPublisherModelPath (line 183) | func TestProjectLocationPublisherModelPath(t *testing.T) { function TestCompletionRequestValidation (line 195) | func TestCompletionRequestValidation(t *testing.T) { function TestEmbeddingRequestValidation (line 211) | func TestEmbeddingRequestValidation(t *testing.T) { function TestChatRequestValidation (line 220) | func TestChatRequestValidation(t *testing.T) { function TestProcessPredictionsErrors (line 251) | func TestProcessPredictionsErrors(t *testing.T) { function TestChatResponseProcessing (line 311) | func TestChatResponseProcessing(t *testing.T) { function TestEmbeddingProcessing (line 347) | func TestEmbeddingProcessing(t *testing.T) { function TestConstants (line 376) | func TestConstants(t *testing.T) { function TestDefaultParameters (line 384) | func TestDefaultParameters(t *testing.T) { function TestErrors (line 392) | func TestErrors(t *testing.T) { function TestMergeParamsEdgeCases (line 399) | func TestMergeParamsEdgeCases(t *testing.T) { FILE: llms/googleai/llmtest_test.go function TestLLM (line 11) | func TestLLM(t *testing.T) { FILE: llms/googleai/new.go type GoogleAI (line 15) | type GoogleAI struct method Close (line 52) | func (g *GoogleAI) Close() error { method SupportsReasoning (line 61) | func (g *GoogleAI) SupportsReasoning() bool { function New (line 28) | func New(ctx context.Context, opts ...Option) (*GoogleAI, error) { FILE: llms/googleai/option.go type Options (line 15) | type Options struct method EnsureAuthPresent (line 46) | func (o *Options) EnsureAuthPresent() { function DefaultOptions (line 30) | func DefaultOptions() Options { type Option (line 54) | type Option function WithAPIKey (line 58) | func WithAPIKey(apiKey string) Option { function WithCredentialsJSON (line 67) | func WithCredentialsJSON(credentialsJSON []byte) Option { function WithCredentialsFile (line 79) | func WithCredentialsFile(credentialsFile string) Option { function WithRest (line 89) | func WithRest() Option { function WithHTTPClient (line 98) | func WithHTTPClient(httpClient *http.Client) Option { function WithGRPCConn (line 107) | func WithGRPCConn(conn *grpc.ClientConn) Option { function WithCloudProject (line 115) | func WithCloudProject(p string) Option { function WithCloudLocation (line 123) | func WithCloudLocation(l string) Option { function WithDefaultModel (line 131) | func WithDefaultModel(defaultModel string) Option { function WithDefaultEmbeddingModel (line 139) | func WithDefaultEmbeddingModel(defaultEmbeddingModel string) Option { function WithDefaultCandidateCount (line 146) | func WithDefaultCandidateCount(defaultCandidateCount int) Option { function WithDefaultMaxTokens (line 153) | func WithDefaultMaxTokens(maxTokens int) Option { function WithDefaultTemperature (line 160) | func WithDefaultTemperature(defaultTemperature float64) Option { function WithDefaultTopK (line 167) | func WithDefaultTopK(defaultTopK int) Option { function WithDefaultTopP (line 174) | func WithDefaultTopP(defaultTopP float64) Option { function WithHarmThreshold (line 182) | func WithHarmThreshold(ht HarmBlockThreshold) Option { function WithCachedContent (line 191) | func WithCachedContent(name string) llms.CallOption { type HarmBlockThreshold (line 200) | type HarmBlockThreshold constant HarmBlockUnspecified (line 204) | HarmBlockUnspecified HarmBlockThreshold = 0 constant HarmBlockLowAndAbove (line 206) | HarmBlockLowAndAbove HarmBlockThreshold = 1 constant HarmBlockMediumAndAbove (line 208) | HarmBlockMediumAndAbove HarmBlockThreshold = 2 constant HarmBlockOnlyHigh (line 210) | HarmBlockOnlyHigh HarmBlockThreshold = 3 constant HarmBlockNone (line 212) | HarmBlockNone HarmBlockThreshold = 4 function hasAuthOptions (line 216) | func hasAuthOptions(opts []option.ClientOption) bool { FILE: llms/googleai/palm/palm_llm.go type LLM (line 23) | type LLM struct method Call (line 31) | func (o *LLM) Call(ctx context.Context, prompt string, options ...llms... method GenerateContent (line 36) | func (o *LLM) GenerateContent(ctx context.Context, messages []llms.Mes... method CreateEmbedding (line 79) | func (o *LLM) CreateEmbedding(ctx context.Context, inputTexts []string... function New (line 98) | func New(opts ...Option) (*LLM, error) { function newClient (line 103) | func newClient(opts ...Option) (*palmclient.PaLMClient, error) { FILE: llms/googleai/palm/palm_llm_option.go constant projectIDEnvVarName (line 13) | projectIDEnvVarName = "GOOGLE_CLOUD_PROJECT" constant locationEnvVarName (line 14) | locationEnvVarName = "GOOGLE_CLOUD_LOCATION" type options (line 25) | type options struct type Option (line 32) | type Option function initOpts (line 35) | func initOpts() { function WithProjectID (line 44) | func WithProjectID(projectID string) Option { function WithLocation (line 51) | func WithLocation(location string) Option { function WithAPIKey (line 59) | func WithAPIKey(apiKey string) Option { function WithCredentialsFile (line 66) | func WithCredentialsFile(path string) Option { function WithCredentialsJSON (line 73) | func WithCredentialsJSON(json []byte) Option { function WithGRPCDialOption (line 77) | func WithGRPCDialOption(opt grpc.DialOption) Option { function WithHTTPClient (line 83) | func WithHTTPClient(client *http.Client) Option { function convertStringOption (line 89) | func convertStringOption(fopt func(string) option.ClientOption) func(str... function convertByteArrayOption (line 97) | func convertByteArrayOption(fopt func([]byte) option.ClientOption) func(... FILE: llms/googleai/palm/palm_llm_test.go function newPalmTestLLM (line 18) | func newPalmTestLLM(t *testing.T) *LLM { function hasExistingRecording (line 57) | func hasExistingRecording(t *testing.T) bool { function TestPaLMCall (line 65) | func TestPaLMCall(t *testing.T) { function TestPaLMGenerateContent (line 76) | func TestPaLMGenerateContent(t *testing.T) { function TestPaLMCreateEmbedding (line 97) | func TestPaLMCreateEmbedding(t *testing.T) { function TestPaLMWithOptions (line 113) | func TestPaLMWithOptions(t *testing.T) { function TestPaLMErrorHandling (line 138) | func TestPaLMErrorHandling(t *testing.T) { function TestPaLMMultipleTexts (line 152) | func TestPaLMMultipleTexts(t *testing.T) { function TestPaLMWithStopWords (line 177) | func TestPaLMWithStopWords(t *testing.T) { FILE: llms/googleai/reasoning_test.go function TestGoogleAI_SupportsReasoning (line 13) | func TestGoogleAI_SupportsReasoning(t *testing.T) { function TestGoogleAI_ReasoningIntegration (line 81) | func TestGoogleAI_ReasoningIntegration(t *testing.T) { function TestGoogleAI_CachingSupport (line 137) | func TestGoogleAI_CachingSupport(t *testing.T) { FILE: llms/googleai/shared_test/shared_test.go function newGoogleAIClient (line 36) | func newGoogleAIClient(t *testing.T, opts ...googleai.Option) *googleai.... function newVertexClient (line 77) | func newVertexClient(t *testing.T, opts ...googleai.Option) *vertex.Vert... function hasExistingRecording (line 109) | func hasExistingRecording(t *testing.T) bool { function funcName (line 119) | func funcName(f any) string { type testConfig (line 127) | type testConfig struct function TestGoogleAIShared (line 152) | func TestGoogleAIShared(t *testing.T) { function TestVertexShared (line 161) | func TestVertexShared(t *testing.T) { function TestVertex_WithCustomEmbeddingModel (line 172) | func TestVertex_WithCustomEmbeddingModel(t *testing.T) { function testMultiContentText (line 185) | func testMultiContentText(t *testing.T, llm llms.Model) { function testMultiContentTextUsingTextParts (line 210) | func testMultiContentTextUsingTextParts(t *testing.T, llm llms.Model) { function testGenerateFromSinglePrompt (line 228) | func testGenerateFromSinglePrompt(t *testing.T, llm llms.Model) { function testMultiContentTextChatSequence (line 239) | func testMultiContentTextChatSequence(t *testing.T, llm llms.Model) { function testMultiContentWithSystemMessage (line 266) | func testMultiContentWithSystemMessage(t *testing.T, llm llms.Model) { function testMultiContentImageLink (line 289) | func testMultiContentImageLink(t *testing.T, llm llms.Model) { function testMultiContentImageBinary (line 318) | func testMultiContentImageBinary(t *testing.T, llm llms.Model) { function testEmbeddings (line 350) | func testEmbeddings(t *testing.T, llm llms.Model) { function testCandidateCountSetting (line 365) | func testCandidateCountSetting(t *testing.T, llm llms.Model) { function testWithStreaming (line 389) | func testWithStreaming(t *testing.T, llm llms.Model) { function testTools (line 416) | func testTools(t *testing.T, llm llms.Model) { function testToolsWithInterfaceRequired (line 498) | func testToolsWithInterfaceRequired(t *testing.T, llm llms.Model) { function testMaxTokensSetting (line 583) | func testMaxTokensSetting(t *testing.T, llm llms.Model) { function testWithHTTPClient (line 625) | func testWithHTTPClient(t *testing.T, llm llms.Model) { function getHTTPTestClientOptions (line 637) | func getHTTPTestClientOptions() []googleai.Option { function getCustomEmbeddingModelTestOptionsWithGRPC (line 643) | func getCustomEmbeddingModelTestOptionsWithGRPC(t *testing.T, model stri... type testRequestInterceptor (line 677) | type testRequestInterceptor struct method RoundTrip (line 679) | func (i *testRequestInterceptor) RoundTrip(req *http.Request) (*http.R... function showJSON (line 704) | func showJSON(v any) string { function checkMatch (line 714) | func checkMatch(t *testing.T, got string, wants ...string) { type PredictHandlerFunc (line 728) | type PredictHandlerFunc type mockPredictionServer (line 731) | type mockPredictionServer struct method Predict (line 744) | func (s *mockPredictionServer) Predict(ctx context.Context, req *aipla... function NewMockPredictionServer (line 737) | func NewMockPredictionServer(handler PredictHandlerFunc) *mockPrediction... function getPredictHandlerFuncWithCustomEmbeddingModel (line 754) | func getPredictHandlerFuncWithCustomEmbeddingModel(embeddingModel string... FILE: llms/googleai/vertex/embeddings.go method CreateEmbedding (line 12) | func (g *Vertex) CreateEmbedding(ctx context.Context, texts []string) ([... FILE: llms/googleai/vertex/embeddings_test.go function TestCreateEmbedding (line 11) | func TestCreateEmbedding(t *testing.T) { function TestCreateEmbeddingValidation (line 93) | func TestCreateEmbeddingValidation(t *testing.T) { function TestEmbeddingDimensions (line 139) | func TestEmbeddingDimensions(t *testing.T) { function TestEmbeddingRequestStructure (line 186) | func TestEmbeddingRequestStructure(t *testing.T) { function TestVertexEmbeddingIntegration (line 202) | func TestVertexEmbeddingIntegration(t *testing.T) { FILE: llms/googleai/vertex/new.go type Vertex (line 20) | type Vertex struct method Close (line 69) | func (v *Vertex) Close() error { function New (line 30) | func New(ctx context.Context, opts ...googleai.Option) (*Vertex, error) { FILE: llms/googleai/vertex/new_test.go function TestNewWithOptions (line 11) | func TestNewWithOptions(t *testing.T) { function TestDefaultOptions (line 17) | func TestDefaultOptions(t *testing.T) { function TestOptionsApplication (line 47) | func TestOptionsApplication(t *testing.T) { //nolint:funlen // comprehen... function TestHarmThresholdValues (line 134) | func TestHarmThresholdValues(t *testing.T) { function TestVertexStructure (line 157) | func TestVertexStructure(t *testing.T) { function TestWithHTTPClientOption (line 169) | func TestWithHTTPClientOption(t *testing.T) { function TestOptionsEnsureAuthPresent (line 185) | func TestOptionsEnsureAuthPresent(t *testing.T) { FILE: llms/googleai/vertex/vertex.go constant CITATIONS (line 28) | CITATIONS = "citations" constant SAFETY (line 29) | SAFETY = "safety" constant RoleSystem (line 30) | RoleSystem = "system" constant RoleModel (line 31) | RoleModel = "model" constant RoleUser (line 32) | RoleUser = "user" constant RoleTool (line 33) | RoleTool = "tool" constant ResponseMIMETypeJson (line 34) | ResponseMIMETypeJson = "application/json" method Call (line 38) | func (g *Vertex) Call(ctx context.Context, prompt string, options ...llm... method GenerateContent (line 43) | func (g *Vertex) GenerateContent( function convertCandidates (line 127) | func convertCandidates(candidates []*genai.Candidate, usage *genai.Usage... function convertParts (line 182) | func convertParts(parts []llms.ContentPart) ([]genai.Part, error) { function convertContent (line 223) | func convertContent(content llms.MessageContent) (*genai.Content, error) { function generateFromSingleMessage (line 255) | func generateFromSingleMessage( function generateFromMessages (line 283) | func generateFromMessages( function convertAndStreamFromIterator (line 331) | func convertAndStreamFromIterator( function convertTools (line 377) | func convertTools(tools []llms.Tool) ([]*genai.Tool, error) { function convertToolSchemaType (line 473) | func convertToolSchemaType(ty string) genai.Type { function showContent (line 493) | func showContent(w io.Writer, cs []*genai.Content) { FILE: llms/googleai/vertex/vertex_test.go function newHTTPRRClient (line 18) | func newHTTPRRClient(t *testing.T, opts ...googleai.Option) *Vertex { function hasExistingRecording (line 51) | func hasExistingRecording(t *testing.T) bool { function TestVertexGenerateContent (line 59) | func TestVertexGenerateContent(t *testing.T) { function TestVertexGenerateContentWithMultipleMessages (line 80) | func TestVertexGenerateContentWithMultipleMessages(t *testing.T) { function TestVertexGenerateContentWithSystemMessage (line 113) | func TestVertexGenerateContentWithSystemMessage(t *testing.T) { function TestVertexCall (line 139) | func TestVertexCall(t *testing.T) { function TestVertexCreateEmbedding (line 150) | func TestVertexCreateEmbedding(t *testing.T) { function TestVertexWithOptions (line 167) | func TestVertexWithOptions(t *testing.T) { function TestVertexWithStreaming (line 191) | func TestVertexWithStreaming(t *testing.T) { function TestVertexWithTools (line 222) | func TestVertexWithTools(t *testing.T) { function TestVertexWithJSONMode (line 279) | func TestVertexWithJSONMode(t *testing.T) { function TestVertexMultiModalContent (line 307) | func TestVertexMultiModalContent(t *testing.T) { function TestVertexBatchEmbedding (line 336) | func TestVertexBatchEmbedding(t *testing.T) { function TestVertexWithHarmThreshold (line 356) | func TestVertexWithHarmThreshold(t *testing.T) { function TestVertexToolCallResponse (line 378) | func TestVertexToolCallResponse(t *testing.T) { function TestVertexWithResponseMIMEType (line 456) | func TestVertexWithResponseMIMEType(t *testing.T) { function TestVertexErrorOnConflictingOptions (line 484) | func TestVertexErrorOnConflictingOptions(t *testing.T) { FILE: llms/googleai/vertex/vertex_unit_test.go function TestConvertToolSchemaType (line 12) | func TestConvertToolSchemaType(t *testing.T) { function TestConvertParts (line 38) | func TestConvertParts(t *testing.T) { //nolint:funlen // comprehensive t... function TestConvertContent (line 199) | func TestConvertContent(t *testing.T) { //nolint:funlen // comprehensive... function TestConvertCandidates (line 297) | func TestConvertCandidates(t *testing.T) { //nolint:funlen // comprehens... function TestConvertTools (line 454) | func TestConvertTools(t *testing.T) { //nolint:funlen // comprehensive t... function TestShowContent (line 595) | func TestShowContent(t *testing.T) { function TestErrorValues (line 631) | func TestErrorValues(t *testing.T) { function TestConstants (line 655) | func TestConstants(t *testing.T) { function TestConvertAndStreamFromIterator (line 680) | func TestConvertAndStreamFromIterator(t *testing.T) { function TestVertexImplementsModel (line 687) | func TestVertexImplementsModel(t *testing.T) { FILE: llms/huggingface/example_provider_test.go function ExampleNew_withInferenceProvider (line 12) | func ExampleNew_withInferenceProvider() { function ExampleNew_standardInference (line 37) | func ExampleNew_standardInference() { FILE: llms/huggingface/huggingfacellm.go type LLM (line 21) | type LLM struct method Call (line 29) | func (o *LLM) Call(ctx context.Context, prompt string, options ...llms... method GenerateContent (line 34) | func (o *LLM) GenerateContent(ctx context.Context, messages []llms.Mes... method CreateEmbedding (line 169) | func (o *LLM) CreateEmbedding( function New (line 77) | func New(opts ...Option) (*LLM, error) { function getHuggingFaceToken (line 121) | func getHuggingFaceToken() string { function getTokenPath (line 144) | func getTokenPath() string { FILE: llms/huggingface/huggingfacellm_option.go constant tokenEnvVarName (line 8) | tokenEnvVarName = "HUGGINGFACEHUB_API_TOKEN" constant hfTokenEnvVarName (line 9) | hfTokenEnvVarName = "HF_TOKEN" constant hfTokenPathEnvVarName (line 11) | hfTokenPathEnvVarName = "HF_TOKEN_PATH" constant hfHomeEnvVarName (line 12) | hfHomeEnvVarName = "HF_HOME" constant xdgCacheHomeEnvVar (line 13) | xdgCacheHomeEnvVar = "XDG_CACHE_HOME" constant defaultTokenPath (line 14) | defaultTokenPath = "token" constant defaultModel (line 15) | defaultModel = "gpt2" constant defaultURL (line 16) | defaultURL = "https://api-inference.huggingface.co" constant routerURL (line 17) | routerURL = "https://router.huggingface.co" type options (line 20) | type options struct type Option (line 28) | type Option function WithToken (line 32) | func WithToken(token string) Option { function WithModel (line 40) | func WithModel(model string) Option { function WithURL (line 48) | func WithURL(url string) Option { function WithHTTPClient (line 55) | func WithHTTPClient(httpClient *http.Client) Option { function WithInferenceProvider (line 64) | func WithInferenceProvider(provider string) Option { FILE: llms/huggingface/huggingfacellm_test.go function TestHuggingFaceLLMWithProvider (line 13) | func TestHuggingFaceLLMWithProvider(t *testing.T) { function TestHuggingFaceLLMStandardInference (line 68) | func TestHuggingFaceLLMStandardInference(t *testing.T) { function TestHuggingFaceLLMGenerateContent (line 121) | func TestHuggingFaceLLMGenerateContent(t *testing.T) { FILE: llms/huggingface/internal/huggingfaceclient/embeddings.go type embeddingPayload (line 12) | type embeddingPayload struct method createEmbedding (line 18) | func (c *Client) createEmbedding(ctx context.Context, model string, task... FILE: llms/huggingface/internal/huggingfaceclient/huggingfaceclient.go type Client (line 17) | type Client struct method RunInference (line 78) | func (c *Client) RunInference(ctx context.Context, request *InferenceR... method CreateEmbedding (line 114) | func (c *Client) CreateEmbedding( function New (line 25) | func New(token, model, url string, opts ...Option) (*Client, error) { type Option (line 45) | type Option function WithHTTPClient (line 48) | func WithHTTPClient(httpClient *http.Client) Option { function WithProvider (line 55) | func WithProvider(provider string) Option { type InferenceRequest (line 61) | type InferenceRequest struct type InferenceResponse (line 74) | type InferenceResponse struct type EmbeddingRequest (line 108) | type EmbeddingRequest struct FILE: llms/huggingface/internal/huggingfaceclient/huggingfaceclient_test.go constant testURL (line 15) | testURL = "https://api-inference.huggingface.co" function TestClient_RunInference (line 17) | func TestClient_RunInference(t *testing.T) { function TestClient_RunInferenceText2Text (line 63) | func TestClient_RunInferenceText2Text(t *testing.T) { function TestClient_CreateEmbedding (line 109) | func TestClient_CreateEmbedding(t *testing.T) { function TestClient_InvalidToken (line 150) | func TestClient_InvalidToken(t *testing.T) { function TestClient_RunInferenceWithProvider (line 156) | func TestClient_RunInferenceWithProvider(t *testing.T) { FILE: llms/huggingface/internal/huggingfaceclient/inference.go type InferenceTask (line 16) | type InferenceTask constant InferenceTaskTextGeneration (line 19) | InferenceTaskTextGeneration InferenceTask = "text-generation" constant InferenceTaskText2TextGeneration (line 20) | InferenceTaskText2TextGeneration InferenceTask = "text2text-generation" type inferencePayload (line 23) | type inferencePayload struct type parameters (line 29) | type parameters struct type chatCompletionsPayload (line 40) | type chatCompletionsPayload struct type chatMessage (line 49) | type chatMessage struct type chatCompletionsResponse (line 54) | type chatCompletionsResponse struct type inferenceResponsePayload (line 64) | type inferenceResponsePayload type inferenceResponse (line 65) | type inferenceResponse struct method runInference (line 70) | func (c *Client) runInference(ctx context.Context, payload *inferencePay... method runChatCompletions (line 136) | func (c *Client) runChatCompletions(ctx context.Context, payload *infere... FILE: llms/huggingface/llmtest_test.go function TestLLM (line 10) | func TestLLM(t *testing.T) { FILE: llms/llamafile/internal/llamafileclient/llamafileclient.go constant maxBufferSize (line 20) | maxBufferSize = 512 * 1000 type Client (line 22) | type Client struct method do (line 91) | func (c *Client) do(ctx context.Context, method, path string, reqData,... method stream (line 136) | func (c *Client) stream(ctx context.Context, method, path string, data... method sendHTTPRequest (line 164) | func (c *Client) sendHTTPRequest(ctx context.Context, method, path str... method processResponse (line 182) | func (c *Client) processResponse(response *http.Response, fn func([]by... method Generate (line 224) | func (c *Client) Generate(ctx context.Context, req *GenerateRequest, f... method GenerateChat (line 235) | func (c *Client) GenerateChat(ctx context.Context, req *ChatRequest, f... method CreateEmbedding (line 271) | func (c *Client) CreateEmbedding(ctx context.Context, texts []string) ... type EmbeddingRequest (line 27) | type EmbeddingRequest struct type EmbeddingResponse (line 30) | type EmbeddingResponse struct type EmbeddingData (line 33) | type EmbeddingData struct type GenerateResponseFunc (line 38) | type GenerateResponseFunc type ChatResponseFunc (line 39) | type ChatResponseFunc function checkError (line 42) | func checkError(resp *http.Response, body []byte) error { function NewClient (line 58) | func NewClient(ourl *url.URL, ohttp *http.Client) (*Client, error) { function prepareBuffer (line 152) | func prepareBuffer(data any) (*bytes.Buffer, error) { function setRequestHeaders (line 176) | func setRequestHeaders(request *http.Request) { function processScan (line 195) | func processScan(bts []byte, response *http.Response, fn func([]byte) er... function ExtractJSONFromBytes (line 283) | func ExtractJSONFromBytes(input []byte) ([]byte, error) { FILE: llms/llamafile/internal/llamafileclient/llamafileclient_test.go function TestClient_Generate (line 15) | func TestClient_Generate(t *testing.T) { function TestClient_GenerateStream (line 55) | func TestClient_GenerateStream(t *testing.T) { function TestClient_GenerateChat (line 94) | func TestClient_GenerateChat(t *testing.T) { function TestClient_CreateEmbedding (line 138) | func TestClient_CreateEmbedding(t *testing.T) { function TestNewClient (line 168) | func TestNewClient(t *testing.T) { function TestNewClientWithEnvironmentVariables (line 221) | func TestNewClientWithEnvironmentVariables(t *testing.T) { function TestExtractJSONFromBytes (line 261) | func TestExtractJSONFromBytes(t *testing.T) { function TestStatusError_Error (line 317) | func TestStatusError_Error(t *testing.T) { function TestCheckError (line 360) | func TestCheckError(t *testing.T) { function TestPrepareBuffer (line 417) | func TestPrepareBuffer(t *testing.T) { function TestSetRequestHeaders (line 470) | func TestSetRequestHeaders(t *testing.T) { function TestProcessScan (line 480) | func TestProcessScan(t *testing.T) { function TestGenerateRequestStructure (line 545) | func TestGenerateRequestStructure(t *testing.T) { function TestChatRequestStructure (line 568) | func TestChatRequestStructure(t *testing.T) { function TestEmbeddingStructures (line 595) | func TestEmbeddingStructures(t *testing.T) { function TestImageData (line 615) | func TestImageData(t *testing.T) { function TestGenerationSettings (line 621) | func TestGenerationSettings(t *testing.T) { function boolPtr (line 684) | func boolPtr(b bool) *bool { function stringPtr (line 688) | func stringPtr(s string) *string { FILE: llms/llamafile/internal/llamafileclient/types.go type StatusError (line 10) | type StatusError struct method Error (line 16) | func (e StatusError) Error() string { type GenerateRequest (line 30) | type GenerateRequest struct type ImageData (line 40) | type ImageData type Message (line 42) | type Message struct type ChatRequest (line 48) | type ChatRequest struct type GenerationSettings (line 55) | type GenerationSettings struct type Timings (line 88) | type Timings struct type GenerateResponse (line 99) | type GenerateResponse struct type ChatResponse (line 112) | type ChatResponse struct FILE: llms/llamafile/llamafilellm.go type LLM (line 18) | type LLM struct method Call (line 42) | func (o *LLM) Call(ctx context.Context, prompt string, options ...llms... method GenerateContent (line 47) | func (o *LLM) GenerateContent(ctx context.Context, messages []llms.Mes... method CreateEmbedding (line 130) | func (o *LLM) CreateEmbedding(ctx context.Context, texts []string) ([]... function New (line 27) | func New(opts ...Option) (*LLM, error) { function typeToRole (line 147) | func typeToRole(typ llms.ChatMessageType) string { function makeLlamaOptionsFromOptions (line 165) | func makeLlamaOptionsFromOptions(input *llamafileclient.ChatRequest, opt... FILE: llms/llamafile/llamafilellm_test.go function isLlamafileAvailable (line 18) | func isLlamafileAvailable() bool { function newTestClient (line 64) | func newTestClient(t *testing.T) *LLM { function TestGenerateContent (line 75) | func TestGenerateContent(t *testing.T) { function TestWithStreaming (line 101) | func TestWithStreaming(t *testing.T) { function TestCreateEmbedding (line 133) | func TestCreateEmbedding(t *testing.T) { function TestNew_UnitTests (line 148) | func TestNew_UnitTests(t *testing.T) { function TestTypeToRole (line 216) | func TestTypeToRole(t *testing.T) { function TestMakeLlamaOptionsFromOptions (line 269) | func TestMakeLlamaOptionsFromOptions(t *testing.T) { //nolint:funlen // ... function TestGenerateContent_UnitValidation (line 369) | func TestGenerateContent_UnitValidation(t *testing.T) { function TestErrorConstants (line 424) | func TestErrorConstants(t *testing.T) { function TestLLMImplementsModel (line 440) | func TestLLMImplementsModel(t *testing.T) { function TestOptions (line 446) | func TestOptions(t *testing.T) { //nolint:funlen // comprehensive test function containsString (line 716) | func containsString(s, substr string) bool { FILE: llms/llamafile/llmtest_test.go function TestLLM (line 9) | func TestLLM(t *testing.T) { FILE: llms/llamafile/options.go type Option (line 5) | type Option function WithFrequencyPenalty (line 8) | func WithFrequencyPenalty(val float64) Option { function WithGrammar (line 15) | func WithGrammar(val string) Option { function WithIgnoreEOS (line 22) | func WithIgnoreEOS(val bool) Option { function WithMinP (line 29) | func WithMinP(val float64) Option { function WithMirostat (line 36) | func WithMirostat(val int) Option { function WithMirostatEta (line 43) | func WithMirostatEta(val float64) Option { function WithMirostatTau (line 50) | func WithMirostatTau(val float64) Option { function WithModel (line 57) | func WithModel(val string) Option { function WithLogitBias (line 64) | func WithLogitBias(val []interface{}) Option { function WithPenaltyPromptTokens (line 71) | func WithPenaltyPromptTokens(val []interface{}) Option { function WithPresencePenalty (line 78) | func WithPresencePenalty(val float64) Option { function WithRepeatLastN (line 85) | func WithRepeatLastN(val int) Option { function WithRepeatPenalty (line 92) | func WithRepeatPenalty(val float64) Option { function WithSeed (line 99) | func WithSeed(val uint32) Option { function WithStop (line 106) | func WithStop(val []string) Option { function WithStream (line 113) | func WithStream(val bool) Option { function WithTemperature (line 120) | func WithTemperature(val float64) Option { function WithTfsZ (line 127) | func WithTfsZ(val float64) Option { function WithTopK (line 134) | func WithTopK(val int) Option { function WithTopP (line 141) | func WithTopP(val float64) Option { function WithTypicalP (line 148) | func WithTypicalP(val float64) Option { function WithUsePenaltyPromptTokens (line 155) | func WithUsePenaltyPromptTokens(val bool) Option { function WithNPredict (line 162) | func WithNPredict(val int) Option { function WithNProbs (line 169) | func WithNProbs(val int) Option { function WithPenalizeNL (line 176) | func WithPenalizeNL(val bool) Option { function WithNKeep (line 183) | func WithNKeep(val int) Option { function WithNCtx (line 190) | func WithNCtx(val int) Option { function WithEmbeddingSize (line 197) | func WithEmbeddingSize(val int) Option { FILE: llms/llms.go type Model (line 15) | type Model interface type ReasoningModel (line 34) | type ReasoningModel interface function GenerateFromSinglePrompt (line 47) | func GenerateFromSinglePrompt(ctx context.Context, llm Model, prompt str... FILE: llms/local/internal/localclient/completions.go type completionPayload (line 8) | type completionPayload struct type completionResponsePayload (line 12) | type completionResponsePayload struct method createCompletion (line 16) | func (c *Client) createCompletion(ctx context.Context, payload *completi... FILE: llms/local/internal/localclient/localclient.go type Client (line 12) | type Client struct method CreateCompletion (line 35) | func (c *Client) CreateCompletion(ctx context.Context, r *CompletionRe... function New (line 19) | func New(binPath string, globalAsArgs bool, args ...string) (*Client, er... type CompletionRequest (line 25) | type CompletionRequest struct type Completion (line 30) | type Completion struct FILE: llms/local/internal/localclient/localclient_test.go function TestNew (line 8) | func TestNew(t *testing.T) { function TestCreateCompletion (line 49) | func TestCreateCompletion(t *testing.T) { function TestCreateCompletionError (line 94) | func TestCreateCompletionError(t *testing.T) { function TestCreateCompletionWithContext (line 109) | func TestCreateCompletionWithContext(t *testing.T) { FILE: llms/local/llmtest_test.go function TestLLM (line 10) | func TestLLM(t *testing.T) { FILE: llms/local/localllm.go type LLM (line 24) | type LLM struct method Call (line 32) | func (o *LLM) Call(ctx context.Context, prompt string, options ...llms... method appendGlobalsToArgs (line 36) | func (o *LLM) appendGlobalsToArgs(opts llms.CallOptions) { method GenerateContent (line 61) | func (o *LLM) GenerateContent(ctx context.Context, messages []llms.Mes... function New (line 104) | func New(opts ...Option) (*LLM, error) { FILE: llms/local/localllm_option.go constant localLLMBinVarName (line 5) | localLLMBinVarName = "LOCAL_LLM_BIN" constant localLLMArgsVarName (line 7) | localLLMArgsVarName = "LOCAL_LLM_ARGS" type options (line 10) | type options struct type Option (line 16) | type Option function WithBin (line 20) | func WithBin(bin string) Option { function WithArgs (line 28) | func WithArgs(args string) Option { function WithGlobalAsArgs (line 36) | func WithGlobalAsArgs() Option { FILE: llms/local/localllm_test.go function TestNew (line 12) | func TestNew(t *testing.T) { function TestCall (line 80) | func TestCall(t *testing.T) { function TestGenerateContent (line 96) | func TestGenerateContent(t *testing.T) { function TestGenerateContentWithGlobalArgs (line 153) | func TestGenerateContentWithGlobalArgs(t *testing.T) { //nolint:funlen /... function containsArg (line 255) | func containsArg(output, arg string) bool { type testCallbackHandler (line 260) | type testCallbackHandler struct method HandleLLMGenerateContentStart (line 265) | func (h *testCallbackHandler) HandleLLMGenerateContentStart(ctx contex... method HandleLLMGenerateContentEnd (line 269) | func (h *testCallbackHandler) HandleLLMGenerateContentEnd(ctx context.... method HandleText (line 273) | func (h *testCallbackHandler) HandleText(ctx context.Context, text str... method HandleLLMStart (line 274) | func (h *testCallbackHandler) HandleLLMStart(ctx context.Context, prom... method HandleLLMError (line 275) | func (h *testCallbackHandler) HandleLLMError(ctx context.Context, err ... method HandleChainStart (line 276) | func (h *testCallbackHandler) HandleChainStart(ctx context.Context, in... method HandleChainEnd (line 277) | func (h *testCallbackHandler) HandleChainEnd(ctx context.Context, outp... method HandleChainError (line 278) | func (h *testCallbackHandler) HandleChainError(ctx context.Context, er... method HandleToolStart (line 279) | func (h *testCallbackHandler) HandleToolStart(ctx context.Context, inp... method HandleToolEnd (line 280) | func (h *testCallbackHandler) HandleToolEnd(ctx context.Context, outpu... method HandleToolError (line 281) | func (h *testCallbackHandler) HandleToolError(ctx context.Context, err... method HandleAgentAction (line 282) | func (h *testCallbackHandler) HandleAgentAction(ctx context.Context, a... method HandleAgentFinish (line 283) | func (h *testCallbackHandler) HandleAgentFinish(ctx context.Context, f... method HandleRetrieverStart (line 284) | func (h *testCallbackHandler) HandleRetrieverStart(ctx context.Context... method HandleRetrieverEnd (line 285) | func (h *testCallbackHandler) HandleRetrieverEnd(ctx context.Context, ... method HandleStreamingFunc (line 287) | func (h *testCallbackHandler) HandleStreamingFunc(ctx context.Context,... function TestCallbacksHandler (line 289) | func TestCallbacksHandler(t *testing.T) { FILE: llms/maritaca/internal/maritacaclient/maritacaclient.go constant defaultURL (line 14) | defaultURL = "https://chat.maritaca.ai/api" type Doer (line 16) | type Doer interface type Client (line 19) | type Client struct method stream (line 37) | func (c *Client) stream(ctx context.Context, method, path string, data... method Generate (line 102) | func (c *Client) Generate(ctx context.Context, req *ChatRequest, fn Ch... function NewClient (line 26) | func NewClient(ohttp Doer) (*Client, error) { constant maxBufferSize (line 35) | maxBufferSize = 512 * 1000 type ChatResponseFunc (line 99) | type ChatResponseFunc function parseData (line 129) | func parseData(input string) (string, error) { FILE: llms/maritaca/internal/maritacaclient/maritacaclient_test.go function TestClient_Generate (line 14) | func TestClient_Generate(t *testing.T) { function TestClient_GenerateStream (line 59) | func TestClient_GenerateStream(t *testing.T) { FILE: llms/maritaca/internal/maritacaclient/maritacaclient_unit_test.go type mockHTTPClient (line 16) | type mockHTTPClient struct method Do (line 20) | func (m *mockHTTPClient) Do(req *http.Request) (*http.Response, error) { function TestNewClient (line 30) | func TestNewClient(t *testing.T) { function TestClient_stream (line 40) | func TestClient_stream(t *testing.T) { function TestClient_Generate_Unit (line 155) | func TestClient_Generate_Unit(t *testing.T) { function TestParseData (line 241) | func TestParseData(t *testing.T) { function TestStatusError (line 300) | func TestStatusError(t *testing.T) { function TestClient_streamWithLargeResponse (line 317) | func TestClient_streamWithLargeResponse(t *testing.T) { function TestClient_streamContextCancellation (line 352) | func TestClient_streamContextCancellation(t *testing.T) { function TestClient_marshalError (line 384) | func TestClient_marshalError(t *testing.T) { function TestClient_requestError (line 406) | func TestClient_requestError(t *testing.T) { function TestClient_callbackError (line 427) | func TestClient_callbackError(t *testing.T) { FILE: llms/maritaca/internal/maritacaclient/types.go type StatusError (line 7) | type StatusError struct method Error (line 13) | func (e StatusError) Error() string { type Message (line 27) | type Message struct type ChatRequest (line 32) | type ChatRequest struct type ChatResponse (line 40) | type ChatResponse struct type Metrics (line 49) | type Metrics struct type Options (line 57) | type Options struct FILE: llms/maritaca/internal/maritacaclient/types_test.go function TestStatusError_Error (line 9) | func TestStatusError_Error(t *testing.T) { function TestChatRequestStructure (line 61) | func TestChatRequestStructure(t *testing.T) { function TestChatResponseStructure (line 102) | func TestChatResponseStructure(t *testing.T) { function TestMessageStructure (line 131) | func TestMessageStructure(t *testing.T) { function TestOptionsDefaults (line 153) | func TestOptionsDefaults(t *testing.T) { function TestChatRequestWithStream (line 171) | func TestChatRequestWithStream(t *testing.T) { FILE: llms/maritaca/llmtest_test.go function TestLLM (line 10) | func TestLLM(t *testing.T) { FILE: llms/maritaca/maritaca_test.go function newTestClient (line 15) | func newTestClient(t *testing.T, opts ...Option) *LLM { function TestGenerateContent (line 30) | func TestGenerateContent(t *testing.T) { function TestWithStreaming (line 54) | func TestWithStreaming(t *testing.T) { FILE: llms/maritaca/maritacallm.go type LLM (line 19) | type LLM struct method Call (line 47) | func (o *LLM) Call(ctx context.Context, prompt string, options ...llms... method GenerateContent (line 52) | func (o *LLM) GenerateContent(ctx context.Context, messages []llms.Mes... function New (line 28) | func New(opts ...Option) (*LLM, error) { function typeToRole (line 157) | func typeToRole(typ llms.ChatMessageType) string { function makemaritacaOptionsFromOptions (line 175) | func makemaritacaOptionsFromOptions(maritacaOptions maritacaclient.Optio... function createChoice (line 187) | func createChoice(resp maritacaclient.ChatResponse) []*llms.ContentChoice { FILE: llms/maritaca/maritacallm_unit_test.go function TestNew (line 17) | func TestNew(t *testing.T) { function TestTypeToRole (line 63) | func TestTypeToRole(t *testing.T) { function TestMakemaritacaOptionsFromOptions (line 85) | func TestMakemaritacaOptionsFromOptions(t *testing.T) { function TestCreateChoice (line 119) | func TestCreateChoice(t *testing.T) { function TestLLM_Call (line 146) | func TestLLM_Call(t *testing.T) { function TestLLM_GenerateContent_Validation (line 160) | func TestLLM_GenerateContent_Validation(t *testing.T) { function TestLLM_GenerateContent_MessageConversion (line 215) | func TestLLM_GenerateContent_MessageConversion(t *testing.T) { function TestLLM_GenerateContent_CallOptions (line 261) | func TestLLM_GenerateContent_CallOptions(t *testing.T) { function TestLLM_Callbacks (line 290) | func TestLLM_Callbacks(t *testing.T) { type mockCallbackHandler (line 307) | type mockCallbackHandler struct method HandleLLMGenerateContentStart (line 315) | func (h *mockCallbackHandler) HandleLLMGenerateContentStart(ctx contex... method HandleLLMGenerateContentEnd (line 321) | func (h *mockCallbackHandler) HandleLLMGenerateContentEnd(ctx context.... method HandleLLMError (line 327) | func (h *mockCallbackHandler) HandleLLMError(ctx context.Context, err ... method HandleText (line 334) | func (h *mockCallbackHandler) HandleText(ctx context.Context, text str... method HandleLLMStart (line 335) | func (h *mockCallbackHandler) HandleLLMStart(ctx context.Context, prom... method HandleChainStart (line 336) | func (h *mockCallbackHandler) HandleChainStart(ctx context.Context, in... method HandleChainEnd (line 337) | func (h *mockCallbackHandler) HandleChainEnd(ctx context.Context, outp... method HandleChainError (line 338) | func (h *mockCallbackHandler) HandleChainError(ctx context.Context, er... method HandleToolStart (line 339) | func (h *mockCallbackHandler) HandleToolStart(ctx context.Context, inp... method HandleToolEnd (line 340) | func (h *mockCallbackHandler) HandleToolEnd(ctx context.Context, outpu... method HandleToolError (line 341) | func (h *mockCallbackHandler) HandleToolError(ctx context.Context, err... method HandleAgentAction (line 342) | func (h *mockCallbackHandler) HandleAgentAction(ctx context.Context, a... method HandleAgentFinish (line 343) | func (h *mockCallbackHandler) HandleAgentFinish(ctx context.Context, f... method HandleRetrieverStart (line 344) | func (h *mockCallbackHandler) HandleRetrieverStart(ctx context.Context... method HandleRetrieverEnd (line 345) | func (h *mockCallbackHandler) HandleRetrieverEnd(ctx context.Context, ... method HandleStreamingFunc (line 347) | func (h *mockCallbackHandler) HandleStreamingFunc(ctx context.Context,... function TestOptions (line 349) | func TestOptions(t *testing.T) { function TestStreamingResponse (line 421) | func TestStreamingResponse(t *testing.T) { function TestNonStreamingResponse (line 453) | func TestNonStreamingResponse(t *testing.T) { function TestStreamingError (line 483) | func TestStreamingError(t *testing.T) { FILE: llms/maritaca/options.go type options (line 11) | type options struct type Option (line 21) | type Option function WithModel (line 24) | func WithModel(model string) Option { function WithFormat (line 31) | func WithFormat(format string) Option { function WithSystemPrompt (line 41) | func WithSystemPrompt(p string) Option { function WithCustomTemplate (line 48) | func WithCustomTemplate(template string) Option { function WithServerURL (line 55) | func WithServerURL(rawURL string) Option { function WithHTTPClient (line 66) | func WithHTTPClient(client *http.Client) Option { function WithChatMode (line 77) | func WithChatMode(chatMode bool) Option { function WithMaxTokens (line 86) | func WithMaxTokens(maxTokens int) Option { function WithDoSample (line 97) | func WithDoSample(doSample bool) Option { function WithTemperature (line 109) | func WithTemperature(temperature float64) Option { function WithTopP (line 123) | func WithTopP(topP float64) Option { function WithRepetitionPenalty (line 135) | func WithRepetitionPenalty(repetitionPenalty float64) Option { function WithStoppingTokens (line 143) | func WithStoppingTokens(tokens []string) Option { function WithStream (line 154) | func WithStream(stream bool) Option { function WithTokensPerMessage (line 166) | func WithTokensPerMessage(tokensPerMessage int) Option { function WithToken (line 174) | func WithToken(token string) Option { function WithOptions (line 181) | func WithOptions(maritacaOptions maritacaclient.Options) Option { FILE: llms/marshaling.go method MarshalJSON (line 9) | func (mc MessageContent) MarshalJSON() ([]byte, error) { method UnmarshalJSON (line 31) | func (mc *MessageContent) UnmarshalJSON(data []byte) error { method MarshalJSON (line 102) | func (tc TextContent) MarshalJSON() ([]byte, error) { method UnmarshalJSON (line 110) | func (tc *TextContent) UnmarshalJSON(data []byte) error { method MarshalJSON (line 122) | func (iuc ImageURLContent) MarshalJSON() ([]byte, error) { method UnmarshalJSON (line 138) | func (iuc *ImageURLContent) UnmarshalJSON(data []byte) error { method MarshalJSON (line 163) | func (bc BinaryContent) MarshalJSON() ([]byte, error) { method UnmarshalJSON (line 177) | func (bc *BinaryContent) UnmarshalJSON(data []byte) error { method MarshalJSON (line 206) | func (tc ToolCall) MarshalJSON() ([]byte, error) { method UnmarshalJSON (line 225) | func (tc *ToolCall) UnmarshalJSON(data []byte) error { method MarshalJSON (line 259) | func (tc ToolCallResponse) MarshalJSON() ([]byte, error) { method UnmarshalJSON (line 274) | func (tc *ToolCallResponse) UnmarshalJSON(data []byte) error { FILE: llms/marshaling_test.go type unknownContent (line 11) | type unknownContent struct method isPart (line 13) | func (unknownContent) isPart() {} function TestUnmarshalYAML (line 15) | func TestUnmarshalYAML(t *testing.T) { function TestMarshalYAML (line 106) | func TestMarshalYAML(t *testing.T) { function TestUnmarshalJSONMessageContent (line 191) | func TestUnmarshalJSONMessageContent(t *testing.T) { function TestMarshalJSONMessageContent (line 280) | func TestMarshalJSONMessageContent(t *testing.T) { function TestRoundtripping (line 349) | func TestRoundtripping(t *testing.T) { // nolint:funlen // We make an ex... FILE: llms/mistral/client_options.go type clientOptions (line 9) | type clientOptions struct type Option (line 18) | type Option function WithAPIKey (line 21) | func WithAPIKey(apiKey string) Option { function WithEndpoint (line 28) | func WithEndpoint(endpoint string) Option { function WithMaxRetries (line 35) | func WithMaxRetries(maxRetries int) Option { function WithTimeout (line 42) | func WithTimeout(timeout time.Duration) Option { function WithModel (line 49) | func WithModel(model string) Option { function WithCallbacksHandler (line 56) | func WithCallbacksHandler(callbacksHandler callbacks.Handler) Option { FILE: llms/mistral/errors.go type errorMapping (line 10) | type errorMapping struct function MapError (line 61) | func MapError(err error) error { FILE: llms/mistral/llmtest_test.go function TestLLM (line 10) | func TestLLM(t *testing.T) { FILE: llms/mistral/mistralembed.go function convertFloat64ToFloat32 (line 10) | func convertFloat64ToFloat32(input []float64) []float32 { method CreateEmbedding (line 23) | func (m *Model) CreateEmbedding(_ context.Context, inputTexts []string) ... FILE: llms/mistral/mistralembed_test.go function TestConvertFloat64ToFloat32 (line 15) | func TestConvertFloat64ToFloat32(t *testing.T) { function TestErrEmptyEmbeddings (line 87) | func TestErrEmptyEmbeddings(t *testing.T) { function TestMistralEmbed (line 93) | func TestMistralEmbed(t *testing.T) { FILE: llms/mistral/mistralmodel.go type Model (line 14) | type Model struct method Call (line 45) | func (m *Model) Call(ctx context.Context, prompt string, options ...ll... method GenerateContent (line 69) | func (m *Model) GenerateContent(ctx context.Context, langchainMessages... function New (line 24) | func New(opts ...Option) (*Model, error) { function setCallOptions (line 87) | func setCallOptions(options []llms.CallOption, callOpts *llms.CallOption... function resolveDefaultOptions (line 93) | func resolveDefaultOptions(sdkDefaults sdk.ChatRequestParams, c *clientO... function mistralChatParamsFromCallOptions (line 114) | func mistralChatParamsFromCallOptions(callOpts *llms.CallOptions) sdk.Ch... function generateNonStreamingContent (line 146) | func generateNonStreamingContent(ctx context.Context, m *Model, callOpti... function generateStreamingContent (line 192) | func generateStreamingContent(ctx context.Context, m *Model, callOptions... function convertToMistralChatMessages (line 242) | func convertToMistralChatMessages(langchainMessages []llms.MessageConten... function setMistralChatMessageRole (line 269) | func setMistralChatMessageRole(msg *llms.MessageContent, chatMsg *sdk.Ch... FILE: llms/mistral/mistralmodel_test.go function TestNew (line 14) | func TestNew(t *testing.T) { function TestSetCallOptions (line 66) | func TestSetCallOptions(t *testing.T) { function TestResolveDefaultOptions (line 92) | func TestResolveDefaultOptions(t *testing.T) { function TestConvertToMistralChatMessages (line 119) | func TestConvertToMistralChatMessages(t *testing.T) { //nolint:funlen //... function contains (line 295) | func contains(s, substr string) bool { function TestMistralChatParamsFromCallOptions (line 299) | func TestMistralChatParamsFromCallOptions(t *testing.T) { function TestClientOptions (line 387) | func TestClientOptions(t *testing.T) { type testCallbackHandler (line 439) | type testCallbackHandler struct method HandleLLMGenerateContentStart (line 445) | func (h *testCallbackHandler) HandleLLMGenerateContentStart(ctx contex... method HandleLLMGenerateContentEnd (line 449) | func (h *testCallbackHandler) HandleLLMGenerateContentEnd(ctx context.... method HandleLLMError (line 453) | func (h *testCallbackHandler) HandleLLMError(ctx context.Context, err ... method HandleText (line 457) | func (h *testCallbackHandler) HandleText(ctx context.Context, text str... method HandleLLMStart (line 458) | func (h *testCallbackHandler) HandleLLMStart(ctx context.Context, prom... method HandleChainStart (line 459) | func (h *testCallbackHandler) HandleChainStart(ctx context.Context, in... method HandleChainEnd (line 460) | func (h *testCallbackHandler) HandleChainEnd(ctx context.Context, outp... method HandleChainError (line 461) | func (h *testCallbackHandler) HandleChainError(ctx context.Context, er... method HandleToolStart (line 462) | func (h *testCallbackHandler) HandleToolStart(ctx context.Context, inp... method HandleToolEnd (line 463) | func (h *testCallbackHandler) HandleToolEnd(ctx context.Context, outpu... method HandleToolError (line 464) | func (h *testCallbackHandler) HandleToolError(ctx context.Context, err... method HandleAgentAction (line 465) | func (h *testCallbackHandler) HandleAgentAction(ctx context.Context, a... method HandleAgentFinish (line 466) | func (h *testCallbackHandler) HandleAgentFinish(ctx context.Context, f... method HandleRetrieverStart (line 467) | func (h *testCallbackHandler) HandleRetrieverStart(ctx context.Context... method HandleRetrieverEnd (line 468) | func (h *testCallbackHandler) HandleRetrieverEnd(ctx context.Context, ... method HandleStreamingFunc (line 470) | func (h *testCallbackHandler) HandleStreamingFunc(ctx context.Context,... function TestCall (line 472) | func TestCall(t *testing.T) { function TestGenerateContent (line 477) | func TestGenerateContent(t *testing.T) { FILE: llms/ollama/context_cache.go type ContextCache (line 15) | type ContextCache struct method generateCacheKey (line 41) | func (c *ContextCache) generateCacheKey(messages []llms.MessageContent... method Get (line 56) | func (c *ContextCache) Get(messages []llms.MessageContent) (*CacheEntr... method Put (line 82) | func (c *ContextCache) Put(messages []llms.MessageContent, contextToke... method evictExpiredOrOldest (line 103) | func (c *ContextCache) evictExpiredOrOldest() { method Clear (line 132) | func (c *ContextCache) Clear() { method Stats (line 139) | func (c *ContextCache) Stats() (entries int, totalHits int, avgTokensS... type CacheEntry (line 23) | type CacheEntry struct function NewContextCache (line 32) | func NewContextCache(maxSize int, ttl time.Duration) *ContextCache { function WithContextCache (line 161) | func WithContextCache(cache *ContextCache) llms.CallOption { FILE: llms/ollama/internal/ollamaclient/ollamaclient.go type Client (line 19) | type Client struct method do (line 73) | func (c *Client) do(ctx context.Context, method, path string, reqData,... method stream (line 119) | func (c *Client) stream(ctx context.Context, method, path string, data... method Generate (line 184) | func (c *Client) Generate(ctx context.Context, req *GenerateRequest, f... method GenerateChat (line 227) | func (c *Client) GenerateChat(ctx context.Context, req *ChatRequest, f... method CreateEmbedding (line 270) | func (c *Client) CreateEmbedding(ctx context.Context, req *EmbeddingRe... method Pull (line 278) | func (c *Client) Pull(ctx context.Context, req *PullRequest) error { function checkError (line 24) | func checkError(resp *http.Response, body []byte) error { function NewClient (line 40) | func NewClient(ourl *url.URL, ohttp *http.Client) (*Client, error) { constant maxBufferSize (line 117) | maxBufferSize = 512 * 1000 type GenerateResponseFunc (line 180) | type GenerateResponseFunc type ChatResponseFunc (line 181) | type ChatResponseFunc FILE: llms/ollama/internal/ollamaclient/ollamaclient_test.go function getOllamaTestURL (line 20) | func getOllamaTestURL(t *testing.T, rr *httprr.RecordReplay) string { function checkOllamaEndpoint (line 36) | func checkOllamaEndpoint(baseURL string) bool { function TestClient_Generate (line 46) | func TestClient_Generate(t *testing.T) { function TestClient_GenerateStream (line 94) | func TestClient_GenerateStream(t *testing.T) { function TestClient_GenerateChat (line 139) | func TestClient_GenerateChat(t *testing.T) { function TestClient_GenerateChatStream (line 190) | func TestClient_GenerateChatStream(t *testing.T) { function TestClient_CreateEmbedding (line 239) | func TestClient_CreateEmbedding(t *testing.T) { function TestClient_GenerateChatWithThink (line 280) | func TestClient_GenerateChatWithThink(t *testing.T) { function TestOptionsJSONMarshalWithThink (line 335) | func TestOptionsJSONMarshalWithThink(t *testing.T) { FILE: llms/ollama/internal/ollamaclient/types.go type StatusError (line 9) | type StatusError struct method Error (line 15) | func (e StatusError) Error() string { type GenerateRequest (line 29) | type GenerateRequest struct type ImageData (line 41) | type ImageData type Message (line 43) | type Message struct type ChatRequest (line 49) | type ChatRequest struct type Metrics (line 59) | type Metrics struct type EmbeddingRequest (line 68) | type EmbeddingRequest struct type EmbeddingResponse (line 75) | type EmbeddingResponse struct type GenerateResponse (line 79) | type GenerateResponse struct method Summary (line 103) | func (r *GenerateResponse) Summary() { type ChatResponse (line 93) | type ChatResponse struct type Runner (line 132) | type Runner struct type Options (line 151) | type Options struct type PullRequest (line 173) | type PullRequest struct type PullResponse (line 178) | type PullResponse struct FILE: llms/ollama/llmtest_test.go function TestLLM (line 10) | func TestLLM(t *testing.T) { FILE: llms/ollama/ollama_test.go function newTestClient (line 18) | func newTestClient(t *testing.T, opts ...Option) *LLM { function newEmbeddingTestClient (line 54) | func newEmbeddingTestClient(t *testing.T, opts ...Option) *LLM { function TestGenerateContent (line 69) | func TestGenerateContent(t *testing.T) { function TestWithFormat (line 92) | func TestWithFormat(t *testing.T) { function TestWithStreaming (line 121) | func TestWithStreaming(t *testing.T) { function TestWithKeepAlive (line 150) | func TestWithKeepAlive(t *testing.T) { function TestWithThink (line 176) | func TestWithThink(t *testing.T) { function TestWithPullModel (line 202) | func TestWithPullModel(t *testing.T) { function TestCreateEmbedding (line 231) | func TestCreateEmbedding(t *testing.T) { function TestWithPullTimeout (line 263) | func TestWithPullTimeout(t *testing.T) { FILE: llms/ollama/ollamallm.go type LLM (line 22) | type LLM struct method SupportsReasoning (line 50) | func (o *LLM) SupportsReasoning() bool { method Call (line 70) | func (o *LLM) Call(ctx context.Context, prompt string, options ...llms... method GenerateContent (line 75) | func (o *LLM) GenerateContent(ctx context.Context, messages []llms.Mes... method CreateEmbedding (line 254) | func (o *LLM) CreateEmbedding(ctx context.Context, inputTexts []string... method pullModelIfNeeded (line 336) | func (o *LLM) pullModelIfNeeded(ctx context.Context, model string) err... function New (line 34) | func New(opts ...Option) (*LLM, error) { function typeToRole (line 292) | func typeToRole(typ llms.ChatMessageType) string { function makeOllamaOptionsFromOptions (line 310) | func makeOllamaOptionsFromOptions(ollamaOptions ollamaclient.Options, op... FILE: llms/ollama/options.go type options (line 12) | type options struct type Option (line 25) | type Option function WithModel (line 28) | func WithModel(model string) Option { function WithFormat (line 35) | func WithFormat(format string) Option { function WithKeepAlive (line 48) | func WithKeepAlive(keepAlive string) Option { function WithSystemPrompt (line 58) | func WithSystemPrompt(p string) Option { function WithCustomTemplate (line 65) | func WithCustomTemplate(template string) Option { function WithServerURL (line 72) | func WithServerURL(rawURL string) Option { function WithHTTPClient (line 83) | func WithHTTPClient(client *http.Client) Option { function WithRunnerUseNUMA (line 90) | func WithRunnerUseNUMA(numa bool) Option { function WithRunnerNumCtx (line 97) | func WithRunnerNumCtx(num int) Option { function WithRunnerNumKeep (line 105) | func WithRunnerNumKeep(num int) Option { function WithRunnerNumBatch (line 112) | func WithRunnerNumBatch(num int) Option { function WithRunnerNumThread (line 119) | func WithRunnerNumThread(num int) Option { function WithRunnerNumGQA (line 126) | func WithRunnerNumGQA(num int) Option { function WithRunnerNumGPU (line 134) | func WithRunnerNumGPU(num int) Option { function WithRunnerMainGPU (line 144) | func WithRunnerMainGPU(num int) Option { function WithRunnerLowVRAM (line 152) | func WithRunnerLowVRAM(val bool) Option { function WithRunnerF16KV (line 159) | func WithRunnerF16KV(val bool) Option { function WithRunnerLogitsAll (line 166) | func WithRunnerLogitsAll(val bool) Option { function WithRunnerVocabOnly (line 173) | func WithRunnerVocabOnly(val bool) Option { function WithRunnerUseMMap (line 182) | func WithRunnerUseMMap(val bool) Option { function WithRunnerUseMLock (line 189) | func WithRunnerUseMLock(val bool) Option { function WithRunnerEmbeddingOnly (line 196) | func WithRunnerEmbeddingOnly(val bool) Option { function WithRunnerRopeFrequencyBase (line 203) | func WithRunnerRopeFrequencyBase(val float32) Option { function WithRunnerRopeFrequencyScale (line 210) | func WithRunnerRopeFrequencyScale(val float32) Option { function WithPredictTFSZ (line 218) | func WithPredictTFSZ(val float32) Option { function WithPredictTypicalP (line 225) | func WithPredictTypicalP(val float32) Option { function WithPredictRepeatLastN (line 233) | func WithPredictRepeatLastN(val int) Option { function WithPredictMirostat (line 241) | func WithPredictMirostat(val int) Option { function WithPredictMirostatTau (line 249) | func WithPredictMirostatTau(val float32) Option { function WithPredictMirostatEta (line 258) | func WithPredictMirostatEta(val float32) Option { function WithPredictPenalizeNewline (line 265) | func WithPredictPenalizeNewline(val bool) Option { function WithThink (line 273) | func WithThink(val bool) Option { function WithPullModel (line 281) | func WithPullModel() Option { function WithPullTimeout (line 290) | func WithPullTimeout(timeout time.Duration) Option { FILE: llms/ollama/reasoning_test.go function TestOllama_SupportsReasoning (line 13) | func TestOllama_SupportsReasoning(t *testing.T) { function TestOllama_ContextCache (line 77) | func TestOllama_ContextCache(t *testing.T) { function TestOllama_ReasoningIntegration (line 140) | func TestOllama_ReasoningIntegration(t *testing.T) { function TestOllama_CachingIntegration (line 202) | func TestOllama_CachingIntegration(t *testing.T) { FILE: llms/openai/errors.go type errorMapping (line 10) | type errorMapping struct function MapError (line 61) | func MapError(err error) error { FILE: llms/openai/internal/openaiclient/chat.go constant defaultChatModel (line 17) | defaultChatModel = "gpt-3.5-turbo" type StreamOptions (line 22) | type StreamOptions struct type ChatRequest (line 31) | type ChatRequest struct method MarshalJSON (line 95) | func (r ChatRequest) MarshalJSON() ([]byte, error) { function isReasoningModel (line 135) | func isReasoningModel(model string) bool { type ToolType (line 152) | type ToolType constant ToolTypeFunction (line 155) | ToolTypeFunction ToolType = "function" type WebSearchOptions (line 160) | type WebSearchOptions struct type UserLocation (line 171) | type UserLocation struct type ApproximateLocation (line 180) | type ApproximateLocation struct type Tool (line 192) | type Tool struct type ToolChoice (line 198) | type ToolChoice struct type ToolFunction (line 204) | type ToolFunction struct type ToolCall (line 210) | type ToolCall struct type ResponseFormatJSONSchemaProperty (line 216) | type ResponseFormatJSONSchemaProperty struct type ResponseFormatJSONSchema (line 227) | type ResponseFormatJSONSchema struct type ResponseFormat (line 234) | type ResponseFormat struct type ChatMessage (line 240) | type ChatMessage struct method MarshalJSON (line 270) | func (m ChatMessage) MarshalJSON() ([]byte, error) { method UnmarshalJSON (line 325) | func (m *ChatMessage) UnmarshalJSON(data []byte) error { function isSingleTextContent (line 317) | func isSingleTextContent(parts []llms.ContentPart) (string, bool) { type TopLogProbs (line 350) | type TopLogProbs struct type LogProb (line 357) | type LogProb struct type LogProbs (line 367) | type LogProbs struct type FinishReason (line 372) | type FinishReason method MarshalJSON (line 383) | func (r FinishReason) MarshalJSON() ([]byte, error) { constant FinishReasonStop (line 375) | FinishReasonStop FinishReason = "stop" constant FinishReasonLength (line 376) | FinishReasonLength FinishReason = "length" constant FinishReasonFunctionCall (line 377) | FinishReasonFunctionCall FinishReason = "function_call" constant FinishReasonToolCalls (line 378) | FinishReasonToolCalls FinishReason = "tool_calls" constant FinishReasonContentFilter (line 379) | FinishReasonContentFilter FinishReason = "content_filter" constant FinishReasonNull (line 380) | FinishReasonNull FinishReason = "null" type ChatCompletionChoice (line 391) | type ChatCompletionChoice struct type ChatUsage (line 399) | type ChatUsage struct type ChatCompletionResponse (line 416) | type ChatCompletionResponse struct type Usage (line 426) | type Usage struct type StreamedChatResponsePayload (line 443) | type StreamedChatResponsePayload struct type FunctionDefinition (line 470) | type FunctionDefinition struct type FunctionCallBehavior (line 482) | type FunctionCallBehavior constant FunctionCallBehaviorUnspecified (line 486) | FunctionCallBehaviorUnspecified FunctionCallBehavior = "" constant FunctionCallBehaviorNone (line 488) | FunctionCallBehaviorNone FunctionCallBehavior = "none" constant FunctionCallBehaviorAuto (line 490) | FunctionCallBehaviorAuto FunctionCallBehavior = "auto" type FunctionCall (line 494) | type FunctionCall struct method createChat (line 501) | func (c *Client) createChat(ctx context.Context, payload *ChatRequest) (... function parseStreamingChatResponse (line 571) | func parseStreamingChatResponse(ctx context.Context, r *http.Response, p... function combineStreamingChatResponse (line 642) | func combineStreamingChatResponse( function updateFunctionCall (line 705) | func updateFunctionCall(message ChatMessage, functionCall *FunctionCall)... function updateToolCalls (line 715) | func updateToolCalls(tools []ToolCall, delta []*ToolCall) ([]byte, []Too... function StreamingChatResponseTools (line 741) | func StreamingChatResponseTools(tools []ToolCall, delta []*ToolCall) ([]... FILE: llms/openai/internal/openaiclient/chat_sse_test.go function TestParseStreamingChatResponse_SSEComments (line 11) | func TestParseStreamingChatResponse_SSEComments(t *testing.T) { FILE: llms/openai/internal/openaiclient/chat_test.go function TestParseStreamingChatResponse_FinishReason (line 15) | func TestParseStreamingChatResponse_FinishReason(t *testing.T) { function TestParseStreamingChatResponse_ReasoningContent (line 37) | func TestParseStreamingChatResponse_ReasoningContent(t *testing.T) { function TestParseStreamingChatResponse_ReasoningFunc (line 61) | func TestParseStreamingChatResponse_ReasoningFunc(t *testing.T) { function TestChatMessage_MarshalUnmarshal (line 89) | func TestChatMessage_MarshalUnmarshal(t *testing.T) { function TestChatMessage_MarshalUnmarshal_WithReasoning (line 109) | func TestChatMessage_MarshalUnmarshal_WithReasoning(t *testing.T) { FILE: llms/openai/internal/openaiclient/completions.go type CompletionRequest (line 8) | type CompletionRequest struct type CompletionResponse (line 27) | type CompletionResponse struct type errorMessage (line 45) | type errorMessage struct method setCompletionDefaults (line 52) | func (c *Client) setCompletionDefaults(payload *CompletionRequest) { method createCompletion (line 76) | func (c *Client) createCompletion(ctx context.Context, payload *Completi... FILE: llms/openai/internal/openaiclient/embeddings.go constant defaultEmbeddingModel (line 13) | defaultEmbeddingModel = "text-embedding-ada-002" type embeddingPayload (line 16) | type embeddingPayload struct type embeddingResponsePayload (line 22) | type embeddingResponsePayload struct method createEmbedding (line 37) | func (c *Client) createEmbedding(ctx context.Context, payload *embedding... FILE: llms/openai/internal/openaiclient/marshal_test.go function TestChatRequest_MarshalJSON (line 8) | func TestChatRequest_MarshalJSON(t *testing.T) { function TestChatRequest_TemperatureMarshalJSON (line 75) | func TestChatRequest_TemperatureMarshalJSON(t *testing.T) { function TestChatRequest_WebSearchOptionsMarshalJSON (line 170) | func TestChatRequest_WebSearchOptionsMarshalJSON(t *testing.T) { function TestIsReasoningModel (line 280) | func TestIsReasoningModel(t *testing.T) { FILE: llms/openai/internal/openaiclient/openaiclient.go constant defaultBaseURL (line 13) | defaultBaseURL = "https://api.openai.com/v1" constant defaultFunctionCallBehavior (line 14) | defaultFunctionCallBehavior = "auto" type APIType (line 20) | type APIType constant APITypeOpenAI (line 23) | APITypeOpenAI APIType = "OPEN_AI" constant APITypeAzure (line 24) | APITypeAzure APIType = "AZURE" constant APITypeAzureAD (line 25) | APITypeAzureAD APIType = "AZURE_AD" type Client (line 29) | type Client struct method CreateCompletion (line 97) | func (c *Client) CreateCompletion(ctx context.Context, r *CompletionRe... method makeEmbeddingPayload (line 117) | func (c *Client) makeEmbeddingPayload(r *EmbeddingRequest) *embeddingP... method CreateEmbedding (line 136) | func (c *Client) CreateEmbedding(ctx context.Context, r *EmbeddingRequ... method CreateChat (line 159) | func (c *Client) CreateChat(ctx context.Context, r *ChatRequest) (*Cha... method setHeaders (line 181) | func (c *Client) setHeaders(req *http.Request) { method buildURL (line 193) | func (c *Client) buildURL(suffix string, model string) string { method buildAzureURL (line 202) | func (c *Client) buildAzureURL(suffix string, model string) string { type Option (line 46) | type Option function WithEmbeddingDimensions (line 49) | func WithEmbeddingDimensions(dimensions int) Option { type Doer (line 57) | type Doer interface function New (line 62) | func New(token string, model string, baseURL string, organization string, type Completion (line 92) | type Completion struct type EmbeddingRequest (line 111) | type EmbeddingRequest struct function IsAzure (line 177) | func IsAzure(apiType APIType) bool { function sanitizeHTTPError (line 216) | func sanitizeHTTPError(err error) error { FILE: llms/openai/internal/openaiclient/openaiclient_test.go function setupTestClient (line 19) | func setupTestClient(t *testing.T, model string) *Client { function TestClient_CreateChatCompletion (line 41) | func TestClient_CreateChatCompletion(t *testing.T) { function TestClient_CreateChatCompletionStream (line 76) | func TestClient_CreateChatCompletionStream(t *testing.T) { function TestClient_CreateEmbedding (line 115) | func TestClient_CreateEmbedding(t *testing.T) { function TestClient_CreateEmbeddingWithDimensions (line 143) | func TestClient_CreateEmbeddingWithDimensions(t *testing.T) { function TestClient_FunctionCall (line 171) | func TestClient_FunctionCall(t *testing.T) { function TestClient_WithResponseFormat (line 219) | func TestClient_WithResponseFormat(t *testing.T) { function TestMakeEmbeddingRequest (line 255) | func TestMakeEmbeddingRequest(t *testing.T) { function TestInternalMetadataFiltering (line 274) | func TestInternalMetadataFiltering(t *testing.T) { type mockTimeoutError (line 343) | type mockTimeoutError struct method Error (line 347) | func (e *mockTimeoutError) Error() string { return e.message } method Timeout (line 348) | func (e *mockTimeoutError) Timeout() bool { return true } method Temporary (line 349) | func (e *mockTimeoutError) Temporary() bool { return false } type mockNetworkError (line 352) | type mockNetworkError struct method Error (line 356) | func (e *mockNetworkError) Error() string { return e.message } method Timeout (line 357) | func (e *mockNetworkError) Timeout() bool { return false } method Temporary (line 358) | func (e *mockNetworkError) Temporary() bool { return false } function TestSanitizeHTTPError (line 363) | func TestSanitizeHTTPError(t *testing.T) { type mockHTTPClient (line 410) | type mockHTTPClient struct method Do (line 414) | func (m *mockHTTPClient) Do(req *http.Request) (*http.Response, error) { FILE: llms/openai/llm.go function newClient (line 21) | func newClient(opts ...Option) (*options, *openaiclient.Client, error) { function getEnvs (line 60) | func getEnvs(keys ...string) string { FILE: llms/openai/llmtest_test.go function TestLLM (line 10) | func TestLLM(t *testing.T) { FILE: llms/openai/max_tokens_test.go function TestMaxTokensFieldSerialization (line 13) | func TestMaxTokensFieldSerialization(t *testing.T) { function TestMaxTokensBehaviorDocumentation (line 95) | func TestMaxTokensBehaviorDocumentation(t *testing.T) { FILE: llms/openai/multicontent_test.go function newTestClient (line 16) | func newTestClient(t *testing.T, opts ...Option) llms.Model { function TestMultiContentText (line 46) | func TestMultiContentText(t *testing.T) { function TestMultiContentTextChatSequence (line 69) | func TestMultiContentTextChatSequence(t *testing.T) { function TestMultiContentImage (line 96) | func TestMultiContentImage(t *testing.T) { function TestWithStreaming (line 120) | func TestWithStreaming(t *testing.T) { function TestFunctionCall (line 151) | func TestFunctionCall(t *testing.T) { FILE: llms/openai/openaillm.go type LLM (line 16) | type LLM struct method Call (line 99) | func (o *LLM) Call(ctx context.Context, prompt string, options ...llms... method GenerateContent (line 104) | func (o *LLM) GenerateContent(ctx context.Context, messages []llms.Mes... method SupportsReasoning (line 390) | func (o *LLM) SupportsReasoning() bool { method CreateEmbedding (line 427) | func (o *LLM) CreateEmbedding(ctx context.Context, inputTexts []string... constant RoleSystem (line 23) | RoleSystem = "system" constant RoleAssistant (line 24) | RoleAssistant = "assistant" constant RoleUser (line 25) | RoleUser = "user" constant RoleFunction (line 26) | RoleFunction = "function" constant RoleTool (line 27) | RoleTool = "tool" type ModelCapability (line 31) | type ModelCapability struct function getModelCapabilities (line 66) | func getModelCapabilities(model string) ModelCapability { function New (line 86) | func New(opts ...Option) (*LLM, error) { function ExtractToolParts (line 445) | func ExtractToolParts(msg *ChatMessage) ([]llms.ContentPart, []llms.Tool... function toolFromTool (line 464) | func toolFromTool(t llms.Tool) (openaiclient.Tool, error) { function toolCallsFromToolCalls (line 483) | func toolCallsFromToolCalls(tcs []llms.ToolCall) []openaiclient.ToolCall { function toolCallFromToolCall (line 492) | func toolCallFromToolCall(tc llms.ToolCall) openaiclient.ToolCall { function webSearchOptionsFromCallOptions (line 504) | func webSearchOptionsFromCallOptions(opts *llms.WebSearchOptions) *opena... FILE: llms/openai/openaillm_option.go constant tokenEnvVarName (line 9) | tokenEnvVarName = "OPENAI_API_KEY" constant modelEnvVarName (line 10) | modelEnvVarName = "OPENAI_MODEL" constant baseURLEnvVarName (line 11) | baseURLEnvVarName = "OPENAI_BASE_URL" constant baseAPIBaseEnvVarName (line 12) | baseAPIBaseEnvVarName = "OPENAI_API_BASE" constant organizationEnvVarName (line 13) | organizationEnvVarName = "OPENAI_ORGANIZATION" type APIType (line 16) | type APIType constant APITypeOpenAI (line 19) | APITypeOpenAI APIType = APIType(openaiclient.APITypeOpenAI) constant APITypeAzure (line 20) | APITypeAzure = APIType(openaiclient.APITypeAzure) constant APITypeAzureAD (line 21) | APITypeAzureAD = APIType(openaiclient.APITypeAzureAD) constant DefaultAPIVersion (line 25) | DefaultAPIVersion = "2023-05-15" type options (line 28) | type options struct type Option (line 47) | type Option function WithToken (line 63) | func WithToken(token string) Option { function WithModel (line 72) | func WithModel(model string) Option { function WithEmbeddingModel (line 79) | func WithEmbeddingModel(embeddingModel string) Option { function WithEmbeddingDimensions (line 89) | func WithEmbeddingDimensions(dimensions int) Option { function WithBaseURL (line 98) | func WithBaseURL(baseURL string) Option { function WithOrganization (line 106) | func WithOrganization(organization string) Option { function WithAPIType (line 114) | func WithAPIType(apiType APIType) Option { function WithAPIVersion (line 122) | func WithAPIVersion(apiVersion string) Option { function WithHTTPClient (line 130) | func WithHTTPClient(client openaiclient.Doer) Option { function WithCallback (line 137) | func WithCallback(callbackHandler callbacks.Handler) Option { function WithResponseFormat (line 144) | func WithResponseFormat(responseFormat *ResponseFormat) Option { FILE: llms/openai/openrouter_httprr_test.go function TestOpenRouterWithHTTPRR (line 17) | func TestOpenRouterWithHTTPRR(t *testing.T) { FILE: llms/openai/openrouter_streaming_test.go function TestOpenRouterStreamingPrefix (line 17) | func TestOpenRouterStreamingPrefix(t *testing.T) { function TestOpenRouterRateLimitHandling (line 80) | func TestOpenRouterRateLimitHandling(t *testing.T) { FILE: llms/openai/options.go function WithMaxCompletionTokens (line 16) | func WithMaxCompletionTokens(maxTokens int) llms.CallOption { function WithLegacyMaxTokensField (line 32) | func WithLegacyMaxTokensField() llms.CallOption { FILE: llms/openai/options_test.go function TestWithMaxCompletionTokens (line 9) | func TestWithMaxCompletionTokens(t *testing.T) { function TestOptionsCompatibility (line 31) | func TestOptionsCompatibility(t *testing.T) { function TestWithLegacyMaxTokensField (line 53) | func TestWithLegacyMaxTokensField(t *testing.T) { function TestWithWebSearch (line 77) | func TestWithWebSearch(t *testing.T) { function TestWebSearchOptionsConversion (line 133) | func TestWebSearchOptionsConversion(t *testing.T) { FILE: llms/openai/structured_output_test.go function TestStructuredOutputObjectSchema (line 15) | func TestStructuredOutputObjectSchema(t *testing.T) { function TestStructuredOutputObjectAndArraySchema (line 59) | func TestStructuredOutputObjectAndArraySchema(t *testing.T) { function TestStructuredOutputFunctionCalling (line 109) | func TestStructuredOutputFunctionCalling(t *testing.T) { FILE: llms/options.go type CallOption (line 6) | type CallOption type CallOptions (line 10) | type CallOptions struct type Tool (line 79) | type Tool struct type FunctionDefinition (line 87) | type FunctionDefinition struct type ToolChoice (line 100) | type ToolChoice struct type FunctionReference (line 108) | type FunctionReference struct type FunctionCallBehavior (line 114) | type FunctionCallBehavior type WebSearchOptions (line 118) | type WebSearchOptions struct type UserLocation (line 129) | type UserLocation struct type ApproximateLocation (line 138) | type ApproximateLocation struct constant FunctionCallBehaviorNone (line 151) | FunctionCallBehaviorNone FunctionCallBehavior = "none" constant FunctionCallBehaviorAuto (line 153) | FunctionCallBehaviorAuto FunctionCallBehavior = "auto" function WithModel (line 157) | func WithModel(model string) CallOption { function WithMaxTokens (line 164) | func WithMaxTokens(maxTokens int) CallOption { function WithCandidateCount (line 171) | func WithCandidateCount(c int) CallOption { function WithTemperature (line 179) | func WithTemperature(temperature float64) CallOption { function WithStopWords (line 186) | func WithStopWords(stopWords []string) CallOption { function WithOptions (line 193) | func WithOptions(options CallOptions) CallOption { function WithStreamingFunc (line 200) | func WithStreamingFunc(streamingFunc func(ctx context.Context, chunk []b... function WithStreamingReasoningFunc (line 207) | func WithStreamingReasoningFunc(streamingReasoningFunc func(ctx context.... function WithTopK (line 214) | func WithTopK(topK int) CallOption { function WithTopP (line 221) | func WithTopP(topP float64) CallOption { function WithSeed (line 228) | func WithSeed(seed int) CallOption { function WithMinLength (line 235) | func WithMinLength(minLength int) CallOption { function WithMaxLength (line 242) | func WithMaxLength(maxLength int) CallOption { function WithN (line 249) | func WithN(n int) CallOption { function WithRepetitionPenalty (line 256) | func WithRepetitionPenalty(repetitionPenalty float64) CallOption { function WithFrequencyPenalty (line 263) | func WithFrequencyPenalty(frequencyPenalty float64) CallOption { function WithPresencePenalty (line 270) | func WithPresencePenalty(presencePenalty float64) CallOption { function WithFunctionCallBehavior (line 278) | func WithFunctionCallBehavior(behavior FunctionCallBehavior) CallOption { function WithFunctions (line 286) | func WithFunctions(functions []FunctionDefinition) CallOption { function WithToolChoice (line 294) | func WithToolChoice(choice any) CallOption { function WithTools (line 302) | func WithTools(tools []Tool) CallOption { function WithJSONMode (line 310) | func WithJSONMode() CallOption { function WithMetadata (line 318) | func WithMetadata(metadata map[string]interface{}) CallOption { function WithResponseMIMEType (line 326) | func WithResponseMIMEType(responseMIMEType string) CallOption { function WithWebSearch (line 335) | func WithWebSearch(options *WebSearchOptions) CallOption { FILE: llms/options_test.go function TestCallOptions (line 12) | func TestCallOptions(t *testing.T) { //nolint:funlen // comprehensive test function TestWithOptions (line 174) | func TestWithOptions(t *testing.T) { function TestWithStreamingFunc (line 193) | func TestWithStreamingFunc(t *testing.T) { function TestWithStreamingReasoningFunc (line 217) | func TestWithStreamingReasoningFunc(t *testing.T) { function TestWithMetadata (line 252) | func TestWithMetadata(t *testing.T) { function TestWithTools (line 268) | func TestWithTools(t *testing.T) { function TestWithToolChoice (line 319) | func TestWithToolChoice(t *testing.T) { function TestDeprecatedFunctionOptions (line 355) | func TestDeprecatedFunctionOptions(t *testing.T) { function TestMultipleOptions (line 411) | func TestMultipleOptions(t *testing.T) { function TestStreamingFuncError (line 457) | func TestStreamingFuncError(t *testing.T) { function TestEmptyOptions (line 472) | func TestEmptyOptions(t *testing.T) { FILE: llms/prompt_caching.go type CacheControl (line 6) | type CacheControl struct type CachedContent (line 15) | type CachedContent struct method isPart (line 20) | func (cc CachedContent) isPart() {} function WithCacheControl (line 23) | func WithCacheControl(content ContentPart, control *CacheControl) Cached... function WithPromptCaching (line 33) | func WithPromptCaching(enabled bool) CallOption { FILE: llms/prompt_caching_test.go function TestWithCacheControl (line 10) | func TestWithCacheControl(t *testing.T) { function TestWithPromptCaching (line 28) | func TestWithPromptCaching(t *testing.T) { function TestCachedContentImplementsContentPart (line 48) | func TestCachedContentImplementsContentPart(t *testing.T) { FILE: llms/prompts.go type PromptValue (line 4) | type PromptValue interface FILE: llms/prompts_test.go type mockPromptValue (line 11) | type mockPromptValue struct method String (line 16) | func (m mockPromptValue) String() string { method Messages (line 20) | func (m mockPromptValue) Messages() []llms.ChatMessage { function TestPromptValueInterface (line 24) | func TestPromptValueInterface(t *testing.T) { function TestMultiplePromptValues (line 54) | func TestMultiplePromptValues(t *testing.T) { type complexPromptValue (line 123) | type complexPromptValue struct method String (line 128) | func (c complexPromptValue) String() string { method Messages (line 136) | func (c complexPromptValue) Messages() []llms.ChatMessage { function TestComplexPromptValue (line 143) | func TestComplexPromptValue(t *testing.T) { FILE: llms/reasoning.go type ThinkingMode (line 6) | type ThinkingMode constant ThinkingModeNone (line 10) | ThinkingModeNone ThinkingMode = "none" constant ThinkingModeLow (line 13) | ThinkingModeLow ThinkingMode = "low" constant ThinkingModeMedium (line 16) | ThinkingModeMedium ThinkingMode = "medium" constant ThinkingModeHigh (line 19) | ThinkingModeHigh ThinkingMode = "high" constant ThinkingModeAuto (line 22) | ThinkingModeAuto ThinkingMode = "auto" type ThinkingConfig (line 26) | type ThinkingConfig struct function DefaultThinkingConfig (line 48) | func DefaultThinkingConfig() *ThinkingConfig { function WithThinking (line 57) | func WithThinking(config *ThinkingConfig) CallOption { function getOrCreateThinkingConfig (line 67) | func getOrCreateThinkingConfig(opts *CallOptions) *ThinkingConfig { function GetThinkingConfig (line 83) | func GetThinkingConfig(opts *CallOptions) *ThinkingConfig { function WithThinkingMode (line 93) | func WithThinkingMode(mode ThinkingMode) CallOption { function WithThinkingBudget (line 101) | func WithThinkingBudget(tokens int) CallOption { function WithReturnThinking (line 109) | func WithReturnThinking(enabled bool) CallOption { function WithStreamThinking (line 117) | func WithStreamThinking(enabled bool) CallOption { function WithInterleaveThinking (line 126) | func WithInterleaveThinking(enabled bool) CallOption { function IsReasoningModel (line 138) | func IsReasoningModel(model string) bool { function SupportsReasoningModel (line 145) | func SupportsReasoningModel(llm interface{}) bool { function DefaultIsReasoningModel (line 159) | func DefaultIsReasoningModel(model string) bool { function CalculateThinkingBudget (line 197) | func CalculateThinkingBudget(mode ThinkingMode, maxTokens int) int { type ThinkingTokenUsage (line 214) | type ThinkingTokenUsage struct function ExtractThinkingTokens (line 235) | func ExtractThinkingTokens(generationInfo map[string]any) *ThinkingToken... FILE: llms/reasoning_test.go function TestThinkingModes (line 10) | func TestThinkingModes(t *testing.T) { function TestDefaultThinkingConfig (line 32) | func TestDefaultThinkingConfig(t *testing.T) { function TestWithThinking (line 52) | func TestWithThinking(t *testing.T) { function TestWithThinkingMode (line 79) | func TestWithThinkingMode(t *testing.T) { function TestWithThinkingBudget (line 95) | func TestWithThinkingBudget(t *testing.T) { function TestWithReturnThinking (line 111) | func TestWithReturnThinking(t *testing.T) { function TestWithStreamThinking (line 127) | func TestWithStreamThinking(t *testing.T) { function TestWithInterleaveThinking (line 143) | func TestWithInterleaveThinking(t *testing.T) { function TestIsReasoningModel (line 159) | func TestIsReasoningModel(t *testing.T) { function TestCalculateThinkingBudget (line 205) | func TestCalculateThinkingBudget(t *testing.T) { function TestExtractThinkingTokens (line 232) | func TestExtractThinkingTokens(t *testing.T) { type MockLLMWithThinking (line 322) | type MockLLMWithThinking struct method Call (line 327) | func (m *MockLLMWithThinking) Call(ctx context.Context, prompt string,... method GenerateContent (line 331) | func (m *MockLLMWithThinking) GenerateContent(ctx context.Context, mes... method SupportsReasoning (line 374) | func (m *MockLLMWithThinking) SupportsReasoning() bool { function TestThinkingIntegration (line 378) | func TestThinkingIntegration(t *testing.T) { function TestSupportsReasoningModel (line 446) | func TestSupportsReasoningModel(t *testing.T) { FILE: llms/token_utilization_test.go type MockLLMWithTokenUsage (line 11) | type MockLLMWithTokenUsage struct method Call (line 15) | func (m *MockLLMWithTokenUsage) Call(ctx context.Context, prompt strin... method GenerateContent (line 19) | func (m *MockLLMWithTokenUsage) GenerateContent(ctx context.Context, m... function TestTokenUtilizationWithoutCache (line 45) | func TestTokenUtilizationWithoutCache(t *testing.T) { function TestTokenUtilizationWithCache (line 94) | func TestTokenUtilizationWithCache(t *testing.T) { function TestCalculateCostSavings (line 144) | func TestCalculateCostSavings(t *testing.T) { FILE: llms/watsonx/llmtest_test.go function TestLLM (line 11) | func TestLLM(t *testing.T) { FILE: llms/watsonx/watsonxllm.go type LLM (line 17) | type LLM struct method Call (line 27) | func (wx *LLM) Call(ctx context.Context, prompt string, options ...llm... method GenerateContent (line 32) | func (wx *LLM) GenerateContent(ctx context.Context, messages []llms.Me... function New (line 69) | func New(modelID string, opts ...wx.ClientOption) (*LLM, error) { function getPrompt (line 81) | func getPrompt(messages []llms.MessageContent) (string, error) { function getDefaultCallOptions (line 93) | func getDefaultCallOptions() *llms.CallOptions { function toWatsonxOptions (line 104) | func toWatsonxOptions(options *[]llms.CallOption) []wx.GenerateOption { FILE: memory/alloydb/chat_message_history.go type ChatMessageHistory (line 15) | type ChatMessageHistory struct method validateTable (line 58) | func (c *ChatMessageHistory) validateTable(ctx context.Context) error { method addMessage (line 118) | func (c *ChatMessageHistory) addMessage(ctx context.Context, content s... method AddMessage (line 134) | func (c *ChatMessageHistory) AddMessage(ctx context.Context, message l... method AddAIMessage (line 139) | func (c *ChatMessageHistory) AddAIMessage(ctx context.Context, content... method AddUserMessage (line 144) | func (c *ChatMessageHistory) AddUserMessage(ctx context.Context, conte... method Clear (line 150) | func (c *ChatMessageHistory) Clear(ctx context.Context) error { method AddMessages (line 163) | func (c *ChatMessageHistory) AddMessages(ctx context.Context, messages... method Messages (line 180) | func (c *ChatMessageHistory) Messages(ctx context.Context) ([]llms.Cha... method SetMessages (line 230) | func (c *ChatMessageHistory) SetMessages(ctx context.Context, messages... function NewChatMessageHistory (line 25) | func NewChatMessageHistory(ctx context.Context, FILE: memory/alloydb/chat_message_history_options.go constant defaultSchemaName (line 4) | defaultSchemaName = "public" type ChatMessageHistoryStoresOption (line 9) | type ChatMessageHistoryStoresOption function WithSchemaName (line 12) | func WithSchemaName(schemaName string) ChatMessageHistoryStoresOption { function applyChatMessageHistoryOptions (line 20) | func applyChatMessageHistoryOptions(cmh ChatMessageHistory, opts ...Chat... FILE: memory/alloydb/chat_message_history_test.go type chatMsg (line 14) | type chatMsg struct method GetType (line 16) | func (chatMsg) GetType() llms.ChatMessageType { method GetContent (line 20) | func (chatMsg) GetContent() string { function getEnvVariables (line 24) | func getEnvVariables(t *testing.T) (string, string, string, string, stri... function setEngine (line 59) | func setEngine(ctx context.Context, t *testing.T) (alloydbutil.PostgresE... function TestValidateTable (line 73) | func TestValidateTable(t *testing.T) { FILE: memory/alloydb/chat_message_history_unit_test.go function TestApplyChatMessageHistoryOptions (line 13) | func TestApplyChatMessageHistoryOptions(t *testing.T) { function TestChatMessageHistory_ValidateRequiredFields (line 27) | func TestChatMessageHistory_ValidateRequiredFields(t *testing.T) { function TestChatMessageHistory_MessageMarshaling (line 79) | func TestChatMessageHistory_MessageMarshaling(t *testing.T) { function TestChatMessageHistory_SQLGeneration (line 125) | func TestChatMessageHistory_SQLGeneration(t *testing.T) { function TestChatMessageHistory_ErrorHandling (line 173) | func TestChatMessageHistory_ErrorHandling(t *testing.T) { function TestChatMessageHistory_MessageTypeConversion (line 216) | func TestChatMessageHistory_MessageTypeConversion(t *testing.T) { function TestChatMessageHistory_BatchOperations (line 260) | func TestChatMessageHistory_BatchOperations(t *testing.T) { function TestChatMessageHistory_SchemaValidation (line 276) | func TestChatMessageHistory_SchemaValidation(t *testing.T) { function TestChatMessageHistory_ClearAndSet (line 345) | func TestChatMessageHistory_ClearAndSet(t *testing.T) { function TestChatMessageHistory_QueryFormatting (line 369) | func TestChatMessageHistory_QueryFormatting(t *testing.T) { FILE: memory/buffer.go type ConversationBuffer (line 16) | type ConversationBuffer struct method MemoryVariables (line 36) | func (m *ConversationBuffer) MemoryVariables(context.Context) []string { method LoadMemoryVariables (line 44) | func (m *ConversationBuffer) LoadMemoryVariables( method SaveContext (line 75) | func (m *ConversationBuffer) SaveContext( method Clear (line 102) | func (m *ConversationBuffer) Clear(ctx context.Context) error { method GetMemoryKey (line 106) | func (m *ConversationBuffer) GetMemoryKey(context.Context) string { function NewConversationBuffer (line 31) | func NewConversationBuffer(options ...ConversationBufferOption) *Convers... function GetInputValue (line 110) | func GetInputValue(inputValues map[string]any, inputKey string) (string,... function getInputValueReturnToString (line 141) | func getInputValueReturnToString( FILE: memory/buffer_options.go type ConversationBufferOption (line 7) | type ConversationBufferOption function WithChatHistory (line 10) | func WithChatHistory(chatHistory schema.ChatMessageHistory) Conversation... function WithReturnMessages (line 17) | func WithReturnMessages(returnMessages bool) ConversationBufferOption { function WithInputKey (line 24) | func WithInputKey(inputKey string) ConversationBufferOption { function WithOutputKey (line 31) | func WithOutputKey(outputKey string) ConversationBufferOption { function WithHumanPrefix (line 38) | func WithHumanPrefix(humanPrefix string) ConversationBufferOption { function WithAIPrefix (line 45) | func WithAIPrefix(aiPrefix string) ConversationBufferOption { function WithMemoryKey (line 52) | func WithMemoryKey(memoryKey string) ConversationBufferOption { function applyBufferOptions (line 58) | func applyBufferOptions(opts ...ConversationBufferOption) *ConversationB... FILE: memory/buffer_test.go function TestBufferMemory (line 13) | func TestBufferMemory(t *testing.T) { function TestBufferMemoryReturnMessage (line 33) | func TestBufferMemoryReturnMessage(t *testing.T) { function TestBufferMemoryWithPreLoadedHistory (line 63) | func TestBufferMemoryWithPreLoadedHistory(t *testing.T) { type testChatMessageHistory (line 80) | type testChatMessageHistory struct method AddUserMessage (line 84) | func (t testChatMessageHistory) AddUserMessage(context.Context, string... method AddAIMessage (line 88) | func (t testChatMessageHistory) AddAIMessage(context.Context, string) ... method AddMessage (line 92) | func (t testChatMessageHistory) AddMessage(context.Context, llms.ChatM... method Clear (line 96) | func (t testChatMessageHistory) Clear(context.Context) error { method SetMessages (line 100) | func (t testChatMessageHistory) SetMessages(context.Context, []llms.Ch... method Messages (line 104) | func (t testChatMessageHistory) Messages(context.Context) ([]llms.Chat... function TestBufferMemoryWithChatHistoryOption (line 111) | func TestBufferMemoryWithChatHistoryOption(t *testing.T) { FILE: memory/chat.go type ChatMessageHistory (line 11) | type ChatMessageHistory struct method Messages (line 24) | func (h *ChatMessageHistory) Messages(_ context.Context) ([]llms.ChatM... method AddAIMessage (line 29) | func (h *ChatMessageHistory) AddAIMessage(_ context.Context, text stri... method AddUserMessage (line 35) | func (h *ChatMessageHistory) AddUserMessage(_ context.Context, text st... method Clear (line 40) | func (h *ChatMessageHistory) Clear(_ context.Context) error { method AddMessage (line 45) | func (h *ChatMessageHistory) AddMessage(_ context.Context, message llm... method SetMessages (line 50) | func (h *ChatMessageHistory) SetMessages(_ context.Context, messages [... function NewChatMessageHistory (line 19) | func NewChatMessageHistory(options ...ChatMessageHistoryOption) *ChatMes... FILE: memory/chat_options.go type ChatMessageHistoryOption (line 7) | type ChatMessageHistoryOption function WithPreviousMessages (line 11) | func WithPreviousMessages(previousMessages []llms.ChatMessage) ChatMessa... function applyChatOptions (line 17) | func applyChatOptions(options ...ChatMessageHistoryOption) *ChatMessageH... FILE: memory/chat_test.go function TestChatMessageHistory (line 12) | func TestChatMessageHistory(t *testing.T) { FILE: memory/cloudsql/chat_message_history.go type ChatMessageHistory (line 15) | type ChatMessageHistory struct method validateTable (line 58) | func (c *ChatMessageHistory) validateTable(ctx context.Context) error { method addMessage (line 118) | func (c *ChatMessageHistory) addMessage(ctx context.Context, content s... method AddMessage (line 134) | func (c *ChatMessageHistory) AddMessage(ctx context.Context, message l... method AddAIMessage (line 139) | func (c *ChatMessageHistory) AddAIMessage(ctx context.Context, content... method AddUserMessage (line 144) | func (c *ChatMessageHistory) AddUserMessage(ctx context.Context, conte... method Clear (line 150) | func (c *ChatMessageHistory) Clear(ctx context.Context) error { method AddMessages (line 162) | func (c *ChatMessageHistory) AddMessages(ctx context.Context, messages... method Messages (line 179) | func (c *ChatMessageHistory) Messages(ctx context.Context) ([]llms.Cha... method SetMessages (line 229) | func (c *ChatMessageHistory) SetMessages(ctx context.Context, messages... function NewChatMessageHistory (line 25) | func NewChatMessageHistory(ctx context.Context, FILE: memory/cloudsql/chat_message_history_options.go constant defaultSchemaName (line 4) | defaultSchemaName = "public" type ChatMessageHistoryStoresOption (line 9) | type ChatMessageHistoryStoresOption function WithSchemaName (line 12) | func WithSchemaName(schemaName string) ChatMessageHistoryStoresOption { function applyChatMessageHistoryOptions (line 20) | func applyChatMessageHistoryOptions(cmh ChatMessageHistory, opts ...Chat... FILE: memory/mongo/main_test.go function TestMain (line 10) | func TestMain(m *testing.M) { FILE: memory/mongo/mongo_chat_history.go constant mongoSessionIDKey (line 17) | mongoSessionIDKey = "SessionId" type ChatMessageHistory (line 20) | type ChatMessageHistory struct method Messages (line 61) | func (h *ChatMessageHistory) Messages(ctx context.Context) ([]llms.Cha... method AddAIMessage (line 85) | func (h *ChatMessageHistory) AddAIMessage(ctx context.Context, text st... method AddUserMessage (line 90) | func (h *ChatMessageHistory) AddUserMessage(ctx context.Context, text ... method Clear (line 95) | func (h *ChatMessageHistory) Clear(ctx context.Context) error { method AddMessage (line 102) | func (h *ChatMessageHistory) AddMessage(ctx context.Context, message l... method SetMessages (line 117) | func (h *ChatMessageHistory) SetMessages(ctx context.Context, messages... type chatMessageModel (line 29) | type chatMessageModel struct function NewMongoDBChatMessageHistory (line 38) | func NewMongoDBChatMessageHistory(ctx context.Context, options ...ChatMe... FILE: memory/mongo/mongo_chat_history_options.go constant mongoDefaultDBName (line 8) | mongoDefaultDBName = "chat_history" constant mongoDefaultCollectionName (line 9) | mongoDefaultCollectionName = "message_store" type ChatMessageHistoryOption (line 17) | type ChatMessageHistoryOption function applyMongoDBChatOptions (line 19) | func applyMongoDBChatOptions(options ...ChatMessageHistoryOption) (*Chat... function WithConnectionURL (line 40) | func WithConnectionURL(connectionURL string) ChatMessageHistoryOption { function WithSessionID (line 48) | func WithSessionID(sessionID string) ChatMessageHistoryOption { function WithCollectionName (line 55) | func WithCollectionName(name string) ChatMessageHistoryOption { function WithDataBaseName (line 62) | func WithDataBaseName(name string) ChatMessageHistoryOption { FILE: memory/mongo/mongo_chat_history_test.go function runTestContainer (line 19) | func runTestContainer(t *testing.T) string { function TestMongoDBChatMessageHistory (line 62) | func TestMongoDBChatMessageHistory(t *testing.T) { FILE: memory/simple.go type Simple (line 11) | type Simple struct method MemoryVariables (line 20) | func (m Simple) MemoryVariables(context.Context) []string { method LoadMemoryVariables (line 24) | func (m Simple) LoadMemoryVariables(context.Context, map[string]any) (... method SaveContext (line 28) | func (m Simple) SaveContext(context.Context, map[string]any, map[strin... method Clear (line 32) | func (m Simple) Clear(context.Context) error { method GetMemoryKey (line 36) | func (m Simple) GetMemoryKey(context.Context) string { function NewSimple (line 13) | func NewSimple() Simple { FILE: memory/sqlite3/sqlite3_history.go type SqliteChatMessageHistory (line 17) | type SqliteChatMessageHistory struct method Messages (line 46) | func (h *SqliteChatMessageHistory) Messages(ctx context.Context) ([]ll... method addMessage (line 86) | func (h *SqliteChatMessageHistory) addMessage(ctx context.Context, tex... method AddMessage (line 97) | func (h *SqliteChatMessageHistory) AddMessage(ctx context.Context, mes... method AddAIMessage (line 102) | func (h *SqliteChatMessageHistory) AddAIMessage(ctx context.Context, t... method AddUserMessage (line 107) | func (h *SqliteChatMessageHistory) AddUserMessage(ctx context.Context,... method Clear (line 112) | func (h *SqliteChatMessageHistory) Clear(ctx context.Context) error { method SetMessages (line 127) | func (h *SqliteChatMessageHistory) SetMessages(ctx context.Context, me... function NewSqliteChatMessageHistory (line 41) | func NewSqliteChatMessageHistory(options ...SqliteChatMessageHistoryOpti... FILE: memory/sqlite3/sqlite3_history_options.go constant DefaultLimit (line 12) | DefaultLimit = 1000 constant DefaultTableName (line 15) | DefaultTableName = "langchaingo_messages" constant DefaultSchema (line 18) | DefaultSchema = `CREATE TABLE IF NOT EXISTS %s ( type SqliteChatMessageHistoryOption (line 31) | type SqliteChatMessageHistoryOption function WithDB (line 35) | func WithDB(db *sql.DB) SqliteChatMessageHistoryOption { function WithContext (line 43) | func WithContext(ctx context.Context) SqliteChatMessageHistoryOption { function WithLimit (line 51) | func WithLimit(limit int) SqliteChatMessageHistoryOption { function WithSchema (line 59) | func WithSchema(schema []byte) SqliteChatMessageHistoryOption { function WithOverwrite (line 67) | func WithOverwrite() SqliteChatMessageHistoryOption { function WithDBAddress (line 75) | func WithDBAddress(addr string) SqliteChatMessageHistoryOption { function WithTableName (line 83) | func WithTableName(name string) SqliteChatMessageHistoryOption { function WithSession (line 91) | func WithSession(session string) SqliteChatMessageHistoryOption { function applyChatOptions (line 97) | func applyChatOptions(options ...SqliteChatMessageHistoryOption) *Sqlite... FILE: memory/sqlite3/sqlite3_history_test.go function TestSqliteChatMessageHistory (line 13) | func TestSqliteChatMessageHistory(t *testing.T) { FILE: memory/token_buffer.go type ConversationTokenBuffer (line 11) | type ConversationTokenBuffer struct method MemoryVariables (line 36) | func (tb *ConversationTokenBuffer) MemoryVariables(ctx context.Context... method LoadMemoryVariables (line 41) | func (tb *ConversationTokenBuffer) LoadMemoryVariables( method SaveContext (line 48) | func (tb *ConversationTokenBuffer) SaveContext( method Clear (line 89) | func (tb *ConversationTokenBuffer) Clear(ctx context.Context) error { method getNumTokensFromMessages (line 93) | func (tb *ConversationTokenBuffer) getNumTokensFromMessages(ctx contex... function NewConversationTokenBuffer (line 21) | func NewConversationTokenBuffer( FILE: memory/token_buffer_test.go function newTestOpenAIClient (line 16) | func newTestOpenAIClient(t *testing.T) *openai.LLM { function TestTokenBufferMemory (line 43) | func TestTokenBufferMemory(t *testing.T) { function TestTokenBufferMemoryReturnMessage (line 64) | func TestTokenBufferMemoryReturnMessage(t *testing.T) { function TestTokenBufferMemoryWithPreLoadedHistory (line 94) | func TestTokenBufferMemoryWithPreLoadedHistory(t *testing.T) { FILE: memory/window_buffer.go constant defaultConversationWindowSize (line 12) | defaultConversationWindowSize = 5 constant defaultMessageSize (line 14) | defaultMessageSize = 2 type ConversationWindowBuffer (line 18) | type ConversationWindowBuffer struct method MemoryVariables (line 43) | func (wb *ConversationWindowBuffer) MemoryVariables(ctx context.Contex... method LoadMemoryVariables (line 48) | func (wb *ConversationWindowBuffer) LoadMemoryVariables(ctx context.Co... method SaveContext (line 72) | func (wb *ConversationWindowBuffer) SaveContext( method cutMessages (line 92) | func (wb *ConversationWindowBuffer) cutMessages(message []llms.ChatMes... method Clear (line 100) | func (wb *ConversationWindowBuffer) Clear(ctx context.Context) error { function NewConversationWindowBuffer (line 27) | func NewConversationWindowBuffer( FILE: memory/window_buffer_test.go function TestWindowBufferMemory (line 12) | func TestWindowBufferMemory(t *testing.T) { function TestWindowBufferMemoryReturnMessage (line 51) | func TestWindowBufferMemoryReturnMessage(t *testing.T) { function TestWindowBufferMemoryWithPreLoadedHistory (line 83) | func TestWindowBufferMemoryWithPreLoadedHistory(t *testing.T) { function TestConversationWindowBuffer_cutMessages (line 104) | func TestConversationWindowBuffer_cutMessages(t *testing.T) { FILE: memory/zep/zep_chat_history.go type ChatMessageHistory (line 15) | type ChatMessageHistory struct method messagesFromZepMessages (line 34) | func (h *ChatMessageHistory) messagesFromZepMessages(zepMessages []*ze... method messagesToZepMessages (line 53) | func (h *ChatMessageHistory) messagesToZepMessages(messages []llms.Cha... method Messages (line 84) | func (h *ChatMessageHistory) Messages(ctx context.Context) ([]llms.Cha... method AddAIMessage (line 115) | func (h *ChatMessageHistory) AddAIMessage(ctx context.Context, text st... method AddUserMessage (line 130) | func (h *ChatMessageHistory) AddUserMessage(ctx context.Context, text ... method Clear (line 144) | func (h *ChatMessageHistory) Clear(ctx context.Context) error { method AddMessage (line 152) | func (h *ChatMessageHistory) AddMessage(ctx context.Context, message l... method SetMessages (line 162) | func (*ChatMessageHistory) SetMessages(_ context.Context, _ []llms.Cha... function NewZepChatMessageHistory (line 27) | func NewZepChatMessageHistory(zep *zepClient.Client, sessionID string, o... FILE: memory/zep/zep_chat_history_options.go type ChatMessageHistoryOption (line 7) | type ChatMessageHistoryOption function WithChatHistoryMemoryType (line 10) | func WithChatHistoryMemoryType(memoryType zep.MemoryGetRequestMemoryType... function WithChatHistoryHumanPrefix (line 17) | func WithChatHistoryHumanPrefix(humanPrefix string) ChatMessageHistoryOp... function WithChatHistoryAIPrefix (line 24) | func WithChatHistoryAIPrefix(aiPrefix string) ChatMessageHistoryOption { function applyZepChatHistoryOptions (line 30) | func applyZepChatHistoryOptions(options ...ChatMessageHistoryOption) *Ch... FILE: memory/zep/zep_memory.go type Memory (line 14) | type Memory struct method MemoryVariables (line 46) | func (m *Memory) MemoryVariables(context.Context) []string { method LoadMemoryVariables (line 55) | func (m *Memory) LoadMemoryVariables( method SaveContext (line 86) | func (m *Memory) SaveContext( method Clear (line 113) | func (m *Memory) Clear(ctx context.Context) error { method GetMemoryKey (line 117) | func (m *Memory) GetMemoryKey(context.Context) string { function NewMemory (line 31) | func NewMemory(client *zepClient.Client, sessionID string, options ...Me... FILE: memory/zep/zep_memory_options.go type MemoryOption (line 7) | type MemoryOption function WithReturnMessages (line 10) | func WithReturnMessages(returnMessages bool) MemoryOption { function WithInputKey (line 17) | func WithInputKey(inputKey string) MemoryOption { function WithOutputKey (line 24) | func WithOutputKey(outputKey string) MemoryOption { function WithHumanPrefix (line 31) | func WithHumanPrefix(humanPrefix string) MemoryOption { function WithAIPrefix (line 38) | func WithAIPrefix(aiPrefix string) MemoryOption { function WithMemoryKey (line 45) | func WithMemoryKey(memoryKey string) MemoryOption { function WithMemoryType (line 52) | func WithMemoryType(memoryType zep.MemoryGetRequestMemoryType) MemoryOpt... function applyZepMemoryOptions (line 58) | func applyZepMemoryOptions(opts ...MemoryOption) *Memory { FILE: memory/zep/zep_test.go type MockZepClient (line 13) | type MockZepClient struct method Memory (line 17) | func (m *MockZepClient) Memory() MemoryService { type MemoryService (line 21) | type MemoryService interface type MockMemoryService (line 27) | type MockMemoryService struct method Get (line 31) | func (m *MockMemoryService) Get(_ context.Context, _ string, _ *zep.Me... method Add (line 38) | func (m *MockMemoryService) Add(_ context.Context, _ string, request *... method Delete (line 46) | func (m *MockMemoryService) Delete(_ context.Context, _ string) (*zep.... function createMockZepClient (line 51) | func createMockZepClient() *zepClient.Client { function TestNewMemory (line 55) | func TestNewMemory(t *testing.T) { function TestNewMemoryWithOptions (line 83) | func TestNewMemoryWithOptions(t *testing.T) { function TestMemoryVariables (line 124) | func TestMemoryVariables(t *testing.T) { function TestGetMemoryKey (line 139) | func TestGetMemoryKey(t *testing.T) { function TestNewZepChatMessageHistory (line 153) | func TestNewZepChatMessageHistory(t *testing.T) { function TestNewZepChatMessageHistoryWithOptions (line 172) | func TestNewZepChatMessageHistoryWithOptions(t *testing.T) { function TestMessagesFromZepMessages (line 197) | func TestMessagesFromZepMessages(t *testing.T) { function TestMessagesToZepMessages (line 240) | func TestMessagesToZepMessages(t *testing.T) { function TestLoadMemoryVariablesReturnMessages (line 280) | func TestLoadMemoryVariablesReturnMessages(t *testing.T) { function TestLoadMemoryVariablesBufferString (line 312) | func TestLoadMemoryVariablesBufferString(t *testing.T) { function TestLoadMemoryVariablesCustomKey (line 344) | func TestLoadMemoryVariablesCustomKey(t *testing.T) { function TestLoadMemoryVariablesError (line 367) | func TestLoadMemoryVariablesError(t *testing.T) { function TestSaveContext (line 386) | func TestSaveContext(t *testing.T) { function TestClear (line 476) | func TestClear(t *testing.T) { type mockChatHistory (line 497) | type mockChatHistory struct method Messages (line 507) | func (m *mockChatHistory) Messages(_ context.Context) ([]llms.ChatMess... method AddUserMessage (line 514) | func (m *mockChatHistory) AddUserMessage(_ context.Context, text strin... method AddAIMessage (line 519) | func (m *mockChatHistory) AddAIMessage(_ context.Context, text string)... method AddMessage (line 524) | func (m *mockChatHistory) AddMessage(_ context.Context, _ llms.ChatMes... method SetMessages (line 528) | func (m *mockChatHistory) SetMessages(_ context.Context, _ []llms.Chat... method Clear (line 532) | func (m *mockChatHistory) Clear(_ context.Context) error { function TestChatMessageHistoryMethods (line 538) | func TestChatMessageHistoryMethods(t *testing.T) { FILE: outputparser/boolean_parser.go type BooleanParser (line 13) | type BooleanParser struct method GetFormatInstructions (line 30) | func (p BooleanParser) GetFormatInstructions() string { method parse (line 34) | func (p BooleanParser) parse(text string) (bool, error) { method Parse (line 60) | func (p BooleanParser) Parse(text string) (any, error) { method ParseWithPrompt (line 65) | func (p BooleanParser) ParseWithPrompt(text string, _ llms.PromptValue... method Type (line 70) | func (p BooleanParser) Type() string { function NewBooleanParser (line 19) | func NewBooleanParser() BooleanParser { function normalize (line 51) | func normalize(text string) string { FILE: outputparser/boolean_parser_test.go function TestBooleanParser (line 9) | func TestBooleanParser(t *testing.T) { FILE: outputparser/combining.go type Combining (line 12) | type Combining struct method GetFormatInstructions (line 31) | func (p Combining) GetFormatInstructions() string { method parse (line 43) | func (p Combining) parse(text string) (map[string]any, error) { method Parse (line 87) | func (p Combining) Parse(text string) (any, error) { method ParseWithPrompt (line 92) | func (p Combining) ParseWithPrompt(text string, _ llms.PromptValue) (a... method Type (line 97) | func (p Combining) Type() string { function NewCombining (line 17) | func NewCombining(parsers []schema.OutputParser[any]) Combining { FILE: outputparser/combining_test.go function TestCombine (line 11) | func TestCombine(t *testing.T) { FILE: outputparser/comma_seperated_list.go type CommaSeparatedList (line 12) | type CommaSeparatedList struct method GetFormatInstructions (line 23) | func (p CommaSeparatedList) GetFormatInstructions() string { method Parse (line 28) | func (p CommaSeparatedList) Parse(text string) ([]string, error) { method ParseWithPrompt (line 38) | func (p CommaSeparatedList) ParseWithPrompt(text string, _ llms.Prompt... method Type (line 42) | func (p CommaSeparatedList) Type() string { function NewCommaSeparatedList (line 15) | func NewCommaSeparatedList() CommaSeparatedList { FILE: outputparser/comma_seperated_list_test.go function TestCommaSeparatedList (line 10) | func TestCommaSeparatedList(t *testing.T) { FILE: outputparser/defined.go type Defined (line 17) | type Defined struct function NewDefined (line 26) | func NewDefined[T any](source T) (Defined[T], error) { method GetFormatInstructions (line 55) | func (p Defined[T]) GetFormatInstructions() string { method Parse (line 61) | func (p Defined[T]) Parse(text string) (T, error) { method ParseWithPrompt (line 78) | func (p Defined[T]) ParseWithPrompt(text string, _ llms.PromptValue) (T,... method Type (line 83) | func (p Defined[T]) Type() string { constant numStructs (line 87) | numStructs = 8 function marshalStruct (line 89) | func marshalStruct(vType reflect.Type, name string) ([]byte, error) { //... FILE: outputparser/defined_test.go function TestDefined (line 8) | func TestDefined(t *testing.T) { function TestDefinedParse (line 100) | func TestDefinedParse(t *testing.T) { FILE: outputparser/parser_additional_test.go function TestBooleanParser_GetFormatInstructions (line 11) | func TestBooleanParser_GetFormatInstructions(t *testing.T) { function TestBooleanParser_ParseWithPrompt (line 18) | func TestBooleanParser_ParseWithPrompt(t *testing.T) { function TestBooleanParser_Type (line 27) | func TestBooleanParser_Type(t *testing.T) { function TestCombining_GetFormatInstructions (line 33) | func TestCombining_GetFormatInstructions(t *testing.T) { function TestCombining_ParseWithPrompt (line 43) | func TestCombining_ParseWithPrompt(t *testing.T) { function TestCombining_Type (line 56) | func TestCombining_Type(t *testing.T) { function TestCommaSeparatedList_GetFormatInstructions (line 62) | func TestCommaSeparatedList_GetFormatInstructions(t *testing.T) { function TestCommaSeparatedList_ParseWithPrompt (line 69) | func TestCommaSeparatedList_ParseWithPrompt(t *testing.T) { function TestCommaSeparatedList_Type (line 76) | func TestCommaSeparatedList_Type(t *testing.T) { function TestDefined_GetFormatInstructions (line 83) | func TestDefined_GetFormatInstructions(t *testing.T) { function TestDefined_ParseWithPrompt (line 94) | func TestDefined_ParseWithPrompt(t *testing.T) { function TestDefined_Type (line 107) | func TestDefined_Type(t *testing.T) { function TestRegexParser_GetFormatInstructions (line 118) | func TestRegexParser_GetFormatInstructions(t *testing.T) { function TestRegexParser_ParseWithPrompt (line 125) | func TestRegexParser_ParseWithPrompt(t *testing.T) { function TestRegexParser_Type (line 138) | func TestRegexParser_Type(t *testing.T) { function TestRegexDict_GetFormatInstructions (line 145) | func TestRegexDict_GetFormatInstructions(t *testing.T) { function TestRegexDict_ParseWithPrompt (line 154) | func TestRegexDict_ParseWithPrompt(t *testing.T) { function TestRegexDict_Type (line 167) | func TestRegexDict_Type(t *testing.T) { function TestSimple_GetFormatInstructions (line 174) | func TestSimple_GetFormatInstructions(t *testing.T) { function TestSimple_ParseWithPrompt (line 180) | func TestSimple_ParseWithPrompt(t *testing.T) { function TestSimple_Type (line 187) | func TestSimple_Type(t *testing.T) { function TestStructured_GetFormatInstructions (line 194) | func TestStructured_GetFormatInstructions(t *testing.T) { function TestStructured_ParseWithPrompt (line 206) | func TestStructured_ParseWithPrompt(t *testing.T) { function TestStructured_Type (line 221) | func TestStructured_Type(t *testing.T) { function TestParsers_ErrorHandling (line 228) | func TestParsers_ErrorHandling(t *testing.T) { function TestCombining_WithDifferentParsers (line 268) | func TestCombining_WithDifferentParsers(t *testing.T) { FILE: outputparser/regex_dict.go type RegexDict (line 12) | type RegexDict struct method GetFormatInstructions (line 37) | func (p RegexDict) GetFormatInstructions() string { method parse (line 44) | func (p RegexDict) parse(text string) (map[string]string, error) { method Parse (line 80) | func (p RegexDict) Parse(text string) (any, error) { method ParseWithPrompt (line 85) | func (p RegexDict) ParseWithPrompt(text string, _ llms.PromptValue) (a... method Type (line 90) | func (p RegexDict) Type() string { constant regexDictPattern (line 22) | regexDictPattern = `(?:%s):\s?(?P(?:[^.'\n']*)\.?)` function NewRegexDict (line 26) | func NewRegexDict(outputKeyToFormat map[string]string, noUpdateValue str... FILE: outputparser/regex_dict_test.go function TestRegexDict (line 10) | func TestRegexDict(t *testing.T) { FILE: outputparser/regex_parser.go type RegexParser (line 12) | type RegexParser struct method GetFormatInstructions (line 32) | func (p RegexParser) GetFormatInstructions() string { method parse (line 39) | func (p RegexParser) parse(text string) (map[string]string, error) { method Parse (line 62) | func (p RegexParser) Parse(text string) (any, error) { method ParseWithPrompt (line 67) | func (p RegexParser) ParseWithPrompt(text string, _ llms.PromptValue) ... method Type (line 72) | func (p RegexParser) Type() string { function NewRegexParser (line 18) | func NewRegexParser(expressionStr string) RegexParser { FILE: outputparser/regex_parser_test.go function TestRegexParser (line 10) | func TestRegexParser(t *testing.T) { FILE: outputparser/simple.go type Simple (line 11) | type Simple struct method GetFormatInstructions (line 17) | func (p Simple) GetFormatInstructions() string { return "" } method Parse (line 18) | func (p Simple) Parse(text string) (any, error) { method ParseWithPrompt (line 22) | func (p Simple) ParseWithPrompt(text string, _ llms.PromptValue) (any,... method Type (line 25) | func (p Simple) Type() string { return "simple_parser" } function NewSimple (line 13) | func NewSimple() Simple { return Simple{} } FILE: outputparser/structured.go type ParseError (line 13) | type ParseError struct method Error (line 18) | func (e ParseError) Error() string { constant _structuredFormatInstructionTemplate (line 25) | _structuredFormatInstructionTemplate = "The output should be a markdown ... constant _structuredLineTemplate (line 31) | _structuredLineTemplate = "\"%s\": %s // %s\n" type ResponseSchema (line 37) | type ResponseSchema struct type Structured (line 45) | type Structured struct method parse (line 63) | func (p Structured) parse(text string) (map[string]string, error) { method Parse (line 101) | func (p Structured) Parse(text string) (any, error) { method ParseWithPrompt (line 106) | func (p Structured) ParseWithPrompt(text string, _ llms.PromptValue) (... method GetFormatInstructions (line 112) | func (p Structured) GetFormatInstructions() string { method Type (line 127) | func (p Structured) Type() string { function NewStructured (line 51) | func NewStructured(schema []ResponseSchema) Structured { FILE: outputparser/structured_test.go function TestStructured (line 9) | func TestStructured(t *testing.T) { FILE: prompts/chat_prompt.go type ChatPromptValue (line 12) | type ChatPromptValue method String (line 15) | func (v ChatPromptValue) String() string { method Messages (line 24) | func (v ChatPromptValue) Messages() []llms.ChatMessage { FILE: prompts/chat_prompt_template.go type ChatPromptTemplate (line 6) | type ChatPromptTemplate struct method FormatPrompt (line 23) | func (p ChatPromptTemplate) FormatPrompt(values map[string]any) (llms.... method Format (line 43) | func (p ChatPromptTemplate) Format(values map[string]any) (string, err... method FormatMessages (line 49) | func (p ChatPromptTemplate) FormatMessages(values map[string]any) ([]l... method GetInputVariables (line 58) | func (p ChatPromptTemplate) GetInputVariables() []string { function NewChatPromptTemplate (line 74) | func NewChatPromptTemplate(messages []MessageFormatter) ChatPromptTempla... FILE: prompts/chat_prompt_template_test.go function TestChatPromptTemplate (line 10) | func TestChatPromptTemplate(t *testing.T) { FILE: prompts/example_selector.go type ExampleSelector (line 5) | type ExampleSelector interface FILE: prompts/examples_test.go function Example_basicTemplateRendering (line 10) | func Example_basicTemplateRendering() { function Example_optionalSecurity (line 46) | func Example_optionalSecurity() { function Example_templateWithLogic (line 74) | func Example_templateWithLogic() { function Example_templateWithIncludes (line 117) | func Example_templateWithIncludes() { function Example_promptTemplate (line 147) | func Example_promptTemplate() { function Example_errorHandling (line 182) | func Example_errorHandling() { function Example_migration (line 210) | func Example_migration() { FILE: prompts/few_shot.go type FewShotPrompt (line 20) | type FewShotPrompt struct method getExamples (line 91) | func (p *FewShotPrompt) getExamples(input map[string]string) ([]map[st... method Format (line 103) | func (p *FewShotPrompt) Format(values map[string]interface{}) (string,... method AssemblePieces (line 154) | func (p *FewShotPrompt) AssemblePieces(exampleStrings []string) string { method FormatPrompt (line 183) | func (p *FewShotPrompt) FormatPrompt(values map[string]any) (llms.Prom... method GetInputVariables (line 192) | func (p *FewShotPrompt) GetInputVariables() []string { function NewFewShotPrompt (line 46) | func NewFewShotPrompt(examplePrompt PromptTemplate, examples []map[strin... function validateExamples (line 81) | func validateExamples(examples []map[string]string, exampleSelector Exam... function getMapKeys (line 175) | func getMapKeys(inputMap map[string]any) []string { FILE: prompts/few_shot_test.go function TestFewShotPrompt_Format (line 10) | func TestFewShotPrompt_Format(t *testing.T) { function checkError (line 144) | func checkError(t *testing.T, err error, expected string) bool { FILE: prompts/internal/fstring/fstring.go function Format (line 14) | func Format(template string, values map[string]any) (string, error) { FILE: prompts/internal/fstring/fstring_test.go function TestFormat (line 8) | func TestFormat(t *testing.T) { FILE: prompts/internal/fstring/parser.go type parser (line 9) | type parser struct method parse (line 28) | func (r *parser) parse() error { method scanToLeftCurlyBracket (line 53) | func (r *parser) scanToLeftCurlyBracket() (bool, []rune, error) { method scanToRightCurlyBracket (line 84) | func (r *parser) scanToRightCurlyBracket() []rune { method hasMore (line 100) | func (r *parser) hasMore() bool { method get (line 104) | func (r *parser) get() rune { function newParser (line 16) | func newParser(s string, values map[string]any) *parser { function toString (line 109) | func toString(val any) string { FILE: prompts/internal/loader/secure_loader.go type NilFSLoader (line 24) | type NilFSLoader struct method Get (line 27) | func (nl *NilFSLoader) Get(path string) (io.Reader, error) { method Path (line 32) | func (nl *NilFSLoader) Path(path string) (string, error) { type FSLoader (line 44) | type FSLoader struct method Get (line 56) | func (fl *FSLoader) Get(path string) (io.Reader, error) { method Path (line 66) | func (fl *FSLoader) Path(path string) (string, error) { function NewFSLoader (line 49) | func NewFSLoader(filesystem fs.FS) *FSLoader { function validatePath (line 80) | func validatePath(path string) error { FILE: prompts/internal/sanitization/sanitize.go function ValidateAndSanitize (line 11) | func ValidateAndSanitize(data map[string]any) (map[string]any, error) { type ValidationError (line 28) | type ValidationError struct method Error (line 33) | func (e *ValidationError) Error() string { function sanitizeValue (line 38) | func sanitizeValue(value any) any { function sanitizeString (line 64) | func sanitizeString(s string) string { function isValidVariableName (line 70) | func isValidVariableName(name string) bool { function isValidIdentifier (line 93) | func isValidIdentifier(name string) bool { FILE: prompts/message_prompt_template.go type SystemMessagePromptTemplate (line 10) | type SystemMessagePromptTemplate struct method FormatMessages (line 17) | func (p SystemMessagePromptTemplate) FormatMessages(values map[string]... method GetInputVariables (line 26) | func (p SystemMessagePromptTemplate) GetInputVariables() []string { function NewSystemMessagePromptTemplate (line 31) | func NewSystemMessagePromptTemplate(template string, inputVariables []st... type AIMessagePromptTemplate (line 38) | type AIMessagePromptTemplate struct method FormatMessages (line 45) | func (p AIMessagePromptTemplate) FormatMessages(values map[string]any)... method GetInputVariables (line 54) | func (p AIMessagePromptTemplate) GetInputVariables() []string { function NewAIMessagePromptTemplate (line 59) | func NewAIMessagePromptTemplate(template string, inputVariables []string... type HumanMessagePromptTemplate (line 66) | type HumanMessagePromptTemplate struct method FormatMessages (line 73) | func (p HumanMessagePromptTemplate) FormatMessages(values map[string]a... method GetInputVariables (line 82) | func (p HumanMessagePromptTemplate) GetInputVariables() []string { function NewHumanMessagePromptTemplate (line 87) | func NewHumanMessagePromptTemplate(template string, inputVariables []str... type GenericMessagePromptTemplate (line 94) | type GenericMessagePromptTemplate struct method FormatMessages (line 102) | func (p GenericMessagePromptTemplate) FormatMessages(values map[string... method GetInputVariables (line 111) | func (p GenericMessagePromptTemplate) GetInputVariables() []string { function NewGenericMessagePromptTemplate (line 116) | func NewGenericMessagePromptTemplate(role, template string, inputVariabl... type MessagesPlaceholder (line 123) | type MessagesPlaceholder struct method FormatMessages (line 128) | func (p MessagesPlaceholder) FormatMessages(values map[string]any) ([]... method GetInputVariables (line 141) | func (p MessagesPlaceholder) GetInputVariables() []string { FILE: prompts/prompt_template.go type PromptTemplate (line 30) | type PromptTemplate struct method Format (line 67) | func (p PromptTemplate) Format(values map[string]any) (string, error) { method FormatPrompt (line 77) | func (p PromptTemplate) FormatPrompt(values map[string]any) (llms.Prom... method GetInputVariables (line 87) | func (p PromptTemplate) GetInputVariables() []string { function NewPromptTemplate (line 53) | func NewPromptTemplate(template string, inputVars []string) PromptTempla... function resolvePartialValues (line 94) | func resolvePartialValues(partialValues map[string]any, values map[strin... FILE: prompts/prompt_template_test.go function TestPromptTemplateFormatPrompt (line 10) | func TestPromptTemplateFormatPrompt(t *testing.T) { FILE: prompts/prompt_test.go function TestStringPromptValueString (line 7) | func TestStringPromptValueString(t *testing.T) { function TestStringPromptValueMessages (line 23) | func TestStringPromptValueMessages(t *testing.T) { FILE: prompts/prompts.go type Formatter (line 6) | type Formatter interface type MessageFormatter (line 12) | type MessageFormatter interface type FormatPrompter (line 18) | type FormatPrompter interface FILE: prompts/render_options.go type RenderOption (line 4) | type RenderOption type renderConfig (line 7) | type renderConfig struct function WithSanitization (line 15) | func WithSanitization() RenderOption { function applyOptions (line 22) | func applyOptions(opts []RenderOption) *renderConfig { FILE: prompts/security_test.go function TestJinja2PathTraversalSecurity (line 13) | func TestJinja2PathTraversalSecurity(t *testing.T) { function TestSecurityMechanismEffectiveness (line 160) | func TestSecurityMechanismEffectiveness(t *testing.T) { function TestMigrationFromVulnerableToSecure (line 231) | func TestMigrationFromVulnerableToSecure(t *testing.T) { FILE: prompts/string_prompt.go type StringPromptValue (line 8) | type StringPromptValue method String (line 10) | func (v StringPromptValue) String() string { method Messages (line 15) | func (v StringPromptValue) Messages() []llms.ChatMessage { FILE: prompts/templates.go type TemplateFormat (line 53) | type TemplateFormat constant TemplateFormatGoTemplate (line 59) | TemplateFormatGoTemplate TemplateFormat = "go-template" constant TemplateFormatJinja2 (line 61) | TemplateFormatJinja2 TemplateFormat = "jinja2" constant TemplateFormatFString (line 63) | TemplateFormatFString TemplateFormat = "f-string" type interpolator (line 67) | type interpolator function interpolateGoTemplate (line 78) | func interpolateGoTemplate(tmpl string, values map[string]any) (string, ... function newInvalidTemplateError (line 94) | func newInvalidTemplateError(gotTemplateFormat TemplateFormat) error { function CheckValidTemplate (line 110) | func CheckValidTemplate(template string, templateFormat TemplateFormat, ... function RenderTemplate (line 151) | func RenderTemplate(tmpl string, tmplFormat TemplateFormat, values map[s... function RenderTemplateFS (line 206) | func RenderTemplateFS(fsys fs.FS, name string, tmplFormat TemplateFormat... FILE: prompts/templates_go.go function renderGoTemplateWithFS (line 14) | func renderGoTemplateWithFS(fsys fs.FS, name string, values map[string]a... FILE: prompts/templates_jinja2.go function getSecureGonjaEnv (line 21) | func getSecureGonjaEnv() *gonja.Environment { function interpolateJinja2 (line 43) | func interpolateJinja2(tmpl string, values map[string]any) (string, erro... function renderJinja2WithFS (line 57) | func renderJinja2WithFS(fsys fs.FS, name string, values map[string]any) ... FILE: prompts/templates_test.go function TestInterpolateGoTemplate (line 11) | func TestInterpolateGoTemplate(t *testing.T) { function TestCheckValidTemplate (line 108) | func TestCheckValidTemplate(t *testing.T) { function TestRenderTemplate (line 145) | func TestRenderTemplate(t *testing.T) { function TestRenderTemplateFS (line 185) | func TestRenderTemplateFS(t *testing.T) { function TestMigrationPatterns (line 309) | func TestMigrationPatterns(t *testing.T) { FILE: prompts/validation_test.go function TestVariableNamesNoLongerReserved (line 9) | func TestVariableNamesNoLongerReserved(t *testing.T) { function TestEssentialValidationStillWorks (line 83) | func TestEssentialValidationStillWorks(t *testing.T) { FILE: schema/chat_message_history.go type ChatMessageHistory (line 10) | type ChatMessageHistory interface FILE: schema/documents.go type Document (line 4) | type Document struct FILE: schema/memory.go type Memory (line 6) | type Memory interface FILE: schema/output_parsers.go type OutputParser (line 6) | type OutputParser interface FILE: schema/retrivers.go type Retriever (line 6) | type Retriever interface FILE: schema/schema.go type AgentAction (line 4) | type AgentAction struct type AgentStep (line 12) | type AgentStep struct type AgentFinish (line 18) | type AgentFinish struct FILE: testing/llmtest/llmtest.go function TestLLM (line 33) | func TestLLM(t *testing.T, model llms.Model) { function supportsStreaming (line 97) | func supportsStreaming(model llms.Model) bool { function supportsTools (line 106) | func supportsTools(model llms.Model) bool { function supportsReasoning (line 144) | func supportsReasoning(model llms.Model) bool { function TestLLMWithOptions (line 182) | func TestLLMWithOptions(t *testing.T, model llms.Model, opts TestOptions... type TestOptions (line 197) | type TestOptions struct type testContext (line 215) | type testContext struct function runTestsWithContext (line 221) | func runTestsWithContext(t *testing.T, ctx *testContext) { function testCall (line 248) | func testCall(t *testing.T, model llms.Model) { function testCallWithContext (line 262) | func testCallWithContext(t *testing.T, tctx *testContext) { function testGenerateContent (line 287) | func testGenerateContent(t *testing.T, model llms.Model) { function testGenerateContentWithContext (line 315) | func testGenerateContentWithContext(t *testing.T, tctx *testContext) { function testStreaming (line 347) | func testStreaming(t *testing.T, model llms.Model) { function testStreamingWithContext (line 390) | func testStreamingWithContext(t *testing.T, tctx *testContext) { function testToolCalls (line 437) | func testToolCalls(t *testing.T, model llms.Model) { function testReasoning (line 495) | func testReasoning(t *testing.T, model llms.Model) { function testCaching (line 546) | func testCaching(t *testing.T, model llms.Model) { function testTokenCounting (line 588) | func testTokenCounting(t *testing.T, model llms.Model) { function ValidateLLM (line 631) | func ValidateLLM(model llms.Model) error { type MockLLM (line 663) | type MockLLM struct method Call (line 680) | func (m *MockLLM) Call(ctx context.Context, prompt string, options ...... method GenerateContent (line 687) | func (m *MockLLM) GenerateContent(ctx context.Context, messages []llms... method GenerateContentStream (line 706) | func (m *MockLLM) GenerateContentStream(ctx context.Context, messages ... FILE: testing/llmtest/llmtest_test.go function TestMockLLM (line 11) | func TestMockLLM(t *testing.T) { function TestValidateLLM (line 30) | func TestValidateLLM(t *testing.T) { function TestAnthropicIntegration (line 55) | func TestAnthropicIntegration(t *testing.T) { function TestOpenAIIntegration (line 67) | func TestOpenAIIntegration(t *testing.T) { FILE: textsplitter/markdown_splitter.go function NewMarkdownTextSplitter (line 12) | func NewMarkdownTextSplitter(opts ...Option) *MarkdownTextSplitter { type MarkdownTextSplitter (line 52) | type MarkdownTextSplitter struct method SplitText (line 65) | func (sp MarkdownTextSplitter) SplitText(text string) ([]string, error) { type markdownContext (line 90) | type markdownContext struct method splitText (line 147) | func (mc *markdownContext) splitText() []string { method clone (line 184) | func (mc *markdownContext) clone(startAt, endAt int) *markdownContext { method onMDHeader (line 210) | func (mc *markdownContext) onMDHeader() { method onMDParagraph (line 255) | func (mc *markdownContext) onMDParagraph() { method onMDQuote (line 272) | func (mc *markdownContext) onMDQuote() { method onMDBulletList (line 297) | func (mc *markdownContext) onMDBulletList() { method onMDOrderedList (line 307) | func (mc *markdownContext) onMDOrderedList() { method onMDList (line 316) | func (mc *markdownContext) onMDList() { method onMDListItem (line 343) | func (mc *markdownContext) onMDListItem() { method onMDListItemParagraph (line 369) | func (mc *markdownContext) onMDListItemParagraph() { method onMDTable (line 397) | func (mc *markdownContext) onMDTable() { method splitTableRows (line 421) | func (mc *markdownContext) splitTableRows(header []string, bodies [][]... method onTableHeader (line 465) | func (mc *markdownContext) onTableHeader() []string { method onTableBody (line 508) | func (mc *markdownContext) onTableBody() [][]string { method onMDCodeBlock (line 556) | func (mc *markdownContext) onMDCodeBlock() { method onMDFence (line 585) | func (mc *markdownContext) onMDFence() { method onMDHr (line 608) | func (mc *markdownContext) onMDHr() { method joinSnippet (line 621) | func (mc *markdownContext) joinSnippet(snippet string) { method applyToChunks (line 637) | func (mc *markdownContext) applyToChunks() { method splitInline (line 679) | func (mc *markdownContext) splitInline(inline *markdown.Inline) string { method inlineOnLinkClose (line 736) | func (mc *markdownContext) inlineOnLinkClose(link *markdown.LinkOpen) ... method inlineOnImage (line 747) | func (mc *markdownContext) inlineOnImage(image *markdown.Image) string { function indexOfCloseTag (line 781) | func indexOfCloseTag(tokens []markdown.Token, startAt int) int { function repeatString (line 811) | func repeatString(count int, initChar string) string { function formatWithIndent (line 820) | func formatWithIndent(value, mark string) string { function tableHeaderInMarkdown (line 829) | func tableHeaderInMarkdown(header []string) string { function tableRowInMarkdown (line 845) | func tableRowInMarkdown(row []string) string { FILE: textsplitter/markdown_splitter_test.go function TestMarkdownHeaderTextSplitter_SplitText (line 13) | func TestMarkdownHeaderTextSplitter_SplitText(t *testing.T) { function TestMarkdownHeaderTextSplitter_Table (line 101) | func TestMarkdownHeaderTextSplitter_Table(t *testing.T) { function TestMarkdownHeaderTextSplitter (line 226) | func TestMarkdownHeaderTextSplitter(t *testing.T) { function TestMarkdownHeaderTextSplitter_BulletList (line 251) | func TestMarkdownHeaderTextSplitter_BulletList(t *testing.T) { function TestMarkdownHeaderTextSplitter_HeaderAfterHeader (line 315) | func TestMarkdownHeaderTextSplitter_HeaderAfterHeader(t *testing.T) { function TestMarkdownHeaderTextSplitter_SplitCode (line 376) | func TestMarkdownHeaderTextSplitter_SplitCode(t *testing.T) { function TestMarkdownHeaderTextSplitter_SplitInline (line 481) | func TestMarkdownHeaderTextSplitter_SplitInline(t *testing.T) { function TestMarkdownHeaderTextSplitter_LenFunc (line 584) | func TestMarkdownHeaderTextSplitter_LenFunc(t *testing.T) { FILE: textsplitter/options.go type Options (line 6) | type Options struct function DefaultOptions (line 24) | func DefaultOptions() Options { type Option (line 42) | type Option function WithChunkSize (line 45) | func WithChunkSize(chunkSize int) Option { function WithChunkOverlap (line 52) | func WithChunkOverlap(chunkOverlap int) Option { function WithSeparators (line 59) | func WithSeparators(separators []string) Option { function WithLenFunc (line 66) | func WithLenFunc(lenFunc func(string) int) Option { function WithModelName (line 73) | func WithModelName(modelName string) Option { function WithEncodingName (line 80) | func WithEncodingName(encodingName string) Option { function WithAllowedSpecial (line 87) | func WithAllowedSpecial(allowedSpecial []string) Option { function WithDisallowedSpecial (line 94) | func WithDisallowedSpecial(disallowedSpecial []string) Option { function WithSecondSplitter (line 101) | func WithSecondSplitter(secondSplitter TextSplitter) Option { function WithCodeBlocks (line 109) | func WithCodeBlocks(renderCode bool) Option { function WithReferenceLinks (line 122) | func WithReferenceLinks(referenceLinks bool) Option { function WithKeepSeparator (line 133) | func WithKeepSeparator(keepSeparator bool) Option { function WithHeadingHierarchy (line 144) | func WithHeadingHierarchy(trackHeadingHierarchy bool) Option { function WithJoinTableRows (line 155) | func WithJoinTableRows(join bool) Option { FILE: textsplitter/recursive_character.go type RecursiveCharacter (line 9) | type RecursiveCharacter struct method SplitText (line 38) | func (s RecursiveCharacter) SplitText(text string) ([]string, error) { method addSeparatorInSplits (line 43) | func (s RecursiveCharacter) addSeparatorInSplits(splits []string, sepa... method splitText (line 54) | func (s RecursiveCharacter) splitText(text string, separators []string... function NewRecursiveCharacter (line 20) | func NewRecursiveCharacter(opts ...Option) RecursiveCharacter { FILE: textsplitter/recursive_character_test.go function TestRecursiveCharacterSplitter (line 14) | func TestRecursiveCharacterSplitter(t *testing.T) { FILE: textsplitter/split_documents.go function SplitDocuments (line 17) | func SplitDocuments(textSplitter TextSplitter, documents []schema.Docume... function CreateDocuments (line 31) | func CreateDocuments(textSplitter TextSplitter, texts []string, metadata... function joinDocs (line 66) | func joinDocs(docs []string, separator string) string { function mergeSplits (line 71) | func mergeSplits(splits []string, separator string, chunkSize int, chunk... function maybePrintWarning (line 113) | func maybePrintWarning(total, chunkSize int) { function shouldPop (line 126) | func shouldPop(chunkOverlap, chunkSize, total, splitLen, separatorLen, c... FILE: textsplitter/text_spliter.go type TextSplitter (line 4) | type TextSplitter interface FILE: textsplitter/token_splitter.go constant _defaultTokenModelName (line 11) | _defaultTokenModelName = "gpt-3.5-turbo" constant _defaultTokenEncoding (line 12) | _defaultTokenEncoding = "cl100k_base" constant _defaultTokenChunkSize (line 13) | _defaultTokenChunkSize = 512 constant _defaultTokenChunkOverlap (line 14) | _defaultTokenChunkOverlap = 100 type TokenSplitter (line 18) | type TokenSplitter struct method SplitText (line 46) | func (s TokenSplitter) SplitText(text string) ([]string, error) { method splitText (line 63) | func (s TokenSplitter) splitText(text string, tk *tiktoken.Tiktoken) [... function NewTokenSplitter (line 27) | func NewTokenSplitter(opts ...Option) TokenSplitter { FILE: textsplitter/token_splitter_test.go function TestTokenSplitter (line 11) | func TestTokenSplitter(t *testing.T) { FILE: tools/calculator.go type Calculator (line 13) | type Calculator struct method Description (line 20) | func (c Calculator) Description() string { method Name (line 26) | func (c Calculator) Name() string { method Call (line 33) | func (c Calculator) Call(ctx context.Context, input string) (string, e... FILE: tools/duckduckgo/ddg.go constant DefaultUserAgent (line 14) | DefaultUserAgent = "github.com/tmc/langchaingo/tools/duckduckgo" type Tool (line 17) | type Tool struct method Name (line 49) | func (t Tool) Name() string { method Description (line 54) | func (t Tool) Description() string { method Call (line 62) | func (t Tool) Call(ctx context.Context, input string) (string, error) { type Option (line 25) | type Option function WithHTTPClient (line 28) | func WithHTTPClient(client *http.Client) Option { function New (line 36) | func New(maxResults int, userAgent string, opts ...Option) (*Tool, error) { FILE: tools/duckduckgo/ddg_test.go function TestDuckDuckGoTool (line 12) | func TestDuckDuckGoTool(t *testing.T) { function TestDuckDuckGoToolBasicConstruction (line 34) | func TestDuckDuckGoToolBasicConstruction(t *testing.T) { FILE: tools/duckduckgo/internal/client.go type Client (line 19) | type Client struct method SetHTTPClient (line 47) | func (client *Client) SetHTTPClient(httpClient *http.Client) { method newRequest (line 51) | func (client *Client) newRequest(ctx context.Context, queryURL string)... method Search (line 66) | func (client *Client) Search(ctx context.Context, query string) (strin... method SetMaxResults (line 123) | func (client *Client) SetMaxResults(n int) { method formatResults (line 128) | func (client *Client) formatResults(results []Result) string { type Result (line 26) | type Result struct function New (line 34) | func New(maxResults int, userAgent string) *Client { FILE: tools/metaphor/documents.go type Documents (line 15) | type Documents struct method SetOptions (line 43) | func (tool *Documents) SetOptions(options ...metaphor.ClientOptions) { method Name (line 51) | func (tool *Documents) Name() string { method Description (line 60) | func (tool *Documents) Description() string { method Call (line 74) | func (tool *Documents) Call(ctx context.Context, input string) (string... method formatContents (line 91) | func (tool *Documents) formatContents(response *metaphor.ContentsRespo... function NewDocuments (line 26) | func NewDocuments(options ...metaphor.ClientOptions) (*Documents, error) { FILE: tools/metaphor/links.go type LinksSearch (line 15) | type LinksSearch struct method SetOptions (line 45) | func (tool *LinksSearch) SetOptions(options ...metaphor.ClientOptions) { method Name (line 53) | func (tool *LinksSearch) Name() string { method Description (line 61) | func (tool *LinksSearch) Description() string { method Call (line 72) | func (tool *LinksSearch) Call(ctx context.Context, input string) (stri... method formatLinks (line 84) | func (tool *LinksSearch) formatLinks(response *metaphor.SearchResponse... function NewLinksSearch (line 27) | func NewLinksSearch(options ...metaphor.ClientOptions) (*LinksSearch, er... FILE: tools/metaphor/metaphor.go type API (line 19) | type API struct method Name (line 54) | func (tool *API) Name() string { method Description (line 64) | func (tool *API) Description() string { method Call (line 166) | func (tool *API) Call(ctx context.Context, input string) (string, erro... method performSearch (line 189) | func (tool *API) performSearch(ctx context.Context, toolInput ToolInpu... method findSimilar (line 204) | func (tool *API) findSimilar(ctx context.Context, toolInput ToolInput)... method getContents (line 219) | func (tool *API) getContents(ctx context.Context, toolInput ToolInput)... method formatResults (line 236) | func (tool *API) formatResults(response *metaphor.SearchResponse) stri... method formatContents (line 246) | func (tool *API) formatContents(response *metaphor.ContentsResponse) s... type ToolInput (line 24) | type ToolInput struct function NewClient (line 37) | func NewClient() (*API, error) { FILE: tools/metaphor/metaphor_test.go function TestAPI_Name (line 14) | func TestAPI_Name(t *testing.T) { function TestAPI_Description (line 19) | func TestAPI_Description(t *testing.T) { function TestNewClient (line 29) | func TestNewClient(t *testing.T) { function TestNewClient_WithAPIKey (line 45) | func TestNewClient_WithAPIKey(t *testing.T) { function TestAPI_Call_InvalidJSON (line 56) | func TestAPI_Call_InvalidJSON(t *testing.T) { function TestAPI_Call_ValidJSON (line 64) | func TestAPI_Call_ValidJSON(t *testing.T) { function TestAPI_Call_UnsupportedOperation (line 93) | func TestAPI_Call_UnsupportedOperation(t *testing.T) { function TestToolInput_JSONMarshaling (line 110) | func TestToolInput_JSONMarshaling(t *testing.T) { function TestAPI_Call_JSONExtractionFromText (line 129) | func TestAPI_Call_JSONExtractionFromText(t *testing.T) { function TestFormatResults_Integration (line 153) | func TestFormatResults_Integration(t *testing.T) { function TestAPI_CallOperations (line 169) | func TestAPI_CallOperations(t *testing.T) { function TestNewSearch (line 203) | func TestNewSearch(t *testing.T) { function TestNewSearch_WithAPIKey (line 217) | func TestNewSearch_WithAPIKey(t *testing.T) { function TestSearch_Name (line 227) | func TestSearch_Name(t *testing.T) { function TestSearch_Description (line 232) | func TestSearch_Description(t *testing.T) { function TestSearch_SetOptions (line 240) | func TestSearch_SetOptions(t *testing.T) { function TestSearch_Call_NilClient (line 247) | func TestSearch_Call_NilClient(t *testing.T) { function TestNewLinksSearch (line 267) | func TestNewLinksSearch(t *testing.T) { function TestNewLinksSearch_WithAPIKey (line 281) | func TestNewLinksSearch_WithAPIKey(t *testing.T) { function TestLinksSearch_Name (line 291) | func TestLinksSearch_Name(t *testing.T) { function TestLinksSearch_Description (line 296) | func TestLinksSearch_Description(t *testing.T) { function TestLinksSearch_SetOptions (line 304) | func TestLinksSearch_SetOptions(t *testing.T) { function TestLinksSearch_Call_NilClient (line 310) | func TestLinksSearch_Call_NilClient(t *testing.T) { function TestNewDocuments (line 330) | func TestNewDocuments(t *testing.T) { function TestNewDocuments_WithAPIKey (line 344) | func TestNewDocuments_WithAPIKey(t *testing.T) { function TestDocuments_Name (line 354) | func TestDocuments_Name(t *testing.T) { function TestDocuments_Description (line 359) | func TestDocuments_Description(t *testing.T) { function TestDocuments_SetOptions (line 368) | func TestDocuments_SetOptions(t *testing.T) { function TestDocuments_Call_NilClient (line 374) | func TestDocuments_Call_NilClient(t *testing.T) { function TestDocuments_Call_IDParsing (line 393) | func TestDocuments_Call_IDParsing(t *testing.T) { FILE: tools/metaphor/search.go type Search (line 15) | type Search struct method SetOptions (line 45) | func (tool *Search) SetOptions(options ...metaphor.ClientOptions) { method Name (line 53) | func (tool *Search) Name() string { method Description (line 61) | func (tool *Search) Description() string { method Call (line 76) | func (tool *Search) Call(ctx context.Context, input string) (string, e... method formatResults (line 88) | func (tool *Search) formatResults(response *metaphor.SearchResponse) s... function NewSearch (line 26) | func NewSearch(options ...metaphor.ClientOptions) (*Search, error) { FILE: tools/perplexity/perplexity.go type Model (line 16) | type Model constant ModelSonar (line 21) | ModelSonar Model = "sonar" constant ModelSonarReasoning (line 23) | ModelSonarReasoning Model = "sonar-reasoning" constant ModelSonarDeepResearch (line 25) | ModelSonarDeepResearch Model = "sonar-deep-research" constant ModelLlamaSonarSmall (line 27) | ModelLlamaSonarSmall Model = "sonar" constant ModelLlamaSonarLarge (line 28) | ModelLlamaSonarLarge Model = "sonar-reasoning" constant ModelLlamaSonarHuge (line 29) | ModelLlamaSonarHuge Model = "sonar-deep-research" type Option (line 33) | type Option type options (line 35) | type options struct function WithAPIKey (line 42) | func WithAPIKey(apiKey string) Option { function WithModel (line 49) | func WithModel(model Model) Option { function WithHTTPClient (line 56) | func WithHTTPClient(httpClient *http.Client) Option { type Tool (line 63) | type Tool struct method Name (line 106) | func (t *Tool) Name() string { method Description (line 111) | func (t *Tool) Description() string { method Call (line 116) | func (t *Tool) Call(ctx context.Context, input string) (string, error) { function New (line 71) | func New(opts ...Option) (*Tool, error) { FILE: tools/perplexity/perplexity_test.go function TestPerplexityTool (line 13) | func TestPerplexityTool(t *testing.T) { FILE: tools/scraper/options.go type Options (line 3) | type Options function WithMaxDepth (line 11) | func WithMaxDepth(maxDepth int) Options { function WithParallelsNum (line 24) | func WithParallelsNum(parallels int) Options { function WithDelay (line 39) | func WithDelay(delay int64) Options { function WithAsync (line 51) | func WithAsync(async bool) Options { function WithNewBlacklist (line 75) | func WithNewBlacklist(blacklist []string) Options { function WithBlacklist (line 99) | func WithBlacklist(blacklist []string) Options { function WithMaxPages (line 111) | func WithMaxPages(maxPages int) Options { FILE: tools/scraper/scraper.go constant DefualtMaxDept (line 17) | DefualtMaxDept = 1 constant DefualtParallels (line 18) | DefualtParallels = 2 constant DefualtDelay (line 19) | DefualtDelay = 3 constant DefualtAsync (line 20) | DefualtAsync = true constant DefualtMaxPages (line 21) | DefualtMaxPages = 0 type Scraper (line 26) | type Scraper struct method Name (line 74) | func (s Scraper) Name() string { method Description (line 82) | func (s Scraper) Description() string { method Call (line 96) | func (s Scraper) Call(ctx context.Context, input string) (string, erro... function New (line 45) | func New(options ...Options) (*Scraper, error) { FILE: tools/serpapi/internal/client.go constant _url (line 16) | _url = "https://serpapi.com/search" type Client (line 23) | type Client struct method Search (line 38) | func (s *Client) Search(ctx context.Context, query string) (string, er... function New (line 28) | func New(apiKey string, httpClient *http.Client) *Client { function processResponse (line 73) | func processResponse(res map[string]interface{}) (string, error) { function getAnswerBox (line 93) | func getAnswerBox(res map[string]interface{}) string { function getSportResult (line 111) | func getSportResult(res map[string]interface{}) string { function getKnowledgeGraph (line 122) | func getKnowledgeGraph(res map[string]interface{}) string { function getOrganicResult (line 133) | func getOrganicResult(res map[string]interface{}) string { FILE: tools/serpapi/options.go type options (line 5) | type options struct type Option (line 10) | type Option function WithAPIKey (line 14) | func WithAPIKey(apiKey string) Option { function WithHTTPClient (line 21) | func WithHTTPClient(client *http.Client) Option { FILE: tools/serpapi/serpapi.go type Tool (line 16) | type Tool struct method Name (line 42) | func (t Tool) Name() string { method Description (line 46) | func (t Tool) Description() string { method Call (line 54) | func (t Tool) Call(ctx context.Context, input string) (string, error) { function New (line 24) | func New(opts ...Option) (*Tool, error) { FILE: tools/serpapi/serpapi_test.go function TestSerpAPITool (line 13) | func TestSerpAPITool(t *testing.T) { function TestSerpAPIToolError (line 60) | func TestSerpAPIToolError(t *testing.T) { FILE: tools/sqldatabase/mysql/main_test.go function TestMain (line 10) | func TestMain(m *testing.M) { FILE: tools/sqldatabase/mysql/mysql.go constant EngineName (line 12) | EngineName = "mysql" function init (line 15) | func init() { type MySQL (line 22) | type MySQL struct method Dialect (line 40) | func (m MySQL) Dialect() string { method Query (line 44) | func (m MySQL) Query(ctx context.Context, query string, args ...any) (... method TableNames (line 77) | func (m MySQL) TableNames(ctx context.Context) ([]string, error) { method TableInfo (line 89) | func (m MySQL) TableInfo(ctx context.Context, table string) (string, e... method Close (line 104) | func (m MySQL) Close() error { function NewMySQL (line 28) | func NewMySQL(dsn string) (sqldatabase.Engine, error) { //nolint:ireturn FILE: tools/sqldatabase/mysql/mysql_test.go function Test (line 22) | func Test(t *testing.T) { FILE: tools/sqldatabase/postgresql/main_test.go function TestMain (line 10) | func TestMain(m *testing.M) { FILE: tools/sqldatabase/postgresql/postgresql.go constant EngineName (line 11) | EngineName = "pgx" function init (line 17) | func init() { type PostgreSQL (line 24) | type PostgreSQL struct method Dialect (line 44) | func (p PostgreSQL) Dialect() string { method Query (line 51) | func (p PostgreSQL) Query(ctx context.Context, query string, args ...a... method TableNames (line 87) | func (p PostgreSQL) TableNames(ctx context.Context) ([]string, error) { method TableInfo (line 103) | func (p PostgreSQL) TableInfo(ctx context.Context, table string) (stri... method Close (line 127) | func (p PostgreSQL) Close() error { function NewPostgreSQL (line 32) | func NewPostgreSQL(dsn string) (sqldatabase.Engine, error) { //nolint:ir... FILE: tools/sqldatabase/postgresql/postgresql_test.go function Test (line 21) | func Test(t *testing.T) { FILE: tools/sqldatabase/sql_database.go type EngineFunc (line 11) | type EngineFunc function RegisterEngine (line 16) | func RegisterEngine(name string, engineFunc EngineFunc) { type Engine (line 21) | type Engine interface type SQLDatabase (line 47) | type SQLDatabase struct method Dialect (line 89) | func (sd *SQLDatabase) Dialect() string { method TableNames (line 94) | func (sd *SQLDatabase) TableNames() []string { method TableInfo (line 100) | func (sd *SQLDatabase) TableInfo(ctx context.Context, tables []string)... method Query (line 127) | func (sd *SQLDatabase) Query(ctx context.Context, query string) (strin... method Close (line 141) | func (sd *SQLDatabase) Close() error { method sampleRows (line 145) | func (sd *SQLDatabase) sampleRows(ctx context.Context, table string, r... function NewSQLDatabase (line 54) | func NewSQLDatabase(engine Engine, ignoreTables map[string]struct{}) (*S... function NewSQLDatabaseWithDSN (line 76) | func NewSQLDatabaseWithDSN(dialect, dsn string, ignoreTables map[string]... FILE: tools/sqldatabase/sqlite3/sqlite3.go constant EngineName (line 11) | EngineName = "sqlite3" function init (line 14) | func init() { type SQLite3 (line 21) | type SQLite3 struct method Dialect (line 39) | func (m SQLite3) Dialect() string { method Query (line 43) | func (m SQLite3) Query(ctx context.Context, query string, args ...any)... method TableNames (line 76) | func (m SQLite3) TableNames(ctx context.Context) ([]string, error) { method TableInfo (line 88) | func (m SQLite3) TableInfo(ctx context.Context, table string) (string,... method Close (line 103) | func (m SQLite3) Close() error { function NewSQLite3 (line 27) | func NewSQLite3(dsn string) (sqldatabase.Engine, error) { //nolint:ireturn FILE: tools/sqldatabase/sqlite3/sqlite3_test.go function Test (line 17) | func Test(t *testing.T) { FILE: tools/sqldatabase/testdata/db.sql type Activity (line 1) | CREATE TABLE Activity ( type Activity1 (line 5) | CREATE TABLE Activity1 ( type Activity2 (line 9) | CREATE TABLE Activity2 ( FILE: tools/tool.go type Tool (line 6) | type Tool interface FILE: tools/wikipedia/client.go constant _baseURL (line 17) | _baseURL = "https://%s.wikipedia.org/w/api.php" type searchResponse (line 19) | type searchResponse struct function search (line 33) | func search( type pageResult (line 79) | type pageResult struct function getPage (line 88) | func getPage(ctx context.Context, pageID int, languageCode, userAgent st... FILE: tools/wikipedia/wikipedia.go constant _defaultTopK (line 14) | _defaultTopK = 2 constant _defaultDocMaxChars (line 15) | _defaultDocMaxChars = 2000 constant _defaultLanguageCode (line 16) | _defaultLanguageCode = "en" type Tool (line 23) | type Tool struct method Name (line 66) | func (t Tool) Name() string { method Description (line 70) | func (t Tool) Description() string { method Call (line 80) | func (t Tool) Call(ctx context.Context, input string) (string, error) { method searchWiKi (line 100) | func (t Tool) searchWiKi(ctx context.Context, input string) (string, e... type Option (line 40) | type Option function WithHTTPClient (line 43) | func WithHTTPClient(client *http.Client) Option { function New (line 51) | func New(userAgent string, opts ...Option) Tool { FILE: tools/wikipedia/wikipedia_test.go constant _userAgent (line 12) | _userAgent = "langchaingo test (https://github.com/tmc/langchaingo)" function TestWikipedia (line 14) | func TestWikipedia(t *testing.T) { FILE: tools/zapier/description.go constant _baseZapierDescription (line 4) | _baseZapierDescription = "A wrapper around Zapier NLA actions. The input... FILE: tools/zapier/internal/client.go type listResponse (line 13) | type listResponse struct type ListResult (line 18) | type ListResult struct type executionResponse (line 25) | type executionResponse struct constant zapierNLABaseURL (line 33) | zapierNLABaseURL = "https://nla.zapier.com/api/v1" type Client (line 37) | type Client struct method List (line 141) | func (c *Client) List(ctx context.Context) ([]ListResult, error) { method Execute (line 177) | func (c *Client) Execute( method ExecuteAsString (line 216) | func (c *Client) ExecuteAsString( method formatListURL (line 230) | func (c *Client) formatListURL() string { method formatExecuteURL (line 234) | func (c *Client) formatExecuteURL(actionID string) string { type Transport (line 43) | type Transport struct method RoundTrip (line 252) | func (t *Transport) RoundTrip(req *http.Request) (*http.Response, erro... method createAuthHeader (line 257) | func (t *Transport) createAuthHeader(req *http.Request) { method createHeaders (line 265) | func (t *Transport) createHeaders(req *http.Request) { type ClientOptions (line 51) | type ClientOptions struct method Validate (line 62) | func (cOpts *ClientOptions) Validate() error { function NewClient (line 100) | func NewClient(opts ClientOptions) (*Client, error) { function createPayload (line 238) | func createPayload(input string, params map[string]string) (*bytes.Buffe... FILE: tools/zapier/internal/client_test.go function scrubZapierData (line 13) | func scrubZapierData(req *http.Request) error { function TestZapierClient_List (line 25) | func TestZapierClient_List(t *testing.T) { function TestZapierClient_Execute (line 61) | func TestZapierClient_Execute(t *testing.T) { function TestZapierClient_ExecuteAsString (line 105) | func TestZapierClient_ExecuteAsString(t *testing.T) { function TestZapierClient_WithAccessToken (line 150) | func TestZapierClient_WithAccessToken(t *testing.T) { FILE: tools/zapier/internal/client_unit_test.go function TestNewClient (line 14) | func TestNewClient(t *testing.T) { function TestClient_List (line 67) | func TestClient_List(t *testing.T) { function TestClient_Execute (line 125) | func TestClient_Execute(t *testing.T) { function TestClient_ExecuteAsString (line 162) | func TestClient_ExecuteAsString(t *testing.T) { function TestClient_ExecuteWithError (line 186) | func TestClient_ExecuteWithError(t *testing.T) { function TestTransport_RoundTrip (line 207) | func TestTransport_RoundTrip(t *testing.T) { FILE: tools/zapier/internal/errors.go type NoCredentialsError (line 4) | type NoCredentialsError struct method Error (line 6) | func (e NoCredentialsError) Error() string { FILE: tools/zapier/toolkit.go type ToolkitOpts (line 10) | type ToolkitOpts struct function Toolkit (line 35) | func Toolkit(ctx context.Context, opts ToolkitOpts) ([]tools.Tool, error) { FILE: tools/zapier/zapier.go type description (line 13) | type description struct type Tool (line 18) | type Tool struct method Name (line 73) | func (t Tool) Name() string { method Description (line 77) | func (t Tool) Description() string { method Call (line 81) | func (t Tool) Call(ctx context.Context, input string) (string, error) { method createDescription (line 101) | func (t Tool) createDescription() string { type ToolOptions (line 29) | type ToolOptions struct method Validate (line 39) | func (tOpts ToolOptions) Validate() error { function New (line 46) | func New(opts ToolOptions) (*Tool, error) { FILE: tools/zapier/zapier_test.go function TestCreateDescription (line 10) | func TestCreateDescription(t *testing.T) { FILE: util/alloydbutil/engine.go type EmailRetriever (line 16) | type EmailRetriever type PostgresEngine (line 18) | type PostgresEngine struct method Close (line 84) | func (p *PostgresEngine) Close() { method InitVectorstoreTable (line 180) | func (p *PostgresEngine) InitVectorstoreTable(ctx context.Context, opt... method InitChatHistoryTable (line 232) | func (p *PostgresEngine) InitChatHistoryTable(ctx context.Context, tab... type Column (line 22) | type Column struct function NewPostgresEngine (line 29) | func NewPostgresEngine(ctx context.Context, opts ...Option) (PostgresEng... function createPool (line 53) | func createPool(ctx context.Context, cfg engineConfig, usingIAMAuth bool... function getUser (line 93) | func getUser(ctx context.Context, config engineConfig) (string, bool, er... function getServiceAccountEmail (line 116) | func getServiceAccountEmail(ctx context.Context) (string, error) { function validateVectorstoreTableOptions (line 144) | func validateVectorstoreTableOptions(opts *VectorstoreTableOptions) error { FILE: util/alloydbutil/engine_test.go function getEnvVariables (line 10) | func getEnvVariables(t *testing.T) (string, string, string, string, stri... function TestNewPostgresEngine (line 45) | func TestNewPostgresEngine(t *testing.T) { function TestGetUser (line 115) | func TestGetUser(t *testing.T) { FILE: util/alloydbutil/options.go constant defaultSchemaName (line 10) | defaultSchemaName = "public" constant defaultUserAgent (line 11) | defaultUserAgent = "langchaingo-alloydb-pg/0.0.0" type Option (line 15) | type Option type engineConfig (line 17) | type engineConfig struct type VectorstoreTableOptions (line 33) | type VectorstoreTableOptions struct function WithAlloyDBInstance (line 47) | func WithAlloyDBInstance(projectID, region, cluster, instance string) Op... function WithPool (line 57) | func WithPool(pool *pgxpool.Pool) Option { function WithDatabase (line 64) | func WithDatabase(database string) Option { function WithUser (line 71) | func WithUser(user string) Option { function WithPassword (line 78) | func WithPassword(password string) Option { function WithIPType (line 85) | func WithIPType(ipType string) Option { function WithIAMAccountEmail (line 92) | func WithIAMAccountEmail(email string) Option { function applyClientOptions (line 98) | func applyClientOptions(opts ...Option) (engineConfig, error) { type OptionInitChatHistoryTable (line 115) | type OptionInitChatHistoryTable type InitChatHistoryTableOptions (line 118) | type InitChatHistoryTableOptions struct function WithSchemaName (line 123) | func WithSchemaName(schemaName string) OptionInitChatHistoryTable { function applyChatMessageHistoryOptions (line 131) | func applyChatMessageHistoryOptions(opts ...OptionInitChatHistoryTable) ... FILE: util/alloydbutil/options_test.go function TestApplyClientOptions (line 9) | func TestApplyClientOptions(t *testing.T) { function TestApplyChatMessageHistoryOptions (line 93) | func TestApplyChatMessageHistoryOptions(t *testing.T) { function TestOptions (line 127) | func TestOptions(t *testing.T) { function TestChatHistoryTableOptions (line 207) | func TestChatHistoryTableOptions(t *testing.T) { function TestVectorstoreTableOptionsStruct (line 217) | func TestVectorstoreTableOptionsStruct(t *testing.T) { function TestConstants (line 276) | func TestConstants(t *testing.T) { function TestColumnStruct (line 285) | func TestColumnStruct(t *testing.T) { FILE: util/cloudsqlutil/engine.go type EmailRetriever (line 16) | type EmailRetriever type PostgresEngine (line 18) | type PostgresEngine struct method Close (line 86) | func (p *PostgresEngine) Close() { method InitVectorstoreTable (line 181) | func (p *PostgresEngine) InitVectorstoreTable(ctx context.Context, opt... method InitChatHistoryTable (line 233) | func (p *PostgresEngine) InitChatHistoryTable(ctx context.Context, tab... type Column (line 22) | type Column struct function NewPostgresEngine (line 29) | func NewPostgresEngine(ctx context.Context, opts ...Option) (PostgresEng... function createPool (line 53) | func createPool(ctx context.Context, cfg engineConfig, usingIAMAuth bool... function getUser (line 94) | func getUser(ctx context.Context, config engineConfig) (string, bool, er... function getServiceAccountEmail (line 117) | func getServiceAccountEmail(ctx context.Context) (string, error) { function validateVectorstoreTableOptions (line 145) | func validateVectorstoreTableOptions(opts *VectorstoreTableOptions) error { FILE: util/cloudsqlutil/engine_test.go function getEnvVariables (line 10) | func getEnvVariables(t *testing.T) (string, string, string, string, stri... function TestNewPostgresEngine (line 41) | func TestNewPostgresEngine(t *testing.T) { function TestGetUser (line 110) | func TestGetUser(t *testing.T) { FILE: util/cloudsqlutil/options.go constant defaultSchemaName (line 10) | defaultSchemaName = "public" constant defaultUserAgent (line 11) | defaultUserAgent = "langchaingo-cloud-sql-pg/0.0.0" type Option (line 15) | type Option type engineConfig (line 17) | type engineConfig struct type VectorstoreTableOptions (line 32) | type VectorstoreTableOptions struct function WithCloudSQLInstance (line 46) | func WithCloudSQLInstance(projectID, region, instance string) Option { function WithPool (line 55) | func WithPool(pool *pgxpool.Pool) Option { function WithDatabase (line 62) | func WithDatabase(database string) Option { function WithUser (line 69) | func WithUser(user string) Option { function WithPassword (line 76) | func WithPassword(password string) Option { function WithIPType (line 83) | func WithIPType(ipType string) Option { function WithIAMAccountEmail (line 90) | func WithIAMAccountEmail(email string) Option { function applyClientOptions (line 96) | func applyClientOptions(opts ...Option) (engineConfig, error) { type OptionInitChatHistoryTable (line 113) | type OptionInitChatHistoryTable type InitChatHistoryTableOptions (line 116) | type InitChatHistoryTableOptions struct function WithSchemaName (line 121) | func WithSchemaName(schemaName string) OptionInitChatHistoryTable { function applyChatMessageHistoryOptions (line 129) | func applyChatMessageHistoryOptions(opts ...OptionInitChatHistoryTable) ... FILE: util/cloudsqlutil/options_test.go function TestApplyClientOptions (line 9) | func TestApplyClientOptions(t *testing.T) { function TestValidateVectorstoreTableOptions (line 90) | func TestValidateVectorstoreTableOptions(t *testing.T) { //nolint:funlen... function TestApplyChatMessageHistoryOptions (line 206) | func TestApplyChatMessageHistoryOptions(t *testing.T) { function TestOptions (line 240) | func TestOptions(t *testing.T) { function TestChatHistoryTableOptions (line 317) | func TestChatHistoryTableOptions(t *testing.T) { function TestColumnStruct (line 327) | func TestColumnStruct(t *testing.T) { function TestVectorstoreTableOptionsStruct (line 345) | func TestVectorstoreTableOptionsStruct(t *testing.T) { function TestConstants (line 404) | func TestConstants(t *testing.T) { function TestPostgresEngineClose (line 413) | func TestPostgresEngineClose(t *testing.T) { FILE: vectorstores/alloydb/distance_strategy.go type distanceStrategy (line 5) | type distanceStrategy interface type Index (line 12) | type Index interface type Euclidean (line 16) | type Euclidean struct method String (line 18) | func (Euclidean) String() string { method operator (line 22) | func (Euclidean) operator() string { method searchFunction (line 26) | func (Euclidean) searchFunction() string { method similaritySearchFunction (line 30) | func (Euclidean) similaritySearchFunction() string { type CosineDistance (line 34) | type CosineDistance struct method String (line 36) | func (CosineDistance) String() string { method operator (line 40) | func (CosineDistance) operator() string { method searchFunction (line 44) | func (CosineDistance) searchFunction() string { method similaritySearchFunction (line 48) | func (CosineDistance) similaritySearchFunction() string { type InnerProduct (line 52) | type InnerProduct struct method String (line 54) | func (InnerProduct) String() string { method operator (line 58) | func (InnerProduct) operator() string { method searchFunction (line 62) | func (InnerProduct) searchFunction() string { method similaritySearchFunction (line 66) | func (InnerProduct) similaritySearchFunction() string { type HNSWOptions (line 71) | type HNSWOptions struct method Options (line 76) | func (h HNSWOptions) Options() string { type IVFFlatOptions (line 81) | type IVFFlatOptions struct method Options (line 85) | func (i IVFFlatOptions) Options() string { type IVFOptions (line 90) | type IVFOptions struct method Options (line 95) | func (i IVFOptions) Options() string { type SCANNOptions (line 100) | type SCANNOptions struct method Options (line 105) | func (s SCANNOptions) Options() string { method indexOptions (line 110) | func (index *BaseIndex) indexOptions() string { FILE: vectorstores/alloydb/main_test.go function TestMain (line 10) | func TestMain(m *testing.M) { FILE: vectorstores/alloydb/vectorstore.go constant defaultIndexNameSuffix (line 19) | defaultIndexNameSuffix = "langchainvectorindex" type VectorStore (line 22) | type VectorStore struct method AddDocuments (line 67) | func (vs *VectorStore) AddDocuments(ctx context.Context, docs []schema... method generateAddDocumentsQuery (line 116) | func (vs *VectorStore) generateAddDocumentsQuery(id, content, embeddin... method SimilaritySearch (line 157) | func (vs *VectorStore) SimilaritySearch(ctx context.Context, query str... method executeSQLQuery (line 193) | func (vs *VectorStore) executeSQLQuery(ctx context.Context, stmt strin... method processResultsToDocuments (line 216) | func (*VectorStore) processResultsToDocuments(results []SearchDocument... method ApplyVectorIndex (line 235) | func (vs *VectorStore) ApplyVectorIndex(ctx context.Context, index Bas... method ReIndex (line 277) | func (vs *VectorStore) ReIndex(ctx context.Context) error { method ReIndexWithName (line 283) | func (vs *VectorStore) ReIndexWithName(ctx context.Context, indexName ... method DropVectorIndex (line 294) | func (vs *VectorStore) DropVectorIndex(ctx context.Context, indexName ... method IsValidIndex (line 308) | func (vs *VectorStore) IsValidIndex(ctx context.Context, indexName str... method NewBaseIndex (line 323) | func (*VectorStore) NewBaseIndex(indexName, indexType string, strategy... type BaseIndex (line 36) | type BaseIndex struct type SearchDocument (line 44) | type SearchDocument struct function NewVectorStore (line 53) | func NewVectorStore(engine alloydbutil.PostgresEngine, FILE: vectorstores/alloydb/vectorstore_container_test.go function preCheckEnvSetting (line 27) | func preCheckEnvSetting(t *testing.T) string { function setEngineWithImage (line 76) | func setEngineWithImage(t *testing.T) alloydbutil.PostgresEngine { function createOpenAIEmbedderForContainer (line 96) | func createOpenAIEmbedderForContainer(t *testing.T) *embeddings.Embedder... function initVectorStore (line 116) | func initVectorStore(t *testing.T) (alloydb.VectorStore, func() error) { function TestContainerPingToDB (line 147) | func TestContainerPingToDB(t *testing.T) { function TestContainerApplyVectorIndexAndDropIndex (line 159) | func TestContainerApplyVectorIndexAndDropIndex(t *testing.T) { function TestContainerIsValidIndex (line 178) | func TestContainerIsValidIndex(t *testing.T) { function TestContainerAddDocuments (line 202) | func TestContainerAddDocuments(t *testing.T) { FILE: vectorstores/alloydb/vectorstore_options.go constant defaultSchemaName (line 12) | defaultSchemaName = "public" constant defaultIDColumn (line 13) | defaultIDColumn = "langchain_id" constant defaultContentColumn (line 14) | defaultContentColumn = "content" constant defaultEmbeddingColumn (line 15) | defaultEmbeddingColumn = "embedding" constant defaultMetadataJSONColumn (line 16) | defaultMetadataJSONColumn = "langchain_metadata" constant defaultK (line 17) | defaultK = 4 type VectorStoreOption (line 22) | type VectorStoreOption function WithSchemaName (line 25) | func WithSchemaName(schemaName string) VectorStoreOption { function WithIDColumn (line 32) | func WithIDColumn(idColumn string) VectorStoreOption { function WithMetadataJSONColumn (line 39) | func WithMetadataJSONColumn(metadataJSONColumn string) VectorStoreOption { function WithContentColumn (line 46) | func WithContentColumn(contentColumn string) VectorStoreOption { function WithEmbeddingColumn (line 53) | func WithEmbeddingColumn(embeddingColumn string) VectorStoreOption { function WithMetadataColumns (line 60) | func WithMetadataColumns(metadataColumns []string) VectorStoreOption { function WithK (line 67) | func WithK(k int) VectorStoreOption { function WithDistanceStrategy (line 74) | func WithDistanceStrategy(distanceStrategy distanceStrategy) VectorStore... function applyAlloyDBVectorStoreOptions (line 82) | func applyAlloyDBVectorStoreOptions(engine alloydbutil.PostgresEngine, function applyOpts (line 119) | func applyOpts(options ...vectorstores.Option) vectorstores.Options { FILE: vectorstores/alloydb/vectorstore_test.go type EnvVariables (line 20) | type EnvVariables struct function getEnvVariables (line 31) | func getEnvVariables(t *testing.T) EnvVariables { function setEngine (line 88) | func setEngine(t *testing.T, envVariables EnvVariables) alloydbutil.Post... function createOpenAIEmbedder (line 105) | func createOpenAIEmbedder(t *testing.T) *embeddings.EmbedderImpl { function vectorStore (line 125) | func vectorStore(t *testing.T, envVariables EnvVariables) (alloydb.Vecto... function TestPingToDB (line 153) | func TestPingToDB(t *testing.T) { function TestApplyVectorIndexAndDropIndex (line 165) | func TestApplyVectorIndexAndDropIndex(t *testing.T) { function TestIsValidIndex (line 184) | func TestIsValidIndex(t *testing.T) { function TestAddDocuments (line 208) | func TestAddDocuments(t *testing.T) { FILE: vectorstores/azureaisearch/azureaisearch.go type Store (line 18) | type Store struct method AddDocuments (line 63) | func (s *Store) AddDocuments( method SimilaritySearch (line 98) | func (s *Store) SimilaritySearch( function New (line 47) | func New(opts ...Option) (Store, error) { function assertResultValues (line 145) | func assertResultValues(searchResult map[string]interface{}) (*schema.Do... FILE: vectorstores/azureaisearch/azureaisearch_httprr_test.go type mockEmbedder (line 16) | type mockEmbedder struct method EmbedDocuments (line 18) | func (m mockEmbedder) EmbedDocuments(_ context.Context, texts []string... method EmbedQuery (line 27) | func (m mockEmbedder) EmbedQuery(_ context.Context, text string) ([]fl... function TestStoreHTTPRR_CreateIndex (line 32) | func TestStoreHTTPRR_CreateIndex(t *testing.T) { function TestStoreHTTPRR_AddDocuments (line 64) | func TestStoreHTTPRR_AddDocuments(t *testing.T) { function TestStoreHTTPRR_SimilaritySearch (line 113) | func TestStoreHTTPRR_SimilaritySearch(t *testing.T) { function TestStoreHTTPRR_DeleteIndex (line 146) | func TestStoreHTTPRR_DeleteIndex(t *testing.T) { function TestStoreHTTPRR_ListIndexes (line 177) | func TestStoreHTTPRR_ListIndexes(t *testing.T) { FILE: vectorstores/azureaisearch/azureaisearch_unit_test.go type testEmbedder (line 26) | type testEmbedder struct method EmbedDocuments (line 31) | func (m *testEmbedder) EmbedDocuments(ctx context.Context, texts []str... method EmbedQuery (line 42) | func (m *testEmbedder) EmbedQuery(ctx context.Context, text string) ([... function TestNew (line 49) | func TestNew(t *testing.T) { function TestStore_AddDocuments (line 142) | func TestStore_AddDocuments(t *testing.T) { //nolint:funlen // comprehen... function TestStore_SimilaritySearch (line 288) | func TestStore_SimilaritySearch(t *testing.T) { //nolint:funlen // compr... function TestStore_CreateIndex (line 496) | func TestStore_CreateIndex(t *testing.T) { function TestStore_DeleteIndex (line 568) | func TestStore_DeleteIndex(t *testing.T) { function TestStore_ListIndexes (line 589) | func TestStore_ListIndexes(t *testing.T) { function TestStore_RetrieveIndex (line 623) | func TestStore_RetrieveIndex(t *testing.T) { function TestAssertResultValues (line 654) | func TestAssertResultValues(t *testing.T) { function TestStructToMap (line 747) | func TestStructToMap(t *testing.T) { function TestGetOptions (line 815) | func TestGetOptions(t *testing.T) { function TestHTTPReadBody (line 884) | func TestHTTPReadBody(t *testing.T) { function TestWithOptions (line 963) | func TestWithOptions(t *testing.T) { function TestEnvironmentVariableHandling (line 1003) | func TestEnvironmentVariableHandling(t *testing.T) { function TestDocumentUploadEdgeCases (line 1078) | func TestDocumentUploadEdgeCases(t *testing.T) { function TestSearchWithComplexFilters (line 1170) | func TestSearchWithComplexFilters(t *testing.T) { function TestConcurrentOperations (line 1248) | func TestConcurrentOperations(t *testing.T) { function TestInterfaceCompliance (line 1341) | func TestInterfaceCompliance(t *testing.T) { FILE: vectorstores/azureaisearch/document_upload.go type document (line 11) | type document struct method UploadDocument (line 20) | func (s *Store) UploadDocument( method UploadDocumentAPIRequest (line 46) | func (s *Store) UploadDocumentAPIRequest(ctx context.Context, indexName ... FILE: vectorstores/azureaisearch/documents_search.go type QueryType (line 12) | type QueryType constant QueryTypeSimple (line 15) | QueryTypeSimple QueryType = "simple" constant QueryTypeFull (line 16) | QueryTypeFull QueryType = "full" constant QueryTypeSemantic (line 17) | QueryTypeSemantic QueryType = "semantic" type QueryCaptions (line 21) | type QueryCaptions constant QueryTypeExtractive (line 24) | QueryTypeExtractive QueryCaptions = "extractive" constant QueryTypeNone (line 25) | QueryTypeNone QueryCaptions = "none" type SpellerType (line 29) | type SpellerType constant SpellerTypeLexicon (line 32) | SpellerTypeLexicon SpellerType = "lexicon" constant SpellerTypeNone (line 33) | SpellerTypeNone SpellerType = "none" type SearchDocumentsRequestInput (line 37) | type SearchDocumentsRequestInput struct type SearchDocumentsRequestInputVector (line 66) | type SearchDocumentsRequestInputVector struct type SearchDocumentsRequestOuput (line 75) | type SearchDocumentsRequestOuput struct method SearchDocuments (line 89) | func (s *Store) SearchDocuments( FILE: vectorstores/azureaisearch/helpers.go function structToMap (line 8) | func structToMap(input any, output *map[string]interface{}) error { FILE: vectorstores/azureaisearch/helpers_http.go method httpDefaultSend (line 16) | func (s *Store) httpDefaultSend(req *http.Request, serviceName string, o... function httpReadBody (line 25) | func httpReadBody(response *http.Response, serviceName string, output an... FILE: vectorstores/azureaisearch/index_create.go type IndexOption (line 13) | type IndexOption constant vectorDimension (line 16) | vectorDimension = 1536 constant hnswParametersM (line 17) | hnswParametersM = 4 constant hnswParametersEfConstruction (line 18) | hnswParametersEfConstruction = 400 constant hnswParametersEfSearch (line 19) | hnswParametersEfSearch = 500 method CreateIndex (line 24) | func (s *Store) CreateIndex(ctx context.Context, indexName string, opts ... method CreateIndexAPIRequest (line 88) | func (s *Store) CreateIndexAPIRequest(ctx context.Context, indexName str... FILE: vectorstores/azureaisearch/index_delete.go method DeleteIndex (line 10) | func (s *Store) DeleteIndex(ctx context.Context, indexName string) error { FILE: vectorstores/azureaisearch/index_list.go method ListIndexes (line 10) | func (s *Store) ListIndexes(ctx context.Context, output *map[string]inte... FILE: vectorstores/azureaisearch/index_retrieve.go method RetrieveIndex (line 10) | func (s *Store) RetrieveIndex(ctx context.Context, indexName string, out... FILE: vectorstores/azureaisearch/options.go constant EnvironmentVariableEndpoint (line 15) | EnvironmentVariableEndpoint string = "AZURE_AI_SEARCH_ENDPOINT" constant EnvironmentVariableAPIKey (line 17) | EnvironmentVariableAPIKey string = "AZURE_AI_SEARCH_API_KEY" method getOptions (line 31) | func (s *Store) getOptions(options ...vectorstores.Option) vectorstores.... function WithFilters (line 40) | func WithFilters(filters any) vectorstores.Option { type Option (line 47) | type Option function WithEmbedder (line 50) | func WithEmbedder(e embeddings.Embedder) Option { function WithHTTPClient (line 58) | func WithHTTPClient(client *http.Client) Option { function WithAPIKey (line 65) | func WithAPIKey(azureAISearchAPIKey string) Option { function WithEndpoint (line 72) | func WithEndpoint(endpoint string) Option { function applyClientOptions (line 78) | func applyClientOptions(s *Store, opts ...Option) error { FILE: vectorstores/azureaisearch/types.go constant FieldTypeString (line 12) | FieldTypeString FieldType = "Edm.String" constant FieldTypeSingle (line 13) | FieldTypeSingle FieldType = "Edm.Single" constant FieldTypeInt32 (line 14) | FieldTypeInt32 FieldType = "Edm.Int32" constant FieldTypeInt64 (line 15) | FieldTypeInt64 FieldType = "Edm.Int64" constant FieldTypeDouble (line 16) | FieldTypeDouble FieldType = "Edm.Double" constant FieldTypeBoolean (line 17) | FieldTypeBoolean FieldType = "Edm.Boolean" constant FieldTypeDatetimeOffset (line 18) | FieldTypeDatetimeOffset FieldType = "Edm.DateTimeOffset" constant FieldTypeComplexType (line 19) | FieldTypeComplexType FieldType = "Edm.ComplexType" function CollectionField (line 23) | func CollectionField(fieldType FieldType) FieldType { FILE: vectorstores/bedrockknowledgebases/bedrockknowledgebases.go type bedrockAgentAPI (line 22) | type bedrockAgentAPI interface type bedrockAgentRuntimeAPI (line 31) | type bedrockAgentRuntimeAPI interface type s3Config (line 35) | type s3Config struct type KnowledgeBase (line 40) | type KnowledgeBase struct method AddDocuments (line 84) | func (kb *KnowledgeBase) AddDocuments(ctx context.Context, docs []sche... method AddNamedDocuments (line 95) | func (kb *KnowledgeBase) AddNamedDocuments(ctx context.Context, docs [... method filterMetadata (line 99) | func (kb *KnowledgeBase) filterMetadata(docs []NamedDocument) { method addDocuments (line 134) | func (kb *KnowledgeBase) addDocuments(ctx context.Context, docs []Name... method SimilaritySearch (line 209) | func (kb *KnowledgeBase) SimilaritySearch(ctx context.Context, query s... method getFilters (line 265) | func (kb *KnowledgeBase) getFilters(filters any) (types.RetrievalFilte... method buildCompositeFilter (line 301) | func (kb *KnowledgeBase) buildCompositeFilter(filters []Filter, isAll ... method parseMetadata (line 326) | func (kb *KnowledgeBase) parseMetadata(retrievalResult types.Knowledge... method unmarshalMetadataValue (line 350) | func (kb *KnowledgeBase) unmarshalMetadataValue(value document.Interfa... function New (line 49) | func New(ctx context.Context, knowledgeBaseID string) (*KnowledgeBase, e... function newFromClients (line 62) | func newFromClients( type NamedDocument (line 79) | type NamedDocument struct FILE: vectorstores/bedrockknowledgebases/bedrockknowledgebases_test.go type testModel (line 22) | type testModel struct method GenerateContent (line 26) | func (testModel) GenerateContent(_ context.Context, _ []llms.MessageCo... method Call (line 34) | func (testModel) Call(_ context.Context, _ string, _ ...llms.CallOptio... type testBedrockAgent (line 38) | type testBedrockAgent struct method GetKnowledgeBase (line 45) | func (t *testBedrockAgent) GetKnowledgeBase(_ context.Context, _ *bedr... method ListDataSources (line 54) | func (t *testBedrockAgent) ListDataSources(_ context.Context, params *... method GetDataSource (line 102) | func (t *testBedrockAgent) GetDataSource(_ context.Context, params *be... method IngestKnowledgeBaseDocuments (line 126) | func (t *testBedrockAgent) IngestKnowledgeBaseDocuments(_ context.Cont... method StartIngestionJob (line 131) | func (t *testBedrockAgent) StartIngestionJob(_ context.Context, _ *bed... method GetIngestionJob (line 140) | func (t *testBedrockAgent) GetIngestionJob(_ context.Context, _ *bedro... type testBedrockAgentRuntime (line 149) | type testBedrockAgentRuntime struct method Retrieve (line 153) | func (t *testBedrockAgentRuntime) Retrieve(_ context.Context, _ *bedro... type testS3Client (line 179) | type testS3Client struct method PutObject (line 183) | func (t *testS3Client) PutObject(_ context.Context, _ *s3.PutObjectInp... method DeleteObject (line 188) | func (t *testS3Client) DeleteObject(_ context.Context, _ *s3.DeleteObj... function TestKnowledgeBaseAddDocuments (line 193) | func TestKnowledgeBaseAddDocuments(t *testing.T) { function TestKnowledgeBaseAddDocumentsWithoutDs (line 208) | func TestKnowledgeBaseAddDocumentsWithoutDs(t *testing.T) { function TestKnowledgeBaseAddDocumentsWithWrongDsId (line 220) | func TestKnowledgeBaseAddDocumentsWithWrongDsId(t *testing.T) { function TestKnowledgeBaseAddDocumentsWithMultipleDs (line 232) | func TestKnowledgeBaseAddDocumentsWithMultipleDs(t *testing.T) { function TestKnowledgeBaseAddDocumentsWithMultipleMixedDs (line 247) | func TestKnowledgeBaseAddDocumentsWithMultipleMixedDs(t *testing.T) { function TestKnowledgeBaseAddDocumentsWithMultipleS3DsAndWithoutDsID (line 262) | func TestKnowledgeBaseAddDocumentsWithMultipleS3DsAndWithoutDsID(t *test... function TestKnowledgeBaseAddNamedDocuments (line 272) | func TestKnowledgeBaseAddNamedDocuments(t *testing.T) { function TestKnowledgeBaseSimilaritySearch (line 296) | func TestKnowledgeBaseSimilaritySearch(t *testing.T) { function TestKnowledgeBaseSimilaritySearchWithScoreThreshold (line 310) | func TestKnowledgeBaseSimilaritySearchWithScoreThreshold(t *testing.T) { function TestKnowledgeBaseSimilaritySearchWithFilter (line 323) | func TestKnowledgeBaseSimilaritySearchWithFilter(t *testing.T) { function TestKnowledgeBaseSimilaritySearchWrongWithFilter (line 333) | func TestKnowledgeBaseSimilaritySearchWrongWithFilter(t *testing.T) { type trackSearchResults (line 343) | type trackSearchResults struct method SimilaritySearch (line 354) | func (t *trackSearchResults) SimilaritySearch(ctx context.Context, que... function newTrackSearchResults (line 350) | func newTrackSearchResults(kb *KnowledgeBase) *trackSearchResults { function TestKnowledgeBaseAsRetriever (line 363) | func TestKnowledgeBaseAsRetriever(t *testing.T) { function TestKnowledgeBaseAsRetrieverWithScoreThreshold (line 387) | func TestKnowledgeBaseAsRetrieverWithScoreThreshold(t *testing.T) { FILE: vectorstores/bedrockknowledgebases/ingestion.go constant _metadataSuffix (line 25) | _metadataSuffix = ".metadata.json" constant _initialIngestionJobStatusRetryDelay (line 26) | _initialIngestionJobStatusRetryDelay = 1*time.Second + 250*time.Millisecond type dataSource (line 30) | type dataSource struct method hash (line 35) | func (kb *KnowledgeBase) hash(docs []NamedDocument) string { method checkKnowledgeBase (line 46) | func (kb *KnowledgeBase) checkKnowledgeBase(ctx context.Context) error { method listDataSources (line 57) | func (kb *KnowledgeBase) listDataSources(ctx context.Context) (compatibl... type ingestDocumentsRetryer (line 97) | type ingestDocumentsRetryer struct method hasReachedMaxNumberRequests (line 102) | func (r ingestDocumentsRetryer) hasReachedMaxNumberRequests(msg string... method hasReachedMaxConcurrency (line 106) | func (r ingestDocumentsRetryer) hasReachedMaxConcurrency(msg string) b... method IsErrorRetryable (line 110) | func (r ingestDocumentsRetryer) IsErrorRetryable(err error) bool { method ingestDocuments (line 123) | func (kb *KnowledgeBase) ingestDocuments(ctx context.Context, datasource... type startIngestionJobRetryer (line 185) | type startIngestionJobRetryer struct method hasOngoingIngestDocsRequest (line 190) | func (r startIngestionJobRetryer) hasOngoingIngestDocsRequest(msg stri... method IsErrorRetryable (line 194) | func (r startIngestionJobRetryer) IsErrorRetryable(err error) bool { method startIngestionJob (line 207) | func (kb *KnowledgeBase) startIngestionJob(ctx context.Context, datasour... method checkIngestionJobStatus (line 228) | func (kb *KnowledgeBase) checkIngestionJobStatus(ctx context.Context, da... FILE: vectorstores/bedrockknowledgebases/options.go method getOptions (line 7) | func (kb *KnowledgeBase) getOptions(options ...vectorstores.Option) *vec... type Filter (line 24) | type Filter interface type EqualsFilter (line 28) | type EqualsFilter struct method isFilter (line 33) | func (f EqualsFilter) isFilter() {} type NotEqualsFilter (line 35) | type NotEqualsFilter struct method isFilter (line 40) | func (f NotEqualsFilter) isFilter() {} type ContainsFilter (line 42) | type ContainsFilter struct method isFilter (line 47) | func (f ContainsFilter) isFilter() {} type AllFilter (line 49) | type AllFilter struct method isFilter (line 53) | func (f AllFilter) isFilter() {} type AnyFilter (line 55) | type AnyFilter struct method isFilter (line 59) | func (f AnyFilter) isFilter() {} FILE: vectorstores/bedrockknowledgebases/s3.go type s3API (line 17) | type s3API interface type metadata (line 22) | type metadata struct method getBucketName (line 26) | func (kb *KnowledgeBase) getBucketName(bucketARN string) string { method addToS3 (line 31) | func (kb *KnowledgeBase) addToS3(ctx context.Context, bucketArn string, ... method removeFromS3 (line 50) | func (kb *KnowledgeBase) removeFromS3(ctx context.Context, bucketArn str... method uploadS3Object (line 73) | func (kb *KnowledgeBase) uploadS3Object(ctx context.Context, bucketArn s... method removeS3Object (line 105) | func (kb *KnowledgeBase) removeS3Object(ctx context.Context, bucketArn s... FILE: vectorstores/chroma/chroma.go type Store (line 28) | type Store struct method AddDocuments (line 91) | func (s Store) AddDocuments(ctx context.Context, method SimilaritySearch (line 126) | func (s Store) SimilaritySearch(ctx context.Context, query string, num... method RemoveCollection (line 167) | func (s Store) RemoveCollection() error { method getOptions (line 178) | func (s Store) getOptions(options ...vectorstores.Option) vectorstores... method getScoreThreshold (line 186) | func (s Store) getScoreThreshold(opts vectorstores.Options) (float32, ... method getNameSpace (line 193) | func (s Store) getNameSpace(opts vectorstores.Options) string { method getNamespacedFilter (line 200) | func (s Store) getNamespacedFilter(opts vectorstores.Options) map[stri... function New (line 46) | func New(opts ...Option) (Store, error) { function safeIntToInt32 (line 216) | func safeIntToInt32(n int) int32 { FILE: vectorstores/chroma/chroma_test.go function createOpenAIEmbedder (line 37) | func createOpenAIEmbedder(t *testing.T) *embeddings.EmbedderImpl { function createOpenAILLMAndEmbedder (line 53) | func createOpenAILLMAndEmbedder(t *testing.T) (*openai.LLM, *embeddings.... function TestChromaGoStoreRest (line 72) | func TestChromaGoStoreRest(t *testing.T) { function TestChromaStoreRestWithScoreThreshold (line 111) | func TestChromaStoreRestWithScoreThreshold(t *testing.T) { function TestSimilaritySearchWithInvalidScoreThreshold (line 162) | func TestSimilaritySearchWithInvalidScoreThreshold(t *testing.T) { function TestChromaAsRetriever (line 208) | func TestChromaAsRetriever(t *testing.T) { function TestChromaAsRetrieverWithScoreThreshold (line 252) | func TestChromaAsRetrieverWithScoreThreshold(t *testing.T) { function TestChromaAsRetrieverWithMetadataFilterEqualsClause (line 304) | func TestChromaAsRetrieverWithMetadataFilterEqualsClause(t *testing.T) { function TestChromaAsRetrieverWithMetadataFilterInClause (line 381) | func TestChromaAsRetrieverWithMetadataFilterInClause(t *testing.T) { function TestChromaAsRetrieverWithMetadataFilterNotSelected (line 462) | func TestChromaAsRetrieverWithMetadataFilterNotSelected(t *testing.T) { function TestChromaAsRetrieverWithMetadataFilters (line 539) | func TestChromaAsRetrieverWithMetadataFilters(t *testing.T) { function getValues (line 618) | func getValues(t *testing.T) (string, string) { function cleanupTestArtifacts (line 653) | func cleanupTestArtifacts(t *testing.T, s chroma.Store) { function getTestNameSpace (line 658) | func getTestNameSpace() string { FILE: vectorstores/chroma/embedder.go type chromaGoEmbedder (line 13) | type chromaGoEmbedder struct method EmbedDocuments (line 17) | func (e chromaGoEmbedder) EmbedDocuments(ctx context.Context, texts []... method EmbedQuery (line 29) | func (e chromaGoEmbedder) EmbedQuery(ctx context.Context, text string)... method EmbedRecords (line 37) | func (e chromaGoEmbedder) EmbedRecords(ctx context.Context, records []... FILE: vectorstores/chroma/main_test.go function TestMain (line 10) | func TestMain(m *testing.M) { FILE: vectorstores/chroma/options.go constant OpenAIAPIKeyEnvVarName (line 13) | OpenAIAPIKeyEnvVarName = "OPENAI_API_KEY" constant OpenAIOrgIDEnvVarName (line 14) | OpenAIOrgIDEnvVarName = "OPENAI_ORGANIZATION" constant ChromaURLKeyEnvVarName (line 15) | ChromaURLKeyEnvVarName = "CHROMA_URL" constant DefaultNameSpace (line 16) | DefaultNameSpace = "langchain" constant DefaultNameSpaceKey (line 17) | DefaultNameSpaceKey = "nameSpace" constant DefaultDistanceFunc (line 18) | DefaultDistanceFunc = chromatypes.L2 type Option (line 25) | type Option function WithNameSpace (line 28) | func WithNameSpace(nameSpace string) Option { function WithChromaURL (line 35) | func WithChromaURL(chromaURL string) Option { function WithEmbedder (line 42) | func WithEmbedder(e embeddings.Embedder) Option { function WithDistanceFunction (line 50) | func WithDistanceFunction(distanceFunction chromatypes.DistanceFunction)... function WithIncludes (line 57) | func WithIncludes(includes []chromatypes.QueryEnum) Option { function WithOpenAIAPIKey (line 66) | func WithOpenAIAPIKey(openAiAPIKey string) Option { function WithOpenAIOrganization (line 73) | func WithOpenAIOrganization(openAiOrganization string) Option { function applyClientOptions (line 79) | func applyClientOptions(opts ...Option) (Store, error) { FILE: vectorstores/cloudsql/distance_strategy.go type distanceStrategy (line 5) | type distanceStrategy interface type Index (line 12) | type Index interface type Euclidean (line 16) | type Euclidean struct method String (line 18) | func (Euclidean) String() string { method operator (line 22) | func (Euclidean) operator() string { method searchFunction (line 26) | func (Euclidean) searchFunction() string { method similaritySearchFunction (line 30) | func (Euclidean) similaritySearchFunction() string { type CosineDistance (line 34) | type CosineDistance struct method String (line 36) | func (CosineDistance) String() string { method operator (line 40) | func (CosineDistance) operator() string { method searchFunction (line 44) | func (CosineDistance) searchFunction() string { method similaritySearchFunction (line 48) | func (CosineDistance) similaritySearchFunction() string { type InnerProduct (line 52) | type InnerProduct struct method String (line 54) | func (InnerProduct) String() string { method operator (line 58) | func (InnerProduct) operator() string { method searchFunction (line 62) | func (InnerProduct) searchFunction() string { method similaritySearchFunction (line 66) | func (InnerProduct) similaritySearchFunction() string { type HNSWOptions (line 71) | type HNSWOptions struct method Options (line 76) | func (h HNSWOptions) Options() string { type IVFFlatOptions (line 81) | type IVFFlatOptions struct method Options (line 85) | func (i IVFFlatOptions) Options() string { method indexOptions (line 90) | func (index *BaseIndex) indexOptions() string { FILE: vectorstores/cloudsql/main_test.go function TestMain (line 10) | func TestMain(m *testing.M) { FILE: vectorstores/cloudsql/vectorstore.go constant defaultIndexNameSuffix (line 19) | defaultIndexNameSuffix = "langchainvectorindex" type VectorStore (line 22) | type VectorStore struct method AddDocuments (line 67) | func (vs *VectorStore) AddDocuments(ctx context.Context, docs []schema... method generateAddDocumentsQuery (line 116) | func (vs *VectorStore) generateAddDocumentsQuery(id, content, embeddin... method SimilaritySearch (line 158) | func (vs *VectorStore) SimilaritySearch(ctx context.Context, query str... method executeSQLQuery (line 195) | func (vs *VectorStore) executeSQLQuery(ctx context.Context, stmt strin... method processResultsToDocuments (line 218) | func (*VectorStore) processResultsToDocuments(results []SearchDocument... method ApplyVectorIndex (line 237) | func (vs *VectorStore) ApplyVectorIndex(ctx context.Context, index Bas... method ReIndex (line 274) | func (vs *VectorStore) ReIndex(ctx context.Context) error { method ReIndexWithName (line 280) | func (vs *VectorStore) ReIndexWithName(ctx context.Context, indexName ... method DropVectorIndex (line 291) | func (vs *VectorStore) DropVectorIndex(ctx context.Context, indexName ... method IsValidIndex (line 305) | func (vs *VectorStore) IsValidIndex(ctx context.Context, indexName str... method NewBaseIndex (line 320) | func (*VectorStore) NewBaseIndex(indexName, indexType string, strategy... type BaseIndex (line 36) | type BaseIndex struct type SearchDocument (line 44) | type SearchDocument struct function NewVectorStore (line 53) | func NewVectorStore(engine cloudsqlutil.PostgresEngine, FILE: vectorstores/cloudsql/vectorstore_container_test.go function preCheckEnvSetting (line 28) | func preCheckEnvSetting(t *testing.T) string { function setEngineWithImage (line 79) | func setEngineWithImage(t *testing.T) cloudsqlutil.PostgresEngine { function createOpenAIEmbedder (line 99) | func createOpenAIEmbedder(t *testing.T) *embeddings.EmbedderImpl { function initVectorStore (line 122) | func initVectorStore(t *testing.T) (cloudsql.VectorStore, func() error) { function TestContainerPingToDB (line 151) | func TestContainerPingToDB(t *testing.T) { function TestContainerApplyVectorIndexAndDropIndex (line 163) | func TestContainerApplyVectorIndexAndDropIndex(t *testing.T) { function TestContainerIsValidIndex (line 182) | func TestContainerIsValidIndex(t *testing.T) { function TestContainerAddDocuments (line 205) | func TestContainerAddDocuments(t *testing.T) { FILE: vectorstores/cloudsql/vectorstore_options.go constant defaultSchemaName (line 12) | defaultSchemaName = "public" constant defaultIDColumn (line 13) | defaultIDColumn = "langchain_id" constant defaultContentColumn (line 14) | defaultContentColumn = "content" constant defaultEmbeddingColumn (line 15) | defaultEmbeddingColumn = "embedding" constant defaultMetadataJSONColumn (line 16) | defaultMetadataJSONColumn = "langchain_metadata" constant defaultK (line 17) | defaultK = 4 type VectorStoreOption (line 22) | type VectorStoreOption function WithSchemaName (line 25) | func WithSchemaName(schemaName string) VectorStoreOption { function WithIDColumn (line 32) | func WithIDColumn(idColumn string) VectorStoreOption { function WithMetadataJSONColumn (line 39) | func WithMetadataJSONColumn(metadataJSONColumn string) VectorStoreOption { function WithContentColumn (line 46) | func WithContentColumn(contentColumn string) VectorStoreOption { function WithEmbeddingColumn (line 53) | func WithEmbeddingColumn(embeddingColumn string) VectorStoreOption { function WithMetadataColumns (line 60) | func WithMetadataColumns(metadataColumns []string) VectorStoreOption { function WithK (line 67) | func WithK(k int) VectorStoreOption { function WithDistanceStrategy (line 74) | func WithDistanceStrategy(distanceStrategy distanceStrategy) VectorStore... function applyCloudSQLVectorStoreOptions (line 82) | func applyCloudSQLVectorStoreOptions(engine cloudsqlutil.PostgresEngine, function applyOpts (line 119) | func applyOpts(options ...vectorstores.Option) vectorstores.Options { FILE: vectorstores/cloudsql/vectorstore_test.go type EnvVariables (line 17) | type EnvVariables struct function getEnvVariables (line 28) | func getEnvVariables(t *testing.T) EnvVariables { function setEngine (line 88) | func setEngine(t *testing.T, envVariables EnvVariables) cloudsqlutil.Pos... function vectorStore (line 104) | func vectorStore(t *testing.T, envVariables EnvVariables) (cloudsql.Vect... function TestApplyVectorIndexAndDropIndex (line 135) | func TestApplyVectorIndexAndDropIndex(t *testing.T) { function TestIsValidIndex (line 155) | func TestIsValidIndex(t *testing.T) { function TestAddDocuments (line 181) | func TestAddDocuments(t *testing.T) { FILE: vectorstores/dolt/dolt.go type DB (line 29) | type DB interface type CloseNoErr (line 37) | type CloseNoErr interface type Store (line 42) | type Store struct method Close (line 80) | func (s Store) Close() error { method init (line 90) | func (s *Store) init(ctx context.Context) error { method createCollectionTableIfNotExists (line 114) | func (s Store) createCollectionTableIfNotExists(ctx context.Context, t... method createEmbeddingTableIfNotExists (line 127) | func (s Store) createEmbeddingTableIfNotExists(ctx context.Context, tx... method AddDocuments (line 190) | func (s Store) AddDocuments( method SimilaritySearch (line 272) | func (s Store) SimilaritySearch( method Search (line 368) | func (s Store) Search( method DropTables (line 423) | func (s Store) DropTables(ctx context.Context) error { method RemoveDatabase (line 433) | func (s Store) RemoveDatabase(ctx context.Context, tx *sql.Tx) error { method createOrGetDatabase (line 438) | func (s *Store) createOrGetDatabase(ctx context.Context, tx *sql.Tx) e... method getOptions (line 467) | func (s Store) getOptions(options ...vectorstores.Option) vectorstores... method getDatabaseName (line 475) | func (s Store) getDatabaseName(opts vectorstores.Options) string { method getScoreThreshold (line 482) | func (s Store) getScoreThreshold(opts vectorstores.Options) (float32, ... method getFilters (line 491) | func (s Store) getFilters(opts vectorstores.Options) (map[string]any, ... method deduplicate (line 501) | func (s Store) deduplicate( function New (line 59) | func New(ctx context.Context, opts ...Option) (Store, error) { FILE: vectorstores/dolt/dolt_test.go type testDoltServer (line 41) | type testDoltServer struct method ConnectionString (line 96) | func (di *testDoltServer) ConnectionString() string { method Start (line 101) | func (di *testDoltServer) Start() error { method IsRunning (line 192) | func (di *testDoltServer) IsRunning() bool { method Shutdown (line 196) | func (di *testDoltServer) Shutdown() error { method ErrorMessage (line 223) | func (di *testDoltServer) ErrorMessage() string { method DB (line 227) | func (di *testDoltServer) DB() (*sql.DB, error) { function newTestDoltServer (line 58) | func newTestDoltServer(t *testing.T) *testDoltServer { function mustGetDoltExec (line 68) | func mustGetDoltExec(t *testing.T) string { function getFreePort (line 234) | func getFreePort() (string, error) { function preCheckEnvSetting (line 251) | func preCheckEnvSetting(t *testing.T) string { function makeNewDatabaseName (line 275) | func makeNewDatabaseName() string { function cleanupTestArtifacts (line 279) | func cleanupTestArtifacts(ctx context.Context, t *testing.T, s dolt.Stor... function TestDoltStoreRest (line 293) | func TestDoltStoreRest(t *testing.T) { function TestDoltStoreRestWithScoreThreshold (line 334) | func TestDoltStoreRestWithScoreThreshold(t *testing.T) { function TestDoltStoreSimilarityScore (line 394) | func TestDoltStoreSimilarityScore(t *testing.T) { function TestSimilaritySearchWithInvalidScoreThreshold (line 440) | func TestSimilaritySearchWithInvalidScoreThreshold(t *testing.T) { function TestSimilaritySearchWithDifferentDimensions (line 499) | func TestSimilaritySearchWithDifferentDimensions(t *testing.T) { function TestDoltAsRetriever (line 576) | func TestDoltAsRetriever(t *testing.T) { function TestDoltAsRetrieverWithScoreThreshold (line 624) | func TestDoltAsRetrieverWithScoreThreshold(t *testing.T) { function TestDoltAsRetrieverWithMetadataFilterNotSelected (line 677) | func TestDoltAsRetrieverWithMetadataFilterNotSelected(t *testing.T) { function TestDoltAsRetrieverWithMetadataFilters (line 758) | func TestDoltAsRetrieverWithMetadataFilters(t *testing.T) { function TestDeduplicater (line 829) | func TestDeduplicater(t *testing.T) { function TestWithAllOptions (line 876) | func TestWithAllOptions(t *testing.T) { FILE: vectorstores/dolt/options.go constant DefaultDatabaseName (line 11) | DefaultDatabaseName = "langchain" constant DefaultPreDeleteDatabase (line 12) | DefaultPreDeleteDatabase = false constant DefaultEmbeddingStoreTableName (line 13) | DefaultEmbeddingStoreTableName = "langchain_dolt_embedding" constant DefaultCollectionStoreTableName (line 14) | DefaultCollectionStoreTableName = "langchain_dolt_collection" type Option (line 21) | type Option function WithEmbedder (line 24) | func WithEmbedder(e embeddings.Embedder) Option { function WithPreDeleteDatabase (line 31) | func WithPreDeleteDatabase(preDelete bool) Option { function WithDatabaseName (line 38) | func WithDatabaseName(name string) Option { function WithEmbeddingTableName (line 45) | func WithEmbeddingTableName(name string) Option { function WithCollectionTableName (line 52) | func WithCollectionTableName(name string) Option { function WithConnectionURL (line 60) | func WithConnectionURL(connectionURL string) Option { function WithDB (line 67) | func WithDB(db DB) Option { function WithDatabaseMetadata (line 74) | func WithDatabaseMetadata(metadata map[string]any) Option { function WithVectorDimensions (line 81) | func WithVectorDimensions(size int) Option { function WithCreateEmbeddingIndexAfterAddDocuments (line 88) | func WithCreateEmbeddingIndexAfterAddDocuments(createEmbeddingIndexAfter... function applyClientOptions (line 94) | func applyClientOptions(opts ...Option) (Store, error) { FILE: vectorstores/mariadb/main_test.go function TestMain (line 10) | func TestMain(m *testing.M) { FILE: vectorstores/mariadb/mariadb.go type DB (line 29) | type DB interface type CloseNoErr (line 37) | type CloseNoErr interface type Store (line 42) | type Store struct method Close (line 79) | func (s Store) Close() error { method init (line 89) | func (s *Store) init(ctx context.Context) error { method createCollectionTableIfNotExists (line 114) | func (s Store) createCollectionTableIfNotExists(ctx context.Context, t... method createEmbeddingTableIfNotExists (line 127) | func (s Store) createEmbeddingTableIfNotExists(ctx context.Context, tx... method AddDocuments (line 158) | func (s Store) AddDocuments( method SimilaritySearch (line 218) | func (s Store) SimilaritySearch( method Search (line 322) | func (s Store) Search( method DropTables (line 375) | func (s Store) DropTables(ctx context.Context) error { method RemoveDatabase (line 385) | func (s Store) RemoveDatabase(ctx context.Context, tx *sql.Tx) error { method createOrGetDatabase (line 390) | func (s *Store) createOrGetDatabase(ctx context.Context, tx *sql.Tx) e... method getOptions (line 420) | func (s Store) getOptions(options ...vectorstores.Option) vectorstores... method getDatabaseName (line 428) | func (s Store) getDatabaseName(opts vectorstores.Options) string { method getScoreThreshold (line 435) | func (s Store) getScoreThreshold(opts vectorstores.Options) (float32, ... method getFilters (line 444) | func (s Store) getFilters(opts vectorstores.Options) (map[string]any, ... method deduplicate (line 454) | func (s Store) deduplicate( function New (line 58) | func New(ctx context.Context, opts ...Option) (Store, error) { FILE: vectorstores/mariadb/mariadb_test.go function preCheckEnvSetting (line 27) | func preCheckEnvSetting(t *testing.T) string { function makeNewCollectionName (line 64) | func makeNewCollectionName() string { function cleanupTestArtifacts (line 68) | func cleanupTestArtifacts(ctx context.Context, t *testing.T, s mariadb.S... function TestMariaDBStoreRest (line 82) | func TestMariaDBStoreRest(t *testing.T) { function TestMariaDBStoreRestWithScoreThreshold (line 124) | func TestMariaDBStoreRestWithScoreThreshold(t *testing.T) { function TestMariaDBStoreSimilarityScore (line 185) | func TestMariaDBStoreSimilarityScore(t *testing.T) { function TestSimilaritySearchWithInvalidScoreThreshold (line 231) | func TestSimilaritySearchWithInvalidScoreThreshold(t *testing.T) { function TestSimilaritySearchWithDifferentDimensions (line 291) | func TestSimilaritySearchWithDifferentDimensions(t *testing.T) { function TestMariaDBAsRetriever (line 369) | func TestMariaDBAsRetriever(t *testing.T) { function TestMariaDBAsRetrieverWithScoreThreshold (line 418) | func TestMariaDBAsRetrieverWithScoreThreshold(t *testing.T) { function TestMariaDBAsRetrieverWithMetadataFilterNotSelected (line 472) | func TestMariaDBAsRetrieverWithMetadataFilterNotSelected(t *testing.T) { function TestMariaDBAsRetrieverWithMetadataFilters (line 554) | func TestMariaDBAsRetrieverWithMetadataFilters(t *testing.T) { function TestDeduplicater (line 626) | func TestDeduplicater(t *testing.T) { function TestWithAllOptions (line 674) | func TestWithAllOptions(t *testing.T) { FILE: vectorstores/mariadb/options.go constant DefaultDatabaseName (line 11) | DefaultDatabaseName = "langchain" constant DefaultPreDeleteDatabase (line 12) | DefaultPreDeleteDatabase = false constant DefaultEmbeddingStoreTableName (line 13) | DefaultEmbeddingStoreTableName = "langchain_mariadb_embedding" constant DefaultCollectionStoreTableName (line 14) | DefaultCollectionStoreTableName = "langchain_mariadb_collection" type Option (line 21) | type Option function WithEmbedder (line 24) | func WithEmbedder(e embeddings.Embedder) Option { function WithPreDeleteDatabase (line 31) | func WithPreDeleteDatabase(preDelete bool) Option { function WithDatabaseName (line 38) | func WithDatabaseName(name string) Option { function WithEmbeddingTableName (line 45) | func WithEmbeddingTableName(name string) Option { function WithCollectionTableName (line 52) | func WithCollectionTableName(name string) Option { function WithConnectionURL (line 60) | func WithConnectionURL(connectionURL string) Option { function WithDB (line 67) | func WithDB(db DB) Option { function WithDatabaseMetadata (line 74) | func WithDatabaseMetadata(metadata map[string]any) Option { function WithVectorDimensions (line 81) | func WithVectorDimensions(size int) Option { function applyClientOptions (line 87) | func applyClientOptions(opts ...Option) (Store, error) { FILE: vectorstores/milvus/main_test.go function TestMain (line 10) | func TestMain(m *testing.M) { FILE: vectorstores/milvus/milvus.go type Store (line 24) | type Store struct method init (line 83) | func (s *Store) init(ctx context.Context, dim int) error { method dropCollection (line 102) | func (s *Store) dropCollection(ctx context.Context, name string) error { method extractFields (line 106) | func (s *Store) extractFields(ctx context.Context) error { method createCollection (line 118) | func (s *Store) createCollection(ctx context.Context, dim int) error { method createIndex (line 164) | func (s *Store) createIndex(ctx context.Context) error { method createSearchParams (line 172) | func (s *Store) createSearchParams(ctx context.Context) error { method getIndex (line 179) | func (s *Store) getIndex(ctx context.Context) error { method load (line 188) | func (s *Store) load(ctx context.Context) error { method AddDocuments (line 202) | func (s Store) AddDocuments(ctx context.Context, docs []schema.Document, method getSearchFields (line 244) | func (s *Store) getSearchFields() []string { method getOptions (line 255) | func (s Store) getOptions(options ...vectorstores.Option) vectorstores... method convertResultToDocument (line 263) | func (s Store) convertResultToDocument(searchResult []client.SearchRes... method SimilaritySearch (line 301) | func (s Store) SimilaritySearch(ctx context.Context, query string, num... method getFilters (line 347) | func (s Store) getFilters(opts vectorstores.Options) (string, error) { function New (line 60) | func New(ctx context.Context, config client.Config, opts ...Option) (Sto... FILE: vectorstores/milvus/milvus_test.go function createOpenAIEmbedder (line 26) | func createOpenAIEmbedder(t *testing.T) (llms.Model, *embeddings.Embedde... function getNewStore (line 50) | func getNewStore(t *testing.T, opts ...Option) (Store, error) { function TestMilvusConnection (line 92) | func TestMilvusConnection(t *testing.T) { FILE: vectorstores/milvus/options.go constant _defaultCollectionName (line 12) | _defaultCollectionName = "LangChainGoCollection" constant _defaultConsistencyLevel (line 13) | _defaultConsistencyLevel = entity.ClSession constant _defaultPrimaryField (line 14) | _defaultPrimaryField = "pk" constant _defaultTextField (line 15) | _defaultTextField = "text" constant _defaultMetaField (line 16) | _defaultMetaField = "meta" constant _defaultVectorField (line 17) | _defaultVectorField = "vector" constant _defaultMaxLength (line 18) | _defaultMaxLength = 65535 constant _defaultEF (line 19) | _defaultEF = 10 type Option (line 26) | type Option function WithPartitionName (line 29) | func WithPartitionName(name string) Option { function WithCollectionName (line 36) | func WithCollectionName(name string) Option { function WithEmbedder (line 43) | func WithEmbedder(embedder embeddings.Embedder) Option { function WithTextField (line 50) | func WithTextField(str string) Option { function WithMetaField (line 58) | func WithMetaField(str string) Option { function WithMaxTextLength (line 65) | func WithMaxTextLength(num int) Option { function WithPrimaryField (line 72) | func WithPrimaryField(str string) Option { function WithVectorField (line 79) | func WithVectorField(str string) Option { function WithConsistencyLevel (line 86) | func WithConsistencyLevel(level entity.ConsistencyLevel) Option { function WithDropOld (line 93) | func WithDropOld() Option { function WithIndex (line 100) | func WithIndex(idx entity.Index) Option { function WithShards (line 107) | func WithShards(num int32) Option { function WithEF (line 114) | func WithEF(ef int) Option { function WithSearchParameters (line 121) | func WithSearchParameters(sp entity.SearchParam) Option { function WithMetricType (line 128) | func WithMetricType(metricType entity.MetricType) Option { function WithSkipFlushOnWrite (line 135) | func WithSkipFlushOnWrite() Option { function applyClientOptions (line 141) | func applyClientOptions(opts ...Option) (Store, error) { FILE: vectorstores/milvus/v2/example_migration.go function main (line 32) | func main() { function demonstrateBasicMigration (line 65) | func demonstrateBasicMigration(ctx context.Context, embedder *embeddings... function demonstrateIndexMigration (line 102) | func demonstrateIndexMigration(ctx context.Context, embedder *embeddings... function demonstrateSearchParamMigration (line 139) | func demonstrateSearchParamMigration(ctx context.Context, embedder *embe... function demonstrateCompatibilityLayer (line 175) | func demonstrateCompatibilityLayer(ctx context.Context, embedder *embedd... function exampleV1Usage (line 194) | func exampleV1Usage(ctx context.Context, embedder *embeddings.EmbedderIm... function exampleV2Usage (line 224) | func exampleV2Usage(ctx context.Context, embedder *embeddings.EmbedderIm... function exampleMixedUsage (line 251) | func exampleMixedUsage(ctx context.Context, embedder *embeddings.Embedde... FILE: vectorstores/milvus/v2/milvus.go type Store (line 22) | type Store struct method init (line 91) | func (s *Store) init(ctx context.Context, dim int) error { method dropCollection (line 110) | func (s *Store) dropCollection(ctx context.Context, name string) error { method extractFields (line 115) | func (s *Store) extractFields(ctx context.Context) error { method createCollection (line 128) | func (s *Store) createCollection(ctx context.Context, dim int) error { method createIndex (line 176) | func (s *Store) createIndex(ctx context.Context) error { method createSearchParams (line 186) | func (s *Store) createSearchParams(ctx context.Context) error { method getIndex (line 193) | func (s *Store) getIndex(ctx context.Context) error { method load (line 209) | func (s *Store) load(ctx context.Context) error { method AddDocuments (line 224) | func (s Store) AddDocuments(ctx context.Context, docs []schema.Document, method getSearchFields (line 274) | func (s *Store) getSearchFields() []string { method getOptions (line 285) | func (s Store) getOptions(options ...vectorstores.Option) vectorstores... method convertResultToDocument (line 293) | func (s Store) convertResultToDocument(searchResults []milvusclient.Re... method SimilaritySearch (line 335) | func (s Store) SimilaritySearch(ctx context.Context, query string, num... method getFilters (line 376) | func (s Store) getFilters(opts vectorstores.Options) (string, error) { function New (line 58) | func New(ctx context.Context, config interface{}, opts ...Option) (Store... FILE: vectorstores/milvus/v2/milvus_test.go function createOpenAIEmbedder (line 29) | func createOpenAIEmbedder(t *testing.T) (llms.Model, *embeddings.Embedde... function getTestStore (line 43) | func getTestStore(t *testing.T, ctx context.Context, e *embeddings.Embed... function TestV2ConfigCompatibility (line 91) | func TestV2ConfigCompatibility(t *testing.T) { function TestV1ConfigCompatibility (line 100) | func TestV1ConfigCompatibility(t *testing.T) { function TestV1IndexCompatibility (line 109) | func TestV1IndexCompatibility(t *testing.T) { function TestOptionFunctionsCompatibility (line 126) | func TestOptionFunctionsCompatibility(t *testing.T) { function TestAddDocuments (line 163) | func TestAddDocuments(t *testing.T) { function TestSimilaritySearch (line 179) | func TestSimilaritySearch(t *testing.T) { function TestVectorStoreInterface (line 202) | func TestVectorStoreInterface(t *testing.T) { function TestConfigAdapterToV2Config (line 213) | func TestConfigAdapterToV2Config(t *testing.T) { FILE: vectorstores/milvus/v2/options.go constant _defaultCollectionName (line 17) | _defaultCollectionName = "LangChainGoCollection" constant _defaultConsistencyLevel (line 18) | _defaultConsistencyLevel = entity.ClSession constant _defaultPrimaryField (line 19) | _defaultPrimaryField = "pk" constant _defaultTextField (line 20) | _defaultTextField = "text" constant _defaultMetaField (line 21) | _defaultMetaField = "meta" constant _defaultVectorField (line 22) | _defaultVectorField = "vector" constant _defaultMaxLength (line 23) | _defaultMaxLength = 65535 constant _defaultEF (line 24) | _defaultEF = 10 type Option (line 31) | type Option type ConfigAdapter (line 34) | type ConfigAdapter struct method ToV2Config (line 37) | func (ca ConfigAdapter) ToV2Config(config interface{}) (milvusclient.C... function WithPartitionName (line 59) | func WithPartitionName(name string) Option { function WithCollectionName (line 66) | func WithCollectionName(name string) Option { function WithEmbedder (line 73) | func WithEmbedder(embedder embeddings.Embedder) Option { function WithTextField (line 80) | func WithTextField(str string) Option { function WithMetaField (line 88) | func WithMetaField(str string) Option { function WithMaxTextLength (line 95) | func WithMaxTextLength(num int) Option { function WithPrimaryField (line 102) | func WithPrimaryField(str string) Option { function WithVectorField (line 109) | func WithVectorField(str string) Option { function WithConsistencyLevel (line 116) | func WithConsistencyLevel(level entity.ConsistencyLevel) Option { function WithConsistencyLevelV1 (line 123) | func WithConsistencyLevelV1(level oldentity.ConsistencyLevel) Option { function WithDropOld (line 131) | func WithDropOld() Option { function WithIndex (line 138) | func WithIndex(idx index.Index) Option { function WithIndexV1 (line 145) | func WithIndexV1(idx oldentity.Index) Option { function WithShards (line 153) | func WithShards(num int32) Option { function WithEF (line 160) | func WithEF(ef int) Option { function WithSearchParameters (line 167) | func WithSearchParameters(sp map[string]interface{}) Option { function WithSearchParametersV1 (line 174) | func WithSearchParametersV1(sp oldentity.SearchParam) Option { function WithMetricType (line 182) | func WithMetricType(metricType entity.MetricType) Option { function WithMetricTypeV1 (line 189) | func WithMetricTypeV1(metricType oldentity.MetricType) Option { function WithSkipFlushOnWrite (line 197) | func WithSkipFlushOnWrite() Option { function convertV1IndexToV2 (line 205) | func convertV1IndexToV2(v1Index oldentity.Index) index.Index { function convertV1SearchParamToV2 (line 248) | func convertV1SearchParamToV2(v1Param oldentity.SearchParam) map[string]... function applyClientOptions (line 260) | func applyClientOptions(opts ...Option) (Store, error) { FILE: vectorstores/mongovector/mock_embedder.go type mockEmbedder (line 14) | type mockEmbedder struct method mockDocuments (line 34) | func (emb *mockEmbedder) mockDocuments(doc ...schema.Document) { method existingVectors (line 42) | func (emb *mockEmbedder) existingVectors() [][]float32 { method EmbedDocuments (line 53) | func (emb *mockEmbedder) EmbedDocuments(_ context.Context, texts []str... method EmbedQuery (line 84) | func (emb *mockEmbedder) EmbedQuery(context.Context, string) ([]float3... function newMockEmbedder (line 22) | func newMockEmbedder(dim int) *mockEmbedder { function flushMockDocuments (line 89) | func flushMockDocuments(ctx context.Context, store Store, emb *mockEmbed... function newNormalizedFloat32 (line 102) | func newNormalizedFloat32() (float32, error) { function dotProduct (line 112) | func dotProduct(v1, v2 []float32) float32 { function linearlyIndependent (line 123) | func linearlyIndependent(v1, v2 []float32) bool { function newNormalizedVector (line 152) | func newNormalizedVector(dim int) []float32 { function newOrthogonalVector (line 163) | func newOrthogonalVector(dim int, basis ...[]float32) []float32 { function dotProductNormFn (line 179) | func dotProductNormFn(score float32, qvector, basis []float32) []float32 { FILE: vectorstores/mongovector/mock_llm.go type mockLLM (line 11) | type mockLLM struct method CreateEmbedding (line 20) | func (emb *mockLLM) CreateEmbedding(_ context.Context, texts []string)... FILE: vectorstores/mongovector/mongovector.go constant defaultIndex (line 16) | defaultIndex = "vector_index" constant pageContentName (line 17) | pageContentName = "pageContent" constant defaultPath (line 18) | defaultPath = "plot_embedding" constant metadataName (line 19) | metadataName = "metadata" constant scoreName (line 20) | scoreName = "score" constant defaultNumCandidatesScalar (line 21) | defaultNumCandidatesScalar = 10 type Store (line 32) | type Store struct method AddDocuments (line 81) | func (store *Store) AddDocuments( method SimilaritySearch (line 181) | func (store *Store) SimilaritySearch( function New (line 43) | func New(coll *mongo.Collection, embedder embeddings.Embedder, opts ...O... function mergeAddOpts (line 58) | func mergeAddOpts(store *Store, opts ...vectorstores.Option) (*vectorsto... function mergeSearchOpts (line 135) | func mergeSearchOpts(store *Store, opts ...vectorstores.Option) (*vector... FILE: vectorstores/mongovector/mongovector_test.go constant testIndexDP1536 (line 39) | testIndexDP1536 = "vector_index_dotProduct_1536" constant testIndexDP1536WithFilter (line 40) | testIndexDP1536WithFilter = "vector_index_dotProduct_1536_w_filters" constant testIndexDP3 (line 41) | testIndexDP3 = "vector_index_dotProduct_3" constant testIndexSize1536 (line 42) | testIndexSize1536 = 1536 constant testIndexSize3 (line 43) | testIndexSize3 = 3 type testEnv (line 57) | type testEnv struct function TestMain (line 66) | func TestMain(m *testing.M) { function cleanName (line 88) | func cleanName(name string) string { function setupTestEnv (line 107) | func setupTestEnv(t *testing.T, httpClient ...*http.Client) *testEnv { function createTestStore (line 182) | func createTestStore(t *testing.T, env *testEnv, dim int, index string) ... function createIndexForCollection (line 238) | func createIndexForCollection(t *testing.T, ctx context.Context, coll *m... function TestNew (line 310) | func TestNew(t *testing.T) { function TestStore_AddDocuments (line 369) | func TestStore_AddDocuments(t *testing.T) { type simSearchTest (line 446) | type simSearchTest struct function runSimilaritySearchTest (line 458) | func runSimilaritySearchTest(t *testing.T, store Store, test simSearchTe... function setupTestEmbedder (line 513) | func setupTestEmbedder(t *testing.T, store Store, test simSearchTest) (*... function verifySearchResults (line 544) | func verifySearchResults(raw []schema.Document, want []schema.Document) ... function TestStore_SimilaritySearch_ExactQuery (line 578) | func TestStore_SimilaritySearch_ExactQuery(t *testing.T) { function TestStore_SimilaritySearch_NonExactQuery (line 639) | func TestStore_SimilaritySearch_NonExactQuery(t *testing.T) { type vectorField (line 782) | type vectorField struct function createVectorSearchIndex (line 792) | func createVectorSearchIndex( function searchIndexExists (line 836) | func searchIndexExists(ctx context.Context, coll *mongo.Collection, idx ... function waitForSearchService (line 859) | func waitForSearchService(t *testing.T, ctx context.Context, coll *mongo... FILE: vectorstores/mongovector/option.go type Option (line 4) | type Option function WithIndex (line 14) | func WithIndex(index string) Option { function WithPath (line 22) | func WithPath(path string) Option { function WithNumCandidates (line 31) | func WithNumCandidates(numCandidates int) Option { FILE: vectorstores/opensearch/document_indexing.go type document (line 12) | type document struct method documentIndexing (line 18) | func (s *Store) documentIndexing( FILE: vectorstores/opensearch/index_create.go type IndexOption (line 13) | type IndexOption constant engine (line 16) | engine = "nmslib" constant vectorField (line 17) | vectorField = "contentVector" constant spaceType (line 18) | spaceType = "l2" constant vectorDimension (line 19) | vectorDimension = 1536 constant hnswParametersM (line 20) | hnswParametersM = 16 constant hnswParametersEfConstruction (line 21) | hnswParametersEfConstruction = 512 constant hnswParametersEfSearch (line 22) | hnswParametersEfSearch = 512 method CreateIndex (line 26) | func (s *Store) CreateIndex( FILE: vectorstores/opensearch/index_delete.go method DeleteIndex (line 10) | func (s *Store) DeleteIndex( FILE: vectorstores/opensearch/main_test.go function TestMain (line 10) | func TestMain(m *testing.M) { FILE: vectorstores/opensearch/opensearch.go type Store (line 20) | type Store struct method AddDocuments (line 55) | func (s Store) AddDocuments( method SimilaritySearch (line 91) | func (s Store) SimilaritySearch( function New (line 39) | func New(client *opensearchgo.Client, opts ...Option) (Store, error) { FILE: vectorstores/opensearch/opensearch_test.go function getEnvVariables (line 27) | func getEnvVariables(t *testing.T) (string, string, string) { function setIndex (line 86) | func setIndex(t *testing.T, storer opensearch.Store, indexName string) { function removeIndex (line 95) | func removeIndex(t *testing.T, storer opensearch.Store, indexName string) { function createOpenAIEmbedder (line 105) | func createOpenAIEmbedder(t *testing.T, httpClient *http.Client) *embedd... function createOpenAILLMAndEmbedder (line 141) | func createOpenAILLMAndEmbedder(t *testing.T, httpClient *http.Client, r... function setOpensearchClient (line 187) | func setOpensearchClient( function TestOpensearchStoreRest (line 205) | func TestOpensearchStoreRest(t *testing.T) { function TestOpensearchStoreRestWithScoreThreshold (line 240) | func TestOpensearchStoreRestWithScoreThreshold(t *testing.T) { function TestOpensearchAsRetriever (line 287) | func TestOpensearchAsRetriever(t *testing.T) { function TestOpensearchAsRetrieverWithScoreThreshold (line 336) | func TestOpensearchAsRetrieverWithScoreThreshold(t *testing.T) { FILE: vectorstores/opensearch/options.go method getOptions (line 21) | func (s Store) getOptions(options ...vectorstores.Option) vectorstores.O... type Option (line 30) | type Option function WithEmbedder (line 35) | func WithEmbedder(e embeddings.Embedder) Option { function applyClientOptions (line 41) | func applyClientOptions(s *Store, opts ...Option) error { FILE: vectorstores/opensearch/types.go type searchResults (line 3) | type searchResults struct type searchResultsHit (line 22) | type searchResultsHit struct FILE: vectorstores/options.go type Option (line 11) | type Option type Options (line 14) | type Options struct function WithNameSpace (line 23) | func WithNameSpace(nameSpace string) Option { function WithScoreThreshold (line 29) | func WithScoreThreshold(scoreThreshold float32) Option { function WithFilters (line 39) | func WithFilters(filters any) Option { function WithEmbedder (line 48) | func WithEmbedder(embedder embeddings.Embedder) Option { function WithDeduplicater (line 57) | func WithDeduplicater(fn func(ctx context.Context, doc schema.Document) ... FILE: vectorstores/pgvector/main_test.go function TestMain (line 10) | func TestMain(m *testing.M) { FILE: vectorstores/pgvector/options.go constant DefaultCollectionName (line 11) | DefaultCollectionName = "langchain" constant DefaultPreDeleteCollection (line 12) | DefaultPreDeleteCollection = false constant DefaultEmbeddingStoreTableName (line 13) | DefaultEmbeddingStoreTableName = "langchain_pg_embedding" constant DefaultCollectionStoreTableName (line 14) | DefaultCollectionStoreTableName = "langchain_pg_collection" type Option (line 21) | type Option function WithEmbedder (line 24) | func WithEmbedder(e embeddings.Embedder) Option { function WithPreDeleteCollection (line 31) | func WithPreDeleteCollection(preDelete bool) Option { function WithCollectionName (line 38) | func WithCollectionName(name string) Option { function WithEmbeddingTableName (line 45) | func WithEmbeddingTableName(name string) Option { function WithCollectionTableName (line 52) | func WithCollectionTableName(name string) Option { function WithConnectionURL (line 60) | func WithConnectionURL(connectionURL string) Option { function WithConn (line 69) | func WithConn(conn PGXConn) Option { function WithCollectionMetadata (line 76) | func WithCollectionMetadata(metadata map[string]any) Option { function WithVectorDimensions (line 83) | func WithVectorDimensions(size int) Option { function WithHNSWIndex (line 95) | func WithHNSWIndex(m int, efConstruction int, distanceFunction string) O... function applyClientOptions (line 105) | func applyClientOptions(opts ...Option) (Store, error) { FILE: vectorstores/pgvector/pgvector.go constant pgLockIDEmbeddingTable (line 22) | pgLockIDEmbeddingTable = 1573678846307946494 constant pgLockIDCollectionTable (line 25) | pgLockIDCollectionTable = 1573678846307946495 constant pgLockIDExtension (line 29) | pgLockIDExtension = 1573678846307946496 type PGXConn (line 40) | type PGXConn interface type CloseNoErr (line 49) | type CloseNoErr interface type Store (line 54) | type Store struct method Close (line 98) | func (s Store) Close() error { method init (line 108) | func (s *Store) init(ctx context.Context) error { method createVectorExtensionIfNotExists (line 135) | func (s Store) createVectorExtensionIfNotExists(ctx context.Context, t... method createCollectionTableIfNotExists (line 152) | func (s Store) createCollectionTableIfNotExists(ctx context.Context, t... method createEmbeddingTableIfNotExists (line 175) | func (s Store) createEmbeddingTableIfNotExists(ctx context.Context, tx... method AddDocuments (line 228) | func (s Store) AddDocuments( method SimilaritySearch (line 272) | func (s Store) SimilaritySearch( method Search (line 353) | func (s Store) Search( method DropTables (line 398) | func (s Store) DropTables(ctx context.Context) error { method RemoveCollection (line 408) | func (s Store) RemoveCollection(ctx context.Context, tx pgx.Tx) error { method createOrGetCollection (line 413) | func (s *Store) createOrGetCollection(ctx context.Context, tx pgx.Tx) ... method getOptions (line 426) | func (s Store) getOptions(options ...vectorstores.Option) vectorstores... method getNameSpace (line 434) | func (s Store) getNameSpace(opts vectorstores.Options) string { method getScoreThreshold (line 441) | func (s Store) getScoreThreshold(opts vectorstores.Options) (float32, ... method getFilters (line 450) | func (s Store) getFilters(opts vectorstores.Options) (map[string]any, ... method deduplicate (line 460) | func (s Store) deduplicate( type HNSWIndex (line 68) | type HNSWIndex struct function New (line 77) | func New(ctx context.Context, opts ...Option) (Store, error) { FILE: vectorstores/pgvector/pgvector_test.go function createOpenAIEmbedder (line 31) | func createOpenAIEmbedder(t *testing.T) *embeddings.EmbedderImpl { function createOpenAILLMAndEmbedder (line 54) | func createOpenAILLMAndEmbedder(t *testing.T) (llm *openai.LLM, e *embed... function preCheckEnvSetting (line 87) | func preCheckEnvSetting(t *testing.T) string { function makeNewCollectionName (line 136) | func makeNewCollectionName() string { function cleanupTestArtifacts (line 140) | func cleanupTestArtifacts(ctx context.Context, t *testing.T, s pgvector.... function TestPgvectorStoreRest (line 154) | func TestPgvectorStoreRest(t *testing.T) { function TestPgvectorStoreRestWithScoreThreshold (line 199) | func TestPgvectorStoreRestWithScoreThreshold(t *testing.T) { function TestPgvectorStoreSimilarityScore (line 263) | func TestPgvectorStoreSimilarityScore(t *testing.T) { function TestSimilaritySearchWithInvalidScoreThreshold (line 312) | func TestSimilaritySearchWithInvalidScoreThreshold(t *testing.T) { function TestSimilaritySearchWithDifferentDimensions (line 375) | func TestSimilaritySearchWithDifferentDimensions(t *testing.T) { function TestPgvectorAsRetriever (line 466) | func TestPgvectorAsRetriever(t *testing.T) { function TestPgvectorAsRetrieverWithScoreThreshold (line 518) | func TestPgvectorAsRetrieverWithScoreThreshold(t *testing.T) { function TestPgvectorAsRetrieverWithMetadataFilterNotSelected (line 575) | func TestPgvectorAsRetrieverWithMetadataFilterNotSelected(t *testing.T) { function TestPgvectorAsRetrieverWithMetadataFilters (line 660) | func TestPgvectorAsRetrieverWithMetadataFilters(t *testing.T) { function TestDeduplicater (line 735) | func TestDeduplicater(t *testing.T) { function TestWithAllOptions (line 786) | func TestWithAllOptions(t *testing.T) { FILE: vectorstores/pinecone/options.go constant _pineconeEnvVrName (line 13) | _pineconeEnvVrName = "PINECONE_API_KEY" constant _defaultTextKey (line 14) | _defaultTextKey = "text" type Option (line 21) | type Option function WithHost (line 24) | func WithHost(host string) Option { function WithEmbedder (line 31) | func WithEmbedder(e embeddings.Embedder) Option { function WithAPIKey (line 40) | func WithAPIKey(apiKey string) Option { function WithTextKey (line 48) | func WithTextKey(textKey string) Option { function WithNameSpace (line 56) | func WithNameSpace(nameSpace string) Option { function applyClientOptions (line 62) | func applyClientOptions(opts ...Option) (Store, error) { FILE: vectorstores/pinecone/pinecone.go type Store (line 33) | type Store struct method AddDocuments (line 60) | func (s Store) AddDocuments(ctx context.Context, method SimilaritySearch (line 130) | func (s Store) SimilaritySearch(ctx context.Context, query string, num... method getDocumentsFromMatches (line 180) | func (s Store) getDocumentsFromMatches(queryResult *pinecone.QueryVect... method getNameSpace (line 206) | func (s Store) getNameSpace(opts vectorstores.Options) string { method getScoreThreshold (line 213) | func (s Store) getScoreThreshold(opts vectorstores.Options) (float32, ... method getFilters (line 220) | func (s Store) getFilters(opts vectorstores.Options) any { method getOptions (line 227) | func (s Store) getOptions(options ...vectorstores.Option) vectorstores... method createProtoStructFilter (line 235) | func (s Store) createProtoStructFilter(filter any) (*structpb.Struct, ... function New (line 44) | func New(opts ...Option) (Store, error) { FILE: vectorstores/pinecone/pinecone_test.go function getValues (line 27) | func getValues(t *testing.T) (string, string) { function createOpenAIEmbedder (line 42) | func createOpenAIEmbedder(t *testing.T) *embeddings.EmbedderImpl { function createOpenAILLMAndEmbedder (line 65) | func createOpenAILLMAndEmbedder(t *testing.T) (*openai.LLM, *embeddings.... function TestPineconeStoreRest (line 93) | func TestPineconeStoreRest(t *testing.T) { function TestPineconeStoreRestWithScoreThreshold (line 121) | func TestPineconeStoreRestWithScoreThreshold(t *testing.T) { function TestSimilaritySearchWithInvalidScoreThreshold (line 165) | func TestSimilaritySearchWithInvalidScoreThreshold(t *testing.T) { function TestPineconeAsRetriever (line 205) | func TestPineconeAsRetriever(t *testing.T) { function TestPineconeAsRetrieverWithScoreThreshold (line 244) | func TestPineconeAsRetrieverWithScoreThreshold(t *testing.T) { function TestPineconeAsRetrieverWithMetadataFilterEqualsClause (line 289) | func TestPineconeAsRetrieverWithMetadataFilterEqualsClause(t *testing.T) { function TestPineconeAsRetrieverWithMetadataFilterInClause (line 362) | func TestPineconeAsRetrieverWithMetadataFilterInClause(t *testing.T) { function TestPineconeAsRetrieverWithMetadataFilterNotSelected (line 436) | func TestPineconeAsRetrieverWithMetadataFilterNotSelected(t *testing.T) { function TestPineconeAsRetrieverWithMetadataFilters (line 508) | func TestPineconeAsRetrieverWithMetadataFilters(t *testing.T) { FILE: vectorstores/pinecone/pinecone_unit_test.go type testEmbedder (line 13) | type testEmbedder struct method EmbedDocuments (line 17) | func (m *testEmbedder) EmbedDocuments(ctx context.Context, docs []stri... method EmbedQuery (line 28) | func (m *testEmbedder) EmbedQuery(ctx context.Context, query string) (... function TestApplyClientOptions (line 39) | func TestApplyClientOptions(t *testing.T) { //nolint:funlen // comprehen... function TestGetNameSpace (line 184) | func TestGetNameSpace(t *testing.T) { function TestGetScoreThreshold (line 232) | func TestGetScoreThreshold(t *testing.T) { function TestGetFilters (line 286) | func TestGetFilters(t *testing.T) { function TestGetOptions (line 330) | func TestGetOptions(t *testing.T) { function TestWithOptions (line 394) | func TestWithOptions(t *testing.T) { function TestNew (line 438) | func TestNew(t *testing.T) { function TestStoreImplementsVectorStore (line 515) | func TestStoreImplementsVectorStore(t *testing.T) { function TestEdgeCases (line 522) | func TestEdgeCases(t *testing.T) { function TestEnvironmentVariableHandling (line 575) | func TestEnvironmentVariableHandling(t *testing.T) { function TestCreateProtoStructFilter (line 641) | func TestCreateProtoStructFilter(t *testing.T) { function TestErrorConstants (line 700) | func TestErrorConstants(t *testing.T) { function TestDocumentProcessing (line 717) | func TestDocumentProcessing(t *testing.T) { FILE: vectorstores/qdrant/options.go constant defaultContentKey (line 12) | defaultContentKey = "content" type Option (line 19) | type Option function WithCollectionName (line 22) | func WithCollectionName(name string) Option { function WithURL (line 30) | func WithURL(qdrantURL url.URL) Option { function WithEmbedder (line 38) | func WithEmbedder(embedder embeddings.Embedder) Option { function WithAPIKey (line 45) | func WithAPIKey(apiKey string) Option { function WithContentKey (line 53) | func WithContentKey(contentKey string) Option { function applyClientOptions (line 59) | func applyClientOptions(opts ...Option) (Store, error) { FILE: vectorstores/qdrant/qdrant.go type Store (line 13) | type Store struct method AddDocuments (line 31) | func (s Store) AddDocuments(ctx context.Context, method SimilaritySearch (line 68) | func (s Store) SimilaritySearch(ctx context.Context, method getScoreThreshold (line 91) | func (s Store) getScoreThreshold(opts vectorstores.Options) (float32, ... method getFilters (line 98) | func (s Store) getFilters(opts vectorstores.Options) any { method getOptions (line 106) | func (s Store) getOptions(options ...vectorstores.Option) vectorstores... function New (line 23) | func New(opts ...Option) (Store, error) { FILE: vectorstores/qdrant/qdrant_test.go type MockEmbedder (line 20) | type MockEmbedder struct method EmbedDocuments (line 22) | func (m MockEmbedder) EmbedDocuments(_ context.Context, texts []string... method EmbedQuery (line 31) | func (m MockEmbedder) EmbedQuery(_ context.Context, text string) ([]fl... function TestStore_AddDocuments (line 36) | func TestStore_AddDocuments(t *testing.T) { function TestStore_SimilaritySearch (line 95) | func TestStore_SimilaritySearch(t *testing.T) { function TestStore_SimilaritySearchWithScore (line 138) | func TestStore_SimilaritySearchWithScore(t *testing.T) { function TestDoRequest (line 183) | func TestDoRequest(t *testing.T) { FILE: vectorstores/qdrant/qdrant_unit_test.go type testEmbedder (line 21) | type testEmbedder struct method EmbedDocuments (line 25) | func (m *testEmbedder) EmbedDocuments(ctx context.Context, texts []str... method EmbedQuery (line 36) | func (m *testEmbedder) EmbedQuery(ctx context.Context, text string) ([... function TestNew (line 47) | func TestNew(t *testing.T) { function TestStore_AddDocuments_Unit (line 120) | func TestStore_AddDocuments_Unit(t *testing.T) { //nolint:funlen // comp... function TestStore_SimilaritySearch_Unit (line 261) | func TestStore_SimilaritySearch_Unit(t *testing.T) { //nolint:funlen // ... function TestOptions (line 483) | func TestOptions(t *testing.T) { function TestGetScoreThreshold (line 527) | func TestGetScoreThreshold(t *testing.T) { function TestGetFilters (line 581) | func TestGetFilters(t *testing.T) { function TestNewAPIError (line 637) | func TestNewAPIError(t *testing.T) { function TestStoreImplementsVectorStore (line 676) | func TestStoreImplementsVectorStore(t *testing.T) { function TestEdgeCases (line 683) | func TestEdgeCases(t *testing.T) { //nolint:funlen // comprehensive test function TestDoRequest_Unit (line 783) | func TestDoRequest_Unit(t *testing.T) { //nolint:funlen // comprehensive... FILE: vectorstores/qdrant/rest.go method upsertPoints (line 18) | func (s Store) upsertPoints( method searchPoints (line 60) | func (s Store) searchPoints( function DoRequest (line 126) | func DoRequest(ctx context.Context, function newAPIError (line 154) | func newAPIError(task string, body io.ReadCloser) error { FILE: vectorstores/qdrant/schema.go type upsertBatch (line 8) | type upsertBatch struct type upsertBody (line 14) | type upsertBody struct type result (line 18) | type result struct type searchResponse (line 23) | type searchResponse struct type searchBody (line 27) | type searchBody struct FILE: vectorstores/redisvector/index_schema.go type IndexType (line 22) | type IndexType type DistanceMetric (line 23) | type DistanceMetric type VectorAlgorithm (line 24) | type VectorAlgorithm type VectorDataType (line 25) | type VectorDataType type PhoneticMatcherType (line 26) | type PhoneticMatcherType constant JSONIndexType (line 31) | JSONIndexType IndexType = "JSON" constant HASHIndexType (line 32) | HASHIndexType IndexType = "HASH" constant L2DistanceMetric (line 35) | L2DistanceMetric DistanceMetric = "L2" constant CosineDistanceMetric (line 36) | CosineDistanceMetric DistanceMetric = "COSINE" constant IPDistanceMetric (line 37) | IPDistanceMetric DistanceMetric = "IP" constant FlatVectorAlgorithm (line 40) | FlatVectorAlgorithm VectorAlgorithm = "FLAT" constant HNSWVectorAlgorithm (line 41) | HNSWVectorAlgorithm VectorAlgorithm = "HNSW" constant FLOAT32VectorDataType (line 44) | FLOAT32VectorDataType VectorDataType = "FLOAT32" constant FLOAT64VectorDataType (line 45) | FLOAT64VectorDataType VectorDataType = "FLOAT64" constant PhoneticDoubleMetaphoneEnglish (line 48) | PhoneticDoubleMetaphoneEnglish PhoneticMatcherType = "dm:en" constant PhoneticDoubleMetaphoneFrench (line 49) | PhoneticDoubleMetaphoneFrench PhoneticMatcherType = "dm:fr" constant PhoneticDoubleMetaphonePortuguese (line 50) | PhoneticDoubleMetaphonePortuguese PhoneticMatcherType = "dm:pt" constant PhoneticDoubleMetaphoneSpanish (line 51) | PhoneticDoubleMetaphoneSpanish PhoneticMatcherType = "dm:es" type RedisIndexSchemaField (line 54) | type RedisIndexSchemaField interface type TagField (line 59) | type TagField struct method AsCommand (line 68) | func (f TagField) AsCommand() []string { type TextField (line 93) | type TextField struct method AsCommand (line 104) | func (f TextField) AsCommand() []string { type NumericField (line 132) | type NumericField struct method AsCommand (line 139) | func (f NumericField) AsCommand() []string { type VectorField (line 155) | type VectorField struct method AsCommand (line 179) | func (f VectorField) AsCommand() []string { type IndexSchema (line 237) | type IndexSchema struct method MetadataKeys (line 246) | func (s *IndexSchema) MetadataKeys() map[string]any { method AsCommand (line 265) | func (s *IndexSchema) AsCommand() []string { type schemaGenerator (line 282) | type schemaGenerator struct method generate (line 289) | func (s *schemaGenerator) generate() (*IndexSchema, error) { function generateSchemaWithMetadata (line 332) | func generateSchemaWithMetadata(data map[string]any) (*IndexSchema, erro... type RedisIndex (line 381) | type RedisIndex struct method AsCommand (line 397) | func (i *RedisIndex) AsCommand() ([]string, error) { function NewIndex (line 388) | func NewIndex(name string, prefix []string, indexType IndexType, schema ... FILE: vectorstores/redisvector/index_schema_test.go function TestGenerateSchema (line 12) | func TestGenerateSchema(t *testing.T) { function TestSchemaAsCommand (line 70) | func TestSchemaAsCommand(t *testing.T) { function TestIndexSearchAsCommand (line 143) | func TestIndexSearchAsCommand(t *testing.T) { FILE: vectorstores/redisvector/index_search.go type IndexVectorSearch (line 12) | type IndexVectorSearch struct method AsCommand (line 77) | func (s IndexVectorSearch) AsCommand() []string { type SearchOption (line 23) | type SearchOption function NewIndexVectorSearch (line 25) | func NewIndexVectorSearch(index string, vector []float32, opts ...Search... function WithScoreThreshold (line 43) | func WithScoreThreshold(scoreThreshold float32) SearchOption { function WithPreFilters (line 51) | func WithPreFilters(preFilters string) SearchOption { function WithReturns (line 59) | func WithReturns(returns []string) SearchOption { function WithOffsetLimit (line 67) | func WithOffsetLimit(offset, limit int) SearchOption { function VectorString32 (line 146) | func VectorString32(v []float32) string { function VectorString64 (line 156) | func VectorString64(v []float64) string { FILE: vectorstores/redisvector/main_test.go function TestMain (line 10) | func TestMain(m *testing.M) { FILE: vectorstores/redisvector/options.go type RedisIndexAlgorithm (line 10) | type RedisIndexAlgorithm type Option (line 16) | type Option function WithEmbedder (line 19) | func WithEmbedder(e embeddings.Embedder) Option { function WithConnectionURL (line 32) | func WithConnectionURL(connectionURL string) Option { function WithIndexName (line 47) | func WithIndexName(name string, createIndexIfNotExists bool) Option { type SchemaFormat (line 55) | type SchemaFormat constant JSONSchemaFormat (line 58) | JSONSchemaFormat SchemaFormat = "JSON" constant YAMLSchemaFormat (line 59) | YAMLSchemaFormat SchemaFormat = "YAML" function WithIndexSchema (line 73) | func WithIndexSchema(format SchemaFormat, schemaFilePath string, schemaB... function applyClientOptions (line 83) | func applyClientOptions(opts ...Option) (*Store, error) { FILE: vectorstores/redisvector/redis_client.go type RedisClient (line 18) | type RedisClient interface type RueidisClient (line 28) | type RueidisClient struct method DropIndex (line 47) | func (c RueidisClient) DropIndex(ctx context.Context, index string, de... method CheckIndexExists (line 54) | func (c RueidisClient) CheckIndexExists(ctx context.Context, index str... method CreateIndexIfNotExists (line 61) | func (c RueidisClient) CreateIndexIfNotExists(ctx context.Context, ind... method AddDocWithHash (line 78) | func (c RueidisClient) AddDocWithHash(ctx context.Context, prefix stri... method AddDocsWithHash (line 83) | func (c RueidisClient) AddDocsWithHash(ctx context.Context, prefix str... method Search (line 101) | func (c RueidisClient) Search(ctx context.Context, search IndexVectorS... method generateHSetCMD (line 112) | func (c RueidisClient) generateHSetCMD(prefix string, doc schema.Docum... function NewRueidisClient (line 35) | func NewRueidisClient(url string) (*RueidisClient, error) { function getPrefix (line 134) | func getPrefix(index string) string { function getDocIDWithMetaData (line 142) | func getDocIDWithMetaData(prefix string, meta map[string]any) string { function convertFTSearchResIntoDocSchema (line 153) | func convertFTSearchResIntoDocSchema(docs []rueidis.FtSearchDoc) []schem... FILE: vectorstores/redisvector/redis_vector.go constant defaultContentFieldKey (line 14) | defaultContentFieldKey = "content" constant defaultContentVectorFieldKey (line 15) | defaultContentVectorFieldKey = "content_vector" constant defaultDistanceFieldKey (line 16) | defaultDistanceFieldKey = "distance" type Store (line 28) | type Store struct method AddDocuments (line 78) | func (s *Store) AddDocuments(ctx context.Context, docs []schema.Docume... method SimilaritySearch (line 116) | func (s *Store) SimilaritySearch(ctx context.Context, query string, nu... method DropIndex (line 160) | func (s *Store) DropIndex(ctx context.Context, index string, deleteDoc... method getOptions (line 167) | func (s Store) getOptions(options ...vectorstores.Option) vectorstores... method getScoreThreshold (line 175) | func (s Store) getScoreThreshold(opts vectorstores.Options) (float32, ... method getFilters (line 183) | func (s Store) getFilters(opts vectorstores.Options) (string, error) { method appendDocumentsWithVectors (line 194) | func (s Store) appendDocumentsWithVectors(ctx context.Context, docs []... function New (line 41) | func New(ctx context.Context, opts ...Option) (*Store, error) { FILE: vectorstores/redisvector/redis_vector_test.go function getTestURIs (line 27) | func getTestURIs(t *testing.T) (string, string) { function TestCreateRedisVectorOptions (line 76) | func TestCreateRedisVectorOptions(t *testing.T) { function testInvalidRedisVectorConfigs (line 97) | func testInvalidRedisVectorConfigs(t *testing.T, ctx context.Context, re... function testValidRedisVectorConfigs (line 130) | func testValidRedisVectorConfigs(t *testing.T, ctx context.Context, redi... function TestAddDocuments (line 194) | func TestAddDocuments(t *testing.T) { function TestSimilaritySearch (line 288) | func TestSimilaritySearch(t *testing.T) { function TestRedisVectorAsRetriever (line 385) | func TestRedisVectorAsRetriever(t *testing.T) { function TestRedisVectorAsRetrieverWithMetadataFilters (line 450) | func TestRedisVectorAsRetrieverWithMetadataFilters(t *testing.T) { function createOpenAIEmbedder (line 524) | func createOpenAIEmbedder(t *testing.T) *embeddings.EmbedderImpl { function createOpenAILLMAndEmbedder (line 548) | func createOpenAILLMAndEmbedder(t *testing.T) (*openai.LLM, *embeddings.... FILE: vectorstores/vectorstores.go type VectorStore (line 12) | type VectorStore interface type Retriever (line 18) | type Retriever struct method GetRelevantDocuments (line 28) | func (r Retriever) GetRelevantDocuments(ctx context.Context, query str... function ToRetriever (line 47) | func ToRetriever(vectorStore VectorStore, numDocuments int, options ...O... FILE: vectorstores/weaviate/main_test.go function TestMain (line 10) | func TestMain(m *testing.M) { FILE: vectorstores/weaviate/options.go constant _defaultNameSpaceKey (line 14) | _defaultNameSpaceKey = "nameSpace" constant _defaultTextKey (line 15) | _defaultTextKey = "text" constant _defaultNameSpace (line 16) | _defaultNameSpace = "default" type Option (line 23) | type Option function WithEmbedder (line 26) | func WithEmbedder(e embeddings.Embedder) Option { function WithTextKey (line 34) | func WithTextKey(textKey string) Option { function WithNameSpaceKey (line 42) | func WithNameSpaceKey(nameSpaceKey string) Option { function WithIndexName (line 52) | func WithIndexName(indexName string) Option { function WithNameSpace (line 59) | func WithNameSpace(nameSpace string) Option { function WithHost (line 66) | func WithHost(host string) Option { function WithScheme (line 73) | func WithScheme(scheme string) Option { function WithAPIKey (line 81) | func WithAPIKey(apiKey string) Option { function WithAuthConfig (line 88) | func WithAuthConfig(authConfig auth.Config) Option { function WithHTTPClient (line 95) | func WithHTTPClient(httpClient *http.Client) Option { function WithConnectionClient (line 104) | func WithConnectionClient(connectionClient *http.Client) Option { function WithQueryAttrs (line 111) | func WithQueryAttrs(queryAttrs []string) Option { function WithAdditionalFields (line 118) | func WithAdditionalFields(additionalFields []string) Option { function applyClientOptions (line 124) | func applyClientOptions(opts ...Option) (Store, error) { function mergeValuesAsUnique (line 174) | func mergeValuesAsUnique(collections ...[]string) []string { FILE: vectorstores/weaviate/weaviate.go type Store (line 40) | type Store struct method AddDocuments (line 92) | func (s Store) AddDocuments(ctx context.Context, method SimilaritySearch (line 151) | func (s Store) SimilaritySearch( method MetadataSearch (line 194) | func (s Store) MetadataSearch( method parseDocumentsByGraphQLResponse (line 221) | func (s Store) parseDocumentsByGraphQLResponse(res *models.GraphQLResp... method deduplicate (line 264) | func (s Store) deduplicate(ctx context.Context, method getNameSpace (line 282) | func (s Store) getNameSpace(opts vectorstores.Options) string { method getScoreThreshold (line 289) | func (s Store) getScoreThreshold(opts vectorstores.Options) (float32, ... method getFilters (line 296) | func (s Store) getFilters(opts vectorstores.Options) any { method getOptions (line 303) | func (s Store) getOptions(options ...vectorstores.Option) vectorstores... method createWhereBuilder (line 315) | func (s Store) createWhereBuilder(namespace string, filter any) (*filt... method createFields (line 330) | func (s Store) createFields() []graphql.Field { function New (line 69) | func New(opts ...Option) (Store, error) { FILE: vectorstores/weaviate/weaviate_test.go function getWeaviateTestContainerSchemeAndHost (line 27) | func getWeaviateTestContainerSchemeAndHost(t *testing.T) (string, string) { function randomizedCamelCaseClass (line 65) | func randomizedCamelCaseClass() string { function createTestClass (line 69) | func createTestClass(ctx context.Context, s Store) error { function createOpenAIClient (line 90) | func createOpenAIClient(t *testing.T) (*embeddings.EmbedderImpl, *openai... function createOpenAIEmbedder (line 121) | func createOpenAIEmbedder(t *testing.T) *embeddings.EmbedderImpl { function getLampDocuments (line 127) | func getLampDocuments() []schema.Document { function TestWeaviateStoreRest (line 162) | func TestWeaviateStoreRest(t *testing.T) { function TestWeaviateStoreRestWithScoreThreshold (line 201) | func TestWeaviateStoreRestWithScoreThreshold(t *testing.T) { function TestMetadataSearch (line 253) | func TestMetadataSearch(t *testing.T) { function TestDeduplicater (line 299) | func TestDeduplicater(t *testing.T) { function TestSimilaritySearchWithInvalidScoreThreshold (line 343) | func TestSimilaritySearchWithInvalidScoreThreshold(t *testing.T) { function TestWeaviateAsRetriever (line 390) | func TestWeaviateAsRetriever(t *testing.T) { function TestWeaviateAsRetrieverWithScoreThreshold (line 438) | func TestWeaviateAsRetrieverWithScoreThreshold(t *testing.T) { function TestWeaviateAsRetrieverWithMetadataFilterEqualsClause (line 495) | func TestWeaviateAsRetrieverWithMetadataFilterEqualsClause(t *testing.T) { function TestWeaviateAsRetrieverWithMetadataFilterNotSelected (line 584) | func TestWeaviateAsRetrieverWithMetadataFilterNotSelected(t *testing.T) { function TestWeaviateAsRetrieverWithMetadataFilters (line 644) | func TestWeaviateAsRetrieverWithMetadataFilters(t *testing.T) { function TestWeaviateStoreAdditionalFieldsDefaults (line 727) | func TestWeaviateStoreAdditionalFieldsDefaults(t *testing.T) { function TestWeaviateStoreAdditionalFieldsAdded (line 769) | func TestWeaviateStoreAdditionalFieldsAdded(t *testing.T) { function TestWeaviateWithOptionEmbedder (line 817) | func TestWeaviateWithOptionEmbedder(t *testing.T) {