diff --git a/embeddings/embedding.go b/embeddings/embedding.go index 7a7ab20da..f0f06a8c0 100644 --- a/embeddings/embedding.go +++ b/embeddings/embedding.go @@ -5,6 +5,21 @@ import ( "strings" ) +// NewEmbedder creates a new Embedder from the given EmbedderClient, with +// some options that affect how embedding will be done. +func NewEmbedder(client EmbedderClient, opts ...Option) (*EmbedderImpl, error) { + e := &EmbedderImpl{ + client: client, + StripNewLines: defaultStripNewLines, + BatchSize: defaultBatchSize, + } + + for _, opt := range opts { + opt(e) + } + return e, nil +} + // Embedder is the interface for creating vector embeddings from texts. type Embedder interface { // EmbedDocuments returns a vector for each text. @@ -25,19 +40,6 @@ type EmbedderImpl struct { BatchSize int } -func NewEmbedder(client EmbedderClient, opts ...Option) (*EmbedderImpl, error) { - e := &EmbedderImpl{ - client: client, - StripNewLines: defaultStripNewLines, - BatchSize: defaultBatchSize, - } - - for _, opt := range opts { - opt(e) - } - return e, nil -} - // EmbedQuery embeds a single text. func (ei *EmbedderImpl) EmbedQuery(ctx context.Context, text string) ([]float32, error) { if ei.StripNewLines { diff --git a/embeddings/openai/openai.go b/embeddings/openai/openai.go deleted file mode 100644 index 309d40330..000000000 --- a/embeddings/openai/openai.go +++ /dev/null @@ -1,49 +0,0 @@ -package openai - -import ( - "context" - "strings" - - "github.com/tmc/langchaingo/embeddings" - "github.com/tmc/langchaingo/llms/openai" -) - -// OpenAI is the embedder using the OpenAI api. -type OpenAI struct { - client *openai.LLM - - StripNewLines bool - BatchSize int -} - -var _ embeddings.Embedder = OpenAI{} - -// NewOpenAI creates a new OpenAI with options. Options for client, strip new lines and batch. -func NewOpenAI(opts ...Option) (OpenAI, error) { - o, err := applyClientOptions(opts...) - if err != nil { - return OpenAI{}, err - } - - return o, nil -} - -// EmbedDocuments creates one vector embedding for each of the texts. -func (e OpenAI) EmbedDocuments(ctx context.Context, texts []string) ([][]float32, error) { - texts = embeddings.MaybeRemoveNewLines(texts, e.StripNewLines) - return embeddings.BatchedEmbed(ctx, e.client, texts, e.BatchSize) -} - -// EmbedQuery embeds a single text. -func (e OpenAI) EmbedQuery(ctx context.Context, text string) ([]float32, error) { - if e.StripNewLines { - text = strings.ReplaceAll(text, "\n", " ") - } - - emb, err := e.client.CreateEmbedding(ctx, []string{text}) - if err != nil { - return nil, err - } - - return emb[0], nil -} diff --git a/embeddings/openai/options.go b/embeddings/openai/options.go deleted file mode 100644 index 1fd1300f5..000000000 --- a/embeddings/openai/options.go +++ /dev/null @@ -1,55 +0,0 @@ -package openai - -import ( - "github.com/tmc/langchaingo/llms/openai" -) - -const ( - _defaultBatchSize = 512 - _defaultStripNewLines = true -) - -// Option is a function type that can be used to modify the client. -type Option func(p *OpenAI) - -// WithClient is an option for providing the LLM client. -func WithClient(client openai.LLM) Option { - return func(p *OpenAI) { - p.client = &client - } -} - -// WithStripNewLines is an option for specifying the should it strip new lines. -func WithStripNewLines(stripNewLines bool) Option { - return func(p *OpenAI) { - p.StripNewLines = stripNewLines - } -} - -// WithBatchSize is an option for specifying the batch size. -func WithBatchSize(batchSize int) Option { - return func(p *OpenAI) { - p.BatchSize = batchSize - } -} - -func applyClientOptions(opts ...Option) (OpenAI, error) { - o := &OpenAI{ - StripNewLines: _defaultStripNewLines, - BatchSize: _defaultBatchSize, - } - - for _, opt := range opts { - opt(o) - } - - if o.client == nil { - client, err := openai.New() - if err != nil { - return OpenAI{}, err - } - o.client = client - } - - return *o, nil -} diff --git a/embeddings/openai/openai_test.go b/embeddings/openai_test.go similarity index 74% rename from embeddings/openai/openai_test.go rename to embeddings/openai_test.go index db1e2e560..eea891db7 100644 --- a/embeddings/openai/openai_test.go +++ b/embeddings/openai_test.go @@ -1,4 +1,4 @@ -package openai +package embeddings import ( "context" @@ -7,20 +7,30 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/tmc/langchaingo/embeddings" "github.com/tmc/langchaingo/llms/openai" ) -func TestOpenaiEmbeddings(t *testing.T) { - t.Parallel() - +func newOpenAIEmbedder(t *testing.T, opts ...Option) *EmbedderImpl { + t.Helper() if openaiKey := os.Getenv("OPENAI_API_KEY"); openaiKey == "" { t.Skip("OPENAI_API_KEY not set") + return nil } - e, err := NewOpenAI() + + llm, err := openai.New() require.NoError(t, err) - _, err = e.EmbedQuery(context.Background(), "Hello world!") + embedder, err := NewEmbedder(llm, opts...) + require.NoError(t, err) + + return embedder +} + +func TestOpenaiEmbeddings(t *testing.T) { + t.Parallel() + + e := newOpenAIEmbedder(t) + _, err := e.EmbedQuery(context.Background(), "Hello world!") require.NoError(t, err) embeddings, err := e.EmbedDocuments(context.Background(), []string{"Hello world", "The world is ending", "good bye"}) @@ -33,14 +43,8 @@ func TestOpenaiEmbeddingsQueryVsDocuments(t *testing.T) { // of which method we call. t.Parallel() - if openaiKey := os.Getenv("OPENAI_API_KEY"); openaiKey == "" { - t.Skip("OPENAI_API_KEY not set") - } - e, err := NewOpenAI() - require.NoError(t, err) - + e := newOpenAIEmbedder(t) text := "hi there" - eq, err := e.EmbedQuery(context.Background(), text) require.NoError(t, err) @@ -55,17 +59,9 @@ func TestOpenaiEmbeddingsQueryVsDocuments(t *testing.T) { func TestOpenaiEmbeddingsWithOptions(t *testing.T) { t.Parallel() - if openaiKey := os.Getenv("OPENAI_API_KEY"); openaiKey == "" { - t.Skip("OPENAI_API_KEY not set") - } - - client, err := openai.New() - require.NoError(t, err) - - e, err := NewOpenAI(WithClient(*client), WithBatchSize(1), WithStripNewLines(false)) - require.NoError(t, err) + e := newOpenAIEmbedder(t, WithBatchSize(1), WithStripNewLines(false)) - _, err = e.EmbedQuery(context.Background(), "Hello world!") + _, err := e.EmbedQuery(context.Background(), "Hello world!") require.NoError(t, err) embeddings, err := e.EmbedDocuments(context.Background(), []string{"Hello world"}) @@ -94,7 +90,7 @@ func TestOpenaiEmbeddingsWithAzureAPI(t *testing.T) { ) require.NoError(t, err) - e, err := NewOpenAI(WithClient(*client), WithBatchSize(1), WithStripNewLines(false)) + e, err := NewEmbedder(client, WithBatchSize(1), WithStripNewLines(false)) require.NoError(t, err) _, err = e.EmbedQuery(context.Background(), "Hello world!") @@ -112,17 +108,11 @@ func TestUseLLMAndChatAsEmbedderClient(t *testing.T) { t.Skip("OPENAI_API_KEY not set") } - llm, err := openai.New() - require.NoError(t, err) - - embedderFromLLM, err := embeddings.NewEmbedder(llm) - require.NoError(t, err) - var _ embeddings.Embedder = embedderFromLLM - + // Shows that we can pass an openai chat value to NewEmbedder chat, err := openai.NewChat() require.NoError(t, err) - embedderFromChat, err := embeddings.NewEmbedder(chat) + embedderFromChat, err := NewEmbedder(chat) require.NoError(t, err) - var _ embeddings.Embedder = embedderFromChat + var _ Embedder = embedderFromChat } diff --git a/examples/anthropic-completion-example/go.mod b/examples/anthropic-completion-example/go.mod index ddc7de8f7..6ffbb7769 100644 --- a/examples/anthropic-completion-example/go.mod +++ b/examples/anthropic-completion-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/anthropic-completion-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/dlclark/regexp2 v1.8.1 // indirect diff --git a/examples/anthropic-completion-example/go.sum b/examples/anthropic-completion-example/go.sum index acc0c354e..b231b8ee5 100644 --- a/examples/anthropic-completion-example/go.sum +++ b/examples/anthropic-completion-example/go.sum @@ -7,6 +7,6 @@ github.com/pkoukk/tiktoken-go v0.1.2 h1:u7PCSBiWJ3nJYoTGShyM9iHXz4dNyYkurwwp+GHt github.com/pkoukk/tiktoken-go v0.1.2/go.mod h1:boMWvk9pQCOTx11pgu0DrIdrAKgQzzJKUP6vLXaz7Rw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/examples/chroma-vectorstore-example/go.mod b/examples/chroma-vectorstore-example/go.mod index 324345fa3..6a4c658b6 100644 --- a/examples/chroma-vectorstore-example/go.mod +++ b/examples/chroma-vectorstore-example/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/amikos-tech/chroma-go v0.0.0-20230901221218-d0087270239e github.com/google/uuid v1.3.1 - github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 + github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 ) require ( diff --git a/examples/chroma-vectorstore-example/go.sum b/examples/chroma-vectorstore-example/go.sum index ccc32032d..e8a25ed8b 100644 --- a/examples/chroma-vectorstore-example/go.sum +++ b/examples/chroma-vectorstore-example/go.sum @@ -19,8 +19,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= go.starlark.net v0.0.0-20230302034142-4b1e35fe2254 h1:Ss6D3hLXTM0KobyBYEAygXzFfGcjnmfEJOBgSbemCtg= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea h1:vLCWI/yYrdEHyN2JzIzPO3aaQJHQdp89IZBA/+azVC4= diff --git a/examples/cohere-llm-example/go.mod b/examples/cohere-llm-example/go.mod index b02bcbfdd..93d92f4e5 100644 --- a/examples/cohere-llm-example/go.mod +++ b/examples/cohere-llm-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/basic-llm-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/cohere-ai/tokenizer v1.1.2 // indirect diff --git a/examples/cohere-llm-example/go.sum b/examples/cohere-llm-example/go.sum index fc8eaa1e2..0bed0eb26 100644 --- a/examples/cohere-llm-example/go.sum +++ b/examples/cohere-llm-example/go.sum @@ -11,6 +11,6 @@ github.com/pkoukk/tiktoken-go v0.1.2 h1:u7PCSBiWJ3nJYoTGShyM9iHXz4dNyYkurwwp+GHt github.com/pkoukk/tiktoken-go v0.1.2/go.mod h1:boMWvk9pQCOTx11pgu0DrIdrAKgQzzJKUP6vLXaz7Rw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/examples/document-qa-example/go.mod b/examples/document-qa-example/go.mod index 5a6444534..2ffdc38eb 100644 --- a/examples/document-qa-example/go.mod +++ b/examples/document-qa-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/document-qa-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/Masterminds/goutils v1.1.1 // indirect diff --git a/examples/document-qa-example/go.sum b/examples/document-qa-example/go.sum index 41193619c..58ad96329 100644 --- a/examples/document-qa-example/go.sum +++ b/examples/document-qa-example/go.sum @@ -66,8 +66,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= gitlab.com/golang-commonmark/html v0.0.0-20191124015941-a22733972181 h1:K+bMSIx9A7mLES1rtG+qKduLIXq40DAzYHtb0XuCukA= gitlab.com/golang-commonmark/linkify v0.0.0-20191026162114-a0c2df6c8f82 h1:oYrL81N608MLZhma3ruL8qTM4xcpYECGut8KSxRY59g= diff --git a/examples/ernie-chat-example/go.mod b/examples/ernie-chat-example/go.mod index 0d0009115..cf40944d4 100644 --- a/examples/ernie-chat-example/go.mod +++ b/examples/ernie-chat-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/ernie-chat-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/dlclark/regexp2 v1.8.1 // indirect diff --git a/examples/ernie-chat-example/go.sum b/examples/ernie-chat-example/go.sum index acc0c354e..b231b8ee5 100644 --- a/examples/ernie-chat-example/go.sum +++ b/examples/ernie-chat-example/go.sum @@ -7,6 +7,6 @@ github.com/pkoukk/tiktoken-go v0.1.2 h1:u7PCSBiWJ3nJYoTGShyM9iHXz4dNyYkurwwp+GHt github.com/pkoukk/tiktoken-go v0.1.2/go.mod h1:boMWvk9pQCOTx11pgu0DrIdrAKgQzzJKUP6vLXaz7Rw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/examples/ernie-completion-example/go.mod b/examples/ernie-completion-example/go.mod index 83c5a1166..5b0087c00 100644 --- a/examples/ernie-completion-example/go.mod +++ b/examples/ernie-completion-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/ernie-completion-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/dlclark/regexp2 v1.8.1 // indirect diff --git a/examples/ernie-completion-example/go.sum b/examples/ernie-completion-example/go.sum index f4f27b558..8d9f5a244 100644 --- a/examples/ernie-completion-example/go.sum +++ b/examples/ernie-completion-example/go.sum @@ -7,6 +7,6 @@ github.com/pkoukk/tiktoken-go v0.1.2 h1:u7PCSBiWJ3nJYoTGShyM9iHXz4dNyYkurwwp+GHt github.com/pkoukk/tiktoken-go v0.1.2/go.mod h1:boMWvk9pQCOTx11pgu0DrIdrAKgQzzJKUP6vLXaz7Rw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/examples/ernie-function-call-example/go.mod b/examples/ernie-function-call-example/go.mod index a03852e9c..634123c94 100644 --- a/examples/ernie-function-call-example/go.mod +++ b/examples/ernie-function-call-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/ernie-function-call-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/dlclark/regexp2 v1.8.1 // indirect diff --git a/examples/ernie-function-call-example/go.sum b/examples/ernie-function-call-example/go.sum index acc0c354e..b231b8ee5 100644 --- a/examples/ernie-function-call-example/go.sum +++ b/examples/ernie-function-call-example/go.sum @@ -7,6 +7,6 @@ github.com/pkoukk/tiktoken-go v0.1.2 h1:u7PCSBiWJ3nJYoTGShyM9iHXz4dNyYkurwwp+GHt github.com/pkoukk/tiktoken-go v0.1.2/go.mod h1:boMWvk9pQCOTx11pgu0DrIdrAKgQzzJKUP6vLXaz7Rw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/examples/ernie-function-call-streaming-example/go.mod b/examples/ernie-function-call-streaming-example/go.mod index dbaabf50f..321c860cf 100644 --- a/examples/ernie-function-call-streaming-example/go.mod +++ b/examples/ernie-function-call-streaming-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/ernie-function-call-streaming-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/dlclark/regexp2 v1.8.1 // indirect diff --git a/examples/ernie-function-call-streaming-example/go.sum b/examples/ernie-function-call-streaming-example/go.sum index acc0c354e..b231b8ee5 100644 --- a/examples/ernie-function-call-streaming-example/go.sum +++ b/examples/ernie-function-call-streaming-example/go.sum @@ -7,6 +7,6 @@ github.com/pkoukk/tiktoken-go v0.1.2 h1:u7PCSBiWJ3nJYoTGShyM9iHXz4dNyYkurwwp+GHt github.com/pkoukk/tiktoken-go v0.1.2/go.mod h1:boMWvk9pQCOTx11pgu0DrIdrAKgQzzJKUP6vLXaz7Rw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/examples/huggingface-llm-example/go.mod b/examples/huggingface-llm-example/go.mod index 22f310fd5..1753c586d 100644 --- a/examples/huggingface-llm-example/go.mod +++ b/examples/huggingface-llm-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/huggingface-llm-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/dlclark/regexp2 v1.8.1 // indirect diff --git a/examples/huggingface-llm-example/go.sum b/examples/huggingface-llm-example/go.sum index acc0c354e..b231b8ee5 100644 --- a/examples/huggingface-llm-example/go.sum +++ b/examples/huggingface-llm-example/go.sum @@ -7,6 +7,6 @@ github.com/pkoukk/tiktoken-go v0.1.2 h1:u7PCSBiWJ3nJYoTGShyM9iHXz4dNyYkurwwp+GHt github.com/pkoukk/tiktoken-go v0.1.2/go.mod h1:boMWvk9pQCOTx11pgu0DrIdrAKgQzzJKUP6vLXaz7Rw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/examples/huggingface-milvus-vectorstore-example/go.mod b/examples/huggingface-milvus-vectorstore-example/go.mod index 5deaa66c8..7c2e6f6ce 100644 --- a/examples/huggingface-milvus-vectorstore-example/go.mod +++ b/examples/huggingface-milvus-vectorstore-example/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/milvus-io/milvus-sdk-go/v2 v2.3.2 - github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 + github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 ) require ( diff --git a/examples/huggingface-milvus-vectorstore-example/go.sum b/examples/huggingface-milvus-vectorstore-example/go.sum index 4bbcf1500..2188f2344 100644 --- a/examples/huggingface-milvus-vectorstore-example/go.sum +++ b/examples/huggingface-milvus-vectorstore-example/go.sum @@ -216,8 +216,8 @@ github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= diff --git a/examples/llm-chain-example/go.mod b/examples/llm-chain-example/go.mod index a06fe47a2..f6ddb2f4e 100644 --- a/examples/llm-chain-example/go.mod +++ b/examples/llm-chain-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/llm-chain-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/Masterminds/goutils v1.1.1 // indirect diff --git a/examples/llm-chain-example/go.sum b/examples/llm-chain-example/go.sum index 41193619c..58ad96329 100644 --- a/examples/llm-chain-example/go.sum +++ b/examples/llm-chain-example/go.sum @@ -66,8 +66,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= gitlab.com/golang-commonmark/html v0.0.0-20191124015941-a22733972181 h1:K+bMSIx9A7mLES1rtG+qKduLIXq40DAzYHtb0XuCukA= gitlab.com/golang-commonmark/linkify v0.0.0-20191026162114-a0c2df6c8f82 h1:oYrL81N608MLZhma3ruL8qTM4xcpYECGut8KSxRY59g= diff --git a/examples/llmmath-chain-example/go.mod b/examples/llmmath-chain-example/go.mod index 8301bbefc..2ecabfddb 100644 --- a/examples/llmmath-chain-example/go.mod +++ b/examples/llmmath-chain-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/llmmath-chain-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/Masterminds/goutils v1.1.1 // indirect diff --git a/examples/llmmath-chain-example/go.sum b/examples/llmmath-chain-example/go.sum index 41193619c..58ad96329 100644 --- a/examples/llmmath-chain-example/go.sum +++ b/examples/llmmath-chain-example/go.sum @@ -66,8 +66,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= gitlab.com/golang-commonmark/html v0.0.0-20191124015941-a22733972181 h1:K+bMSIx9A7mLES1rtG+qKduLIXq40DAzYHtb0XuCukA= gitlab.com/golang-commonmark/linkify v0.0.0-20191026162114-a0c2df6c8f82 h1:oYrL81N608MLZhma3ruL8qTM4xcpYECGut8KSxRY59g= diff --git a/examples/llmsummarization-chain-example/go.mod b/examples/llmsummarization-chain-example/go.mod index f34dabb8d..f591dad4c 100644 --- a/examples/llmsummarization-chain-example/go.mod +++ b/examples/llmsummarization-chain-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/llmsummarization-chain-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( cloud.google.com/go v0.110.7 // indirect diff --git a/examples/llmsummarization-chain-example/go.sum b/examples/llmsummarization-chain-example/go.sum index 964dde324..9b33aae0a 100644 --- a/examples/llmsummarization-chain-example/go.sum +++ b/examples/llmsummarization-chain-example/go.sum @@ -128,8 +128,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= gitlab.com/golang-commonmark/html v0.0.0-20191124015941-a22733972181 h1:K+bMSIx9A7mLES1rtG+qKduLIXq40DAzYHtb0XuCukA= gitlab.com/golang-commonmark/html v0.0.0-20191124015941-a22733972181/go.mod h1:dzYhVIwWCtzPAa4QP98wfB9+mzt33MSmM8wsKiMi2ow= diff --git a/examples/local-llm-example/go.mod b/examples/local-llm-example/go.mod index 1bc69d02a..2c2bd9cf1 100644 --- a/examples/local-llm-example/go.mod +++ b/examples/local-llm-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/local-llm-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/dlclark/regexp2 v1.8.1 // indirect diff --git a/examples/local-llm-example/go.sum b/examples/local-llm-example/go.sum index acc0c354e..b231b8ee5 100644 --- a/examples/local-llm-example/go.sum +++ b/examples/local-llm-example/go.sum @@ -7,6 +7,6 @@ github.com/pkoukk/tiktoken-go v0.1.2 h1:u7PCSBiWJ3nJYoTGShyM9iHXz4dNyYkurwwp+GHt github.com/pkoukk/tiktoken-go v0.1.2/go.mod h1:boMWvk9pQCOTx11pgu0DrIdrAKgQzzJKUP6vLXaz7Rw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/examples/mrkl-agent-example/go.mod b/examples/mrkl-agent-example/go.mod index 8fb7f9d5d..084ab9208 100644 --- a/examples/mrkl-agent-example/go.mod +++ b/examples/mrkl-agent-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/mrkl-agent-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/Masterminds/goutils v1.1.1 // indirect diff --git a/examples/mrkl-agent-example/go.sum b/examples/mrkl-agent-example/go.sum index 41193619c..58ad96329 100644 --- a/examples/mrkl-agent-example/go.sum +++ b/examples/mrkl-agent-example/go.sum @@ -66,8 +66,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= gitlab.com/golang-commonmark/html v0.0.0-20191124015941-a22733972181 h1:K+bMSIx9A7mLES1rtG+qKduLIXq40DAzYHtb0XuCukA= gitlab.com/golang-commonmark/linkify v0.0.0-20191026162114-a0c2df6c8f82 h1:oYrL81N608MLZhma3ruL8qTM4xcpYECGut8KSxRY59g= diff --git a/examples/ollama-chat-example/go.mod b/examples/ollama-chat-example/go.mod index 252a92bc5..0d8418b0d 100644 --- a/examples/ollama-chat-example/go.mod +++ b/examples/ollama-chat-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/ollama-chat-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/Masterminds/goutils v1.1.1 // indirect diff --git a/examples/ollama-chat-example/go.sum b/examples/ollama-chat-example/go.sum index c839f6fd4..06824d57e 100644 --- a/examples/ollama-chat-example/go.sum +++ b/examples/ollama-chat-example/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= diff --git a/examples/ollama-chroma-vectorstore-example/go.mod b/examples/ollama-chroma-vectorstore-example/go.mod index b15262291..7f89115d7 100644 --- a/examples/ollama-chroma-vectorstore-example/go.mod +++ b/examples/ollama-chroma-vectorstore-example/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/amikos-tech/chroma-go v0.0.0-20230901221218-d0087270239e github.com/google/uuid v1.3.0 - github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 + github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 ) require ( diff --git a/examples/ollama-chroma-vectorstore-example/go.sum b/examples/ollama-chroma-vectorstore-example/go.sum index 21710e22b..845b3b83c 100644 --- a/examples/ollama-chroma-vectorstore-example/go.sum +++ b/examples/ollama-chroma-vectorstore-example/go.sum @@ -36,8 +36,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.starlark.net v0.0.0-20230302034142-4b1e35fe2254 h1:Ss6D3hLXTM0KobyBYEAygXzFfGcjnmfEJOBgSbemCtg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/examples/ollama-completion-example/go.mod b/examples/ollama-completion-example/go.mod index e82e74c6f..d541fdb3f 100644 --- a/examples/ollama-completion-example/go.mod +++ b/examples/ollama-completion-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/ollama-completion-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/Masterminds/goutils v1.1.1 // indirect diff --git a/examples/ollama-completion-example/go.sum b/examples/ollama-completion-example/go.sum index c839f6fd4..06824d57e 100644 --- a/examples/ollama-completion-example/go.sum +++ b/examples/ollama-completion-example/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= diff --git a/examples/openai-chat-example/go.mod b/examples/openai-chat-example/go.mod index 9e89d0b62..c94c9e469 100644 --- a/examples/openai-chat-example/go.mod +++ b/examples/openai-chat-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/openai-chat-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/dlclark/regexp2 v1.8.1 // indirect diff --git a/examples/openai-chat-example/go.sum b/examples/openai-chat-example/go.sum index acc0c354e..b231b8ee5 100644 --- a/examples/openai-chat-example/go.sum +++ b/examples/openai-chat-example/go.sum @@ -7,6 +7,6 @@ github.com/pkoukk/tiktoken-go v0.1.2 h1:u7PCSBiWJ3nJYoTGShyM9iHXz4dNyYkurwwp+GHt github.com/pkoukk/tiktoken-go v0.1.2/go.mod h1:boMWvk9pQCOTx11pgu0DrIdrAKgQzzJKUP6vLXaz7Rw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/examples/openai-completion-example/go.mod b/examples/openai-completion-example/go.mod index a759b530a..7f4b4f4c1 100644 --- a/examples/openai-completion-example/go.mod +++ b/examples/openai-completion-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/openai-completion-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/dlclark/regexp2 v1.8.1 // indirect diff --git a/examples/openai-completion-example/go.sum b/examples/openai-completion-example/go.sum index acc0c354e..b231b8ee5 100644 --- a/examples/openai-completion-example/go.sum +++ b/examples/openai-completion-example/go.sum @@ -7,6 +7,6 @@ github.com/pkoukk/tiktoken-go v0.1.2 h1:u7PCSBiWJ3nJYoTGShyM9iHXz4dNyYkurwwp+GHt github.com/pkoukk/tiktoken-go v0.1.2/go.mod h1:boMWvk9pQCOTx11pgu0DrIdrAKgQzzJKUP6vLXaz7Rw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/examples/openai-function-call-example/go.mod b/examples/openai-function-call-example/go.mod index 5b4de7a35..ca6242cbe 100644 --- a/examples/openai-function-call-example/go.mod +++ b/examples/openai-function-call-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/openai-function-call-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/dlclark/regexp2 v1.8.1 // indirect diff --git a/examples/openai-function-call-example/go.sum b/examples/openai-function-call-example/go.sum index acc0c354e..b231b8ee5 100644 --- a/examples/openai-function-call-example/go.sum +++ b/examples/openai-function-call-example/go.sum @@ -7,6 +7,6 @@ github.com/pkoukk/tiktoken-go v0.1.2 h1:u7PCSBiWJ3nJYoTGShyM9iHXz4dNyYkurwwp+GHt github.com/pkoukk/tiktoken-go v0.1.2/go.mod h1:boMWvk9pQCOTx11pgu0DrIdrAKgQzzJKUP6vLXaz7Rw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/examples/openai-function-call-streaming-example/go.mod b/examples/openai-function-call-streaming-example/go.mod index 8186e9254..7519b4c7c 100644 --- a/examples/openai-function-call-streaming-example/go.mod +++ b/examples/openai-function-call-streaming-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/openai-function-call-streaming-exampl go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/dlclark/regexp2 v1.8.1 // indirect diff --git a/examples/openai-function-call-streaming-example/go.sum b/examples/openai-function-call-streaming-example/go.sum index acc0c354e..b231b8ee5 100644 --- a/examples/openai-function-call-streaming-example/go.sum +++ b/examples/openai-function-call-streaming-example/go.sum @@ -7,6 +7,6 @@ github.com/pkoukk/tiktoken-go v0.1.2 h1:u7PCSBiWJ3nJYoTGShyM9iHXz4dNyYkurwwp+GHt github.com/pkoukk/tiktoken-go v0.1.2/go.mod h1:boMWvk9pQCOTx11pgu0DrIdrAKgQzzJKUP6vLXaz7Rw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/examples/openai-gpt4-turbo-example/go.mod b/examples/openai-gpt4-turbo-example/go.mod index a1bef1216..b13012e09 100644 --- a/examples/openai-gpt4-turbo-example/go.mod +++ b/examples/openai-gpt4-turbo-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/openai-gpt4-turbo-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/dlclark/regexp2 v1.8.1 // indirect diff --git a/examples/openai-gpt4-turbo-example/go.sum b/examples/openai-gpt4-turbo-example/go.sum index acc0c354e..b231b8ee5 100644 --- a/examples/openai-gpt4-turbo-example/go.sum +++ b/examples/openai-gpt4-turbo-example/go.sum @@ -7,6 +7,6 @@ github.com/pkoukk/tiktoken-go v0.1.2 h1:u7PCSBiWJ3nJYoTGShyM9iHXz4dNyYkurwwp+GHt github.com/pkoukk/tiktoken-go v0.1.2/go.mod h1:boMWvk9pQCOTx11pgu0DrIdrAKgQzzJKUP6vLXaz7Rw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/examples/pinecone-vectorstore-example/go.mod b/examples/pinecone-vectorstore-example/go.mod index 791d2548d..b9a64f56d 100644 --- a/examples/pinecone-vectorstore-example/go.mod +++ b/examples/pinecone-vectorstore-example/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/google/uuid v1.3.1 - github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 + github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 ) require ( diff --git a/examples/pinecone-vectorstore-example/go.sum b/examples/pinecone-vectorstore-example/go.sum index 92c1816ba..ce806b3a5 100644 --- a/examples/pinecone-vectorstore-example/go.sum +++ b/examples/pinecone-vectorstore-example/go.sum @@ -158,8 +158,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/examples/postgresql-database-chain-example/go.mod b/examples/postgresql-database-chain-example/go.mod index d7702d8bd..d214dc7b8 100644 --- a/examples/postgresql-database-chain-example/go.mod +++ b/examples/postgresql-database-chain-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/postgresql-database-chain-example go 1.20 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/Masterminds/goutils v1.1.1 // indirect diff --git a/examples/postgresql-database-chain-example/go.sum b/examples/postgresql-database-chain-example/go.sum index 8ce6e9746..849076362 100644 --- a/examples/postgresql-database-chain-example/go.sum +++ b/examples/postgresql-database-chain-example/go.sum @@ -74,8 +74,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= gitlab.com/golang-commonmark/html v0.0.0-20191124015941-a22733972181 h1:K+bMSIx9A7mLES1rtG+qKduLIXq40DAzYHtb0XuCukA= gitlab.com/golang-commonmark/linkify v0.0.0-20191026162114-a0c2df6c8f82 h1:oYrL81N608MLZhma3ruL8qTM4xcpYECGut8KSxRY59g= diff --git a/examples/prompts-with-partial-example/go.mod b/examples/prompts-with-partial-example/go.mod index 49c8b5850..2b0274493 100644 --- a/examples/prompts-with-partial-example/go.mod +++ b/examples/prompts-with-partial-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/prompts-with-partial-example go 1.20 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/Masterminds/goutils v1.1.1 // indirect diff --git a/examples/prompts-with-partial-example/go.sum b/examples/prompts-with-partial-example/go.sum index 663cbdfbc..9c5609dcc 100644 --- a/examples/prompts-with-partial-example/go.sum +++ b/examples/prompts-with-partial-example/go.sum @@ -29,8 +29,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= diff --git a/examples/prompts-with-partial-func-example/go.mod b/examples/prompts-with-partial-func-example/go.mod index cd86476a8..e0779d566 100644 --- a/examples/prompts-with-partial-func-example/go.mod +++ b/examples/prompts-with-partial-func-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/prompts-with-partial-func-example go 1.20 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/Masterminds/goutils v1.1.1 // indirect diff --git a/examples/prompts-with-partial-func-example/go.sum b/examples/prompts-with-partial-func-example/go.sum index 663cbdfbc..9c5609dcc 100644 --- a/examples/prompts-with-partial-func-example/go.sum +++ b/examples/prompts-with-partial-func-example/go.sum @@ -29,8 +29,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= diff --git a/examples/sequential-chain-example/go.mod b/examples/sequential-chain-example/go.mod index 2a2cf72f7..10a137246 100644 --- a/examples/sequential-chain-example/go.mod +++ b/examples/sequential-chain-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/sequential-chain-example go 1.20 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/Masterminds/goutils v1.1.1 // indirect diff --git a/examples/sequential-chain-example/go.sum b/examples/sequential-chain-example/go.sum index 41193619c..58ad96329 100644 --- a/examples/sequential-chain-example/go.sum +++ b/examples/sequential-chain-example/go.sum @@ -66,8 +66,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= gitlab.com/golang-commonmark/html v0.0.0-20191124015941-a22733972181 h1:K+bMSIx9A7mLES1rtG+qKduLIXq40DAzYHtb0XuCukA= gitlab.com/golang-commonmark/linkify v0.0.0-20191026162114-a0c2df6c8f82 h1:oYrL81N608MLZhma3ruL8qTM4xcpYECGut8KSxRY59g= diff --git a/examples/sql-database-chain-example/go.mod b/examples/sql-database-chain-example/go.mod index 507150655..c538ad708 100644 --- a/examples/sql-database-chain-example/go.mod +++ b/examples/sql-database-chain-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/sql-database-chain-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/Masterminds/goutils v1.1.1 // indirect diff --git a/examples/sql-database-chain-example/go.sum b/examples/sql-database-chain-example/go.sum index f4eb6f024..4c7a6f0f7 100644 --- a/examples/sql-database-chain-example/go.sum +++ b/examples/sql-database-chain-example/go.sum @@ -68,8 +68,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= gitlab.com/golang-commonmark/html v0.0.0-20191124015941-a22733972181 h1:K+bMSIx9A7mLES1rtG+qKduLIXq40DAzYHtb0XuCukA= gitlab.com/golang-commonmark/linkify v0.0.0-20191026162114-a0c2df6c8f82 h1:oYrL81N608MLZhma3ruL8qTM4xcpYECGut8KSxRY59g= diff --git a/examples/vertexai-palm-chat-example/go.mod b/examples/vertexai-palm-chat-example/go.mod index 6b0e4bc12..cf2a5f0cc 100644 --- a/examples/vertexai-palm-chat-example/go.mod +++ b/examples/vertexai-palm-chat-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/vertexai-palm-chat-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( cloud.google.com/go v0.110.7 // indirect diff --git a/examples/vertexai-palm-chat-example/go.sum b/examples/vertexai-palm-chat-example/go.sum index 47e9f6877..6835f76ec 100644 --- a/examples/vertexai-palm-chat-example/go.sum +++ b/examples/vertexai-palm-chat-example/go.sum @@ -89,8 +89,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= diff --git a/examples/vertexai-palm-completion-example/go.mod b/examples/vertexai-palm-completion-example/go.mod index e9921cb26..61bbe0c47 100644 --- a/examples/vertexai-palm-completion-example/go.mod +++ b/examples/vertexai-palm-completion-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/vertexai-palm-completion-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( cloud.google.com/go v0.110.7 // indirect diff --git a/examples/vertexai-palm-completion-example/go.sum b/examples/vertexai-palm-completion-example/go.sum index 47e9f6877..6835f76ec 100644 --- a/examples/vertexai-palm-completion-example/go.sum +++ b/examples/vertexai-palm-completion-example/go.sum @@ -89,8 +89,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= diff --git a/examples/vertexai-palm-embeddings-example/go.mod b/examples/vertexai-palm-embeddings-example/go.mod index 113bc1467..73d2885b0 100644 --- a/examples/vertexai-palm-embeddings-example/go.mod +++ b/examples/vertexai-palm-embeddings-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/vertexai-palm-embeddings-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( cloud.google.com/go v0.110.7 // indirect diff --git a/examples/vertexai-palm-embeddings-example/go.sum b/examples/vertexai-palm-embeddings-example/go.sum index 47e9f6877..6835f76ec 100644 --- a/examples/vertexai-palm-embeddings-example/go.sum +++ b/examples/vertexai-palm-embeddings-example/go.sum @@ -89,8 +89,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= diff --git a/examples/zapier-llm-example/go.mod b/examples/zapier-llm-example/go.mod index 51e66a5f8..269907298 100644 --- a/examples/zapier-llm-example/go.mod +++ b/examples/zapier-llm-example/go.mod @@ -2,7 +2,7 @@ module github.com/tmc/langchaingo/examples/zapier-llm-example go 1.19 -require github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 +require github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 require ( github.com/Masterminds/goutils v1.1.1 // indirect diff --git a/examples/zapier-llm-example/go.sum b/examples/zapier-llm-example/go.sum index 41193619c..58ad96329 100644 --- a/examples/zapier-llm-example/go.sum +++ b/examples/zapier-llm-example/go.sum @@ -66,8 +66,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81 h1:WRrvtNwd7S1etCMnYjEaem5cizL5TP7q8MTXum/OSUA= -github.com/tmc/langchaingo v0.0.0-20231130160443-fc423fab7b81/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2 h1:3arY5l84Sp5SRx+9xY8vXiTpin932qv0BNAOSQbtlHY= +github.com/tmc/langchaingo v0.0.0-20231130223434-98fa24d3e7d2/go.mod h1:WgJkGMb5Ac/WpD6YLo3zRAiHtALrgGnH42Hcu5Rs4/A= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= gitlab.com/golang-commonmark/html v0.0.0-20191124015941-a22733972181 h1:K+bMSIx9A7mLES1rtG+qKduLIXq40DAzYHtb0XuCukA= gitlab.com/golang-commonmark/linkify v0.0.0-20191026162114-a0c2df6c8f82 h1:oYrL81N608MLZhma3ruL8qTM4xcpYECGut8KSxRY59g= diff --git a/vectorstores/chroma/chroma_test.go b/vectorstores/chroma/chroma_test.go index 4e11bf87c..ad5647263 100644 --- a/vectorstores/chroma/chroma_test.go +++ b/vectorstores/chroma/chroma_test.go @@ -12,7 +12,7 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/require" "github.com/tmc/langchaingo/chains" - openaiEmbeddings "github.com/tmc/langchaingo/embeddings/openai" + "github.com/tmc/langchaingo/embeddings" "github.com/tmc/langchaingo/llms/openai" "github.com/tmc/langchaingo/schema" "github.com/tmc/langchaingo/vectorstores" @@ -32,7 +32,9 @@ func TestChromaGoStoreRest(t *testing.T) { t.Parallel() testChromaURL, openaiAPIKey := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) s, err := chroma.New( @@ -73,7 +75,9 @@ func TestChromaStoreRestWithScoreThreshold(t *testing.T) { t.Parallel() testChromaURL, openaiAPIKey := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) s, err := chroma.New( @@ -120,7 +124,9 @@ func TestSimilaritySearchWithInvalidScoreThreshold(t *testing.T) { t.Parallel() testChromaURL, openaiAPIKey := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) s, err := chroma.New( @@ -162,7 +168,10 @@ func TestChromaAsRetriever(t *testing.T) { t.Parallel() testChromaURL, openaiAPIKey := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) s, err := chroma.New( @@ -185,9 +194,6 @@ func TestChromaAsRetriever(t *testing.T) { ) require.NoError(t, err) - llm, err := openai.New() - require.NoError(t, err) - result, err := chains.Run( context.TODO(), chains.NewRetrievalQAFromLLM( @@ -204,7 +210,10 @@ func TestChromaAsRetrieverWithScoreThreshold(t *testing.T) { t.Parallel() testChromaURL, openaiAPIKey := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) s, err := chroma.New( @@ -230,9 +239,6 @@ func TestChromaAsRetrieverWithScoreThreshold(t *testing.T) { ) require.NoError(t, err) - llm, err := openai.New() - require.NoError(t, err) - result, err := chains.Run( context.TODO(), chains.NewRetrievalQAFromLLM( @@ -254,7 +260,10 @@ func TestChromaAsRetrieverWithMetadataFilterEqualsClause(t *testing.T) { t.Parallel() testChromaURL, openaiAPIKey := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) s, err := chroma.New( @@ -304,9 +313,6 @@ func TestChromaAsRetrieverWithMetadataFilterEqualsClause(t *testing.T) { ) require.NoError(t, err) - llm, err := openai.New() - require.NoError(t, err) - filter := make(map[string]any) filterValue := make(map[string]any) filterValue["$eq"] = "patio" @@ -329,7 +335,10 @@ func TestChromaAsRetrieverWithMetadataFilterInClause(t *testing.T) { t.Parallel() testChromaURL, openaiAPIKey := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) s, newChromaErr := chroma.New( @@ -408,7 +417,10 @@ func TestChromaAsRetrieverWithMetadataFilterNotSelected(t *testing.T) { t.Parallel() testChromaURL, openaiAPIKey := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) s, err := chroma.New( @@ -458,9 +470,6 @@ func TestChromaAsRetrieverWithMetadataFilterNotSelected(t *testing.T) { ) require.NoError(t, err) - llm, err := openai.New() - require.NoError(t, err) - result, err := chains.Run( context.TODO(), chains.NewRetrievalQAFromLLM( @@ -482,7 +491,10 @@ func TestChromaAsRetrieverWithMetadataFilters(t *testing.T) { t.Parallel() testChromaURL, openaiAPIKey := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) s, err := chroma.New( @@ -523,9 +535,6 @@ func TestChromaAsRetrieverWithMetadataFilters(t *testing.T) { ) require.NoError(t, err) - llm, err := openai.New() - require.NoError(t, err) - filter := map[string]interface{}{ "$and": []map[string]interface{}{ { diff --git a/vectorstores/pinecone/pinecone_test.go b/vectorstores/pinecone/pinecone_test.go index 53dcc3f57..b6a72d1f7 100644 --- a/vectorstores/pinecone/pinecone_test.go +++ b/vectorstores/pinecone/pinecone_test.go @@ -9,7 +9,7 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/require" "github.com/tmc/langchaingo/chains" - openaiEmbeddings "github.com/tmc/langchaingo/embeddings/openai" + "github.com/tmc/langchaingo/embeddings" "github.com/tmc/langchaingo/llms/openai" "github.com/tmc/langchaingo/schema" "github.com/tmc/langchaingo/vectorstores" @@ -81,7 +81,10 @@ func TestPineconeStoreRest(t *testing.T) { t.Parallel() environment, apiKey, indexName, projectName := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) storer, err := pinecone.New( @@ -111,7 +114,10 @@ func TestPineconeStoreRestWithScoreThreshold(t *testing.T) { t.Parallel() environment, apiKey, indexName, projectName := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) storer, err := pinecone.New( @@ -158,7 +164,10 @@ func TestSimilaritySearchWithInvalidScoreThreshold(t *testing.T) { t.Parallel() environment, apiKey, indexName, projectName := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) storer, err := pinecone.New( @@ -201,7 +210,10 @@ func TestPineconeAsRetriever(t *testing.T) { t.Parallel() environment, apiKey, indexName, projectName := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) store, err := pinecone.New( @@ -227,9 +239,6 @@ func TestPineconeAsRetriever(t *testing.T) { ) require.NoError(t, err) - llm, err := openai.New() - require.NoError(t, err) - result, err := chains.Run( context.TODO(), chains.NewRetrievalQAFromLLM( @@ -246,7 +255,10 @@ func TestPineconeAsRetrieverWithScoreThreshold(t *testing.T) { t.Parallel() environment, apiKey, indexName, projectName := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) store, err := pinecone.New( @@ -274,9 +286,6 @@ func TestPineconeAsRetrieverWithScoreThreshold(t *testing.T) { ) require.NoError(t, err) - llm, err := openai.New() - require.NoError(t, err) - result, err := chains.Run( context.TODO(), chains.NewRetrievalQAFromLLM( @@ -297,7 +306,10 @@ func TestPineconeAsRetrieverWithMetadataFilterEqualsClause(t *testing.T) { t.Parallel() environment, apiKey, indexName, projectName := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) store, err := pinecone.New( @@ -350,9 +362,6 @@ func TestPineconeAsRetrieverWithMetadataFilterEqualsClause(t *testing.T) { ) require.NoError(t, err) - llm, err := openai.New() - require.NoError(t, err) - filter := make(map[string]any) filterValue := make(map[string]any) filterValue["$eq"] = "patio" @@ -376,7 +385,10 @@ func TestPineconeAsRetrieverWithMetadataFilterInClause(t *testing.T) { t.Parallel() environment, apiKey, indexName, projectName := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) store, err := pinecone.New( @@ -429,9 +441,6 @@ func TestPineconeAsRetrieverWithMetadataFilterInClause(t *testing.T) { ) require.NoError(t, err) - llm, err := openai.New() - require.NoError(t, err) - filter := make(map[string]any) filterValue := make(map[string]any) filterValue["$in"] = []string{"office", "kitchen"} @@ -456,7 +465,10 @@ func TestPineconeAsRetrieverWithMetadataFilterNotSelected(t *testing.T) { t.Parallel() environment, apiKey, indexName, projectName := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) store, err := pinecone.New( @@ -509,9 +521,6 @@ func TestPineconeAsRetrieverWithMetadataFilterNotSelected(t *testing.T) { ) require.NoError(t, err) - llm, err := openai.New() - require.NoError(t, err) - result, err := chains.Run( context.TODO(), chains.NewRetrievalQAFromLLM( @@ -534,7 +543,10 @@ func TestPineconeAsRetrieverWithMetadataFilters(t *testing.T) { t.Parallel() environment, apiKey, indexName, projectName := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) store, err := pinecone.New( @@ -578,9 +590,6 @@ func TestPineconeAsRetrieverWithMetadataFilters(t *testing.T) { ) require.NoError(t, err) - llm, err := openai.New() - require.NoError(t, err) - filter := map[string]interface{}{ "$and": []map[string]interface{}{ { diff --git a/vectorstores/weaviate/weaviate_test.go b/vectorstores/weaviate/weaviate_test.go index ecdbffcbb..d051663b5 100644 --- a/vectorstores/weaviate/weaviate_test.go +++ b/vectorstores/weaviate/weaviate_test.go @@ -10,7 +10,7 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/require" "github.com/tmc/langchaingo/chains" - openaiEmbeddings "github.com/tmc/langchaingo/embeddings/openai" + "github.com/tmc/langchaingo/embeddings" "github.com/tmc/langchaingo/llms/openai" "github.com/tmc/langchaingo/schema" "github.com/tmc/langchaingo/vectorstores" @@ -66,7 +66,10 @@ func TestWeaviateStoreRest(t *testing.T) { t.Parallel() scheme, host := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) store, err := New( @@ -101,7 +104,10 @@ func TestWeaviateStoreRestWithScoreThreshold(t *testing.T) { t.Parallel() scheme, host := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) store, err := New( @@ -149,7 +155,9 @@ func TestSimilaritySearchWithInvalidScoreThreshold(t *testing.T) { t.Parallel() scheme, host := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) store, err := New( @@ -193,7 +201,10 @@ func TestWeaviateAsRetriever(t *testing.T) { t.Parallel() scheme, host := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) store, err := New( @@ -221,9 +232,6 @@ func TestWeaviateAsRetriever(t *testing.T) { ) require.NoError(t, err) - llm, err := openai.New() - require.NoError(t, err) - result, err := chains.Run( context.TODO(), chains.NewRetrievalQAFromLLM( @@ -240,7 +248,10 @@ func TestWeaviateAsRetrieverWithScoreThreshold(t *testing.T) { t.Parallel() scheme, host := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) store, err := New( @@ -269,9 +280,6 @@ func TestWeaviateAsRetrieverWithScoreThreshold(t *testing.T) { ) require.NoError(t, err) - llm, err := openai.New() - require.NoError(t, err) - result, err := chains.Run( context.TODO(), chains.NewRetrievalQAFromLLM( @@ -292,7 +300,10 @@ func TestWeaviateAsRetrieverWithMetadataFilterEqualsClause(t *testing.T) { t.Parallel() scheme, host := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) store, err := New( @@ -348,9 +359,6 @@ func TestWeaviateAsRetrieverWithMetadataFilterEqualsClause(t *testing.T) { ) require.NoError(t, err) - llm, err := openai.New() - require.NoError(t, err) - filter := filters.Where(). WithPath([]string{"location"}). WithOperator(filters.Equal). @@ -380,7 +388,10 @@ func TestWeaviateAsRetrieverWithMetadataFilterNotSelected(t *testing.T) { t.Parallel() scheme, host := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) store, err := New( @@ -436,9 +447,6 @@ func TestWeaviateAsRetrieverWithMetadataFilterNotSelected(t *testing.T) { ) require.NoError(t, err) - llm, err := openai.New() - require.NoError(t, err) - result, err := chains.Run( context.TODO(), chains.NewRetrievalQAFromLLM( @@ -460,7 +468,10 @@ func TestWeaviateAsRetrieverWithMetadataFilters(t *testing.T) { t.Parallel() scheme, host := getValues(t) - e, err := openaiEmbeddings.NewOpenAI() + + llm, err := openai.New() + require.NoError(t, err) + e, err := embeddings.NewEmbedder(llm) require.NoError(t, err) store, err := New( @@ -507,9 +518,6 @@ func TestWeaviateAsRetrieverWithMetadataFilters(t *testing.T) { ) require.NoError(t, err) - llm, err := openai.New() - require.NoError(t, err) - filter := filters.Where().WithOperator(filters.And).WithOperands([]*filters.WhereBuilder{ filters.Where().WithOperator(filters.Or).WithOperands([]*filters.WhereBuilder{ filters.Where().WithPath([]string{"location"}).