diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 48ad5051..f4ca4650 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -7,6 +7,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Check License Header uses: apache/skywalking-eyes/header@v0.4.0 @@ -16,6 +18,41 @@ jobs: - name: Check Spell uses: crate-ci/typos@master + - name: Check README.md and examples + run: |- + # Fetch the main branch + git fetch origin main + + # Find only newly added directories containing go.mod compared to main branch + ADDED_DIRS=$(git diff --diff-filter=A --name-only origin/main...HEAD | grep "go.mod" | xargs -L1 dirname || true) + echo "Newly added directories (compared to main): $ADDED_DIRS" + + # Check if README.md exists in each new directory + for dir in $ADDED_DIRS; do + if [ ! -f "$dir/README.md" ]; then + echo "Error: README.md not found in newly added module directory: $dir" + echo "Please add a [README.md] file to the directory." + echo "📢 You can refer to the following example: https://github.com/cloudwego/eino-ext/blob/main/components/tool/duckduckgo/README.md" + exit 1 + fi + done + + if [ -n "$ADDED_DIRS" ]; then + echo "All newly added go.mod directories have README.md files ✓" + else + echo "No new go.mod directories were added in this PR ✓" + fi + + # Check if examples exist in each new directory + for dir in $ADDED_DIRS; do + if [ ! -d "$dir/examples" ]; then + echo "Error: examples not found in $dir" + echo "📢 examples directory is required for new components, please add some examples for your component usage." + exit 1 + fi + done + echo "All newly added go.mod directories have examples ✓" + # golangci-lint: # runs-on: ubuntu-latest # steps: diff --git a/callbacks/langfuse/go.mod b/callbacks/langfuse/go.mod index a457caac..9285f929 100644 --- a/callbacks/langfuse/go.mod +++ b/callbacks/langfuse/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/bytedance/mockey v1.2.13 github.com/bytedance/sonic v1.12.7 - github.com/cloudwego/eino v0.3.5 + github.com/cloudwego/eino v0.3.7 github.com/cloudwego/eino-ext/libs/acl/langfuse v0.0.0-20250113033825-eb19b2b6b386 github.com/golang/mock v1.6.0 github.com/stretchr/testify v1.10.0 diff --git a/callbacks/langfuse/go.sum b/callbacks/langfuse/go.sum index 8c40cc49..e826cbb2 100644 --- a/callbacks/langfuse/go.sum +++ b/callbacks/langfuse/go.sum @@ -15,8 +15,8 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.5 h1:9PkAOX/phFifrGXkfl4L9rdecxOQJBJY1FtZqF4bz3c= -github.com/cloudwego/eino v0.3.5/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/eino-ext/libs/acl/langfuse v0.0.0-20250113033825-eb19b2b6b386 h1:dF//5iW+PCS8ZnZ0PwmO2enn3Oek++mbgB6dmaJAz6o= github.com/cloudwego/eino-ext/libs/acl/langfuse v0.0.0-20250113033825-eb19b2b6b386/go.mod h1:77jqGUJZjxg+V/sJ8S6dd0JtRLO782yVWHmhuFgb9ig= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= diff --git a/components/document/loader/file/examples/customloader/custom_loader_impl.go b/components/document/loader/file/examples/customloader/custom_loader_impl.go new file mode 100644 index 00000000..4af8b4f0 --- /dev/null +++ b/components/document/loader/file/examples/customloader/custom_loader_impl.go @@ -0,0 +1,105 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "context" + "time" + + "github.com/cloudwego/eino/callbacks" + "github.com/cloudwego/eino/components/document" + "github.com/cloudwego/eino/schema" +) + +type customLoaderOptions struct { + Timeout time.Duration + RetryCount int +} + +func WithTimeout(timeout time.Duration) document.LoaderOption { + return document.WrapLoaderImplSpecificOptFn(func(o *customLoaderOptions) { + o.Timeout = timeout + }) +} + +func WithRetryCount(count int) document.LoaderOption { + return document.WrapLoaderImplSpecificOptFn(func(o *customLoaderOptions) { + o.RetryCount = count + }) +} + +func NewCustomLoader(config *Config) (*CustomLoader, error) { + return &CustomLoader{ + timeout: config.DefaultTimeout, + retryCount: config.DefaultRetryCount, + }, nil +} + +type CustomLoader struct { + timeout time.Duration + retryCount int +} + +type Config struct { + DefaultTimeout time.Duration + DefaultRetryCount int +} + +func (l *CustomLoader) Load(ctx context.Context, src document.Source, opts ...document.LoaderOption) ([]*schema.Document, error) { + // 1. 处理 option + options := &customLoaderOptions{ + Timeout: l.timeout, + RetryCount: l.retryCount, + } + options = document.GetLoaderImplSpecificOptions(options, opts...) + var err error + + // 2. 处理错误,并进行错误回调方法 + defer func() { + if err != nil { + callbacks.OnError(ctx, err) + } + }() + + // 3. 开始加载前的回调 + ctx = callbacks.OnStart(ctx, &document.LoaderCallbackInput{ + Source: src, + }) + + // 4. 执行加载逻辑 + docs, err := l.doLoad(ctx, src, options) + + if err != nil { + return nil, err + } + + ctx = callbacks.OnEnd(ctx, &document.LoaderCallbackOutput{ + Source: src, + Docs: docs, + }) + + return docs, nil +} + +func (l *CustomLoader) doLoad(ctx context.Context, src document.Source, opts *customLoaderOptions) ([]*schema.Document, error) { + // 实现文档加载逻辑 + // 1. 加载文档内容 + // 2. 构造 Document 对象,注意可在 MetaData 中保存文档来源等重要信息 + return []*schema.Document{{ + Content: "Hello World", + }}, nil +} diff --git a/components/document/loader/file/examples/customloader/main.go b/components/document/loader/file/examples/customloader/main.go new file mode 100644 index 00000000..d8bf0424 --- /dev/null +++ b/components/document/loader/file/examples/customloader/main.go @@ -0,0 +1,50 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "context" + "log" + "time" + + "github.com/cloudwego/eino/components/document" +) + +func main() { + ctx := context.Background() + + log.Printf("===== call Custom Loader directly =====") + // 初始化 loader + loader, err := NewCustomLoader(&Config{ + DefaultTimeout: 10 * time.Second, + DefaultRetryCount: 10, + }) + if err != nil { + log.Fatalf("NewCustomLoader failed, err=%v", err) + } + + // 加载文档 + filePath := "../../testdata/test.md" + docs, err := loader.Load(ctx, document.Source{ + URI: filePath, + }) + if err != nil { + log.Fatalf("loader.Load failed, err=%v", err) + } + + log.Printf("doc content: %v", docs[0].Content) +} diff --git a/components/document/loader/file/examples/fileloader/main.go b/components/document/loader/file/examples/fileloader/main.go new file mode 100644 index 00000000..de0212c2 --- /dev/null +++ b/components/document/loader/file/examples/fileloader/main.go @@ -0,0 +1,93 @@ +/* + * Copyright 2024 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "context" + "log" + + "github.com/cloudwego/eino/callbacks" + "github.com/cloudwego/eino/components/document" + "github.com/cloudwego/eino/compose" + "github.com/cloudwego/eino/schema" + callbacksHelper "github.com/cloudwego/eino/utils/callbacks" + + "github.com/cloudwego/eino-ext/components/document/loader/file" +) + +func main() { + ctx := context.Background() + + log.Printf("===== call File Loader directly =====") + // 初始化 loader (以file loader为例) + loader, err := file.NewFileLoader(ctx, &file.FileLoaderConfig{ + // 配置参数 + UseNameAsID: true, + }) + if err != nil { + log.Fatalf("file.NewFileLoader failed, err=%v", err) + } + + // 加载文档 + filePath := "../../testdata/test.md" + docs, err := loader.Load(ctx, document.Source{ + URI: filePath, + }) + if err != nil { + log.Fatalf("loader.Load failed, err=%v", err) + } + + log.Printf("doc content: %v", docs[0].Content) + log.Printf("Extension: %s\n", docs[0].MetaData[file.MetaKeyExtension]) // 输出: Extension: .txt + log.Printf("Source: %s\n", docs[0].MetaData[file.MetaKeySource]) // 输出: Source: ./document.txt + + log.Printf("===== call File Loader in Chain =====") + // 创建 callback handler + handlerHelper := &callbacksHelper.LoaderCallbackHandler{ + OnStart: func(ctx context.Context, info *callbacks.RunInfo, input *document.LoaderCallbackInput) context.Context { + log.Printf("start loading docs...: %s\n", input.Source.URI) + return ctx + }, + OnEnd: func(ctx context.Context, info *callbacks.RunInfo, output *document.LoaderCallbackOutput) context.Context { + log.Printf("complete loading docs,total loaded docs: %d\n", len(output.Docs)) + return ctx + }, + // OnError + } + + // 使用 callback handler + handler := callbacksHelper.NewHandlerHelper(). + Loader(handlerHelper). + Handler() + + chain := compose.NewChain[document.Source, []*schema.Document]() + chain.AppendLoader(loader) + // 在运行时使用 + run, err := chain.Compile(ctx) + if err != nil { + log.Fatalf("chain.Compile failed, err=%v", err) + } + + outDocs, err := run.Invoke(ctx, document.Source{ + URI: filePath, + }, compose.WithCallbacks(handler)) + if err != nil { + log.Fatalf("run.Invoke failed, err=%v", err) + } + + log.Printf("doc content: %v", outDocs[0].Content) +} diff --git a/components/document/loader/file/go.mod b/components/document/loader/file/go.mod index 294e0b0c..bddf6781 100644 --- a/components/document/loader/file/go.mod +++ b/components/document/loader/file/go.mod @@ -3,7 +3,7 @@ module github.com/cloudwego/eino-ext/components/document/loader/file go 1.18 require ( - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/stretchr/testify v1.9.0 ) diff --git a/components/document/loader/file/go.sum b/components/document/loader/file/go.sum index d2debb17..8518e6cc 100644 --- a/components/document/loader/file/go.sum +++ b/components/document/loader/file/go.sum @@ -11,8 +11,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -114,6 +114,7 @@ github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95 github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= github.com/yargevad/filepathx v1.0.0 h1:SYcT+N3tYGi+NvazubCNlvgIPbzAk7i7y2dwg3I5FYc= github.com/yargevad/filepathx v1.0.0/go.mod h1:BprfX/gpYNJHJfc35GjRRpVcwWXS89gGulUIU5tK3tA= +go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= diff --git a/components/document/loader/s3/go.mod b/components/document/loader/s3/go.mod index 8c93c8e1..b4f60feb 100644 --- a/components/document/loader/s3/go.mod +++ b/components/document/loader/s3/go.mod @@ -8,7 +8,7 @@ require ( github.com/aws/aws-sdk-go-v2/credentials v1.17.42 github.com/aws/aws-sdk-go-v2/service/s3 v1.66.2 github.com/bytedance/mockey v1.2.13 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/stretchr/testify v1.9.0 ) diff --git a/components/document/loader/s3/go.sum b/components/document/loader/s3/go.sum index f5bd29e4..2a86955f 100644 --- a/components/document/loader/s3/go.sum +++ b/components/document/loader/s3/go.sum @@ -49,8 +49,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/document/loader/url/go.mod b/components/document/loader/url/go.mod index ff8cd96f..63dfb978 100644 --- a/components/document/loader/url/go.mod +++ b/components/document/loader/url/go.mod @@ -3,7 +3,7 @@ module github.com/cloudwego/eino-ext/components/document/loader/url go 1.18 require ( - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/cloudwego/eino-ext/components/document/parser/html v0.0.0-20241224063832-9fbcc0e56c28 github.com/stretchr/testify v1.9.0 ) diff --git a/components/document/loader/url/go.sum b/components/document/loader/url/go.sum index 04b5f723..c4215a76 100644 --- a/components/document/loader/url/go.sum +++ b/components/document/loader/url/go.sum @@ -17,8 +17,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/eino-ext/components/document/parser/html v0.0.0-20241224063832-9fbcc0e56c28 h1:Z1cWrlqxdc5IuPV1UcqoW2BGlFr7IQJHGwn7I3Tax0A= github.com/cloudwego/eino-ext/components/document/parser/html v0.0.0-20241224063832-9fbcc0e56c28/go.mod h1:e+Hf9OyKXFxAoCTF3thTm2Sz8KDfJ/iiEOHOmADpxRI= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= diff --git a/components/document/parser/html/go.mod b/components/document/parser/html/go.mod index fc3e9106..83ea9658 100644 --- a/components/document/parser/html/go.mod +++ b/components/document/parser/html/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/PuerkitoBio/goquery v1.8.1 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/microcosm-cc/bluemonday v1.0.27 github.com/stretchr/testify v1.9.0 ) diff --git a/components/document/parser/html/go.sum b/components/document/parser/html/go.sum index 034ca63d..f2efd9cb 100644 --- a/components/document/parser/html/go.sum +++ b/components/document/parser/html/go.sum @@ -17,8 +17,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/document/parser/pdf/go.mod b/components/document/parser/pdf/go.mod index e903f5b4..ff3f3660 100644 --- a/components/document/parser/pdf/go.mod +++ b/components/document/parser/pdf/go.mod @@ -3,7 +3,7 @@ module github.com/cloudwego/eino-ext/components/document/parser/pdf go 1.18 require ( - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/dslipak/pdf v0.0.2 github.com/stretchr/testify v1.9.0 ) diff --git a/components/document/parser/pdf/go.sum b/components/document/parser/pdf/go.sum index 201226ef..35cfeec0 100644 --- a/components/document/parser/pdf/go.sum +++ b/components/document/parser/pdf/go.sum @@ -11,8 +11,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/document/transformer/reranker/score/go.mod b/components/document/transformer/reranker/score/go.mod index f39d9aea..27f304b6 100644 --- a/components/document/transformer/reranker/score/go.mod +++ b/components/document/transformer/reranker/score/go.mod @@ -2,7 +2,7 @@ module github.com/cloudwego/eino-ext/components/document/transformer/reranker/sc go 1.18 -require github.com/cloudwego/eino v0.3.4 +require github.com/cloudwego/eino v0.3.7 require ( github.com/bytedance/sonic v1.12.2 // indirect diff --git a/components/document/transformer/reranker/score/go.sum b/components/document/transformer/reranker/score/go.sum index 926fc48e..d7be20ee 100644 --- a/components/document/transformer/reranker/score/go.sum +++ b/components/document/transformer/reranker/score/go.sum @@ -11,8 +11,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/document/transformer/splitter/html/go.mod b/components/document/transformer/splitter/html/go.mod index f613883b..bdd26523 100644 --- a/components/document/transformer/splitter/html/go.mod +++ b/components/document/transformer/splitter/html/go.mod @@ -3,7 +3,7 @@ module github.com/cloudwego/eino-ext/components/document/transformer/splitter/ht go 1.18 require ( - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 golang.org/x/net v0.33.0 ) diff --git a/components/document/transformer/splitter/html/go.sum b/components/document/transformer/splitter/html/go.sum index 1b0baa44..59cb4a90 100644 --- a/components/document/transformer/splitter/html/go.sum +++ b/components/document/transformer/splitter/html/go.sum @@ -11,8 +11,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/document/transformer/splitter/markdown/examples/headersplitter/main.go b/components/document/transformer/splitter/markdown/examples/headersplitter/main.go new file mode 100644 index 00000000..9200ed14 --- /dev/null +++ b/components/document/transformer/splitter/markdown/examples/headersplitter/main.go @@ -0,0 +1,99 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "context" + "log" + + "github.com/cloudwego/eino/callbacks" + "github.com/cloudwego/eino/components/document" + "github.com/cloudwego/eino/compose" + "github.com/cloudwego/eino/schema" + callbacksHelper "github.com/cloudwego/eino/utils/callbacks" + + "github.com/cloudwego/eino-ext/components/document/transformer/splitter/markdown" +) + +func main() { + ctx := context.Background() + + // 初始化 transformer (以 markdown 为例) + transformer, err := markdown.NewHeaderSplitter(ctx, &markdown.HeaderConfig{ + // 配置参数 + Headers: map[string]string{ + "##": "headerNameOfLevel2", + }, + }) + if err != nil { + log.Fatalf("markdown.NewHeaderSplitter failed, err=%v", err) + } + + markdownDoc := &schema.Document{ + Content: "## Title 1\nHello Word\n## Title 2\nWord Hello", + } + + log.Printf("===== call Header Splitter directly =====") + + // 转换文档 + transformedDocs, err := transformer.Transform(ctx, []*schema.Document{markdownDoc}) + if err != nil { + log.Fatalf("transformer.Transform failed, err=%v", err) + } + + for idx, doc := range transformedDocs { + log.Printf("doc segment %v: %v", idx, doc.Content) + } + + log.Printf("===== call Header Splitter in chain =====") + + // 创建 callback handler + handlerHelper := &callbacksHelper.TransformerCallbackHandler{ + OnStart: func(ctx context.Context, info *callbacks.RunInfo, input *document.TransformerCallbackInput) context.Context { + log.Printf("input access, len: %v, content: %s\n", len(input.Input), input.Input[0].Content) + return ctx + }, + OnEnd: func(ctx context.Context, info *callbacks.RunInfo, output *document.TransformerCallbackOutput) context.Context { + log.Printf("output finished, len: %v\n", len(output.Output)) + return ctx + }, + // OnError + } + + // 使用 callback handler + handler := callbacksHelper.NewHandlerHelper(). + Transformer(handlerHelper). + Handler() + + chain := compose.NewChain[[]*schema.Document, []*schema.Document]() + chain.AppendDocumentTransformer(transformer) + + // 在运行时使用 + run, err := chain.Compile(ctx) + if err != nil { + log.Fatalf("chain.Compile failed, err=%v", err) + } + + outDocs, err := run.Invoke(ctx, []*schema.Document{markdownDoc}, compose.WithCallbacks(handler)) + if err != nil { + log.Fatalf("run.Invoke failed, err=%v", err) + } + + for idx, doc := range outDocs { + log.Printf("doc segment %v: %v", idx, doc.Content) + } +} diff --git a/components/document/transformer/splitter/markdown/go.mod b/components/document/transformer/splitter/markdown/go.mod index d91baed0..6118c659 100644 --- a/components/document/transformer/splitter/markdown/go.mod +++ b/components/document/transformer/splitter/markdown/go.mod @@ -2,7 +2,7 @@ module github.com/cloudwego/eino-ext/components/document/transformer/splitter/ma go 1.18 -require github.com/cloudwego/eino v0.3.4 +require github.com/cloudwego/eino v0.3.7 require ( github.com/bytedance/sonic v1.12.2 // indirect diff --git a/components/document/transformer/splitter/markdown/go.sum b/components/document/transformer/splitter/markdown/go.sum index 926fc48e..d7be20ee 100644 --- a/components/document/transformer/splitter/markdown/go.sum +++ b/components/document/transformer/splitter/markdown/go.sum @@ -11,8 +11,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/document/transformer/splitter/markdown/header.go b/components/document/transformer/splitter/markdown/header.go index c587d182..6d468408 100644 --- a/components/document/transformer/splitter/markdown/header.go +++ b/components/document/transformer/splitter/markdown/header.go @@ -26,7 +26,28 @@ import ( ) type HeaderConfig struct { - // Headers specify the headers to be identified and their names in document metadata. Headers can only consist of '#'. + // Headers specify the headers to be identified and their names in document metadata. + // Headers can only consist of '#'. + // e.g. + // // the Header Config: + // config := &HeaderConfig{ + // Headers: map[string]string{ "##": "headerNameOfLevel2" }, + // TrimHeaders: false, + // } + // + // // the original document: + // originDoc := &schema.Document{ + // Content: "hell\n##Title 2\n hello world", + // } + // + // // one of the split documents: + // splitDoc := &schema.Document{ + // Content: "##Title 2\n hello world", + // Metadata: map[string]any{ + // // other fields + // "headerNameOfLevel2": "Title 2", + // }, + // } Headers map[string]string // TrimHeaders specify if results contain header lines. TrimHeaders bool diff --git a/components/document/transformer/splitter/recursive/README.md b/components/document/transformer/splitter/recursive/README.md new file mode 100644 index 00000000..fb3b6887 --- /dev/null +++ b/components/document/transformer/splitter/recursive/README.md @@ -0,0 +1,33 @@ +# recursive splitter + +Recursive splitter is a splitter that splits the text into chunks recursively. Useful for splitting long text into chunks. + +`OverlapSize` in config can set the overlap content length from last chunk, this may help to keep the context of last chunk. + +## Usage + +example at: [examples/main.go](examples/main.go) +run example: `cd examples && go run main.go` + +```go +import ( + "context" + "fmt" + "os" + + "github.com/cloudwego/eino-ext/components/document/transformer/splitter/recursive" +) + +func main() { + ctx := context.Background() + + splitter, err := recursive.NewSplitter(ctx, &recursive.Config{ + ChunkSize: 1500, + OverlapSize: 300, + }) + + docs, err := splitter.Transform(ctx, []*schema.Document{ + {Content: "test content"}, + }) +} +``` diff --git a/components/embedding/openai/examples/embedding/embedding.go b/components/document/transformer/splitter/recursive/examples/main.go similarity index 55% rename from components/embedding/openai/examples/embedding/embedding.go rename to components/document/transformer/splitter/recursive/examples/main.go index a9c477ae..9fad6a02 100644 --- a/components/embedding/openai/examples/embedding/embedding.go +++ b/components/document/transformer/splitter/recursive/examples/main.go @@ -19,34 +19,45 @@ package main import ( "context" "fmt" + "log" "os" - "github.com/cloudwego/eino-ext/components/embedding/openai" + "github.com/cloudwego/eino/schema" + + "github.com/cloudwego/eino-ext/components/document/transformer/splitter/recursive" ) func main() { - accessKey := os.Getenv("OPENAI_API_KEY") - ctx := context.Background() - var ( - defaultDim = 1024 - ) - - embedding, err := openai.NewEmbedder(ctx, &openai.EmbeddingConfig{ - APIKey: accessKey, - Model: "text-embedding-3-large", - Dimensions: &defaultDim, - Timeout: 0, + splitter, err := recursive.NewSplitter(ctx, &recursive.Config{ + ChunkSize: 1500, + OverlapSize: 300, + KeepType: recursive.KeepTypeNone, }) if err != nil { - panic(fmt.Errorf("new embedder error: %v\n", err)) + log.Fatal(err) + } + + file := "./testdata/einodoc.md" + data, err := os.ReadFile(file) + if err != nil { + log.Fatal(err) } - resp, err := embedding.EmbedStrings(ctx, []string{"hello", "how are you"}) + docs, err := splitter.Transform(ctx, []*schema.Document{ + { + Content: string(data), + }, + }) + if err != nil { - panic(fmt.Errorf("generate failed, err=%v", err)) + log.Fatal(err) + } + + for idx, doc := range docs { + fmt.Printf("====== %02d ======\n", idx) + fmt.Println(doc.Content) } - fmt.Printf("output=%v", resp) } diff --git a/components/document/transformer/splitter/recursive/examples/testdata/einodoc.md b/components/document/transformer/splitter/recursive/examples/testdata/einodoc.md new file mode 100644 index 00000000..f6afe183 --- /dev/null +++ b/components/document/transformer/splitter/recursive/examples/testdata/einodoc.md @@ -0,0 +1,191 @@ +# 简介 + +**Eino['aino]**(谐音 “I know”)旨在成为用 Go 语言编写的终极大型语言模型(LLM)应用开发框架。它从开源社区中的诸多优秀 LLM 应用开发框架,如 LangChain 和 LlamaIndex 等获取灵感,同时借鉴前沿研究成果与实际应用,提供了一个强调简洁性、可扩展性、可靠性与有效性,且更符合 Go 语言编程惯例的 LLM 应用开发框架。 + +Eino 提供的价值如下: +- 精心整理的一系列 **组件(component)** 抽象与实现,可轻松复用与组合,用于构建 LLM 应用。 +- 强大的 **编排(orchestration)** 框架,为用户承担繁重的类型检查、流式处理、并发管理、切面注入、选项赋值等工作。 +- 一套精心设计、注重简洁明了的 **API**。 +- 以集成 **流程(flow)** 和 **示例(example)** 形式不断扩充的最佳实践集合。 +- 一套实用 **工具(DevOps tools)**,涵盖从可视化开发与调试到在线追踪与评估的整个开发生命周期。 + +借助上述能力和工具,Eino 能够在人工智能应用开发生命周期的不同阶段实现标准化、简化操作并提高效率: + +![](.github/static/img/eino/eino_concept.jpeg) + +# 快速上手 + +直接使用组件: +```Go +model, _ := openai.NewChatModel(ctx, config) // create an invokable LLM instance + +message, _ := model.Generate(ctx, []*Message{ + SystemMessage("you are a helpful assistant."), + UserMessage("what does the future AI App look like?")}) +``` + +当然,你可以这样用,Eino 提供了许多开箱即用的有用组件。但通过使用编排功能,你能实现更多,原因有三: +- 编排封装了大语言模型(LLM)应用的常见模式。 +- 编排解决了处理大语言模型流式响应这一难题。 +- 编排为你处理类型安全、并发管理、切面注入以及选项赋值等问题。 + +Eino 提供了两组用于编排的 API: + +| API | 特性和使用场景 | +| -------- |-----------------------------| +| Chain | 简单的链式有向图,只能向前推进。 | +| Graph | 循环或非循环有向图。功能强大且灵活。 | + +我们来创建一个简单的 chain: 一个模版(ChatTemplate)接一个大模型(ChatModel)。 + +![](.github/static/img/eino/simple_chain.png) + +```Go +chain, _ := NewChain[map[string]any, *Message](). + AppendChatTemplate(prompt). + AppendChatModel(model). + Compile(ctx) +chain.Invoke(ctx, map[string]any{"query": "what's your name?"}) +``` + +现在,我们来创建一个 Graph,先用一个 ChatModel 生成 Tool 调用指令,接着用一个 ToolsNode 执行这些Tool,然后将 Tool 的响应反馈给 ChatModel。 + +![](.github/static/img/eino/simple_graph.png) + +```Go +graph := NewGraph[[]*Message, *Message]() +graph.AddChatModelNode("node_model", model) +graph.AddToolsNode("node_tools", toolsNode) +graph.AddEdge(START, "node_model") +graph.AddEdge("node_tools", "node_model") +graph.AddBranch("node_model", branch) +runnable, _ := graph.Compile(ctx) +runnable.Stream(ctx, []*Message{UserMessage("help me plan my weekend")}) +``` + +现在,咱们来创建一个 “ReAct” 智能体:一个 ChatModel 绑定了一些 Tool。它接收输入的消息,自主判断是调用 Tool 还是输出最终结果。Tool 的执行结果会再次成为聊天模型的输入消息,并作为下一轮自主判断的上下文。 + +![](.github/static/img/eino/react.png) + +我们在 Eino 的 `flow` 包中提供了开箱即用的 ReAct 智能体的完整实现。代码参见: [flow/agent/react](https://github.com/cloudwego/eino/blob/main/flow/agent/react/react.go) + +我们的 ReAct 智能体实现完全基于 Eino 的编排能力。通过使用 Eino 编排,我们可以自动获得如下能力: + +- **类型检查**:在编译时确保两个节点的输入和输出类型匹配。 +- **流处理**:如有需要,在将消息流传递给 ChatModel 和 ToolsNode 节点之前进行拼接,以及将该流复制到callback handler 中。 +- **并发管理**:由于 StatePreHandler是线程安全的,共享的 state 可以被安全地读写。 +- **切面注入**:如果指定的 ChatModel 实现未自行注入,会在 ChatModel 执行之前和之后注入回调切面。 +- **选项赋值**:调用 Option 可以全局设置,也可以针对特定组件类型或特定节点进行设置。 + +例如,你可以轻松地通过回调扩展已编译的图: +```Go +handler := NewHandlerBuilder(). + OnStartFn( + func(ctx context.Context, info *RunInfo, input CallbackInput) context.Context) { + log.Infof("onStart, runInfo: %v, input: %v", info, input) + }). + OnEndFn( + func(ctx context.Context, info *RunInfo, output CallbackOutput) context.Context) { + log.Infof("onEnd, runInfo: %v, out: %v", info, output) + }). + Build() + +compiledGraph.Invoke(ctx, input, WithCallbacks(handler)) +``` + +或者你可以轻松地为不同节点分配选项: +```Go +// assign to All nodes +compiledGraph.Invoke(ctx, input, WithCallbacks(handler)) + +// assign only to ChatModel nodes +compiledGraph.Invoke(ctx, input, WithChatModelOption(WithTemperature(0.5)) + +// assign only to node_1 +compiledGraph.Invoke(ctx, input, WithCallbacks(handler).DesignateNode("node_1")) +``` + + +# 关键特性 + +## 丰富的组件 + +- 将常见的构建模块封装为**组件抽象**,每个组件抽象都有多个可开箱即用的**组件实现**。 + - 诸如 ChatModel、Tool、ChatTemplate、Retriever、Document Loader、Lambda 等组件抽象。 + - 每种组件类型都有其自身的接口:定义了输入和输出类型、定义了选项类型,以及合理的流处理范式。 + - 实现细节是透明的。在编排组件时,你只需关注抽象层面。 +- 实现可以嵌套,并包含复杂的业务逻辑。 + - ReAct Agent、MultiQueryRetriever、Host MultiAgent 等。它们由多个组件和复杂的业务逻辑构成。 + - 从外部看,它们的实现细节依然透明。例如在任何接受 Retriever 的地方,都可以使用 MultiQueryRetriever。 + +## 强大的编排 (Graph/Chain/Workflow) + +- 数据从 Retriever / Document Loader / ChatTemplate 流向 ChatModel,接着流向 Tool ,并被解析为最终答案。这种通过多个组件的有向、可控的数据流,可以通过**图编排**来实现。 +- 组件实例是图的**节点(Node)**,而**边(Edge)**则是数据流通道。 +- 图编排功能强大且足够灵活,能够实现复杂的业务逻辑: + - **类型检查、流处理、并发管理、切面注入和选项分配**都由框架处理。 + - 在运行时进行**分支(Branch)**执行、读写全局**状态(State)**,或者使用工作流进行字段级别的数据映射。 + +## 完整的流式处理能力 + +- 流式处理(Stream Processing)很重要,因为 ChatModel 在生成消息时会实时输出消息块。在编排场景下会尤为重要,因为更多的组件需要处理流式数据。 +- 对于只接受非流式输入的下游节点(如 ToolsNode),Eino 会自动将流 **拼接(Concatenate)** 起来。 +- 在图执行过程中,当需要流时,Eino 会自动将非流式**转换**为流式。 +- 当多个流汇聚到一个下游节点时,Eino 会自动 **合并(Merge)** 这些流。 +- 当流分散到不同的下游节点或传递给回调处理器时,Eino 会自动 **复制(Copy)** 这些流。 +- 如 **分支(Branch)** 、或 **状态处理器(StateHandler)** 等编排元素,也能够感知和处理流。 +- 借助上述流式处理能力,组件本身的流式处理范式变的对用户透明。 +- 经过编译的 Graph 可以用 4 种不同的流式范式来运行: + +| 流处理范式 | 解释 | +|-----------|-----------------------------------------------| +| Invoke | 接收非流类型 I ,返回非流类型 O | +| Stream | 接收非流类型 I , 返回流类型 StreamReader[O] | +| Collect | 接收流类型 StreamReader[I] , 返回非流类型 O | +| Transform | 接收流类型 StreamReader[I] , 返回流类型 StreamReader[O] | + +## 易扩展的切面(Callbacks) + +- 切面用于处理诸如日志记录、追踪、指标统计等横切面关注点,同时也用于暴露组件实现的内部细节。 +- 支持五种切面:**OnStart、OnEnd、OnError、OnStartWithStreamInput、OnEndWithStreamOutput**。 +- 开发者可以轻松创建自定义回调处理程序,在图运行期间通过 Option 添加它们,这些处理程序会在图运行时被调用。 +- 图还能将切面注入到那些自身不支持回调的组件实现中。 + +# Eino 框架结构 + +![](.github/static/img/eino/eino_framework.jpeg) + +Eino 框架由几个部分组成: +- Eino(本代码仓库):包含类型定义、流处理机制、组件抽象、编排功能、切面机制等。 +- [EinoExt](https://github.com/cloudwego/eino-ext):组件实现、回调处理程序实现、组件使用示例,以及各种工具,如评估器、提示优化器等。 +- [Eino Devops](https://github.com/cloudwego/eino-ext/devops):可视化开发、可视化调试等。 +- [EinoExamples](https://github.com/cloudwego/eino-examples):是包含示例应用程序和最佳实践的代码仓库。 + +## 详细文档 + +针对 Eino 的学习和使用,我们提供了完善的 Eino用户手册,帮助大家快速理解 Eino 中的概念,掌握基于 Eino 开发设计 AI 应用的技能,赶快通过[Eino 用户手册](https://www.cloudwego.io/zh/docs/eino/)尝试使用吧~。 + +若想快速上手,了解 通过 Eino 构建 AI 应用的过程,推荐先阅读[Eino: 快速开始](https://www.cloudwego.io/zh/docs/eino/quick_start/) + +## 依赖说明 +- Go 1.18 及以上版本 +- Eino 依赖了 [kin-openapi](https://github.com/getkin/kin-openapi) 的 OpenAPI JSONSchema 实现。为了能够兼容 Go 1.18 版本,我们将 kin-openapi 的版本固定在了 v0.118.0。 + +## 安全 + +如果你在该项目中发现潜在的安全问题,或你认为可能发现了安全问题,请通过我们的[安全中心](https://security.bytedance.com/src) +或[漏洞报告邮箱](sec@bytedance.com)通知字节跳动安全团队。 + +请**不要**创建公开的 GitHub Issue。 + +## 联系我们 + +- 如何成为 member: [COMMUNITY MEMBERSHIP](https://github.com/cloudwego/community/blob/main/COMMUNITY_MEMBERSHIP.md) +- Issues: [Issues](https://github.com/cloudwego/eino/issues) +- 飞书用户群([注册飞书](https://www.feishu.cn/)后扫码进群) + +    LarkGroup + +## 开源许可证 + +本项目依据 [Apache-2.0 许可证](LICENSE.txt) 授权。 diff --git a/components/document/transformer/splitter/recursive/go.mod b/components/document/transformer/splitter/recursive/go.mod index 1023caac..5b23f1b3 100644 --- a/components/document/transformer/splitter/recursive/go.mod +++ b/components/document/transformer/splitter/recursive/go.mod @@ -2,7 +2,7 @@ module github.com/cloudwego/eino-ext/components/document/transformer/splitter/re go 1.18 -require github.com/cloudwego/eino v0.3.4 +require github.com/cloudwego/eino v0.3.7 require ( github.com/bytedance/sonic v1.12.2 // indirect diff --git a/components/document/transformer/splitter/recursive/go.sum b/components/document/transformer/splitter/recursive/go.sum index 926fc48e..d7be20ee 100644 --- a/components/document/transformer/splitter/recursive/go.sum +++ b/components/document/transformer/splitter/recursive/go.sum @@ -11,8 +11,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/document/transformer/splitter/recursive/recursive.go b/components/document/transformer/splitter/recursive/recursive.go index 83e1f281..973d53c4 100644 --- a/components/document/transformer/splitter/recursive/recursive.go +++ b/components/document/transformer/splitter/recursive/recursive.go @@ -72,7 +72,7 @@ func NewSplitter(ctx context.Context, config *Config) (document.Transformer, err lenFunc: lenFunc, chunkSize: config.ChunkSize, overlap: config.OverlapSize, - separators: config.Separators, + separators: seps, keepType: config.KeepType, }, nil } diff --git a/components/document/transformer/splitter/semantic/go.mod b/components/document/transformer/splitter/semantic/go.mod index 0f72a55f..e706b1a6 100644 --- a/components/document/transformer/splitter/semantic/go.mod +++ b/components/document/transformer/splitter/semantic/go.mod @@ -2,7 +2,7 @@ module github.com/cloudwego/eino-ext/components/document/transformer/splitter/se go 1.18 -require github.com/cloudwego/eino v0.3.4 +require github.com/cloudwego/eino v0.3.7 require ( github.com/bytedance/sonic v1.12.2 // indirect diff --git a/components/document/transformer/splitter/semantic/go.sum b/components/document/transformer/splitter/semantic/go.sum index 926fc48e..d7be20ee 100644 --- a/components/document/transformer/splitter/semantic/go.sum +++ b/components/document/transformer/splitter/semantic/go.sum @@ -11,8 +11,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/embedding/ark/go.mod b/components/embedding/ark/go.mod index bd586f78..74ff7184 100644 --- a/components/embedding/ark/go.mod +++ b/components/embedding/ark/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/bytedance/mockey v1.2.12 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/smartystreets/goconvey v1.8.1 github.com/volcengine/volcengine-go-sdk v1.0.160 ) diff --git a/components/embedding/ark/go.sum b/components/embedding/ark/go.sum index 8ddeb80b..05eb8047 100644 --- a/components/embedding/ark/go.sum +++ b/components/embedding/ark/go.sum @@ -18,8 +18,8 @@ github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEex github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/embedding/dashscope/go.mod b/components/embedding/dashscope/go.mod index 5e834e17..ff52d2f1 100644 --- a/components/embedding/dashscope/go.mod +++ b/components/embedding/dashscope/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/bytedance/mockey v1.2.13 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/cloudwego/eino-ext/libs/acl/openai v0.0.0-20250106073650-ed838398894a github.com/sashabaranov/go-openai v1.32.5 ) diff --git a/components/embedding/dashscope/go.sum b/components/embedding/dashscope/go.sum index cd98e0e7..5859cff0 100644 --- a/components/embedding/dashscope/go.sum +++ b/components/embedding/dashscope/go.sum @@ -13,8 +13,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/eino-ext/libs/acl/openai v0.0.0-20250106073650-ed838398894a h1:gHpod7vRkLDi4otZjY9pMom35Rk0/kCDbPl2smyjcK0= github.com/cloudwego/eino-ext/libs/acl/openai v0.0.0-20250106073650-ed838398894a/go.mod h1:uUhE8oadYHiRwU8bymmyYK58TYgc5qm794PdyXoGJlo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= diff --git a/components/embedding/openai/examples/embedding/main.go b/components/embedding/openai/examples/embedding/main.go new file mode 100644 index 00000000..d04c0720 --- /dev/null +++ b/components/embedding/openai/examples/embedding/main.go @@ -0,0 +1,94 @@ +/* + * Copyright 2024 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "context" + "fmt" + "log" + "os" + + "github.com/cloudwego/eino/callbacks" + "github.com/cloudwego/eino/components/embedding" + "github.com/cloudwego/eino/compose" + callbacksHelper "github.com/cloudwego/eino/utils/callbacks" + + "github.com/cloudwego/eino-ext/components/embedding/openai" +) + +func main() { + accessKey := os.Getenv("OPENAI_API_KEY") + + ctx := context.Background() + + var ( + defaultDim = 1024 + ) + + embedder, err := openai.NewEmbedder(ctx, &openai.EmbeddingConfig{ + APIKey: accessKey, + Model: "text-embedding-3-large", + Dimensions: &defaultDim, + Timeout: 0, + }) + if err != nil { + panic(fmt.Errorf("new embedder error: %v\n", err)) + } + + log.Printf("===== call Embedder directly =====") + + vectors, err := embedder.EmbedStrings(ctx, []string{"hello", "how are you"}) + if err != nil { + panic(fmt.Errorf("embedder.EmbedStrings failed, err=%v", err)) + } + + log.Printf("vectors : %v", vectors) + + log.Printf("===== call Embedder in Chain =====") + + handlerHelper := &callbacksHelper.EmbeddingCallbackHandler{ + OnStart: func(ctx context.Context, runInfo *callbacks.RunInfo, input *embedding.CallbackInput) context.Context { + log.Printf("input access, len: %v, content: %s\n", len(input.Texts), input.Texts) + return ctx + }, + OnEnd: func(ctx context.Context, runInfo *callbacks.RunInfo, output *embedding.CallbackOutput) context.Context { + log.Printf("output finished, len: %v\n", len(output.Embeddings)) + return ctx + }, + } + + handler := callbacksHelper.NewHandlerHelper(). + Embedding(handlerHelper). + Handler() + + chain := compose.NewChain[[]string, [][]float64]() + chain.AppendEmbedding(embedder) + + // 编译并运行 + runnable, err := chain.Compile(ctx) + if err != nil { + panic(fmt.Errorf("chain.Compile failed, err=%v", err)) + } + + vectors, err = runnable.Invoke(ctx, []string{"hello", "how are you"}, + compose.WithCallbacks(handler)) + if err != nil { + panic(fmt.Errorf("runnable.Invoke failed, err=%v", err)) + } + + log.Printf("vectors in chain: %v", vectors) +} diff --git a/components/embedding/openai/go.mod b/components/embedding/openai/go.mod index 7c8d7a35..272c2617 100644 --- a/components/embedding/openai/go.mod +++ b/components/embedding/openai/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/bytedance/mockey v1.2.13 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/cloudwego/eino-ext/libs/acl/openai v0.0.0-20250114173020-562b40c138d3 github.com/sashabaranov/go-openai v1.32.5 ) diff --git a/components/embedding/openai/go.sum b/components/embedding/openai/go.sum index 128c24ce..6f2d6bf4 100644 --- a/components/embedding/openai/go.sum +++ b/components/embedding/openai/go.sum @@ -13,8 +13,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/eino-ext/libs/acl/openai v0.0.0-20250114173020-562b40c138d3 h1:DHeeScM7IOmh8YxbLLNu5FrUMuylDfnsuZ3QLTEThq0= github.com/cloudwego/eino-ext/libs/acl/openai v0.0.0-20250114173020-562b40c138d3/go.mod h1:H5UK9sjotuBaZCO6CFvPRaYDBBfRz/MSFR9ZNEmwgCo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= diff --git a/components/embedding/qianfan/go.mod b/components/embedding/qianfan/go.mod index dba0a709..ee16814f 100644 --- a/components/embedding/qianfan/go.mod +++ b/components/embedding/qianfan/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/baidubce/bce-qianfan-sdk/go/qianfan v0.0.14 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 ) require ( diff --git a/components/embedding/qianfan/go.sum b/components/embedding/qianfan/go.sum index e9a93f0e..2045cb79 100644 --- a/components/embedding/qianfan/go.sum +++ b/components/embedding/qianfan/go.sum @@ -15,8 +15,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/indexer/es8/README.md b/components/indexer/es8/README.md new file mode 100644 index 00000000..f52a332c --- /dev/null +++ b/components/indexer/es8/README.md @@ -0,0 +1,125 @@ +# ES8 Indexer + +English + +An Elasticsearch 8.x indexer implementation for [Eino](https://github.com/cloudwego/eino) that implements the `Indexer` interface. This enables seamless integration with Eino's vector storage and retrieval system for enhanced semantic search capabilities. + +## Features + +- Implements `github.com/cloudwego/eino/components/indexer.Indexer` +- Easy integration with Eino's indexer system +- Configurable Elasticsearch parameters +- Support for vector similarity search +- Bulk indexing operations +- Custom field mapping support +- Flexible document vectorization + +## Installation + +```bash +go get github.com/cloudwego/eino-ext/components/indexer/es8@latest +``` + +## Quick Start + +Here's a quick example of how to use the indexer, you could read components/indexer/es8/examples/indexer/add_documents.go for more details: + +```go +import ( + "github.com/cloudwego/eino/components/embedding" + "github.com/cloudwego/eino/schema" + "github.com/elastic/go-elasticsearch/v8" + + "github.com/cloudwego/eino-ext/components/indexer/es8" +) + +const ( + indexName = "eino_example" + fieldContent = "content" + fieldContentVector = "content_vector" + fieldExtraLocation = "location" + docExtraLocation = "location" +) + +func main() { + ctx := context.Background() + + // es supports multiple ways to connect + username := os.Getenv("ES_USERNAME") + password := os.Getenv("ES_PASSWORD") + httpCACertPath := os.Getenv("ES_HTTP_CA_CERT_PATH") + + cert, err := os.ReadFile(httpCACertPath) + if err != nil { + panic(err) + } + + client, _ := elasticsearch.NewClient(elasticsearch.Config{ + Addresses: []string{"https://localhost:9200"}, + Username: username, + Password: password, + CACert: cert, + }) + + // create embedding component + emb := createYourEmbedding() + + // load docs + docs := loadYourDocs() + + // create es indexer component + indexer, _ := es8.NewIndexer(ctx, &es8.IndexerConfig{ + Client: client, + Index: indexName, + BatchSize: 10, + DocumentToFields: func(ctx context.Context, doc *schema.Document) (field2Value map[string]es8.FieldValue, err error) { + return map[string]es8.FieldValue{ + fieldContent: { + Value: doc.Content, + EmbedKey: fieldContentVector, // vectorize doc content and save vector to field "content_vector" + }, + fieldExtraLocation: { + Value: doc.MetaData[docExtraLocation], + }, + }, nil + }, + Embedding: emb, // replace it with real embedding component + }) + + ids, _ := indexer.Store(ctx, docs) + + fmt.Println(ids) + // Use with Eino's system + // ... configure and use with Eino +} +``` + +## Configuration + +The indexer can be configured using the `IndexerConfig` struct: + +```go +type IndexerConfig struct { + Client *elasticsearch.Client // Required: Elasticsearch client instance + Index string // Required: Index name to store documents + BatchSize int // Optional: Max texts size for embedding (default: 5) + + // Required: Function to map Document fields to Elasticsearch fields + DocumentToFields func(ctx context.Context, doc *schema.Document) (map[string]FieldValue, error) + + // Optional: Required only if vectorization is needed + Embedding embedding.Embedder +} + +// FieldValue defines how a field should be stored and vectorized +type FieldValue struct { + Value any // Original value to store + EmbedKey string // If set, Value will be vectorized and saved + Stringify func(val any) (string, error) // Optional: custom string conversion +} +``` + +## For More Details + +- [Eino Documentation](https://github.com/cloudwego/eino) +- [Elasticsearch Go Client Documentation](https://github.com/elastic/go-elasticsearch) \ No newline at end of file diff --git a/components/indexer/es8/consts.go b/components/indexer/es8/consts.go new file mode 100644 index 00000000..de8b5bb3 --- /dev/null +++ b/components/indexer/es8/consts.go @@ -0,0 +1,23 @@ +/* + * Copyright 2024 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package es8 + +const typ = "ElasticSearch8" + +const ( + defaultBatchSize = 5 +) diff --git a/components/indexer/es8/examples/embeddings.json b/components/indexer/es8/examples/embeddings.json new file mode 100644 index 00000000..d7154583 --- /dev/null +++ b/components/indexer/es8/examples/embeddings.json @@ -0,0 +1,10631 @@ +{ + "dense": [ + [ + 0.0034694671630859375, + 0.052825927734375, + 0.00843048095703125, + 0.0077972412109375, + 0.004764556884765625, + -0.010284423828125, + -0.0175323486328125, + 0.02288818359375, + -0.005237579345703125, + 0.008026123046875, + -0.017303466796875, + -0.0199737548828125, + -0.01910400390625, + -0.0086212158203125, + 0.00482940673828125, + 0.028533935546875, + 0.084228515625, + 0.005176544189453125, + 0.01045989990234375, + -0.03570556640625, + -0.0264129638671875, + -0.025726318359375, + 0.0014028549194335938, + -0.05609130859375, + -0.0227508544921875, + -0.0003204345703125, + -0.016510009765625, + -0.004596710205078125, + -0.01025390625, + -0.01702880859375, + 0.0011959075927734375, + -0.0111846923828125, + 0.0079193115234375, + 0.05743408203125, + -0.043121337890625, + -0.00223541259765625, + 0.0202484130859375, + -0.047637939453125, + -0.036376953125, + -0.02740478515625, + -0.0225372314453125, + 0.0269622802734375, + 0.0160369873046875, + -0.0157623291015625, + 0.0306549072265625, + -0.08111572265625, + -0.0516357421875, + 0.0031490325927734375, + -0.037994384765625, + -0.05255126953125, + -0.017791748046875, + -0.0035495758056640625, + -0.00612640380859375, + 0.01390838623046875, + -0.037750244140625, + 0.03271484375, + -0.056427001953125, + -0.0312347412109375, + -0.0310516357421875, + -0.04296875, + -0.0401611328125, + 0.0391845703125, + -0.040863037109375, + -0.052398681640625, + 0.0071868896484375, + 0.050506591796875, + 0.0233001708984375, + 0.02154541015625, + -0.0406494140625, + -0.042022705078125, + -0.004314422607421875, + 0.028778076171875, + -0.057159423828125, + 0.0022792816162109375, + -0.0164031982421875, + -0.01541900634765625, + -0.040557861328125, + 0.040435791015625, + -0.01508331298828125, + 0.0008668899536132812, + 0.0180206298828125, + -0.0070343017578125, + 0.01512908935546875, + 0.014739990234375, + -0.01470184326171875, + 0.04388427734375, + 0.0081329345703125, + 0.05914306640625, + -0.0142364501953125, + 0.006092071533203125, + -0.041046142578125, + -0.015625, + 0.0311737060546875, + -0.01416778564453125, + -0.0035076141357421875, + -0.049102783203125, + -0.03240966796875, + -0.0235595703125, + 0.043548583984375, + -0.0038661956787109375, + 0.0038623809814453125, + 0.0134124755859375, + -0.0052032470703125, + 0.0290679931640625, + 0.05145263671875, + 0.006168365478515625, + -0.00556182861328125, + -0.00588226318359375, + 0.01812744140625, + 0.0123138427734375, + 0.022369384765625, + -0.048614501953125, + 0.0592041015625, + 0.00958251953125, + 0.05316162109375, + 0.021453857421875, + -0.0003857612609863281, + -0.00778961181640625, + -0.02008056640625, + -0.002841949462890625, + 0.026885986328125, + 0.00023031234741210938, + 0.06256103515625, + -0.0173187255859375, + 0.037384033203125, + -0.0171356201171875, + 0.0121307373046875, + 0.0146942138671875, + -0.0222015380859375, + 0.013671875, + 0.033172607421875, + 0.00917816162109375, + -0.002223968505859375, + -0.0169830322265625, + -0.0308380126953125, + 0.00858306884765625, + -0.039031982421875, + 0.0294036865234375, + -0.0131378173828125, + -0.01678466796875, + 0.007358551025390625, + -0.0098724365234375, + -0.08148193359375, + -0.059967041015625, + 0.01255035400390625, + -0.0119171142578125, + 0.0037975311279296875, + 0.041412353515625, + 0.0048828125, + -0.053741455078125, + -0.004772186279296875, + 0.04681396484375, + 0.03985595703125, + -0.02587890625, + -0.01253509521484375, + -0.016143798828125, + -0.02294921875, + 0.020172119140625, + -0.022979736328125, + -0.0037670135498046875, + -0.044036865234375, + -0.0225067138671875, + -0.03857421875, + -0.006290435791015625, + 0.017791748046875, + 0.0222320556640625, + -0.015838623046875, + 0.0245513916015625, + -0.0212249755859375, + 0.006702423095703125, + -0.0223846435546875, + -0.040863037109375, + 0.0091705322265625, + -0.00954437255859375, + -0.049407958984375, + 0.0325927734375, + 0.026031494140625, + 0.01363372802734375, + -0.002593994140625, + -0.0228118896484375, + -0.0426025390625, + 0.0099029541015625, + 0.0036907196044921875, + 0.01151275634765625, + -0.0256805419921875, + 0.05010986328125, + 0.01526641845703125, + 0.0034008026123046875, + 0.007312774658203125, + 0.0092010498046875, + 0.0038127899169921875, + -0.0119781494140625, + 0.0296630859375, + -0.0301055908203125, + 0.00975799560546875, + -0.029571533203125, + -0.005352020263671875, + -0.0033740997314453125, + -0.03363037109375, + -0.0645751953125, + -0.05316162109375, + -0.021087646484375, + 0.00293731689453125, + -0.019561767578125, + 0.01983642578125, + 0.0209808349609375, + -0.01210784912109375, + -0.0255279541015625, + 0.006465911865234375, + -0.06494140625, + 0.00507354736328125, + -0.0191650390625, + 0.0032520294189453125, + -0.01213836669921875, + -0.04052734375, + 0.060516357421875, + 0.050323486328125, + 0.034210205078125, + 0.07452392578125, + 0.037384033203125, + 0.0259857177734375, + 0.05029296875, + -0.016815185546875, + -0.02520751953125, + 0.048980712890625, + -0.0145263671875, + 0.0321044921875, + 0.005870819091796875, + -0.026123046875, + -0.0208892822265625, + 0.009674072265625, + 0.00033593177795410156, + -0.0277862548828125, + -0.014801025390625, + -0.0270538330078125, + -0.0161285400390625, + -0.0640869140625, + 0.01522064208984375, + 0.0489501953125, + 0.02996826171875, + 0.0198211669921875, + 0.01323699951171875, + -0.0191650390625, + -0.00682830810546875, + -0.01416778564453125, + 0.005767822265625, + 0.0220947265625, + -0.0256805419921875, + -0.0117645263671875, + -0.00586700439453125, + 0.0034198760986328125, + -0.00859832763671875, + -0.005413055419921875, + 0.0274810791015625, + 0.020965576171875, + 0.017425537109375, + 0.0283966064453125, + -0.00641632080078125, + 0.024566650390625, + -0.0162353515625, + 0.01001739501953125, + -0.0237579345703125, + -0.03521728515625, + 0.042572021484375, + 0.00461578369140625, + -0.013336181640625, + -0.0213623046875, + -0.02288818359375, + 0.01078033447265625, + -0.0325927734375, + 0.02734375, + -0.019195556640625, + 0.0036220550537109375, + 0.00919342041015625, + 0.0264892578125, + 0.019561767578125, + -0.0277862548828125, + 0.0224151611328125, + 0.04608154296875, + -0.01300048828125, + 0.0274658203125, + -0.036224365234375, + 0.0460205078125, + 0.048004150390625, + 0.00362396240234375, + -0.0523681640625, + -0.02569580078125, + 0.002620697021484375, + -0.01030731201171875, + -0.0182037353515625, + -0.030059814453125, + -0.032135009765625, + 0.0298004150390625, + -0.0179901123046875, + 0.029205322265625, + 0.007526397705078125, + 0.0005941390991210938, + -0.197021484375, + -0.0020084381103515625, + -0.0020599365234375, + 0.0218963623046875, + -0.03143310546875, + 0.00916290283203125, + -0.006870269775390625, + -0.06280517578125, + 0.03936767578125, + -0.001605987548828125, + -0.035614013671875, + -0.0230865478515625, + -0.03564453125, + 0.005893707275390625, + 0.037445068359375, + 0.050323486328125, + 0.00594329833984375, + 0.042694091796875, + -0.009033203125, + -0.02276611328125, + -0.033416748046875, + -0.040863037109375, + 0.0682373046875, + -0.027130126953125, + 0.054107666015625, + 0.0107421875, + -0.004207611083984375, + 0.01446533203125, + 0.0255279541015625, + 0.01221466064453125, + -0.0263214111328125, + -0.0149688720703125, + -0.0033416748046875, + 0.005191802978515625, + 0.051727294921875, + 0.03240966796875, + 0.035247802734375, + 0.0218353271484375, + 0.022216796875, + -9.632110595703125e-05, + -0.005970001220703125, + 0.047882080078125, + -0.004425048828125, + -0.0248260498046875, + -0.061004638671875, + -0.00026035308837890625, + -0.07501220703125, + 0.00458526611328125, + -0.0213470458984375, + -0.05401611328125, + -0.04547119140625, + -0.032257080078125, + -0.035003662109375, + -0.04766845703125, + -0.038330078125, + -0.01306915283203125, + 0.01483154296875, + 0.02001953125, + 0.0231475830078125, + -0.01287078857421875, + 0.035400390625, + -0.04925537109375, + -0.01087188720703125, + -0.058746337890625, + 0.06414794921875, + 0.00304412841796875, + 0.0013132095336914062, + 0.0216064453125, + 0.03289794921875, + 0.050872802734375, + 0.06622314453125, + 0.0228271484375, + 0.01078033447265625, + -0.0082550048828125, + 0.048858642578125, + 0.03533935546875, + 0.00913238525390625, + -0.003101348876953125, + -0.044677734375, + -0.034637451171875, + 0.01776123046875, + 0.028076171875, + -0.0186920166015625, + 0.0151214599609375, + -0.060089111328125, + -0.021209716796875, + 0.004825592041015625, + 0.02801513671875, + 0.028289794921875, + 0.2425537109375, + -0.006481170654296875, + 0.0577392578125, + -0.0634765625, + -0.03326416015625, + -0.03924560546875, + -0.0244903564453125, + -0.019622802734375, + -0.002719879150390625, + -0.018280029296875, + -0.00937652587890625, + 0.004375457763671875, + -0.014404296875, + -0.01355743408203125, + -0.006450653076171875, + 0.0235748291015625, + -0.0203094482421875, + 0.012176513671875, + 0.03985595703125, + 0.0135955810546875, + -0.006999969482421875, + -0.035675048828125, + 0.052978515625, + 0.022735595703125, + -0.0301971435546875, + -0.027740478515625, + 0.0176544189453125, + 0.0104827880859375, + -0.00817108154296875, + 0.0128021240234375, + -0.041656494140625, + -0.048980712890625, + 0.0487060546875, + 0.03070068359375, + -0.0146026611328125, + 0.041107177734375, + 0.00511932373046875, + -0.037872314453125, + 0.018218994140625, + 0.0291748046875, + -0.00948333740234375, + -0.031463623046875, + -0.005809783935546875, + -0.05157470703125, + 0.02197265625, + 0.030975341796875, + 0.004940032958984375, + 0.034332275390625, + -0.0357666015625, + -0.059295654296875, + -0.0076904296875, + 0.0216827392578125, + 0.01161956787109375, + -0.0126800537109375, + -0.03631591796875, + 0.01453399658203125, + -0.058807373046875, + -0.050811767578125, + -0.01049041748046875, + 0.01459503173828125, + 0.037109375, + -0.0087890625, + 0.047393798828125, + -0.0274658203125, + 0.01355743408203125, + -0.05743408203125, + 0.0290679931640625, + -0.057586669921875, + 0.005535125732421875, + 0.0787353515625, + 0.0293731689453125, + -0.02728271484375, + -0.006534576416015625, + -0.00335693359375, + 0.0210418701171875, + 0.01922607421875, + 0.034332275390625, + 0.057464599609375, + 0.002613067626953125, + 0.0196075439453125, + -0.00379180908203125, + -0.049774169921875, + -0.0024890899658203125, + 0.0290374755859375, + 0.01532745361328125, + -0.013580322265625, + 0.020904541015625, + 0.034271240234375, + 0.0190582275390625, + -0.006103515625, + 0.0251007080078125, + 0.0218353271484375, + -0.0228424072265625, + -0.018890380859375, + -0.0706787109375, + -0.06695556640625, + 0.046875, + -0.026275634765625, + -0.04351806640625, + 0.0265960693359375, + 0.0265350341796875, + -0.00605010986328125, + -0.005077362060546875, + 0.045166015625, + 0.02923583984375, + -0.05572509765625, + -0.01129150390625, + 0.042724609375, + -0.0094146728515625, + 0.0205078125, + 0.0068206787109375, + -0.00904083251953125, + -0.0343017578125, + 0.02081298828125, + -0.00113677978515625, + 0.037567138671875, + -0.007320404052734375, + -0.040313720703125, + 0.007625579833984375, + 0.046051025390625, + 0.03173828125, + 0.004276275634765625, + -0.025665283203125, + -0.027130126953125, + -0.03802490234375, + 0.057281494140625, + -0.004482269287109375, + 0.038787841796875, + -0.0067901611328125, + 0.015625, + 0.007732391357421875, + -0.0270843505859375, + -0.0005850791931152344, + -0.029571533203125, + 0.0650634765625, + 0.005512237548828125, + 0.02117919921875, + 0.017333984375, + -0.0156707763671875, + -0.01611328125, + -0.032867431640625, + 0.013763427734375, + 0.0098419189453125, + -0.0187835693359375, + 0.03857421875, + 0.0318603515625, + -0.0168914794921875, + 0.011566162109375, + 0.01045989990234375, + -0.0031337738037109375, + -0.0134735107421875, + -0.0240936279296875, + -0.001338958740234375, + -0.0284423828125, + 0.01116943359375, + 0.01336669921875, + -0.032806396484375, + -0.036224365234375, + 0.017913818359375, + -0.03228759765625, + 0.033355712890625, + 0.0208282470703125, + -0.00731658935546875, + 0.10223388671875, + 0.05267333984375, + 0.01117706298828125, + -0.0518798828125, + 0.0006422996520996094, + -0.00527191162109375, + 0.011138916015625, + -0.0146026611328125, + -0.038970947265625, + -0.01540374755859375, + -0.00860595703125, + 0.005588531494140625, + 0.0169219970703125, + -0.06201171875, + -0.01371002197265625, + 0.0053558349609375, + 0.04754638671875, + -0.02679443359375, + 0.0067291259765625, + -0.029571533203125, + -0.01177978515625, + 0.033599853515625, + 0.040618896484375, + -0.00913238525390625, + -0.01123809814453125, + -0.0362548828125, + -0.0273590087890625, + -0.038238525390625, + 0.058929443359375, + -0.036529541015625, + -0.04827880859375, + 0.050994873046875, + -0.033660888671875, + 0.0018873214721679688, + -0.0204315185546875, + -0.006778717041015625, + -0.0025539398193359375, + -0.0031280517578125, + -0.0201416015625, + 0.0004436969757080078, + 0.0026798248291015625, + -0.041351318359375, + -0.0167388916015625, + -0.0106201171875, + 0.0160369873046875, + -0.0271453857421875, + -0.0182342529296875, + 0.0209197998046875, + 0.05078125, + -0.005523681640625, + 0.0047149658203125, + -0.032623291015625, + -0.002269744873046875, + 0.010986328125, + 0.0106201171875, + 0.049407958984375, + -0.01287841796875, + -0.005260467529296875, + 0.04046630859375, + 0.01340484619140625, + -0.0027027130126953125, + -0.01262664794921875, + 0.042572021484375, + 0.035400390625, + 0.027862548828125, + -0.0023097991943359375, + -0.00710296630859375, + -0.01120758056640625, + -0.021087646484375, + 0.0267791748046875, + -0.02606201171875, + -0.044281005859375, + 0.005970001220703125, + 0.007568359375, + -0.00240325927734375, + -0.02752685546875, + 0.01183319091796875, + 0.0192108154296875, + 0.0106048583984375, + 0.07867431640625, + 0.052825927734375, + 0.00835418701171875, + 0.0024738311767578125, + 0.030181884765625, + 0.00011610984802246094, + 0.0205230712890625, + -0.00444793701171875, + -0.04315185546875, + 0.00403594970703125, + 0.005260467529296875, + 0.0018301010131835938, + -0.0087738037109375, + -0.043212890625, + -0.081298828125, + 0.003726959228515625, + -0.04083251953125, + -0.01617431640625, + 0.03192138671875, + 0.00934600830078125, + -0.05810546875, + -0.026611328125, + 0.0139617919921875, + 0.0201568603515625, + 0.0452880859375, + -0.008941650390625, + -0.03253173828125, + 0.016815185546875, + -0.0162353515625, + -0.0007214546203613281, + -0.04833984375, + -0.0155792236328125, + 0.034820556640625, + 0.0213623046875, + 0.0239410400390625, + -0.0014886856079101562, + -0.04083251953125, + 0.02825927734375, + 0.0023021697998046875, + 0.02911376953125, + -0.0139617919921875, + 0.030914306640625, + -0.0261993408203125, + 0.005855560302734375, + 0.0170745849609375, + -0.00864410400390625, + 0.0014944076538085938, + 0.0002551078796386719, + 0.0264739990234375, + 0.003173828125, + -0.06695556640625, + -0.0149078369140625, + 0.015716552734375, + 0.01861572265625, + -0.04144287109375, + 0.01983642578125, + -0.0191497802734375, + -0.021575927734375, + -0.00787353515625, + -0.0482177734375, + -0.01184844970703125, + -0.051727294921875, + -0.0105743408203125, + -0.02288818359375, + 0.006557464599609375, + -0.004550933837890625, + 0.044097900390625, + -0.03839111328125, + -0.0248870849609375, + 0.0068511962890625, + 0.03900146484375, + 0.03509521484375, + 0.01142120361328125, + -0.040374755859375, + 0.0091552734375, + -0.034393310546875, + 0.023529052734375, + 0.026123046875, + 0.04754638671875, + 0.0100250244140625, + 0.0217437744140625, + 0.0518798828125, + 0.0086517333984375, + 0.005413055419921875, + -0.0439453125, + 0.0325927734375, + -0.0245361328125, + -0.0216217041015625, + -0.0181427001953125, + 0.0218505859375, + -0.00530242919921875, + -0.006916046142578125, + -0.021942138671875, + -0.0096282958984375, + 0.0199127197265625, + -0.003574371337890625, + 0.0487060546875, + -0.0253448486328125, + -0.007465362548828125, + 0.03643798828125, + 0.0171661376953125, + -0.014495849609375, + 0.0274658203125, + -0.019622802734375, + 0.005462646484375, + -0.0025882720947265625, + -0.0011081695556640625, + 0.0182342529296875, + -0.0062408447265625, + 0.059051513671875, + 0.01123809814453125, + -0.05224609375, + -0.0008478164672851562, + -0.03179931640625, + -0.09881591796875, + -0.07269287109375, + 0.0224151611328125, + 0.00821685791015625, + 0.00800323486328125, + 0.00936126708984375, + 0.028717041015625, + 0.0244598388671875, + -0.05731201171875, + 0.0284881591796875, + -0.0003216266632080078, + 0.0105743408203125, + -0.005619049072265625, + -0.005420684814453125, + -0.0147552490234375, + 0.052032470703125, + 0.025421142578125, + 0.0017299652099609375, + -0.01092529296875, + 0.054229736328125, + -0.0247650146484375, + -0.024810791015625, + 0.037384033203125, + 0.06976318359375, + -0.01324462890625, + -0.01300048828125, + -0.01153564453125, + -0.0159912109375, + -0.0171051025390625, + 0.00618743896484375, + -0.0027256011962890625, + -0.005535125732421875, + -0.047943115234375, + 0.009124755859375, + -0.0287933349609375, + -0.00861358642578125, + -0.008331298828125, + 0.020782470703125, + -0.1256103515625, + 0.0016851425170898438, + -0.0204315185546875, + 0.001430511474609375, + -0.0187835693359375, + 0.006969451904296875, + 0.0002536773681640625, + -0.041259765625, + 0.00795745849609375, + -0.034149169921875, + 0.0306396484375, + 0.07757568359375, + 0.02264404296875, + -0.00518798828125, + 0.014495849609375, + 0.0171051025390625, + -0.01290130615234375, + 0.0086212158203125, + -0.045257568359375, + 0.039398193359375, + 0.01654052734375, + 0.005435943603515625, + -0.0021915435791015625, + -0.01690673828125, + 0.025787353515625, + -0.00160980224609375, + -0.01087188720703125, + -0.00405120849609375, + -0.02191162109375, + -0.0036754608154296875, + 0.01373291015625, + -0.026336669921875, + -0.0078887939453125, + 0.002414703369140625, + 0.02301025390625, + 0.04168701171875, + -0.0103912353515625, + 0.0089111328125, + 0.01319122314453125, + 0.0239105224609375, + -0.016387939453125, + 0.006885528564453125, + -0.03173828125, + -0.033203125, + 0.0277252197265625, + 0.035064697265625, + 0.036224365234375, + 0.00128173828125, + -0.0279541015625, + 0.00827789306640625, + -0.0301361083984375, + 0.009033203125, + 0.01459503173828125, + 0.0213470458984375, + -0.00717926025390625, + 0.032470703125, + 0.01271820068359375, + 0.035797119140625, + 0.050262451171875, + 0.0278778076171875, + -0.032958984375, + -0.01666259765625, + 0.0182952880859375, + -0.0201568603515625, + -0.0176849365234375, + 0.0101470947265625, + -0.039520263671875, + 0.00621795654296875, + 0.0107421875, + -0.04736328125, + -0.018035888671875, + 0.0250091552734375, + 0.003459930419921875, + 0.0051422119140625, + 0.052764892578125, + 0.0154876708984375, + 0.0499267578125, + 0.013092041015625, + -0.0190582275390625, + -0.020172119140625, + -0.0227508544921875, + -0.0027713775634765625, + 0.01788330078125, + -0.03466796875, + -0.0108184814453125, + 0.00604248046875, + -0.033538818359375, + 0.047821044921875, + -0.022491455078125, + -0.03778076171875, + -0.0111846923828125, + -0.0277099609375, + -0.03533935546875, + 0.043701171875, + -0.058929443359375, + 0.020416259765625, + -0.01219940185546875, + -0.024993896484375, + -0.0172119140625, + -0.0292816162109375, + -0.0276641845703125, + 0.004901885986328125, + -0.0175933837890625, + -0.053497314453125, + -0.04302978515625, + 0.054229736328125, + -0.00843048095703125, + 0.0131988525390625, + 0.03485107421875, + -0.01279449462890625, + -0.03778076171875, + -0.01117706298828125, + -0.0030460357666015625, + 0.05743408203125, + 0.031768798828125, + -0.0036182403564453125, + -0.028839111328125, + 0.051727294921875, + 0.02105712890625, + -0.0246734619140625, + -0.02215576171875, + 0.057281494140625, + 0.04388427734375, + -0.03900146484375, + 0.01395416259765625, + 0.01092529296875, + -0.002544403076171875, + 0.02294921875, + 0.0579833984375, + 0.0020771026611328125, + 0.0032501220703125, + 0.0301666259765625, + -0.0028209686279296875, + -0.005321502685546875, + 0.03173828125, + -0.0487060546875, + -0.052703857421875, + 0.038055419921875, + 0.0221405029296875, + -0.06207275390625, + -0.01555633544921875, + -0.0223846435546875, + -0.006938934326171875, + -0.0268707275390625, + -0.0186614990234375, + 0.03533935546875, + -0.03692626953125, + -0.01337432861328125, + 0.0202484130859375, + 0.0222320556640625, + 0.06781005859375, + -0.0308074951171875, + -0.0223388671875, + -0.0277862548828125, + -0.074462890625, + 0.001285552978515625, + -0.030181884765625, + -0.0189971923828125, + 0.036529541015625, + -0.03424072265625, + 0.01397705078125, + -0.00890350341796875, + -0.02020263671875, + -0.0299072265625, + 0.01204681396484375, + -0.0021457672119140625, + -0.0081634521484375, + 0.01146697998046875, + 0.0157623291015625, + -0.013458251953125, + -0.0179290771484375, + 0.037200927734375, + -0.0213165283203125, + 0.011505126953125, + 0.03924560546875, + 0.01161956787109375, + 0.0201263427734375, + 0.047393798828125, + -0.0089263916015625, + 0.01544952392578125, + 0.029815673828125, + 0.051788330078125, + 0.0024871826171875, + 0.00839996337890625, + -0.0234222412109375, + -0.0169677734375, + 0.01105499267578125, + 0.005596160888671875, + -0.01110076904296875, + 0.01085662841796875, + -0.035552978515625, + -0.006683349609375, + -0.0139617919921875, + -0.0007138252258300781, + 0.01409149169921875, + -0.00441741943359375, + 0.0021495819091796875, + 0.033599853515625, + 0.007049560546875, + 0.0282745361328125, + -0.0098419189453125, + 0.03118896484375, + 0.001983642578125, + 0.0043792724609375, + 0.005359649658203125, + 0.0477294921875, + -0.0207061767578125, + -0.005290985107421875, + -0.03460693359375, + -0.0010166168212890625, + -0.03204345703125, + 0.0237274169921875, + -0.055419921875, + 0.040435791015625, + 0.034088134765625, + -0.0169677734375, + 0.01351165771484375, + -0.0228118896484375, + 0.033599853515625, + 0.0467529296875, + -0.0027923583984375, + 0.053619384765625, + -0.034576416015625, + -0.0301971435546875, + 0.043609619140625, + 0.0284576416015625, + -0.0239410400390625, + 0.0014629364013671875, + -0.050323486328125, + -0.0213623046875, + 0.036163330078125, + 0.01456451416015625, + -0.007122039794921875, + 0.034423828125, + 0.020233154296875, + -0.055450439453125, + -0.05206298828125, + 0.014984130859375, + 0.0227508544921875, + -0.044342041015625, + 0.036590576171875, + 0.014190673828125, + 0.00418853759765625, + -0.03717041015625 + ], + [ + -0.003780364990234375, + 0.059906005859375, + -0.012542724609375, + 0.021514892578125, + -0.0280303955078125, + -0.00617218017578125, + -0.071533203125, + -0.004093170166015625, + -0.0178985595703125, + -0.0068359375, + -0.001277923583984375, + 0.0077362060546875, + -0.01702880859375, + 0.0159912109375, + 0.005767822265625, + 0.0272979736328125, + 0.025238037109375, + -0.01323699951171875, + -0.017608642578125, + -0.0275726318359375, + 0.0265045166015625, + -0.046295166015625, + 0.0072174072265625, + -0.00423431396484375, + -0.0156402587890625, + 0.010894775390625, + 0.013671875, + 0.005825042724609375, + 0.01129913330078125, + -0.01152801513671875, + -0.0257110595703125, + -0.02642822265625, + 0.056915283203125, + 0.032562255859375, + -0.0227203369140625, + -0.03656005859375, + 0.00727081298828125, + -0.017913818359375, + -0.0325927734375, + 0.0258331298828125, + -0.0185699462890625, + 0.00897979736328125, + 0.03131103515625, + 0.00121307373046875, + 0.01097869873046875, + -0.043304443359375, + -0.0526123046875, + -0.021148681640625, + -0.01593017578125, + -0.03302001953125, + -0.00951385498046875, + -0.0061187744140625, + 0.039459228515625, + -0.024993896484375, + -0.010528564453125, + 0.07183837890625, + -0.0209503173828125, + 0.0041961669921875, + -0.0231781005859375, + -0.021636962890625, + -0.018707275390625, + 0.036865234375, + -0.017181396484375, + -0.00860595703125, + 0.037567138671875, + 0.041229248046875, + 0.0033321380615234375, + -0.015777587890625, + -0.040618896484375, + -0.02850341796875, + -0.010101318359375, + 0.050262451171875, + -0.030609130859375, + -0.0033435821533203125, + -0.02874755859375, + 0.00852203369140625, + -0.06597900390625, + 0.04443359375, + -0.02008056640625, + -0.005016326904296875, + 0.0155487060546875, + 0.00881195068359375, + 0.0012149810791015625, + 0.034942626953125, + -0.041015625, + 0.0166015625, + -0.032684326171875, + 0.028778076171875, + 0.0240936279296875, + -0.01140594482421875, + -0.0233154296875, + -0.0279693603515625, + 0.0234375, + -0.01995849609375, + -0.002872467041015625, + 0.0098876953125, + -0.05609130859375, + -0.0093841552734375, + 0.0364990234375, + -0.0011043548583984375, + 0.00955963134765625, + 0.0209808349609375, + 0.00762176513671875, + 0.01020050048828125, + -0.0016193389892578125, + -0.01444244384765625, + 0.055938720703125, + -0.00041747093200683594, + -0.00091552734375, + 0.00414276123046875, + 0.06903076171875, + -0.0024738311767578125, + 0.01473236083984375, + -0.03271484375, + -0.0186004638671875, + 0.0161895751953125, + -0.0020465850830078125, + -0.01335906982421875, + -0.07049560546875, + -0.0006871223449707031, + 0.052337646484375, + 0.0159912109375, + 0.0384521484375, + -0.03253173828125, + 0.0157623291015625, + -0.0338134765625, + 0.00811004638671875, + 0.006443023681640625, + 0.0214385986328125, + 0.0029163360595703125, + -0.0176544189453125, + 0.0301971435546875, + -0.02337646484375, + 0.01326751708984375, + -0.04083251953125, + 0.0206146240234375, + -0.017974853515625, + 0.0301055908203125, + -0.020599365234375, + 0.01514434814453125, + 0.0031948089599609375, + 0.0101165771484375, + -0.033355712890625, + -0.062469482421875, + -0.0041961669921875, + -0.043975830078125, + 0.0134735107421875, + -0.0164947509765625, + 0.05487060546875, + 0.0023441314697265625, + 0.002422332763671875, + 0.02392578125, + 0.06671142578125, + -0.00817108154296875, + 0.006534576416015625, + -0.0252685546875, + -0.026336669921875, + 0.030487060546875, + -0.05078125, + 0.01349639892578125, + -0.003421783447265625, + -0.03173828125, + -0.01358795166015625, + 0.040557861328125, + 0.006744384765625, + -0.017303466796875, + 0.0213775634765625, + 0.05712890625, + -0.033599853515625, + -0.037322998046875, + -0.011444091796875, + -0.051849365234375, + 0.002834320068359375, + 0.0023517608642578125, + 0.006748199462890625, + 0.043548583984375, + 0.045379638671875, + 0.016021728515625, + 0.012908935546875, + -0.0024089813232421875, + -0.05206298828125, + -0.0145263671875, + 0.0311431884765625, + 0.02679443359375, + 0.01303863525390625, + 0.0269927978515625, + -0.0279083251953125, + -0.017181396484375, + 0.0229949951171875, + 0.0018634796142578125, + -0.0021514892578125, + -0.0206298828125, + 0.047393798828125, + -0.04571533203125, + 0.009490966796875, + -0.0089111328125, + -0.01702880859375, + -0.00675201416015625, + -0.0118560791015625, + -0.058349609375, + -0.04248046875, + -0.003070831298828125, + 0.0311737060546875, + 0.01226806640625, + -0.0135955810546875, + 0.014678955078125, + -0.0321044921875, + 0.017608642578125, + 0.04327392578125, + -0.0255126953125, + 0.005947113037109375, + -0.038970947265625, + 0.004650115966796875, + -0.0118255615234375, + -0.0111236572265625, + 0.025115966796875, + 0.026031494140625, + 0.004360198974609375, + 0.037078857421875, + 0.01953125, + 0.029052734375, + 0.02105712890625, + -0.0119781494140625, + -0.0031890869140625, + 0.048187255859375, + -0.0176849365234375, + -0.0164794921875, + 0.01213836669921875, + -0.01177978515625, + -0.03179931640625, + -0.0406494140625, + 0.038543701171875, + 0.026153564453125, + -0.03179931640625, + -0.05322265625, + -0.00450897216796875, + -0.04901123046875, + -0.0012655258178710938, + 0.04022216796875, + 0.012786865234375, + 0.0190582275390625, + 0.01268768310546875, + 0.06085205078125, + -0.0182037353515625, + -0.03594970703125, + 0.039764404296875, + 0.0234375, + 0.0166473388671875, + -0.0207366943359375, + -0.0176239013671875, + 0.0166778564453125, + -0.04345703125, + 0.0129547119140625, + 0.00833892822265625, + 0.0318603515625, + -0.0019130706787109375, + 0.00812530517578125, + -0.050689697265625, + -0.035797119140625, + -0.0017709732055664062, + 0.0014619827270507812, + -0.029327392578125, + -0.0205078125, + 0.02886962890625, + 0.02508544921875, + -0.00234222412109375, + -0.033416748046875, + -0.040191650390625, + 0.04705810546875, + -0.032135009765625, + -0.0012340545654296875, + 0.0089874267578125, + -0.01788330078125, + 0.003742218017578125, + -0.03314208984375, + 0.055511474609375, + -0.02557373046875, + -0.00743865966796875, + -0.0114898681640625, + -0.00656890869140625, + 0.042266845703125, + 0.002521514892578125, + 0.053497314453125, + 0.0172119140625, + 0.019561767578125, + -0.055023193359375, + -0.048095703125, + 0.002796173095703125, + -0.0123138427734375, + 0.0091400146484375, + -0.06427001953125, + -0.04547119140625, + 0.04058837890625, + -0.01323699951171875, + 0.0130157470703125, + 0.0033111572265625, + 0.0102081298828125, + -0.2034912109375, + -0.041412353515625, + -0.0093536376953125, + -0.0002073049545288086, + -0.010894775390625, + -0.00485992431640625, + 0.0260467529296875, + -0.050262451171875, + -0.005786895751953125, + -0.0276336669921875, + -0.07928466796875, + -0.0282745361328125, + -0.002956390380859375, + 0.053955078125, + 0.00655364990234375, + 0.0205078125, + 0.00557708740234375, + -0.0325927734375, + -0.027374267578125, + -0.01320648193359375, + -0.0291748046875, + -0.005859375, + 0.0173187255859375, + 0.0401611328125, + 0.0289306640625, + 0.0218353271484375, + -0.0107574462890625, + 0.0108489990234375, + 0.0233306884765625, + 0.01543426513671875, + -0.0096435546875, + 0.0106048583984375, + -0.0038242340087890625, + 4.106760025024414e-05, + 0.06640625, + 0.005069732666015625, + 0.0093231201171875, + 0.02288818359375, + 0.0137786865234375, + 0.059539794921875, + -0.0209503173828125, + 0.05596923828125, + -0.029144287109375, + -0.043212890625, + -0.016693115234375, + -0.0288543701171875, + -0.031982421875, + 0.01239776611328125, + 0.0277862548828125, + -0.0207672119140625, + 0.00951385498046875, + -0.0186767578125, + 0.0004248619079589844, + -0.01134490966796875, + -0.04150390625, + 0.0019502639770507812, + 0.038604736328125, + 0.05169677734375, + 0.037200927734375, + -0.0305633544921875, + 0.040557861328125, + 0.01499176025390625, + 0.01453399658203125, + 0.023956298828125, + 0.01071929931640625, + -0.0054779052734375, + 0.00959014892578125, + 0.007495880126953125, + -0.0167388916015625, + 0.0039215087890625, + 0.01318359375, + 0.0231781005859375, + -0.00984954833984375, + -0.024169921875, + 0.021728515625, + 0.0082855224609375, + 0.0004780292510986328, + 0.0031986236572265625, + -0.05413818359375, + -0.050262451171875, + 0.0021877288818359375, + 0.0276947021484375, + -0.026947021484375, + 0.0028095245361328125, + -0.03558349609375, + -0.038909912109375, + -0.0081787109375, + 0.019683837890625, + 0.064697265625, + 0.25390625, + -0.03240966796875, + 0.0221099853515625, + -0.044189453125, + 0.03179931640625, + -0.003864288330078125, + 0.02313232421875, + 0.031097412109375, + -0.005809783935546875, + -0.0234375, + -0.0254364013671875, + -0.0044097900390625, + -0.027069091796875, + -0.0006017684936523438, + 0.0186767578125, + 0.061614990234375, + -0.046112060546875, + 0.032562255859375, + 0.047576904296875, + -0.005313873291015625, + 0.0077056884765625, + -0.041748046875, + 0.0386962890625, + -0.0151214599609375, + -0.0148468017578125, + -0.01201629638671875, + -0.00341796875, + -0.034454345703125, + 0.0052947998046875, + 0.0258941650390625, + -0.062103271484375, + -0.019927978515625, + 0.02301025390625, + 0.009979248046875, + 0.00894927978515625, + -0.00539398193359375, + -0.01204681396484375, + -0.00812530517578125, + -0.00481414794921875, + 0.031768798828125, + -0.0017347335815429688, + -0.035247802734375, + 0.022674560546875, + -0.0992431640625, + 0.0084991455078125, + -0.01332855224609375, + -0.004367828369140625, + 0.017547607421875, + 0.029083251953125, + -0.042633056640625, + 0.0240478515625, + 0.00893402099609375, + -0.01018524169921875, + 0.01340484619140625, + -0.042266845703125, + 0.0372314453125, + -0.0004949569702148438, + -0.0161285400390625, + -0.010284423828125, + 0.01947021484375, + -0.00653839111328125, + 0.01019287109375, + 0.03643798828125, + -0.0233917236328125, + 0.030914306640625, + -0.00344085693359375, + 0.00241851806640625, + -0.031463623046875, + -0.017852783203125, + 0.029693603515625, + 0.05731201171875, + -0.0380859375, + -0.047027587890625, + -0.0141754150390625, + 0.04730224609375, + 0.04266357421875, + 0.0413818359375, + -0.01983642578125, + 0.0291900634765625, + -0.0178985595703125, + 0.026611328125, + -0.01441192626953125, + -0.0188751220703125, + 0.056549072265625, + 0.0042877197265625, + 0.0266876220703125, + 0.01111602783203125, + 0.0855712890625, + -0.014068603515625, + 0.03131103515625, + 0.015472412109375, + 0.035186767578125, + -0.08599853515625, + -0.037353515625, + -0.0284271240234375, + -0.033843994140625, + 0.03399658203125, + -0.0083160400390625, + -0.0192413330078125, + -0.023956298828125, + -0.002079010009765625, + -0.03253173828125, + -0.0347900390625, + 0.0128631591796875, + 0.0273895263671875, + -0.03533935546875, + -0.015533447265625, + 0.021575927734375, + -0.022674560546875, + 0.030609130859375, + -0.033843994140625, + -0.00775146484375, + -0.00156402587890625, + 0.036407470703125, + 0.0015048980712890625, + 0.01546478271484375, + -0.0096282958984375, + -0.00946044921875, + 0.0394287109375, + 0.047576904296875, + 0.0147857666015625, + -0.026275634765625, + -0.01824951171875, + -0.047698974609375, + -0.00469970703125, + 0.024017333984375, + -0.0162811279296875, + 0.056671142578125, + 0.00485992431640625, + 0.02197265625, + -0.0019893646240234375, + -0.0196685791015625, + -0.0288543701171875, + -0.0284576416015625, + 0.0546875, + 0.0188446044921875, + 0.04681396484375, + 0.0272979736328125, + -0.01468658447265625, + -0.00415802001953125, + -0.01024627685546875, + 0.00926971435546875, + -0.0214080810546875, + 0.004138946533203125, + 0.0010652542114257812, + 0.04290771484375, + -0.031829833984375, + 0.0246734619140625, + -0.0105743408203125, + -0.02874755859375, + -0.0228729248046875, + 0.01580810546875, + -0.00438690185546875, + -0.0179595947265625, + -0.00563812255859375, + 0.048370361328125, + -0.03411865234375, + -0.00206756591796875, + 0.014923095703125, + -0.00684356689453125, + 0.0226287841796875, + 0.0270538330078125, + 0.032379150390625, + 0.09295654296875, + 0.03961181640625, + -0.01021575927734375, + -0.01641845703125, + 0.03253173828125, + 0.021331787109375, + -0.00791168212890625, + 0.0008335113525390625, + 0.003997802734375, + -0.0267333984375, + -0.020263671875, + 0.032989501953125, + -0.0038890838623046875, + -0.0286712646484375, + 0.0007252693176269531, + 0.018157958984375, + 0.04583740234375, + 0.038421630859375, + 0.00730133056640625, + 0.00911712646484375, + 0.0155181884765625, + 0.0290069580078125, + 0.03875732421875, + -0.0322265625, + -0.03192138671875, + -0.0228271484375, + -0.0203399658203125, + -0.038055419921875, + 0.11187744140625, + -0.0305633544921875, + -0.030426025390625, + 0.0418701171875, + -0.0440673828125, + 0.02410888671875, + -0.01381683349609375, + 0.052276611328125, + -0.0283660888671875, + -0.0242156982421875, + 0.029571533203125, + 0.01824951171875, + 0.0151519775390625, + -0.053863525390625, + -0.0240936279296875, + -0.005100250244140625, + -0.00798797607421875, + -0.0235748291015625, + -0.024139404296875, + 0.001987457275390625, + -0.048065185546875, + -0.012847900390625, + -0.002368927001953125, + -0.051025390625, + 0.0017223358154296875, + -0.0180511474609375, + -0.0034046173095703125, + 0.00786590576171875, + -0.02783203125, + -0.01149749755859375, + 0.0172119140625, + 0.009918212890625, + -0.0212554931640625, + 0.00701904296875, + 0.0203704833984375, + 0.0751953125, + 0.02935791015625, + -0.0215911865234375, + -0.0185546875, + -0.01326751708984375, + -0.0128631591796875, + -0.016937255859375, + -0.0038204193115234375, + -0.03814697265625, + -0.00075531005859375, + 0.0369873046875, + -0.0151824951171875, + -0.00015366077423095703, + -0.005176544189453125, + 0.0255126953125, + -0.0037670135498046875, + 0.0418701171875, + 0.033905029296875, + 0.0174560546875, + 0.0517578125, + 0.0207061767578125, + -0.06988525390625, + 0.040802001953125, + 0.0030765533447265625, + -0.049774169921875, + -0.004962921142578125, + 0.00563812255859375, + 0.0311126708984375, + 0.0086517333984375, + 0.004604339599609375, + -0.040771484375, + -0.0036163330078125, + -0.0045318603515625, + 0.01006317138671875, + 0.01629638671875, + 0.017730712890625, + -0.0396728515625, + -0.035736083984375, + 0.0276336669921875, + -0.0022602081298828125, + 0.0017786026000976562, + -0.0635986328125, + -0.005474090576171875, + 0.0028209686279296875, + 0.0203399658203125, + 0.0202178955078125, + -0.03778076171875, + -0.01053619384765625, + 0.050018310546875, + -0.005657196044921875, + 0.0106048583984375, + -0.010894775390625, + -0.04510498046875, + 0.00829315185546875, + -0.0203704833984375, + 0.05133056640625, + 0.02545166015625, + 0.0214996337890625, + -0.00988006591796875, + -0.032379150390625, + 0.0280914306640625, + 0.01934814453125, + 0.043426513671875, + -0.0042572021484375, + 0.004611968994140625, + -0.02783203125, + -0.03466796875, + -0.0271759033203125, + 0.022430419921875, + 0.024566650390625, + -0.055694580078125, + 0.0318603515625, + -0.0034637451171875, + -0.0374755859375, + -0.0059967041015625, + -0.00518798828125, + -0.030303955078125, + -0.0538330078125, + 0.0173492431640625, + 0.0117950439453125, + -0.0016765594482421875, + -0.01678466796875, + 0.0504150390625, + -0.0188446044921875, + 0.012664794921875, + -0.019287109375, + 0.0340576171875, + 0.026031494140625, + -0.0037364959716796875, + -0.041778564453125, + 0.0168609619140625, + -0.0362548828125, + 0.0214691162109375, + -0.002834320068359375, + 0.049468994140625, + 0.017547607421875, + -0.00588226318359375, + 0.0014123916625976562, + 0.0123748779296875, + 0.039337158203125, + -0.00690460205078125, + 0.003673553466796875, + -0.0124053955078125, + -0.006221771240234375, + -0.0277252197265625, + 0.02386474609375, + -0.02020263671875, + -0.0110931396484375, + -0.04791259765625, + -0.0116729736328125, + 0.05206298828125, + -0.0251922607421875, + -0.0157012939453125, + -0.032684326171875, + -0.0106658935546875, + 0.025299072265625, + 0.0423583984375, + -0.0467529296875, + 0.046783447265625, + -0.026153564453125, + -0.01085662841796875, + 0.0129852294921875, + 0.004123687744140625, + 0.046600341796875, + 0.03424072265625, + 0.058380126953125, + 0.0325927734375, + -0.031402587890625, + 0.06744384765625, + -0.054931640625, + -0.013092041015625, + -0.04022216796875, + 0.032318115234375, + 0.0216522216796875, + -0.00014483928680419922, + -0.0245361328125, + 0.02423095703125, + -0.006229400634765625, + -0.0174102783203125, + 0.058502197265625, + -0.0026645660400390625, + -0.01146697998046875, + -0.01160430908203125, + -0.01343536376953125, + -0.0147552490234375, + 0.072265625, + 0.04522705078125, + -0.0242919921875, + -0.0178070068359375, + 0.046905517578125, + 0.005084991455078125, + -0.031524658203125, + 0.0078887939453125, + 0.05584716796875, + 0.0129547119140625, + -0.0223541259765625, + -0.00820159912109375, + -0.045654296875, + -0.0298309326171875, + -0.01470184326171875, + -0.034271240234375, + 0.007381439208984375, + -0.04833984375, + -0.0187835693359375, + -0.0262298583984375, + 0.01361846923828125, + 0.003509521484375, + 0.012847900390625, + -0.13232421875, + 0.0660400390625, + -0.0361328125, + 0.0142059326171875, + -0.05279541015625, + 0.0289154052734375, + -0.0231170654296875, + -0.051971435546875, + -0.03985595703125, + -0.0753173828125, + 0.0021114349365234375, + 0.0260162353515625, + 0.0270843505859375, + 0.00247955322265625, + -0.024688720703125, + 0.0123138427734375, + -0.034881591796875, + 0.0120849609375, + -0.0408935546875, + 0.0198516845703125, + 0.0266265869140625, + -0.0012998580932617188, + -0.0050048828125, + 0.039520263671875, + -0.018035888671875, + -0.00658416748046875, + -0.0103302001953125, + -0.024810791015625, + -0.00527191162109375, + -0.006256103515625, + 0.01983642578125, + -0.0285491943359375, + -0.0058441162109375, + 0.01389312744140625, + 0.0079345703125, + 0.0213775634765625, + 0.02117919921875, + -0.03472900390625, + -0.033355712890625, + 9.953975677490234e-06, + -0.006534576416015625, + 0.00730133056640625, + 0.0023784637451171875, + -0.01314544677734375, + 0.01107025146484375, + -0.01479339599609375, + -0.00484466552734375, + -0.01534271240234375, + -0.032806396484375, + -0.02972412109375, + -0.027587890625, + -0.018890380859375, + 0.0242462158203125, + 0.0223541259765625, + -0.04742431640625, + 0.0300140380859375, + 0.00208282470703125, + 0.0003643035888671875, + 0.03900146484375, + 0.0157470703125, + -0.0389404296875, + -0.0228118896484375, + 0.017547607421875, + -0.01898193359375, + -0.02862548828125, + 0.032318115234375, + -0.0016117095947265625, + 0.0236968994140625, + 0.03900146484375, + -0.037109375, + -0.020294189453125, + 0.06939697265625, + -0.01390838623046875, + 0.03472900390625, + 0.005168914794921875, + -0.0001817941665649414, + 0.04730224609375, + 0.0190887451171875, + 0.03350830078125, + -0.03192138671875, + -0.017120361328125, + 0.004364013671875, + 0.015869140625, + 0.0178375244140625, + 0.01526641845703125, + 0.00742340087890625, + -0.00850677490234375, + 0.006488800048828125, + -0.01346588134765625, + -0.0238494873046875, + 0.01214599609375, + -0.03558349609375, + -0.00531768798828125, + 0.00371551513671875, + -0.05584716796875, + -0.0174713134765625, + -0.03424072265625, + -0.0328369140625, + -0.0301513671875, + -0.063232421875, + -0.0020275115966796875, + 0.00955963134765625, + 0.006526947021484375, + -0.04766845703125, + -0.05645751953125, + 0.096435546875, + -0.053253173828125, + 0.0214691162109375, + -6.371736526489258e-05, + -0.06842041015625, + -0.021209716796875, + -0.054779052734375, + -0.0206298828125, + 0.02301025390625, + -0.011505126953125, + 0.0020236968994140625, + 0.0010919570922851562, + 0.0377197265625, + 0.037933349609375, + 0.00243377685546875, + -0.0272369384765625, + 0.01953125, + 0.012054443359375, + -0.029632568359375, + 0.030517578125, + 0.00890350341796875, + 0.005825042724609375, + -0.047821044921875, + 0.04498291015625, + -0.060150146484375, + -0.01180267333984375, + -0.0166473388671875, + 0.01097869873046875, + -0.013092041015625, + 0.040863037109375, + -0.054229736328125, + 0.032745361328125, + 0.0244903564453125, + 0.0106353759765625, + -0.038360595703125, + 0.0157623291015625, + -0.016204833984375, + -0.0304718017578125, + -0.0150146484375, + -0.0111846923828125, + -0.0362548828125, + -0.026092529296875, + -0.0165252685546875, + 0.0186767578125, + -0.0024566650390625, + -0.0007162094116210938, + -0.004978179931640625, + -0.00142669677734375, + 0.02874755859375, + 0.00809478759765625, + -0.002288818359375, + -0.024627685546875, + -0.0090179443359375, + 0.03729248046875, + -0.0159759521484375, + 0.034423828125, + -0.0290069580078125, + -0.07745361328125, + -0.02105712890625, + 0.0299835205078125, + 0.0360107421875, + -0.0171051025390625, + 0.0020751953125, + -0.017669677734375, + -0.028564453125, + -0.01334381103515625, + 0.042144775390625, + -0.0362548828125, + 0.002819061279296875, + 0.007472991943359375, + 0.0032138824462890625, + 0.0006113052368164062, + 0.05462646484375, + 0.0007491111755371094, + 0.04010009765625, + 0.040191650390625, + 0.0484619140625, + 0.0191802978515625, + 0.010833740234375, + -0.0200958251953125, + -0.05352783203125, + -0.039154052734375, + 0.0221405029296875, + 0.015655517578125, + -0.0181884765625, + -0.0255889892578125, + -0.01270294189453125, + -0.052947998046875, + 0.006969451904296875, + 0.0263519287109375, + 0.01506805419921875, + 0.0214080810546875, + 0.0206146240234375, + 0.023406982421875, + 0.01007080078125, + 0.01085662841796875, + -0.02557373046875, + -0.032684326171875, + 0.0266876220703125, + -0.01497650146484375, + -0.00690460205078125, + 0.0289306640625, + -0.002201080322265625, + -0.049957275390625, + -0.0074920654296875, + -0.029052734375, + -0.0159759521484375, + -0.0004668235778808594, + 0.063720703125, + 0.056060791015625, + -0.015167236328125, + -0.0012369155883789062, + -0.01357269287109375, + 0.0057525634765625, + 0.0194091796875, + 0.0017490386962890625, + 0.029449462890625, + -0.0633544921875, + -0.06414794921875, + -0.005466461181640625, + 0.01415252685546875, + -0.0091552734375, + -0.0294036865234375, + -0.04595947265625, + -0.0016231536865234375, + 0.01947021484375, + 0.049957275390625, + 0.048828125, + 0.008544921875, + 0.0021038055419921875, + -0.0155487060546875, + -0.00867462158203125, + 0.028350830078125, + 0.0352783203125, + -0.0208892822265625, + 0.083740234375, + -0.0007753372192382812, + -0.0014219284057617188, + -0.0555419921875 + ], + [ + 0.03509521484375, + -0.0107574462890625, + -0.0118255615234375, + -0.022613525390625, + -0.027984619140625, + -0.0139923095703125, + -0.01020050048828125, + 0.0153961181640625, + -0.050079345703125, + -0.0225372314453125, + 0.00807952880859375, + -0.0443115234375, + -0.01380157470703125, + -0.02215576171875, + 0.03631591796875, + -0.0116729736328125, + -0.0026874542236328125, + 0.01161956787109375, + 0.006114959716796875, + -0.0643310546875, + -0.0005168914794921875, + -0.0007886886596679688, + -0.0103759765625, + -0.0158538818359375, + -0.06341552734375, + 0.023284912109375, + -0.01155853271484375, + -0.01074981689453125, + -0.0275421142578125, + -0.058685302734375, + -0.03631591796875, + 0.00028395652770996094, + 0.0233154296875, + 0.0443115234375, + -0.018524169921875, + -0.006732940673828125, + 0.00738525390625, + 0.004199981689453125, + -0.03936767578125, + 0.0232086181640625, + 0.00444793701171875, + 0.0626220703125, + 0.05816650390625, + 0.0084686279296875, + -0.0267791748046875, + -0.017181396484375, + -0.0400390625, + -0.018585205078125, + 0.02392578125, + -0.00362396240234375, + -0.0164337158203125, + 0.00792694091796875, + 0.047027587890625, + -0.0292205810546875, + -0.0211944580078125, + 0.039459228515625, + -0.0239715576171875, + -0.020782470703125, + -0.0328369140625, + -0.033905029296875, + 0.00833892822265625, + 0.041778564453125, + -0.053619384765625, + 0.004878997802734375, + 0.031524658203125, + 0.06085205078125, + 0.018341064453125, + 0.0086669921875, + -0.05303955078125, + -0.0347900390625, + 0.01190185546875, + -0.0037078857421875, + 0.00994873046875, + -0.050872802734375, + -0.0094146728515625, + -0.004039764404296875, + -0.01453399658203125, + -0.0082244873046875, + -0.018402099609375, + 0.01450347900390625, + 0.0234832763671875, + -0.004131317138671875, + 0.029510498046875, + -0.0054473876953125, + -0.045623779296875, + 0.02435302734375, + -0.034027099609375, + 0.053558349609375, + 0.0305633544921875, + 0.0079803466796875, + 0.0189361572265625, + 0.01141357421875, + 0.0277099609375, + -0.02178955078125, + -0.01522064208984375, + 0.010528564453125, + -0.047698974609375, + -0.0312042236328125, + 0.0151214599609375, + -0.024688720703125, + 0.0182342529296875, + 0.044830322265625, + -0.0138397216796875, + 0.05621337890625, + 0.01006317138671875, + -0.003940582275390625, + 0.02392578125, + 0.044525146484375, + -0.00949859619140625, + -0.0002319812774658203, + 0.0753173828125, + 0.040130615234375, + 0.02386474609375, + 0.0057373046875, + -0.01425933837890625, + -0.013427734375, + -0.025146484375, + -0.041534423828125, + -0.036224365234375, + -0.021270751953125, + 0.07177734375, + 0.03759765625, + 0.03289794921875, + 0.0169525146484375, + 0.0272216796875, + -0.01532745361328125, + 0.041961669921875, + 0.07568359375, + 0.0288543701171875, + 0.0213165283203125, + -0.0323486328125, + 0.0292205810546875, + -0.0242156982421875, + 0.035736083984375, + 0.01419830322265625, + -0.0187225341796875, + -0.01428985595703125, + -0.01305389404296875, + -0.006893157958984375, + -0.03411865234375, + 0.01183319091796875, + 0.02398681640625, + 0.0007429122924804688, + -0.054840087890625, + 0.0243072509765625, + -0.049163818359375, + -0.0252838134765625, + 0.0166015625, + 0.0071258544921875, + -0.051300048828125, + -0.0019054412841796875, + 0.020477294921875, + 0.041351318359375, + -0.0150146484375, + 0.0205535888671875, + -0.0057220458984375, + -0.0095062255859375, + 0.0293731689453125, + -0.00890350341796875, + -2.9206275939941406e-06, + 0.0138702392578125, + -0.07598876953125, + -0.0287322998046875, + -0.0038604736328125, + 0.04107666015625, + 6.41942024230957e-05, + 0.0161285400390625, + 0.03192138671875, + -0.01971435546875, + -0.052734375, + -0.0191650390625, + -0.039642333984375, + -0.023223876953125, + -0.01490020751953125, + 0.0187835693359375, + 0.0360107421875, + 0.043548583984375, + -0.00336456298828125, + 0.0013113021850585938, + -0.0170745849609375, + -0.0513916015625, + 0.0175323486328125, + 0.058258056640625, + -0.04730224609375, + -0.018463134765625, + 0.00875091552734375, + -0.005588531494140625, + -0.0173187255859375, + -0.00421142578125, + 0.028564453125, + -0.0291900634765625, + -0.00905609130859375, + 0.034423828125, + -0.01373291015625, + 0.001194000244140625, + -0.047698974609375, + -0.01971435546875, + 0.001071929931640625, + -0.0181121826171875, + -0.058502197265625, + -0.033233642578125, + 0.005462646484375, + 0.025177001953125, + 0.00930023193359375, + 0.0171356201171875, + 0.01219940185546875, + 0.0224761962890625, + -0.0034503936767578125, + -0.01155853271484375, + -0.0164947509765625, + 0.0251007080078125, + -0.0268402099609375, + 0.0194091796875, + 0.0024089813232421875, + -0.006988525390625, + 0.05120849609375, + 0.02569580078125, + 0.00420379638671875, + 0.0259246826171875, + 0.0218048095703125, + -0.0186920166015625, + -0.01171112060546875, + -0.05755615234375, + 0.0131988525390625, + 0.0175628662109375, + 0.00594329833984375, + -0.0025959014892578125, + 0.025238037109375, + -0.0450439453125, + -0.03375244140625, + -0.05865478515625, + -0.00257110595703125, + -0.003192901611328125, + 0.02392578125, + 0.0166473388671875, + -0.0513916015625, + -0.055267333984375, + 0.00010257959365844727, + 0.0201416015625, + 0.0135650634765625, + 0.016571044921875, + -0.016632080078125, + -0.01035308837890625, + 0.008026123046875, + 0.01187896728515625, + -0.025421142578125, + 0.00905609130859375, + 0.01690673828125, + -0.026580810546875, + -0.01885986328125, + 0.0016193389892578125, + -0.0161895751953125, + -0.0172882080078125, + 0.0132904052734375, + 0.0103759765625, + 0.0084686279296875, + 0.0146026611328125, + -0.0003180503845214844, + -0.0008378028869628906, + -0.020843505859375, + -0.0066070556640625, + 0.01390838623046875, + -0.0270843505859375, + 0.039093017578125, + 0.038055419921875, + -0.036651611328125, + 0.0162200927734375, + 0.04547119140625, + 0.0223846435546875, + 0.0460205078125, + 0.00843048095703125, + 0.016204833984375, + 0.00795745849609375, + 0.005283355712890625, + -0.0166168212890625, + 0.044219970703125, + -0.00485992431640625, + -0.0015172958374023438, + 0.0306243896484375, + -0.0117950439453125, + -0.01020050048828125, + 0.00433349609375, + 0.032318115234375, + -0.004405975341796875, + 0.032379150390625, + -0.04437255859375, + -0.01493072509765625, + 0.04852294921875, + -0.04412841796875, + 0.01546478271484375, + -0.046478271484375, + -0.0242462158203125, + 0.029052734375, + 0.023773193359375, + 0.039581298828125, + -0.0149993896484375, + 0.016357421875, + -0.188720703125, + -0.0011148452758789062, + -0.00795745849609375, + -0.007160186767578125, + 0.010528564453125, + -0.0017633438110351562, + -0.0111236572265625, + -0.051116943359375, + -0.04852294921875, + -0.051239013671875, + -0.081787109375, + -0.0172882080078125, + -0.033599853515625, + 0.01074981689453125, + 0.01187896728515625, + -0.0221099853515625, + 0.009368896484375, + 0.01076507568359375, + -0.03948974609375, + -0.0379638671875, + -0.004726409912109375, + -0.0023708343505859375, + -0.00020563602447509766, + 0.0166015625, + 0.022003173828125, + 0.038116455078125, + 0.004852294921875, + -0.014007568359375, + -0.0004870891571044922, + 0.0343017578125, + -0.005214691162109375, + -0.035308837890625, + 0.00060272216796875, + -0.039581298828125, + 0.04962158203125, + 0.01378631591796875, + 0.01239776611328125, + -0.025177001953125, + 0.01983642578125, + 0.00609588623046875, + 0.00853729248046875, + 0.06427001953125, + -0.0133056640625, + 0.035247802734375, + -0.0248565673828125, + -0.0419921875, + -0.0299530029296875, + 0.01483154296875, + 0.00797271728515625, + -0.019622802734375, + 0.002117156982421875, + 0.012786865234375, + -0.006481170654296875, + -0.0018177032470703125, + -0.054962158203125, + 0.0290069580078125, + -0.00800323486328125, + 0.061248779296875, + 0.05535888671875, + -0.0118560791015625, + 0.0161895751953125, + -0.0110931396484375, + 0.0191802978515625, + -0.047576904296875, + -0.01824951171875, + 0.006618499755859375, + 0.035797119140625, + 0.038970947265625, + -0.005870819091796875, + 0.0003712177276611328, + 0.044952392578125, + 0.057159423828125, + -0.0198211669921875, + -0.00650787353515625, + 0.0322265625, + 0.0263214111328125, + -0.0166015625, + -0.0300140380859375, + -0.01690673828125, + -0.03607177734375, + 0.005382537841796875, + 0.01500701904296875, + -0.0322265625, + 0.0176239013671875, + -0.044830322265625, + -0.0684814453125, + 0.011627197265625, + 0.0192108154296875, + 0.0450439453125, + 0.2197265625, + 0.0262298583984375, + 0.0369873046875, + -0.033416748046875, + 0.002918243408203125, + -0.046630859375, + 0.0465087890625, + -0.00856781005859375, + 0.01212310791015625, + -0.0226287841796875, + -0.00872802734375, + 0.01030731201171875, + 0.041900634765625, + -0.01141357421875, + -0.0107879638671875, + 0.0899658203125, + -0.023345947265625, + -0.025238037109375, + 0.0511474609375, + 0.0143890380859375, + 0.02886962890625, + -0.0457763671875, + 0.053619384765625, + -0.015106201171875, + -0.01099395751953125, + -0.050140380859375, + -0.028717041015625, + -0.0253448486328125, + 0.00943756103515625, + 0.022796630859375, + -0.045684814453125, + -0.0212249755859375, + 0.0161285400390625, + 0.0296783447265625, + -0.05029296875, + 0.01432037353515625, + -0.03314208984375, + -0.0216522216796875, + -0.019989013671875, + 0.05670166015625, + -0.01059722900390625, + 0.001529693603515625, + -0.04754638671875, + 0.028228759765625, + 0.019134521484375, + -0.01153564453125, + 0.004886627197265625, + -0.006557464599609375, + -0.0126495361328125, + -0.00562286376953125, + 0.00156402587890625, + 0.0137176513671875, + -0.0149993896484375, + 0.01544952392578125, + -0.02386474609375, + -0.01369476318359375, + -0.01446533203125, + -0.0267486572265625, + 0.02783203125, + 0.040985107421875, + 0.0283050537109375, + -0.0017080307006835938, + -0.0031757354736328125, + -0.0223388671875, + -0.0268707275390625, + -0.01428985595703125, + 0.0389404296875, + 0.005840301513671875, + -0.0063934326171875, + 0.0244140625, + 0.05096435546875, + -0.046844482421875, + -0.0200958251953125, + 0.003101348876953125, + 0.03436279296875, + 0.00041222572326660156, + 0.030426025390625, + 0.023223876953125, + -0.00635528564453125, + -0.0623779296875, + 0.01702880859375, + -0.029205322265625, + -0.0032196044921875, + 0.0268096923828125, + 0.026702880859375, + 0.034698486328125, + 0.06964111328125, + 0.0615234375, + 0.06597900390625, + -0.004405975341796875, + 0.042999267578125, + 0.02667236328125, + -0.0310516357421875, + -0.01885986328125, + -0.00435638427734375, + -0.05712890625, + -0.013031005859375, + 0.040069580078125, + -0.0200958251953125, + -0.004184722900390625, + 0.03436279296875, + 0.004917144775390625, + -0.026611328125, + 0.0123748779296875, + 0.03155517578125, + 0.0031795501708984375, + -0.01224517822265625, + -0.0215301513671875, + -0.0288543701171875, + -0.0160675048828125, + -0.0169830322265625, + 0.003170013427734375, + -0.01102447509765625, + 0.0267486572265625, + 0.032318115234375, + 0.0333251953125, + 0.0219879150390625, + 0.01873779296875, + 0.022613525390625, + 0.04766845703125, + -0.00933074951171875, + -0.04937744140625, + 0.0157318115234375, + -0.022735595703125, + 0.021881103515625, + 0.002124786376953125, + -0.0154876708984375, + 0.06884765625, + 0.02630615234375, + 0.051116943359375, + -0.007762908935546875, + -0.0207672119140625, + -0.011749267578125, + 0.0287322998046875, + 0.0192108154296875, + -0.040679931640625, + 0.02838134765625, + -0.008026123046875, + -8.809566497802734e-05, + -0.0032215118408203125, + -0.0275726318359375, + 0.028656005859375, + 0.0068817138671875, + -0.0008440017700195312, + 0.0158843994140625, + 0.0185546875, + -0.035369873046875, + -0.0209808349609375, + -0.005512237548828125, + -0.008758544921875, + -0.0293426513671875, + 0.062103271484375, + -0.0175933837890625, + -0.0168609619140625, + -0.044281005859375, + -0.00695037841796875, + -0.017486572265625, + 0.0113983154296875, + -0.0176849365234375, + 0.00980377197265625, + 0.0001404285430908203, + -0.0169525146484375, + 0.055938720703125, + 0.12890625, + 0.0211639404296875, + 0.01030731201171875, + -0.0195465087890625, + 0.0037975311279296875, + -0.00604248046875, + 0.035430908203125, + -0.0084228515625, + -0.00785064697265625, + 0.028564453125, + -0.015716552734375, + 0.005138397216796875, + 0.01255035400390625, + -0.00794219970703125, + -0.0138092041015625, + -0.037689208984375, + 0.07135009765625, + 0.01739501953125, + 0.06378173828125, + 0.02716064453125, + 0.02789306640625, + 0.024322509765625, + 0.0670166015625, + -0.039886474609375, + -0.0156707763671875, + -0.06683349609375, + -0.00021588802337646484, + -0.015777587890625, + 0.06488037109375, + -0.006000518798828125, + -0.00812530517578125, + 0.0294647216796875, + -0.03948974609375, + 0.031524658203125, + -0.002178192138671875, + -0.0030651092529296875, + 0.0008096694946289062, + -0.03875732421875, + 0.004146575927734375, + -0.005435943603515625, + -0.0301971435546875, + -0.007488250732421875, + -0.0137786865234375, + -0.0408935546875, + 0.0423583984375, + 0.0186767578125, + -0.026580810546875, + 0.00273895263671875, + -0.032196044921875, + 0.0168609619140625, + 0.0261077880859375, + -0.012542724609375, + 0.03143310546875, + 0.016937255859375, + -0.06097412109375, + -0.0153961181640625, + -0.023712158203125, + 0.0307159423828125, + -0.0011568069458007812, + 0.0322265625, + -0.0273895263671875, + -0.0241851806640625, + -0.005878448486328125, + 0.00867462158203125, + 0.05108642578125, + -0.007076263427734375, + -0.0030956268310546875, + -0.004741668701171875, + -0.00736236572265625, + -0.03717041015625, + 0.01123046875, + -0.037994384765625, + 0.01395416259765625, + 0.00994110107421875, + 0.0015878677368164062, + 0.06903076171875, + -0.023529052734375, + -0.01511383056640625, + -0.0254364013671875, + 0.04034423828125, + 0.047119140625, + 0.033782958984375, + 0.03717041015625, + 0.0287322998046875, + -0.03558349609375, + 0.01058197021484375, + 0.0254974365234375, + -0.01435089111328125, + 0.034942626953125, + -0.01776123046875, + 0.006839752197265625, + 0.0289459228515625, + -0.033905029296875, + -0.031402587890625, + -0.0110931396484375, + -0.016845703125, + -0.0201568603515625, + 0.006443023681640625, + 0.038482666015625, + -0.045654296875, + -0.0251617431640625, + 0.0284271240234375, + -0.01229095458984375, + 0.0303497314453125, + -0.0222625732421875, + -0.0235137939453125, + -0.01025390625, + -0.04669189453125, + -0.0198211669921875, + -0.020355224609375, + 0.001953125, + 0.01165771484375, + -0.03997802734375, + -0.04547119140625, + 0.029205322265625, + -0.057952880859375, + -0.00583648681640625, + -0.06219482421875, + 0.06781005859375, + -0.028167724609375, + -0.01436614990234375, + 0.02044677734375, + -0.037353515625, + 0.01209259033203125, + 0.052734375, + 0.00311279296875, + -0.02252197265625, + 0.035552978515625, + -0.04376220703125, + -0.0863037109375, + -0.0265350341796875, + -0.0156707763671875, + 0.0159454345703125, + -0.040435791015625, + 0.037628173828125, + -0.0023708343505859375, + -0.01349639892578125, + -0.0219879150390625, + -0.019866943359375, + -0.0173797607421875, + -0.0477294921875, + 0.0184173583984375, + -0.00576019287109375, + 0.0220184326171875, + -0.0433349609375, + -0.00762939453125, + -0.01560211181640625, + -0.016845703125, + -0.01337432861328125, + 0.046875, + 0.0270233154296875, + 0.015289306640625, + 0.01412200927734375, + -0.0008230209350585938, + 0.0154266357421875, + -0.00507354736328125, + -0.0007081031799316406, + 0.01357269287109375, + 0.019561767578125, + 0.005168914794921875, + 0.0091094970703125, + 0.0103912353515625, + 0.01140594482421875, + -0.09356689453125, + 0.041259765625, + -0.034027099609375, + 0.0031719207763671875, + -0.0062255859375, + -0.002231597900390625, + 0.00594329833984375, + 0.00550079345703125, + -0.01513671875, + -0.0328369140625, + 0.017425537109375, + -0.0236663818359375, + -0.0235137939453125, + 0.026580810546875, + -0.04376220703125, + 0.0189971923828125, + 0.0010080337524414062, + -0.004932403564453125, + 0.020355224609375, + 0.01129913330078125, + -0.0198822021484375, + 0.010223388671875, + -0.020538330078125, + 0.01338958740234375, + 0.038818359375, + 0.03985595703125, + -0.002166748046875, + -0.0211029052734375, + 0.0157470703125, + -0.03271484375, + -0.0199737548828125, + -0.0684814453125, + 0.047515869140625, + 0.0701904296875, + -0.007305145263671875, + 0.004871368408203125, + 0.0007276535034179688, + 0.0233154296875, + -0.012237548828125, + 0.0643310546875, + -0.002384185791015625, + -0.017364501953125, + -0.009735107421875, + -0.04656982421875, + -0.002674102783203125, + 0.0595703125, + 0.040130615234375, + 0.0131988525390625, + -0.008331298828125, + 0.0172882080078125, + 0.00811004638671875, + -0.005092620849609375, + 0.01514434814453125, + 0.056427001953125, + -0.022735595703125, + 0.0204010009765625, + -0.0182647705078125, + -0.011749267578125, + -0.0156402587890625, + -0.02197265625, + -0.02581787109375, + -0.0198516845703125, + -0.0298919677734375, + 0.022674560546875, + 0.0273284912109375, + 0.01309967041015625, + -0.00862884521484375, + 0.01898193359375, + -0.12445068359375, + 0.029449462890625, + 0.022430419921875, + 0.01265716552734375, + -0.036102294921875, + -0.0018367767333984375, + -0.0236968994140625, + -0.03466796875, + 0.00135040283203125, + -0.056060791015625, + -0.01000213623046875, + 0.029388427734375, + -0.02044677734375, + -0.00836944580078125, + 0.005596160888671875, + 0.00321197509765625, + -0.0276336669921875, + -0.0222930908203125, + 0.040802001953125, + 0.01995849609375, + 0.01110076904296875, + -0.00595855712890625, + 0.0036640167236328125, + -0.01708984375, + -0.0088958740234375, + 0.014312744140625, + -0.0215911865234375, + 0.005367279052734375, + -0.01134490966796875, + -0.04852294921875, + -0.0018682479858398438, + -0.060882568359375, + 0.00308990478515625, + 0.05670166015625, + -0.0261077880859375, + 0.033966064453125, + -0.002964019775390625, + -0.0309600830078125, + -0.04046630859375, + 0.027740478515625, + 0.0194854736328125, + -0.0038814544677734375, + -0.02294921875, + 0.031280517578125, + -0.04888916015625, + 0.0225677490234375, + -0.019775390625, + -0.01171112060546875, + -0.02496337890625, + -0.0241851806640625, + -0.0088653564453125, + 0.03387451171875, + 0.01337432861328125, + 0.047027587890625, + -0.013885498046875, + 0.05047607421875, + -0.054046630859375, + 0.0516357421875, + 0.0291900634765625, + 0.05596923828125, + -0.044036865234375, + 0.0023593902587890625, + -0.004375457763671875, + 0.01137542724609375, + -0.061859130859375, + 0.0215606689453125, + -0.04180908203125, + 0.006069183349609375, + 0.0435791015625, + -0.007335662841796875, + -0.0241241455078125, + 0.01224517822265625, + -0.0152130126953125, + 0.0266571044921875, + -0.00913238525390625, + 0.0101470947265625, + 0.039154052734375, + -0.0050048828125, + 0.0241241455078125, + -0.0263214111328125, + -0.004634857177734375, + 0.02105712890625, + -0.012542724609375, + 0.035369873046875, + -0.00931549072265625, + 0.013092041015625, + -0.023529052734375, + -0.0132904052734375, + -0.0243072509765625, + 0.0033721923828125, + -0.0275726318359375, + -0.0545654296875, + 0.032501220703125, + -0.04034423828125, + -0.07281494140625, + 0.031585693359375, + -0.046234130859375, + 0.0001672506332397461, + -0.031768798828125, + -0.06890869140625, + 0.019927978515625, + 0.0206146240234375, + -0.0206756591796875, + -0.0060272216796875, + -0.0162811279296875, + 0.00601959228515625, + -0.03607177734375, + 0.016876220703125, + 0.00420379638671875, + -0.01190185546875, + 0.014801025390625, + -0.03533935546875, + -0.0235137939453125, + 0.0181732177734375, + -0.01385498046875, + -0.025238037109375, + 0.01546478271484375, + 0.03363037109375, + -0.009979248046875, + 0.04962158203125, + -0.038909912109375, + 0.0084686279296875, + 0.006839752197265625, + -0.035125732421875, + 0.00830078125, + 0.00817108154296875, + -0.005504608154296875, + -0.0262603759765625, + 0.06561279296875, + -0.0215606689453125, + -0.0009908676147460938, + 0.0054931640625, + 0.0252227783203125, + -0.0133514404296875, + -0.00567626953125, + -0.0103912353515625, + -0.05413818359375, + 0.0161895751953125, + -0.0077056884765625, + -0.05718994140625, + 0.042755126953125, + 0.0103607177734375, + -0.017974853515625, + -0.004817962646484375, + -0.048797607421875, + -0.030517578125, + -0.019989013671875, + -0.01287841796875, + 0.043487548828125, + -0.0048065185546875, + 0.036285400390625, + 0.037811279296875, + 0.0102081298828125, + 0.0772705078125, + -0.0498046875, + 0.032196044921875, + -0.0926513671875, + -0.0041351318359375, + 0.0309600830078125, + -0.005023956298828125, + -0.03204345703125, + 0.0007352828979492188, + -0.02880859375, + -0.0599365234375, + -0.006755828857421875, + 0.0017461776733398438, + -0.0208282470703125, + -0.02783203125, + 0.04315185546875, + -0.0751953125, + -0.0396728515625, + 0.0245513916015625, + -0.0478515625, + -0.021331787109375, + 0.00885009765625, + 0.0145721435546875, + 0.0018301010131835938, + -0.0087127685546875, + -0.0300750732421875, + -0.0134735107421875, + 0.08270263671875, + 0.0379638671875, + 0.07232666015625, + 0.0003082752227783203, + -0.0277557373046875, + -0.056243896484375, + -0.06982421875, + 0.027252197265625, + 0.015869140625, + 0.0084075927734375, + -0.00959014892578125, + -0.00418853759765625, + -0.048614501953125, + -0.004364013671875, + 0.0184783935546875, + 0.00011110305786132812, + -0.01202392578125, + 0.0085296630859375, + -0.0029659271240234375, + 0.034759521484375, + 0.018646240234375, + -0.0301666259765625, + 0.033294677734375, + 0.01288604736328125, + -0.03436279296875, + -0.011505126953125, + -0.0260162353515625, + -0.03326416015625, + -0.08038330078125, + 0.01348876953125, + -0.00909423828125, + 0.0240325927734375, + -0.0226898193359375, + 0.05963134765625, + 0.044158935546875, + -0.0286407470703125, + -0.01033782958984375, + 0.012603759765625, + 0.042449951171875, + -0.006351470947265625, + -0.01268768310546875, + 0.0024700164794921875, + -0.01861572265625, + 0.0025959014892578125, + -0.0233154296875, + 0.0384521484375, + -0.026641845703125, + 0.021331787109375, + -0.01041412353515625, + -0.0009088516235351562, + 0.0175628662109375, + 0.00936126708984375, + -0.02838134765625, + -0.0126800537109375, + -0.01200103759765625, + 0.0086669921875, + -0.00891876220703125, + 0.01465606689453125, + 0.01197052001953125, + 0.0005235671997070312, + 0.033050537109375, + 0.0182647705078125, + 0.0198211669921875, + -0.0161285400390625 + ], + [ + 0.05059814453125, + 0.05517578125, + -0.037017822265625, + 0.031494140625, + -0.01776123046875, + -0.0045928955078125, + -0.0394287109375, + 0.0116119384765625, + 0.0285797119140625, + 0.0011005401611328125, + 0.0179901123046875, + 0.0245513916015625, + -0.007755279541015625, + -0.004425048828125, + -0.036895751953125, + -0.0217742919921875, + 0.0149993896484375, + -0.029022216796875, + 0.00711822509765625, + -0.0163726806640625, + 0.02496337890625, + -0.0005350112915039062, + -0.020721435546875, + -0.036407470703125, + -0.03021240234375, + 0.0174102783203125, + -0.01535797119140625, + 0.0307769775390625, + -0.04119873046875, + -0.04437255859375, + 0.0015935897827148438, + -0.0394287109375, + 0.018646240234375, + 0.048370361328125, + 0.0113983154296875, + 0.0038967132568359375, + -0.0149383544921875, + -0.046356201171875, + -0.040191650390625, + 0.03564453125, + 0.0024662017822265625, + -0.0145263671875, + 0.043701171875, + 0.04742431640625, + 0.010589599609375, + -0.06658935546875, + -0.0260772705078125, + -0.018096923828125, + -0.04705810546875, + -0.0172576904296875, + -0.00861358642578125, + -0.02752685546875, + -0.0007171630859375, + -0.0020198822021484375, + 0.03265380859375, + 0.0499267578125, + -0.04766845703125, + 0.0002815723419189453, + -0.0022735595703125, + 0.042724609375, + -0.00951385498046875, + 0.0129241943359375, + -0.035247802734375, + -0.0281982421875, + 0.0233154296875, + 0.04180908203125, + 0.01763916015625, + -0.00524139404296875, + -0.0201873779296875, + -0.0267333984375, + -0.0185394287109375, + 0.00948333740234375, + 0.0013704299926757812, + -0.049468994140625, + -0.0472412109375, + -0.035125732421875, + 0.01739501953125, + -0.0044403076171875, + -0.01555633544921875, + 0.0001710653305053711, + 0.0109710693359375, + -0.02435302734375, + -0.006084442138671875, + 0.0237579345703125, + -0.04132080078125, + 0.00482940673828125, + 0.00899505615234375, + 0.03924560546875, + 0.0201416015625, + -0.00978851318359375, + -0.040130615234375, + 0.0087432861328125, + 0.025726318359375, + 0.020416259765625, + -0.026641845703125, + -0.00830841064453125, + 0.0166168212890625, + -0.0229034423828125, + 0.01509857177734375, + -0.0188751220703125, + -0.039520263671875, + 0.01837158203125, + 0.0175323486328125, + -0.003936767578125, + 0.005184173583984375, + 0.0013837814331054688, + 0.038970947265625, + 0.006153106689453125, + -0.044219970703125, + 0.00965118408203125, + 0.07794189453125, + 0.0246734619140625, + 0.04327392578125, + 0.0126953125, + -0.01526641845703125, + -0.038726806640625, + 0.0124053955078125, + -0.0250701904296875, + -0.0277099609375, + -0.034576416015625, + 0.034332275390625, + 0.0161895751953125, + 0.069091796875, + -0.0087738037109375, + -0.037353515625, + 0.033233642578125, + 0.01354217529296875, + -0.0010519027709960938, + 0.00023317337036132812, + 0.0153350830078125, + -0.007808685302734375, + 0.06634521484375, + -0.0305633544921875, + 0.023284912109375, + -0.0149383544921875, + -0.0031909942626953125, + 0.032867431640625, + 0.0074615478515625, + 0.03668212890625, + -0.032318115234375, + 0.0164642333984375, + -0.0169525146484375, + 0.0012826919555664062, + -0.04351806640625, + 0.0291595458984375, + -0.0002092123031616211, + -0.033477783203125, + 0.04986572265625, + 0.033416748046875, + -0.0302581787109375, + 0.0170135498046875, + 0.024139404296875, + 0.055328369140625, + 0.018035888671875, + -0.0465087890625, + -0.0005116462707519531, + -0.037506103515625, + 0.024200439453125, + -0.037750244140625, + -0.00701904296875, + -0.0080413818359375, + 0.01314544677734375, + -0.041107177734375, + 0.011932373046875, + 0.0501708984375, + -0.008636474609375, + 0.0141448974609375, + 0.02484130859375, + -0.02081298828125, + -0.018829345703125, + 0.016448974609375, + -0.05816650390625, + -0.017181396484375, + 0.0033245086669921875, + -0.0219879150390625, + 0.037933349609375, + 0.02093505859375, + 0.005512237548828125, + 0.006481170654296875, + -0.05133056640625, + -0.0272979736328125, + -0.0469970703125, + 0.0082244873046875, + 0.0183868408203125, + 0.0142364501953125, + 0.01537322998046875, + -0.031768798828125, + 0.00353240966796875, + -0.00782012939453125, + 0.006877899169921875, + -0.0408935546875, + -0.0338134765625, + 0.06475830078125, + -0.0168609619140625, + 0.0272369384765625, + 0.0033435821533203125, + -0.0161285400390625, + -0.0006284713745117188, + -0.03717041015625, + -0.02197265625, + -0.00989532470703125, + 0.00217437744140625, + 0.003936767578125, + -0.0166778564453125, + 0.01357269287109375, + 0.0237274169921875, + -0.01497650146484375, + -0.011688232421875, + 0.041015625, + -0.038604736328125, + 0.0218658447265625, + -0.01520538330078125, + -0.015960693359375, + -0.01190185546875, + -0.00133514404296875, + 0.056671142578125, + 0.03997802734375, + 0.0050506591796875, + 0.04180908203125, + 0.03680419921875, + -0.0020751953125, + 0.03973388671875, + -0.033416748046875, + 0.03155517578125, + 0.033203125, + -0.00760650634765625, + -0.00917816162109375, + 0.0272369384765625, + -0.015869140625, + -0.035980224609375, + -0.030426025390625, + -0.00150299072265625, + 0.0208892822265625, + -0.01287078857421875, + -0.0227508544921875, + -0.0244903564453125, + -0.05419921875, + -0.0027141571044921875, + 0.00467681884765625, + 0.01025390625, + 0.006275177001953125, + -0.01459503173828125, + 0.05322265625, + 0.0163116455078125, + -0.025848388671875, + 0.01259613037109375, + 0.0205230712890625, + 0.031768798828125, + -0.044647216796875, + -0.00707244873046875, + 0.0015411376953125, + -0.04864501953125, + -0.01305389404296875, + 0.004413604736328125, + 0.03802490234375, + 0.0024814605712890625, + 0.0021514892578125, + -0.01068115234375, + 0.00043320655822753906, + -0.0193634033203125, + 0.0019025802612304688, + -0.0158538818359375, + -0.032958984375, + 0.0161895751953125, + 0.06005859375, + -0.042205810546875, + 0.0081024169921875, + 0.0164794921875, + 0.046905517578125, + -0.025970458984375, + 0.0011606216430664062, + 0.01500701904296875, + 0.022796630859375, + -0.036956787109375, + -0.053955078125, + 0.01428985595703125, + -0.0169525146484375, + 0.02020263671875, + -0.01334381103515625, + 0.027099609375, + 0.0234527587890625, + -0.0244903564453125, + 0.01348876953125, + 0.014251708984375, + 0.0274505615234375, + -0.0360107421875, + -0.017242431640625, + 0.0205841064453125, + -0.04022216796875, + -0.00617218017578125, + -0.039520263671875, + -0.047607421875, + 0.050323486328125, + -0.00673675537109375, + 0.01239776611328125, + -0.049468994140625, + -0.007053375244140625, + -0.1881103515625, + -0.029296875, + -0.024688720703125, + -0.0085906982421875, + -0.010711669921875, + 0.010589599609375, + 0.0252532958984375, + -0.072509765625, + 0.0107879638671875, + 0.0207977294921875, + -0.051849365234375, + -0.04119873046875, + -0.03802490234375, + -0.0322265625, + 0.01493072509765625, + 0.03717041015625, + -0.016845703125, + -0.006824493408203125, + -0.036376953125, + -0.003376007080078125, + -0.0259857177734375, + -0.006267547607421875, + -0.0080108642578125, + 0.056915283203125, + -0.01493072509765625, + 0.031585693359375, + 0.0008206367492675781, + 0.03350830078125, + -0.009796142578125, + 0.01032257080078125, + -0.02252197265625, + 0.02935791015625, + -5.1915645599365234e-05, + -0.00724029541015625, + 0.0806884765625, + 0.01290130615234375, + 0.0225372314453125, + 0.0030841827392578125, + 0.0282135009765625, + 0.006927490234375, + -0.0002589225769042969, + 0.00856781005859375, + -0.014892578125, + 0.022796630859375, + -0.00785064697265625, + -0.061981201171875, + 0.01023101806640625, + -0.00478363037109375, + -0.0016717910766601562, + -0.046630859375, + 0.01611328125, + -0.01273345947265625, + -0.0158843994140625, + -0.018798828125, + -0.036376953125, + -0.009246826171875, + -0.0099029541015625, + 0.0007410049438476562, + 0.0030994415283203125, + -0.0103607177734375, + 0.0200958251953125, + -0.0706787109375, + 0.03460693359375, + -0.01001739501953125, + -0.01129150390625, + 0.0195770263671875, + -0.03338623046875, + -0.0262603759765625, + 0.0067596435546875, + 0.020233154296875, + 0.034210205078125, + 0.05682373046875, + 0.00164794921875, + 0.0036487579345703125, + 0.0701904296875, + 0.0252838134765625, + -0.0159454345703125, + -0.0172576904296875, + -0.0022182464599609375, + -0.040771484375, + -0.01183319091796875, + 0.0156402587890625, + -0.029296875, + -0.0467529296875, + -0.031982421875, + -0.0302734375, + -0.0011701583862304688, + 0.024200439453125, + 0.04241943359375, + 0.257080078125, + -0.005702972412109375, + 0.06903076171875, + -0.052825927734375, + -0.003292083740234375, + -0.031707763671875, + 0.0286102294921875, + -0.0104827880859375, + 0.0487060546875, + -0.0235137939453125, + -0.0301361083984375, + 0.0223236083984375, + 0.0013017654418945312, + -0.0150146484375, + 0.004581451416015625, + 0.02691650390625, + -0.029052734375, + 0.042205810546875, + 0.053131103515625, + -0.00550079345703125, + -0.0217132568359375, + -0.110107421875, + 0.031280517578125, + -0.042694091796875, + 0.0021381378173828125, + -0.007205963134765625, + 0.005611419677734375, + -0.0019445419311523438, + 0.00330352783203125, + 0.0147552490234375, + -0.02691650390625, + -0.016448974609375, + -0.00409698486328125, + 0.060791015625, + -0.036590576171875, + -0.031707763671875, + 0.029571533203125, + 0.0380859375, + -0.0288543701171875, + -0.003753662109375, + -0.01302337646484375, + -0.035308837890625, + 0.017425537109375, + -0.06060791015625, + 0.0024013519287109375, + -0.0252227783203125, + -0.0341796875, + 0.0010318756103515625, + 0.004528045654296875, + -0.0296478271484375, + -0.008575439453125, + 0.054931640625, + 0.0160980224609375, + 0.021636962890625, + -0.03533935546875, + 0.0128936767578125, + -0.019287109375, + 0.01873779296875, + -0.0338134765625, + -0.0037860870361328125, + 0.0277099609375, + -0.0021877288818359375, + 0.00933074951171875, + -0.0192718505859375, + 0.0040740966796875, + -0.035888671875, + 0.03887939453125, + -0.042083740234375, + -0.03399658203125, + 0.034515380859375, + 0.07958984375, + -0.035888671875, + -0.04779052734375, + -0.03515625, + 0.026458740234375, + 0.05810546875, + -0.01329803466796875, + 0.06787109375, + 0.007720947265625, + -0.00974273681640625, + 0.00897979736328125, + -0.060821533203125, + -0.004604339599609375, + 0.058441162109375, + 0.0172271728515625, + -0.00864410400390625, + 0.034332275390625, + 0.0361328125, + -0.0255584716796875, + -0.04803466796875, + -0.01151275634765625, + 0.01352691650390625, + -0.037841796875, + 0.04241943359375, + -0.0005412101745605469, + -0.0091705322265625, + 0.0149078369140625, + -0.04290771484375, + -0.0828857421875, + -0.0023021697998046875, + -0.005584716796875, + -0.01122283935546875, + -0.039764404296875, + 0.01007080078125, + -0.00920867919921875, + -0.015289306640625, + 0.0018310546875, + 0.031768798828125, + -0.00760650634765625, + 0.02984619140625, + 0.01433563232421875, + 0.00047516822814941406, + -0.0048980712890625, + 0.0274505615234375, + -0.0098419189453125, + 0.0223846435546875, + -0.0204010009765625, + 0.0169525146484375, + 0.0211639404296875, + 0.08245849609375, + -0.0184783935546875, + -0.0102996826171875, + 0.0013704299926757812, + -0.0237579345703125, + -0.046234130859375, + 0.02545166015625, + -0.007503509521484375, + 0.10174560546875, + -0.007144927978515625, + 0.038970947265625, + 0.0274658203125, + -0.034423828125, + -0.04425048828125, + -0.01995849609375, + 0.07525634765625, + -0.020050048828125, + -0.023834228515625, + -0.007480621337890625, + -0.035369873046875, + -0.0182037353515625, + -0.017059326171875, + -0.00847625732421875, + -0.009674072265625, + 0.0179595947265625, + 0.0025177001953125, + -0.03326416015625, + -0.007343292236328125, + -0.0025920867919921875, + 0.0186614990234375, + 0.022613525390625, + -0.00262451171875, + 0.01629638671875, + -0.0367431640625, + -0.036224365234375, + 0.0022792816162109375, + 0.0284576416015625, + -0.0220794677734375, + 0.007572174072265625, + -0.0173187255859375, + 0.0007100105285644531, + 0.046875, + 0.02252197265625, + 0.027679443359375, + 0.073486328125, + 0.015838623046875, + 0.003360748291015625, + -0.02288818359375, + 0.023223876953125, + 0.0306243896484375, + -0.0108795166015625, + -0.01117706298828125, + -0.0250091552734375, + -0.01070404052734375, + -0.024139404296875, + 0.039581298828125, + 0.0012407302856445312, + -0.002521514892578125, + -0.0031185150146484375, + 0.005214691162109375, + 0.03240966796875, + 0.022552490234375, + 0.039520263671875, + 0.0406494140625, + -0.0290374755859375, + -0.057891845703125, + -0.0013360977172851562, + -0.05517578125, + -0.01558685302734375, + 0.00881195068359375, + -0.0268096923828125, + -0.0281524658203125, + 0.053802490234375, + -0.04498291015625, + -0.0246124267578125, + 0.0273895263671875, + 0.0061492919921875, + 0.038055419921875, + 0.015777587890625, + 0.03143310546875, + 0.0144805908203125, + -0.00408935546875, + -0.01137542724609375, + -0.02081298828125, + -0.0031337738037109375, + -0.07080078125, + -0.03509521484375, + -0.038665771484375, + 0.0265350341796875, + -0.03497314453125, + -0.060150146484375, + 0.015869140625, + -0.003932952880859375, + 0.003818511962890625, + 0.0102996826171875, + -0.06292724609375, + 0.004177093505859375, + 0.0265960693359375, + 0.031829833984375, + 0.0202484130859375, + -0.0161285400390625, + -0.0244140625, + 0.0318603515625, + 0.0160980224609375, + 0.032379150390625, + 0.0285797119140625, + 0.0119171142578125, + 0.040283203125, + 0.031890869140625, + 0.006694793701171875, + -0.02325439453125, + -0.006191253662109375, + -0.045501708984375, + -0.04534912109375, + -0.01148223876953125, + -0.0271453857421875, + -0.0205535888671875, + 0.00946044921875, + -0.00215911865234375, + -0.00344085693359375, + 0.01187896728515625, + 0.01313018798828125, + -0.050933837890625, + 0.04119873046875, + 0.027435302734375, + -0.0179595947265625, + 0.02545166015625, + 0.00244903564453125, + -0.037872314453125, + 0.051483154296875, + 0.038330078125, + -0.0307769775390625, + 0.00646209716796875, + 0.0014743804931640625, + -0.00362396240234375, + 0.028472900390625, + -0.058868408203125, + -0.053924560546875, + -0.027374267578125, + -0.0254974365234375, + 0.006443023681640625, + 0.007843017578125, + 0.0017881393432617188, + -0.02813720703125, + -0.0210418701171875, + 0.0085601806640625, + -0.01116180419921875, + -0.01885986328125, + -0.03680419921875, + -0.0294036865234375, + -0.0173797607421875, + -0.04150390625, + -0.0162811279296875, + -0.04974365234375, + 0.015655517578125, + 0.041473388671875, + 0.021728515625, + -0.044097900390625, + -0.006134033203125, + -0.0579833984375, + -0.043853759765625, + -0.04388427734375, + 0.019927978515625, + 0.0108642578125, + -0.0008497238159179688, + -0.020660400390625, + -0.0203094482421875, + 0.03143310546875, + 0.038360595703125, + -0.0016345977783203125, + -0.029022216796875, + 0.042022705078125, + -0.04443359375, + -0.05645751953125, + 0.0184173583984375, + -0.01153564453125, + 0.0416259765625, + -0.061248779296875, + 0.005947113037109375, + 0.00930023193359375, + -0.050994873046875, + 0.0033016204833984375, + 0.0003674030303955078, + -0.037078857421875, + -0.037139892578125, + -0.028778076171875, + 0.0200042724609375, + 0.00859832763671875, + -0.067138671875, + -0.006137847900390625, + -0.00675201416015625, + 0.03802490234375, + -0.0089569091796875, + 0.005794525146484375, + 0.077880859375, + -0.0035877227783203125, + -0.041229248046875, + -0.0113983154296875, + -0.03765869140625, + 0.01381683349609375, + -0.0105743408203125, + 0.052459716796875, + 0.002887725830078125, + 0.0129241943359375, + -0.00843048095703125, + 0.0174713134765625, + 0.02142333984375, + -0.0299530029296875, + 0.00952911376953125, + -0.04388427734375, + -0.026336669921875, + -0.039642333984375, + 0.0165252685546875, + -0.01812744140625, + -0.01291656494140625, + -0.043975830078125, + -0.023040771484375, + 0.0124053955078125, + -0.0135955810546875, + -0.0090789794921875, + 0.0247955322265625, + 0.00200653076171875, + 0.05328369140625, + 0.020904541015625, + -0.00655364990234375, + -0.00856781005859375, + 0.0014314651489257812, + -0.03924560546875, + -0.0241851806640625, + -0.03369140625, + 0.01181793212890625, + 4.774332046508789e-05, + 0.05694580078125, + 0.0018415451049804688, + -0.01331329345703125, + -0.014312744140625, + -0.0447998046875, + 0.0017948150634765625, + -0.045196533203125, + 0.01380157470703125, + 0.031585693359375, + 0.0102081298828125, + -0.0157928466796875, + 0.0284576416015625, + 0.033355712890625, + 0.00795745849609375, + 0.05975341796875, + 0.0013265609741210938, + -0.0259857177734375, + 0.035797119140625, + 0.0018224716186523438, + 0.005462646484375, + 0.07177734375, + 0.040924072265625, + -0.0082855224609375, + -0.0111236572265625, + 0.06060791015625, + 0.0265350341796875, + -0.011932373046875, + 0.021148681640625, + 0.01300811767578125, + 0.0018634796142578125, + -0.04095458984375, + -0.0185546875, + -0.051483154296875, + -0.048553466796875, + 0.04345703125, + -0.029998779296875, + 0.016571044921875, + 0.0321044921875, + 0.0382080078125, + -0.0141448974609375, + -0.0213470458984375, + 0.02239990234375, + 0.0210418701171875, + -0.11773681640625, + 0.019989013671875, + -0.022064208984375, + 0.0250244140625, + -0.044708251953125, + 0.023895263671875, + 0.006999969482421875, + 0.01320648193359375, + -0.0099029541015625, + -0.0185089111328125, + -0.0030498504638671875, + 0.04052734375, + 0.006374359130859375, + 0.0009632110595703125, + -0.038787841796875, + 0.060302734375, + -0.040679931640625, + 0.007221221923828125, + -0.0275115966796875, + 0.01558685302734375, + 0.0023365020751953125, + -0.0185089111328125, + -0.0419921875, + 0.03326416015625, + 0.0022220611572265625, + 0.0012035369873046875, + 0.012664794921875, + -0.0105743408203125, + -0.012725830078125, + 0.005340576171875, + 0.052398681640625, + -0.031097412109375, + 0.00016295909881591797, + 0.0135498046875, + 0.0275726318359375, + 0.01085662841796875, + 0.01221466064453125, + -0.0250244140625, + 0.017333984375, + 0.050018310546875, + 0.0030918121337890625, + 0.00797271728515625, + 0.033905029296875, + -0.00453948974609375, + -0.015380859375, + -0.0164337158203125, + 0.0576171875, + 0.02142333984375, + -0.027313232421875, + -0.021270751953125, + 0.00931549072265625, + 0.002819061279296875, + -0.0212249755859375, + 0.016082763671875, + -0.00991058349609375, + 0.0207672119140625, + 0.014862060546875, + 0.039031982421875, + 0.027801513671875, + 0.0189208984375, + -0.021240234375, + -0.0233612060546875, + 0.006481170654296875, + -0.00363922119140625, + -0.02655029296875, + 0.04193115234375, + -0.00628662109375, + 0.03692626953125, + 0.036346435546875, + -0.050079345703125, + -0.0167388916015625, + 0.029266357421875, + -0.005252838134765625, + -0.0008511543273925781, + -0.00746917724609375, + 0.061248779296875, + 0.0177764892578125, + 0.0218505859375, + 0.03314208984375, + -0.038604736328125, + -0.01447296142578125, + -0.035919189453125, + 0.0286712646484375, + 0.0293731689453125, + 0.0233001708984375, + -0.010345458984375, + -0.0255889892578125, + -0.00627899169921875, + -0.04742431640625, + -0.041595458984375, + -0.02044677734375, + -0.06756591796875, + -0.05804443359375, + 0.03253173828125, + -0.07598876953125, + 0.012939453125, + -0.05029296875, + -0.0027065277099609375, + -0.034088134765625, + -0.037506103515625, + 0.01861572265625, + 0.005649566650390625, + 0.0030155181884765625, + -0.0121917724609375, + -0.002635955810546875, + 0.047332763671875, + -0.017913818359375, + 0.0312042236328125, + -0.0026302337646484375, + -0.0243988037109375, + -0.033477783203125, + -0.01523590087890625, + -0.0179901123046875, + 0.002071380615234375, + -0.02447509765625, + 0.009185791015625, + -0.017822265625, + -0.014923095703125, + 0.016693115234375, + 0.01776123046875, + -0.0260162353515625, + -0.006378173828125, + 0.013580322265625, + -0.0216217041015625, + -0.01503753662109375, + 0.043548583984375, + 0.01248931884765625, + -0.001171112060546875, + 0.026458740234375, + 0.00847625732421875, + -0.005252838134765625, + 0.005451202392578125, + -0.035186767578125, + 0.005214691162109375, + 0.06304931640625, + 0.00878143310546875, + 0.032562255859375, + 0.032806396484375, + 0.0240478515625, + -0.0189971923828125, + -0.0008606910705566406, + 0.01055145263671875, + -0.0167083740234375, + -0.0007910728454589844, + 0.0091552734375, + 0.0071868896484375, + -0.0338134765625, + -0.04229736328125, + 0.025299072265625, + -0.03448486328125, + -0.0202789306640625, + 0.00749969482421875, + -0.0017023086547851562, + 0.03741455078125, + -0.045745849609375, + 0.033966064453125, + 0.049591064453125, + 0.0244140625, + -0.0215911865234375, + -0.004131317138671875, + 0.002185821533203125, + 0.020538330078125, + -0.027923583984375, + -0.0126190185546875, + 0.00684356689453125, + 0.028472900390625, + -0.00940704345703125, + -0.032958984375, + -0.0168304443359375, + 0.00867462158203125, + -0.003543853759765625, + 0.00421905517578125, + -0.0227508544921875, + 0.016082763671875, + 0.055328369140625, + 0.01395416259765625, + 0.021270751953125, + 0.047882080078125, + 0.00023555755615234375, + 0.005207061767578125, + 0.032318115234375, + 0.0550537109375, + 0.028961181640625, + 0.008758544921875, + 0.0019016265869140625, + -0.057403564453125, + -0.023345947265625, + 0.057525634765625, + 0.00485992431640625, + 0.03515625, + -0.02545166015625, + 0.0418701171875, + -0.007171630859375, + 0.02362060546875, + -0.00974273681640625, + -0.004306793212890625, + 0.023101806640625, + 0.051483154296875, + 0.0413818359375, + -0.017181396484375, + -0.0132293701171875, + -0.0247344970703125, + -0.0269012451171875, + 0.0428466796875, + -0.010589599609375, + 0.006259918212890625, + 0.0513916015625, + -0.018341064453125, + -0.032867431640625, + -0.0306854248046875, + -0.041778564453125, + -0.01473236083984375, + -0.007293701171875, + 0.050384521484375, + -0.01203155517578125, + 0.0352783203125, + 0.01410675048828125, + -0.01361083984375, + -0.00457763671875, + 0.01375579833984375, + 0.0066680908203125, + 0.01316070556640625, + -0.046295166015625, + -0.0188140869140625, + -0.0059814453125, + 0.0178375244140625, + -0.0195770263671875, + 0.02447509765625, + -0.0231475830078125, + 0.004428863525390625, + -0.01244354248046875, + 0.0161285400390625, + 0.01317596435546875, + 0.09454345703125, + 0.0127105712890625, + 0.01276397705078125, + 0.01165771484375, + -0.004161834716796875, + 0.04010009765625, + -0.021759033203125, + 0.1016845703125, + -0.02093505859375, + -0.01258087158203125, + -0.037994384765625 + ], + [ + 0.01495361328125, + 0.0254364013671875, + -0.005466461181640625, + 0.01407623291015625, + 0.0018568038940429688, + 0.030059814453125, + -0.01320648193359375, + 0.0016326904296875, + -0.02435302734375, + -0.03314208984375, + 0.004337310791015625, + 0.01244354248046875, + -0.0153961181640625, + 0.022430419921875, + -0.003406524658203125, + 0.0200653076171875, + 0.06304931640625, + -0.0195159912109375, + 0.0184173583984375, + -0.0282135009765625, + -0.006748199462890625, + 0.00022995471954345703, + 0.0095977783203125, + -0.032073974609375, + -0.021728515625, + -0.0193328857421875, + 0.0058441162109375, + -0.00257110595703125, + -0.00310516357421875, + -0.020355224609375, + 0.0196990966796875, + -0.037139892578125, + -0.0193634033203125, + 0.0267486572265625, + -0.0200042724609375, + -0.041473388671875, + 0.02581787109375, + -0.0280609130859375, + -0.031585693359375, + 0.01471710205078125, + 0.0115509033203125, + -0.009490966796875, + 0.0087432861328125, + -0.0165863037109375, + 0.013275146484375, + -0.06854248046875, + -0.0496826171875, + -0.005970001220703125, + -0.006580352783203125, + -0.0595703125, + -0.037994384765625, + -0.041473388671875, + 0.00513458251953125, + 0.00597381591796875, + -0.0012874603271484375, + 0.032012939453125, + -0.0601806640625, + -0.004962921142578125, + -0.027984619140625, + -0.01291656494140625, + -0.03863525390625, + 0.035980224609375, + -0.0115203857421875, + 0.0018138885498046875, + 0.0256805419921875, + 0.050750732421875, + 0.0283203125, + -0.0218048095703125, + -0.0305938720703125, + -0.00817108154296875, + -0.007717132568359375, + 0.0257720947265625, + -0.062255859375, + -0.003448486328125, + -0.0445556640625, + 0.002269744873046875, + 0.00887298583984375, + 0.0797119140625, + 0.00010865926742553711, + -0.01308441162109375, + 0.0377197265625, + -0.0201263427734375, + 0.028350830078125, + 0.036712646484375, + -0.01250457763671875, + 0.05609130859375, + -0.05499267578125, + 0.07421875, + 0.0360107421875, + -0.028778076171875, + 0.005802154541015625, + -0.0167999267578125, + -0.003910064697265625, + -0.041595458984375, + -0.0242919921875, + -0.0124053955078125, + -0.05938720703125, + -0.0103607177734375, + 0.03961181640625, + -0.01335906982421875, + -0.004184722900390625, + 0.006160736083984375, + 0.0201873779296875, + 0.047515869140625, + 0.050323486328125, + 0.0035991668701171875, + 0.0010995864868164062, + 0.006927490234375, + 0.0194549560546875, + -0.0086822509765625, + 0.028350830078125, + -0.01392364501953125, + 0.048431396484375, + 0.0220947265625, + -0.0290374755859375, + -0.00994873046875, + -0.004154205322265625, + -0.013580322265625, + -0.025360107421875, + 0.0170440673828125, + 0.03411865234375, + -0.0063934326171875, + 0.0088653564453125, + -0.03173828125, + 0.0016841888427734375, + -0.0260467529296875, + -0.0019435882568359375, + 0.03717041015625, + 0.004329681396484375, + -0.00733184814453125, + 0.03515625, + 0.0026111602783203125, + -0.02655029296875, + -0.02978515625, + -0.050506591796875, + 0.047393798828125, + -0.0165557861328125, + 0.01352691650390625, + 0.012847900390625, + 0.01348876953125, + -0.01320648193359375, + 0.01549530029296875, + -0.030059814453125, + -0.07183837890625, + 0.04949951171875, + 0.00936126708984375, + -0.0224761962890625, + 0.036407470703125, + 0.04193115234375, + -0.01617431640625, + 0.0079193115234375, + 0.0225372314453125, + 0.05120849609375, + -0.030670166015625, + -0.0216064453125, + -0.0005617141723632812, + 0.0016183853149414062, + 0.01076507568359375, + -0.0285491943359375, + 0.002147674560546875, + -0.0049896240234375, + -0.00868988037109375, + -0.00014472007751464844, + 0.041839599609375, + 0.008270263671875, + -0.026947021484375, + 0.00823974609375, + 0.0157470703125, + -0.004100799560546875, + 0.01071929931640625, + -0.042205810546875, + -0.03900146484375, + -0.0021514892578125, + 0.0113677978515625, + 0.001178741455078125, + 0.038299560546875, + 0.0904541015625, + -0.00228118896484375, + -0.01461029052734375, + -0.0231475830078125, + -0.044158935546875, + 0.04010009765625, + 0.0299224853515625, + 0.0036067962646484375, + -0.01007843017578125, + 0.06256103515625, + -0.03448486328125, + -0.0055999755859375, + 0.0186614990234375, + 0.01177215576171875, + -0.03955078125, + -0.00966644287109375, + 0.032562255859375, + -0.04144287109375, + 0.0202178955078125, + -0.02032470703125, + 0.006595611572265625, + 0.009185791015625, + -0.00909423828125, + -0.038818359375, + -0.016448974609375, + 0.006908416748046875, + -0.00994873046875, + 0.0003294944763183594, + -0.0252227783203125, + 0.0094451904296875, + -0.0094146728515625, + 0.041534423828125, + 0.01422882080078125, + -0.03668212890625, + 0.0160980224609375, + 0.00804901123046875, + 0.0167388916015625, + 0.0020351409912109375, + -0.025482177734375, + 0.0228424072265625, + 0.034881591796875, + 0.01412200927734375, + 0.00859832763671875, + 0.027862548828125, + 0.0185089111328125, + 0.0305938720703125, + -0.0006299018859863281, + -0.0236663818359375, + 0.02569580078125, + 0.03802490234375, + 0.00814056396484375, + 0.0537109375, + -0.0301666259765625, + -0.0296630859375, + -0.0295867919921875, + 0.0141754150390625, + 0.0007152557373046875, + 0.0032482147216796875, + -0.02362060546875, + 0.0027713775634765625, + -0.0850830078125, + -0.00457763671875, + 0.0364990234375, + -0.033935546875, + -0.03619384765625, + 0.033905029296875, + 0.017974853515625, + 0.0262298583984375, + -0.00010055303573608398, + -0.00966644287109375, + -0.022369384765625, + 0.01123046875, + -0.01195526123046875, + 0.008880615234375, + 0.042816162109375, + -0.024810791015625, + 0.01409149169921875, + 0.0281829833984375, + 0.052459716796875, + 0.0201263427734375, + 0.006824493408203125, + -0.04425048828125, + -0.0162506103515625, + 0.03436279296875, + 0.0030841827392578125, + -0.01654052734375, + -0.01788330078125, + 0.04541015625, + 0.01531219482421875, + -0.0170440673828125, + -0.0091400146484375, + 0.00041794776916503906, + 0.044830322265625, + -0.00225830078125, + 0.02301025390625, + 0.000865936279296875, + -0.01519012451171875, + -0.001201629638671875, + -0.03216552734375, + 0.0111846923828125, + -0.0372314453125, + -0.0180511474609375, + -0.008636474609375, + 0.043182373046875, + 0.04058837890625, + 0.00510406494140625, + 0.07159423828125, + 0.037841796875, + -0.0007109642028808594, + -0.037841796875, + -0.01605224609375, + 0.045928955078125, + -0.032989501953125, + 0.0012178421020507812, + -0.0469970703125, + -0.005565643310546875, + 0.040252685546875, + -0.0083770751953125, + 0.019744873046875, + -0.038970947265625, + 0.0163116455078125, + -0.1947021484375, + -0.05023193359375, + -0.0191497802734375, + 0.0181121826171875, + -0.01030731201171875, + 0.0001417398452758789, + 0.01038360595703125, + -0.030731201171875, + 0.0020351409912109375, + -0.027313232421875, + -0.018646240234375, + -0.038299560546875, + 0.0013265609741210938, + 0.0261688232421875, + -0.0093536376953125, + -0.00014472007751464844, + 0.0089111328125, + -0.0003039836883544922, + -0.0199737548828125, + -0.03912353515625, + -0.00501251220703125, + -0.0005593299865722656, + 0.036376953125, + 0.006740570068359375, + 0.0254364013671875, + -0.007904052734375, + -0.0030040740966796875, + -0.005886077880859375, + 0.0233612060546875, + 0.0019893646240234375, + 0.0242462158203125, + 0.033843994140625, + 0.01058197021484375, + 0.0236053466796875, + 0.03765869140625, + 0.0304412841796875, + 0.01340484619140625, + -0.00506591796875, + 0.040283203125, + 0.0165557861328125, + -0.026702880859375, + 0.056060791015625, + -0.0254364013671875, + -0.02789306640625, + -0.0310516357421875, + 0.010528564453125, + -0.043731689453125, + -0.0165863037109375, + -0.00743865966796875, + -0.0006318092346191406, + -0.029510498046875, + -0.00959014892578125, + -0.0257720947265625, + -0.022491455078125, + -0.02557373046875, + -0.007633209228515625, + -0.0222015380859375, + 0.02349853515625, + 0.028839111328125, + -0.03668212890625, + 0.03424072265625, + -0.0413818359375, + 0.0125579833984375, + -0.0042724609375, + -0.01007843017578125, + 0.044708251953125, + -0.032012939453125, + 0.0138092041015625, + 0.01611328125, + 2.8073787689208984e-05, + 0.0484619140625, + 0.02490234375, + -0.0189361572265625, + 0.0076751708984375, + 0.053558349609375, + 0.040679931640625, + -0.029296875, + 0.00421142578125, + 0.01207733154296875, + -0.051422119140625, + -0.007549285888671875, + 0.029998779296875, + -0.0206298828125, + 0.008331298828125, + -0.0582275390625, + -0.0180816650390625, + -0.0294647216796875, + 0.015655517578125, + -0.0035572052001953125, + 0.246337890625, + -0.0164337158203125, + 0.057647705078125, + -0.06793212890625, + -0.0252227783203125, + -0.01328277587890625, + -0.019073486328125, + 0.0087738037109375, + 0.0267486572265625, + 0.00414276123046875, + -0.053009033203125, + 0.00908660888671875, + 0.00702667236328125, + 0.00466156005859375, + -0.00409698486328125, + 0.0599365234375, + -0.0291748046875, + 0.039642333984375, + 0.039520263671875, + -0.0019817352294921875, + 0.01235198974609375, + -0.045135498046875, + -0.0058746337890625, + -0.0312042236328125, + -0.015228271484375, + -0.0010623931884765625, + 0.01027679443359375, + -0.0013294219970703125, + -0.05718994140625, + 0.028289794921875, + -0.038604736328125, + -0.036956787109375, + 0.027252197265625, + 0.0396728515625, + 0.00098419189453125, + 0.00493621826171875, + -0.0030536651611328125, + 0.0016927719116210938, + 0.011505126953125, + 0.0133514404296875, + 0.00228118896484375, + -0.03594970703125, + 0.00467681884765625, + -0.01258087158203125, + 0.0172576904296875, + 0.00867462158203125, + -0.024200439453125, + -0.0032806396484375, + -0.02703857421875, + -0.024810791015625, + -0.01178741455078125, + -0.00801849365234375, + -0.05340576171875, + -0.0170135498046875, + -0.02764892578125, + -0.0277557373046875, + 0.018280029296875, + -0.005626678466796875, + 0.0177764892578125, + -0.003406524658203125, + 0.025177001953125, + -0.0061187744140625, + 0.0361328125, + -0.0552978515625, + 0.0300445556640625, + -0.0005869865417480469, + 0.0089111328125, + -0.0112457275390625, + -0.0052337646484375, + 0.0579833984375, + 0.08935546875, + -0.045257568359375, + -0.01268768310546875, + -0.0107421875, + 0.01934814453125, + 0.032745361328125, + 0.038421630859375, + 0.039581298828125, + 0.043670654296875, + 0.01061248779296875, + 0.032623291015625, + -0.006786346435546875, + -0.0116729736328125, + 0.052703857421875, + 0.0263519287109375, + 0.005634307861328125, + 0.01629638671875, + 0.06268310546875, + -0.040374755859375, + -0.008026123046875, + 0.04205322265625, + -0.01233673095703125, + -0.0633544921875, + 0.0032787322998046875, + 0.0184783935546875, + -0.04949951171875, + 0.05859375, + -0.028900146484375, + -0.0257415771484375, + 0.009124755859375, + -0.0251617431640625, + -0.055511474609375, + -0.03277587890625, + 0.03631591796875, + 0.01873779296875, + -0.06793212890625, + 0.0171966552734375, + 0.03369140625, + -0.002300262451171875, + 0.0167083740234375, + 0.0229034423828125, + -0.0127410888671875, + -0.0230255126953125, + 0.057952880859375, + 0.005100250244140625, + 0.00524139404296875, + -0.01323699951171875, + -0.0083770751953125, + 0.032623291015625, + 0.066162109375, + 0.04071044921875, + -0.01371002197265625, + -0.05072021484375, + -0.049407958984375, + 0.01100921630859375, + 0.00940704345703125, + -0.0173187255859375, + 0.0850830078125, + -0.0088958740234375, + 0.01416015625, + 0.0280609130859375, + -0.033355712890625, + 0.0189666748046875, + -0.053131103515625, + 0.046844482421875, + -0.0105133056640625, + -0.02423095703125, + -0.0050811767578125, + 0.003513336181640625, + 0.0193939208984375, + -0.0042877197265625, + 0.0169219970703125, + -0.007205963134765625, + 0.046966552734375, + -0.0035400390625, + 0.025299072265625, + -0.0223388671875, + 0.0277099609375, + 0.004253387451171875, + -0.00839996337890625, + -0.0170745849609375, + 0.0026760101318359375, + -0.0283203125, + -0.03619384765625, + -0.031402587890625, + 0.08758544921875, + -0.015045166015625, + 0.00031757354736328125, + -0.006351470947265625, + -0.00930023193359375, + 0.006557464599609375, + 0.0177764892578125, + 0.044189453125, + 0.10284423828125, + -0.0016803741455078125, + -0.00920867919921875, + -0.0364990234375, + -0.00046133995056152344, + -0.01061248779296875, + 0.03240966796875, + 0.0194549560546875, + -0.028961181640625, + -0.0128936767578125, + 0.01611328125, + 0.026885986328125, + -0.0008158683776855469, + 0.01462554931640625, + 0.0003421306610107422, + -0.00011688470840454102, + 0.040557861328125, + 0.0281219482421875, + 0.03411865234375, + -0.01236724853515625, + -0.01116943359375, + 0.0280914306640625, + 0.01128387451171875, + -0.0095062255859375, + -0.03302001953125, + -0.020050048828125, + -0.023223876953125, + -0.03424072265625, + 0.061798095703125, + -0.00023043155670166016, + -0.02728271484375, + 0.03106689453125, + -0.048614501953125, + 0.00629425048828125, + -0.048187255859375, + 0.02984619140625, + -0.058929443359375, + -0.034149169921875, + -0.004322052001953125, + 0.0277252197265625, + -0.020233154296875, + -0.00553131103515625, + -0.005283355712890625, + -0.0060882568359375, + 7.11679458618164e-05, + -0.031646728515625, + -0.09173583984375, + -0.0039043426513671875, + 0.0278167724609375, + -0.0042266845703125, + -0.0199432373046875, + -0.03497314453125, + 0.01302337646484375, + -0.01280975341796875, + -0.0275726318359375, + 0.0265655517578125, + -0.00820159912109375, + 0.017242431640625, + 0.023956298828125, + 0.031768798828125, + -0.050811767578125, + 0.044281005859375, + 0.006092071533203125, + 0.0272216796875, + 0.03167724609375, + 0.0264739990234375, + 0.00917816162109375, + -0.00787353515625, + -0.01312255859375, + -0.04327392578125, + -0.0516357421875, + -0.0026416778564453125, + -0.050323486328125, + 0.007297515869140625, + -0.0008068084716796875, + 0.0338134765625, + -0.01483154296875, + 0.0008111000061035156, + -0.0291595458984375, + 0.043731689453125, + 0.027618408203125, + 0.0162353515625, + 0.0240325927734375, + 0.02911376953125, + -0.02166748046875, + 0.0052642822265625, + 0.005588531494140625, + -0.05120849609375, + -0.00966644287109375, + -0.0127410888671875, + 0.0016241073608398438, + 0.03594970703125, + -0.0158233642578125, + -0.0904541015625, + -0.01230621337890625, + -0.016204833984375, + -0.030731201171875, + 0.032501220703125, + -0.0133209228515625, + -0.033447265625, + -0.0287322998046875, + 0.058868408203125, + -0.036590576171875, + 0.023529052734375, + -0.036895751953125, + -0.01898193359375, + 5.751848220825195e-05, + -0.010650634765625, + -0.0198822021484375, + -0.01922607421875, + 0.00821685791015625, + 0.00994110107421875, + -0.004974365234375, + 0.044189453125, + -0.041351318359375, + -0.059844970703125, + 0.042694091796875, + -0.0545654296875, + 0.04901123046875, + 0.052978515625, + 0.01163482666015625, + -0.01416015625, + -0.0280609130859375, + 0.03363037109375, + 0.043914794921875, + 0.0305633544921875, + -0.0155181884765625, + 0.0214080810546875, + -0.00844573974609375, + -0.047821044921875, + 0.0226898193359375, + 0.03179931640625, + 0.0007653236389160156, + -0.03997802734375, + 0.0196533203125, + -0.0130615234375, + -0.045867919921875, + 0.012451171875, + -0.0106048583984375, + -0.0240020751953125, + -0.043609619140625, + -0.00263214111328125, + 0.034698486328125, + 0.0020122528076171875, + -0.04693603515625, + 0.01354217529296875, + -0.0272369384765625, + -0.023956298828125, + -0.0197296142578125, + 0.03900146484375, + 0.08087158203125, + 0.031402587890625, + -0.052337646484375, + 0.0248260498046875, + -0.039306640625, + 0.0287017822265625, + 0.01178741455078125, + 0.0245513916015625, + 0.0174407958984375, + 0.003887176513671875, + 0.002208709716796875, + 0.035858154296875, + 0.01255035400390625, + 0.01529693603515625, + -0.0005068778991699219, + -0.038238525390625, + -0.002288818359375, + -0.049835205078125, + 0.017852783203125, + 0.0198974609375, + -0.0252532958984375, + -0.01390838623046875, + -0.0333251953125, + 0.049774169921875, + -0.04888916015625, + 0.028564453125, + -0.0810546875, + -0.06768798828125, + 0.04693603515625, + 0.031829833984375, + -0.03717041015625, + 0.0177154541015625, + -0.049468994140625, + -0.003414154052734375, + -0.019683837890625, + -0.0369873046875, + 0.0277862548828125, + 0.016998291015625, + 0.043060302734375, + 0.01461029052734375, + -0.01418304443359375, + 0.031768798828125, + -0.016571044921875, + -0.037994384765625, + -0.0623779296875, + 0.004688262939453125, + -0.01385498046875, + 0.0345458984375, + -0.005954742431640625, + 0.037506103515625, + 0.016265869140625, + -0.0004074573516845703, + 0.059722900390625, + -0.0271453857421875, + -0.0011510848999023438, + -0.032501220703125, + 0.00020563602447509766, + 0.0208740234375, + 0.04620361328125, + 0.0204315185546875, + -0.01187896728515625, + -0.048675537109375, + -0.0001418590545654297, + -0.0225677490234375, + 0.0026569366455078125, + -0.034942626953125, + 0.048583984375, + -0.005001068115234375, + -0.048431396484375, + 0.01508331298828125, + -0.0411376953125, + -0.0274200439453125, + -0.006877899169921875, + -0.0133209228515625, + 0.00389862060546875, + -0.081298828125, + -0.0247039794921875, + -0.00717926025390625, + 0.0245819091796875, + -0.019195556640625, + 0.0166168212890625, + -0.133056640625, + 0.0008115768432617188, + -0.0139617919921875, + 0.0264434814453125, + -0.057647705078125, + 0.044677734375, + -0.049102783203125, + 0.0013017654418945312, + -0.0223388671875, + -0.02197265625, + -0.034912109375, + 0.043914794921875, + -0.045745849609375, + 0.01274871826171875, + -0.045745849609375, + 0.0222930908203125, + -0.036407470703125, + -0.002071380615234375, + -0.07769775390625, + 0.0443115234375, + -0.003589630126953125, + 0.01264190673828125, + 0.0303955078125, + 0.0118408203125, + 0.022613525390625, + -0.01384735107421875, + 0.01502227783203125, + -0.0093536376953125, + -0.0232696533203125, + -0.01473236083984375, + -0.032562255859375, + 0.023040771484375, + 0.00124359130859375, + 0.0028934478759765625, + 0.01067352294921875, + -0.0042266845703125, + 0.0174102783203125, + 0.0084075927734375, + -0.03997802734375, + 0.017822265625, + 0.008453369140625, + 0.006122589111328125, + -0.0063629150390625, + -0.0036945343017578125, + 0.046173095703125, + 0.0170440673828125, + 0.00037097930908203125, + -0.0087890625, + -0.09228515625, + -0.0248870849609375, + 0.007080078125, + -0.02056884765625, + 0.0204010009765625, + -0.01241302490234375, + -0.0367431640625, + -0.0105743408203125, + -0.0211029052734375, + 0.056304931640625, + -0.01611328125, + 0.039947509765625, + 0.003749847412109375, + -0.0038661956787109375, + -0.0028171539306640625, + 0.0064239501953125, + -0.022491455078125, + 0.01995849609375, + -0.0189361572265625, + 0.007476806640625, + 0.0094451904296875, + -0.03057861328125, + -0.0174560546875, + -0.007747650146484375, + -0.033477783203125, + 0.0037403106689453125, + 0.0262451171875, + 0.01873779296875, + 0.035430908203125, + 0.0010461807250976562, + 0.00032901763916015625, + 0.005706787109375, + -0.03656005859375, + -0.0156402587890625, + 0.031036376953125, + -0.012969970703125, + -0.0010976791381835938, + -0.025146484375, + 0.00826263427734375, + 0.01418304443359375, + -0.020233154296875, + -0.042816162109375, + -0.02569580078125, + -0.0291290283203125, + 0.009124755859375, + -0.02288818359375, + -0.058319091796875, + 0.061248779296875, + 0.0218963623046875, + -0.018280029296875, + -0.00753021240234375, + -0.0112457275390625, + -0.0260772705078125, + -0.0232086181640625, + 0.004604339599609375, + -0.044677734375, + -0.0714111328125, + 0.057403564453125, + -0.0220184326171875, + 0.0019502639770507812, + -0.00971221923828125, + -0.045196533203125, + 0.0262298583984375, + 0.0148773193359375, + -0.0235595703125, + -0.005390167236328125, + 0.0133819580078125, + -0.01861572265625, + -0.0182037353515625, + 0.03009033203125, + -0.01148223876953125, + -0.0323486328125, + -0.030242919921875, + 0.0229644775390625, + 0.036468505859375, + -0.03753662109375, + 0.01163482666015625, + 0.00550079345703125, + 0.015045166015625, + 0.007843017578125, + 0.053924560546875, + -0.023284912109375, + 0.027557373046875, + -0.0201873779296875, + 0.023101806640625, + -0.0133056640625, + 0.02691650390625, + -0.041046142578125, + -0.02435302734375, + 0.031341552734375, + -0.00949859619140625, + -0.0322265625, + -0.00046181678771972656, + -0.0309600830078125, + -0.021209716796875, + -0.0028934478759765625, + -0.0137176513671875, + 0.0074005126953125, + -0.0285186767578125, + 0.0111083984375, + 0.0035572052001953125, + -0.0289154052734375, + 0.0268096923828125, + -0.024139404296875, + 0.0164794921875, + -0.006256103515625, + -0.035888671875, + -0.00858306884765625, + -0.0399169921875, + 0.0171966552734375, + 0.037841796875, + 0.0002200603485107422, + -0.0198974609375, + -0.000904083251953125, + -0.0035572052001953125, + -0.0272216796875, + 0.039703369140625, + 0.033447265625, + -0.0008778572082519531, + 0.00324249267578125, + -0.006168365478515625, + -0.03216552734375, + -0.0218048095703125, + 0.0177154541015625, + -0.029449462890625, + 0.01788330078125, + 0.0252227783203125, + 0.018341064453125, + 0.0038166046142578125, + 0.07537841796875, + -0.005535125732421875, + 0.05389404296875, + 0.036529541015625, + 0.012054443359375, + 0.027923583984375, + 0.00919342041015625, + 0.00014913082122802734, + -0.0212860107421875, + 0.01042938232421875, + -0.0162506103515625, + -0.01451873779296875, + -0.023345947265625, + -0.0032711029052734375, + -0.0150604248046875, + -0.042724609375, + 0.0108642578125, + 0.0079345703125, + 0.0010433197021484375, + 0.01885986328125, + -0.0010700225830078125, + -0.005008697509765625, + 0.016510009765625, + -0.00818634033203125, + -0.00411224365234375, + -0.0184783935546875, + 0.0516357421875, + 0.0028095245361328125, + -0.006694793701171875, + 0.0202178955078125, + 0.025482177734375, + -0.057525634765625, + 0.0252532958984375, + -0.054779052734375, + 0.0018863677978515625, + -0.032073974609375, + 0.040435791015625, + 0.0203399658203125, + 0.025634765625, + 0.01605224609375, + -0.036651611328125, + 0.057403564453125, + 0.05047607421875, + 0.016143798828125, + 0.038970947265625, + -0.0309600830078125, + -0.0157623291015625, + 0.0026874542236328125, + 0.045867919921875, + 0.00769805908203125, + 5.9723854064941406e-05, + -0.03216552734375, + 0.057586669921875, + -0.0083770751953125, + 0.02178955078125, + 0.0033550262451171875, + 0.0667724609375, + -0.03656005859375, + -0.045989990234375, + 0.0022640228271484375, + 0.013885498046875, + 0.0134429931640625, + -0.0305938720703125, + 0.06573486328125, + 0.01422882080078125, + -0.0279083251953125, + -0.05084228515625 + ], + [ + 0.0276336669921875, + 0.053436279296875, + -0.0113372802734375, + 0.015899658203125, + 0.00667572021484375, + -0.0406494140625, + -0.01163482666015625, + 0.0177459716796875, + 0.0170440673828125, + -0.00466156005859375, + 0.043548583984375, + 0.00870513916015625, + -0.01030731201171875, + -0.00624847412109375, + -0.00807952880859375, + -0.007549285888671875, + 0.034393310546875, + 0.0181121826171875, + 0.00994873046875, + -0.0347900390625, + -0.008056640625, + 0.00478363037109375, + -0.00524139404296875, + -0.061981201171875, + -0.04046630859375, + 0.0268402099609375, + -0.00447845458984375, + 0.019195556640625, + -0.030242919921875, + -0.024261474609375, + 0.006381988525390625, + -0.023284912109375, + 0.035369873046875, + 0.0440673828125, + -0.00356292724609375, + -0.0182037353515625, + -0.0030803680419921875, + -0.0014400482177734375, + -0.0494384765625, + 0.00832366943359375, + -0.012786865234375, + 0.041717529296875, + 0.031097412109375, + 0.01519012451171875, + 0.048675537109375, + -0.053070068359375, + -0.056365966796875, + 0.01277923583984375, + -0.006336212158203125, + -0.03765869140625, + 0.0015897750854492188, + 0.00567626953125, + 0.009521484375, + -0.0229644775390625, + -0.0101776123046875, + 0.00777435302734375, + -0.024078369140625, + -0.0462646484375, + -0.055084228515625, + -0.0209503173828125, + -0.00521087646484375, + 0.0245208740234375, + -0.050140380859375, + -0.0174407958984375, + -0.01393890380859375, + 0.04205322265625, + 0.018646240234375, + 0.024078369140625, + -0.03668212890625, + -0.04840087890625, + -0.006938934326171875, + -0.0212554931640625, + -0.0193328857421875, + -0.035186767578125, + -0.0465087890625, + 0.0295257568359375, + -0.054412841796875, + 0.01470184326171875, + -0.017364501953125, + 0.00646209716796875, + 0.00811004638671875, + -0.0019483566284179688, + 0.0168914794921875, + 0.03668212890625, + -0.042083740234375, + 0.0234375, + -0.028533935546875, + 0.0491943359375, + -0.0164337158203125, + -0.002269744873046875, + -0.0117034912109375, + -0.0308990478515625, + 0.023834228515625, + -0.0404052734375, + -0.0272216796875, + -0.00830841064453125, + -0.030548095703125, + -0.0178985595703125, + 0.038818359375, + -0.01425933837890625, + -0.01392364501953125, + -0.01800537109375, + -0.0243072509765625, + 0.001613616943359375, + -0.0160369873046875, + -0.02349853515625, + 0.036163330078125, + -0.0360107421875, + 0.0167999267578125, + 0.01105499267578125, + 0.04962158203125, + 0.01117706298828125, + -0.001312255859375, + 0.057464599609375, + 0.0026912689208984375, + -0.055328369140625, + -0.027496337890625, + -0.020233154296875, + -0.021392822265625, + -0.01078033447265625, + -0.005588531494140625, + 0.0147705078125, + 0.069580078125, + -0.006103515625, + -0.019195556640625, + -0.030303955078125, + -0.00817108154296875, + 0.02838134765625, + -0.03350830078125, + -0.0016803741455078125, + 0.012847900390625, + 0.02545166015625, + -0.0360107421875, + 0.01448822021484375, + -0.023223876953125, + -0.01357269287109375, + 0.038238525390625, + 0.0155181884765625, + -0.06414794921875, + -0.00272369384765625, + 0.005706787109375, + -0.027130126953125, + -0.03717041015625, + -0.01454925537109375, + 0.0262298583984375, + 0.01031494140625, + -0.01224517822265625, + 0.045745849609375, + 0.01213836669921875, + -0.035858154296875, + 0.031951904296875, + 0.0259552001953125, + 0.0033702850341796875, + 0.0205230712890625, + 0.050384521484375, + -0.018096923828125, + 0.0041046142578125, + 0.0174560546875, + 0.0203857421875, + -0.039947509765625, + -0.0301055908203125, + -0.0093841552734375, + -0.07568359375, + -0.0158843994140625, + 0.0185546875, + 0.0024280548095703125, + 0.01145172119140625, + 0.034576416015625, + -0.0181121826171875, + -0.023651123046875, + -0.0367431640625, + -0.0650634765625, + -0.02789306640625, + -0.0149078369140625, + 0.005275726318359375, + 0.0227813720703125, + 0.037322998046875, + 0.015411376953125, + 0.00801849365234375, + -0.04071044921875, + -0.034271240234375, + 0.042083740234375, + -0.0011310577392578125, + -0.0009098052978515625, + -0.0160675048828125, + 0.0086822509765625, + -0.0291900634765625, + 0.016082763671875, + -0.00843048095703125, + -0.0021114349365234375, + -0.022003173828125, + -0.043975830078125, + 0.05853271484375, + -0.0026493072509765625, + 0.0504150390625, + 0.01065826416015625, + -0.0195465087890625, + -0.016571044921875, + -0.0157470703125, + -0.006504058837890625, + 0.00737762451171875, + -0.000667572021484375, + 0.021331787109375, + -0.03179931640625, + -0.0168609619140625, + 0.0162506103515625, + -0.01470184326171875, + -0.00733184814453125, + 0.0227813720703125, + -0.00789642333984375, + -0.0106201171875, + 0.004482269287109375, + -0.0080718994140625, + -0.0292205810546875, + -0.07659912109375, + 0.0213470458984375, + 0.005168914794921875, + -0.00739288330078125, + 0.0030803680419921875, + 0.008453369140625, + 0.0019407272338867188, + 0.0266265869140625, + 0.01190185546875, + 0.01934814453125, + 0.039276123046875, + -0.03143310546875, + 0.001953125, + -0.0021877288818359375, + 0.00555419921875, + -0.07763671875, + 0.004730224609375, + -0.020233154296875, + -0.01690673828125, + -0.0008096694946289062, + -0.0255279541015625, + 0.011322021484375, + -0.0181427001953125, + 0.041900634765625, + -0.0290985107421875, + 0.0153350830078125, + 0.02099609375, + 0.01727294921875, + -0.0099029541015625, + -0.002593994140625, + -0.042205810546875, + 0.038787841796875, + 0.01953125, + -0.04034423828125, + -0.00914764404296875, + 0.01068115234375, + 0.03350830078125, + 0.005443572998046875, + -0.01158905029296875, + 0.0311737060546875, + 0.033294677734375, + -0.00583648681640625, + 0.0032176971435546875, + -0.01175689697265625, + -0.0007123947143554688, + -0.033172607421875, + -0.0185546875, + -0.007747650146484375, + 0.0244903564453125, + 0.0318603515625, + 0.021636962890625, + -0.00635528564453125, + -0.02606201171875, + -0.0028839111328125, + 0.041656494140625, + 0.0243377685546875, + 0.0218963623046875, + -0.0017538070678710938, + 0.005947113037109375, + -0.0299530029296875, + -0.0015316009521484375, + 0.01508331298828125, + -0.0129241943359375, + 0.0002582073211669922, + -0.02325439453125, + -0.003936767578125, + 0.0207061767578125, + -0.01226043701171875, + 0.028289794921875, + 0.031829833984375, + -0.020599365234375, + -0.06634521484375, + 0.029296875, + -0.0012149810791015625, + -0.044342041015625, + -0.00394439697265625, + 0.015167236328125, + -0.037322998046875, + 0.0408935546875, + 0.0198211669921875, + 0.0263671875, + 0.0151214599609375, + 0.0167694091796875, + -0.1800537109375, + -0.006500244140625, + -0.005435943603515625, + 0.040802001953125, + -0.0055694580078125, + 0.0180816650390625, + -0.00113677978515625, + -0.08221435546875, + -0.0268707275390625, + -0.015289306640625, + -0.0034313201904296875, + -0.041473388671875, + -0.036285400390625, + -0.0133514404296875, + 0.052276611328125, + -0.043731689453125, + 0.004985809326171875, + 0.01154327392578125, + -0.0081787109375, + -0.0215301513671875, + -0.0345458984375, + -0.017486572265625, + 0.05548095703125, + 0.04095458984375, + 0.0013036727905273438, + 0.0308990478515625, + -0.003185272216796875, + -0.0296478271484375, + -0.0004429817199707031, + -0.05072021484375, + 0.058746337890625, + 0.05670166015625, + 0.00531005859375, + -0.0213623046875, + 0.052398681640625, + 0.04510498046875, + 0.00977325439453125, + 0.04754638671875, + -0.0056915283203125, + -0.01531219482421875, + 0.024139404296875, + 0.0235137939453125, + -0.014984130859375, + 0.0257415771484375, + -0.0177154541015625, + -0.048370361328125, + -0.03143310546875, + 0.05145263671875, + 0.0090179443359375, + -0.06781005859375, + 0.022430419921875, + -0.039459228515625, + -0.01641845703125, + -0.06878662109375, + -0.052337646484375, + -0.02435302734375, + 0.0550537109375, + 0.0660400390625, + 0.036895751953125, + -0.0032596588134765625, + -0.0167388916015625, + -0.055328369140625, + 0.0099029541015625, + -0.01491546630859375, + -0.001132965087890625, + 0.041229248046875, + 0.0185546875, + 0.04425048828125, + 0.006343841552734375, + 0.0021495819091796875, + 0.0143585205078125, + 0.035797119140625, + -0.0533447265625, + 0.031646728515625, + 0.037017822265625, + -0.02117919921875, + -0.02874755859375, + -0.032196044921875, + -0.0142974853515625, + -0.042938232421875, + 0.02142333984375, + -0.006351470947265625, + 0.00940704345703125, + 0.01016998291015625, + -0.024688720703125, + -0.0107879638671875, + 0.039947509765625, + 0.01052093505859375, + 0.033782958984375, + 0.2177734375, + 0.0100250244140625, + 0.045562744140625, + 0.00902557373046875, + 0.0316162109375, + -0.05462646484375, + -0.037139892578125, + -0.0294342041015625, + 0.0105743408203125, + -0.02789306640625, + -0.021484375, + 0.032257080078125, + -0.0228729248046875, + 0.0191802978515625, + -0.0447998046875, + -0.0021228790283203125, + -0.07989501953125, + -0.0105743408203125, + 0.0576171875, + 0.01171875, + 0.017303466796875, + -0.06414794921875, + 0.041656494140625, + -0.01221466064453125, + 0.0174102783203125, + 0.02801513671875, + -0.031829833984375, + -0.031768798828125, + -0.0399169921875, + 0.034759521484375, + -0.044219970703125, + -0.04095458984375, + 0.01274871826171875, + 0.00775909423828125, + -0.048828125, + -0.0228729248046875, + -0.0114593505859375, + -0.01203155517578125, + -0.0166168212890625, + 0.04595947265625, + 0.013397216796875, + -0.0174713134765625, + -0.032684326171875, + -0.026153564453125, + 0.007080078125, + -0.015350341796875, + 0.00852203369140625, + 0.06915283203125, + 0.01708984375, + -0.01226043701171875, + -0.0022602081298828125, + -0.0144500732421875, + -0.034149169921875, + 0.035736083984375, + -0.04412841796875, + 0.03485107421875, + 0.01052093505859375, + -0.030242919921875, + -0.017242431640625, + 0.04083251953125, + -0.0077972412109375, + 0.006443023681640625, + -0.0167999267578125, + -0.021759033203125, + 0.0029811859130859375, + -0.034515380859375, + 0.011016845703125, + 0.00814056396484375, + -0.0232696533203125, + 0.0228424072265625, + 0.056121826171875, + -0.0662841796875, + 0.017181396484375, + -0.0182952880859375, + 0.034149169921875, + 0.03814697265625, + 0.04901123046875, + 0.063720703125, + 0.03460693359375, + -0.0196990966796875, + 0.01383209228515625, + -0.045074462890625, + 0.0073699951171875, + 0.016876220703125, + 0.02325439453125, + -0.03875732421875, + -0.004253387451171875, + 0.09356689453125, + -0.0011119842529296875, + 0.0129547119140625, + 0.0207672119140625, + 0.004436492919921875, + -0.0267791748046875, + 0.032745361328125, + -0.0229644775390625, + -0.0416259765625, + 0.0295867919921875, + -0.035247802734375, + 0.0133209228515625, + 0.012847900390625, + 0.01328277587890625, + 0.0111083984375, + -0.05712890625, + -0.045166015625, + 0.050567626953125, + -0.0247650146484375, + -0.0313720703125, + 0.0021915435791015625, + 0.01458740234375, + -0.0003437995910644531, + 0.0289306640625, + 0.043975830078125, + -0.016937255859375, + -0.0104522705078125, + 0.0018100738525390625, + 0.01220703125, + 0.027099609375, + 0.0027179718017578125, + 0.0092926025390625, + 0.06396484375, + -0.0118255615234375, + -0.01279449462890625, + -0.0059661865234375, + -0.038482666015625, + -0.05621337890625, + 0.009185791015625, + -0.05517578125, + 0.05633544921875, + -0.014556884765625, + 0.01898193359375, + 0.01314544677734375, + -0.024139404296875, + -0.033355712890625, + -0.014892578125, + 0.07830810546875, + -0.002399444580078125, + -0.0009870529174804688, + 0.007472991943359375, + -0.009613037109375, + -0.004619598388671875, + -0.04107666015625, + 0.02264404296875, + -0.00797271728515625, + 6.16312026977539e-05, + -0.0214996337890625, + 0.01548004150390625, + -0.05224609375, + -0.0176544189453125, + -0.0302886962890625, + -0.03009033203125, + 0.0297393798828125, + 0.0029163360595703125, + -0.04815673828125, + -0.0275421142578125, + -0.006534576416015625, + -0.01326751708984375, + -0.02349853515625, + 0.006305694580078125, + 0.01873779296875, + 0.004974365234375, + 0.04412841796875, + 0.0390625, + 0.0238494873046875, + 0.1353759765625, + -0.00911712646484375, + -0.00325775146484375, + -0.025146484375, + 0.046844482421875, + 0.040924072265625, + 0.0263671875, + 0.0028438568115234375, + 0.016204833984375, + -0.025054931640625, + 0.01486968994140625, + 0.01971435546875, + -0.004791259765625, + -0.041900634765625, + -0.0347900390625, + 0.005550384521484375, + 0.045440673828125, + -0.0153656005859375, + 0.0090179443359375, + -0.040283203125, + -0.00739288330078125, + -0.004058837890625, + 0.032562255859375, + 0.023773193359375, + -0.016357421875, + -0.03924560546875, + -0.0290374755859375, + -0.052581787109375, + 0.08331298828125, + -0.0184478759765625, + -0.040924072265625, + 0.0264892578125, + 0.0076141357421875, + 0.029937744140625, + 0.015411376953125, + 0.042144775390625, + -0.0014095306396484375, + -0.0279693603515625, + -0.024810791015625, + 0.01174163818359375, + -0.005283355712890625, + -0.047454833984375, + -0.0108184814453125, + -0.04571533203125, + 0.042510986328125, + -0.026031494140625, + -0.021484375, + 0.030914306640625, + 0.004543304443359375, + 0.01318359375, + -0.0088043212890625, + 0.001132965087890625, + 0.00792694091796875, + 0.007221221923828125, + 0.0180816650390625, + 0.02667236328125, + -0.059600830078125, + 0.04119873046875, + 0.014801025390625, + 0.031768798828125, + -0.0171661376953125, + 0.030029296875, + 0.02239990234375, + 0.052703857421875, + -0.01020050048828125, + 0.0191192626953125, + -0.044586181640625, + -0.01192474365234375, + -0.00389862060546875, + 0.0149078369140625, + -0.005313873291015625, + -0.04290771484375, + 0.0030803680419921875, + -0.00733184814453125, + 0.0206298828125, + 0.0133209228515625, + 0.033233642578125, + 0.035400390625, + 0.069580078125, + 0.05029296875, + 0.01168060302734375, + 0.01209259033203125, + -0.007724761962890625, + -0.01422882080078125, + -0.04656982421875, + 0.01325225830078125, + -0.005825042724609375, + -0.017974853515625, + -0.03436279296875, + -0.035186767578125, + -0.02911376953125, + 0.0257415771484375, + -0.044921875, + -0.0338134765625, + -0.0168304443359375, + -0.032867431640625, + -0.016998291015625, + 0.0100250244140625, + 0.022705078125, + -0.0199737548828125, + -0.05914306640625, + 0.0848388671875, + -0.01125335693359375, + 0.0279388427734375, + 0.0253753662109375, + -0.010955810546875, + -0.0192718505859375, + -0.0191650390625, + 0.00675201416015625, + -0.044952392578125, + -0.034576416015625, + 0.027740478515625, + -0.012237548828125, + 0.021209716796875, + 0.041107177734375, + -0.0330810546875, + 0.01214599609375, + -0.03704833984375, + -0.005950927734375, + 0.045013427734375, + 0.039825439453125, + -0.031829833984375, + -0.033172607421875, + 0.02178955078125, + 0.00891876220703125, + 0.00836181640625, + 0.005115509033203125, + 0.041412353515625, + -0.00611114501953125, + -0.044097900390625, + -0.04608154296875, + -0.0008988380432128906, + 0.034149169921875, + 0.00981903076171875, + 0.033355712890625, + -0.0198822021484375, + -0.01398468017578125, + -0.0146942138671875, + -0.0284423828125, + -0.01335906982421875, + -0.009063720703125, + 0.0228424072265625, + -0.01280975341796875, + 0.03094482421875, + -0.02081298828125, + 0.0006966590881347656, + -0.0253143310546875, + 0.026641845703125, + 0.002643585205078125, + -0.0012922286987304688, + 0.0711669921875, + -0.02044677734375, + -0.050018310546875, + 0.0010633468627929688, + 0.0438232421875, + -0.0008068084716796875, + 0.005687713623046875, + 0.0012311935424804688, + 0.0015192031860351562, + -0.01087188720703125, + 0.00315093994140625, + 0.0201416015625, + 0.03680419921875, + -0.0136260986328125, + 0.008697509765625, + -0.0791015625, + -0.00870513916015625, + -0.0260162353515625, + 0.0006937980651855469, + -0.017364501953125, + 0.0106353759765625, + 0.003139495849609375, + 0.0238494873046875, + -0.01397705078125, + -0.04180908203125, + 0.00691986083984375, + -0.00018918514251708984, + -0.0174713134765625, + 0.037567138671875, + 0.01708984375, + -0.01497650146484375, + 0.049957275390625, + -0.046600341796875, + -0.01497650146484375, + -0.0170135498046875, + 0.0181884765625, + 0.008056640625, + 0.010345458984375, + 0.060638427734375, + 0.0141754150390625, + -0.0199432373046875, + -0.005313873291015625, + -0.01690673828125, + -0.0535888671875, + -0.0277557373046875, + -0.01137542724609375, + -0.0030956268310546875, + -0.03558349609375, + -0.0312042236328125, + -0.01148223876953125, + -0.0219879150390625, + -0.0037174224853515625, + 0.0196990966796875, + -0.0416259765625, + -0.0024738311767578125, + -0.0005593299865722656, + -0.0261993408203125, + 0.052886962890625, + 0.0171661376953125, + 0.043975830078125, + 0.02581787109375, + -0.0078887939453125, + 0.0701904296875, + -0.017364501953125, + 0.0086822509765625, + 0.005340576171875, + 0.0440673828125, + 0.00830841064453125, + -0.0012483596801757812, + 0.01003265380859375, + -0.0157928466796875, + -0.03277587890625, + -0.02886962890625, + 0.0028972625732421875, + -0.00672149658203125, + -0.0239105224609375, + 0.02020263671875, + -0.0012063980102539062, + 0.003559112548828125, + -0.0220794677734375, + -0.0028476715087890625, + -0.115478515625, + 0.005207061767578125, + -0.01219940185546875, + 0.054046630859375, + -0.07940673828125, + -0.0235137939453125, + -0.044830322265625, + -0.0259246826171875, + -0.049835205078125, + -0.03753662109375, + -0.0218505859375, + 0.063232421875, + 0.06121826171875, + -0.0024623870849609375, + -0.035980224609375, + 0.012786865234375, + -0.0594482421875, + 5.3942203521728516e-05, + -0.0176544189453125, + 0.041473388671875, + -0.01293182373046875, + -0.027496337890625, + 0.019744873046875, + 0.0228424072265625, + -2.5391578674316406e-05, + -0.03460693359375, + -0.021148681640625, + -0.00853729248046875, + -0.0194549560546875, + -0.031097412109375, + 0.0180206298828125, + -0.03076171875, + 0.0164337158203125, + -0.029022216796875, + -0.0027370452880859375, + 0.03875732421875, + -0.004901885986328125, + -0.0134735107421875, + -0.03399658203125, + -0.0016031265258789062, + -0.059783935546875, + 0.0081787109375, + -0.0836181640625, + 0.01995849609375, + 0.0079803466796875, + 0.0204010009765625, + 0.031280517578125, + -0.0249481201171875, + -0.009185791015625, + 0.0038547515869140625, + -0.0021533966064453125, + 0.03900146484375, + 0.041351318359375, + -0.0203857421875, + -0.004673004150390625, + 0.015289306640625, + 0.00988006591796875, + 0.0277557373046875, + 0.08819580078125, + 0.034942626953125, + -0.002704620361328125, + -0.01020050048828125, + -0.00787353515625, + 0.007183074951171875, + -0.041412353515625, + -0.01247406005859375, + 0.013427734375, + 0.004451751708984375, + 0.0251922607421875, + -0.048858642578125, + -0.0188446044921875, + 0.020416259765625, + -0.002620697021484375, + 0.00913238525390625, + 0.022003173828125, + 0.037261962890625, + 0.0003426074981689453, + 0.0191192626953125, + -0.00733184814453125, + 0.0221710205078125, + -0.036041259765625, + 0.0016584396362304688, + 0.046722412109375, + 0.01123809814453125, + -0.0007505416870117188, + 0.02685546875, + 0.018585205078125, + 0.0059814453125, + -0.05694580078125, + -0.0304718017578125, + -0.055572509765625, + -0.043914794921875, + 0.0167236328125, + 0.00666046142578125, + -0.05206298828125, + 0.04730224609375, + -0.050445556640625, + -0.070556640625, + -0.0122222900390625, + -0.023406982421875, + -0.0148468017578125, + 0.015869140625, + -0.034027099609375, + -0.01483917236328125, + -0.01177978515625, + -0.0029468536376953125, + 3.5822391510009766e-05, + 0.037841796875, + 0.0164031982421875, + -0.0225372314453125, + -0.0618896484375, + 0.00432586669921875, + 0.00333404541015625, + 0.021575927734375, + 0.01285552978515625, + 0.0229644775390625, + -0.038604736328125, + 0.00875091552734375, + 0.0308685302734375, + -0.004032135009765625, + 0.00763702392578125, + 0.0560302734375, + -0.008392333984375, + -0.006969451904296875, + -0.0265045166015625, + 0.01177215576171875, + 0.00646209716796875, + -0.0081939697265625, + 0.032928466796875, + -0.017181396484375, + 0.018646240234375, + 0.004718780517578125, + 0.0006575584411621094, + 0.0277099609375, + 0.0174407958984375, + -0.0008058547973632812, + -0.051727294921875, + 0.0304718017578125, + 0.026641845703125, + -0.06536865234375, + 0.00853729248046875, + -0.00545501708984375, + -0.0012903213500976562, + -0.01003265380859375, + 0.00919342041015625, + 0.0430908203125, + -0.0164642333984375, + 0.022857666015625, + 0.038787841796875, + 0.03399658203125, + 0.0222015380859375, + 0.0355224609375, + -0.0216064453125, + 0.097412109375, + 0.031585693359375, + -0.00682830810546875, + 0.0168304443359375, + -0.0194549560546875, + 0.0306243896484375, + -0.0005030632019042969, + -0.0019121170043945312, + -0.0134429931640625, + -0.006793975830078125, + -0.04071044921875, + 0.0347900390625, + 0.0171051025390625, + -0.0141143798828125, + 0.042572021484375, + 0.0290374755859375, + 0.00630950927734375, + -0.006702423095703125, + -0.0158843994140625, + -0.0188751220703125, + -0.018096923828125, + 0.005535125732421875, + 0.01004791259765625, + 0.01690673828125, + 0.067626953125, + -0.004302978515625, + 0.00850677490234375, + 0.043365478515625, + 0.0394287109375, + 0.064453125, + 0.0016241073608398438, + -0.03680419921875, + -0.00384521484375, + 0.003437042236328125, + 0.01105499267578125, + 0.0240936279296875, + 0.05389404296875, + -0.0176544189453125, + 0.02471923828125, + -0.036590576171875, + -0.038421630859375, + 0.0245513916015625, + 0.0286407470703125, + 0.0237884521484375, + 0.06756591796875, + -0.00394439697265625, + 0.01202392578125, + -0.028350830078125, + -0.0038547515869140625, + 0.006908416748046875, + 0.0009093284606933594, + -0.01189422607421875, + 0.01206207275390625, + 0.0330810546875, + -0.035919189453125, + -0.01505279541015625, + 0.0091705322265625, + 0.002758026123046875, + 0.0205535888671875, + -0.016021728515625, + 0.01300811767578125, + -0.003032684326171875, + -0.01399993896484375, + 0.0125274658203125, + -0.0341796875, + 0.06658935546875, + 0.034423828125, + 0.0019435882568359375, + 0.047882080078125, + -0.047088623046875, + -0.005062103271484375, + 0.0221099853515625, + -0.00514984130859375, + -0.041229248046875, + 0.0012426376342773438, + -0.049102783203125, + -0.0174102783203125, + -0.00540924072265625, + -0.0061492919921875, + -0.0021762847900390625, + 0.053741455078125, + -0.0196685791015625, + -0.0330810546875, + -0.0819091796875, + 0.01580810546875, + 0.0182952880859375, + -0.03631591796875, + 0.026519775390625, + 0.0030345916748046875, + 0.01641845703125, + -0.015228271484375 + ], + [ + -0.01342010498046875, + 0.0266571044921875, + -0.02850341796875, + 0.037384033203125, + -0.01183319091796875, + 0.01415252685546875, + -0.0653076171875, + -0.022705078125, + 0.0284881591796875, + -0.035919189453125, + 0.00638580322265625, + 0.01348114013671875, + 0.0142974853515625, + 0.01983642578125, + -0.025299072265625, + 0.035430908203125, + -0.0038394927978515625, + 0.0017223358154296875, + -0.02862548828125, + -0.047637939453125, + -0.0026950836181640625, + -0.023773193359375, + -0.019561767578125, + -0.06451416015625, + -0.0272369384765625, + 0.0013332366943359375, + 0.0156707763671875, + -0.0119781494140625, + -0.037353515625, + -0.0176849365234375, + -0.056915283203125, + 0.0021343231201171875, + 0.03155517578125, + 0.013214111328125, + -0.0036411285400390625, + -0.040252685546875, + 0.00739288330078125, + 0.0007200241088867188, + -0.03057861328125, + -0.01442718505859375, + 0.00782012939453125, + 0.046966552734375, + 0.01412200927734375, + 0.0244293212890625, + 0.0295562744140625, + -0.0499267578125, + -0.0322265625, + -0.006855010986328125, + -0.07275390625, + -0.041595458984375, + -0.03204345703125, + 0.0013227462768554688, + 0.03179931640625, + -0.020538330078125, + -0.019866943359375, + 0.038238525390625, + -0.05120849609375, + -0.0263519287109375, + -0.0225372314453125, + -0.058380126953125, + -0.0012979507446289062, + 0.035888671875, + -0.024200439453125, + -0.01348114013671875, + 0.03924560546875, + 0.047149658203125, + -0.0298309326171875, + 0.029296875, + -0.0290985107421875, + -0.0266876220703125, + -0.01091766357421875, + 0.00269317626953125, + -0.032867431640625, + -0.0176849365234375, + -0.038787841796875, + -0.01351165771484375, + -0.04217529296875, + 0.05670166015625, + -0.060760498046875, + 0.01132965087890625, + 0.01528167724609375, + 0.00994873046875, + 0.0101318359375, + 0.00592803955078125, + -0.032501220703125, + 0.047943115234375, + 0.006072998046875, + 0.028839111328125, + 0.0129852294921875, + 0.00803375244140625, + -0.00879669189453125, + -0.042816162109375, + 0.007709503173828125, + -0.023223876953125, + -0.034912109375, + 0.0184783935546875, + -0.048858642578125, + -0.005550384521484375, + 0.06219482421875, + -0.01030731201171875, + 0.00669097900390625, + 0.021697998046875, + 0.01374053955078125, + -0.003849029541015625, + -0.0013885498046875, + 0.018707275390625, + -0.00499725341796875, + 0.043914794921875, + -0.038482666015625, + -0.0057220458984375, + 0.030426025390625, + -0.00196075439453125, + 0.01404571533203125, + 0.027679443359375, + -0.0029888153076171875, + -0.04400634765625, + -0.003284454345703125, + -0.0290374755859375, + 0.00751495361328125, + -0.0292510986328125, + 0.033782958984375, + 0.02349853515625, + 0.0300445556640625, + -0.022674560546875, + 0.02178955078125, + -0.0123443603515625, + 0.0150604248046875, + 0.04779052734375, + -0.01183319091796875, + 0.0267791748046875, + 0.034759521484375, + 0.035003662109375, + -0.060455322265625, + 0.017120361328125, + -0.006473541259765625, + -0.033050537109375, + 0.02960205078125, + 0.0447998046875, + -0.0204315185546875, + 0.0029621124267578125, + 0.0159912109375, + -0.030181884765625, + -0.0079803466796875, + -0.054107666015625, + 0.004016876220703125, + -0.0118408203125, + 0.0166168212890625, + 0.0069427490234375, + 0.007442474365234375, + -0.052703857421875, + -0.014801025390625, + 0.053314208984375, + 0.052215576171875, + -0.021697998046875, + 0.0109710693359375, + -0.00586700439453125, + -0.044464111328125, + 0.00482177734375, + -0.0657958984375, + 0.0391845703125, + -0.0162811279296875, + -0.03936767578125, + -0.031890869140625, + 0.05126953125, + 0.023101806640625, + -0.0021724700927734375, + -0.010833740234375, + 0.04656982421875, + -0.0017595291137695312, + -0.038848876953125, + 0.004550933837890625, + -0.043792724609375, + 0.02960205078125, + 0.0029354095458984375, + -0.02227783203125, + 0.034759521484375, + 0.057098388671875, + 0.01325225830078125, + -0.00403594970703125, + -0.0295867919921875, + -0.029022216796875, + 0.0246124267578125, + 0.0184478759765625, + 0.00798797607421875, + 0.0249176025390625, + 0.02166748046875, + -0.0140228271484375, + -0.0345458984375, + -0.01291656494140625, + -0.01074981689453125, + 0.0026950836181640625, + -0.0287628173828125, + 0.0080108642578125, + -0.037017822265625, + 0.0333251953125, + -0.026947021484375, + -0.0183258056640625, + 0.01611328125, + -0.0192108154296875, + -0.04296875, + -0.055938720703125, + -0.006893157958984375, + -0.0162811279296875, + 0.0161590576171875, + -0.0081024169921875, + 0.01934814453125, + -0.00736236572265625, + -0.01163482666015625, + 0.053680419921875, + -0.0513916015625, + 0.010345458984375, + -0.0085296630859375, + 0.01499176025390625, + -0.0173187255859375, + -0.034576416015625, + 0.0291595458984375, + 0.0204925537109375, + 0.01861572265625, + 0.049530029296875, + -0.0038204193115234375, + 0.03271484375, + 0.043853759765625, + 0.06890869140625, + 0.01174163818359375, + 0.036102294921875, + -0.0291595458984375, + 0.001445770263671875, + 0.030517578125, + 0.01013946533203125, + -0.033966064453125, + 0.00714874267578125, + 0.00867462158203125, + -0.0138397216796875, + 0.01387786865234375, + -0.025177001953125, + -0.05755615234375, + -0.0173797607421875, + 0.0246429443359375, + 0.01305389404296875, + 0.01132965087890625, + 0.01055145263671875, + 0.018341064453125, + 0.024688720703125, + 0.00988006591796875, + -0.002590179443359375, + 0.036468505859375, + 0.0260162353515625, + -0.00481414794921875, + -0.013916015625, + -0.01496124267578125, + -0.00579071044921875, + -0.0116729736328125, + 0.035491943359375, + 0.02935791015625, + 0.009490966796875, + -0.0201568603515625, + 0.01062774658203125, + -0.048431396484375, + -0.0012788772583007812, + -0.017913818359375, + -0.00457763671875, + -0.01459503173828125, + -0.006107330322265625, + 0.03851318359375, + -0.0017986297607421875, + -0.0172576904296875, + -0.01605224609375, + 0.0284576416015625, + 0.0360107421875, + -0.00618743896484375, + 0.017822265625, + 0.011688232421875, + -0.01207733154296875, + -0.004863739013671875, + 0.019683837890625, + -0.016204833984375, + -0.06134033203125, + -0.023284912109375, + 0.039703369140625, + 0.0003104209899902344, + 0.0009031295776367188, + -0.040771484375, + 0.061798095703125, + -0.0020599365234375, + -0.00801849365234375, + 0.004405975341796875, + -0.01457977294921875, + 0.03125, + -0.015869140625, + -0.0207366943359375, + -0.042999267578125, + -0.04119873046875, + 0.06353759765625, + 0.033477783203125, + 0.0079803466796875, + -0.03643798828125, + -0.0153656005859375, + -0.1944580078125, + -0.0258941650390625, + -0.034088134765625, + -0.0093231201171875, + -0.0186920166015625, + -0.0004153251647949219, + -0.0145416259765625, + -0.0726318359375, + -0.021759033203125, + -0.0194854736328125, + -0.049407958984375, + -0.041656494140625, + -0.003353118896484375, + 0.00933837890625, + 0.03033447265625, + 0.029632568359375, + 0.0101318359375, + -0.0007929801940917969, + -0.0218963623046875, + -0.029388427734375, + -0.0287322998046875, + -0.0631103515625, + 0.01438140869140625, + 0.021087646484375, + 0.06549072265625, + 0.026702880859375, + -0.004444122314453125, + -0.01146697998046875, + -0.0203857421875, + 0.007472991943359375, + 0.0236663818359375, + 0.0128021240234375, + 0.009979248046875, + 0.002964019775390625, + 0.0341796875, + 0.017974853515625, + 0.02587890625, + 0.00885009765625, + 0.004940032958984375, + 0.056915283203125, + -0.026275634765625, + 0.059539794921875, + -0.02825927734375, + 0.0252532958984375, + -0.0428466796875, + -0.00323486328125, + -0.047882080078125, + -0.0079193115234375, + 0.01348876953125, + -0.04052734375, + 0.008209228515625, + -0.04052734375, + 0.00228118896484375, + 0.00995635986328125, + -0.02935791015625, + 0.004367828369140625, + 0.022705078125, + -0.021392822265625, + 0.05377197265625, + -0.0428466796875, + 0.055572509765625, + -0.039215087890625, + -0.0006842613220214844, + -0.022796630859375, + 0.0020599365234375, + -0.0130462646484375, + 0.02685546875, + 0.01702880859375, + 0.0203857421875, + 0.016815185546875, + 0.046478271484375, + 0.0244140625, + -0.0009431838989257812, + 0.013092041015625, + -0.0042572021484375, + 0.0440673828125, + -0.002902984619140625, + 0.0109710693359375, + -0.025909423828125, + -0.033477783203125, + -0.03302001953125, + -0.0003008842468261719, + -0.0006117820739746094, + -0.007259368896484375, + -0.02630615234375, + 0.0084381103515625, + -0.029052734375, + -0.0073089599609375, + 0.056304931640625, + 0.2431640625, + -0.016815185546875, + 0.049285888671875, + -0.0090484619140625, + -0.01056671142578125, + 0.0012826919555664062, + 0.0185089111328125, + -0.021026611328125, + 0.011199951171875, + 0.01499176025390625, + 0.0211334228515625, + 0.0413818359375, + -0.00998687744140625, + -0.00860595703125, + -0.00820159912109375, + 0.08648681640625, + -0.0361328125, + 0.049072265625, + 0.0498046875, + -0.01476287841796875, + -0.035980224609375, + -0.0146484375, + 0.00909423828125, + 0.028778076171875, + -0.01026153564453125, + -0.00412750244140625, + 0.00021088123321533203, + -0.029571533203125, + -0.01200103759765625, + 0.052734375, + -0.04693603515625, + -0.01605224609375, + -0.00112152099609375, + 0.055389404296875, + -0.01076507568359375, + -0.037811279296875, + 0.0298309326171875, + -0.00775146484375, + 0.0014600753784179688, + 0.04498291015625, + -0.034088134765625, + -0.03619384765625, + -0.0013332366943359375, + -0.0166473388671875, + 0.044281005859375, + 0.0126190185546875, + 0.01318359375, + 0.04498291015625, + 0.019805908203125, + -0.045684814453125, + -0.042572021484375, + -0.037841796875, + -0.0198822021484375, + 0.0126495361328125, + -0.04779052734375, + 0.048187255859375, + -0.044525146484375, + -0.01128387451171875, + -0.0242462158203125, + 0.0703125, + 0.002735137939453125, + -0.01215362548828125, + -0.0034637451171875, + -0.01232147216796875, + 0.01543426513671875, + -0.0088653564453125, + 0.031341552734375, + -0.029266357421875, + -0.0404052734375, + 0.047119140625, + -0.005702972412109375, + -0.0191497802734375, + -0.0179901123046875, + -0.00858306884765625, + 0.0330810546875, + 0.05206298828125, + 0.0199127197265625, + 0.033782958984375, + 0.046539306640625, + -0.0019016265869140625, + 0.01398468017578125, + -0.03424072265625, + 0.0145416259765625, + 0.05462646484375, + 0.0015811920166015625, + -0.032196044921875, + 0.00518798828125, + 0.021209716796875, + -0.01983642578125, + -0.060791015625, + 0.0176849365234375, + -0.00954437255859375, + -0.0477294921875, + -0.042144775390625, + 0.00716400146484375, + -0.09619140625, + 0.02069091796875, + -0.018798828125, + -0.051666259765625, + 0.003017425537109375, + -0.0067901611328125, + -0.017578125, + -0.0006666183471679688, + 0.0008559226989746094, + 0.0316162109375, + -0.02056884765625, + -0.0077667236328125, + 0.01004791259765625, + -0.00843048095703125, + 0.0035533905029296875, + 0.0205535888671875, + 0.016876220703125, + -0.0244903564453125, + 0.054046630859375, + 0.01068115234375, + 0.0302886962890625, + -0.0277557373046875, + 0.0074462890625, + 0.0119171142578125, + 0.0711669921875, + -0.01000213623046875, + 0.03375244140625, + -0.01151275634765625, + -0.033355712890625, + -0.035308837890625, + 0.00736236572265625, + -0.0140838623046875, + 0.0709228515625, + 0.00968170166015625, + 0.0006961822509765625, + 0.00029778480529785156, + -0.039764404296875, + -0.03289794921875, + 1.5914440155029297e-05, + 0.0234375, + -0.0190277099609375, + -0.026885986328125, + -0.006618499755859375, + -0.0277557373046875, + -0.03759765625, + -0.044525146484375, + 0.0095977783203125, + 0.020477294921875, + -0.020477294921875, + 0.022735595703125, + 0.024627685546875, + -0.045501708984375, + 0.00882720947265625, + -0.0189666748046875, + -0.0003490447998046875, + -0.01546478271484375, + 0.0643310546875, + -0.002826690673828125, + -0.01157379150390625, + -0.00835418701171875, + 0.010498046875, + -0.0328369140625, + -0.0086669921875, + -0.0103759765625, + 0.01666259765625, + 0.0246124267578125, + 0.01406097412109375, + 0.048065185546875, + 0.113525390625, + 0.0136566162109375, + 0.0301361083984375, + -0.03924560546875, + 0.043731689453125, + 0.0079193115234375, + 0.000820159912109375, + 0.0009074211120605469, + -0.0302581787109375, + -0.0141448974609375, + 0.006931304931640625, + 0.02984619140625, + -0.030853271484375, + -0.0134735107421875, + -0.005115509033203125, + 0.00971221923828125, + 0.0855712890625, + 0.0166473388671875, + -0.0027332305908203125, + 0.02197265625, + -0.0051422119140625, + 0.0684814453125, + 0.0133514404296875, + 0.0184326171875, + -0.018829345703125, + -0.024139404296875, + 0.0189971923828125, + -0.0230865478515625, + 0.02838134765625, + -0.0229339599609375, + -0.020233154296875, + 0.0274200439453125, + -0.015777587890625, + 0.0616455078125, + 0.004749298095703125, + 0.018280029296875, + -0.048492431640625, + 0.01268768310546875, + -0.0200958251953125, + 0.01041412353515625, + -0.0170745849609375, + -0.0239715576171875, + -0.05950927734375, + -0.024200439453125, + 0.005756378173828125, + -0.00382232666015625, + -0.03289794921875, + -0.00507354736328125, + 0.0019330978393554688, + 0.059326171875, + -0.00821685791015625, + -0.03656005859375, + 0.0047454833984375, + 0.064697265625, + 0.0226898193359375, + 0.0012149810791015625, + -0.040771484375, + 0.0159912109375, + 0.01033782958984375, + 0.059112548828125, + -0.023529052734375, + -0.0169525146484375, + 0.050079345703125, + 0.05743408203125, + 0.01678466796875, + -0.0185394287109375, + 0.0150299072265625, + -0.00878143310546875, + -0.0017137527465820312, + -0.0149993896484375, + 0.001926422119140625, + -0.01244354248046875, + 0.01274871826171875, + 0.004817962646484375, + -0.005786895751953125, + 0.0031375885009765625, + 0.039581298828125, + 0.0172882080078125, + -0.008209228515625, + 0.033294677734375, + 0.031524658203125, + -0.015533447265625, + 0.0419921875, + 0.0297698974609375, + -0.06524658203125, + 0.06658935546875, + 0.0009851455688476562, + -0.06292724609375, + -0.03662109375, + -0.0279541015625, + 0.009033203125, + -0.00847625732421875, + -0.0299072265625, + -0.05206298828125, + -0.019989013671875, + -0.0208740234375, + -0.0189361572265625, + 0.04193115234375, + 0.04400634765625, + -0.01555633544921875, + 0.00016868114471435547, + -0.002742767333984375, + 0.012176513671875, + 0.014251708984375, + 0.0017557144165039062, + -0.0007109642028808594, + -0.04754638671875, + 0.00336456298828125, + -0.01113128662109375, + -0.021484375, + -0.0305633544921875, + 0.0579833984375, + 0.004352569580078125, + 0.004138946533203125, + -0.01226806640625, + -0.07806396484375, + -0.00044035911560058594, + -0.063232421875, + 0.007427215576171875, + 0.0172119140625, + 0.0185394287109375, + -0.00664520263671875, + 0.0274505615234375, + 0.045013427734375, + -0.0016603469848632812, + 0.006656646728515625, + -0.00952911376953125, + -0.00786590576171875, + 0.0004680156707763672, + -0.07379150390625, + -0.0228729248046875, + 0.021209716796875, + 0.0034656524658203125, + -0.052734375, + 0.032958984375, + -0.00021946430206298828, + -0.026763916015625, + -0.020263671875, + -0.00518798828125, + -0.04083251953125, + -0.0299224853515625, + -0.006763458251953125, + -0.0389404296875, + 0.0140228271484375, + -0.0252532958984375, + 0.039520263671875, + -0.0158538818359375, + 0.059295654296875, + -0.0189208984375, + 0.053497314453125, + 0.0285491943359375, + -0.028594970703125, + -0.034576416015625, + 0.049896240234375, + 0.01335906982421875, + 0.021942138671875, + -0.0245361328125, + 0.01361846923828125, + 0.0024242401123046875, + 0.00794219970703125, + 0.0367431640625, + -0.0087432861328125, + 0.0182037353515625, + -0.0280303955078125, + 0.04241943359375, + -0.00959014892578125, + -0.00144195556640625, + -0.002227783203125, + -0.01605224609375, + -0.00669097900390625, + 0.005153656005859375, + -0.04400634765625, + -0.01215362548828125, + 0.064453125, + 0.0032215118408203125, + 0.02410888671875, + 0.01080322265625, + -0.03411865234375, + 0.055145263671875, + 0.0271148681640625, + 0.01084136962890625, + 0.00464630126953125, + -0.0184783935546875, + -0.0298614501953125, + -0.0178375244140625, + -0.0211029052734375, + 0.050994873046875, + 0.01232147216796875, + 0.0220184326171875, + 0.0003635883331298828, + -0.0670166015625, + 0.023895263671875, + -0.026885986328125, + -0.0275115966796875, + -0.0142822265625, + -0.0148773193359375, + -0.034423828125, + 0.0272979736328125, + -0.010833740234375, + 0.051910400390625, + 0.01568603515625, + 0.006023406982421875, + 0.050628662109375, + 0.005886077880859375, + -0.038543701171875, + -0.002323150634765625, + -0.025421142578125, + -0.0021533966064453125, + 0.07257080078125, + 0.02349853515625, + -0.03271484375, + -0.02642822265625, + 0.038360595703125, + -0.01108551025390625, + -0.01171875, + 0.0243377685546875, + -0.0009698867797851562, + 0.0003943443298339844, + -0.0157623291015625, + -0.029327392578125, + -0.035430908203125, + -0.00826263427734375, + 0.0101165771484375, + 0.01294708251953125, + 0.004322052001953125, + -0.0628662109375, + 0.00818634033203125, + -0.0295257568359375, + 0.0018291473388671875, + 0.0156402587890625, + -0.0015964508056640625, + -0.12042236328125, + -2.4497509002685547e-05, + -0.032440185546875, + 0.0140228271484375, + -0.054443359375, + -0.02508544921875, + -0.0070953369140625, + -0.0006899833679199219, + -0.0207672119140625, + -0.04345703125, + 0.0137939453125, + 0.038055419921875, + -0.0162506103515625, + 0.0022335052490234375, + 0.019866943359375, + 0.0687255859375, + -0.0217437744140625, + -0.0239410400390625, + 0.01190948486328125, + 0.0643310546875, + 0.005916595458984375, + -0.033172607421875, + -0.01476287841796875, + -0.0033130645751953125, + 0.003170013427734375, + -0.0249481201171875, + -0.00339508056640625, + -0.00527191162109375, + -0.006580352783203125, + -0.0228729248046875, + 0.04150390625, + -0.027374267578125, + 0.0101776123046875, + -0.02490234375, + 0.032623291015625, + 0.0022640228271484375, + 0.0165863037109375, + -0.040985107421875, + -0.0169219970703125, + 0.042877197265625, + -0.0222625732421875, + -0.0070648193359375, + -0.0439453125, + 0.019989013671875, + -0.03302001953125, + 0.031646728515625, + 0.03411865234375, + -0.0006184577941894531, + -0.031768798828125, + -0.0027294158935546875, + 0.01427459716796875, + 0.0124359130859375, + 0.0312042236328125, + 0.01512908935546875, + -0.0017938613891601562, + 0.0135498046875, + 0.0016231536865234375, + -0.005901336669921875, + 0.030426025390625, + 0.046661376953125, + -0.052825927734375, + -0.0295257568359375, + -0.006137847900390625, + -0.01727294921875, + -0.00649261474609375, + 0.0242919921875, + -0.0270538330078125, + 0.0216827392578125, + 0.032135009765625, + -0.0296630859375, + -0.0116119384765625, + 0.0504150390625, + -0.0224151611328125, + 0.01461029052734375, + 0.0323486328125, + 0.05072021484375, + 0.01617431640625, + 0.00811767578125, + 0.01953125, + -0.0173187255859375, + -0.0146484375, + -0.0360107421875, + -0.00971221923828125, + -0.03167724609375, + -0.002216339111328125, + -0.0167388916015625, + -0.045928955078125, + 0.0106353759765625, + -0.01995849609375, + -0.0242919921875, + -0.008880615234375, + -0.049896240234375, + -0.022705078125, + -0.0218658447265625, + -0.11102294921875, + 0.0189208984375, + -0.054595947265625, + -0.036865234375, + -0.029998779296875, + -0.018798828125, + -0.0684814453125, + 0.026641845703125, + -0.020965576171875, + 0.003452301025390625, + 0.0005865097045898438, + 0.050872802734375, + -0.0160064697265625, + 0.0198516845703125, + -0.00405120849609375, + -0.0309906005859375, + -0.0139923095703125, + -0.019989013671875, + -0.0032138824462890625, + 0.03448486328125, + 0.033843994140625, + -0.0018138885498046875, + -0.02972412109375, + 7.551908493041992e-05, + 0.0307769775390625, + 0.0020732879638671875, + -0.02752685546875, + 0.020233154296875, + 0.0223388671875, + -0.026641845703125, + -0.019195556640625, + 0.04510498046875, + 0.0215606689453125, + 0.0090484619140625, + 0.05389404296875, + 0.01505279541015625, + 0.0094146728515625, + -0.0163116455078125, + -0.0298309326171875, + -0.0037746429443359375, + 0.0248870849609375, + -0.0100250244140625, + -0.008575439453125, + 0.044677734375, + -0.0010671615600585938, + -0.0270233154296875, + -0.01080322265625, + 0.01348876953125, + -0.02069091796875, + -0.04034423828125, + -0.034576416015625, + 0.01165008544921875, + -0.0169219970703125, + -0.0305938720703125, + -0.00200653076171875, + 0.0022144317626953125, + 0.02099609375, + 0.0013284683227539062, + 0.04052734375, + 0.032196044921875, + 0.0010271072387695312, + 0.0399169921875, + -0.01446533203125, + -0.05438232421875, + 0.0269012451171875, + -0.0020904541015625, + -0.0024166107177734375, + -0.020294189453125, + -0.054229736328125, + 0.0224151611328125, + 0.01468658447265625, + 0.001514434814453125, + 0.01026153564453125, + 0.01070404052734375, + 0.02069091796875, + -0.0250701904296875, + -0.004688262939453125, + 0.004123687744140625, + -0.0200958251953125, + -0.054595947265625, + 0.0127410888671875, + 0.0117340087890625, + 0.00302886962890625, + 0.0670166015625, + -0.00144195556640625, + -0.0282135009765625, + 0.0190277099609375, + 0.046417236328125, + -0.005039215087890625, + 0.0218963623046875, + -0.0102386474609375, + -0.044677734375, + -0.06170654296875, + 0.043853759765625, + 0.040252685546875, + 0.0129547119140625, + -0.02618408203125, + -0.0138092041015625, + -0.0234222412109375, + 0.01548004150390625, + 0.00778961181640625, + 0.002685546875, + 0.00567626953125, + 0.052490234375, + 0.0235748291015625, + 0.0369873046875, + 0.0093231201171875, + 0.02752685546875, + -0.0357666015625, + 0.01239013671875, + -0.020751953125, + 0.015960693359375, + 0.0662841796875, + -0.01177215576171875, + -0.0212860107421875, + -0.03790283203125, + -0.049652099609375, + -0.022735595703125, + 0.0086669921875, + 0.040374755859375, + 0.045928955078125, + -0.02410888671875, + -0.0006089210510253906, + -0.028289794921875, + 0.0238800048828125, + 0.046142578125, + -0.00969696044921875, + 0.03765869140625, + -0.039154052734375, + -0.01141357421875, + 0.0167388916015625, + -0.017578125, + -0.0259552001953125, + -0.041259765625, + 0.024200439453125, + 0.00833892822265625, + 0.00026917457580566406, + -0.00753021240234375, + 0.0166473388671875, + 0.06622314453125, + 0.01055145263671875, + 0.0037136077880859375, + -0.0126495361328125, + 0.0247039794921875, + 0.0596923828125, + -0.031341552734375, + 0.024810791015625, + 0.004291534423828125, + -0.041229248046875, + -0.057708740234375 + ], + [ + 0.041961669921875, + -0.0028667449951171875, + -0.02423095703125, + 0.0044097900390625, + -0.0190277099609375, + 0.0006699562072753906, + 0.0014829635620117188, + 0.042755126953125, + -0.007083892822265625, + 0.00350189208984375, + 0.026092529296875, + -0.023468017578125, + 0.00579071044921875, + -0.00450897216796875, + 0.006290435791015625, + -0.008941650390625, + 0.01314544677734375, + 0.007232666015625, + -0.01751708984375, + -0.039154052734375, + 0.0242919921875, + -0.0010652542114257812, + -0.059051513671875, + -0.02398681640625, + -0.029571533203125, + 0.019317626953125, + -0.042877197265625, + -0.0261383056640625, + -0.024627685546875, + 0.0096282958984375, + 0.00017082691192626953, + -0.039031982421875, + 0.03643798828125, + 0.0167083740234375, + -0.01003265380859375, + -0.0343017578125, + -0.040313720703125, + -0.033721923828125, + -0.047119140625, + 0.032806396484375, + 0.0343017578125, + 0.04254150390625, + 0.03204345703125, + 0.01494598388671875, + 0.01401519775390625, + -0.029571533203125, + -0.01027679443359375, + -0.0009984970092773438, + 0.01256561279296875, + -0.016082763671875, + -0.01528167724609375, + -0.0085906982421875, + 0.0163116455078125, + -0.035797119140625, + 0.01255035400390625, + 0.0203857421875, + -0.059600830078125, + -0.0013170242309570312, + -0.0689697265625, + -0.056182861328125, + -0.00885009765625, + 0.034423828125, + -0.0234527587890625, + -0.00217437744140625, + 0.0259246826171875, + 0.058868408203125, + 0.0074005126953125, + -0.0145263671875, + -0.06085205078125, + -0.055633544921875, + 0.0233612060546875, + 0.06378173828125, + -0.035369873046875, + -0.030517578125, + -0.0244903564453125, + 0.0067596435546875, + -0.010894775390625, + 0.004390716552734375, + -0.0287933349609375, + -0.0289306640625, + 0.018157958984375, + -0.0352783203125, + 0.0011129379272460938, + 0.01123809814453125, + -0.0518798828125, + 0.0672607421875, + -0.0102386474609375, + -0.0014209747314453125, + 0.03717041015625, + 0.020782470703125, + -0.035003662109375, + -0.0015048980712890625, + 0.041534423828125, + -0.03692626953125, + -0.04620361328125, + 0.00441741943359375, + -0.0295257568359375, + -0.047698974609375, + 0.00511932373046875, + -0.02691650390625, + 0.0163116455078125, + -0.004245758056640625, + -0.027496337890625, + 0.029571533203125, + 0.009521484375, + 0.0187835693359375, + 0.02593994140625, + 0.0017461776733398438, + 0.020355224609375, + 0.0037631988525390625, + 0.0694580078125, + 0.006542205810546875, + 0.0245208740234375, + -0.01258087158203125, + -0.0208587646484375, + -0.0091094970703125, + -0.0157623291015625, + -0.02691650390625, + -0.01468658447265625, + -0.0357666015625, + 0.04150390625, + 0.030120849609375, + 0.0772705078125, + 0.01358795166015625, + 0.018951416015625, + -0.0032520294189453125, + 0.040313720703125, + 0.08087158203125, + 0.014923095703125, + -0.007099151611328125, + -0.006092071533203125, + 0.03594970703125, + -0.01187896728515625, + 0.043426513671875, + 0.00492095947265625, + -0.01235198974609375, + 0.01555633544921875, + 0.0009794235229492188, + -0.01325225830078125, + -0.0166473388671875, + -0.0262908935546875, + 0.0227203369140625, + -0.01044464111328125, + -0.060089111328125, + 0.0298004150390625, + -0.0301513671875, + 0.008941650390625, + 0.0224151611328125, + -0.006832122802734375, + -0.037078857421875, + 0.01383209228515625, + 0.0223541259765625, + 0.0305938720703125, + 0.021636962890625, + -0.0023555755615234375, + -0.0007138252258300781, + 0.0111541748046875, + 0.0176849365234375, + -0.041839599609375, + 0.0115509033203125, + -0.0132598876953125, + -0.1002197265625, + -0.0301055908203125, + -0.0198822021484375, + 0.036102294921875, + 0.01105499267578125, + -0.0088348388671875, + 0.0282440185546875, + -0.0312042236328125, + -0.050537109375, + -0.031341552734375, + -0.039581298828125, + 0.0015697479248046875, + -0.0072479248046875, + -0.015777587890625, + 0.0217132568359375, + 0.055450439453125, + -0.005672454833984375, + 0.01287841796875, + -0.03118896484375, + -0.050628662109375, + 0.0228424072265625, + 0.0182952880859375, + -0.040313720703125, + 0.00859832763671875, + 0.046600341796875, + 0.03790283203125, + -0.0267333984375, + 0.014617919921875, + -0.0145721435546875, + 0.002349853515625, + -0.0036163330078125, + 0.068115234375, + -0.039764404296875, + 0.042236328125, + -0.06060791015625, + -0.01216888427734375, + -0.031646728515625, + -0.0019207000732421875, + -0.038787841796875, + -0.04620361328125, + 0.0230560302734375, + -0.0208587646484375, + 0.01555633544921875, + 0.0207366943359375, + -0.0074005126953125, + -0.004055023193359375, + -0.026214599609375, + 0.01160430908203125, + -0.0007472038269042969, + 0.039703369140625, + 0.005626678466796875, + 0.0132293701171875, + -0.03582763671875, + -0.0340576171875, + 0.02301025390625, + 0.05548095703125, + 0.01788330078125, + 0.03778076171875, + 0.0196380615234375, + 0.0069122314453125, + 0.00496673583984375, + -0.041778564453125, + 0.023468017578125, + 0.02508544921875, + 0.03826904296875, + 0.01184844970703125, + 0.005168914794921875, + -0.0305633544921875, + -0.019805908203125, + -0.055938720703125, + 0.018890380859375, + 0.0247802734375, + 0.03643798828125, + -0.0283966064453125, + -0.02105712890625, + -0.022003173828125, + 0.0023746490478515625, + 0.010345458984375, + 0.036651611328125, + 0.046966552734375, + 0.00574493408203125, + -0.002819061279296875, + 0.011077880859375, + -0.007007598876953125, + 0.011138916015625, + 0.0421142578125, + 0.014251708984375, + -0.03717041015625, + -0.0400390625, + 0.0198822021484375, + -0.01027679443359375, + -0.035430908203125, + 0.029083251953125, + 0.04364013671875, + 0.013702392578125, + -0.005054473876953125, + -0.0136871337890625, + 0.015899658203125, + -0.0025787353515625, + 0.00018906593322753906, + 0.01264190673828125, + -0.022979736328125, + 0.0252838134765625, + -0.009552001953125, + -0.0178985595703125, + 0.004070281982421875, + -0.0084686279296875, + 0.0244598388671875, + -0.00958251953125, + -0.0202484130859375, + 0.037445068359375, + 0.0203094482421875, + -0.0205230712890625, + -0.007152557373046875, + 0.0198516845703125, + -0.00647735595703125, + 0.0096588134765625, + -0.0078887939453125, + 0.0192108154296875, + -0.0165252685546875, + -0.053070068359375, + 0.03497314453125, + 0.0151824951171875, + 0.03265380859375, + -0.0036468505859375, + -0.050018310546875, + 0.0462646484375, + -0.0103302001953125, + 0.003314971923828125, + -0.0077056884765625, + -0.0174102783203125, + 0.02081298828125, + 0.0254669189453125, + 0.05126953125, + -0.022491455078125, + 0.0037631988525390625, + -0.171875, + 0.003772735595703125, + 0.029327392578125, + 0.01206207275390625, + 0.0026397705078125, + -0.00885009765625, + 0.00597381591796875, + -0.043914794921875, + -0.0202484130859375, + -0.040069580078125, + -0.044036865234375, + -0.031524658203125, + -0.0238189697265625, + 0.018341064453125, + 0.0341796875, + -0.006458282470703125, + 0.0223388671875, + 0.0235137939453125, + -0.01531982421875, + -0.019683837890625, + -0.0298004150390625, + -0.037353515625, + 0.035552978515625, + -0.012115478515625, + -0.01355743408203125, + -0.0004124641418457031, + -0.006862640380859375, + 0.003589630126953125, + 0.01247406005859375, + 0.0294342041015625, + -0.0139617919921875, + -0.01288604736328125, + 0.002277374267578125, + -0.039520263671875, + 0.041168212890625, + 0.047332763671875, + -0.029541015625, + -0.0143280029296875, + 0.028717041015625, + 0.0213470458984375, + 0.007476806640625, + 0.08245849609375, + -0.0174102783203125, + 0.00745391845703125, + -0.0031585693359375, + -0.06353759765625, + -0.01800537109375, + 0.0269317626953125, + 0.02325439453125, + -0.0390625, + -0.042755126953125, + 0.007740020751953125, + -0.019989013671875, + -0.01070404052734375, + -0.061553955078125, + 0.037078857421875, + 0.005580902099609375, + 0.03326416015625, + 0.038482666015625, + -0.006076812744140625, + 0.0223541259765625, + -0.0394287109375, + 0.007686614990234375, + -0.05670166015625, + -0.01287841796875, + 0.006328582763671875, + 0.0182952880859375, + 0.0667724609375, + -0.019927978515625, + 0.004001617431640625, + 0.06353759765625, + 0.045318603515625, + -0.03021240234375, + 0.006931304931640625, + 0.023773193359375, + 0.059234619140625, + -0.016845703125, + 0.0188140869140625, + -0.02215576171875, + -0.0693359375, + 0.01904296875, + 0.0281524658203125, + 0.011993408203125, + 0.026397705078125, + -0.036834716796875, + -0.06494140625, + 0.0023345947265625, + -0.0011653900146484375, + 0.05560302734375, + 0.24267578125, + -0.01374053955078125, + 0.026092529296875, + -0.0301971435546875, + -0.0286865234375, + -0.021270751953125, + -0.00820159912109375, + 0.037139892578125, + -0.0026226043701171875, + -0.024261474609375, + -0.0177154541015625, + -0.01265716552734375, + 0.0033626556396484375, + -0.0135498046875, + -0.01323699951171875, + 0.09033203125, + -0.0210418701171875, + -0.0107421875, + 0.03936767578125, + -0.0075836181640625, + -0.0081939697265625, + -0.041534423828125, + 0.0004119873046875, + 0.0069732666015625, + -0.03094482421875, + -0.025390625, + -0.004444122314453125, + -0.023590087890625, + 0.0284881591796875, + 0.05413818359375, + -0.019134521484375, + -0.0045318603515625, + 0.0101470947265625, + 0.03338623046875, + 0.006732940673828125, + 0.00782012939453125, + -0.01482391357421875, + -0.0163726806640625, + -0.0159912109375, + 0.047607421875, + 0.019622802734375, + -0.007076263427734375, + 0.01265716552734375, + 0.01995849609375, + 0.044708251953125, + 0.017303466796875, + 0.02398681640625, + -0.0234832763671875, + -0.03466796875, + -0.01134490966796875, + -0.005146026611328125, + 0.005321502685546875, + -0.01251983642578125, + 0.03131103515625, + -0.020538330078125, + -0.0249481201171875, + -0.0241851806640625, + -0.05035400390625, + 0.0286865234375, + 0.01264190673828125, + 0.0016956329345703125, + -0.0033969879150390625, + 0.0225372314453125, + -0.044403076171875, + -0.030517578125, + 0.00133514404296875, + -0.012847900390625, + -0.01398468017578125, + -0.00289154052734375, + 0.033538818359375, + 0.01407623291015625, + -0.038665771484375, + -0.01454925537109375, + 0.0285491943359375, + 0.0181732177734375, + -0.0012655258178710938, + 0.004802703857421875, + -0.0037021636962890625, + 0.033966064453125, + -0.0305633544921875, + -0.00026679039001464844, + -0.03924560546875, + 0.0007100105285644531, + 0.0296630859375, + 0.033966064453125, + 0.03265380859375, + 0.023468017578125, + 0.0540771484375, + 0.04986572265625, + -0.00667572021484375, + 0.0222320556640625, + 0.062103271484375, + -0.03955078125, + 0.006252288818359375, + -0.052215576171875, + -0.0234375, + 0.0199127197265625, + 0.00504302978515625, + -0.07427978515625, + 0.0286407470703125, + 0.0164031982421875, + -0.0096588134765625, + -0.031341552734375, + 0.01290130615234375, + 0.037109375, + -0.01143646240234375, + 0.0193939208984375, + -0.016448974609375, + 0.0083160400390625, + 0.01543426513671875, + -0.037109375, + -0.0086822509765625, + 0.0048980712890625, + 0.0546875, + 0.059051513671875, + 0.0213775634765625, + -0.02099609375, + 0.007213592529296875, + 0.036163330078125, + 0.0261077880859375, + -0.01483917236328125, + -0.0120391845703125, + -0.0194244384765625, + -0.0188140869140625, + -0.0018482208251953125, + 0.00650787353515625, + -0.0167388916015625, + 0.03973388671875, + -0.00836944580078125, + 0.03338623046875, + -0.02227783203125, + -0.0269775390625, + -0.0367431640625, + 0.016387939453125, + 0.05938720703125, + -0.002910614013671875, + 0.04827880859375, + -0.004459381103515625, + 0.012481689453125, + -0.005435943603515625, + -0.01800537109375, + 0.0596923828125, + -0.00971221923828125, + 0.0036830902099609375, + 0.004852294921875, + 0.0203094482421875, + -0.058502197265625, + 0.01953125, + 0.017364501953125, + -0.01497650146484375, + -0.0011272430419921875, + 0.012481689453125, + 0.0123138427734375, + -0.02044677734375, + -0.036468505859375, + 0.0119781494140625, + -0.0292816162109375, + -0.0003497600555419922, + -0.00888824462890625, + 0.01241302490234375, + -0.0019245147705078125, + 0.05438232421875, + 0.03826904296875, + 0.1007080078125, + -0.00931549072265625, + 0.00464630126953125, + -0.0232086181640625, + 0.0265350341796875, + -0.01071929931640625, + 0.0087738037109375, + -0.0015611648559570312, + 0.0032863616943359375, + 0.0202484130859375, + -0.012542724609375, + -0.00235748291015625, + -0.0292816162109375, + -0.0264739990234375, + 0.01141357421875, + -0.031341552734375, + 0.08001708984375, + 0.0084991455078125, + 0.03729248046875, + -0.0225372314453125, + 0.044219970703125, + 0.032440185546875, + 0.04290771484375, + 0.0208587646484375, + -0.043182373046875, + -0.03204345703125, + -0.0301055908203125, + -0.0200042724609375, + 0.07916259765625, + -0.027008056640625, + -0.014373779296875, + 0.0230865478515625, + -0.026580810546875, + 0.0836181640625, + -0.04547119140625, + 0.0228729248046875, + -0.02862548828125, + -0.0189971923828125, + 0.025177001953125, + -0.0325927734375, + -0.0194091796875, + -0.007495880126953125, + -0.0016126632690429688, + -0.01751708984375, + 0.0273590087890625, + 0.019287109375, + -0.038177490234375, + -0.00225830078125, + -0.004150390625, + 0.00567626953125, + 0.00865936279296875, + 0.004314422607421875, + 0.0091094970703125, + 0.00601959228515625, + -0.0169525146484375, + 0.035552978515625, + -0.038909912109375, + -0.002452850341796875, + 0.003955841064453125, + 0.015289306640625, + -0.059051513671875, + -0.0225067138671875, + -0.0172576904296875, + 0.03399658203125, + 0.0826416015625, + 0.0164337158203125, + -0.003448486328125, + -0.008758544921875, + -0.033233642578125, + 0.02593994140625, + -0.034149169921875, + 0.004032135009765625, + -0.01241302490234375, + 0.0007123947143554688, + -0.00016760826110839844, + 0.04388427734375, + 0.0179290771484375, + -0.0027599334716796875, + -0.031158447265625, + 0.047210693359375, + 0.09381103515625, + 0.0125274658203125, + 0.0144500732421875, + 0.051544189453125, + -0.0172271728515625, + 0.0423583984375, + 0.0246734619140625, + -0.002597808837890625, + 0.0125579833984375, + -0.010711669921875, + -0.01387786865234375, + 0.00791168212890625, + -0.035186767578125, + -0.049591064453125, + 0.002193450927734375, + -0.05010986328125, + -0.0180206298828125, + 0.00354766845703125, + 0.057586669921875, + -0.03497314453125, + -0.0377197265625, + 0.0156402587890625, + -0.0435791015625, + 0.01458740234375, + -0.030120849609375, + -0.032562255859375, + -0.02215576171875, + -0.0272064208984375, + -0.04315185546875, + -0.0394287109375, + 0.0017414093017578125, + -0.003631591796875, + 0.00588226318359375, + -0.007049560546875, + 0.022705078125, + -0.051666259765625, + 0.034576416015625, + -0.0265960693359375, + 0.044464111328125, + 0.0262298583984375, + 0.0212554931640625, + -0.0009484291076660156, + -0.014678955078125, + 0.0152130126953125, + 0.036712646484375, + 0.0053253173828125, + 0.0006222724914550781, + 0.05584716796875, + -0.030731201171875, + -0.0654296875, + -0.047271728515625, + 0.000637054443359375, + 0.0166473388671875, + -0.055938720703125, + 0.08233642578125, + 0.0125885009765625, + 0.01546478271484375, + 0.00627899169921875, + -0.0304412841796875, + -0.0098876953125, + -0.0537109375, + -0.017181396484375, + 0.01357269287109375, + -0.011810302734375, + -0.052490234375, + 0.004405975341796875, + -0.0152435302734375, + -0.002166748046875, + -0.00750732421875, + 0.0306396484375, + 0.0413818359375, + 0.0372314453125, + 0.00261688232421875, + 0.0128631591796875, + 0.0029544830322265625, + 0.0002390146255493164, + -0.031097412109375, + 0.027099609375, + 0.034454345703125, + 0.0172576904296875, + 0.014617919921875, + 0.00530242919921875, + 0.0269317626953125, + -0.044464111328125, + 0.045684814453125, + -0.0380859375, + -0.025238037109375, + 0.007381439208984375, + 0.0172882080078125, + 0.0180511474609375, + 0.0159454345703125, + -0.01256561279296875, + -0.032196044921875, + 0.0224761962890625, + -0.041107177734375, + -0.00714111328125, + 0.0094451904296875, + -0.004302978515625, + 0.02459716796875, + 0.031646728515625, + -0.053375244140625, + 0.0274200439453125, + -0.03900146484375, + -0.038543701171875, + -0.03900146484375, + -0.0311126708984375, + 0.00971221923828125, + 0.032196044921875, + 0.05999755859375, + -0.00273895263671875, + -0.047027587890625, + -0.004730224609375, + -0.01538848876953125, + -0.006103515625, + -0.0290069580078125, + 0.038421630859375, + 0.0281829833984375, + -0.00611114501953125, + -0.011138916015625, + 0.005889892578125, + -0.0014772415161132812, + -0.02142333984375, + 0.06439208984375, + -0.0036716461181640625, + -0.0306396484375, + -0.01457977294921875, + -0.03607177734375, + -0.0058135986328125, + 0.07733154296875, + 0.0265960693359375, + 0.01308441162109375, + -0.007457733154296875, + 0.04644775390625, + -0.0258636474609375, + -0.00789642333984375, + 0.022186279296875, + 0.036407470703125, + -0.0221099853515625, + -0.016693115234375, + -0.0034580230712890625, + -0.00234222412109375, + -0.022186279296875, + -0.043426513671875, + -0.02105712890625, + -0.0272979736328125, + -0.0672607421875, + 0.015899658203125, + 0.0230865478515625, + -0.006732940673828125, + -0.0214996337890625, + 0.01019287109375, + -0.141357421875, + 0.0185089111328125, + 0.00556182861328125, + 0.0038585662841796875, + -0.044464111328125, + -0.005157470703125, + -0.052734375, + -0.019287109375, + -0.035400390625, + -0.0170745849609375, + 0.002765655517578125, + 0.052581787109375, + -0.0238800048828125, + -0.0227813720703125, + 0.00254058837890625, + -0.00039696693420410156, + -0.05731201171875, + 0.0017137527465820312, + -0.01183319091796875, + 0.004856109619140625, + -0.00038623809814453125, + 0.0102691650390625, + -0.0294647216796875, + 0.00255584716796875, + -0.0066070556640625, + 0.01332855224609375, + -0.0263214111328125, + 0.00206756591796875, + 0.00984954833984375, + -0.0201873779296875, + -0.01285552978515625, + -0.052032470703125, + 0.01424407958984375, + 0.006450653076171875, + -0.0097808837890625, + 0.040924072265625, + -0.005382537841796875, + -0.0079193115234375, + -0.0458984375, + 0.04913330078125, + -0.04229736328125, + 0.0093841552734375, + -0.03656005859375, + 0.0099029541015625, + 0.0036334991455078125, + 0.00788116455078125, + -0.021942138671875, + -0.00138092041015625, + -0.020355224609375, + 0.012603759765625, + -0.00992584228515625, + 0.0309600830078125, + -0.02423095703125, + 0.00981903076171875, + -0.01203155517578125, + 0.0433349609375, + -0.04931640625, + 0.0142059326171875, + 0.044342041015625, + 0.018218994140625, + -0.031097412109375, + 0.0027618408203125, + 0.0164642333984375, + -0.06695556640625, + -0.0321044921875, + 0.0139007568359375, + -0.0718994140625, + -0.0034923553466796875, + 0.049591064453125, + -0.06689453125, + -0.049102783203125, + -0.020660400390625, + -0.01108551025390625, + 0.0028209686279296875, + 0.0201416015625, + 0.0204620361328125, + 0.0229034423828125, + -0.004749298095703125, + -0.00283050537109375, + 0.0274200439453125, + -0.033905029296875, + -0.01416015625, + 0.006855010986328125, + 0.01561737060546875, + -0.01428985595703125, + 0.0070037841796875, + -0.01416015625, + -0.029388427734375, + -0.04449462890625, + -0.010711669921875, + 0.0008821487426757812, + -0.054412841796875, + 0.01413726806640625, + -0.01300811767578125, + -0.03497314453125, + 0.06646728515625, + -0.02606201171875, + -0.03662109375, + -0.0014657974243164062, + -0.04266357421875, + -0.0169830322265625, + 0.01898193359375, + 0.01383209228515625, + -6.61015510559082e-05, + -0.04840087890625, + 0.0360107421875, + -0.0546875, + -0.0113067626953125, + -0.017303466796875, + 0.0009336471557617188, + 0.0016031265258789062, + -0.03033447265625, + -0.033233642578125, + 0.00286865234375, + -0.01152801513671875, + -0.02117919921875, + -0.02972412109375, + 0.056304931640625, + 0.0275115966796875, + 0.01947021484375, + -0.0533447265625, + 0.0312347412109375, + 0.05023193359375, + -0.032562255859375, + 0.0249786376953125, + 0.0091094970703125, + 0.053497314453125, + 0.019317626953125, + 0.06585693359375, + -0.043609619140625, + -0.006683349609375, + 0.01494598388671875, + -0.0035381317138671875, + -0.012542724609375, + 0.0232391357421875, + -0.04132080078125, + -0.0231475830078125, + 0.0291595458984375, + 0.01308441162109375, + -0.008514404296875, + 0.0260162353515625, + -0.0166778564453125, + -0.0300445556640625, + -0.014312744140625, + -0.04180908203125, + 0.003360748291015625, + -0.0494384765625, + 0.0145416259765625, + 0.04962158203125, + 0.0210113525390625, + 0.00995635986328125, + -0.01216888427734375, + -0.0055389404296875, + 0.049591064453125, + -0.044830322265625, + 0.046051025390625, + -0.07745361328125, + -0.042083740234375, + 0.0118865966796875, + -0.019775390625, + -0.01727294921875, + -0.025390625, + -0.01898193359375, + -0.0269775390625, + 0.0127716064453125, + 0.034454345703125, + -0.022430419921875, + -0.006366729736328125, + 0.046661376953125, + -0.01552581787109375, + -0.051300048828125, + 0.01934814453125, + -0.0517578125, + -0.0253143310546875, + 0.019775390625, + 0.0298309326171875, + 0.0108795166015625, + 0.02685546875, + -0.0181884765625, + 0.048248291015625, + 0.08251953125, + 0.0237274169921875, + 0.019622802734375, + 0.0179901123046875, + -0.01551055908203125, + 0.0032501220703125, + -0.0282440185546875, + -0.0157318115234375, + 0.01898193359375, + -0.0103912353515625, + -0.0057373046875, + -0.0300445556640625, + -0.0677490234375, + 0.0034580230712890625, + 0.006366729736328125, + -0.0020465850830078125, + 0.0205230712890625, + -0.0202484130859375, + 0.0018930435180664062, + 0.0223541259765625, + 0.02099609375, + -0.0007243156433105469, + -0.0017690658569335938, + 0.023284912109375, + -0.044708251953125, + -0.017242431640625, + -0.009735107421875, + -0.028106689453125, + -0.08343505859375, + 0.006992340087890625, + -0.00656890869140625, + 0.01690673828125, + -0.029052734375, + 0.027435302734375, + 0.0227203369140625, + -0.0296478271484375, + 0.005619049072265625, + -0.041107177734375, + 0.0289306640625, + 0.002109527587890625, + 0.016387939453125, + 0.02850341796875, + -0.0418701171875, + 0.0272216796875, + 0.01216888427734375, + 0.0183868408203125, + -0.008026123046875, + -0.0226898193359375, + -0.018890380859375, + 0.00928497314453125, + 0.0073089599609375, + 0.037841796875, + -0.03411865234375, + -0.010650634765625, + 0.0022907257080078125, + -0.01056671142578125, + -0.01059722900390625, + 0.0228424072265625, + 0.0136260986328125, + -0.006389617919921875, + -0.001247406005859375, + 0.024139404296875, + 0.01629638671875, + 0.018096923828125 + ], + [ + 0.0548095703125, + 0.035003662109375, + -0.0218048095703125, + 0.0276641845703125, + -0.010772705078125, + -0.026641845703125, + -0.04150390625, + 0.0185394287109375, + 0.016510009765625, + 0.0171661376953125, + 0.050323486328125, + 0.021636962890625, + -0.027862548828125, + -0.0030193328857421875, + -0.02618408203125, + 0.047760009765625, + 0.051788330078125, + 0.014190673828125, + 0.0159759521484375, + -0.0187530517578125, + -0.0265655517578125, + 0.00728607177734375, + -0.0022296905517578125, + -0.075927734375, + -0.00768280029296875, + 0.0086669921875, + -0.0303955078125, + -0.0207672119140625, + -0.0404052734375, + -0.0014810562133789062, + 0.006046295166015625, + -0.01953125, + 0.0244140625, + 0.040679931640625, + 0.0274810791015625, + -0.040924072265625, + -0.02093505859375, + -0.03643798828125, + -0.037994384765625, + 0.0207672119140625, + 0.0650634765625, + 0.0188751220703125, + 0.01678466796875, + 0.0262298583984375, + 0.00726318359375, + -0.06695556640625, + 0.00032711029052734375, + 0.0010442733764648438, + -0.0694580078125, + -0.0260162353515625, + -0.007171630859375, + -0.070068359375, + 0.01226806640625, + -0.00811767578125, + -0.032012939453125, + 0.02142333984375, + -0.01435089111328125, + -0.039764404296875, + -0.0306549072265625, + -0.036773681640625, + -0.05377197265625, + -0.00014591217041015625, + -0.00438690185546875, + -0.0384521484375, + 0.0091552734375, + 0.0159149169921875, + -0.0117034912109375, + 0.01104736328125, + -0.031280517578125, + -0.0301361083984375, + -0.0130767822265625, + -0.0139007568359375, + 0.00717926025390625, + 0.01007080078125, + -0.0312042236328125, + -0.027587890625, + -0.0274200439453125, + 0.0125579833984375, + 0.0162200927734375, + -0.0235595703125, + -0.0001251697540283203, + -0.0167694091796875, + -8.89897346496582e-05, + -0.0150146484375, + -0.0310516357421875, + 0.064453125, + -0.00945281982421875, + 0.0272216796875, + 0.0218963623046875, + 0.001110076904296875, + -0.07086181640625, + -0.0260162353515625, + -0.01568603515625, + -0.005035400390625, + -0.0225830078125, + -0.0009660720825195312, + -0.005512237548828125, + 0.006805419921875, + 0.0107574462890625, + -0.005886077880859375, + -0.0086212158203125, + 0.01458740234375, + 0.0050048828125, + 0.002490997314453125, + 0.01345062255859375, + 0.0038814544677734375, + 0.04803466796875, + 0.0196685791015625, + -0.0323486328125, + 0.0101470947265625, + 0.060455322265625, + -0.002666473388671875, + 0.0635986328125, + -0.0218353271484375, + -0.0264739990234375, + -0.0159454345703125, + -0.0135040283203125, + -0.022491455078125, + -0.04107666015625, + -0.0223236083984375, + -0.00738525390625, + 0.00194549560546875, + 0.0306396484375, + 0.00803375244140625, + -0.018798828125, + -0.00969696044921875, + -0.005306243896484375, + 0.00643157958984375, + -0.05242919921875, + 0.02142333984375, + -0.006496429443359375, + 0.035491943359375, + 0.0152435302734375, + 0.0166168212890625, + -0.03009033203125, + -0.026611328125, + 0.055755615234375, + -0.0007281303405761719, + -0.004055023193359375, + -0.0212249755859375, + -0.0021228790283203125, + -0.05230712890625, + -0.01422882080078125, + -0.062286376953125, + 0.0142974853515625, + 0.023345947265625, + -0.034576416015625, + 0.031982421875, + 0.03338623046875, + -0.0250701904296875, + -0.018463134765625, + 0.01849365234375, + 0.03228759765625, + -0.02386474609375, + -0.04302978515625, + 0.0156402587890625, + -0.0195159912109375, + 0.01082611083984375, + -0.0076141357421875, + -0.04608154296875, + -0.044769287109375, + -0.0268096923828125, + -0.042572021484375, + 0.00666046142578125, + 0.0052490234375, + -0.0043487548828125, + -0.003116607666015625, + 0.03045654296875, + -0.0049896240234375, + -0.0272216796875, + -0.01450347900390625, + -0.033233642578125, + 0.01361083984375, + 0.0238189697265625, + 0.03302001953125, + 0.04840087890625, + 0.067626953125, + 0.01184844970703125, + 0.034149169921875, + -0.029815673828125, + -0.0489501953125, + -0.0106048583984375, + -0.044708251953125, + 0.0256805419921875, + 0.015869140625, + 0.02581787109375, + -0.0222625732421875, + -0.0236358642578125, + 0.00020182132720947266, + 0.0133209228515625, + 0.00824737548828125, + -0.0251922607421875, + 0.043670654296875, + 0.0032100677490234375, + -0.00586700439453125, + 0.017852783203125, + 0.0038623809814453125, + 0.0016431808471679688, + -0.012939453125, + -0.020111083984375, + -0.0311279296875, + 0.0183868408203125, + 0.01274871826171875, + -0.061187744140625, + -0.01136016845703125, + 0.01421356201171875, + 0.0352783203125, + -0.014801025390625, + 0.016754150390625, + 0.01070404052734375, + -0.02374267578125, + -0.046356201171875, + -0.0273895263671875, + 0.01296234130859375, + -0.051116943359375, + 0.0024776458740234375, + 0.0494384765625, + -0.0269622802734375, + 0.002986907958984375, + 0.049835205078125, + 0.0240020751953125, + 0.074951171875, + -0.0139007568359375, + -0.0161285400390625, + -0.0024089813232421875, + 0.007080078125, + -0.0006284713745117188, + 0.008270263671875, + -0.006969451904296875, + -0.0100555419921875, + -0.0193023681640625, + -0.01036834716796875, + -0.00380706787109375, + -0.0234832763671875, + 0.0170135498046875, + -0.01059722900390625, + -0.048309326171875, + 0.0278472900390625, + 0.01227569580078125, + 0.01348114013671875, + -0.0149078369140625, + -0.0031337738037109375, + 0.01406097412109375, + -0.01934814453125, + -0.002002716064453125, + 0.022308349609375, + 0.0401611328125, + 0.0037136077880859375, + 0.004787445068359375, + 0.0112152099609375, + 0.057769775390625, + -0.0024013519287109375, + 0.006946563720703125, + 0.00841522216796875, + 0.02935791015625, + 0.0249176025390625, + -0.0256500244140625, + -0.012603759765625, + 0.0003921985626220703, + -0.0216827392578125, + 0.003269195556640625, + 0.028289794921875, + -0.0237579345703125, + 0.043731689453125, + -0.0189056396484375, + -0.01416778564453125, + -0.007328033447265625, + -0.0183868408203125, + 0.055816650390625, + -0.0809326171875, + 0.04083251953125, + -0.0035152435302734375, + 0.00565338134765625, + -0.025360107421875, + -0.04815673828125, + -0.004901885986328125, + -0.0223236083984375, + -0.015716552734375, + -0.0015888214111328125, + 0.046875, + 0.041534423828125, + -0.04034423828125, + 0.041778564453125, + 0.036376953125, + -0.0228424072265625, + -0.0276031494140625, + -0.01922607421875, + 0.01425933837890625, + -0.0020580291748046875, + -0.009124755859375, + 0.01366424560546875, + 0.00408935546875, + 0.0307769775390625, + 0.0013446807861328125, + -0.01532745361328125, + -0.02728271484375, + -0.00754547119140625, + -0.19970703125, + -0.0312042236328125, + -6.449222564697266e-05, + -0.02777099609375, + -0.01183319091796875, + 0.0128173828125, + -0.00782012939453125, + -0.0252532958984375, + -0.03466796875, + -0.008880615234375, + -0.07080078125, + -0.02667236328125, + -0.08929443359375, + -0.03045654296875, + 0.051788330078125, + 0.033966064453125, + -0.0127105712890625, + 0.0126190185546875, + 0.02069091796875, + -0.04241943359375, + 0.004566192626953125, + -0.052032470703125, + 0.034759521484375, + 0.0226287841796875, + -0.021331787109375, + -0.01085662841796875, + 0.06317138671875, + 0.0266265869140625, + -0.00583648681640625, + 0.0292510986328125, + 0.0180206298828125, + 0.0128631591796875, + 0.0019664764404296875, + -0.0087127685546875, + 0.058685302734375, + 0.0031986236572265625, + 0.062225341796875, + 0.00023996829986572266, + -0.01422882080078125, + 0.00011926889419555664, + -0.004947662353515625, + 0.052978515625, + -0.0110626220703125, + 0.035736083984375, + -0.038970947265625, + -0.0185394287109375, + -0.019195556640625, + 0.01763916015625, + 0.021514892578125, + -0.0017862319946289062, + -0.0033817291259765625, + -0.0188140869140625, + -0.0265350341796875, + -0.043426513671875, + -0.030487060546875, + -0.0084991455078125, + -0.0031452178955078125, + 0.03302001953125, + 0.00832366943359375, + -0.04498291015625, + 0.0390625, + -0.07415771484375, + 0.02252197265625, + 5.7637691497802734e-05, + 0.0190277099609375, + 0.005741119384765625, + -0.074462890625, + -0.0170440673828125, + 0.0189056396484375, + 0.0048828125, + -0.00382232666015625, + 0.0440673828125, + 0.015228271484375, + 0.0156707763671875, + 0.006244659423828125, + -0.0025959014892578125, + -0.0274200439453125, + 0.01543426513671875, + 0.010406494140625, + -0.071533203125, + -0.0117034912109375, + 0.01128387451171875, + 0.005222320556640625, + -0.03277587890625, + -0.035125732421875, + -0.03045654296875, + 0.002552032470703125, + 0.0100555419921875, + 0.04034423828125, + 0.2294921875, + 0.0325927734375, + 0.048919677734375, + -0.0533447265625, + 0.00988006591796875, + 0.0023956298828125, + -0.0005078315734863281, + -0.03009033203125, + 0.015838623046875, + -0.0184478759765625, + 0.0017604827880859375, + -0.01837158203125, + -0.0010318756103515625, + -0.003002166748046875, + 0.00652313232421875, + 0.0391845703125, + -0.0208282470703125, + 0.0165863037109375, + 0.055938720703125, + -0.01171875, + -0.0122528076171875, + -0.0469970703125, + 0.0634765625, + 0.00856781005859375, + -0.032073974609375, + -0.00028252601623535156, + -0.0120697021484375, + -0.004268646240234375, + -0.0211334228515625, + -0.002410888671875, + -0.041778564453125, + 0.050994873046875, + 0.043792724609375, + 0.035980224609375, + -0.04278564453125, + 0.00872039794921875, + 0.0014553070068359375, + 0.0013790130615234375, + -0.00902557373046875, + 0.026611328125, + -0.0012788772583007812, + -0.01558685302734375, + 0.016632080078125, + 0.003936767578125, + 0.0293121337890625, + -0.01438140869140625, + 0.0017385482788085938, + 0.0224456787109375, + -0.008514404296875, + -0.0203399658203125, + 0.0032062530517578125, + -0.04595947265625, + 0.0090484619140625, + -0.01204681396484375, + -0.0240020751953125, + 0.038238525390625, + -0.038787841796875, + 0.01271820068359375, + 0.028717041015625, + 0.0433349609375, + 0.016021728515625, + 0.00534820556640625, + 0.010406494140625, + 0.03387451171875, + -0.0287017822265625, + -0.00904083251953125, + 0.03302001953125, + -0.00537872314453125, + 0.011962890625, + 0.032257080078125, + 0.06024169921875, + -0.031982421875, + -0.01201629638671875, + -0.037445068359375, + -0.0018711090087890625, + 0.0027332305908203125, + -0.00970458984375, + 0.08746337890625, + 0.0130767822265625, + 0.01611328125, + 0.0178375244140625, + -0.022003173828125, + -0.01422882080078125, + 0.06256103515625, + 0.0164947509765625, + -0.0227508544921875, + -0.012725830078125, + 0.0251617431640625, + 0.008544921875, + -0.0384521484375, + -0.00905609130859375, + -0.0010223388671875, + -0.06982421875, + 0.0017538070678710938, + -0.01441192626953125, + -0.08013916015625, + 0.0166015625, + -0.042388916015625, + 0.0222930908203125, + 0.0268096923828125, + -0.0450439453125, + -0.035369873046875, + -0.0391845703125, + -0.01085662841796875, + 0.01806640625, + -0.0411376953125, + -0.0305328369140625, + -0.031768798828125, + -0.0012912750244140625, + 0.01517486572265625, + 0.0294189453125, + 0.005706787109375, + -0.0037937164306640625, + 0.0106658935546875, + -0.0272064208984375, + -0.00928497314453125, + 0.029083251953125, + 0.0156402587890625, + -0.0020389556884765625, + 0.0697021484375, + 0.00585174560546875, + -0.0091705322265625, + -0.01506805419921875, + 0.03631591796875, + -0.040985107421875, + 0.042938232421875, + -0.040283203125, + 0.06573486328125, + 0.002407073974609375, + 0.028717041015625, + 0.0245819091796875, + -0.057525634765625, + -0.0055999755859375, + 0.007778167724609375, + 0.03643798828125, + 0.018585205078125, + -0.061798095703125, + 0.002437591552734375, + -0.046844482421875, + -0.0082550048828125, + -0.01229095458984375, + -0.0108184814453125, + 0.03521728515625, + -0.0008831024169921875, + -0.01084136962890625, + -0.0027561187744140625, + -0.005126953125, + 0.0066375732421875, + -0.01361083984375, + -0.02117919921875, + 0.008453369140625, + 0.028564453125, + -0.007289886474609375, + -0.046142578125, + -0.0023365020751953125, + 0.025238037109375, + -0.0325927734375, + -0.022003173828125, + 0.0141448974609375, + -0.0093841552734375, + 0.01326751708984375, + -0.0030670166015625, + 0.0307769775390625, + 0.0775146484375, + 0.0198974609375, + -0.01197052001953125, + 0.002796173095703125, + 0.03515625, + -0.002010345458984375, + 0.039581298828125, + 0.0298614501953125, + -0.0272216796875, + -0.010833740234375, + -0.01055908203125, + 0.0247344970703125, + -0.0555419921875, + -0.01922607421875, + -0.01190948486328125, + -0.002513885498046875, + 0.04290771484375, + 0.01044464111328125, + 0.00492095947265625, + 0.002758026123046875, + -0.01323699951171875, + 0.038177490234375, + 0.00292205810546875, + -0.037322998046875, + -0.00037741661071777344, + -0.0034351348876953125, + -0.035125732421875, + -0.0206756591796875, + 0.05999755859375, + -0.0139007568359375, + -0.019866943359375, + 0.01248931884765625, + -0.01282501220703125, + 0.048492431640625, + 0.00817108154296875, + -0.015655517578125, + -0.022308349609375, + 0.026031494140625, + -0.006671905517578125, + -0.0119171142578125, + 0.0143585205078125, + -0.0225677490234375, + -0.0203704833984375, + -0.006916046142578125, + 0.02447509765625, + 0.0128631591796875, + -0.0207672119140625, + 0.036468505859375, + -0.00958251953125, + 0.047271728515625, + -0.0031452178955078125, + 0.019683837890625, + -0.0175628662109375, + 5.3048133850097656e-05, + 0.047515869140625, + -0.01016998291015625, + -0.0297393798828125, + -0.018341064453125, + 0.007312774658203125, + 0.0516357421875, + -0.0245513916015625, + -0.0121612548828125, + -0.006946563720703125, + 0.049224853515625, + 0.02685546875, + -0.0014095306396484375, + 0.037109375, + -0.006275177001953125, + 0.0287628173828125, + -0.003368377685546875, + -0.034027099609375, + 0.0078887939453125, + -0.0347900390625, + -0.027130126953125, + 0.005855560302734375, + -0.0233154296875, + -0.0015954971313476562, + 0.0117034912109375, + 0.018035888671875, + 0.0421142578125, + 0.04241943359375, + 0.0212554931640625, + 0.00811767578125, + -0.07958984375, + -0.0269927978515625, + 0.00501251220703125, + 0.0211944580078125, + -0.048126220703125, + -0.002498626708984375, + -0.002471923828125, + -0.0019292831420898438, + -0.00396728515625, + -0.0035305023193359375, + -0.058502197265625, + -0.00754547119140625, + -0.02154541015625, + -0.0117645263671875, + -0.0202178955078125, + -0.041748046875, + -0.0325927734375, + -0.0236053466796875, + 0.05755615234375, + -0.0111541748046875, + 0.051544189453125, + -0.029022216796875, + -0.0188446044921875, + -0.006622314453125, + 0.016754150390625, + -0.0266876220703125, + -0.01300811767578125, + 0.0390625, + 0.0469970703125, + 0.054107666015625, + 0.00982666015625, + 0.0006847381591796875, + -0.0811767578125, + 0.0140533447265625, + 0.0013284683227539062, + 0.04412841796875, + 0.054962158203125, + -0.0116119384765625, + -0.0428466796875, + -0.01258087158203125, + 0.01068878173828125, + -0.0009794235229492188, + 0.037994384765625, + -0.0228118896484375, + 0.026397705078125, + -0.0298919677734375, + -0.03759765625, + -0.06585693359375, + 0.020660400390625, + 0.0292816162109375, + -0.03173828125, + 0.027862548828125, + -0.0124664306640625, + -0.006839752197265625, + 0.0034847259521484375, + -0.02032470703125, + -0.035980224609375, + -0.040679931640625, + -0.006031036376953125, + -0.004608154296875, + 0.0223846435546875, + -0.024932861328125, + 0.022186279296875, + -0.0156707763671875, + 0.0149993896484375, + -0.03289794921875, + 0.00677490234375, + 0.017913818359375, + -0.0171356201171875, + -0.055694580078125, + -0.003299713134765625, + -0.004932403564453125, + -0.03271484375, + -0.0247344970703125, + -0.02764892578125, + -0.00472259521484375, + 0.00949859619140625, + 0.040008544921875, + 0.009735107421875, + 0.00943756103515625, + 0.004749298095703125, + 0.052734375, + -0.032135009765625, + -0.033538818359375, + -0.031829833984375, + 0.018585205078125, + 0.005695343017578125, + 0.0108184814453125, + 0.00696563720703125, + 0.04449462890625, + 0.003631591796875, + 0.00826263427734375, + 0.01110076904296875, + -0.0166168212890625, + -0.0300140380859375, + 0.06195068359375, + -0.007537841796875, + 0.00719451904296875, + 0.0312347412109375, + -0.047088623046875, + -0.01464080810546875, + -0.056060791015625, + -0.029937744140625, + 0.0110015869140625, + -0.06512451171875, + 0.08880615234375, + -0.02825927734375, + -0.034576416015625, + 0.004791259765625, + -0.026031494140625, + -0.0013055801391601562, + 0.04962158203125, + 0.039520263671875, + 0.00894927978515625, + -0.035247802734375, + -0.007488250732421875, + 0.031463623046875, + 0.018890380859375, + -0.0230255126953125, + 0.0516357421875, + -0.033966064453125, + -0.0269317626953125, + -0.03631591796875, + 0.0244598388671875, + 0.0014505386352539062, + 0.061981201171875, + 0.03314208984375, + -0.014739990234375, + -0.0172119140625, + 0.034332275390625, + -0.0171966552734375, + 0.00853729248046875, + 0.035797119140625, + 0.022186279296875, + -0.0193023681640625, + -0.0105743408203125, + -0.0230255126953125, + -0.0277099609375, + -0.0241851806640625, + 0.040008544921875, + -0.007671356201171875, + 0.03228759765625, + -0.05938720703125, + 0.002651214599609375, + -0.038055419921875, + 0.002376556396484375, + 0.0240325927734375, + 0.0105438232421875, + -0.1123046875, + -0.0245819091796875, + -0.0258331298828125, + -0.01380157470703125, + -0.052703857421875, + 0.0159759521484375, + -0.00909423828125, + -0.0234832763671875, + -0.033447265625, + -0.0511474609375, + -0.0297088623046875, + 0.07958984375, + 0.0384521484375, + 0.0126800537109375, + -0.03839111328125, + 0.0762939453125, + -0.0222015380859375, + 0.03790283203125, + 0.0138702392578125, + 0.03558349609375, + 0.005344390869140625, + -0.017059326171875, + 0.0263519287109375, + -0.02496337890625, + -0.00699615478515625, + 0.0131988525390625, + 0.01070404052734375, + -0.01959228515625, + -0.01383209228515625, + -0.020965576171875, + 0.0156707763671875, + -0.04071044921875, + -0.0107879638671875, + -0.0166168212890625, + 0.0202484130859375, + -0.048065185546875, + -0.0086517333984375, + 0.0150909423828125, + 0.0003261566162109375, + 0.060943603515625, + -0.047149658203125, + 0.01483154296875, + -0.036407470703125, + -0.0171356201171875, + 0.03369140625, + -0.020721435546875, + 0.0255584716796875, + -0.0335693359375, + -0.0197906494140625, + 0.016845703125, + 0.01451873779296875, + 0.0391845703125, + 0.05218505859375, + 0.0021724700927734375, + -0.0248565673828125, + 0.0188751220703125, + -0.048675537109375, + 0.032073974609375, + 0.02008056640625, + 0.004146575927734375, + 0.005039215087890625, + -0.037750244140625, + -0.00424957275390625, + -0.033416748046875, + -0.0153350830078125, + 0.0276641845703125, + 0.0321044921875, + 0.0257110595703125, + -0.00199127197265625, + -0.036285400390625, + 0.0028324127197265625, + 0.0413818359375, + 0.0438232421875, + 0.0032138824462890625, + 0.021636962890625, + 0.0328369140625, + 0.042449951171875, + -0.006397247314453125, + 0.03375244140625, + 0.037109375, + -0.026824951171875, + -0.0335693359375, + -0.00994873046875, + 0.00975799560546875, + 0.0157012939453125, + 0.0136260986328125, + -0.03814697265625, + 0.0124969482421875, + -0.0170745849609375, + -0.0284271240234375, + -0.0100555419921875, + -0.051666259765625, + -0.0303497314453125, + 0.032684326171875, + -0.07489013671875, + 0.061187744140625, + -0.0298309326171875, + -0.051025390625, + -0.020721435546875, + -0.063232421875, + -0.0162353515625, + 0.0367431640625, + -0.023101806640625, + -0.01488494873046875, + -0.0255279541015625, + 0.05816650390625, + -0.01385498046875, + 0.0328369140625, + 0.017242431640625, + -0.003936767578125, + 0.00574493408203125, + -0.03619384765625, + -0.0098114013671875, + -0.0178985595703125, + 0.0086212158203125, + 0.01160430908203125, + -0.00902557373046875, + 0.033905029296875, + 0.049285888671875, + -0.048248291015625, + -0.044342041015625, + 0.0222320556640625, + 0.005931854248046875, + -0.036865234375, + -0.00238800048828125, + 0.0249176025390625, + 0.0274810791015625, + 0.0257720947265625, + 0.04901123046875, + -0.030914306640625, + 0.03460693359375, + -0.0401611328125, + 0.00574493408203125, + 0.0178070068359375, + 0.0218658447265625, + 0.015869140625, + -0.058502197265625, + 0.015594482421875, + -0.0013551712036132812, + -0.0279998779296875, + -0.010955810546875, + -0.006572723388671875, + -0.01357269287109375, + -0.0259552001953125, + -0.0028839111328125, + 0.0157318115234375, + -0.0252532958984375, + 0.00972747802734375, + 0.0284271240234375, + -0.01203155517578125, + 0.035980224609375, + -0.011444091796875, + -0.0186309814453125, + 0.03375244140625, + -0.0006985664367675781, + 0.01461029052734375, + -0.0247802734375, + -0.01312255859375, + -0.020721435546875, + 0.0027713775634765625, + -0.0306549072265625, + -0.0002739429473876953, + -0.046356201171875, + -0.00380706787109375, + 0.006195068359375, + 0.0601806640625, + 0.0010137557983398438, + -0.00827789306640625, + -0.0014219284057617188, + -0.03387451171875, + 0.01177215576171875, + 0.006000518798828125, + -0.046722412109375, + -0.0304718017578125, + 0.019012451171875, + 0.01953125, + 0.015625, + 0.0275726318359375, + 0.0162811279296875, + 0.059478759765625, + 0.04998779296875, + 0.037872314453125, + 0.05914306640625, + -0.041259765625, + -0.01418304443359375, + -0.0312347412109375, + -0.0285797119140625, + 0.0653076171875, + -0.0192108154296875, + -0.00510406494140625, + -0.029998779296875, + 0.00730133056640625, + 0.00020587444305419922, + 0.023223876953125, + 0.01113128662109375, + 0.0046539306640625, + 0.00205230712890625, + 0.045166015625, + 0.051788330078125, + 0.056793212890625, + -0.0131378173828125, + 0.00952911376953125, + 0.0012445449829101562, + 0.0183868408203125, + -0.006866455078125, + 0.07220458984375, + 0.0103607177734375, + 0.004608154296875, + -0.02532958984375, + 0.01485443115234375, + 0.01204681396484375, + -0.0188140869140625, + -0.0477294921875, + 0.04107666015625, + -0.0024547576904296875, + 0.043853759765625, + -0.0255126953125, + -0.0135955810546875, + 0.0284423828125, + 0.058746337890625, + 0.065185546875, + -0.01273345947265625, + -0.035186767578125, + -0.00945281982421875, + 0.0019330978393554688, + 0.00919342041015625, + -0.0233001708984375, + 0.04473876953125, + -0.0011930465698242188, + 0.0098876953125, + 0.007564544677734375, + 0.04461669921875, + 0.00629425048828125, + 0.054046630859375, + -0.04705810546875, + -0.01486968994140625, + -0.03289794921875, + -0.036895751953125, + 0.045257568359375, + -0.0498046875, + 0.09100341796875, + -5.805492401123047e-05, + -0.01317596435546875, + -0.003002166748046875 + ], + [ + 0.005084991455078125, + -0.012176513671875, + -0.04193115234375, + 0.0298614501953125, + -0.0226287841796875, + -0.03289794921875, + 0.00403594970703125, + 0.0282745361328125, + 0.005527496337890625, + -0.0085296630859375, + -0.014862060546875, + -0.015472412109375, + -0.01995849609375, + 0.006793975830078125, + 0.018890380859375, + -0.0012598037719726562, + 0.0261993408203125, + -7.963180541992188e-05, + 0.01885986328125, + -0.0061492919921875, + -0.010345458984375, + -0.0208892822265625, + 0.006916046142578125, + 0.0279693603515625, + -0.0021190643310546875, + 0.01494598388671875, + -0.00984954833984375, + 0.0183563232421875, + 0.00812530517578125, + -0.01538848876953125, + -0.01111602783203125, + -0.050537109375, + 0.0650634765625, + 0.01361083984375, + -0.024322509765625, + -0.01413726806640625, + 0.01433563232421875, + 0.00485992431640625, + -0.04541015625, + 0.03533935546875, + 0.00879669189453125, + -0.00531005859375, + 0.01027679443359375, + -0.01273345947265625, + -0.0242919921875, + -0.03985595703125, + -0.0253448486328125, + -0.01239013671875, + -0.01128387451171875, + -0.037689208984375, + -0.001312255859375, + -0.02691650390625, + 0.012237548828125, + -0.0261077880859375, + -0.04571533203125, + 0.01485443115234375, + -0.038787841796875, + 0.0222625732421875, + -0.0367431640625, + -0.06939697265625, + -0.0077667236328125, + 0.0236663818359375, + -0.018524169921875, + -0.02508544921875, + 0.00525665283203125, + 0.05780029296875, + -0.021148681640625, + -0.0010242462158203125, + -0.012908935546875, + -0.053009033203125, + -0.0206756591796875, + 0.0169830322265625, + -0.062042236328125, + 0.01047515869140625, + -0.031280517578125, + 0.03192138671875, + -0.036102294921875, + 0.035858154296875, + -0.015869140625, + -0.0013628005981445312, + 0.0171661376953125, + -0.003437042236328125, + -0.038055419921875, + 0.05328369140625, + -0.06390380859375, + 0.04864501953125, + -0.035430908203125, + 0.0195770263671875, + 0.0606689453125, + -0.006649017333984375, + -0.0154571533203125, + -0.02911376953125, + -0.027130126953125, + -0.0318603515625, + -0.0133056640625, + 0.0278167724609375, + -0.05224609375, + -0.00756072998046875, + 0.03753662109375, + -0.0094451904296875, + 0.0340576171875, + 0.051910400390625, + 0.032684326171875, + 0.022247314453125, + 0.026123046875, + -0.0178680419921875, + 0.027740478515625, + 0.024627685546875, + -0.00986480712890625, + -0.0096588134765625, + 0.047027587890625, + 0.0145111083984375, + 0.0275115966796875, + -0.0186920166015625, + -0.0290985107421875, + 0.002193450927734375, + 0.0156402587890625, + 0.004413604736328125, + -0.0253753662109375, + -0.0030364990234375, + 0.007244110107421875, + -0.0011730194091796875, + 0.0389404296875, + -0.0019092559814453125, + 0.0265655517578125, + 0.00502777099609375, + -0.0152740478515625, + 0.0248870849609375, + 0.04632568359375, + 0.01467132568359375, + -0.0102081298828125, + -0.004901885986328125, + -0.0144500732421875, + 0.01294708251953125, + -0.00394439697265625, + -0.028472900390625, + -0.0005083084106445312, + 0.029510498046875, + -0.004505157470703125, + -0.026885986328125, + -0.0139923095703125, + -0.0048675537109375, + 0.0014133453369140625, + -0.08441162109375, + 0.044586181640625, + -0.047332763671875, + 0.01236724853515625, + -0.0183258056640625, + 0.0216827392578125, + 0.01532745361328125, + -0.0003657341003417969, + -0.0007429122924804688, + 0.061248779296875, + -0.0144805908203125, + 0.032867431640625, + 0.0021724700927734375, + -0.01361083984375, + 0.07012939453125, + -0.013916015625, + -0.0191192626953125, + 0.0018205642700195312, + -0.041839599609375, + -0.0479736328125, + 0.00180816650390625, + -0.0029048919677734375, + -0.05682373046875, + 0.01003265380859375, + 0.05938720703125, + -0.03790283203125, + -0.06219482421875, + -0.0025482177734375, + -0.0178680419921875, + -0.017669677734375, + 0.0235443115234375, + -0.00344085693359375, + 0.032196044921875, + 0.06915283203125, + -0.006458282470703125, + -0.016937255859375, + -0.036773681640625, + -0.0496826171875, + 0.0106964111328125, + 0.0171966552734375, + 0.002735137939453125, + -0.0280303955078125, + 0.030853271484375, + -0.00605010986328125, + 0.00445556640625, + 0.0204010009765625, + 0.00298309326171875, + 0.01531982421875, + -0.006031036376953125, + 0.052520751953125, + -0.042236328125, + 0.051666259765625, + -0.040771484375, + -0.0174407958984375, + 0.0012416839599609375, + -0.00689697265625, + -0.03997802734375, + -0.05364990234375, + -0.0013265609741210938, + -0.0220184326171875, + -0.044189453125, + -0.01202392578125, + -0.0103607177734375, + 0.00785064697265625, + 0.019012451171875, + 0.01404571533203125, + -0.033203125, + 0.00572967529296875, + 0.049957275390625, + 0.0225982666015625, + 0.00927734375, + -0.0288848876953125, + 0.0186614990234375, + 0.03924560546875, + 0.03985595703125, + 0.038543701171875, + 0.0166473388671875, + 0.00980377197265625, + -0.01195526123046875, + -0.0008769035339355469, + -0.016357421875, + 0.0272064208984375, + 0.060791015625, + 0.008819580078125, + 0.024383544921875, + -0.0018148422241210938, + 0.0081329345703125, + -0.037933349609375, + 0.02056884765625, + 0.017242431640625, + 0.00452423095703125, + -0.0180816650390625, + -0.017059326171875, + -0.0399169921875, + 0.0108489990234375, + -0.00510406494140625, + 0.026885986328125, + 0.017974853515625, + -0.0155181884765625, + 0.006359100341796875, + 0.0223846435546875, + -0.004497528076171875, + 0.02508544921875, + 0.020294189453125, + 0.019775390625, + -0.01119232177734375, + 0.003574371337890625, + 0.031646728515625, + -0.06903076171875, + 0.00977325439453125, + 0.00021207332611083984, + 0.01922607421875, + -0.0182647705078125, + 0.0163116455078125, + -0.0269927978515625, + -0.041748046875, + 0.015289306640625, + -0.002285003662109375, + -0.01432037353515625, + 0.006725311279296875, + 0.0201873779296875, + 0.004119873046875, + 0.0277557373046875, + 0.0101318359375, + 0.0323486328125, + 0.07464599609375, + 0.0198822021484375, + -0.0158843994140625, + -0.0019474029541015625, + 0.00321197509765625, + -0.040771484375, + -0.0270538330078125, + 0.0078887939453125, + -0.063232421875, + -0.0146331787109375, + -0.01409912109375, + 0.0189056396484375, + 0.005802154541015625, + -0.0230255126953125, + 0.024749755859375, + 0.0224609375, + 0.021484375, + -0.050750732421875, + -0.00927734375, + 0.0291290283203125, + -0.08074951171875, + -0.004604339599609375, + -0.050384521484375, + 0.0016345977783203125, + 0.039276123046875, + 0.038848876953125, + 0.00533294677734375, + -0.0273284912109375, + 0.0104217529296875, + -0.1663818359375, + -0.0210113525390625, + -0.03851318359375, + -0.0017080307006835938, + 0.0005888938903808594, + -0.030853271484375, + 0.001800537109375, + -0.00957489013671875, + -0.037109375, + -0.0033702850341796875, + -0.0975341796875, + -0.036895751953125, + -0.042755126953125, + 0.033111572265625, + 0.0091400146484375, + 0.0229339599609375, + -0.034881591796875, + 0.01092529296875, + -0.0330810546875, + -0.035858154296875, + 0.0017824172973632812, + 0.007732391357421875, + 0.0330810546875, + -0.01485443115234375, + 0.01296234130859375, + 0.0384521484375, + -0.0167083740234375, + -0.0164031982421875, + -0.040313720703125, + 0.00921630859375, + 0.01666259765625, + -0.05169677734375, + -0.01033782958984375, + -0.0135955810546875, + 0.06085205078125, + -0.002437591552734375, + -0.0016202926635742188, + -0.00783538818359375, + 0.01226806640625, + 0.0273284912109375, + 0.004039764404296875, + 0.054534912109375, + 0.002132415771484375, + -0.00423431396484375, + -0.00905609130859375, + -0.0184326171875, + -0.0253448486328125, + 0.015655517578125, + -0.0384521484375, + -0.0228271484375, + -0.004642486572265625, + 0.00801849365234375, + 0.019500732421875, + -0.0157318115234375, + -0.0374755859375, + -0.0008578300476074219, + 0.01175689697265625, + 0.00572967529296875, + 0.0167694091796875, + -0.04901123046875, + 0.0570068359375, + -0.032958984375, + 0.0501708984375, + -0.03253173828125, + 0.0194854736328125, + 0.01206207275390625, + -0.01280975341796875, + 0.02813720703125, + 0.01226806640625, + -0.00708770751953125, + 0.0240631103515625, + 0.057403564453125, + -0.004741668701171875, + 0.018463134765625, + 0.039398193359375, + 0.033905029296875, + -0.018310546875, + -0.003017425537109375, + -0.0186309814453125, + -0.0548095703125, + 0.00696563720703125, + -0.007720947265625, + -0.00502777099609375, + 0.02142333984375, + -0.05255126953125, + -0.033111572265625, + 0.00661468505859375, + 0.00676727294921875, + 0.07147216796875, + 0.2418212890625, + -0.003025054931640625, + 0.049346923828125, + -0.07843017578125, + -0.00899505615234375, + -0.04571533203125, + -0.0026454925537109375, + 0.042816162109375, + 0.0117034912109375, + -0.0131683349609375, + -0.0034542083740234375, + -0.060150146484375, + 0.00431060791015625, + 0.0177459716796875, + 0.01107025146484375, + 0.045806884765625, + -0.033355712890625, + 0.0202178955078125, + 0.06988525390625, + 0.005096435546875, + 0.01084136962890625, + -0.0240020751953125, + -0.00879669189453125, + -0.03375244140625, + -0.0222320556640625, + 0.005443572998046875, + -0.026336669921875, + -0.004299163818359375, + -0.01477813720703125, + -0.0005650520324707031, + -0.03460693359375, + -0.019622802734375, + 0.01432037353515625, + 0.0845947265625, + -0.044342041015625, + 0.002605438232421875, + -0.03265380859375, + 0.032806396484375, + -0.0084075927734375, + 0.036712646484375, + 0.0005474090576171875, + -0.04376220703125, + -0.0291748046875, + 0.041900634765625, + 0.0131378173828125, + -0.00738525390625, + 0.01555633544921875, + -0.027130126953125, + -0.0233917236328125, + -0.03497314453125, + -0.039154052734375, + -0.01206207275390625, + -0.0218505859375, + 0.01073455810546875, + 0.0264892578125, + 0.031890869140625, + 0.00036978721618652344, + -0.0190277099609375, + 0.035247802734375, + 0.01107025146484375, + -0.00753021240234375, + -0.01311492919921875, + 0.0083770751953125, + -0.0562744140625, + 0.0030841827392578125, + -0.0015859603881835938, + -0.020294189453125, + -0.00010395050048828125, + -0.028289794921875, + 0.0174560546875, + 0.000164031982421875, + -0.052276611328125, + 0.0186309814453125, + 0.0181732177734375, + 0.05206298828125, + 0.0008053779602050781, + 0.031768798828125, + 0.00858306884765625, + 0.0196380615234375, + 0.0104217529296875, + 0.0244293212890625, + -0.01425933837890625, + 0.0009565353393554688, + 0.0538330078125, + -0.003002166748046875, + 0.0204620361328125, + 0.033447265625, + 0.0248565673828125, + 0.0233306884765625, + -0.032958984375, + 0.025665283203125, + 0.01557159423828125, + -0.031768798828125, + 0.005924224853515625, + -0.0169525146484375, + -0.046295166015625, + -0.0021839141845703125, + 0.00847625732421875, + -0.049041748046875, + -0.0247802734375, + 0.017791748046875, + -0.029571533203125, + -0.040985107421875, + 0.00922393798828125, + 0.01076507568359375, + -0.045654296875, + 0.01465606689453125, + 0.050079345703125, + 0.0214080810546875, + -0.0018768310546875, + -0.01226043701171875, + 0.00786590576171875, + -0.006900787353515625, + 0.037841796875, + 0.010955810546875, + 0.025054931640625, + 0.01424407958984375, + 0.0098114013671875, + 0.0213165283203125, + 0.05230712890625, + -0.00189971923828125, + -0.042205810546875, + -0.007137298583984375, + -0.0210723876953125, + -0.0240631103515625, + 0.01922607421875, + -0.006786346435546875, + 0.05291748046875, + -0.0379638671875, + 0.038330078125, + 0.05419921875, + -0.0182342529296875, + -0.016021728515625, + -0.0325927734375, + 0.0255279541015625, + -0.007354736328125, + 0.0443115234375, + -0.0226287841796875, + 0.01235198974609375, + 0.024627685546875, + -0.01267242431640625, + 0.0186920166015625, + -0.01708984375, + 0.00782012939453125, + -0.0223388671875, + 0.0226898193359375, + -0.0413818359375, + 0.019287109375, + -0.0110321044921875, + 0.0004191398620605469, + -0.02606201171875, + -0.0312347412109375, + 0.0237579345703125, + -0.025970458984375, + -0.036834716796875, + 0.07568359375, + -0.0251312255859375, + -0.0181732177734375, + -0.01128387451171875, + 0.0230255126953125, + 0.01507568359375, + 0.035888671875, + 0.0281219482421875, + 0.09228515625, + 0.0005617141723632812, + 0.0175933837890625, + -0.022857666015625, + 0.020843505859375, + -0.0030956268310546875, + 0.021759033203125, + 0.004451751708984375, + 0.003154754638671875, + -0.00737762451171875, + -0.01300048828125, + -0.007328033447265625, + 0.0105438232421875, + -0.03680419921875, + 0.016265869140625, + 0.004055023193359375, + 0.045257568359375, + 0.036468505859375, + 0.005443572998046875, + 0.0187225341796875, + 0.019317626953125, + 0.064453125, + -0.0206756591796875, + -0.044830322265625, + -0.0360107421875, + 0.0151519775390625, + -0.0021038055419921875, + -0.035888671875, + 0.07452392578125, + -0.0215606689453125, + -0.046478271484375, + 0.004772186279296875, + -0.031768798828125, + 0.0540771484375, + -0.031280517578125, + 0.02490234375, + -0.019561767578125, + -0.034149169921875, + -0.033660888671875, + -0.017852783203125, + 0.005649566650390625, + -0.016876220703125, + -0.01708984375, + 0.0088958740234375, + -0.0007853507995605469, + 0.0165252685546875, + -0.0255126953125, + -0.0006270408630371094, + -0.046600341796875, + -0.006744384765625, + 0.029388427734375, + -0.03204345703125, + 0.04351806640625, + 0.037689208984375, + 0.00673675537109375, + -0.02264404296875, + 0.00930023193359375, + 0.000644683837890625, + 0.0016756057739257812, + 0.0535888671875, + -0.05963134765625, + 0.01035308837890625, + 0.04754638671875, + 0.050994873046875, + 0.010040283203125, + -0.0142059326171875, + -0.0271453857421875, + -0.01528167724609375, + -0.011016845703125, + 0.0149688720703125, + 0.0141754150390625, + -0.0180816650390625, + 0.0232391357421875, + 0.006168365478515625, + -0.0281829833984375, + 0.001277923583984375, + -0.050750732421875, + 0.0135498046875, + -0.02294921875, + 0.01363372802734375, + 0.0950927734375, + 0.0150604248046875, + 0.08746337890625, + 0.042938232421875, + -0.05657958984375, + 0.017120361328125, + 0.024932861328125, + -0.05169677734375, + -0.0261383056640625, + -0.036590576171875, + -0.00600433349609375, + 0.0284423828125, + -0.064697265625, + -0.0323486328125, + 0.0256500244140625, + -0.041351318359375, + 0.0266571044921875, + 0.02056884765625, + 0.045135498046875, + 0.0076904296875, + -0.01222991943359375, + 0.035675048828125, + 0.00824737548828125, + 0.006526947021484375, + -0.0277252197265625, + -0.0202484130859375, + -0.055572509765625, + 0.0017080307006835938, + -0.041656494140625, + -0.047882080078125, + -0.023223876953125, + 0.01535797119140625, + 0.022369384765625, + 0.0016994476318359375, + 0.0261383056640625, + -0.045440673828125, + -0.0270233154296875, + -0.0211029052734375, + 0.0628662109375, + -0.003017425537109375, + 0.020263671875, + -0.02569580078125, + 0.009246826171875, + 0.0036487579345703125, + 0.0156707763671875, + 0.0236053466796875, + -0.01068878173828125, + 0.030548095703125, + -0.06964111328125, + -0.05078125, + -0.00753021240234375, + -0.012908935546875, + 0.0303955078125, + -0.002567291259765625, + 0.044769287109375, + -0.031829833984375, + -0.035430908203125, + 0.00212860107421875, + -0.01416778564453125, + -0.03509521484375, + -0.04779052734375, + 0.0250396728515625, + -0.00885772705078125, + 0.0176544189453125, + -0.006069183349609375, + 0.0180511474609375, + -0.00556182861328125, + -0.01508331298828125, + 0.00795745849609375, + 0.02099609375, + 0.05535888671875, + 0.003391265869140625, + -0.0275115966796875, + 0.0217742919921875, + 0.003932952880859375, + 0.00017273426055908203, + -0.01355743408203125, + 0.03192138671875, + 0.004741668701171875, + 0.00487518310546875, + 0.00197601318359375, + 0.0384521484375, + 0.031890869140625, + -0.056884765625, + -0.00418853759765625, + -0.0017156600952148438, + -0.00814056396484375, + 0.01432037353515625, + 0.0144805908203125, + 0.037811279296875, + -0.0170440673828125, + -0.01788330078125, + -0.007595062255859375, + 0.053985595703125, + -0.047882080078125, + -0.037628173828125, + -0.01198577880859375, + 0.01226806640625, + 0.028411865234375, + 0.0225982666015625, + -0.031463623046875, + 0.055206298828125, + -0.03656005859375, + -0.007633209228515625, + 0.0012454986572265625, + -0.01763916015625, + 0.06915283203125, + 0.0178375244140625, + 0.07421875, + -0.02734375, + -0.0228424072265625, + 0.01517486572265625, + -0.03070068359375, + -0.0340576171875, + -0.047576904296875, + 0.03741455078125, + 0.0298614501953125, + -0.04595947265625, + 0.0253448486328125, + 0.041351318359375, + 0.0200958251953125, + 0.037017822265625, + 0.0154266357421875, + -0.03857421875, + -0.01690673828125, + 0.0362548828125, + 0.00957489013671875, + -0.0066986083984375, + 0.0830078125, + 0.0164794921875, + 0.01024627685546875, + -0.00803375244140625, + 0.0171966552734375, + 0.01418304443359375, + -0.00862884521484375, + 0.05316162109375, + 0.0245819091796875, + -0.00220489501953125, + -0.0064544677734375, + -0.0194549560546875, + -0.06854248046875, + -0.023895263671875, + -0.01187896728515625, + -0.0171356201171875, + 0.05303955078125, + -0.05029296875, + 0.0153656005859375, + -0.0218353271484375, + -0.0051727294921875, + -0.05181884765625, + 0.01678466796875, + -0.125244140625, + 0.08099365234375, + -0.0198516845703125, + 0.021270751953125, + -0.041778564453125, + 0.0231781005859375, + -0.007244110107421875, + -0.0193023681640625, + -0.041107177734375, + -0.034576416015625, + -0.049530029296875, + 0.046142578125, + 0.01548004150390625, + -0.0242462158203125, + 0.0005745887756347656, + 0.0626220703125, + -0.0606689453125, + 0.038543701171875, + 0.03143310546875, + 0.00823974609375, + 0.0256805419921875, + -0.01520538330078125, + 0.03155517578125, + -0.00536346435546875, + 0.0141448974609375, + -0.0423583984375, + -0.0291595458984375, + 0.0144500732421875, + -0.005374908447265625, + -0.04925537109375, + -0.002849578857421875, + -0.0198516845703125, + 0.006374359130859375, + 0.0104827880859375, + -0.01904296875, + -0.035614013671875, + 0.01500701904296875, + -0.025909423828125, + -0.01763916015625, + 0.0484619140625, + -0.0285797119140625, + 0.01168060302734375, + -0.03790283203125, + -0.012115478515625, + -0.0145416259765625, + 0.00725555419921875, + -0.0159912109375, + 0.007232666015625, + -0.0712890625, + -0.0322265625, + 0.00616455078125, + -0.002796173095703125, + 0.0161895751953125, + 0.0372314453125, + -0.0013990402221679688, + 0.021728515625, + -0.011077880859375, + 0.00241851806640625, + -0.0399169921875, + 0.0615234375, + -0.03350830078125, + -0.012451171875, + -0.01432037353515625, + 0.007740020751953125, + -0.00771331787109375, + 0.0159149169921875, + -0.0016756057739257812, + 0.022613525390625, + 0.0384521484375, + -0.0145111083984375, + -0.048553466796875, + 0.0308074951171875, + 0.0133819580078125, + 0.016143798828125, + 0.010345458984375, + 0.007770538330078125, + 0.0694580078125, + 0.01192474365234375, + -0.0117645263671875, + 0.0034847259521484375, + -0.0191192626953125, + -0.038482666015625, + -0.0064544677734375, + -0.00414276123046875, + 0.006938934326171875, + -0.024993896484375, + -0.002895355224609375, + -0.004596710205078125, + -0.01116943359375, + -0.033935546875, + -0.02008056640625, + -0.065185546875, + 0.021759033203125, + 0.0039215087890625, + -0.033447265625, + 0.017181396484375, + 0.0026569366455078125, + -0.015045166015625, + -0.00765228271484375, + -0.061859130859375, + 0.006137847900390625, + 0.0013704299926757812, + -0.00238800048828125, + -0.01287841796875, + -0.0428466796875, + 0.050933837890625, + -0.085693359375, + -0.01519012451171875, + -0.0017423629760742188, + -0.062744140625, + -0.03167724609375, + -0.01947021484375, + -0.00160980224609375, + 0.0016994476318359375, + 0.00791168212890625, + 0.005115509033203125, + 0.051544189453125, + 0.06976318359375, + 0.08038330078125, + -0.03533935546875, + -0.01381683349609375, + -0.01421356201171875, + 0.05206298828125, + -0.040740966796875, + 0.0089111328125, + 0.0390625, + 0.03729248046875, + 0.007080078125, + 0.05291748046875, + -0.019317626953125, + 0.0027408599853515625, + -0.01047515869140625, + 0.031707763671875, + -0.038787841796875, + 0.01629638671875, + -0.0296173095703125, + -0.0006051063537597656, + 0.0230560302734375, + 0.0206298828125, + -0.049072265625, + 0.00997161865234375, + -0.00965118408203125, + -0.006870269775390625, + -0.025299072265625, + -0.0269775390625, + 0.0028858184814453125, + 0.0081634521484375, + 0.00238037109375, + 0.01488494873046875, + -0.00452423095703125, + 0.02252197265625, + -0.032684326171875, + 0.0225982666015625, + 0.0218505859375, + -0.0221710205078125, + 0.01203155517578125, + -0.035125732421875, + -0.0132598876953125, + 0.0241546630859375, + 0.0027790069580078125, + 0.024749755859375, + -0.01727294921875, + -0.047698974609375, + -0.03472900390625, + 0.01451873779296875, + -0.0161285400390625, + 0.001361846923828125, + -0.0185546875, + -0.01230621337890625, + -0.0291290283203125, + -0.039581298828125, + 0.050262451171875, + -0.0430908203125, + -0.01119232177734375, + 0.0295867919921875, + -0.00826263427734375, + -0.004634857177734375, + 0.038360595703125, + -0.0328369140625, + 0.031890869140625, + 0.039703369140625, + 0.046173095703125, + -0.0011091232299804688, + 0.049774169921875, + -0.0110931396484375, + -0.03253173828125, + -0.024322509765625, + 0.0203094482421875, + 0.0462646484375, + -0.0306549072265625, + -0.01508331298828125, + -0.04034423828125, + -0.0758056640625, + 0.017791748046875, + 0.0017633438110351562, + -0.033111572265625, + -0.00859832763671875, + 0.0176239013671875, + -0.0014677047729492188, + 0.03668212890625, + -0.0205535888671875, + -0.02996826171875, + 0.01184844970703125, + 0.01387786865234375, + -0.048095703125, + -0.0219268798828125, + 0.064453125, + -0.02325439453125, + 0.0004775524139404297, + -0.0244598388671875, + -0.05743408203125, + 0.01971435546875, + 0.014312744140625, + 0.04315185546875, + 0.00988006591796875, + -0.001979827880859375, + 0.007221221923828125, + -0.005733489990234375, + -0.00403594970703125, + 0.0452880859375, + -0.013519287109375, + 0.039154052734375, + -0.024749755859375, + -0.00970458984375, + -0.00856781005859375, + 0.0180816650390625, + -0.016326904296875, + 0.0012416839599609375, + -0.0018472671508789062, + -0.01082611083984375, + -0.003635406494140625, + -0.005947113037109375, + 0.01513671875, + 0.008514404296875, + -0.061981201171875, + -0.033111572265625, + 0.006244659423828125, + 0.0107269287109375, + 0.0204010009765625, + 0.007083892822265625, + 0.035247802734375, + -0.01291656494140625, + -0.00011628866195678711, + 0.0029888153076171875 + ] + ], + "sparse": [ + { + "615": 0.2056884765625, + "197465": 0.35546875, + "68718": 0.35888671875, + "12": 0.167236328125, + "135016": 0.2303466796875, + "3674": 0.17822265625, + "23": 0.1998291015625, + "7270": 0.293701171875, + "4": 0.142333984375, + "9942": 0.229736328125, + "442": 0.267578125, + "83": 0.1451416015625, + "1632": 0.1983642578125, + "111": 0.1793212890625, + "70": 0.09564208984375, + "2684": 0.213623046875, + "170277": 0.271484375, + "3551": 0.2265625, + "88832": 0.283935546875, + "8999": 0.2340087890625, + "82775": 0.28564453125, + "390": 0.171142578125, + "63691": 0.2213134765625, + "13": 0.16259765625, + "136": 0.1343994140625, + "88303": 0.265380859375, + "145810": 0.311279296875, + "5": 0.182373046875 + }, + { + "787": 0.2186279296875, + "581": 0.1837158203125, + "32774": 0.22900390625, + "23706": 0.31396484375, + "12": 0.16650390625, + "135016": 0.1900634765625, + "3674": 0.1580810546875, + "23": 0.17333984375, + "9098": 0.2216796875, + "4": 0.077392578125, + "442": 0.1873779296875, + "83": 0.130615234375, + "1632": 0.148193359375, + "111": 0.162841796875, + "70": 0.1168212890625, + "132556": 0.2044677734375, + "76648": 0.282958984375, + "7": 0.2132568359375, + "6661": 0.183349609375, + "88303": 0.2315673828125, + "1295": 0.12939453125, + "2396": 0.156494140625, + "73": 0.1552734375, + "73327": 0.1954345703125, + "8946": 0.128662109375, + "47": 0.1343994140625, + "276": 0.1324462890625, + "214": 0.201171875, + "678": 0.10546875, + "10": 0.131103515625, + "3622": 0.1644287109375, + "140909": 0.25146484375, + "645": 0.125, + "116": 0.12066650390625, + "28568": 0.197998046875, + "39063": 0.27734375, + "5": 0.1439208984375 + }, + { + "1031": 0.2137451171875, + "12801": 0.1881103515625, + "193266": 0.28369140625, + "9907": 0.2178955078125, + "5227": 0.2724609375, + "12": 0.1268310546875, + "135016": 0.190673828125, + "3674": 0.126708984375, + "23": 0.154541015625, + "157487": 0.2178955078125, + "4": 0.10858154296875, + "4602": 0.18017578125, + "442": 0.11737060546875, + "83": 0.104248046875, + "170277": 0.2283935546875, + "100": 0.13720703125, + "6863": 0.122314453125, + "53894": 0.18310546875, + "831": 0.1912841796875, + "9480": 0.2423095703125, + "7": 0.12371826171875, + "136": 0.10711669921875, + "118208": 0.121337890625, + "2517": 0.055267333984375, + "28302": 0.158203125, + "1294": 0.11376953125, + "3129": 0.075439453125, + "621": 0.08416748046875, + "59226": 0.19677734375, + "390": 0.0963134765625, + "70": 0.0753173828125, + "156256": 0.2437744140625, + "32547": 0.192626953125, + "5": 0.091064453125 + }, + { + "1398": 0.2225341796875, + "581": 0.1669921875, + "37822": 0.1845703125, + "2619": 0.25927734375, + "316": 0.24072265625, + "12": 0.133056640625, + "135016": 0.19873046875, + "3674": 0.11627197265625, + "23": 0.1612548828125, + "51651": 0.2261962890625, + "4": 0.10894775390625, + "98848": 0.2032470703125, + "88303": 0.20947265625, + "17721": 0.129150390625, + "224770": 0.214599609375, + "19831": 0.1697998046875, + "442": 0.11456298828125, + "509": 0.11871337890625, + "70": 0.112548828125, + "142105": 0.2171630859375, + "115339": 0.2255859375, + "67675": 0.2978515625, + "142": 0.08111572265625, + "45964": 0.1751708984375, + "12610": 0.233154296875, + "145359": 0.159912109375, + "5": 0.06793212890625 + }, + { + "1892": 0.265625, + "44061": 0.33740234375, + "94477": 0.35888671875, + "12": 0.16259765625, + "135016": 0.239501953125, + "3674": 0.1719970703125, + "23": 0.1845703125, + "97135": 0.283203125, + "4": 0.12335205078125, + "5596": 0.21240234375, + "442": 0.2059326171875, + "509": 0.14208984375, + "140528": 0.27197265625, + "390": 0.1624755859375, + "100403": 0.1678466796875, + "4200": 0.2183837890625, + "31678": 0.1417236328125, + "56": 0.13134765625, + "748": 0.1546630859375, + "14318": 0.2327880859375, + "165920": 0.29345703125, + "611": 0.208740234375, + "14226": 0.273681640625, + "47": 0.12310791015625, + "159202": 0.1981201171875, + "67": 0.1441650390625, + "1919": 0.0753173828125, + "58386": 0.26171875, + "136": 0.057373046875, + "83": 0.1146240234375, + "1632": 0.1787109375, + "111": 0.138671875, + "70": 0.0989990234375, + "2356": 0.1944580078125, + "132556": 0.2166748046875, + "76648": 0.296630859375, + "7": 0.0347900390625, + "6661": 0.1689453125, + "5": 0.142333984375 + }, + { + "2289": 0.2119140625, + "87547": 0.257080078125, + "16556": 0.275634765625, + "13038": 0.2147216796875, + "12": 0.11553955078125, + "135016": 0.168212890625, + "3674": 0.11309814453125, + "23": 0.12469482421875, + "1950": 0.1815185546875, + "38648": 0.24853515625, + "4": 0.102783203125, + "28173": 0.2047119140625, + "442": 0.09637451171875, + "83": 0.0723876953125, + "1632": 0.1046142578125, + "111": 0.10748291015625, + "70": 0.057525634765625, + "2684": 0.12054443359375, + "47989": 0.166015625, + "1771": 0.11419677734375, + "33976": 0.2442626953125, + "7": 0.0794677734375, + "387": 0.1904296875, + "927": 0.09954833984375, + "142642": 0.1722412109375, + "10670": 0.09112548828125, + "157272": 0.1463623046875, + "100": 0.064453125, + "6863": 0.0537109375, + "36998": 0.1866455078125, + "57": 0.1468505859375, + "379": 0.130126953125, + "837": 0.202392578125, + "257": 0.12841796875, + "4331": 0.252685546875, + "5": 0.055419921875 + }, + { + "2861": 0.2174072265625, + "339": 0.1470947265625, + "60880": 0.345703125, + "25946": 0.291748046875, + "12": 0.1300048828125, + "135016": 0.203125, + "3674": 0.12054443359375, + "23": 0.1600341796875, + "7270": 0.248046875, + "4": 0.09686279296875, + "9942": 0.1883544921875, + "442": 0.141357421875, + "83": 0.109375, + "1632": 0.14208984375, + "111": 0.127685546875, + "70": 0.06488037109375, + "142105": 0.2369384765625, + "59052": 0.32373046875, + "7": 0.1646728515625, + "8999": 0.1988525390625, + "678": 0.09088134765625, + "10": 0.048858642578125, + "98870": 0.1771240234375, + "42486": 0.2213134765625, + "26719": 0.087158203125, + "89655": 0.19873046875, + "48": 0.1273193359375, + "133953": 0.250732421875, + "25": 0.06756591796875, + "60331": 0.2181396484375, + "32768": 0.27001953125, + "136": 0.10430908203125, + "200955": 0.1859130859375, + "133484": 0.2396240234375, + "8": 0.2076416015625, + "82529": 0.2322998046875, + "5": 0.10174560546875 + }, + { + "3217": 0.2454833984375, + "1520": 0.1807861328125, + "11": 0.134765625, + "17117": 0.279541015625, + "69944": 0.2900390625, + "12": 0.125, + "105866": 0.20166015625, + "99": 0.15234375, + "70": 0.12744140625, + "132988": 0.2447509765625, + "111": 0.0704345703125, + "14098": 0.136474609375, + "46684": 0.1651611328125, + "136": 0.134521484375, + "25730": 0.2083740234375, + "4": 0.067138671875, + "58055": 0.178955078125, + "214": 0.0880126953125, + "17262": 0.205810546875, + "5201": 0.1763916015625, + "7401": 0.195068359375, + "49269": 0.28759765625, + "6863": 0.1336669921875, + "6": 0.1209716796875, + "42706": 0.1614990234375, + "25667": 0.109130859375, + "28302": 0.1600341796875, + "1294": 0.1134033203125, + "110281": 0.2261962890625, + "7": 0.10516357421875, + "43077": 0.2142333984375, + "135474": 0.2225341796875, + "11907": 0.151611328125, + "6602": 0.187255859375, + "5": 0.09710693359375 + }, + { + "3569": 0.24267578125, + "2907": 0.181640625, + "5": 0.150634765625, + "163614": 0.3447265625, + "234120": 0.3203125, + "12": 0.11810302734375, + "105866": 0.201416015625, + "23": 0.1649169921875, + "64925": 0.294921875, + "4": 0.09722900390625, + "4810": 0.234619140625, + "7311": 0.1619873046875, + "538": 0.06256103515625, + "88303": 0.194091796875, + "6": 0.04107666015625, + "179973": 0.258056640625, + "62": 0.10198974609375, + "397": 0.09478759765625, + "442": 0.0909423828125, + "11814": 0.1343994140625, + "47": 0.06884765625, + "186": 0.09014892578125, + "142": 0.0528564453125, + "12426": 0.1256103515625, + "7352": 0.1365966796875, + "17574": 0.174560546875, + "7515": 0.1483154296875, + "5252": 0.2056884765625, + "7263": 0.2017822265625, + "136": 0.1280517578125, + "7304": 0.138916015625, + "944": 0.1407470703125, + "5036": 0.10101318359375, + "83": 0.09918212890625, + "10": 0.0667724609375, + "59052": 0.2264404296875 + }, + { + "4068": 0.2666015625, + "60154": 0.20849609375, + "34": 0.24169921875, + "27860": 0.253173828125, + "4776": 0.292236328125, + "12": 0.1519775390625, + "142": 0.129638671875, + "45964": 0.1878662109375, + "8942": 0.20263671875, + "11": 0.15966796875, + "1764": 0.21875, + "105866": 0.17724609375, + "98": 0.0928955078125, + "70": 0.07806396484375, + "37385": 0.1610107421875, + "916": 0.1446533203125, + "111": 0.1173095703125, + "3493": 0.1832275390625, + "90": 0.1436767578125, + "71175": 0.202392578125, + "7": 0.06231689453125, + "23": 0.1441650390625, + "32969": 0.2325439453125, + "4": 0.0182342529296875, + "1632": 0.135986328125, + "2356": 0.164794921875, + "132556": 0.19189453125, + "76648": 0.266845703125, + "6661": 0.1602783203125, + "678": 0.0823974609375, + "144": 0.2137451171875, + "35810": 0.246337890625, + "645": 0.1348876953125, + "149678": 0.2274169921875, + "11903": 0.21533203125, + "5": 0.08062744140625 + } + ] +} \ No newline at end of file diff --git a/components/indexer/es8/examples/indexer/add_documents.go b/components/indexer/es8/examples/indexer/add_documents.go new file mode 100644 index 00000000..c6523b1b --- /dev/null +++ b/components/indexer/es8/examples/indexer/add_documents.go @@ -0,0 +1,167 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "strconv" + "strings" + + "github.com/cloudwego/eino/components/embedding" + "github.com/cloudwego/eino/schema" + "github.com/elastic/go-elasticsearch/v8" + + "github.com/cloudwego/eino-ext/components/indexer/es8" +) + +const ( + indexName = "eino_example" + fieldContent = "content" + fieldContentVector = "content_vector" + fieldExtraLocation = "location" + docExtraLocation = "location" +) + +func main() { + ctx := context.Background() + + // es supports multiple ways to connect + username := os.Getenv("ES_USERNAME") + password := os.Getenv("ES_PASSWORD") + httpCACertPath := os.Getenv("ES_HTTP_CA_CERT_PATH") + + cert, err := os.ReadFile(httpCACertPath) + if err != nil { + panic(err) + } + + client, err := elasticsearch.NewClient(elasticsearch.Config{ + Addresses: []string{"https://localhost:9200"}, + Username: username, + Password: password, + CACert: cert, + }) + if err != nil { + panic(err) + } + + // create index if needed. + // comment out the code if index has been created. + if err = createIndex(ctx, client); err != nil { + panic(err) + } + + // load embeddings from local + emb, err := prepareEmbeddings() + if err != nil { + panic(err) + } + + // load docs + docs := prepareDocs() + + // create es indexer component + indexer, err := es8.NewIndexer(ctx, &es8.IndexerConfig{ + Client: client, + Index: indexName, + BatchSize: 10, + DocumentToFields: func(ctx context.Context, doc *schema.Document) (field2Value map[string]es8.FieldValue, err error) { + return map[string]es8.FieldValue{ + fieldContent: { + Value: doc.Content, + EmbedKey: fieldContentVector, // vectorize doc content and save vector to field "content_vector" + }, + fieldExtraLocation: { + Value: doc.MetaData[docExtraLocation], + }, + }, nil + }, + Embedding: &mockEmbedding{emb.Dense}, // replace it with real embedding component + }) + if err != nil { + panic(err) + } + + ids, err := indexer.Store(ctx, docs) + if err != nil { + panic(err) + } + + fmt.Println(ids) // [1 2 3 4 5 6 7 8 9 10] +} + +type localEmbeddings struct { + Dense [][]float64 `json:"dense"` + Sparse []map[int]float64 `json:"sparse"` +} + +func prepareEmbeddings() (*localEmbeddings, error) { + b, err := os.ReadFile("./examples/embeddings.json") + if err != nil { + return nil, err + } + + le := &localEmbeddings{} + if err = json.Unmarshal(b, le); err != nil { + return nil, err + } + + return le, nil +} + +func prepareDocs() []*schema.Document { + var docs []*schema.Document + contents := `1. Eiffel Tower: Located in Paris, France, it is one of the most famous landmarks in the world, designed by Gustave Eiffel and built in 1889. +2. The Great Wall: Located in China, it is one of the Seven Wonders of the World, built from the Qin Dynasty to the Ming Dynasty, with a total length of over 20000 kilometers. +3. Grand Canyon National Park: Located in Arizona, USA, it is famous for its deep canyons and magnificent scenery, which are cut by the Colorado River. +4. The Colosseum: Located in Rome, Italy, built between 70-80 AD, it was the largest circular arena in the ancient Roman Empire. +5. Taj Mahal: Located in Agra, India, it was completed by Mughal Emperor Shah Jahan in 1653 to commemorate his wife and is one of the New Seven Wonders of the World. +6. Sydney Opera House: Located in Sydney Harbour, Australia, it is one of the most iconic buildings of the 20th century, renowned for its unique sailboat design. +7. Louvre Museum: Located in Paris, France, it is one of the largest museums in the world with a rich collection, including Leonardo da Vinci's Mona Lisa and Greece's Venus de Milo. +8. Niagara Falls: located at the border of the United States and Canada, consisting of three main waterfalls, its spectacular scenery attracts millions of tourists every year. +9. St. Sophia Cathedral: located in Istanbul, Türkiye, originally built in 537 A.D., it used to be an Orthodox cathedral and mosque, and now it is a museum. +10. Machu Picchu: an ancient Inca site located on the plateau of the Andes Mountains in Peru, one of the New Seven Wonders of the World, with an altitude of over 2400 meters.` + locations := []string{"France", "China", "USA", "Italy", "India", "Australia", "France", "Border of the United States and Canada", "Turkey", "Peru"} + + for i, content := range strings.Split(contents, "\n") { + docs = append(docs, &schema.Document{ + ID: strconv.FormatInt(int64(i+1), 10), + Content: content, + MetaData: map[string]any{ + docExtraLocation: locations[i], + }, + }) + } + + return docs +} + +func of[T any](v T) *T { + return &v +} + +// mockEmbedding returns embeddings with 1024 dimensions +type mockEmbedding struct { + dense [][]float64 +} + +func (m mockEmbedding) EmbedStrings(ctx context.Context, texts []string, opts ...embedding.Option) ([][]float64, error) { + return m.dense, nil +} diff --git a/components/indexer/es8/examples/indexer/create_index.go b/components/indexer/es8/examples/indexer/create_index.go new file mode 100644 index 00000000..4112c406 --- /dev/null +++ b/components/indexer/es8/examples/indexer/create_index.go @@ -0,0 +1,44 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "context" + + "github.com/elastic/go-elasticsearch/v8" + "github.com/elastic/go-elasticsearch/v8/typedapi/indices/create" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + +// createIndex create index for example in add_documents.go. +func createIndex(ctx context.Context, client *elasticsearch.Client) error { + _, err := create.NewCreateFunc(client)(indexName).Request(&create.Request{ + Mappings: &types.TypeMapping{ + Properties: map[string]types.Property{ + fieldContent: types.NewTextProperty(), + fieldExtraLocation: types.NewTextProperty(), + fieldContentVector: &types.DenseVectorProperty{ + Dims: of(1024), // same as embedding dimensions + Index: of(true), + Similarity: of("cosine"), + }, + }, + }, + }).Do(ctx) + + return err +} diff --git a/components/indexer/es8/examples/indexer_with_sparse_vector/add_documents.go b/components/indexer/es8/examples/indexer_with_sparse_vector/add_documents.go new file mode 100644 index 00000000..26235d4f --- /dev/null +++ b/components/indexer/es8/examples/indexer_with_sparse_vector/add_documents.go @@ -0,0 +1,173 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "strconv" + "strings" + + "github.com/cloudwego/eino/components/embedding" + "github.com/cloudwego/eino/schema" + "github.com/elastic/go-elasticsearch/v8" + + "github.com/cloudwego/eino-ext/components/indexer/es8" +) + +const ( + indexName = "eino_example_sparse" + fieldContent = "content" + fieldContentDenseVector = "content_dense_vector" + fieldContentSparseVector = "content_sparse_vector" + fieldExtraLocation = "location" + docExtraLocation = "location" +) + +func main() { + ctx := context.Background() + + // es supports multiple ways to connect + username := os.Getenv("ES_USERNAME") + password := os.Getenv("ES_PASSWORD") + httpCACertPath := os.Getenv("ES_HTTP_CA_CERT_PATH") + + cert, err := os.ReadFile(httpCACertPath) + if err != nil { + panic(err) + } + + client, err := elasticsearch.NewClient(elasticsearch.Config{ + Addresses: []string{"https://localhost:9200"}, + Username: username, + Password: password, + CACert: cert, + }) + if err != nil { + panic(err) + } + + // create index if needed. + // comment out the code if index has been created. + if err = createIndex(ctx, client); err != nil { + panic(err) + } + + // load embeddings from local + emb, err := prepareEmbeddings() + if err != nil { + panic(err) + } + + // load docs, set sparse vector + docs := prepareDocs(emb) + + // create es indexer component + indexer, err := es8.NewIndexer(ctx, &es8.IndexerConfig{ + Client: client, + Index: indexName, + BatchSize: 10, + DocumentToFields: func(ctx context.Context, doc *schema.Document) (field2Value map[string]es8.FieldValue, err error) { + return map[string]es8.FieldValue{ + fieldContent: { + Value: doc.Content, + EmbedKey: fieldContentDenseVector, // vectorize doc content and save vector to field "content_vector" + }, + fieldContentSparseVector: { + Value: doc.SparseVector(), // load sparse vector from doc metadata + }, + fieldExtraLocation: { + Value: doc.MetaData[docExtraLocation], + }, + }, nil + }, + Embedding: &mockEmbedding{emb.Dense}, // replace it with real embedding component + }) + if err != nil { + panic(err) + } + + ids, err := indexer.Store(ctx, docs) + if err != nil { + panic(err) + } + + fmt.Println(ids) // [1 2 3 4 5 6 7 8 9 10] +} + +type localEmbeddings struct { + Dense [][]float64 `json:"dense"` + Sparse []map[int]float64 `json:"sparse"` +} + +func prepareEmbeddings() (*localEmbeddings, error) { + b, err := os.ReadFile("./examples/embeddings.json") + if err != nil { + return nil, err + } + + le := &localEmbeddings{} + if err = json.Unmarshal(b, le); err != nil { + return nil, err + } + + return le, nil +} + +func prepareDocs(emb *localEmbeddings) []*schema.Document { + var docs []*schema.Document + contents := `1. Eiffel Tower: Located in Paris, France, it is one of the most famous landmarks in the world, designed by Gustave Eiffel and built in 1889. +2. The Great Wall: Located in China, it is one of the Seven Wonders of the World, built from the Qin Dynasty to the Ming Dynasty, with a total length of over 20000 kilometers. +3. Grand Canyon National Park: Located in Arizona, USA, it is famous for its deep canyons and magnificent scenery, which are cut by the Colorado River. +4. The Colosseum: Located in Rome, Italy, built between 70-80 AD, it was the largest circular arena in the ancient Roman Empire. +5. Taj Mahal: Located in Agra, India, it was completed by Mughal Emperor Shah Jahan in 1653 to commemorate his wife and is one of the New Seven Wonders of the World. +6. Sydney Opera House: Located in Sydney Harbour, Australia, it is one of the most iconic buildings of the 20th century, renowned for its unique sailboat design. +7. Louvre Museum: Located in Paris, France, it is one of the largest museums in the world with a rich collection, including Leonardo da Vinci's Mona Lisa and Greece's Venus de Milo. +8. Niagara Falls: located at the border of the United States and Canada, consisting of three main waterfalls, its spectacular scenery attracts millions of tourists every year. +9. St. Sophia Cathedral: located in Istanbul, Türkiye, originally built in 537 A.D., it used to be an Orthodox cathedral and mosque, and now it is a museum. +10. Machu Picchu: an ancient Inca site located on the plateau of the Andes Mountains in Peru, one of the New Seven Wonders of the World, with an altitude of over 2400 meters.` + locations := []string{"France", "China", "USA", "Italy", "India", "Australia", "France", "Border of the United States and Canada", "Turkey", "Peru"} + + for i, content := range strings.Split(contents, "\n") { + doc := &schema.Document{ + ID: strconv.FormatInt(int64(i+1), 10), + Content: content, + MetaData: map[string]any{ + docExtraLocation: locations[i], + }, + } + doc.WithSparseVector(emb.Sparse[i]) + docs = append(docs, doc) + } + + return docs +} + +func of[T any](v T) *T { + return &v +} + +// mockEmbedding returns embeddings with 1024 dimensions +type mockEmbedding struct { + dense [][]float64 +} + +func (m mockEmbedding) EmbedStrings(ctx context.Context, texts []string, opts ...embedding.Option) ([][]float64, error) { + return m.dense, nil +} diff --git a/components/indexer/es8/examples/indexer_with_sparse_vector/create_index.go b/components/indexer/es8/examples/indexer_with_sparse_vector/create_index.go new file mode 100644 index 00000000..e10426aa --- /dev/null +++ b/components/indexer/es8/examples/indexer_with_sparse_vector/create_index.go @@ -0,0 +1,45 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "context" + + "github.com/elastic/go-elasticsearch/v8" + "github.com/elastic/go-elasticsearch/v8/typedapi/indices/create" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + +// createIndex create index for example in add_documents.go. +func createIndex(ctx context.Context, client *elasticsearch.Client) error { + _, err := create.NewCreateFunc(client)(indexName).Request(&create.Request{ + Mappings: &types.TypeMapping{ + Properties: map[string]types.Property{ + fieldContent: types.NewTextProperty(), + fieldExtraLocation: types.NewTextProperty(), + fieldContentDenseVector: &types.DenseVectorProperty{ + Dims: of(1024), // same as embedding dimensions + Index: of(true), + Similarity: of("cosine"), + }, + fieldContentSparseVector: &types.SparseVectorProperty{}, + }, + }, + }).Do(ctx) + + return err +} diff --git a/components/indexer/es8/go.mod b/components/indexer/es8/go.mod new file mode 100644 index 00000000..a9547e70 --- /dev/null +++ b/components/indexer/es8/go.mod @@ -0,0 +1,52 @@ +module github.com/cloudwego/eino-ext/components/indexer/es8 + +go 1.22 + +require ( + github.com/bytedance/mockey v1.2.13 + github.com/cloudwego/eino v0.3.6 + github.com/elastic/go-elasticsearch/v8 v8.16.0 + github.com/smartystreets/goconvey v1.8.1 +) + +require ( + github.com/bytedance/sonic v1.12.2 // indirect + github.com/bytedance/sonic/loader v0.2.0 // indirect + github.com/cloudwego/base64x v0.1.4 // indirect + github.com/cloudwego/iasm v0.2.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/elastic/elastic-transport-go/v8 v8.6.0 // indirect + github.com/getkin/kin-openapi v0.118.0 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/swag v0.19.5 // indirect + github.com/goph/emperror v0.17.2 // indirect + github.com/gopherjs/gopherjs v1.17.2 // indirect + github.com/invopop/yaml v0.1.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/jtolds/gls v4.20.0+incompatible // indirect + github.com/klauspost/cpuid/v2 v2.0.9 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect + github.com/nikolalohinski/gonja v1.5.3 // indirect + github.com/pelletier/go-toml/v2 v2.0.9 // indirect + github.com/perimeterx/marshmallow v1.1.4 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/slongfield/pyfmt v0.0.0-20220222012616-ea85ff4c361f // indirect + github.com/smarty/assertions v1.15.0 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/yargevad/filepathx v1.0.0 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect + golang.org/x/arch v0.11.0 // indirect + golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect + golang.org/x/sys v0.26.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/components/indexer/es8/go.sum b/components/indexer/es8/go.sum new file mode 100644 index 00000000..889b85b3 --- /dev/null +++ b/components/indexer/es8/go.sum @@ -0,0 +1,179 @@ +github.com/airbrake/gobrake v3.6.1+incompatible/go.mod h1:wM4gu3Cn0W0K7GUuVWnlXZU11AGBXMILnrdOU8Kn00o= +github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bugsnag/bugsnag-go v1.4.0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/bytedance/mockey v1.2.13 h1:jokWZAm/pUEbD939Rhznz615MKUCZNuvCFQlJ2+ntoo= +github.com/bytedance/mockey v1.2.13/go.mod h1:1BPHF9sol5R1ud/+0VEHGQq/+i2lN+GTsr3O2Q9IENY= +github.com/bytedance/sonic v1.12.2 h1:oaMFuRTpMHYLpCntGca65YWt5ny+wAceDERTkT2L9lg= +github.com/bytedance/sonic v1.12.2/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.0 h1:zNprn+lsIP06C/IqCHs3gPQIvnvpKbbxyXQP1iU4kWM= +github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/cloudwego/eino v0.3.6 h1:3yfdKKxMVWefdOyGXHuqUMM5cc9iioijj2mpPsDZKIg= +github.com/cloudwego/eino v0.3.6/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA= +github.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= +github.com/elastic/go-elasticsearch/v8 v8.16.0 h1:f7bR+iBz8GTAVhwyFO3hm4ixsz2eMaEy0QroYnXV3jE= +github.com/elastic/go-elasticsearch/v8 v8.16.0/go.mod h1:lGMlgKIbYoRvay3xWBeKahAiJOgmFDsjZC39nmO3H64= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM= +github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/goph/emperror v0.17.2 h1:yLapQcmEsO0ipe9p5TaN22djm3OFV/TfM/fcYP0/J18= +github.com/goph/emperror v0.17.2/go.mod h1:+ZbQ+fUNO/6FNiUo0ujtMjhgad9Xa6fQL9KhH4LNHic= +github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g= +github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/invopop/yaml v0.1.0 h1:YW3WGUoJEXYfzWBjn00zIlrw7brGVD0fUKRYDPAPhrc= +github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= +github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/nikolalohinski/gonja v1.5.3 h1:GsA+EEaZDZPGJ8JtpeGN78jidhOlxeJROpqMT9fTj9c= +github.com/nikolalohinski/gonja v1.5.3/go.mod h1:RmjwxNiXAEqcq1HeK5SSMmqFJvKOfTfXhkJv6YBtPa4= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= +github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/perimeterx/marshmallow v1.1.4 h1:pZLDH9RjlLGGorbXhcaQLhfuV0pFMNfPO55FuFkxqLw= +github.com/perimeterx/marshmallow v1.1.4/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rollbar/rollbar-go v1.0.2/go.mod h1:AcFs5f0I+c71bpHlXNNDbOWJiKwjFDtISeXco0L5PKQ= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/slongfield/pyfmt v0.0.0-20220222012616-ea85ff4c361f h1:Z2cODYsUxQPofhpYRMQVwWz4yUVpHF+vPi+eUdruUYI= +github.com/slongfield/pyfmt v0.0.0-20220222012616-ea85ff4c361f/go.mod h1:JqzWyvTuI2X4+9wOHmKSQCYxybB/8j6Ko43qVmXDuZg= +github.com/smarty/assertions v1.15.0 h1:cR//PqUBUiQRakZWqBiFFQ9wb8emQGDb0HeGdqGByCY= +github.com/smarty/assertions v1.15.0/go.mod h1:yABtdzeQs6l1brC900WlRNwj6ZR55d7B+E8C6HtKdec= +github.com/smartystreets/goconvey v1.8.1 h1:qGjIddxOk4grTu9JPOU31tVfq3cNdBlNa5sSznIX1xY= +github.com/smartystreets/goconvey v1.8.1/go.mod h1:+/u4qLyY6x1jReYOp7GOM2FSt8aP9CzCZL03bI28W60= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +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/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= +github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= +github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= +github.com/yargevad/filepathx v1.0.0 h1:SYcT+N3tYGi+NvazubCNlvgIPbzAk7i7y2dwg3I5FYc= +github.com/yargevad/filepathx v1.0.0/go.mod h1:BprfX/gpYNJHJfc35GjRRpVcwWXS89gGulUIU5tK3tA= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= +go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= +go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= +golang.org/x/arch v0.11.0 h1:KXV8WWKCXm6tRpLirl2szsO5j/oOODwZf4hATmGVNs4= +golang.org/x/arch v0.11.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= diff --git a/components/indexer/es8/indexer.go b/components/indexer/es8/indexer.go new file mode 100644 index 00000000..b2414c4c --- /dev/null +++ b/components/indexer/es8/indexer.go @@ -0,0 +1,269 @@ +/* + * Copyright 2024 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package es8 + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + + "github.com/cloudwego/eino/callbacks" + "github.com/cloudwego/eino/components" + "github.com/cloudwego/eino/components/embedding" + "github.com/cloudwego/eino/components/indexer" + "github.com/cloudwego/eino/schema" + "github.com/elastic/go-elasticsearch/v8" + "github.com/elastic/go-elasticsearch/v8/esutil" +) + +type IndexerConfig struct { + Client *elasticsearch.Client `json:"client"` + + Index string `json:"index"` + // BatchSize controls max texts size for embedding. + // Default is 5. + BatchSize int `json:"batch_size"` + // FieldMapping supports customize es fields from eino document. + // Each key - FieldValue.Value from field2Value will be saved, and + // vector of FieldValue.Value will be saved if FieldValue.EmbedKey is not empty. + DocumentToFields func(ctx context.Context, doc *schema.Document) (field2Value map[string]FieldValue, err error) + // Embedding vectorization method, must provide in two cases + // 1. VectorFields contains fields except doc Content + // 2. VectorFields contains doc Content and vector not provided in doc extra (see Document.Vector method) + Embedding embedding.Embedder +} + +type FieldValue struct { + // Value original Value + Value any + // EmbedKey if set, Value will be vectorized and saved to es. + // If Stringify method is provided, Embedding input text will be Stringify(Value). + // If Stringify method not set, retriever will try to assert Value as string. + EmbedKey string + // Stringify converts Value to string + Stringify func(val any) (string, error) +} + +type Indexer struct { + client *elasticsearch.Client + config *IndexerConfig +} + +func NewIndexer(_ context.Context, conf *IndexerConfig) (*Indexer, error) { + if conf.Client == nil { + return nil, fmt.Errorf("[NewIndexer] es client not provided") + } + + if conf.DocumentToFields == nil { + return nil, fmt.Errorf("[NewIndexer] DocumentToFields method not provided") + } + + if conf.BatchSize == 0 { + conf.BatchSize = defaultBatchSize + } + + return &Indexer{ + client: conf.Client, + config: conf, + }, nil +} + +func (i *Indexer) Store(ctx context.Context, docs []*schema.Document, opts ...indexer.Option) (ids []string, err error) { + defer func() { + if err != nil { + callbacks.OnError(ctx, err) + } + }() + + ctx = callbacks.OnStart(ctx, &indexer.CallbackInput{Docs: docs}) + + options := indexer.GetCommonOptions(&indexer.Options{ + Embedding: i.config.Embedding, + }, opts...) + + if err = i.bulkAdd(ctx, docs, options); err != nil { + return nil, err + } + + ids = iter(docs, func(t *schema.Document) string { return t.ID }) + + callbacks.OnEnd(ctx, &indexer.CallbackOutput{IDs: ids}) + + return ids, nil +} + +func (i *Indexer) bulkAdd(ctx context.Context, docs []*schema.Document, options *indexer.Options) error { + emb := options.Embedding + bi, err := esutil.NewBulkIndexer(esutil.BulkIndexerConfig{ + Index: i.config.Index, + Client: i.client, + }) + if err != nil { + return err + } + + var ( + tuples []tuple + texts []string + ) + + embAndAdd := func() error { + var vectors [][]float64 + + if len(texts) > 0 { + if emb == nil { + return fmt.Errorf("[bulkAdd] embedding method not provided") + } + + vectors, err = emb.EmbedStrings(i.makeEmbeddingCtx(ctx, emb), texts) + if err != nil { + return fmt.Errorf("[bulkAdd] embedding failed, %w", err) + } + + if len(vectors) != len(texts) { + return fmt.Errorf("[bulkAdd] invalid vector length, expected=%d, got=%d", len(texts), len(vectors)) + } + } + + for _, t := range tuples { + fields := t.fields + for k, idx := range t.key2Idx { + fields[k] = vectors[idx] + } + + b, err := json.Marshal(fields) + if err != nil { + return fmt.Errorf("[bulkAdd] marshal bulk item failed, %w", err) + } + + if err = bi.Add(ctx, esutil.BulkIndexerItem{ + Index: i.config.Index, + Action: "index", + DocumentID: t.id, + Body: bytes.NewReader(b), + }); err != nil { + return err + } + } + + tuples = tuples[:0] + texts = texts[:0] + + return nil + } + + for idx := range docs { + doc := docs[idx] + fields, err := i.config.DocumentToFields(ctx, doc) + if err != nil { + return fmt.Errorf("[bulkAdd] FieldMapping failed, %w", err) + } + + rawFields := make(map[string]any) + embSize := 0 + for k, v := range fields { + rawFields[k] = v.Value + if v.EmbedKey != "" { + embSize++ + } + } + + if embSize > i.config.BatchSize { + return fmt.Errorf("[bulkAdd] needEmbeddingFields length over batch size, batch size=%d, got size=%d", + i.config.BatchSize, embSize) + } + + if len(texts)+embSize > i.config.BatchSize { + if err = embAndAdd(); err != nil { + return err + } + } + + key2Idx := make(map[string]int, embSize) + for k, v := range fields { + if v.EmbedKey != "" { + if _, found := fields[v.EmbedKey]; found { + return fmt.Errorf("[bulkAdd] duplicate key for origin key, key=%s", k) + } + + if _, found := key2Idx[v.EmbedKey]; found { + return fmt.Errorf("[bulkAdd] duplicate key from embed_key, key=%s", v.EmbedKey) + } + + var text string + if v.Stringify != nil { + text, err = v.Stringify(v.Value) + if err != nil { + return err + } + } else { + var ok bool + text, ok = v.Value.(string) + if !ok { + return fmt.Errorf("[bulkAdd] assert value as string failed, key=%s, emb_key=%s", k, v.EmbedKey) + } + } + + key2Idx[v.EmbedKey] = len(texts) + texts = append(texts, text) + } + } + + tuples = append(tuples, tuple{ + id: doc.ID, + fields: rawFields, + key2Idx: key2Idx, + }) + } + + if len(tuples) > 0 { + if err = embAndAdd(); err != nil { + return err + } + } + + return bi.Close(ctx) +} + +func (i *Indexer) makeEmbeddingCtx(ctx context.Context, emb embedding.Embedder) context.Context { + runInfo := &callbacks.RunInfo{ + Component: components.ComponentOfEmbedding, + } + + if embType, ok := components.GetType(emb); ok { + runInfo.Type = embType + } + + runInfo.Name = runInfo.Type + string(runInfo.Component) + + return callbacks.ReuseHandlers(ctx, runInfo) +} + +func (i *Indexer) GetType() string { + return typ +} + +func (i *Indexer) IsCallbacksEnabled() bool { + return true +} + +type tuple struct { + id string + fields map[string]any + key2Idx map[string]int +} diff --git a/components/indexer/es8/indexer_test.go b/components/indexer/es8/indexer_test.go new file mode 100644 index 00000000..59623e65 --- /dev/null +++ b/components/indexer/es8/indexer_test.go @@ -0,0 +1,241 @@ +/* + * Copyright 2024 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package es8 + +import ( + "context" + "encoding/json" + "fmt" + "io" + "testing" + + . "github.com/bytedance/mockey" + "github.com/cloudwego/eino/components/embedding" + "github.com/cloudwego/eino/components/indexer" + "github.com/cloudwego/eino/schema" + "github.com/elastic/go-elasticsearch/v8/esutil" + "github.com/smartystreets/goconvey/convey" +) + +func TestBulkAdd(t *testing.T) { + PatchConvey("test bulkAdd", t, func() { + ctx := context.Background() + extField := "extra_field" + + d1 := &schema.Document{ID: "123", Content: "asd", MetaData: map[string]any{extField: "ext_1"}} + d2 := &schema.Document{ID: "456", Content: "qwe", MetaData: map[string]any{extField: "ext_2"}} + docs := []*schema.Document{d1, d2} + bi, err := esutil.NewBulkIndexer(esutil.BulkIndexerConfig{}) + convey.So(err, convey.ShouldBeNil) + + PatchConvey("test NewBulkIndexer error", func() { + mockErr := fmt.Errorf("test err") + Mock(esutil.NewBulkIndexer).Return(nil, mockErr).Build() + i := &Indexer{ + config: &IndexerConfig{ + Index: "mock_index", + DocumentToFields: func(ctx context.Context, doc *schema.Document) (field2Value map[string]FieldValue, err error) { + return nil, nil + }, + }, + } + err := i.bulkAdd(ctx, docs, &indexer.Options{ + Embedding: &mockEmbedding{size: []int{1}, mockVector: []float64{2.1}}, + }) + convey.So(err, convey.ShouldBeError, mockErr) + }) + + PatchConvey("test FieldMapping error", func() { + mockErr := fmt.Errorf("test err") + Mock(esutil.NewBulkIndexer).Return(bi, nil).Build() + i := &Indexer{ + config: &IndexerConfig{ + Index: "mock_index", + DocumentToFields: func(ctx context.Context, doc *schema.Document) (field2Value map[string]FieldValue, err error) { + return nil, mockErr + }, + }, + } + err := i.bulkAdd(ctx, docs, &indexer.Options{ + Embedding: &mockEmbedding{size: []int{1}, mockVector: []float64{2.1}}, + }) + convey.So(err, convey.ShouldBeError, fmt.Errorf("[bulkAdd] FieldMapping failed, %w", mockErr)) + }) + + PatchConvey("test len(needEmbeddingFields) > i.config.BatchSize", func() { + Mock(esutil.NewBulkIndexer).Return(bi, nil).Build() + i := &Indexer{ + config: &IndexerConfig{ + Index: "mock_index", + BatchSize: 1, + DocumentToFields: func(ctx context.Context, doc *schema.Document) (field2Value map[string]FieldValue, err error) { + return map[string]FieldValue{ + "k1": {Value: "v1", EmbedKey: "k"}, + "k2": {Value: "v2", EmbedKey: "kk"}, + }, nil + }, + }, + } + err := i.bulkAdd(ctx, docs, &indexer.Options{ + Embedding: &mockEmbedding{size: []int{1}, mockVector: []float64{2.1}}, + }) + convey.So(err, convey.ShouldBeError, fmt.Errorf("[bulkAdd] needEmbeddingFields length over batch size, batch size=%d, got size=%d", i.config.BatchSize, 2)) + }) + + PatchConvey("test embedding not provided", func() { + Mock(esutil.NewBulkIndexer).Return(bi, nil).Build() + i := &Indexer{ + config: &IndexerConfig{ + Index: "mock_index", + BatchSize: 2, + DocumentToFields: func(ctx context.Context, doc *schema.Document) (field2Value map[string]FieldValue, err error) { + return map[string]FieldValue{ + "k0": {Value: "v0"}, + "k1": {Value: "v1", EmbedKey: "vk1"}, + "k2": {Value: 222, EmbedKey: "vk2", Stringify: func(val any) (string, error) { + return "222", nil + }}, + "k3": {Value: 123}, + }, nil + }, + }, + } + err := i.bulkAdd(ctx, docs, &indexer.Options{ + Embedding: nil, + }) + convey.So(err, convey.ShouldBeError, fmt.Errorf("[bulkAdd] embedding method not provided")) + }) + + PatchConvey("test embed failed", func() { + mockErr := fmt.Errorf("test err") + Mock(esutil.NewBulkIndexer).Return(bi, nil).Build() + i := &Indexer{ + config: &IndexerConfig{ + Index: "mock_index", + BatchSize: 2, + DocumentToFields: func(ctx context.Context, doc *schema.Document) (field2Value map[string]FieldValue, err error) { + return map[string]FieldValue{ + "k0": {Value: "v0"}, + "k1": {Value: "v1", EmbedKey: "vk1"}, + "k2": {Value: 222, EmbedKey: "vk2", Stringify: func(val any) (string, error) { + return "222", nil + }}, + "k3": {Value: 123}, + }, nil + }, + }, + } + err := i.bulkAdd(ctx, docs, &indexer.Options{ + Embedding: &mockEmbedding{err: mockErr}, + }) + convey.So(err, convey.ShouldBeError, fmt.Errorf("[bulkAdd] embedding failed, %w", mockErr)) + }) + + PatchConvey("test len(vectors) != len(texts)", func() { + Mock(esutil.NewBulkIndexer).Return(bi, nil).Build() + i := &Indexer{ + config: &IndexerConfig{ + Index: "mock_index", + BatchSize: 2, + DocumentToFields: func(ctx context.Context, doc *schema.Document) (field2Value map[string]FieldValue, err error) { + return map[string]FieldValue{ + "k0": {Value: "v0"}, + "k1": {Value: "v1", EmbedKey: "vk1"}, + "k2": {Value: 222, EmbedKey: "vk2", Stringify: func(val any) (string, error) { + return "222", nil + }}, + "k3": {Value: 123}, + }, nil + }, + }, + } + err := i.bulkAdd(ctx, docs, &indexer.Options{ + Embedding: &mockEmbedding{size: []int{1}, mockVector: []float64{2.1}}, + }) + convey.So(err, convey.ShouldBeError, fmt.Errorf("[bulkAdd] invalid vector length, expected=%d, got=%d", 2, 1)) + }) + + PatchConvey("test success", func() { + var mps []esutil.BulkIndexerItem + Mock(esutil.NewBulkIndexer).Return(bi, nil).Build() + Mock(GetMethod(bi, "Add")).To(func(ctx context.Context, item esutil.BulkIndexerItem) error { + mps = append(mps, item) + return nil + }).Build() + Mock(GetMethod(bi, "Close")).Return(nil).Build() + + i := &Indexer{ + config: &IndexerConfig{ + Index: "mock_index", + BatchSize: 2, + DocumentToFields: func(ctx context.Context, doc *schema.Document) (field2Value map[string]FieldValue, err error) { + return map[string]FieldValue{ + "k0": {Value: doc.Content}, + "k1": {Value: "v1", EmbedKey: "vk1"}, + "k2": {Value: 222, EmbedKey: "vk2", Stringify: func(val any) (string, error) { return "222", nil }}, + "k3": {Value: 123}, + }, nil + }, + }, + } + err := i.bulkAdd(ctx, docs, &indexer.Options{ + Embedding: &mockEmbedding{size: []int{2, 2}, mockVector: []float64{2.1}}, + }) + convey.So(err, convey.ShouldBeNil) + convey.So(len(mps), convey.ShouldEqual, 2) + for j, doc := range docs { + item := mps[j] + convey.So(item.DocumentID, convey.ShouldEqual, doc.ID) + b, err := io.ReadAll(item.Body) + convey.So(err, convey.ShouldBeNil) + var mp map[string]interface{} + convey.So(json.Unmarshal(b, &mp), convey.ShouldBeNil) + convey.So(mp["k0"], convey.ShouldEqual, doc.Content) + convey.So(mp["k1"], convey.ShouldEqual, "v1") + convey.So(mp["k2"], convey.ShouldEqual, 222) + convey.So(mp["k3"], convey.ShouldEqual, 123) + convey.So(mp["vk1"], convey.ShouldEqual, []any{2.1}) + convey.So(mp["vk2"], convey.ShouldEqual, []any{2.1}) + } + }) + }) +} + +type mockEmbedding struct { + err error + call int + size []int + mockVector []float64 +} + +func (m *mockEmbedding) EmbedStrings(ctx context.Context, texts []string, opts ...embedding.Option) ([][]float64, error) { + if m.err != nil { + return nil, m.err + } + + if m.call >= len(m.size) { + return nil, fmt.Errorf("call limit error") + } + + resp := make([][]float64, m.size[m.call]) + m.call++ + for i := range resp { + resp[i] = m.mockVector + } + + return resp, nil +} diff --git a/components/indexer/es8/utils.go b/components/indexer/es8/utils.go new file mode 100644 index 00000000..937e3b5d --- /dev/null +++ b/components/indexer/es8/utils.go @@ -0,0 +1,30 @@ +/* + * Copyright 2024 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package es8 + +func GetType() string { + return typ +} + +func iter[T, D any](src []T, fn func(T) D) []D { + resp := make([]D, len(src)) + for i := range src { + resp[i] = fn(src[i]) + } + + return resp +} diff --git a/components/indexer/redis/go.mod b/components/indexer/redis/go.mod index 385a4358..2d70c012 100644 --- a/components/indexer/redis/go.mod +++ b/components/indexer/redis/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/bytedance/mockey v1.2.13 - github.com/cloudwego/eino v0.3.6 + github.com/cloudwego/eino v0.3.7 github.com/redis/go-redis/v9 v9.7.0 github.com/smartystreets/goconvey v1.8.1 ) diff --git a/components/indexer/redis/go.sum b/components/indexer/redis/go.sum index bc6a972f..bc04466d 100644 --- a/components/indexer/redis/go.sum +++ b/components/indexer/redis/go.sum @@ -17,8 +17,8 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.6 h1:3yfdKKxMVWefdOyGXHuqUMM5cc9iioijj2mpPsDZKIg= -github.com/cloudwego/eino v0.3.6/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/indexer/volc_vikingdb/examples/custom_embedding/store.go b/components/indexer/volc_vikingdb/examples/embed_indexer/main.go similarity index 99% rename from components/indexer/volc_vikingdb/examples/custom_embedding/store.go rename to components/indexer/volc_vikingdb/examples/embed_indexer/main.go index 0245b356..3e54db27 100644 --- a/components/indexer/volc_vikingdb/examples/custom_embedding/store.go +++ b/components/indexer/volc_vikingdb/examples/embed_indexer/main.go @@ -21,9 +21,10 @@ import ( "fmt" "os" - "github.com/cloudwego/eino-ext/components/indexer/volc_vikingdb" "github.com/cloudwego/eino/components/embedding" "github.com/cloudwego/eino/schema" + + "github.com/cloudwego/eino-ext/components/indexer/volc_vikingdb" ) func main() { diff --git a/components/indexer/volc_vikingdb/examples/builtin_embedding/store.go b/components/indexer/volc_vikingdb/examples/indexer/main.go similarity index 65% rename from components/indexer/volc_vikingdb/examples/builtin_embedding/store.go rename to components/indexer/volc_vikingdb/examples/indexer/main.go index 97abd4e8..2a105d14 100644 --- a/components/indexer/volc_vikingdb/examples/builtin_embedding/store.go +++ b/components/indexer/volc_vikingdb/examples/indexer/main.go @@ -19,10 +19,16 @@ package main import ( "context" "fmt" + "log" "os" - "github.com/cloudwego/eino-ext/components/indexer/volc_vikingdb" + "github.com/cloudwego/eino/callbacks" + "github.com/cloudwego/eino/components/indexer" + "github.com/cloudwego/eino/compose" "github.com/cloudwego/eino/schema" + callbacksHelper "github.com/cloudwego/eino/utils/callbacks" + + "github.com/cloudwego/eino-ext/components/indexer/volc_vikingdb" ) func main() { @@ -65,7 +71,7 @@ func main() { AddBatchSize: 10, } - indexer, err := volc_vikingdb.NewIndexer(ctx, cfg) + volcIndexer, err := volc_vikingdb.NewIndexer(ctx, cfg) if err != nil { fmt.Printf("NewIndexer failed, %v\n", err) return @@ -79,11 +85,49 @@ func main() { volc_vikingdb.SetExtraDataTTL(doc, 1000) docs := []*schema.Document{doc} - resp, err := indexer.Store(ctx, docs) + + log.Printf("===== call Indexer directly =====") + + resp, err := volcIndexer.Store(ctx, docs) if err != nil { fmt.Printf("Store failed, %v\n", err) return } fmt.Printf("vikingDB store success, docs=%v, resp ids=%v\n", docs, resp) + + log.Printf("===== call Indexer in chain =====") + + // 创建 callback handler + handlerHelper := &callbacksHelper.IndexerCallbackHandler{ + OnStart: func(ctx context.Context, info *callbacks.RunInfo, input *indexer.CallbackInput) context.Context { + log.Printf("input access, len: %v, content: %s\n", len(input.Docs), input.Docs[0].Content) + return ctx + }, + OnEnd: func(ctx context.Context, info *callbacks.RunInfo, output *indexer.CallbackOutput) context.Context { + log.Printf("output finished, len: %v, ids=%v\n", len(output.IDs), output.IDs) + return ctx + }, + // OnError + } + + // 使用 callback handler + handler := callbacksHelper.NewHandlerHelper(). + Indexer(handlerHelper). + Handler() + + chain := compose.NewChain[[]*schema.Document, []string]() + chain.AppendIndexer(volcIndexer) + + // 在运行时使用 + run, err := chain.Compile(ctx) + if err != nil { + log.Fatalf("chain.Compile failed, err=%v", err) + } + + outIDs, err := run.Invoke(ctx, docs, compose.WithCallbacks(handler)) + if err != nil { + log.Fatalf("run.Invoke failed, err=%v", err) + } + fmt.Printf("vikingDB store success, docs=%v, resp ids=%v\n", docs, outIDs) } diff --git a/components/indexer/volc_vikingdb/go.mod b/components/indexer/volc_vikingdb/go.mod index fd81101b..cfd221b2 100644 --- a/components/indexer/volc_vikingdb/go.mod +++ b/components/indexer/volc_vikingdb/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/bytedance/mockey v1.2.13 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/smartystreets/goconvey v1.8.1 github.com/volcengine/volc-sdk-golang v1.0.182 ) diff --git a/components/indexer/volc_vikingdb/go.sum b/components/indexer/volc_vikingdb/go.sum index 1e370382..c9743012 100644 --- a/components/indexer/volc_vikingdb/go.sum +++ b/components/indexer/volc_vikingdb/go.sum @@ -97,8 +97,8 @@ github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5P github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= diff --git a/components/model/ark/go.mod b/components/model/ark/go.mod index cb532bf5..2ed49bd9 100644 --- a/components/model/ark/go.mod +++ b/components/model/ark/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/bytedance/mockey v1.2.10 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/getkin/kin-openapi v0.118.0 github.com/smartystreets/goconvey v1.8.1 github.com/stretchr/testify v1.9.0 diff --git a/components/model/ark/go.sum b/components/model/ark/go.sum index bdebe197..31e12916 100644 --- a/components/model/ark/go.sum +++ b/components/model/ark/go.sum @@ -18,8 +18,8 @@ github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEex github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/model/claude/go.mod b/components/model/claude/go.mod index 71f41152..5ea0c8b9 100644 --- a/components/model/claude/go.mod +++ b/components/model/claude/go.mod @@ -7,7 +7,7 @@ toolchain go1.22.2 require ( github.com/anthropics/anthropic-sdk-go v0.2.0-alpha.8 github.com/bytedance/mockey v1.2.13 - github.com/cloudwego/eino v0.3.2 + github.com/cloudwego/eino v0.3.7 github.com/getkin/kin-openapi v0.118.0 github.com/stretchr/testify v1.9.0 ) diff --git a/components/model/claude/go.sum b/components/model/claude/go.sum index bea0f759..e207661d 100644 --- a/components/model/claude/go.sum +++ b/components/model/claude/go.sum @@ -15,8 +15,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.2 h1:GaMqt3zJAee8ybN4qsATNgSIDAbNruzKCMeMKBH4F1E= -github.com/cloudwego/eino v0.3.2/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -29,6 +29,7 @@ github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFd github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= @@ -67,8 +68,11 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -130,12 +134,14 @@ github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6 github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= +github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/yargevad/filepathx v1.0.0 h1:SYcT+N3tYGi+NvazubCNlvgIPbzAk7i7y2dwg3I5FYc= github.com/yargevad/filepathx v1.0.0/go.mod h1:BprfX/gpYNJHJfc35GjRRpVcwWXS89gGulUIU5tK3tA= golang.org/x/arch v0.11.0 h1:KXV8WWKCXm6tRpLirl2szsO5j/oOODwZf4hATmGVNs4= golang.org/x/arch v0.11.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -146,6 +152,7 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= diff --git a/components/model/gemini/go.sum b/components/model/gemini/go.sum index b300dddb..2675063e 100644 --- a/components/model/gemini/go.sum +++ b/components/model/gemini/go.sum @@ -50,6 +50,7 @@ github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFd github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -87,6 +88,7 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= @@ -126,8 +128,11 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -180,6 +185,7 @@ github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6 github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= +github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/yargevad/filepathx v1.0.0 h1:SYcT+N3tYGi+NvazubCNlvgIPbzAk7i7y2dwg3I5FYc= github.com/yargevad/filepathx v1.0.0/go.mod h1:BprfX/gpYNJHJfc35GjRRpVcwWXS89gGulUIU5tK3tA= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= @@ -234,6 +240,7 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= diff --git a/components/model/ollama/go.mod b/components/model/ollama/go.mod index b1de96d0..e3dbaa68 100644 --- a/components/model/ollama/go.mod +++ b/components/model/ollama/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/bytedance/mockey v1.2.13 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/ollama/ollama v0.3.0 github.com/smartystreets/goconvey v1.8.1 github.com/stretchr/testify v1.9.0 diff --git a/components/model/ollama/go.sum b/components/model/ollama/go.sum index c4040e0a..a2634e52 100644 --- a/components/model/ollama/go.sum +++ b/components/model/ollama/go.sum @@ -13,8 +13,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/model/openai/go.mod b/components/model/openai/go.mod index 2ed12f38..b3c01e8e 100644 --- a/components/model/openai/go.mod +++ b/components/model/openai/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/bytedance/mockey v1.2.13 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/cloudwego/eino-ext/libs/acl/openai v0.0.0-20250114173020-562b40c138d3 github.com/getkin/kin-openapi v0.118.0 github.com/sashabaranov/go-openai v1.32.5 diff --git a/components/model/openai/go.sum b/components/model/openai/go.sum index 06cf0a80..47e5ed3c 100644 --- a/components/model/openai/go.sum +++ b/components/model/openai/go.sum @@ -13,8 +13,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/eino-ext/libs/acl/openai v0.0.0-20250114173020-562b40c138d3 h1:DHeeScM7IOmh8YxbLLNu5FrUMuylDfnsuZ3QLTEThq0= github.com/cloudwego/eino-ext/libs/acl/openai v0.0.0-20250114173020-562b40c138d3/go.mod h1:H5UK9sjotuBaZCO6CFvPRaYDBBfRz/MSFR9ZNEmwgCo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= diff --git a/components/model/qianfan/go.mod b/components/model/qianfan/go.mod index b2c83d47..9d24339b 100644 --- a/components/model/qianfan/go.mod +++ b/components/model/qianfan/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/baidubce/bce-qianfan-sdk/go/qianfan v0.0.14 github.com/bytedance/mockey v1.2.13 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/smartystreets/goconvey v1.8.1 ) diff --git a/components/model/qianfan/go.sum b/components/model/qianfan/go.sum index 56d5bb4f..03ea808d 100644 --- a/components/model/qianfan/go.sum +++ b/components/model/qianfan/go.sum @@ -17,8 +17,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/model/qwen/go.mod b/components/model/qwen/go.mod index 16066faa..dfa7e6ed 100644 --- a/components/model/qwen/go.mod +++ b/components/model/qwen/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/bytedance/mockey v1.2.13 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/cloudwego/eino-ext/libs/acl/openai v0.0.0-20250114173020-562b40c138d3 github.com/smartystreets/goconvey v1.8.1 ) diff --git a/components/model/qwen/go.sum b/components/model/qwen/go.sum index 06cf0a80..47e5ed3c 100644 --- a/components/model/qwen/go.sum +++ b/components/model/qwen/go.sum @@ -13,8 +13,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/eino-ext/libs/acl/openai v0.0.0-20250114173020-562b40c138d3 h1:DHeeScM7IOmh8YxbLLNu5FrUMuylDfnsuZ3QLTEThq0= github.com/cloudwego/eino-ext/libs/acl/openai v0.0.0-20250114173020-562b40c138d3/go.mod h1:H5UK9sjotuBaZCO6CFvPRaYDBBfRz/MSFR9ZNEmwgCo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= diff --git a/components/retriever/es8/README.md b/components/retriever/es8/README.md new file mode 100644 index 00000000..812e2275 --- /dev/null +++ b/components/retriever/es8/README.md @@ -0,0 +1,158 @@ +# ES8 Retriever + +English + +An Elasticsearch 8.x retriever implementation for [Eino](https://github.com/cloudwego/eino) that implements the `Retriever` interface. This enables seamless integration with Eino's vector retrieval system for enhanced semantic search capabilities. + +## Features + +- Implements `github.com/cloudwego/eino/components/retriever.Retriever` +- Easy integration with Eino's retrieval system +- Configurable Elasticsearch parameters +- Support for vector similarity search +- Multiple search modes including approximate search +- Custom result parsing support +- Flexible document filtering + +## Installation + +```bash +go get github.com/cloudwego/eino-ext/components/retriever/es8@latest +``` + +## Quick Start + +Here's a quick example of how to use the retriever with approximate search mode, you could read components/retriever/es8/examples/approximate/approximate.go for more details: + +```go +import ( + "github.com/cloudwego/eino/components/embedding" + "github.com/cloudwego/eino/schema" + "github.com/elastic/go-elasticsearch/v8" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + + "github.com/cloudwego/eino-ext/components/retriever/es8" + "github.com/cloudwego/eino-ext/components/retriever/es8/search_mode" +) + +const ( + indexName = "eino_example" + fieldContent = "content" + fieldContentVector = "content_vector" + fieldExtraLocation = "location" + docExtraLocation = "location" +) + +func main() { + ctx := context.Background() + + // es supports multiple ways to connect + username := os.Getenv("ES_USERNAME") + password := os.Getenv("ES_PASSWORD") + httpCACertPath := os.Getenv("ES_HTTP_CA_CERT_PATH") + + cert, err := os.ReadFile(httpCACertPath) + if err != nil { + panic(err) + } + + client, _ := elasticsearch.NewClient(elasticsearch.Config{ + Addresses: []string{"https://localhost:9200"}, + Username: username, + Password: password, + CACert: cert, + }) + + // create retriever component + retriever, _ := es8.NewRetriever(ctx, &es8.RetrieverConfig{ + Client: client, + Index: indexName, + TopK: 5, + SearchMode: search_mode.SearchModeApproximate(&search_mode.ApproximateConfig{ + QueryFieldName: fieldContent, + VectorFieldName: fieldContentVector, + Hybrid: true, + // RRF only available with specific licenses + // see: https://www.elastic.co/subscriptions + RRF: false, + RRFRankConstant: nil, + RRFWindowSize: nil, + }), + ResultParser: func(ctx context.Context, hit types.Hit) (doc *schema.Document, err error) { + doc = &schema.Document{ + ID: *hit.Id_, + Content: "", + MetaData: map[string]any{}, + } + + var src map[string]any + if err = json.Unmarshal(hit.Source_, &src); err != nil { + return nil, err + } + + for field, val := range src { + switch field { + case fieldContent: + doc.Content = val.(string) + case fieldContentVector: + var v []float64 + for _, item := range val.([]interface{}) { + v = append(v, item.(float64)) + } + doc.WithDenseVector(v) + case fieldExtraLocation: + doc.MetaData[docExtraLocation] = val.(string) + } + } + + if hit.Score_ != nil { + doc.WithScore(float64(*hit.Score_)) + } + + return doc, nil + }, + Embedding: emb, // your embedding component + }) + + // search without filter + docs, _ := retriever.Retrieve(ctx, "tourist attraction") + + // search with filter + docs, _ = retriever.Retrieve(ctx, "tourist attraction", + es8.WithFilters([]types.Query{{ + Term: map[string]types.TermQuery{ + fieldExtraLocation: { + CaseInsensitive: of(true), + Value: "China", + }, + }, + }}), + ) +} +``` + +## Configuration + +The retriever can be configured using the `RetrieverConfig` struct: + +```go +type RetrieverConfig struct { + Client *elasticsearch.Client // Required: Elasticsearch client instance + Index string // Required: Index name to retrieve documents from + TopK int // Required: Number of results to return + + // Required: Search mode configuration + SearchMode search_mode.SearchMode + + // Required: Function to parse Elasticsearch hits into Documents + ResultParser func(ctx context.Context, hit types.Hit) (*schema.Document, error) + + // Optional: Required only if query vectorization is needed + Embedding embedding.Embedder +} +``` + +## For More Details + +- [Eino Documentation](https://github.com/cloudwego/eino) +- [Elasticsearch Go Client Documentation](https://github.com/elastic/go-elasticsearch) \ No newline at end of file diff --git a/components/retriever/es8/consts.go b/components/retriever/es8/consts.go new file mode 100644 index 00000000..06ffb53e --- /dev/null +++ b/components/retriever/es8/consts.go @@ -0,0 +1,27 @@ +/* + * Copyright 2024 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package es8 + +const typ = "ElasticSearch8" + +const ( + defaultTopK = 10 +) + +func GetType() string { + return typ +} diff --git a/components/retriever/es8/examples/approximate/approximate.go b/components/retriever/es8/examples/approximate/approximate.go new file mode 100644 index 00000000..3f6dbe6a --- /dev/null +++ b/components/retriever/es8/examples/approximate/approximate.go @@ -0,0 +1,201 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + "github.com/cloudwego/eino/components/embedding" + "github.com/cloudwego/eino/schema" + "github.com/elastic/go-elasticsearch/v8" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + + "github.com/cloudwego/eino-ext/components/retriever/es8" + "github.com/cloudwego/eino-ext/components/retriever/es8/search_mode" +) + +const ( + indexName = "eino_example" + fieldContent = "content" + fieldContentVector = "content_vector" + fieldExtraLocation = "location" + docExtraLocation = "location" +) + +func main() { + ctx := context.Background() + + // es supports multiple ways to connect + username := os.Getenv("ES_USERNAME") + password := os.Getenv("ES_PASSWORD") + httpCACertPath := os.Getenv("ES_HTTP_CA_CERT_PATH") + + cert, err := os.ReadFile(httpCACertPath) + if err != nil { + panic(err) + } + + client, err := elasticsearch.NewClient(elasticsearch.Config{ + Addresses: []string{"https://localhost:9200"}, + Username: username, + Password: password, + CACert: cert, + }) + if err != nil { + panic(err) + } + + emb, err := prepareEmbeddings() + if err != nil { + panic(err) + } + + r, err := es8.NewRetriever(ctx, &es8.RetrieverConfig{ + Client: client, + Index: indexName, + TopK: 5, + SearchMode: search_mode.SearchModeApproximate(&search_mode.ApproximateConfig{ + QueryFieldName: fieldContent, + VectorFieldName: fieldContentVector, + Hybrid: true, + // RRF only available with specific licenses + // see: https://www.elastic.co/subscriptions + RRF: false, + RRFRankConstant: nil, + RRFWindowSize: nil, + }), + ResultParser: func(ctx context.Context, hit types.Hit) (doc *schema.Document, err error) { + doc = &schema.Document{ + ID: *hit.Id_, + Content: "", + MetaData: map[string]any{}, + } + + var src map[string]any + if err = json.Unmarshal(hit.Source_, &src); err != nil { + return nil, err + } + + for field, val := range src { + switch field { + case fieldContent: + doc.Content = val.(string) + + case fieldContentVector: + var v []float64 + for _, item := range val.([]interface{}) { + v = append(v, item.(float64)) + } + doc.WithDenseVector(v) + + case fieldExtraLocation: + doc.MetaData[docExtraLocation] = val.(string) + + default: + return nil, fmt.Errorf("unexpected field=%s, val=%v", field, val) + } + } + + if hit.Score_ != nil { + doc.WithScore(float64(*hit.Score_)) + } + + return doc, nil + }, + Embedding: &mockEmbedding{emb.Dense}, + }) + + // search without filter + docs, err := r.Retrieve(ctx, "tourist attraction") + if err != nil { + panic(err) + } + + fmt.Println("Without Filters") + for _, doc := range docs { + fmt.Printf("id:%s, score=%.2f, location:%s, content:%v\n", + doc.ID, doc.Score(), doc.MetaData[docExtraLocation], doc.Content) + // fmt.Println(doc.DenseVector()) + } + // Without Filters + // id:1, score=0.53, location:France, content:1. Eiffel Tower: Located in Paris, France, it is one of the most famous landmarks in the world, designed by Gustave Eiffel and built in 1889. + // id:2, score=0.51, location:China, content:2. The Great Wall: Located in China, it is one of the Seven Wonders of the World, built from the Qin Dynasty to the Ming Dynasty, with a total length of over 20000 kilometers. + // id:5, score=0.51, location:India, content:5. Taj Mahal: Located in Agra, India, it was completed by Mughal Emperor Shah Jahan in 1653 to commemorate his wife and is one of the New Seven Wonders of the World. + // id:7, score=0.51, location:France, content:7. Louvre Museum: Located in Paris, France, it is one of the largest museums in the world with a rich collection, including Leonardo da Vinci's Mona Lisa and Greece's Venus de Milo. + // id:6, score=0.51, location:Australia, content:6. Sydney Opera House: Located in Sydney Harbour, Australia, it is one of the most iconic buildings of the 20th century, renowned for its unique sailboat design. + + // search with filter + docs, err = r.Retrieve(ctx, "tourist attraction", + es8.WithFilters([]types.Query{ + { + Term: map[string]types.TermQuery{ + fieldExtraLocation: { + CaseInsensitive: of(true), + Value: "China", + }, + }, + }, + }), + ) + if err != nil { + panic(err) + } + + fmt.Println("With Filters") + for _, doc := range docs { + fmt.Printf("id:%s, score=%.2f, location:%s, content:%v\n", + doc.ID, doc.Score(), doc.MetaData[docExtraLocation], doc.Content) + // fmt.Println(doc.DenseVector()) + } + // With Filters + // id:2, score=0.51, location:China, content:2. The Great Wall: Located in China, it is one of the Seven Wonders of the World, built from the Qin Dynasty to the Ming Dynasty, with a total length of over 20000 kilometers. +} + +type localEmbeddings struct { + Dense [][]float64 `json:"dense"` + Sparse []map[int]float64 `json:"sparse"` +} + +func prepareEmbeddings() (*localEmbeddings, error) { + b, err := os.ReadFile("./examples/embeddings.json") + if err != nil { + return nil, err + } + + le := &localEmbeddings{} + if err = json.Unmarshal(b, le); err != nil { + return nil, err + } + + return le, nil +} + +func of[T any](t T) *T { + return &t +} + +// mockEmbedding returns embeddings with 1024 dimensions +type mockEmbedding struct { + dense [][]float64 +} + +func (m mockEmbedding) EmbedStrings(ctx context.Context, texts []string, opts ...embedding.Option) ([][]float64, error) { + return m.dense, nil +} diff --git a/components/retriever/es8/examples/dense_vector_similarity/dense_vector_similarity.go b/components/retriever/es8/examples/dense_vector_similarity/dense_vector_similarity.go new file mode 100644 index 00000000..b7ab3c0c --- /dev/null +++ b/components/retriever/es8/examples/dense_vector_similarity/dense_vector_similarity.go @@ -0,0 +1,195 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + "github.com/cloudwego/eino/components/embedding" + "github.com/cloudwego/eino/schema" + "github.com/elastic/go-elasticsearch/v8" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + + "github.com/cloudwego/eino-ext/components/retriever/es8" + "github.com/cloudwego/eino-ext/components/retriever/es8/search_mode" +) + +const ( + indexName = "eino_example" + fieldContent = "content" + fieldContentVector = "content_vector" + fieldExtraLocation = "location" + docExtraLocation = "location" +) + +func main() { + ctx := context.Background() + + // es supports multiple ways to connect + username := os.Getenv("ES_USERNAME") + password := os.Getenv("ES_PASSWORD") + httpCACertPath := os.Getenv("ES_HTTP_CA_CERT_PATH") + + cert, err := os.ReadFile(httpCACertPath) + if err != nil { + panic(err) + } + + client, err := elasticsearch.NewClient(elasticsearch.Config{ + Addresses: []string{"https://localhost:9200"}, + Username: username, + Password: password, + CACert: cert, + }) + if err != nil { + panic(err) + } + + emb, err := prepareEmbeddings() + if err != nil { + panic(err) + } + + r, err := es8.NewRetriever(ctx, &es8.RetrieverConfig{ + Client: client, + Index: indexName, + TopK: 5, + SearchMode: search_mode.SearchModeDenseVectorSimilarity( + search_mode.DenseVectorSimilarityTypeCosineSimilarity, + fieldContentVector, + ), + ResultParser: func(ctx context.Context, hit types.Hit) (doc *schema.Document, err error) { + doc = &schema.Document{ + ID: *hit.Id_, + Content: "", + MetaData: map[string]any{}, + } + + var src map[string]any + if err = json.Unmarshal(hit.Source_, &src); err != nil { + return nil, err + } + + for field, val := range src { + switch field { + case fieldContent: + doc.Content = val.(string) + + case fieldContentVector: + var v []float64 + for _, item := range val.([]interface{}) { + v = append(v, item.(float64)) + } + doc.WithDenseVector(v) + + case fieldExtraLocation: + doc.MetaData[docExtraLocation] = val.(string) + + default: + return nil, fmt.Errorf("unexpected field=%s, val=%v", field, val) + } + } + + if hit.Score_ != nil { + doc.WithScore(float64(*hit.Score_)) + } + + return doc, nil + }, + Embedding: &mockEmbedding{emb.Dense}, + }) + + // search without filter + docs, err := r.Retrieve(ctx, "tourist attraction") + if err != nil { + panic(err) + } + + fmt.Println("Without Filters") + for _, doc := range docs { + fmt.Printf("id:%s, score=%.2f, location:%s, content:%v\n", + doc.ID, doc.Score(), doc.MetaData[docExtraLocation], doc.Content) + // fmt.Println(doc.DenseVector()) + } + // Without Filters + // id:1, score=1.05, location:France, content:1. Eiffel Tower: Located in Paris, France, it is one of the most famous landmarks in the world, designed by Gustave Eiffel and built in 1889. + // id:2, score=1.03, location:China, content:2. The Great Wall: Located in China, it is one of the Seven Wonders of the World, built from the Qin Dynasty to the Ming Dynasty, with a total length of over 20000 kilometers. + // id:5, score=1.02, location:India, content:5. Taj Mahal: Located in Agra, India, it was completed by Mughal Emperor Shah Jahan in 1653 to commemorate his wife and is one of the New Seven Wonders of the World. + // id:7, score=1.02, location:France, content:7. Louvre Museum: Located in Paris, France, it is one of the largest museums in the world with a rich collection, including Leonardo da Vinci's Mona Lisa and Greece's Venus de Milo. + // id:6, score=1.02, location:Australia, content:6. Sydney Opera House: Located in Sydney Harbour, Australia, it is one of the most iconic buildings of the 20th century, renowned for its unique sailboat design. + + // search with filter + docs, err = r.Retrieve(ctx, "tourist attraction", + es8.WithFilters([]types.Query{ + { + Term: map[string]types.TermQuery{ + fieldExtraLocation: { + CaseInsensitive: of(true), + Value: "China", + }, + }, + }, + }), + ) + if err != nil { + panic(err) + } + + fmt.Println("With Filters") + for _, doc := range docs { + fmt.Printf("id:%s, score=%.2f, location:%s, content:%v\n", + doc.ID, doc.Score(), doc.MetaData[docExtraLocation], doc.Content) + // fmt.Println(doc.DenseVector()) + } + // With Filters + // id:2, score=1.03, location:China, content:2. The Great Wall: Located in China, it is one of the Seven Wonders of the World, built from the Qin Dynasty to the Ming Dynasty, with a total length of over 20000 kilometers. +} + +type localEmbeddings struct { + Dense [][]float64 `json:"dense"` + Sparse []map[int]float64 `json:"sparse"` +} + +func prepareEmbeddings() (*localEmbeddings, error) { + b, err := os.ReadFile("./examples/embeddings.json") + if err != nil { + return nil, err + } + + le := &localEmbeddings{} + if err = json.Unmarshal(b, le); err != nil { + return nil, err + } + + return le, nil +} + +func of[T any](t T) *T { + return &t +} + +// mockEmbedding returns embeddings with 1024 dimensions +type mockEmbedding struct { + dense [][]float64 +} + +func (m mockEmbedding) EmbedStrings(ctx context.Context, texts []string, opts ...embedding.Option) ([][]float64, error) { + return m.dense, nil +} diff --git a/components/retriever/es8/examples/embeddings.json b/components/retriever/es8/examples/embeddings.json new file mode 100644 index 00000000..d6fe4133 --- /dev/null +++ b/components/retriever/es8/examples/embeddings.json @@ -0,0 +1,1037 @@ +{ + "dense": [ + [ + -0.001415252685546875, + -0.009307861328125, + -0.058074951171875, + -0.017425537109375, + -0.00109100341796875, + -0.027923583984375, + -0.02923583984375, + 0.01323699951171875, + 0.021881103515625, + -0.0141754150390625, + 0.0225067138671875, + 0.03289794921875, + -0.004970550537109375, + -0.00970458984375, + 0.0020904541015625, + 0.002086639404296875, + 0.031341552734375, + 0.0134124755859375, + 0.03717041015625, + -0.01544189453125, + -0.017608642578125, + 0.005420684814453125, + -0.030303955078125, + 0.0019969940185546875, + 0.005527496337890625, + 0.013458251953125, + 0.01081085205078125, + 0.0051422119140625, + -0.04730224609375, + 0.01180267333984375, + 0.01354217529296875, + -0.04229736328125, + 0.0100250244140625, + -0.0244140625, + -0.0132904052734375, + -0.07025146484375, + 0.004428863525390625, + 0.0207977294921875, + -0.058685302734375, + 0.0513916015625, + 0.004596710205078125, + 0.0178375244140625, + 0.01500701904296875, + 0.03277587890625, + -0.01461029052734375, + -0.0849609375, + 0.0188140869140625, + -0.01097869873046875, + -0.028350830078125, + -0.028900146484375, + -0.03411865234375, + -0.0157318115234375, + 0.01568603515625, + -0.030181884765625, + 0.005344390869140625, + 0.01174163818359375, + -0.0034027099609375, + 0.0005507469177246094, + -0.06964111328125, + -0.01453399658203125, + -0.0089263916015625, + -0.01239013671875, + -0.0018243789672851562, + 0.00653839111328125, + -0.023284912109375, + 0.1048583984375, + 0.046356201171875, + -0.003574371337890625, + -0.01209259033203125, + -0.023284912109375, + -0.0269927978515625, + 0.0183563232421875, + -0.01287078857421875, + -0.01080322265625, + -0.06591796875, + 0.0089263916015625, + -0.005535125732421875, + 0.044189453125, + 0.018646240234375, + -0.041839599609375, + 0.05133056640625, + -0.049468994140625, + 0.01529693603515625, + 0.062255859375, + -0.0020580291748046875, + 0.06817626953125, + -0.01522064208984375, + -0.00858306884765625, + 0.00829315185546875, + -0.0109405517578125, + -0.001895904541015625, + -0.04449462890625, + 0.0655517578125, + 0.005710601806640625, + -0.034027099609375, + -0.0190277099609375, + -0.01824951171875, + 0.0313720703125, + -0.00022614002227783203, + 0.0229644775390625, + 0.004535675048828125, + 0.01116943359375, + 0.01285552978515625, + -0.0189361572265625, + -0.002857208251953125, + 0.0087127685546875, + 0.0148468017578125, + -0.015777587890625, + 0.0055084228515625, + 0.0029964447021484375, + 0.01172637939453125, + 0.007442474365234375, + 0.002132415771484375, + 0.0167388916015625, + -0.0083160400390625, + -0.0194854736328125, + -0.017059326171875, + 0.01247406005859375, + -0.01030731201171875, + -0.010162353515625, + -0.0501708984375, + 0.016326904296875, + -0.026580810546875, + -0.01201629638671875, + 0.040802001953125, + 0.006130218505859375, + 0.05194091796875, + 0.00795745849609375, + -0.0194549560546875, + -0.0170135498046875, + 0.01898193359375, + 0.0273895263671875, + -0.036224365234375, + 0.0164642333984375, + -0.0272369384765625, + -0.007354736328125, + 0.050384521484375, + -0.00970458984375, + -0.0108795166015625, + -0.04730224609375, + -0.01349639892578125, + 0.046966552734375, + -0.004390716552734375, + -0.0770263671875, + 0.050201416015625, + -0.0052032470703125, + -0.0164337158203125, + 0.0478515625, + -0.01593017578125, + -0.029571533203125, + -0.00647735595703125, + 0.00798797607421875, + 0.027435302734375, + -0.031402587890625, + -0.0193023681640625, + 0.0257110595703125, + -0.02142333984375, + 0.00623321533203125, + -0.02001953125, + -0.0178375244140625, + 0.031341552734375, + -0.0230255126953125, + -0.041900634765625, + 0.010589599609375, + 0.0279693603515625, + 0.00927734375, + 0.04022216796875, + 0.002597808837890625, + 0.0216522216796875, + -0.004077911376953125, + -0.036590576171875, + -0.0458984375, + 0.00525665283203125, + -0.01338958740234375, + 0.0212249755859375, + -0.017364501953125, + 0.047332763671875, + -0.0083465576171875, + 0.0243682861328125, + -0.0491943359375, + -0.053497314453125, + 0.0221405029296875, + 0.0197296142578125, + -0.005199432373046875, + 0.007625579833984375, + 0.0184173583984375, + 0.020050048828125, + 0.01507568359375, + 0.041259765625, + 0.034423828125, + -0.038818359375, + -0.005870819091796875, + 0.004421234130859375, + -0.044097900390625, + 0.073486328125, + -0.0285491943359375, + -0.0253143310546875, + -0.01947021484375, + -0.029693603515625, + -0.0285797119140625, + -0.0269927978515625, + -0.01016998291015625, + -0.0105133056640625, + 0.01088714599609375, + -0.01177215576171875, + -0.004825592041015625, + -0.021240234375, + 0.04437255859375, + 0.04345703125, + -0.057647705078125, + -0.007328033447265625, + -0.019317626953125, + 0.04229736328125, + -0.00504302978515625, + -0.048004150390625, + -0.0028743743896484375, + 0.031280517578125, + 0.027618408203125, + 0.0335693359375, + 0.04962158203125, + -0.00445556640625, + 0.0061798095703125, + -0.0156707763671875, + 0.01088714599609375, + 0.00879669189453125, + 0.0112152099609375, + 0.044952392578125, + 0.0517578125, + -0.0367431640625, + -0.06134033203125, + -0.0029964447021484375, + 0.021942138671875, + -0.0204925537109375, + -0.0231475830078125, + -0.0131988525390625, + 0.0184783935546875, + 0.0010166168212890625, + -0.043243408203125, + 0.0162353515625, + 0.038055419921875, + 0.024078369140625, + 0.0006136894226074219, + 0.01003265380859375, + -0.006511688232421875, + 0.017669677734375, + -0.006519317626953125, + 0.0277099609375, + 0.027587890625, + -0.0049896240234375, + 0.0255126953125, + 0.0053558349609375, + -0.0263671875, + -0.0236968994140625, + 0.039093017578125, + 0.014892578125, + 0.01483917236328125, + 0.0010423660278320312, + -0.002460479736328125, + 0.003814697265625, + -0.002216339111328125, + -0.02679443359375, + -0.0207061767578125, + -0.018280029296875, + 0.040679931640625, + -0.00905609130859375, + -0.0235443115234375, + -0.0227813720703125, + 0.03204345703125, + 0.030426025390625, + -0.0243988037109375, + -0.01470184326171875, + 0.020050048828125, + -0.0226898193359375, + 0.01303863525390625, + 0.024169921875, + 0.0244903564453125, + -0.00482940673828125, + -0.033172607421875, + -0.013092041015625, + -0.0246429443359375, + -0.0012311935424804688, + -0.027069091796875, + 0.0157623291015625, + 0.006053924560546875, + -0.01058197021484375, + 0.027099609375, + -0.0189666748046875, + 0.060272216796875, + -0.00971221923828125, + -0.08111572265625, + -0.04437255859375, + -0.017242431640625, + 0.049713134765625, + -0.0009069442749023438, + 0.0018148422241210938, + -0.0018911361694335938, + -0.0171966552734375, + -0.173583984375, + -0.0129852294921875, + 0.0135345458984375, + 0.00962066650390625, + 0.050506591796875, + -0.0093231201171875, + -0.0745849609375, + -0.05133056640625, + 0.01279449462890625, + -0.02618408203125, + -0.07061767578125, + -0.039642333984375, + -0.0247955322265625, + 0.0269622802734375, + 0.01641845703125, + 0.0138397216796875, + -0.035186767578125, + 0.0037384033203125, + -0.0228424072265625, + -0.0249176025390625, + 0.0190277099609375, + 0.0267333984375, + 0.06781005859375, + 0.006053924560546875, + -0.0209503173828125, + -0.03662109375, + 0.01294708251953125, + 0.01474761962890625, + 0.01311492919921875, + 9.137392044067383e-05, + 0.007904052734375, + -0.0022563934326171875, + -0.010406494140625, + 0.01113128662109375, + 0.0212249755859375, + -0.00839996337890625, + 0.0054779052734375, + -0.002956390380859375, + 0.01514434814453125, + 0.0016984939575195312, + -0.005100250244140625, + 0.054534912109375, + -0.022918701171875, + 0.02679443359375, + -0.0019779205322265625, + -0.0760498046875, + -0.039947509765625, + 0.0204925537109375, + -0.01444244384765625, + 0.01261138916015625, + -0.017852783203125, + -0.00330352783203125, + -0.01678466796875, + -0.0014581680297851562, + -0.048553466796875, + 0.01898193359375, + -0.04541015625, + 0.0390625, + -0.027435302734375, + 0.0026721954345703125, + -0.058197021484375, + -0.05950927734375, + 0.0200347900390625, + -0.0099334716796875, + -0.0282745361328125, + 0.0002617835998535156, + 0.01220703125, + 0.0185089111328125, + 0.00879669189453125, + 0.01525115966796875, + 0.036651611328125, + 0.03216552734375, + -0.0298309326171875, + 0.00614166259765625, + 0.06280517578125, + 0.04302978515625, + 0.0099334716796875, + 0.0232391357421875, + -0.0118865966796875, + -0.11767578125, + -0.0262298583984375, + 0.018798828125, + -0.0232086181640625, + 0.0260772705078125, + -0.045684814453125, + -0.0611572265625, + 0.00615692138671875, + 0.005275726318359375, + 0.01543426513671875, + 0.286865234375, + 0.01209259033203125, + 0.048583984375, + -0.0010471343994140625, + 0.03009033203125, + -0.02313232421875, + -0.07794189453125, + -0.0238800048828125, + -0.0006799697875976562, + -0.02301025390625, + -0.039520263671875, + 0.0290069580078125, + -8.845329284667969e-05, + -0.042144775390625, + -0.00016832351684570312, + 0.0567626953125, + -0.01337432861328125, + 0.02581787109375, + 0.06365966796875, + -0.002330780029296875, + -0.01751708984375, + -0.0307159423828125, + -0.0035037994384765625, + 0.03375244140625, + -0.0014057159423828125, + -0.0207366943359375, + 0.0070343017578125, + -0.0091552734375, + -0.0024394989013671875, + 0.052825927734375, + -0.0155487060546875, + 0.00913238525390625, + 0.00936126708984375, + 0.0155487060546875, + 0.007106781005859375, + -0.022216796875, + -0.058929443359375, + 0.01540374755859375, + -0.041748046875, + 0.01593017578125, + 0.0111083984375, + -0.0195770263671875, + -0.00872802734375, + 0.0286407470703125, + -0.0167236328125, + -0.011627197265625, + 0.03619384765625, + -0.0287933349609375, + -0.0290985107421875, + -0.0082855224609375, + 0.0186767578125, + 0.035736083984375, + -0.034027099609375, + 0.016387939453125, + -0.01552581787109375, + -0.004177093505859375, + -0.0305328369140625, + -0.0214996337890625, + -0.00551605224609375, + 0.03857421875, + 0.0025081634521484375, + 0.018280029296875, + -0.032379150390625, + -0.0027313232421875, + -0.0094757080078125, + 0.0004553794860839844, + -0.003162384033203125, + -0.006061553955078125, + -0.0031452178955078125, + 0.024200439453125, + 0.01168060302734375, + -0.0199127197265625, + -0.01346588134765625, + -0.0007658004760742188, + 0.01476287841796875, + 0.0207061767578125, + -0.0245819091796875, + 0.01287841796875, + 0.01190185546875, + 0.006237030029296875, + 0.03228759765625, + -0.035003662109375, + -0.00980377197265625, + 0.050872802734375, + 0.051177978515625, + 0.015045166015625, + 0.006359100341796875, + 0.044525146484375, + 0.05615234375, + -0.006946563720703125, + 0.00537872314453125, + 0.0118865966796875, + -0.02142333984375, + 0.042755126953125, + 0.0061492919921875, + -0.01422119140625, + 0.006572723388671875, + -0.032989501953125, + -0.047821044921875, + 0.0012044906616210938, + -0.0251922607421875, + 0.00811767578125, + -0.0210113525390625, + -0.004589080810546875, + 0.036163330078125, + -0.0293121337890625, + -0.005840301513671875, + -0.00569915771484375, + -5.549192428588867e-05, + -0.052734375, + 0.0706787109375, + 0.01398468017578125, + -0.018524169921875, + 0.01837158203125, + -0.010589599609375, + 0.0199432373046875, + -0.0240325927734375, + 0.01849365234375, + 0.027740478515625, + 0.044525146484375, + -0.001953125, + -0.0030040740966796875, + -0.03143310546875, + -0.064453125, + -0.0087127685546875, + 0.024658203125, + -0.047698974609375, + 0.0379638671875, + -0.035919189453125, + 0.00931549072265625, + -0.02105712890625, + -0.0289764404296875, + -0.040435791015625, + -0.0003936290740966797, + 0.05029296875, + -0.029144287109375, + 0.039093017578125, + 0.016204833984375, + 0.009002685546875, + -0.024627685546875, + 0.01389312744140625, + 0.0250396728515625, + -0.00412750244140625, + 0.006351470947265625, + 0.01422882080078125, + -0.0273284912109375, + -0.04913330078125, + 0.03887939453125, + -0.01140594482421875, + -0.026153564453125, + 0.039398193359375, + 0.042266845703125, + 0.026123046875, + -0.033905029296875, + -0.003910064697265625, + 0.0126800537109375, + -0.036041259765625, + 0.003292083740234375, + 0.01015472412109375, + -0.0194854736328125, + 0.0305328369140625, + 0.00472259521484375, + 0.0001087188720703125, + 0.08154296875, + -0.0185394287109375, + 0.01375579833984375, + -0.043792724609375, + -0.003368377685546875, + -0.01338958740234375, + 0.03485107421875, + 0.0235595703125, + -0.01702880859375, + -0.041748046875, + 0.043365478515625, + 0.05078125, + 0.002483367919921875, + -0.032073974609375, + 0.035400390625, + -0.032989501953125, + 0.0134124755859375, + 0.02239990234375, + -0.033233642578125, + 0.00359344482421875, + -0.01325225830078125, + 0.0399169921875, + 0.0187530517578125, + -0.01039886474609375, + -0.0257110595703125, + 0.006198883056640625, + -0.032257080078125, + -0.0269317626953125, + 0.051422119140625, + -0.039520263671875, + -0.0110626220703125, + 0.00771331787109375, + 0.00879669189453125, + 0.022918701171875, + -0.01297760009765625, + -0.01476287841796875, + -0.0243377685546875, + -0.036163330078125, + -0.034881591796875, + -0.01102447509765625, + 0.035980224609375, + -0.05078125, + 0.003513336181640625, + -0.023101806640625, + 0.0037403106689453125, + -0.004314422607421875, + -0.012725830078125, + -0.01398468017578125, + 0.00846099853515625, + 0.020111083984375, + 0.0136871337890625, + -0.01534271240234375, + 0.0059356689453125, + 0.02337646484375, + -0.0248870849609375, + -0.01020050048828125, + -0.0009889602661132812, + 0.04248046875, + 0.006015777587890625, + 0.03662109375, + -0.0309600830078125, + -0.016265869140625, + -0.05914306640625, + 0.032989501953125, + -0.00606536865234375, + 0.0281524658203125, + 0.01375579833984375, + 0.00774383544921875, + -0.0191497802734375, + -0.0232086181640625, + 0.010284423828125, + 0.039886474609375, + -0.0033740997314453125, + -0.034515380859375, + 0.019622802734375, + 0.00244140625, + -0.0107269287109375, + 0.022125244140625, + -0.063232421875, + 0.079345703125, + 0.016387939453125, + -0.0050811767578125, + 0.0266571044921875, + -0.0596923828125, + -0.01331329345703125, + 0.034942626953125, + -2.5272369384765625e-05, + -0.0198211669921875, + 0.03485107421875, + 0.0151519775390625, + 0.038330078125, + -0.0289306640625, + -0.0010166168212890625, + 0.0090484619140625, + 0.0022487640380859375, + -0.03851318359375, + -0.033294677734375, + 0.01142120361328125, + 0.056610107421875, + -0.003406524658203125, + -0.034393310546875, + 0.053741455078125, + -0.033782958984375, + 0.0257415771484375, + -0.0261993408203125, + -0.0270843505859375, + -0.0211639404296875, + 0.019012451171875, + -0.0294036865234375, + -0.0382080078125, + 0.00030994415283203125, + 0.00080108642578125, + 0.02130126953125, + 0.02032470703125, + 0.059967041015625, + -0.0276947021484375, + 0.044342041015625, + -0.030059814453125, + 0.0034503936767578125, + -0.026275634765625, + -0.003292083740234375, + -0.02288818359375, + -0.041748046875, + -0.0082550048828125, + 0.01287078857421875, + -0.005626678466796875, + -0.0223541259765625, + -0.035797119140625, + -0.00823974609375, + -0.079833984375, + -0.007198333740234375, + -0.007198333740234375, + 0.0265655517578125, + -0.096435546875, + 0.02508544921875, + -0.0181121826171875, + 0.0010242462158203125, + -0.00769805908203125, + 0.0174560546875, + -0.0175018310546875, + -0.0036773681640625, + -0.0028514862060546875, + -0.0017719268798828125, + 0.01097869873046875, + -0.002765655517578125, + 0.046417236328125, + -0.005870819091796875, + -0.004886627197265625, + 0.007602691650390625, + -0.00942230224609375, + -0.036865234375, + -0.00020360946655273438, + -0.0263519287109375, + 0.013671875, + -0.01297760009765625, + -0.006061553955078125, + -0.033966064453125, + 0.0269317626953125, + 0.0184478759765625, + -0.0030345916748046875, + 0.0325927734375, + -0.01049041748046875, + -0.0076141357421875, + -0.03778076171875, + 0.0645751953125, + -0.01294708251953125, + -0.034027099609375, + -0.021331787109375, + -0.007293701171875, + -0.0234832763671875, + -0.022552490234375, + -0.006587982177734375, + 0.049041748046875, + -0.006500244140625, + -0.034393310546875, + 0.0224456787109375, + 0.041595458984375, + -0.00991058349609375, + 0.078125, + 0.031463623046875, + -0.010650634765625, + 0.0301513671875, + -0.0243988037109375, + -0.033721923828125, + -0.013214111328125, + 0.026336669921875, + -0.001617431640625, + 0.049591064453125, + 0.060546875, + -0.00685882568359375, + -0.043670654296875, + 0.0035610198974609375, + -0.01380157470703125, + -0.0216522216796875, + -0.01486968994140625, + 0.0121612548828125, + 0.0016460418701171875, + -0.017669677734375, + 0.032379150390625, + -0.0653076171875, + 0.03924560546875, + -0.0081024169921875, + 0.01512908935546875, + 0.01340484619140625, + -0.00945281982421875, + -0.01485443115234375, + 0.01494598388671875, + 0.007640838623046875, + 0.02783203125, + -0.004337310791015625, + 0.0211639404296875, + -0.050811767578125, + 0.0328369140625, + -0.040069580078125, + 0.0161895751953125, + 0.01212310791015625, + 0.00852203369140625, + 0.00623321533203125, + 0.01331329345703125, + -0.033447265625, + -0.0280609130859375, + 0.03515625, + -0.0306854248046875, + 0.0280303955078125, + -0.0006117820739746094, + 0.01043701171875, + 0.029815673828125, + -0.040435791015625, + -0.0146942138671875, + -0.00624847412109375, + 0.01311492919921875, + -0.1884765625, + 0.036468505859375, + 0.01094818115234375, + -0.0250244140625, + -0.03131103515625, + 0.037445068359375, + -0.02239990234375, + -0.044586181640625, + 0.03765869140625, + 0.00823211669921875, + -9.298324584960938e-05, + 0.051788330078125, + 0.0209197998046875, + -0.0140228271484375, + 0.003917694091796875, + 0.01025390625, + -0.045623779296875, + 0.0004012584686279297, + 0.0229339599609375, + 0.0204620361328125, + -0.0240631103515625, + -0.01166534423828125, + -0.006862640380859375, + 0.0100250244140625, + -0.0015573501586914062, + -0.032257080078125, + -0.0211029052734375, + 0.0273284912109375, + -0.03167724609375, + -0.038848876953125, + -0.033477783203125, + -0.0743408203125, + 0.038299560546875, + 0.0772705078125, + 0.053863525390625, + 0.0164337158203125, + 0.00902557373046875, + 0.00617218017578125, + -0.02337646484375, + -0.004146575927734375, + 0.0222930908203125, + 0.0005850791931152344, + -0.050018310546875, + 0.00991058349609375, + -7.736682891845703e-05, + 0.04962158203125, + -0.01491546630859375, + -0.0093536376953125, + -0.04107666015625, + -0.01861572265625, + -0.01538848876953125, + 0.010528564453125, + 0.025482177734375, + -0.0197601318359375, + 0.013885498046875, + 0.0212554931640625, + 0.03466796875, + 0.0020427703857421875, + -0.0301513671875, + 0.041595458984375, + -0.03033447265625, + -0.037872314453125, + -0.0229339599609375, + -0.01494598388671875, + -0.01512908935546875, + 0.00963592529296875, + -0.031036376953125, + 0.0201416015625, + 0.0267791748046875, + -0.034088134765625, + 0.0005240440368652344, + -0.027862548828125, + -0.026336669921875, + -0.04083251953125, + 0.030181884765625, + 0.050079345703125, + 0.042449951171875, + -0.0012865066528320312, + -0.035614013671875, + 0.03460693359375, + -0.0660400390625, + 0.003627777099609375, + 0.054046630859375, + -0.007625579833984375, + -0.020050048828125, + 0.026031494140625, + -0.0168609619140625, + 0.0200347900390625, + -0.06744384765625, + 0.00359344482421875, + -0.045379638671875, + -0.0207366943359375, + -0.005741119384765625, + 0.0137176513671875, + -0.04559326171875, + 0.0113525390625, + 0.0022983551025390625, + -0.040618896484375, + 0.0396728515625, + -0.031158447265625, + 0.0225830078125, + -0.0280303955078125, + 0.02850341796875, + -0.015045166015625, + -0.02667236328125, + 0.032196044921875, + -0.0199127197265625, + -0.0120849609375, + -0.01355743408203125, + -0.01580810546875, + -0.05963134765625, + 0.0018968582153320312, + -0.01947021484375, + 0.0279388427734375, + -0.005115509033203125, + -0.0064697265625, + 0.0098724365234375, + -0.006603240966796875, + -0.005710601806640625, + 0.01410675048828125, + 0.0030612945556640625, + 0.0030689239501953125, + 0.05279541015625, + -0.054595947265625, + -0.003017425537109375, + 0.0384521484375, + 0.07733154296875, + 0.027679443359375, + 0.036773681640625, + 0.005153656005859375, + 0.03826904296875, + 0.06988525390625, + -0.00830078125, + 0.01538848876953125, + -0.00921630859375, + -0.01140594482421875, + -0.0209503173828125, + 0.057586669921875, + 0.059051513671875, + -0.0257110595703125, + -0.02777099609375, + -0.006237030029296875, + -0.01262664794921875, + -0.00940704345703125, + -0.01092529296875, + -0.006572723388671875, + 0.026397705078125, + -0.0207366943359375, + 0.02667236328125, + -0.061920166015625, + 0.044219970703125, + 0.0020580291748046875, + -0.0258941650390625, + -0.0014371871948242188, + -0.04864501953125, + 0.0170135498046875, + -0.037689208984375, + -0.0338134765625, + 0.044189453125, + -0.005828857421875, + -0.031951904296875, + -0.0179443359375, + -0.0005812644958496094, + 0.007373809814453125, + -0.0166473388671875, + -0.005733489990234375, + 0.0108795166015625, + -0.00435638427734375, + 0.0280609130859375, + 0.0002111196517944336, + -0.0293426513671875, + 0.0260772705078125, + -0.015777587890625, + 0.065673828125, + 0.028045654296875, + 0.0166778564453125, + 0.021453857421875, + 0.036407470703125, + 0.00995635986328125, + 0.0328369140625, + 0.0247955322265625, + 0.037445068359375, + 0.0290679931640625, + 0.0263671875, + 5.543231964111328e-05, + 0.015289306640625, + -0.014984130859375, + 0.004039764404296875, + 0.0296783447265625, + -0.01554107666015625, + -0.01483917236328125, + -0.0113067626953125, + -0.018157958984375, + 0.0316162109375, + 0.00469970703125, + -0.05279541015625, + 0.01409149169921875, + 0.039886474609375, + 0.0120849609375, + -0.0028934478759765625, + 0.0004813671112060547, + -0.01218414306640625, + 0.03216552734375, + -0.04205322265625, + -0.0144805908203125, + 0.033172607421875, + 0.0022182464599609375, + 0.04132080078125, + -0.035888671875, + 0.0251922607421875, + -0.034271240234375, + -0.022796630859375, + -0.01016998291015625, + 0.0360107421875, + 0.0178070068359375, + -0.0024280548095703125, + 0.0030078887939453125, + 0.010101318359375, + 0.00850677490234375, + 0.034637451171875, + 0.0023288726806640625, + 0.031707763671875, + 0.00739288330078125, + 0.032562255859375, + -0.0260009765625, + -0.01548004150390625, + 0.00811767578125, + 0.0198211669921875, + -0.000263214111328125, + -0.0016546249389648438, + -0.00617218017578125, + 0.004756927490234375, + -0.014129638671875, + 0.044830322265625, + -0.041412353515625, + -0.023773193359375, + 0.06097412109375, + -0.00322723388671875, + -0.033447265625, + -0.0251617431640625, + 0.009735107421875, + 0.0018644332885742188, + -0.0479736328125, + 0.0161590576171875 + ] + ], + "sparse": [ + { + "135474": 0.252197265625, + "99": 0.1512451171875, + "117474": 0.2490234375 + } + ] +} \ No newline at end of file diff --git a/components/retriever/es8/examples/sparse_vector_query/sparse_vector_query.go b/components/retriever/es8/examples/sparse_vector_query/sparse_vector_query.go new file mode 100644 index 00000000..a0e44863 --- /dev/null +++ b/components/retriever/es8/examples/sparse_vector_query/sparse_vector_query.go @@ -0,0 +1,207 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + "strconv" + + "github.com/cloudwego/eino/schema" + "github.com/elastic/go-elasticsearch/v8" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + + "github.com/cloudwego/eino-ext/components/retriever/es8" + "github.com/cloudwego/eino-ext/components/retriever/es8/search_mode" +) + +const ( + indexName = "eino_example_sparse" + fieldContent = "content" + fieldContentDenseVector = "content_dense_vector" + fieldContentSparseVector = "content_sparse_vector" + fieldExtraLocation = "location" + docExtraLocation = "location" +) + +func main() { + ctx := context.Background() + + // es supports multiple ways to connect + username := os.Getenv("ES_USERNAME") + password := os.Getenv("ES_PASSWORD") + httpCACertPath := os.Getenv("ES_HTTP_CA_CERT_PATH") + + cert, err := os.ReadFile(httpCACertPath) + if err != nil { + panic(err) + } + + client, err := elasticsearch.NewClient(elasticsearch.Config{ + Addresses: []string{"https://localhost:9200"}, + Username: username, + Password: password, + CACert: cert, + }) + if err != nil { + panic(err) + } + + emb, err := prepareEmbeddings() + if err != nil { + panic(err) + } + + r, err := es8.NewRetriever(ctx, &es8.RetrieverConfig{ + Client: client, + Index: indexName, + TopK: 5, + SearchMode: search_mode.SearchModeSparseVectorQuery(&search_mode.SparseVectorQueryConfig{ + Field: fieldContentSparseVector, + InferenceID: nil, // use sparse vector from option, replace with inference id if you have one. + }), + ResultParser: func(ctx context.Context, hit types.Hit) (doc *schema.Document, err error) { + doc = &schema.Document{ + ID: *hit.Id_, + Content: "", + MetaData: map[string]any{}, + } + + var src map[string]any + if err = json.Unmarshal(hit.Source_, &src); err != nil { + return nil, err + } + + for field, val := range src { + switch field { + case fieldContent: + doc.Content = val.(string) + + case fieldContentDenseVector: + var v []float64 + for _, item := range val.([]interface{}) { + v = append(v, item.(float64)) + } + doc.WithDenseVector(v) + + case fieldContentSparseVector: + raw := val.(map[string]interface{}) + sparse := make(map[int]float64, len(raw)) + for k, v := range raw { + id, err := strconv.ParseInt(k, 10, 64) + if err != nil { + return nil, err + } + + sparse[int(id)] = v.(float64) + } + + case fieldExtraLocation: + doc.MetaData[docExtraLocation] = val.(string) + + default: + return nil, fmt.Errorf("unexpected field=%s, val=%v", field, val) + } + } + + if hit.Score_ != nil { + doc.WithScore(float64(*hit.Score_)) + } + + return doc, nil + }, + Embedding: nil, + }) + + // search without filter + docs, err := r.Retrieve(ctx, "tourist attraction", + es8.WithSparseVector(convertSparse(emb.Sparse[0])), + ) + if err != nil { + panic(err) + } + + fmt.Println("Without Filters") + for _, doc := range docs { + fmt.Printf("id:%s, score=%.2f, location:%s, content:%v\n", + doc.ID, doc.Score(), doc.MetaData[docExtraLocation], doc.Content) + // fmt.Println(doc.DenseVector()) + } + // Without Filters + // id:8, score=0.08, location:Border of the United States and Canada, content:8. Niagara Falls: located at the border of the United States and Canada, consisting of three main waterfalls, its spectacular scenery attracts millions of tourists every year. + + // search with filter + docs, err = r.Retrieve(ctx, "tourist attraction", + es8.WithSparseVector(convertSparse(emb.Sparse[0])), + es8.WithFilters([]types.Query{ + { + Term: map[string]types.TermQuery{ + fieldExtraLocation: { + CaseInsensitive: of(true), + Value: "China", + }, + }, + }, + }), + ) + if err != nil { + panic(err) + } + + fmt.Println("With Filters") + for _, doc := range docs { + fmt.Printf("id:%s, score=%.2f, location:%s, content:%v\n", + doc.ID, doc.Score(), doc.MetaData[docExtraLocation], doc.Content) + // fmt.Println(doc.DenseVector()) + } + // With Filters + // id:2, score=0.00, location:China, content:2. The Great Wall: Located in China, it is one of the Seven Wonders of the World, built from the Qin Dynasty to the Ming Dynasty, with a total length of over 20000 kilometers. +} + +type localEmbeddings struct { + Dense [][]float64 `json:"dense"` + Sparse []map[int]float64 `json:"sparse"` +} + +func prepareEmbeddings() (*localEmbeddings, error) { + b, err := os.ReadFile("./examples/embeddings.json") + if err != nil { + return nil, err + } + + le := &localEmbeddings{} + if err = json.Unmarshal(b, le); err != nil { + return nil, err + } + + return le, nil +} + +func of[T any](t T) *T { + return &t +} + +func convertSparse(src map[int]float64) map[string]float32 { + resp := make(map[string]float32, len(src)) + for id, val := range src { + resp[strconv.FormatInt(int64(id), 10)] = float32(val) + } + + return resp +} diff --git a/components/retriever/es8/go.mod b/components/retriever/es8/go.mod new file mode 100644 index 00000000..d62c84e6 --- /dev/null +++ b/components/retriever/es8/go.mod @@ -0,0 +1,55 @@ +module github.com/cloudwego/eino-ext/components/retriever/es8 + +go 1.22 + +require ( + github.com/bytedance/mockey v1.2.13 + github.com/cloudwego/eino v0.3.6 + github.com/elastic/go-elasticsearch/v8 v8.16.0 + github.com/smartystreets/goconvey v1.8.1 + github.com/stretchr/testify v1.9.0 +) + +require ( + github.com/bytedance/sonic v1.12.2 // indirect + github.com/bytedance/sonic/loader v0.2.0 // indirect + github.com/cloudwego/base64x v0.1.4 // indirect + github.com/cloudwego/iasm v0.2.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/elastic/elastic-transport-go/v8 v8.6.0 // indirect + github.com/getkin/kin-openapi v0.118.0 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/swag v0.19.5 // indirect + github.com/goph/emperror v0.17.2 // indirect + github.com/gopherjs/gopherjs v1.17.2 // indirect + github.com/invopop/yaml v0.1.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/jtolds/gls v4.20.0+incompatible // indirect + github.com/klauspost/cpuid/v2 v2.0.9 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect + github.com/nikolalohinski/gonja v1.5.3 // indirect + github.com/pelletier/go-toml/v2 v2.0.9 // indirect + github.com/perimeterx/marshmallow v1.1.4 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/slongfield/pyfmt v0.0.0-20220222012616-ea85ff4c361f // indirect + github.com/smarty/assertions v1.15.0 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/yargevad/filepathx v1.0.0 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect + golang.org/x/arch v0.11.0 // indirect + golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect + golang.org/x/sys v0.26.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/components/retriever/es8/go.sum b/components/retriever/es8/go.sum new file mode 100644 index 00000000..7b9198f1 --- /dev/null +++ b/components/retriever/es8/go.sum @@ -0,0 +1,181 @@ +github.com/airbrake/gobrake v3.6.1+incompatible/go.mod h1:wM4gu3Cn0W0K7GUuVWnlXZU11AGBXMILnrdOU8Kn00o= +github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bugsnag/bugsnag-go v1.4.0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/bytedance/mockey v1.2.13 h1:jokWZAm/pUEbD939Rhznz615MKUCZNuvCFQlJ2+ntoo= +github.com/bytedance/mockey v1.2.13/go.mod h1:1BPHF9sol5R1ud/+0VEHGQq/+i2lN+GTsr3O2Q9IENY= +github.com/bytedance/sonic v1.12.2 h1:oaMFuRTpMHYLpCntGca65YWt5ny+wAceDERTkT2L9lg= +github.com/bytedance/sonic v1.12.2/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.0 h1:zNprn+lsIP06C/IqCHs3gPQIvnvpKbbxyXQP1iU4kWM= +github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/cloudwego/eino v0.3.5 h1:9PkAOX/phFifrGXkfl4L9rdecxOQJBJY1FtZqF4bz3c= +github.com/cloudwego/eino v0.3.5/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.6 h1:3yfdKKxMVWefdOyGXHuqUMM5cc9iioijj2mpPsDZKIg= +github.com/cloudwego/eino v0.3.6/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA= +github.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= +github.com/elastic/go-elasticsearch/v8 v8.16.0 h1:f7bR+iBz8GTAVhwyFO3hm4ixsz2eMaEy0QroYnXV3jE= +github.com/elastic/go-elasticsearch/v8 v8.16.0/go.mod h1:lGMlgKIbYoRvay3xWBeKahAiJOgmFDsjZC39nmO3H64= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM= +github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/goph/emperror v0.17.2 h1:yLapQcmEsO0ipe9p5TaN22djm3OFV/TfM/fcYP0/J18= +github.com/goph/emperror v0.17.2/go.mod h1:+ZbQ+fUNO/6FNiUo0ujtMjhgad9Xa6fQL9KhH4LNHic= +github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g= +github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/invopop/yaml v0.1.0 h1:YW3WGUoJEXYfzWBjn00zIlrw7brGVD0fUKRYDPAPhrc= +github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= +github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/nikolalohinski/gonja v1.5.3 h1:GsA+EEaZDZPGJ8JtpeGN78jidhOlxeJROpqMT9fTj9c= +github.com/nikolalohinski/gonja v1.5.3/go.mod h1:RmjwxNiXAEqcq1HeK5SSMmqFJvKOfTfXhkJv6YBtPa4= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= +github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/perimeterx/marshmallow v1.1.4 h1:pZLDH9RjlLGGorbXhcaQLhfuV0pFMNfPO55FuFkxqLw= +github.com/perimeterx/marshmallow v1.1.4/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rollbar/rollbar-go v1.0.2/go.mod h1:AcFs5f0I+c71bpHlXNNDbOWJiKwjFDtISeXco0L5PKQ= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/slongfield/pyfmt v0.0.0-20220222012616-ea85ff4c361f h1:Z2cODYsUxQPofhpYRMQVwWz4yUVpHF+vPi+eUdruUYI= +github.com/slongfield/pyfmt v0.0.0-20220222012616-ea85ff4c361f/go.mod h1:JqzWyvTuI2X4+9wOHmKSQCYxybB/8j6Ko43qVmXDuZg= +github.com/smarty/assertions v1.15.0 h1:cR//PqUBUiQRakZWqBiFFQ9wb8emQGDb0HeGdqGByCY= +github.com/smarty/assertions v1.15.0/go.mod h1:yABtdzeQs6l1brC900WlRNwj6ZR55d7B+E8C6HtKdec= +github.com/smartystreets/goconvey v1.8.1 h1:qGjIddxOk4grTu9JPOU31tVfq3cNdBlNa5sSznIX1xY= +github.com/smartystreets/goconvey v1.8.1/go.mod h1:+/u4qLyY6x1jReYOp7GOM2FSt8aP9CzCZL03bI28W60= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +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/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= +github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= +github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= +github.com/yargevad/filepathx v1.0.0 h1:SYcT+N3tYGi+NvazubCNlvgIPbzAk7i7y2dwg3I5FYc= +github.com/yargevad/filepathx v1.0.0/go.mod h1:BprfX/gpYNJHJfc35GjRRpVcwWXS89gGulUIU5tK3tA= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= +go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= +go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= +golang.org/x/arch v0.11.0 h1:KXV8WWKCXm6tRpLirl2szsO5j/oOODwZf4hATmGVNs4= +golang.org/x/arch v0.11.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= diff --git a/components/retriever/es8/option.go b/components/retriever/es8/option.go new file mode 100644 index 00000000..8f0e0b00 --- /dev/null +++ b/components/retriever/es8/option.go @@ -0,0 +1,47 @@ +/* + * Copyright 2024 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package es8 + +import ( + "github.com/cloudwego/eino/components/retriever" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + +// ImplOptions es specified options +// Use retriever.GetImplSpecificOptions[ImplOptions] to get ImplOptions from options. +type ImplOptions struct { + Filters []types.Query `json:"filters,omitempty"` + SparseVector map[string]float32 `json:"sparse_vector,omitempty"` +} + +// WithFilters set filters for retrieve query. +// This may take effect in search modes. +func WithFilters(filters []types.Query) retriever.Option { + return retriever.WrapImplSpecificOptFn(func(o *ImplOptions) { + o.Filters = filters + }) +} + +// WithSparseVector set sparse vector for retrieve query. +// For example, a stored vector {"feature_0": 0.12, "feature_1": 1.2, "feature_2": 3.0}. +// Eino prefers to define sparse vector as int token id to float32 vector mapping, so you may +// convert integer token id to string token. +func WithSparseVector(sparse map[string]float32) retriever.Option { + return retriever.WrapImplSpecificOptFn(func(o *ImplOptions) { + o.SparseVector = sparse + }) +} diff --git a/components/retriever/es8/retriever.go b/components/retriever/es8/retriever.go new file mode 100644 index 00000000..2335e875 --- /dev/null +++ b/components/retriever/es8/retriever.go @@ -0,0 +1,154 @@ +/* + * Copyright 2024 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package es8 + +import ( + "context" + "fmt" + + "github.com/elastic/go-elasticsearch/v8" + "github.com/elastic/go-elasticsearch/v8/typedapi/core/search" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + + "github.com/cloudwego/eino/callbacks" + "github.com/cloudwego/eino/components/embedding" + "github.com/cloudwego/eino/components/retriever" + "github.com/cloudwego/eino/schema" +) + +type RetrieverConfig struct { + Client *elasticsearch.Client `json:"client"` + + Index string `json:"index"` + // TopK number of result to return as top hits. + // Default is 10 + TopK int `json:"top_k"` + ScoreThreshold *float64 `json:"score_threshold"` + + // SearchMode retrieve strategy, see prepared impls in search_mode package: + // use search_mode.SearchModeExactMatch with string query + // use search_mode.SearchModeApproximate with search_mode.ApproximateQuery + // use search_mode.SearchModeDenseVectorSimilarity with search_mode.DenseVectorSimilarityQuery + // use search_mode.SearchModeSparseVectorTextExpansion with search_mode.SparseVectorTextExpansionQuery + // use search_mode.SearchModeRawStringRequest with json search request + SearchMode SearchMode `json:"search_mode"` + // ResultParser parse document from es search hits. + // If ResultParser not provided, defaultResultParser will be used as default + ResultParser func(ctx context.Context, hit types.Hit) (doc *schema.Document, err error) + // Embedding vectorization method, must provide when SearchMode needed + Embedding embedding.Embedder +} + +type SearchMode interface { + // BuildRequest generate search request from config, query and options. + // Additionally, some specified options (like filters for query) will be provided in options, + // and use retriever.GetImplSpecificOptions[options.ImplOptions] to get it. + BuildRequest(ctx context.Context, conf *RetrieverConfig, query string, opts ...retriever.Option) (*search.Request, error) +} + +type Retriever struct { + client *elasticsearch.Client + config *RetrieverConfig +} + +func NewRetriever(_ context.Context, conf *RetrieverConfig) (*Retriever, error) { + if conf.SearchMode == nil { + return nil, fmt.Errorf("[NewRetriever] search mode not provided") + } + + if conf.TopK == 0 { + conf.TopK = defaultTopK + } + + if conf.ResultParser == nil { + return nil, fmt.Errorf("[NewRetriever] result parser not provided") + } + + if conf.Client == nil { + return nil, fmt.Errorf("[NewRetriever] es client not provided") + } + return &Retriever{ + client: conf.Client, + config: conf, + }, nil +} + +func (r *Retriever) Retrieve(ctx context.Context, query string, opts ...retriever.Option) (docs []*schema.Document, err error) { + defer func() { + if err != nil { + callbacks.OnError(ctx, err) + } + }() + + options := retriever.GetCommonOptions(&retriever.Options{ + Index: &r.config.Index, + TopK: &r.config.TopK, + ScoreThreshold: r.config.ScoreThreshold, + Embedding: r.config.Embedding, + }, opts...) + + ctx = callbacks.OnStart(ctx, &retriever.CallbackInput{ + Query: query, + TopK: *options.TopK, + ScoreThreshold: options.ScoreThreshold, + }) + + req, err := r.config.SearchMode.BuildRequest(ctx, r.config, query, opts...) + if err != nil { + return nil, err + } + + resp, err := search.NewSearchFunc(r.client)(). + Index(r.config.Index). + Request(req). + Do(ctx) + if err != nil { + return nil, err + } + + docs, err = r.parseSearchResult(ctx, resp) + if err != nil { + return nil, err + } + + callbacks.OnEnd(ctx, &retriever.CallbackOutput{Docs: docs}) + + return docs, nil +} + +func (r *Retriever) parseSearchResult(ctx context.Context, resp *search.Response) (docs []*schema.Document, err error) { + docs = make([]*schema.Document, 0, len(resp.Hits.Hits)) + + for _, hit := range resp.Hits.Hits { + doc, err := r.config.ResultParser(ctx, hit) + if err != nil { + return nil, err + } + + docs = append(docs, doc) + } + + return docs, nil +} + +func (r *Retriever) GetType() string { + return typ +} + +func (r *Retriever) IsCallbacksEnabled() bool { + return true +} diff --git a/components/retriever/es8/retriever_test.go b/components/retriever/es8/retriever_test.go new file mode 100644 index 00000000..211360fd --- /dev/null +++ b/components/retriever/es8/retriever_test.go @@ -0,0 +1,101 @@ +/* + * Copyright 2024 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package es8 + +import ( + "context" + "encoding/json" + "fmt" + "testing" + + "github.com/bytedance/mockey" + "github.com/cloudwego/eino/components/retriever" + "github.com/cloudwego/eino/schema" + "github.com/elastic/go-elasticsearch/v8" + "github.com/elastic/go-elasticsearch/v8/typedapi/core/search" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/stretchr/testify/assert" +) + +func TestNewRetriever(t *testing.T) { + ctx := context.Background() + + t.Run("retrieve_documents", func(t *testing.T) { + r, err := NewRetriever(ctx, &RetrieverConfig{ + Client: &elasticsearch.Client{}, + Index: "eino_ut", + TopK: 10, + ResultParser: func(ctx context.Context, hit types.Hit) (doc *schema.Document, err error) { + var mp map[string]any + if err := json.Unmarshal(hit.Source_, &mp); err != nil { + return nil, err + } + + var id string + if hit.Id_ != nil { + id = *hit.Id_ + } + + content, ok := mp["eino_doc_content"].(string) + if !ok { + return nil, fmt.Errorf("content not found") + } + + return &schema.Document{ + ID: id, + Content: content, + MetaData: nil, + }, nil + }, + SearchMode: &mockSearchMode{}, + }) + assert.NoError(t, err) + + mockSearch := search.NewSearchFunc(r.client)() + + defer mockey.Mock(mockey.GetMethod(mockSearch, "Index")). + Return(mockSearch).Build().Patch().UnPatch() + + defer mockey.Mock(mockey.GetMethod(mockSearch, "Request")). + Return(mockSearch).Build().Patch().UnPatch() + + defer mockey.Mock(mockey.GetMethod(mockSearch, "Do")).Return(&search.Response{ + Hits: types.HitsMetadata{ + Hits: []types.Hit{ + { + Source_: json.RawMessage([]byte(`{ + "eino_doc_content": "i'm fine, thank you" +}`)), + }, + }, + }, + }, nil).Build().Patch().UnPatch() + + docs, err := r.Retrieve(ctx, "how are you") + assert.NoError(t, err) + + assert.Len(t, docs, 1) + assert.Equal(t, "i'm fine, thank you", docs[0].Content) + }) + +} + +type mockSearchMode struct{} + +func (m *mockSearchMode) BuildRequest(ctx context.Context, conf *RetrieverConfig, query string, opts ...retriever.Option) (*search.Request, error) { + return &search.Request{}, nil +} diff --git a/components/retriever/es8/search_mode/approximate.go b/components/retriever/es8/search_mode/approximate.go new file mode 100644 index 00000000..531770d5 --- /dev/null +++ b/components/retriever/es8/search_mode/approximate.go @@ -0,0 +1,147 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package search_mode + +import ( + "context" + "fmt" + + "github.com/cloudwego/eino/components/retriever" + "github.com/elastic/go-elasticsearch/v8/typedapi/core/search" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + + "github.com/cloudwego/eino-ext/components/retriever/es8" +) + +// SearchModeApproximate retrieve with multiple approximate strategy (filter+knn+rrf) +// knn: https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html +// rrf: https://www.elastic.co/guide/en/elasticsearch/reference/current/rrf.html +func SearchModeApproximate(config *ApproximateConfig) es8.SearchMode { + return &approximate{config} +} + +type ApproximateConfig struct { + // QueryFieldName the name of query field, required when using Hybrid + QueryFieldName string + // VectorFieldName the name of the vector field to search against, required + VectorFieldName string + // Hybrid if true, add filters and rff to knn query + Hybrid bool + // RRF (Reciprocal Rank Fusion) is a method for combining multiple result sets, is used to + // even the score from the knn query and text query + // RRF only available with specific licenses, see: https://www.elastic.co/subscriptions + RRF bool + // RRFRankConstant determines how much influence documents in + // individual result sets per query have over the final ranked result set + RRFRankConstant *int64 + // RRFWindowSize determines the size ptrWithoutZero the individual result sets per query + RRFWindowSize *int64 + // QueryVectorBuilderModelID the query vector builder model id + // see: https://www.elastic.co/guide/en/machine-learning/8.16/ml-nlp-text-emb-vector-search-example.html + QueryVectorBuilderModelID *string + // Boost Floating point number used to decrease or increase the relevance scores ptrWithoutZero the query. + // Boost values are relative to the default value ptrWithoutZero 1.0. + // A boost value between 0 and 1.0 decreases the relevance score. + // A value greater than 1.0 increases the relevance score. + Boost *float32 + // K The final number ptrWithoutZero nearest neighbors to return as top hits + K *int + // NumCandidates The number ptrWithoutZero nearest neighbor candidates to consider per shard + NumCandidates *int + // Similarity The minimum similarity for a vector to be considered a match + Similarity *float32 +} + +type approximate struct { + config *ApproximateConfig +} + +func (a *approximate) BuildRequest(ctx context.Context, conf *es8.RetrieverConfig, query string, opts ...retriever.Option) (*search.Request, error) { + + co := retriever.GetCommonOptions(&retriever.Options{ + Index: ptrWithoutZero(conf.Index), + TopK: ptrWithoutZero(conf.TopK), + ScoreThreshold: conf.ScoreThreshold, + Embedding: conf.Embedding, + }, opts...) + + io := retriever.GetImplSpecificOptions[es8.ImplOptions](nil, opts...) + + knn := types.KnnSearch{ + Boost: a.config.Boost, + Field: a.config.VectorFieldName, + Filter: io.Filters, + K: a.config.K, + NumCandidates: a.config.NumCandidates, + QueryVector: nil, + QueryVectorBuilder: nil, + Similarity: a.config.Similarity, + } + + if a.config.QueryVectorBuilderModelID != nil { + knn.QueryVectorBuilder = &types.QueryVectorBuilder{TextEmbedding: &types.TextEmbedding{ + ModelId: *a.config.QueryVectorBuilderModelID, + ModelText: query, + }} + } else { + emb := co.Embedding + if emb == nil { + return nil, fmt.Errorf("[BuildRequest][SearchModeApproximate] embedding not provided") + } + + vector, err := emb.EmbedStrings(makeEmbeddingCtx(ctx, emb), []string{query}) + if err != nil { + return nil, fmt.Errorf("[BuildRequest][SearchModeApproximate] embedding failed, %w", err) + } + + if len(vector) != 1 { + return nil, fmt.Errorf("[BuildRequest][SearchModeApproximate] vector len error, expected=1, got=%d", len(vector)) + } + + knn.QueryVector = f64To32(vector[0]) + } + + req := &search.Request{Knn: []types.KnnSearch{knn}, Size: co.TopK} + + if a.config.Hybrid { + req.Query = &types.Query{ + Bool: &types.BoolQuery{ + Filter: io.Filters, + Must: []types.Query{ + { + Match: map[string]types.MatchQuery{ + a.config.QueryFieldName: {Query: query}, + }, + }, + }, + }, + } + + if a.config.RRF { + req.Rank = &types.RankContainer{Rrf: &types.RrfRank{ + RankConstant: a.config.RRFRankConstant, + RankWindowSize: a.config.RRFWindowSize, + }} + } + } + + if co.ScoreThreshold != nil { + req.MinScore = (*types.Float64)(ptrWithoutZero(*co.ScoreThreshold)) + } + + return req, nil +} diff --git a/components/retriever/es8/search_mode/approximate_test.go b/components/retriever/es8/search_mode/approximate_test.go new file mode 100644 index 00000000..2c787ff7 --- /dev/null +++ b/components/retriever/es8/search_mode/approximate_test.go @@ -0,0 +1,138 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package search_mode + +import ( + "context" + "encoding/json" + "testing" + + . "github.com/bytedance/mockey" + "github.com/cloudwego/eino-ext/components/retriever/es8" + "github.com/cloudwego/eino/components/embedding" + "github.com/cloudwego/eino/components/retriever" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/smartystreets/goconvey/convey" +) + +func TestSearchModeApproximate(t *testing.T) { + PatchConvey("test SearchModeApproximate", t, func() { + PatchConvey("test BuildRequest", func() { + ctx := context.Background() + queryFieldName := "eino_doc_content" + vectorFieldName := "vector_eino_doc_content" + query := "content" + + PatchConvey("test QueryVectorBuilderModelID", func() { + a := &approximate{config: &ApproximateConfig{ + QueryFieldName: queryFieldName, + VectorFieldName: vectorFieldName, + Hybrid: false, + RRF: false, + RRFRankConstant: nil, + RRFWindowSize: nil, + QueryVectorBuilderModelID: ptrWithoutZero("mock_model"), + Boost: ptrWithoutZero(float32(1.0)), + K: ptrWithoutZero(10), + NumCandidates: ptrWithoutZero(100), + Similarity: ptrWithoutZero(float32(0.5)), + }} + + conf := &es8.RetrieverConfig{} + req, err := a.BuildRequest(ctx, conf, query, + retriever.WithEmbedding(nil), + es8.WithFilters([]types.Query{ + {Match: map[string]types.MatchQuery{"label": {Query: "good"}}}, + })) + convey.So(err, convey.ShouldBeNil) + b, err := json.Marshal(req) + convey.So(err, convey.ShouldBeNil) + convey.So(string(b), convey.ShouldEqual, `{"knn":[{"boost":1,"field":"vector_eino_doc_content","filter":[{"match":{"label":{"query":"good"}}}],"k":10,"num_candidates":100,"query_vector_builder":{"text_embedding":{"model_id":"mock_model","model_text":"content"}},"similarity":0.5}]}`) + }) + + PatchConvey("test embedding", func() { + a := &approximate{config: &ApproximateConfig{ + QueryFieldName: queryFieldName, + VectorFieldName: vectorFieldName, + Hybrid: false, + RRF: false, + RRFRankConstant: nil, + RRFWindowSize: nil, + QueryVectorBuilderModelID: nil, + Boost: ptrWithoutZero(float32(1.0)), + K: ptrWithoutZero(10), + NumCandidates: ptrWithoutZero(100), + Similarity: ptrWithoutZero(float32(0.5)), + }} + + conf := &es8.RetrieverConfig{} + req, err := a.BuildRequest(ctx, conf, query, + retriever.WithEmbedding(&mockEmbedding{size: 1, mockVector: []float64{1.1, 1.2}}), + es8.WithFilters([]types.Query{ + {Match: map[string]types.MatchQuery{"label": {Query: "good"}}}, + })) + convey.So(err, convey.ShouldBeNil) + b, err := json.Marshal(req) + convey.So(err, convey.ShouldBeNil) + convey.So(string(b), convey.ShouldEqual, `{"knn":[{"boost":1,"field":"vector_eino_doc_content","filter":[{"match":{"label":{"query":"good"}}}],"k":10,"num_candidates":100,"query_vector":[1.1,1.2],"similarity":0.5}]}`) + }) + + PatchConvey("test hybrid with rrf", func() { + a := &approximate{config: &ApproximateConfig{ + QueryFieldName: queryFieldName, + VectorFieldName: vectorFieldName, + Hybrid: true, + RRF: true, + RRFRankConstant: ptrWithoutZero(int64(10)), + RRFWindowSize: ptrWithoutZero(int64(5)), + QueryVectorBuilderModelID: nil, + Boost: ptrWithoutZero(float32(1.0)), + K: ptrWithoutZero(10), + NumCandidates: ptrWithoutZero(100), + Similarity: ptrWithoutZero(float32(0.5)), + }} + + conf := &es8.RetrieverConfig{} + req, err := a.BuildRequest(ctx, conf, query, + retriever.WithEmbedding(&mockEmbedding{size: 1, mockVector: []float64{1.1, 1.2}}), + retriever.WithTopK(10), + retriever.WithScoreThreshold(1.1), + es8.WithFilters([]types.Query{ + {Match: map[string]types.MatchQuery{"label": {Query: "good"}}}, + })) + convey.So(err, convey.ShouldBeNil) + b, err := json.Marshal(req) + convey.So(err, convey.ShouldBeNil) + convey.So(string(b), convey.ShouldEqual, `{"knn":[{"boost":1,"field":"vector_eino_doc_content","filter":[{"match":{"label":{"query":"good"}}}],"k":10,"num_candidates":100,"query_vector":[1.1,1.2],"similarity":0.5}],"min_score":1.1,"query":{"bool":{"filter":[{"match":{"label":{"query":"good"}}}],"must":[{"match":{"eino_doc_content":{"query":"content"}}}]}},"rank":{"rrf":{"rank_constant":10,"rank_window_size":5}},"size":10}`) + }) + }) + }) +} + +type mockEmbedding struct { + size int + mockVector []float64 +} + +func (m mockEmbedding) EmbedStrings(ctx context.Context, texts []string, opts ...embedding.Option) ([][]float64, error) { + resp := make([][]float64, m.size) + for i := range resp { + resp[i] = m.mockVector + } + + return resp, nil +} diff --git a/components/retriever/es8/search_mode/dense_vector_similarity.go b/components/retriever/es8/search_mode/dense_vector_similarity.go new file mode 100644 index 00000000..c6ddd778 --- /dev/null +++ b/components/retriever/es8/search_mode/dense_vector_similarity.go @@ -0,0 +1,115 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package search_mode + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/cloudwego/eino-ext/components/retriever/es8" + "github.com/cloudwego/eino/components/retriever" + "github.com/elastic/go-elasticsearch/v8/typedapi/core/search" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + +// SearchModeDenseVectorSimilarity calculate embedding similarity between dense_vector field and query +// see: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/query-dsl-script-score-query.html#vector-functions +func SearchModeDenseVectorSimilarity(typ DenseVectorSimilarityType, vectorFieldName string) es8.SearchMode { + return &denseVectorSimilarity{fmt.Sprintf(denseVectorScriptMap[typ], vectorFieldName)} +} + +type denseVectorSimilarity struct { + script string +} + +func (d *denseVectorSimilarity) BuildRequest(ctx context.Context, conf *es8.RetrieverConfig, query string, + opts ...retriever.Option) (*search.Request, error) { + + co := retriever.GetCommonOptions(&retriever.Options{ + Index: ptrWithoutZero(conf.Index), + TopK: ptrWithoutZero(conf.TopK), + ScoreThreshold: conf.ScoreThreshold, + Embedding: conf.Embedding, + }, opts...) + + io := retriever.GetImplSpecificOptions[es8.ImplOptions](nil, opts...) + + emb := co.Embedding + if emb == nil { + return nil, fmt.Errorf("[BuildRequest][SearchModeDenseVectorSimilarity] embedding not provided") + } + + vector, err := emb.EmbedStrings(makeEmbeddingCtx(ctx, emb), []string{query}) + if err != nil { + return nil, fmt.Errorf("[BuildRequest][SearchModeDenseVectorSimilarity] embedding failed, %w", err) + } + + if len(vector) != 1 { + return nil, fmt.Errorf("[BuildRequest][SearchModeDenseVectorSimilarity] vector size invalid, expect=1, got=%d", len(vector)) + } + + vb, err := json.Marshal(vector[0]) + if err != nil { + return nil, fmt.Errorf("[BuildRequest][SearchModeDenseVectorSimilarity] marshal vector to bytes failed, %w", err) + } + + q := &types.Query{ + ScriptScore: &types.ScriptScoreQuery{ + Script: types.Script{ + Source: ptrWithoutZero(d.script), + Params: map[string]json.RawMessage{"embedding": vb}, + }, + }, + } + + if len(io.Filters) > 0 { + q.ScriptScore.Query = &types.Query{ + Bool: &types.BoolQuery{Filter: io.Filters}, + } + } else { + q.ScriptScore.Query = &types.Query{ + MatchAll: &types.MatchAllQuery{}, + } + } + + req := &search.Request{Query: q, Size: co.TopK} + if co.ScoreThreshold != nil { + req.MinScore = (*types.Float64)(ptrWithoutZero(*co.ScoreThreshold)) + } + + return req, nil +} + +type DenseVectorSimilarityType string + +const ( + DenseVectorSimilarityTypeCosineSimilarity DenseVectorSimilarityType = "cosineSimilarity" + DenseVectorSimilarityTypeDotProduct DenseVectorSimilarityType = "dotProduct" + DenseVectorSimilarityTypeL1Norm DenseVectorSimilarityType = "l1norm" + DenseVectorSimilarityTypeL2Norm DenseVectorSimilarityType = "l2norm" +) + +var denseVectorScriptMap = map[DenseVectorSimilarityType]string{ + DenseVectorSimilarityTypeCosineSimilarity: `cosineSimilarity(params.embedding, '%s') + 1.0`, + DenseVectorSimilarityTypeDotProduct: ` + double value = dotProduct(params.query_vector, '%s'); + return sigmoid(1, Math.E, -value); + `, + DenseVectorSimilarityTypeL1Norm: `1 / (1 + l1norm(params.embedding, '%s'))`, + DenseVectorSimilarityTypeL2Norm: `1 / (1 + l2norm(params.embedding, '%s'))`, +} diff --git a/components/retriever/es8/search_mode/dense_vector_similarity_test.go b/components/retriever/es8/search_mode/dense_vector_similarity_test.go new file mode 100644 index 00000000..69ec0a7b --- /dev/null +++ b/components/retriever/es8/search_mode/dense_vector_similarity_test.go @@ -0,0 +1,82 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package search_mode + +import ( + "context" + "encoding/json" + "fmt" + "testing" + + . "github.com/bytedance/mockey" + "github.com/cloudwego/eino-ext/components/retriever/es8" + "github.com/cloudwego/eino/components/retriever" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/smartystreets/goconvey/convey" +) + +func TestSearchModeDenseVectorSimilarity(t *testing.T) { + PatchConvey("test SearchModeDenseVectorSimilarity", t, func() { + PatchConvey("test BuildRequest", func() { + ctx := context.Background() + vectorFieldName := "vector_eino_doc_content" + d := SearchModeDenseVectorSimilarity(DenseVectorSimilarityTypeCosineSimilarity, vectorFieldName) + query := "content" + + PatchConvey("test embedding not provided", func() { + conf := &es8.RetrieverConfig{} + req, err := d.BuildRequest(ctx, conf, query, retriever.WithEmbedding(nil)) + convey.So(err, convey.ShouldBeError, "[BuildRequest][SearchModeDenseVectorSimilarity] embedding not provided") + convey.So(req, convey.ShouldBeNil) + }) + + PatchConvey("test vector size invalid", func() { + conf := &es8.RetrieverConfig{} + req, err := d.BuildRequest(ctx, conf, query, retriever.WithEmbedding(mockEmbedding{size: 2, mockVector: []float64{1.1, 1.2}})) + convey.So(err, convey.ShouldBeError, "[BuildRequest][SearchModeDenseVectorSimilarity] vector size invalid, expect=1, got=2") + convey.So(req, convey.ShouldBeNil) + }) + + PatchConvey("test success", func() { + typ2Exp := map[DenseVectorSimilarityType]string{ + DenseVectorSimilarityTypeCosineSimilarity: `{"min_score":1.1,"query":{"script_score":{"query":{"bool":{"filter":[{"match":{"label":{"query":"good"}}}]}},"script":{"params":{"embedding":[1.1,1.2]},"source":"cosineSimilarity(params.embedding, 'vector_eino_doc_content') + 1.0"}}},"size":10}`, + DenseVectorSimilarityTypeDotProduct: `{"min_score":1.1,"query":{"script_score":{"query":{"bool":{"filter":[{"match":{"label":{"query":"good"}}}]}},"script":{"params":{"embedding":[1.1,1.2]},"source":"\n double value = dotProduct(params.query_vector, 'vector_eino_doc_content');\n return sigmoid(1, Math.E, -value);\n "}}},"size":10}`, + DenseVectorSimilarityTypeL1Norm: `{"min_score":1.1,"query":{"script_score":{"query":{"bool":{"filter":[{"match":{"label":{"query":"good"}}}]}},"script":{"params":{"embedding":[1.1,1.2]},"source":"1 / (1 + l1norm(params.embedding, 'vector_eino_doc_content'))"}}},"size":10}`, + DenseVectorSimilarityTypeL2Norm: `{"min_score":1.1,"query":{"script_score":{"query":{"bool":{"filter":[{"match":{"label":{"query":"good"}}}]}},"script":{"params":{"embedding":[1.1,1.2]},"source":"1 / (1 + l2norm(params.embedding, 'vector_eino_doc_content'))"}}},"size":10}`, + } + + for typ, exp := range typ2Exp { + similarity := SearchModeDenseVectorSimilarity(typ, vectorFieldName) + + conf := &es8.RetrieverConfig{} + req, err := similarity.BuildRequest(ctx, conf, query, retriever.WithEmbedding(&mockEmbedding{size: 1, mockVector: []float64{1.1, 1.2}}), + retriever.WithTopK(10), + retriever.WithScoreThreshold(1.1), + es8.WithFilters([]types.Query{ + {Match: map[string]types.MatchQuery{"label": {Query: "good"}}}, + })) + + convey.So(err, convey.ShouldBeNil) + b, err := json.Marshal(req) + convey.So(err, convey.ShouldBeNil) + fmt.Println(string(b)) + convey.So(string(b), convey.ShouldEqual, exp) + } + }) + }) + }) +} diff --git a/components/retriever/es8/search_mode/exact_match.go b/components/retriever/es8/search_mode/exact_match.go new file mode 100644 index 00000000..0282eef1 --- /dev/null +++ b/components/retriever/es8/search_mode/exact_match.go @@ -0,0 +1,58 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package search_mode + +import ( + "context" + + "github.com/cloudwego/eino-ext/components/retriever/es8" + "github.com/cloudwego/eino/components/retriever" + "github.com/elastic/go-elasticsearch/v8/typedapi/core/search" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + +func SearchModeExactMatch(queryFieldName string) es8.SearchMode { + return &exactMatch{queryFieldName} +} + +type exactMatch struct { + name string +} + +func (e exactMatch) BuildRequest(ctx context.Context, conf *es8.RetrieverConfig, query string, + opts ...retriever.Option) (*search.Request, error) { + + options := retriever.GetCommonOptions(&retriever.Options{ + Index: ptrWithoutZero(conf.Index), + TopK: ptrWithoutZero(conf.TopK), + ScoreThreshold: conf.ScoreThreshold, + Embedding: conf.Embedding, + }, opts...) + + q := &types.Query{ + Match: map[string]types.MatchQuery{ + e.name: {Query: query}, + }, + } + + req := &search.Request{Query: q, Size: options.TopK} + if options.ScoreThreshold != nil { + req.MinScore = (*types.Float64)(ptrWithoutZero(*options.ScoreThreshold)) + } + + return req, nil +} diff --git a/components/retriever/es8/search_mode/exact_match_test.go b/components/retriever/es8/search_mode/exact_match_test.go new file mode 100644 index 00000000..fc90250e --- /dev/null +++ b/components/retriever/es8/search_mode/exact_match_test.go @@ -0,0 +1,41 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package search_mode + +import ( + "context" + "encoding/json" + "testing" + + . "github.com/bytedance/mockey" + "github.com/cloudwego/eino-ext/components/retriever/es8" + "github.com/smartystreets/goconvey/convey" +) + +func TestSearchModeExactMatch(t *testing.T) { + PatchConvey("test SearchModeExactMatch", t, func() { + ctx := context.Background() + conf := &es8.RetrieverConfig{} + searchMode := SearchModeExactMatch("test_field") + req, err := searchMode.BuildRequest(ctx, conf, "test_query") + convey.So(err, convey.ShouldBeNil) + b, err := json.Marshal(req) + convey.So(err, convey.ShouldBeNil) + convey.So(string(b), convey.ShouldEqual, `{"query":{"match":{"test_field":{"query":"test_query"}}}}`) + }) + +} diff --git a/components/retriever/es8/search_mode/raw_string.go b/components/retriever/es8/search_mode/raw_string.go new file mode 100644 index 00000000..01eccd93 --- /dev/null +++ b/components/retriever/es8/search_mode/raw_string.go @@ -0,0 +1,42 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package search_mode + +import ( + "context" + + "github.com/cloudwego/eino-ext/components/retriever/es8" + "github.com/cloudwego/eino/components/retriever" + "github.com/elastic/go-elasticsearch/v8/typedapi/core/search" +) + +func SearchModeRawStringRequest() es8.SearchMode { + return &rawString{} +} + +type rawString struct{} + +func (r rawString) BuildRequest(ctx context.Context, conf *es8.RetrieverConfig, query string, + opts ...retriever.Option) (*search.Request, error) { + + req, err := search.NewRequest().FromJSON(query) + if err != nil { + return nil, err + } + + return req, nil +} diff --git a/components/retriever/es8/search_mode/raw_string_test.go b/components/retriever/es8/search_mode/raw_string_test.go new file mode 100644 index 00000000..75d26193 --- /dev/null +++ b/components/retriever/es8/search_mode/raw_string_test.go @@ -0,0 +1,48 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package search_mode + +import ( + "context" + "testing" + + . "github.com/bytedance/mockey" + "github.com/cloudwego/eino-ext/components/retriever/es8" + "github.com/smartystreets/goconvey/convey" +) + +func TestSearchModeRawStringRequest(t *testing.T) { + PatchConvey("test SearchModeRawStringRequest", t, func() { + ctx := context.Background() + conf := &es8.RetrieverConfig{} + searchMode := SearchModeRawStringRequest() + + PatchConvey("test from json error", func() { + r, err := searchMode.BuildRequest(ctx, conf, "test_query") + convey.So(err, convey.ShouldNotBeNil) + convey.So(r, convey.ShouldBeNil) + }) + + PatchConvey("test success", func() { + q := `{"query":{"match":{"test_field":{"query":"test_query"}}}}` + r, err := searchMode.BuildRequest(ctx, conf, q) + convey.So(err, convey.ShouldBeNil) + convey.So(r, convey.ShouldNotBeNil) + convey.So(r.Query.Match["test_field"].Query, convey.ShouldEqual, "test_query") + }) + }) +} diff --git a/components/retriever/es8/search_mode/sparse_vector_query.go b/components/retriever/es8/search_mode/sparse_vector_query.go new file mode 100644 index 00000000..415e9318 --- /dev/null +++ b/components/retriever/es8/search_mode/sparse_vector_query.go @@ -0,0 +1,94 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package search_mode + +import ( + "context" + "fmt" + + "github.com/cloudwego/eino-ext/components/retriever/es8" + "github.com/cloudwego/eino/components/retriever" + "github.com/elastic/go-elasticsearch/v8/typedapi/core/search" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + +// SearchModeSparseVectorQuery executes a query consisting of sparse vectors. +// And text expansion query has been replaced since 8.15. +// see: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-sparse-vector-query.html + +func SearchModeSparseVectorQuery(config *SparseVectorQueryConfig) es8.SearchMode { + return &sparseVectorQuery{config} +} + +type SparseVectorQueryConfig struct { + // Field The name of the field that contains the token-weight pairs to be searched against. + Field string + // / Boost Floating point number used to decrease or increase the relevance scores of the query. + Boost *float32 + // InferenceID to use to convert the query text into token-weight pairs. + // It must be the same inference ID that was used to create the tokens from the input text. + // If InferenceID is not provided, this search mode will use Document.SparseVector method to get query sparse vector. + // see: https://www.elastic.co/guide/en/elasticsearch/reference/current/inference-apis.html + InferenceID *string +} + +type sparseVectorQuery struct { + config *SparseVectorQueryConfig +} + +func (s *sparseVectorQuery) BuildRequest(ctx context.Context, conf *es8.RetrieverConfig, query string, opts ...retriever.Option) (*search.Request, error) { + co := retriever.GetCommonOptions(&retriever.Options{ + Index: ptrWithoutZero(conf.Index), + TopK: ptrWithoutZero(conf.TopK), + ScoreThreshold: conf.ScoreThreshold, + Embedding: conf.Embedding, + }, opts...) + + io := retriever.GetImplSpecificOptions[es8.ImplOptions](nil, opts...) + + svq := &types.SparseVectorQuery{ + Boost: s.config.Boost, + Field: s.config.Field, + } + + if s.config.InferenceID != nil { + svq.InferenceId = s.config.InferenceID + svq.Query = &query + } else if io.SparseVector != nil { + svq.QueryVector = io.SparseVector + } else { + return nil, fmt.Errorf("[sparseVectorQuery] neither inference id or query sparse vector is provided") + } + + q := &types.Query{ + Bool: &types.BoolQuery{ + Should: []types.Query{ + { + SparseVector: svq, + }, + }, + Filter: io.Filters, + }, + } + + req := &search.Request{Query: q, Size: co.TopK} + if co.ScoreThreshold != nil { + req.MinScore = (*types.Float64)(ptrWithoutZero(*co.ScoreThreshold)) + } + + return req, nil +} diff --git a/components/retriever/es8/search_mode/sparse_vector_query_test.go b/components/retriever/es8/search_mode/sparse_vector_query_test.go new file mode 100644 index 00000000..3180f5e3 --- /dev/null +++ b/components/retriever/es8/search_mode/sparse_vector_query_test.go @@ -0,0 +1,78 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package search_mode + +import ( + "context" + "encoding/json" + "fmt" + "testing" + + . "github.com/bytedance/mockey" + "github.com/cloudwego/eino-ext/components/retriever/es8" + "github.com/smartystreets/goconvey/convey" +) + +func TestSearchModeSparseVectorQuery(t *testing.T) { + PatchConvey("test SearchModeSparseVectorQuery", t, func() { + ctx := context.Background() + + PatchConvey("test with inference id", func() { + mode := SearchModeSparseVectorQuery(&SparseVectorQueryConfig{ + Field: "test_field", + Boost: ptrWithoutZero(float32(1.2)), + InferenceID: ptrWithoutZero("test_inference_id"), + }) + + r, err := mode.BuildRequest(ctx, &es8.RetrieverConfig{}, "test_query") + convey.So(err, convey.ShouldBeNil) + b, err := json.Marshal(r) + convey.So(err, convey.ShouldBeNil) + convey.So(string(b), convey.ShouldEqual, + `{"query":{"bool":{"should":[{"sparse_vector":{"boost":1.2,"field":"test_field","inference_id":"test_inference_id","query":"test_query"}}]}}}`) + }) + + PatchConvey("test with sparse vector", func() { + mode := SearchModeSparseVectorQuery(&SparseVectorQueryConfig{ + Field: "test_field", + Boost: ptrWithoutZero(float32(1.2)), + }) + + r, err := mode.BuildRequest(ctx, &es8.RetrieverConfig{}, "test_query", + es8.WithSparseVector(map[string]float32{ + "tk1": 1.23, + })) + convey.So(err, convey.ShouldBeNil) + b, err := json.Marshal(r) + convey.So(err, convey.ShouldBeNil) + convey.So(string(b), convey.ShouldEqual, + `{"query":{"bool":{"should":[{"sparse_vector":{"boost":1.2,"field":"test_field","query_vector":{"tk1":1.23}}}]}}}`) + }) + + PatchConvey("test neither provided", func() { + mode := SearchModeSparseVectorQuery(&SparseVectorQueryConfig{ + Field: "test_field", + Boost: ptrWithoutZero(float32(1.2)), + }) + + r, err := mode.BuildRequest(ctx, &es8.RetrieverConfig{}, "test_query") + convey.So(err, convey.ShouldBeError, fmt.Errorf("[sparseVectorQuery] neither inference id or query sparse vector is provided")) + convey.So(r, convey.ShouldBeNil) + }) + + }) +} diff --git a/components/retriever/es8/search_mode/sparse_vector_text_expansion.go b/components/retriever/es8/search_mode/sparse_vector_text_expansion.go new file mode 100644 index 00000000..bd861ed4 --- /dev/null +++ b/components/retriever/es8/search_mode/sparse_vector_text_expansion.go @@ -0,0 +1,74 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package search_mode + +import ( + "context" + "fmt" + + "github.com/cloudwego/eino-ext/components/retriever/es8" + "github.com/cloudwego/eino/components/retriever" + "github.com/elastic/go-elasticsearch/v8/typedapi/core/search" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" +) + +// SearchModeSparseVectorTextExpansion convert the query text into a list ptrWithoutZero token-weight pairs, +// which are then used in a query against a sparse vector +// see: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-text-expansion-query.html +func SearchModeSparseVectorTextExpansion(modelID, vectorFieldName string) es8.SearchMode { + return &sparseVectorTextExpansion{modelID, vectorFieldName} +} + +type sparseVectorTextExpansion struct { + modelID string + vectorFieldName string +} + +func (s sparseVectorTextExpansion) BuildRequest(ctx context.Context, conf *es8.RetrieverConfig, query string, + opts ...retriever.Option) (*search.Request, error) { + + co := retriever.GetCommonOptions(&retriever.Options{ + Index: ptrWithoutZero(conf.Index), + TopK: ptrWithoutZero(conf.TopK), + ScoreThreshold: conf.ScoreThreshold, + Embedding: conf.Embedding, + }, opts...) + + io := retriever.GetImplSpecificOptions[es8.ImplOptions](nil, opts...) + + name := fmt.Sprintf("%s.tokens", s.vectorFieldName) + teq := types.TextExpansionQuery{ + ModelId: s.modelID, + ModelText: query, + } + + q := &types.Query{ + Bool: &types.BoolQuery{ + Must: []types.Query{ + {TextExpansion: map[string]types.TextExpansionQuery{name: teq}}, + }, + Filter: io.Filters, + }, + } + + req := &search.Request{Query: q, Size: co.TopK} + if co.ScoreThreshold != nil { + req.MinScore = (*types.Float64)(ptrWithoutZero(*co.ScoreThreshold)) + } + + return req, nil +} diff --git a/components/retriever/es8/search_mode/sparse_vector_text_expansion_test.go b/components/retriever/es8/search_mode/sparse_vector_text_expansion_test.go new file mode 100644 index 00000000..8ad0861f --- /dev/null +++ b/components/retriever/es8/search_mode/sparse_vector_text_expansion_test.go @@ -0,0 +1,53 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package search_mode + +import ( + "context" + "encoding/json" + "testing" + + . "github.com/bytedance/mockey" + "github.com/cloudwego/eino-ext/components/retriever/es8" + "github.com/cloudwego/eino/components/retriever" + "github.com/elastic/go-elasticsearch/v8/typedapi/types" + "github.com/smartystreets/goconvey/convey" +) + +func TestSearchModeSparseVectorTextExpansion(t *testing.T) { + PatchConvey("test SearchModeSparseVectorTextExpansion", t, func() { + PatchConvey("test BuildRequest", func() { + ctx := context.Background() + vectorFieldName := "vector_eino_doc_content" + s := SearchModeSparseVectorTextExpansion("mock_model_id", vectorFieldName) + + conf := &es8.RetrieverConfig{} + req, err := s.BuildRequest(ctx, conf, "content", + retriever.WithTopK(10), + retriever.WithScoreThreshold(1.1), + es8.WithFilters([]types.Query{ + {Match: map[string]types.MatchQuery{"label": {Query: "good"}}}, + })) + + convey.So(err, convey.ShouldBeNil) + convey.So(req, convey.ShouldNotBeNil) + b, err := json.Marshal(req) + convey.So(err, convey.ShouldBeNil) + convey.So(string(b), convey.ShouldEqual, `{"min_score":1.1,"query":{"bool":{"filter":[{"match":{"label":{"query":"good"}}}],"must":[{"text_expansion":{"vector_eino_doc_content.tokens":{"model_id":"mock_model_id","model_text":"content"}}}]}},"size":10}`) + }) + }) +} diff --git a/components/retriever/es8/search_mode/utils.go b/components/retriever/es8/search_mode/utils.go new file mode 100644 index 00000000..ebddb7e1 --- /dev/null +++ b/components/retriever/es8/search_mode/utils.go @@ -0,0 +1,56 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package search_mode + +import ( + "context" + + "github.com/cloudwego/eino/callbacks" + "github.com/cloudwego/eino/components" + "github.com/cloudwego/eino/components/embedding" +) + +func makeEmbeddingCtx(ctx context.Context, emb embedding.Embedder) context.Context { + runInfo := &callbacks.RunInfo{ + Component: components.ComponentOfEmbedding, + } + + if embType, ok := components.GetType(emb); ok { + runInfo.Type = embType + } + + runInfo.Name = runInfo.Type + string(runInfo.Component) + + return callbacks.ReuseHandlers(ctx, runInfo) +} + +func f64To32(f64 []float64) []float32 { + f32 := make([]float32, len(f64)) + for i, f := range f64 { + f32[i] = float32(f) + } + + return f32 +} + +func ptrWithoutZero[T string | int64 | int | float64 | float32](v T) *T { + var zero T + if zero == v { + return nil + } + return &v +} diff --git a/components/retriever/redis/go.mod b/components/retriever/redis/go.mod index bc550df5..938477a0 100644 --- a/components/retriever/redis/go.mod +++ b/components/retriever/redis/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/bytedance/mockey v1.2.13 - github.com/cloudwego/eino v0.3.6 + github.com/cloudwego/eino v0.3.7 github.com/redis/go-redis/v9 v9.7.0 github.com/smartystreets/goconvey v1.8.1 ) diff --git a/components/retriever/redis/go.sum b/components/retriever/redis/go.sum index bc6a972f..bc04466d 100644 --- a/components/retriever/redis/go.sum +++ b/components/retriever/redis/go.sum @@ -17,8 +17,8 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.6 h1:3yfdKKxMVWefdOyGXHuqUMM5cc9iioijj2mpPsDZKIg= -github.com/cloudwego/eino v0.3.6/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/retriever/volc_knowledge/go.mod b/components/retriever/volc_knowledge/go.mod new file mode 100644 index 00000000..7103833c --- /dev/null +++ b/components/retriever/volc_knowledge/go.mod @@ -0,0 +1,53 @@ +module github.com/cloudwego/eino-ext/components/retriever/volc_knowledge + +go 1.18 + +require ( + github.com/bytedance/mockey v1.2.13 + github.com/bytedance/sonic v1.12.2 + github.com/cloudwego/eino v0.3.7 + github.com/stretchr/testify v1.9.0 + github.com/volcengine/volc-sdk-golang v1.0.193 +) + +require ( + github.com/bytedance/sonic/loader v0.2.0 // indirect + github.com/cenkalti/backoff/v4 v4.1.2 // indirect + github.com/cloudwego/base64x v0.1.4 // indirect + github.com/cloudwego/iasm v0.2.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/getkin/kin-openapi v0.118.0 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/swag v0.19.5 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/goph/emperror v0.17.2 // indirect + github.com/gopherjs/gopherjs v1.17.2 // indirect + github.com/invopop/yaml v0.1.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/jtolds/gls v4.20.0+incompatible // indirect + github.com/klauspost/cpuid/v2 v2.0.9 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect + github.com/nikolalohinski/gonja v1.5.3 // indirect + github.com/pelletier/go-toml/v2 v2.0.9 // indirect + github.com/perimeterx/marshmallow v1.1.4 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/slongfield/pyfmt v0.0.0-20220222012616-ea85ff4c361f // indirect + github.com/smarty/assertions v1.15.0 // indirect + github.com/smartystreets/goconvey v1.8.1 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/yargevad/filepathx v1.0.0 // indirect + golang.org/x/arch v0.11.0 // indirect + golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/text v0.11.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/components/retriever/volc_knowledge/go.sum b/components/retriever/volc_knowledge/go.sum new file mode 100644 index 00000000..799a321a --- /dev/null +++ b/components/retriever/volc_knowledge/go.sum @@ -0,0 +1,905 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/sarama v1.30.1/go.mod h1:hGgx05L/DiW8XYBXeJdKIN6V2QUy2H6JqME5VT1NLRw= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae/go.mod h1:/cvHQkZ1fst0EmZnA5dFtiQdWCNCFYzb+uE2vqVgvx0= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/airbrake/gobrake v3.6.1+incompatible/go.mod h1:wM4gu3Cn0W0K7GUuVWnlXZU11AGBXMILnrdOU8Kn00o= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= +github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bugsnag/bugsnag-go v1.4.0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/bytedance/mockey v1.2.13 h1:jokWZAm/pUEbD939Rhznz615MKUCZNuvCFQlJ2+ntoo= +github.com/bytedance/mockey v1.2.13/go.mod h1:1BPHF9sol5R1ud/+0VEHGQq/+i2lN+GTsr3O2Q9IENY= +github.com/bytedance/sonic v1.12.2 h1:oaMFuRTpMHYLpCntGca65YWt5ny+wAceDERTkT2L9lg= +github.com/bytedance/sonic v1.12.2/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.0 h1:zNprn+lsIP06C/IqCHs3gPQIvnvpKbbxyXQP1iU4kWM= +github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.2 h1:6Yo7N8UP2K6LWZnW94DLVSSrbobcWdVzAYOisuDPIFo= +github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM= +github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/goph/emperror v0.17.2 h1:yLapQcmEsO0ipe9p5TaN22djm3OFV/TfM/fcYP0/J18= +github.com/goph/emperror v0.17.2/go.mod h1:+ZbQ+fUNO/6FNiUo0ujtMjhgad9Xa6fQL9KhH4LNHic= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g= +github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= +github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/invopop/yaml v0.1.0 h1:YW3WGUoJEXYfzWBjn00zIlrw7brGVD0fUKRYDPAPhrc= +github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= +github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= +github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= +github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= +github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aWNYyvBVK62bc= +github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= +github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= +github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= +github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= +github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nikolalohinski/gonja v1.5.3 h1:GsA+EEaZDZPGJ8JtpeGN78jidhOlxeJROpqMT9fTj9c= +github.com/nikolalohinski/gonja v1.5.3/go.mod h1:RmjwxNiXAEqcq1HeK5SSMmqFJvKOfTfXhkJv6YBtPa4= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= +github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= +github.com/perimeterx/marshmallow v1.1.4 h1:pZLDH9RjlLGGorbXhcaQLhfuV0pFMNfPO55FuFkxqLw= +github.com/perimeterx/marshmallow v1.1.4/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rollbar/rollbar-go v1.0.2/go.mod h1:AcFs5f0I+c71bpHlXNNDbOWJiKwjFDtISeXco0L5PKQ= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/slongfield/pyfmt v0.0.0-20220222012616-ea85ff4c361f h1:Z2cODYsUxQPofhpYRMQVwWz4yUVpHF+vPi+eUdruUYI= +github.com/slongfield/pyfmt v0.0.0-20220222012616-ea85ff4c361f/go.mod h1:JqzWyvTuI2X4+9wOHmKSQCYxybB/8j6Ko43qVmXDuZg= +github.com/smarty/assertions v1.15.0 h1:cR//PqUBUiQRakZWqBiFFQ9wb8emQGDb0HeGdqGByCY= +github.com/smarty/assertions v1.15.0/go.mod h1:yABtdzeQs6l1brC900WlRNwj6ZR55d7B+E8C6HtKdec= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.8.1 h1:qGjIddxOk4grTu9JPOU31tVfq3cNdBlNa5sSznIX1xY= +github.com/smartystreets/goconvey v1.8.1/go.mod h1:+/u4qLyY6x1jReYOp7GOM2FSt8aP9CzCZL03bI28W60= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +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/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= +github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +github.com/volcengine/volc-sdk-golang v1.0.193 h1:mL1rlk+m9SaqF2MSGFWfigEaz10ZVJiYDnFuWfj65Ww= +github.com/volcengine/volc-sdk-golang v1.0.193/go.mod h1:u0VtPvlXWpXDTmc9IHkaW1q+5Jjwus4oAqRhNMDRInE= +github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= +github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= +github.com/yargevad/filepathx v1.0.0 h1:SYcT+N3tYGi+NvazubCNlvgIPbzAk7i7y2dwg3I5FYc= +github.com/yargevad/filepathx v1.0.0/go.mod h1:BprfX/gpYNJHJfc35GjRRpVcwWXS89gGulUIU5tK3tA= +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= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +golang.org/x/arch v0.11.0 h1:KXV8WWKCXm6tRpLirl2szsO5j/oOODwZf4hATmGVNs4= +golang.org/x/arch v0.11.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/components/retriever/volc_knowledge/knowledge.go b/components/retriever/volc_knowledge/knowledge.go new file mode 100644 index 00000000..725fe56d --- /dev/null +++ b/components/retriever/volc_knowledge/knowledge.go @@ -0,0 +1,350 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package knowledge + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "time" + + "github.com/bytedance/sonic" + "github.com/cloudwego/eino/components/retriever" + "github.com/cloudwego/eino/schema" + "github.com/volcengine/volc-sdk-golang/base" +) + +const ( + path = "/api/knowledge/collection/search_knowledge" + defaultBaseURL = "api-knowledgebase.mlp.cn-beijing.volces.com" +) + +type Config struct { + // Timeout specifies the duration to wait before timing out a request + // Optional. Default: 0 (no timeout) + Timeout time.Duration + + // BaseURL is the base URL for the knowledge API + // Optional. Default: "api-knowledgebase.mlp.cn-beijing.volces.com" + BaseURL string + + // AK specifies the access key for authentication + // Required + AK string + + // SK specifies the secret key for authentication + // Required + SK string + + // AccountID specifies the unique identifier for your Volcengine account + // Required + AccountID string + + // The following fields are from the Volcengine Knowledge search_knowledge openapi request body. + // For more details, please refer to: https://www.volcengine.com/docs/84313/1350012 + + // Name specifies the name of the knowledge collection + // Optional. + // Note: Either Name+Project pair or ResourceID must be provided, but not both + Name string + + // Project specifies the project identifier + // Optional. Default: "default" + // Note: Either Name+Project pair or ResourceID must be provided, but not both + Project string + + // ResourceID specifies the resource identifier + // Optional. + // Note: Either Name+Project pair or ResourceID must be provided, but not both + ResourceID string + + // Limit specifies the maximum number of documents to retrieve + // Optional. Range: [1, 200], Default: 10 + Limit int32 + + // DocFilter specifies filters to apply to the document search + // Optional. Default: nil + DocFilter map[string]any + + // DenseWeight specifies the weight for dense retrieval + // Optional. Default: 0.5 + DenseWeight float64 + + // NeedInstruction specifies whether instructions are needed in the response + // Optional. + NeedInstruction bool + + // Rewrite specifies whether to rewrite the query + // Optional. + Rewrite bool + + // ReturnTokenUsage specifies whether to return token usage information + // Optional. + ReturnTokenUsage bool + + // Messages specifies the list of historical conversation messages + // Only required when rewriting is enabled (Rewrite=true) + // Used to rewrite queries based on conversation history + // Optional. + Messages []*schema.Message + + // RerankSwitch specifies whether to enable reranking of results + // Optional. + RerankSwitch bool + + // RetrieveCount specifies the number of documents to retrieve for reranking + // Only takes effect when RerankSwitch is true + // Must be greater than or equal to Limit, otherwise an error will be returned + // Optional. Default: 25 + RetrieveCount int32 + + // ChunkDiffusionCount specifies the number of chunks for diffusion + // Optional. + ChunkDiffusionCount int32 + + // ChunkGroup specifies whether to group chunks in the response + // Optional. + ChunkGroup bool + + // RerankModel specifies the model to use for reranking results + // Only takes effect when RerankSwitch is set to true + // Optional. + RerankModel string + + // RerankOnlyChunk specifies whether to calculate reranking scores based only on chunk content + // True: Calculate scores using only chunk content + // False: Calculate scores using both chunk title and content + // Optional. + RerankOnlyChunk bool + + // GetAttachmentLink specifies whether to include attachment links in the response + // Optional. + GetAttachmentLink bool +} + +func NewRetriever(ctx context.Context, conf *Config) (retriever.Retriever, error) { + nConf := *conf + if len(nConf.BaseURL) == 0 { + nConf.BaseURL = defaultBaseURL + } + cli := http.DefaultClient + if nConf.Timeout > 0 { + cli = &http.Client{Timeout: nConf.Timeout} + } + return &knowledge{ + cfg: &nConf, + cli: cli, + credential: &base.Credentials{ + AccessKeyID: nConf.AK, + SecretAccessKey: nConf.SK, + Service: "air", + Region: "cn-north-1", + }, + }, nil +} + +type knowledge struct { + cfg *Config + cli *http.Client + credential *base.Credentials +} + +func (k *knowledge) Retrieve(ctx context.Context, query string, opts ...retriever.Option) ([]*schema.Document, error) { + origReq := &request{ + Name: k.cfg.Name, + Project: k.cfg.Project, + ResourceID: k.cfg.ResourceID, + Query: query, + Limit: k.cfg.Limit, + QueryParam: queryParam{ + DocFilter: k.cfg.DocFilter, + }, + DenseWeight: k.cfg.DenseWeight, + PreProcessing: preProcessing{ + NeedInstruction: k.cfg.NeedInstruction, + Rewrite: k.cfg.Rewrite, + ReturnTokenUsage: k.cfg.ReturnTokenUsage, + Messages: k.cfg.Messages, + }, + PostProcessing: postProcessing{ + RerankSwitch: k.cfg.RerankSwitch, + RetrieveCount: k.cfg.RetrieveCount, + ChunkDiffusionCount: k.cfg.ChunkDiffusionCount, + ChunkGroup: k.cfg.ChunkGroup, + RerankModel: k.cfg.RerankModel, + RerankOnlyChunk: k.cfg.RerankOnlyChunk, + GetAttachmentLink: k.cfg.GetAttachmentLink, + }, + } + body, err := sonic.Marshal(origReq) + if err != nil { + return nil, fmt.Errorf("marshal request fail: %w", err) + } + + req, err := http.NewRequest(http.MethodPost, (&url.URL{ + Scheme: "https", + Host: k.cfg.BaseURL, + Path: path, + }).String(), bytes.NewReader(body)) + if err != nil { + return nil, fmt.Errorf("create request fail: %w", err) + } + + resp, err := k.cli.Do(k.prepareRequest(req).WithContext(ctx)) + if err != nil { + return nil, fmt.Errorf("do request fail: %w", err) + } + + defer resp.Body.Close() + + respBody, err := io.ReadAll(resp.Body) + if err != nil { + return nil, fmt.Errorf("read response fail: %w", err) + } + origResp := &response{} + if err = sonic.Unmarshal(respBody, origResp); err != nil { + return nil, fmt.Errorf("unmarshal response fail: %w", err) + } + if origResp.Code != 0 { + return nil, fmt.Errorf("request fail, code: %d, msg: %s, request id: %s", origResp.Code, origResp.Message, origResp.RequestID) + } + return origResp.toDocuments(), nil +} + +func (k *knowledge) prepareRequest(req *http.Request) *http.Request { + req.Header.Set("Accept", "application/json") + req.Header.Set("Content-Type", "application/json; charset=utf-8") + req.Header.Set("Host", k.cfg.BaseURL) + req.Header.Set("V-Account-Id", k.cfg.AccountID) + return k.credential.Sign(req) +} + +type request struct { + Name string `json:"name,omitempty"` + Project string `json:"project,omitempty"` + ResourceID string `json:"resource_id,omitempty"` + Query string `json:"query"` + Limit int32 `json:"limit,omitempty"` + QueryParam queryParam `json:"query_param,omitempty"` + DenseWeight float64 `json:"dense_weight,omitempty"` + PreProcessing preProcessing `json:"pre_processing,omitempty"` + PostProcessing postProcessing `json:"post_processing,omitempty"` +} + +type queryParam struct { + DocFilter map[string]any `json:"doc_filter,omitempty"` +} + +type preProcessing struct { + NeedInstruction bool `json:"need_instruction,omitempty"` + Rewrite bool `json:"rewrite,omitempty"` + ReturnTokenUsage bool `json:"return_token_usage,omitempty"` + Messages []*schema.Message `json:"messages,omitempty"` +} + +type postProcessing struct { + RerankSwitch bool `json:"rerank_switch,omitempty"` + RetrieveCount int32 `json:"retrieve_count,omitempty"` + ChunkDiffusionCount int32 `json:"chunk_diffusion_count,omitempty"` + ChunkGroup bool `json:"chunk_group,omitempty"` + RerankModel string `json:"rerank_model,omitempty"` + RerankOnlyChunk bool `json:"rerank_only_chunk,omitempty"` + GetAttachmentLink bool `json:"get_attachment_link,omitempty"` +} + +func (r *response) toDocuments() []*schema.Document { + docs := make([]*schema.Document, 0, len(r.Data.ResultList)) + for _, res := range r.Data.ResultList { + doc := &schema.Document{ + ID: res.ID, + Content: res.Content, + MetaData: make(map[string]any), + } + setDocID(doc, res.DocInfo.DocID) + setDocName(doc, res.DocInfo.DocName) + setChunkID(doc, res.ChunkID) + setAttachments(doc, res.ChunkAttachment) + setTableChunks(doc, res.TableChunkFields) + + docs = append(docs, doc) + } + return docs +} + +type response struct { + Code int32 `json:"code"` + Message string `json:"message"` + RequestID string `json:"request_id"` + Data *data `json:"data"` +} + +type data struct { + CollectionName string `json:"collection_name"` + Count int32 `json:"count"` + RewriteQuery string `json:"rewrite_query"` + TokenUsage []*tokenUsage `json:"token_usage"` + ResultList []*result `json:"result_list"` +} + +type tokenUsage struct { + EmbeddingTokenUsage schema.TokenUsage `json:"embedding_token_usage"` + RerankTokenUsage int32 `json:"rerank_token_usage"` + RewriteTokenUsage int32 `json:"rewrite_token_usage"` +} + +type result struct { + ID string `json:"id"` + Content string `json:"content"` + Score float64 `json:"score"` + PointID string `json:"point_id"` + ChunkTitle string `json:"chunk_title"` + ChunkID int32 `json:"chunk_id"` + ProcessTime int64 `json:"process_time"` + RerankScore float64 `json:"rerank_score"` + DocInfo docInfo `json:"doc_info"` + RecallPosition int `json:"recall_position"` + TableChunkFields []*TableChunkField `json:"table_chunk_fields"` + OriginalQuestion string `json:"original_question"` + ChunkType string `json:"chunk_type"` + ChunkAttachment []*ChunkAttachment `json:"chunk_attachment"` +} + +type docInfo struct { + DocID string `json:"doc_id"` + DocName string `json:"doc_name"` + CreateTime int64 `json:"create_time"` + DocType string `json:"doc_type"` + DocMeta string `json:"doc_meta"` + Source string `json:"source"` + Title string `json:"title"` +} + +type TableChunkField struct { + FieldName string `json:"field_name"` + FieldValue json.RawMessage `json:"field_value"` +} + +type ChunkAttachment struct { + UUID string `json:"uuid"` + Caption string `json:"caption"` + Type string `json:"type"` + Link string `json:"link"` // type 为 image 时表示图片的临时下载链接,有效期 10 分钟 +} diff --git a/components/retriever/volc_knowledge/knowledge_test.go b/components/retriever/volc_knowledge/knowledge_test.go new file mode 100644 index 00000000..0759a118 --- /dev/null +++ b/components/retriever/volc_knowledge/knowledge_test.go @@ -0,0 +1,70 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package knowledge + +import ( + "bytes" + "context" + "io" + "net/http" + "testing" + + "github.com/bytedance/mockey" + "github.com/stretchr/testify/assert" +) + +func TestRetrieve(t *testing.T) { + ctx := context.Background() + conf := &Config{ + BaseURL: "api-knowledgebase.mlp.cn-beijing.volces.com", + AK: "test-ak", + SK: "test-sk", + AccountID: "test-account-id", + Name: "test-name", + Limit: 10, + } + + retriever, err := NewRetriever(ctx, conf) + assert.NoError(t, err) + + mockey.PatchConvey("Test Retrieve", t, func() { + mockey.Mock((*http.Client).Do).To(func(req *http.Request) (*http.Response, error) { + assert.Equal(t, req.URL.Path, path) + respBody := `{ + "code": 0, + "data": { + "result_list": [ + { + "id": "doc1", + "content": "This is a test document." + } + ] + } + }` + return &http.Response{ + StatusCode: http.StatusOK, + Body: io.NopCloser(bytes.NewBufferString(respBody)), + }, nil + }).Build() + + docs, err := retriever.Retrieve(ctx, "test query") + assert.NoError(t, err) + assert.Len(t, docs, 1) + assert.Equal(t, "doc1", docs[0].ID) + assert.Equal(t, "This is a test document.", docs[0].Content) + }) +} diff --git a/components/retriever/volc_knowledge/metadata.go b/components/retriever/volc_knowledge/metadata.go new file mode 100644 index 00000000..7408b6e4 --- /dev/null +++ b/components/retriever/volc_knowledge/metadata.go @@ -0,0 +1,82 @@ +/* + * Copyright 2025 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package knowledge + +import "github.com/cloudwego/eino/schema" + +const ( + docIDKey = "doc_id" + docNameKey = "doc_name" + chunkIDKey = "chunk_id" + attachmentsKey = "attachment" + tableChunksKey = "table" +) + +func setDocID(doc *schema.Document, id string) { + doc.MetaData[docIDKey] = id +} + +func setDocName(doc *schema.Document, name string) { + doc.MetaData[docNameKey] = name +} + +func setChunkID(doc *schema.Document, id int32) { + doc.MetaData[chunkIDKey] = id +} + +func setAttachments(doc *schema.Document, attachments []*ChunkAttachment) { + doc.MetaData[attachmentsKey] = attachments +} + +func setTableChunks(doc *schema.Document, tableChunks []*TableChunkField) { + doc.MetaData[tableChunksKey] = tableChunks +} + +func GetDocID(doc *schema.Document) string { + if v, ok := doc.MetaData[docIDKey]; ok { + return v.(string) + } + return "" +} + +func GetDocName(doc *schema.Document) string { + if v, ok := doc.MetaData[docNameKey]; ok { + return v.(string) + } + return "" +} + +func GetChunkID(doc *schema.Document) int32 { + if v, ok := doc.MetaData[chunkIDKey]; ok { + return v.(int32) + } + return 0 +} + +func GetAttachments(doc *schema.Document) []*ChunkAttachment { + if v, ok := doc.MetaData[attachmentsKey]; ok { + return v.([]*ChunkAttachment) + } + return nil +} + +func GetTableChunks(doc *schema.Document) []*TableChunkField { + if v, ok := doc.MetaData[tableChunksKey]; ok { + return v.([]*TableChunkField) + } + return nil +} diff --git a/components/retriever/volc_vikingdb/examples/custom_embedding/search.go b/components/retriever/volc_vikingdb/examples/embed_retriever/main.go similarity index 100% rename from components/retriever/volc_vikingdb/examples/custom_embedding/search.go rename to components/retriever/volc_vikingdb/examples/embed_retriever/main.go diff --git a/components/retriever/volc_vikingdb/examples/builtin_embedding/search.go b/components/retriever/volc_vikingdb/examples/retriever/main.go similarity index 61% rename from components/retriever/volc_vikingdb/examples/builtin_embedding/search.go rename to components/retriever/volc_vikingdb/examples/retriever/main.go index 3ea30be5..ee99d5b4 100644 --- a/components/retriever/volc_vikingdb/examples/builtin_embedding/search.go +++ b/components/retriever/volc_vikingdb/examples/retriever/main.go @@ -18,9 +18,15 @@ package main import ( "context" - "fmt" + "log" "os" + "github.com/cloudwego/eino/callbacks" + "github.com/cloudwego/eino/components/retriever" + "github.com/cloudwego/eino/compose" + "github.com/cloudwego/eino/schema" + callbacksHelper "github.com/cloudwego/eino/utils/callbacks" + "github.com/cloudwego/eino-ext/components/retriever/volc_vikingdb" ) @@ -71,20 +77,58 @@ func main() { FilterDSL: nil, // 对应索引中的【标量过滤字段】,未设置时至空即可,表达式详见 https://www.volcengine.com/docs/84313/1254609 } - ret, err := volc_vikingdb.NewRetriever(ctx, cfg) + volcRetriever, err := volc_vikingdb.NewRetriever(ctx, cfg) if err != nil { - fmt.Printf("NewRetriever failed, %v\n", err) + log.Printf("NewRetriever failed, %v\n", err) return } + log.Printf("===== call Indexer directly =====") + query := "tourist attraction" - docs, err := ret.Retrieve(ctx, query) + docs, err := volcRetriever.Retrieve(ctx, query) if err != nil { - fmt.Printf("vikingDB retrieve failed, %v\n", err) + log.Printf("vikingDB retrieve failed, %v\n", err) return } - fmt.Printf("vikingDB retrieve success, query=%v, docs=%v\n", query, docs) + log.Printf("vikingDB retrieve success, query=%v, docs=%v", query, docs) + + log.Printf("===== call Indexer in chain =====") + + // 创建 callback handler + handlerHelper := &callbacksHelper.RetrieverCallbackHandler{ + OnStart: func(ctx context.Context, info *callbacks.RunInfo, input *retriever.CallbackInput) context.Context { + log.Printf("input access, content: %s\n", input.Query) + return ctx + }, + OnEnd: func(ctx context.Context, info *callbacks.RunInfo, output *retriever.CallbackOutput) context.Context { + log.Printf("output finished, len: %v\n", len(output.Docs)) + return ctx + }, + // OnError + } + + // 使用 callback handler + handler := callbacksHelper.NewHandlerHelper(). + Retriever(handlerHelper). + Handler() + + chain := compose.NewChain[string, []*schema.Document]() + chain.AppendRetriever(volcRetriever) + + // 在运行时使用 + run, err := chain.Compile(ctx) + if err != nil { + log.Fatalf("chain.Compile failed, err=%v", err) + } + + outDocs, err := run.Invoke(ctx, query, compose.WithCallbacks(handler)) + if err != nil { + log.Fatalf("run.Invoke failed, err=%v", err) + } + + log.Printf("vikingDB retrieve success, query=%v, docs=%v", query, outDocs) } func of[T any](v T) *T { diff --git a/components/retriever/volc_vikingdb/go.mod b/components/retriever/volc_vikingdb/go.mod index 31b3c58e..dc3222c2 100644 --- a/components/retriever/volc_vikingdb/go.mod +++ b/components/retriever/volc_vikingdb/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/bytedance/mockey v1.2.13 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/smartystreets/goconvey v1.8.1 github.com/volcengine/volc-sdk-golang v1.0.182 ) diff --git a/components/retriever/volc_vikingdb/go.sum b/components/retriever/volc_vikingdb/go.sum index 1e370382..c9743012 100644 --- a/components/retriever/volc_vikingdb/go.sum +++ b/components/retriever/volc_vikingdb/go.sum @@ -97,8 +97,8 @@ github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5P github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= diff --git a/components/tool/bingsearch/README.md b/components/tool/bingsearch/README.md new file mode 100644 index 00000000..36c69caf --- /dev/null +++ b/components/tool/bingsearch/README.md @@ -0,0 +1,116 @@ +# Bing Search Tool + +English | [简体中文](README_zh.md) + +A Bing search tool implementation for [Eino](https://github.com/cloudwego/eino) that implements the `InvokableTool` interface. This enables seamless integration with Eino's ChatModel interaction system and `ToolsNode` for enhanced search capabilities. + +## Features + +- Implements `github.com/cloudwego/eino/components/tool.InvokableTool` +- Easy integration with Eino's tool system +- Configurable search parameters + +## Installation + +```bash +go get github.com/cloudwego/eino-ext/components/tool/bingsearch +``` + +## Quick Start + +```go +package main + +import ( + "context" + "fmt" + "github.com/bytedance/sonic" + "github.com/cloudwego/eino-ext/components/tool/bingsearch" + "github.com/cloudwego/eino-ext/components/tool/bingsearch/bingcore" + "log" + "os" +) + +func main() { + // Set the Bing Search API key + bingSearchAPIKey := os.Getenv("BING_SEARCH_API_KEY") + + // Create a context + ctx := context.Background() + + // Create the Bing Search tool + bingSearchTool, err := bingsearch.NewTool(ctx, &bingsearch.Config{ + APIKey: bingSearchAPIKey, + BingConfig: &bingcore.Config{ + Cache: true, + }, + }) + if err != nil { + log.Fatalf("Failed to create tool: %v", err) + } + // ... configure and use with ToolsNode +``` + +## Configuration + +The tool can be configured using the `Config` struct: + +```go +// Config represents the Bing search tool configuration. +type Config struct { + ToolName string `json:"tool_name"` // default: bing_search + ToolDesc string `json:"tool_desc"` // default: "search web for information by bing" + + APIKey string `json:"api_key"` // default: "" + Region bingcore.Region `json:"region"` // default: "wt-wt" + MaxResults int `json:"max_results"` // default: 10 + SafeSearch bingcore.SafeSearch `json:"safe_search"` // default: bingcore.SafeSearchModerate + TimeRange bingcore.TimeRange `json:"time_range"` // default: nil + + // Bing search configuration + BingConfig struct{ + // Headers specifies custom HTTP headers to be sent with each request. + Headers map[string]string `json:"headers"` + + // Timeout specifies the maximum duration for a single request. + Timeout time.Duration `json:"timeout"` // default: 10s + + // ProxyURL specifies the proxy server URL for all requests. + ProxyURL string `json:"proxy_url"` + + // Cache enables in-memory caching of search results. + Cache bool `json:"cache"` + + // MaxRetries specifies the maximum number of retry attempts for failed requests. + MaxRetries int `json:"max_retries"` // default: 3 + } +} +``` + +## Search + +### Request Schema +```go +type SearchRequest struct { + Query string `json:"query" jsonschema_description:"The query to search the web for"` + Page int `json:"page" jsonschema_description:"The page number to search for, default: 1"` +} +``` + +### Response Schema +```go +type SearchResponse struct { + Results []*searchResult `json:"results" jsonschema_description:"The results of the search"` +} + +type searchResult struct { + Title string `json:"title" jsonschema_description:"The title of the search result"` + URL string `json:"url" jsonschema_description:"The link of the search result"` + Description string `json:"description" jsonschema_description:"The description of the search result"` +} +``` + +## For More Details + +- [DuckDuckGo Search Library Documentation](ddgsearch/README.md) +- [Eino Documentation](https://github.com/cloudwego/eino) diff --git a/components/tool/bingsearch/README_zh.md b/components/tool/bingsearch/README_zh.md new file mode 100644 index 00000000..46ad6e95 --- /dev/null +++ b/components/tool/bingsearch/README_zh.md @@ -0,0 +1,116 @@ +# Bing Search Tool + +[English](README.md) | 简体中文 + +这是一个为 [Eino](https://github.com/cloudwego/eino) 实现的 Bing 搜索工具。该工具实现了 `InvokableTool` 接口,可以与 Eino 的 ChatModel 交互系统和 `ToolsNode` 无缝集成。 + +## 特性 + +- 实现了 `github.com/cloudwego/eino/components/tool.InvokableTool` 接口 +- 易于与 Eino 工具系统集成 +- 可配置的搜索参数 + +## 安装 + +```bash +go get github.com/cloudwego/eino-ext/components/tool/bingsearch +``` + +## 快速开始 + +```go +package main + +import ( + "context" + "fmt" + "github.com/bytedance/sonic" + "github.com/cloudwego/eino-ext/components/tool/bingsearch" + "github.com/cloudwego/eino-ext/components/tool/bingsearch/bingcore" + "log" + "os" +) + +func main() { + // 设置 Bing 搜索的 API key + bingSearchAPIKey := os.Getenv("BING_SEARCH_API_KEY") + + // 创建上下文 + ctx := context.Background() + + // 创建 Bing 搜索工具 + bingSearchTool, err := bingsearch.NewTool(ctx, &bingsearch.Config{ + APIKey: bingSearchAPIKey, + BingConfig: &bingcore.Config{ + Cache: true, + }, + }) + if err != nil { + log.Fatalf("Failed to create tool: %v", err) + } + // ... 配置并使用 ToolsNode +``` + +## 配置 + +工具可以通过 `Config` 结构体进行配置: + +```go +// Config represents the Bing search tool configuration. +type Config struct { + ToolName string `json:"tool_name"` // default: bing_search + ToolDesc string `json:"tool_desc"` // default: "search web for information by bing" + + APIKey string `json:"api_key"` // default: "" + Region bingcore.Region `json:"region"` // default: "wt-wt" + MaxResults int `json:"max_results"` // default: 10 + SafeSearch bingcore.SafeSearch `json:"safe_search"` // default: bingcore.SafeSearchModerate + TimeRange bingcore.TimeRange `json:"time_range"` // default: nil + + // Bing search configuration + BingConfig struct{ + // Headers specifies custom HTTP headers to be sent with each request. + Headers map[string]string `json:"headers"` + + // Timeout specifies the maximum duration for a single request. + Timeout time.Duration `json:"timeout"` // default: 10s + + // ProxyURL specifies the proxy server URL for all requests. + ProxyURL string `json:"proxy_url"` + + // Cache enables in-memory caching of search results. + Cache bool `json:"cache"` + + // MaxRetries specifies the maximum number of retry attempts for failed requests. + MaxRetries int `json:"max_retries"` // default: 3 + } +} +``` + +## Search + +### 请求 Schema +```go +type SearchRequest struct { + Query string `json:"query" jsonschema_description:"The query to search the web for"` + Page int `json:"page" jsonschema_description:"The page number to search for, default: 1"` +} +``` + +### 响应 Schema +```go +type SearchResponse struct { + Results []*searchResult `json:"results" jsonschema_description:"The results of the search"` +} + +type searchResult struct { + Title string `json:"title" jsonschema_description:"The title of the search result"` + URL string `json:"url" jsonschema_description:"The link of the search result"` + Description string `json:"description" jsonschema_description:"The description of the search result"` +} +``` + +## 更多详情 + +- [DuckDuckGo 搜索库文档](ddgsearch/README_zh.md) +- [Eino 文档](https://github.com/cloudwego/eino) \ No newline at end of file diff --git a/components/tool/bingsearch/bing_search.go b/components/tool/bingsearch/bing_search.go new file mode 100644 index 00000000..55b392a2 --- /dev/null +++ b/components/tool/bingsearch/bing_search.go @@ -0,0 +1,143 @@ +package bingsearch + +import ( + "context" + "errors" + "fmt" + "github.com/cloudwego/eino/components/tool" + "github.com/cloudwego/eino/components/tool/utils" + + "github.com/cloudwego/eino-ext/components/tool/bingsearch/bingcore" +) + +// Config represents the Bing search tool configuration. +type Config struct { + ToolName string `json:"tool_name"` // default: bing_search + ToolDesc string `json:"tool_desc"` // default: "search web for information by bing" + + APIKey string `json:"api_key"` // default: "" + Region bingcore.Region `json:"region"` // default: "wt-wt" + MaxResults int `json:"max_results"` // default: 10 + SafeSearch bingcore.SafeSearch `json:"safe_search"` // default: bingcore.SafeSearchModerate + TimeRange bingcore.TimeRange `json:"time_range"` // default: nil + + BingConfig *bingcore.Config `json:"bing_config"` +} + +// NewTool creates a new Bing search tool instance. +func NewTool(ctx context.Context, config *Config) (tool.InvokableTool, error) { + bing, err := newBingSearch(config) + if err != nil { + return nil, fmt.Errorf("failed to create bing search tool: %w", err) + } + + searchTool, err := utils.InferTool(config.ToolName, config.ToolDesc, bing.Search) + if err != nil { + return nil, fmt.Errorf("failed to infer tool: %w", err) + } + + return searchTool, nil +} + +// validate validates the Bing search tool configuration. +func (c *Config) validate() error { + // Set default values + if c.ToolName == "" { + c.ToolName = "bing_search" + } + + if c.ToolDesc == "" { + c.ToolDesc = "search web for information by bing" + } + + // Validate required fields + if c.APIKey == "" { + return errors.New("bing search tool config is missing API key") + } + + if c.BingConfig == nil { + c.BingConfig = &bingcore.Config{ + Headers: make(map[string]string), + } + } + + if c.BingConfig.Headers == nil { + c.BingConfig.Headers = make(map[string]string) + } + + c.BingConfig.Headers["Ocp-Apim-Subscription-Key"] = c.APIKey + + return nil +} + +// bingSearch represents the Bing search tool. +type bingSearch struct { + config *Config + client *bingcore.BingClient +} + +// newBingSearch creates a new Bing search client. +func newBingSearch(config *Config) (*bingSearch, error) { + if config == nil { + return nil, errors.New("bing search tool config's api key is required") + } + + if err := config.validate(); err != nil { + return nil, err + } + + client, err := bingcore.New(config.BingConfig) + if err != nil { + return nil, err + } + + return &bingSearch{ + config: config, + client: client, + }, nil +} + +type SearchRequest struct { + Query string `json:"query" jsonschema_description:"The query to search the web for"` + Page int `json:"page" jsonschema_description:"The page number to search for, default: 1"` +} + +type SearchResult struct { + Title string `json:"title" jsonschema_description:"The title of the search result"` + URL string `json:"url" jsonschema_description:"The link of the search result"` + Description string `json:"description" jsonschema_description:"The description of the search result"` +} + +type SearchResponse struct { + Results []*SearchResult `json:"results" jsonschema_description:"The results of the search"` +} + +// Search searches the web for information. +func (s *bingSearch) Search(ctx context.Context, request *SearchRequest) (response *SearchResponse, err error) { + // Search the web for information + searchResults, err := s.client.Search(ctx, &bingcore.SearchParams{ + Query: request.Query, + Region: s.config.Region, + SafeSearch: s.config.SafeSearch, + TimeRange: s.config.TimeRange, + Offset: request.Page - 1, + Count: s.config.MaxResults, + }) + if err != nil { + return nil, err + } + + // Convert search results to search response + results := make([]*SearchResult, 0, len(searchResults)) + for _, r := range searchResults { + results = append(results, &SearchResult{ + Title: r.Title, + URL: r.URL, + Description: r.Description, + }) + } + + return &SearchResponse{ + Results: results, + }, nil +} diff --git a/components/tool/bingsearch/bing_search_test.go b/components/tool/bingsearch/bing_search_test.go new file mode 100644 index 00000000..40e9435f --- /dev/null +++ b/components/tool/bingsearch/bing_search_test.go @@ -0,0 +1,224 @@ +package bingsearch + +import ( + "context" + "reflect" + "testing" + + "github.com/cloudwego/eino-ext/components/tool/bingsearch/bingcore" +) + +func TestConfig_validate(t *testing.T) { + type fields struct { + ToolName string + ToolDesc string + APIKey string + Region bingcore.Region + MaxResults int + SafeSearch bingcore.SafeSearch + TimeRange bingcore.TimeRange + BingConfig *bingcore.Config + } + tests := []struct { + name string + fields fields + wantErr bool + }{ + { + name: "TestConfig_Validate_Vase", + fields: fields{ + ToolName: "TestConfig_validate", + ToolDesc: "test config validate", + APIKey: "api_key_to_validate", + Region: bingcore.RegionUS, + MaxResults: 0, + SafeSearch: "", + TimeRange: "", + BingConfig: nil, + }, + wantErr: false, + }, + { + name: "TestConfig_Validate_Missing_API_Key", + fields: fields{ + ToolName: "TestConfig_validate", + ToolDesc: "test config validate", + APIKey: "", + Region: bingcore.RegionUS, + MaxResults: 10, + SafeSearch: bingcore.SafeSearchModerate, + TimeRange: "", + BingConfig: nil, + }, + wantErr: true, + }, + { + name: "TestConfig_Validate_Max_Results_Exceed", + fields: fields{ + ToolName: "TestConfig_validate", + ToolDesc: "test config validate", + APIKey: "api_key_to_validate", + Region: bingcore.RegionUS, + MaxResults: 100, + SafeSearch: bingcore.SafeSearchModerate, + TimeRange: "", + BingConfig: nil, + }, + wantErr: false, + }, + { + name: "TestConfig_Validate_Default_Values", + fields: fields{ + ToolName: "", + ToolDesc: "", + APIKey: "api_key_to_validate", + Region: "", + MaxResults: 0, + SafeSearch: "", + TimeRange: "", + BingConfig: nil, + }, + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + c := &Config{ + ToolName: tt.fields.ToolName, + ToolDesc: tt.fields.ToolDesc, + APIKey: tt.fields.APIKey, + Region: tt.fields.Region, + MaxResults: tt.fields.MaxResults, + SafeSearch: tt.fields.SafeSearch, + TimeRange: tt.fields.TimeRange, + BingConfig: tt.fields.BingConfig, + } + if err := c.validate(); (err != nil) != tt.wantErr { + t.Errorf("validate() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} + +func TestNewTool(t *testing.T) { + type args struct { + ctx context.Context + config *Config + } + tests := []struct { + name string + args args + wantErr bool + }{ + { + name: "TestNewTool_Base", + args: args{ + ctx: context.Background(), + config: &Config{ + APIKey: "api_key_to_validate", + }, + }, + wantErr: false, + }, + { + name: "TestNewTool_Missing_API_Key", + args: args{ + ctx: context.Background(), + config: &Config{}, + }, + wantErr: true, + }, + { + name: "TestNewTool_Config_Is_Nil", + args: args{ + ctx: context.Background(), + config: nil, + }, + wantErr: true, + }, + { + name: "TestNewTool_BingConfig_Proxy_Url", + args: args{ + ctx: context.Background(), + config: &Config{ + APIKey: "api_key_to_test", + BingConfig: &bingcore.Config{ + ProxyURL: "http://localhost:9878", + }, + }, + }, + wantErr: false, + }, + { + name: "TestNewTool_BingConfig_Proxy_Url_not_Supported", + args: args{ + ctx: context.Background(), + config: &Config{ + APIKey: "api_key_to_validate", + BingConfig: &bingcore.Config{ + ProxyURL: "ftp://proxy.example.com", + }, + }, + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := NewTool(tt.args.ctx, tt.args.config) + if (err != nil) != tt.wantErr { + t.Errorf("NewTool() error = %v, wantErr %v", err, tt.wantErr) + return + } + if (got == nil) != tt.wantErr { + t.Errorf("NewTool() got = %v, want not nil", got) + } + }) + } +} + +func Test_bingSearch_Search(t *testing.T) { + type args struct { + ctx context.Context + request *SearchRequest + } + tests := []struct { + name string + fields *Config + args args + wantResponse *SearchResponse + wantErr bool + }{ + { + name: "Test_bingSearch_Missing_Query", + fields: &Config{ + APIKey: "api_key_to_test", + }, + args: args{ + ctx: context.Background(), + request: &SearchRequest{ + Query: "", + }, + }, + wantResponse: nil, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + s, err := newBingSearch(tt.fields) + if err != nil { + t.Errorf("failed to create bing search tool: %t", err) + } + gotResponse, err := s.Search(tt.args.ctx, tt.args.request) + if (err != nil) != tt.wantErr { + t.Errorf("Search() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(gotResponse, tt.wantResponse) { + t.Errorf("Search() gotResponse = %v, want %v", gotResponse, tt.wantResponse) + return + } + }) + } +} diff --git a/components/tool/bingsearch/bingcore/cache.go b/components/tool/bingsearch/bingcore/cache.go new file mode 100644 index 00000000..4dcc0f20 --- /dev/null +++ b/components/tool/bingsearch/bingcore/cache.go @@ -0,0 +1,142 @@ +/* + * Copyright 2024 CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package bingcore + +import ( + "runtime" + "sync" + "time" +) + +// janitor is a background task that cleans up expired cache items +type janitor struct { + interval time.Duration + stop chan struct{} +} + +// Run starts the janitor in a new goroutine +func (j *janitor) Run(c *cache) { + ticker := time.NewTicker(j.interval) + for { + select { + case <-ticker.C: + c.deleteExpired() + case <-j.stop: + ticker.Stop() + return + } + } +} + +// stopJanitor stops the janitor +func stopJanitor(c *cache) { + c.janitor.stop <- struct{}{} +} + +// newJanitor creates a new janitor with the specified interval +func newJanitor(interval time.Duration) *janitor { + return &janitor{ + interval: interval, + stop: make(chan struct{}), + } +} + +// cache implements a simple in-memory cache with expiration +type cache struct { + mu sync.RWMutex + items map[string]*cacheItem + maxAge time.Duration + janitor *janitor +} + +type cacheItem struct { + value interface{} + expiration time.Time +} + +func newCache(maxAge time.Duration) *cache { + j := newJanitor(maxAge) + + c := &cache{ + items: make(map[string]*cacheItem), + maxAge: maxAge, + janitor: j, + } + + go c.janitor.Run(c) + runtime.SetFinalizer(c, stopJanitor) + + return c +} + +func (c *cache) get(key string) (interface{}, bool) { + c.mu.RLock() + item, exists := c.items[key] + c.mu.RUnlock() + + if !exists { + return nil, false + } + + if time.Now().After(item.expiration) { // expiration check + c.delete(key) // delete expired items directly + return nil, false + } + + return item.value, true +} + +func (c *cache) set(key string, value interface{}) { + c.mu.Lock() + defer c.mu.Unlock() + + c.items[key] = &cacheItem{ + value: value, + expiration: time.Now().Add(c.maxAge), + } +} + +func (c *cache) delete(key string) { + c.mu.Lock() + defer c.mu.Unlock() + delete(c.items, key) +} + +func (c *cache) deleteExpired() { + now := time.Now() + expiredKeys := make([]string, 0) + + c.mu.RLock() // add read lock extract expired key + for k, v := range c.items { + if now.After(v.expiration) { + expiredKeys = append(expiredKeys, k) + } + } + c.mu.RUnlock() + + c.mu.Lock() // add write locks delete expired keys + defer c.mu.Unlock() + for _, k := range expiredKeys { + delete(c.items, k) + } +} + +func (c *cache) clear() { + c.mu.Lock() + defer c.mu.Unlock() + c.items = make(map[string]*cacheItem) +} diff --git a/components/tool/bingsearch/bingcore/client.go b/components/tool/bingsearch/bingcore/client.go new file mode 100644 index 00000000..f1550b1f --- /dev/null +++ b/components/tool/bingsearch/bingcore/client.go @@ -0,0 +1,209 @@ +package bingcore + +import ( + "context" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "time" +) + +// BingClient represents the Bing search client. +type BingClient struct { + client *http.Client + baseURL string + headers map[string]string + timeout time.Duration + cache *cache + config *Config +} + +// Config represents the Bing search client configuration. +type Config struct { + // Headers specifies custom HTTP headers to be sent with each request. + // Common headers like "User-Agent" can be set here. + // Default: + // Headers: map[string]string{ + // "Ocp-Apim-Subscription-Key": "YOUR_API_KEY", + // "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", + // Example: + // Headers: map[string]string{ + // "User-Agent": "MyApp/1.0", + // "Accept-Language": "en-US", + // } + Headers map[string]string `json:"headers"` + + // Timeout specifies the maximum duration for a single request. + // Default is 30 seconds if not specified. + // Example: 5 * time.Second + Timeout time.Duration `json:"timeout"` // default: 30 seconds + + // ProxyURL specifies the proxy server URL for all requests. + // Supports HTTP, HTTPS, and SOCKS5 proxies. + // Example values: + // - "http://proxy.example.com:8080" + // - "socks5://localhost:1080" + // - "tb" (special alias for Tor Browser) + ProxyURL string `json:"proxy_url"` + + // Cache enables in-memory caching of search results. + // When enabled, identical search requests will return cached results + // for improved performance. Cache entries expire after 5 minutes. + Cache bool `json:"cache"` + + // MaxRetries specifies the maximum number of retry attempts for failed requests. + MaxRetries int `json:"max_retries"` // default: 3 +} + +// New creates a new BingClient instance. +func New(config *Config) (*BingClient, error) { + if config.Timeout == 0 { + config.Timeout = 30 * time.Second + } + + if config.MaxRetries == 0 { + config.MaxRetries = 3 + } + + c := &BingClient{ + client: &http.Client{Timeout: config.Timeout}, + baseURL: searchURL, + headers: config.Headers, + timeout: config.Timeout, + config: config, + } + + if config.ProxyURL != "" { + proxyURL, err := url.Parse(config.ProxyURL) + if err != nil { + return nil, fmt.Errorf("invalid proxy URL: %w", err) + } + + // Validate proxy scheme + switch proxyURL.Scheme { + case "http", "https", "socks5": + c.client.Transport = &http.Transport{ + Proxy: http.ProxyURL(proxyURL), + } + default: + return nil, fmt.Errorf("unsupported proxy scheme: %s", proxyURL.Scheme) + } + } + + if config.Cache { + c.cache = newCache(5 * time.Minute) // 5 minutes cache + } + + return c, nil +} + +// sendRequestWithRetry sends the request with retry logic. +func (b *BingClient) sendRequestWithRetry(ctx context.Context, req *http.Request) ([]*searchResult, error) { + var resp *http.Response + var err error + var attempt int + + for attempt = 0; attempt <= b.config.MaxRetries; attempt++ { + // Check context cancellation + if err = ctx.Err(); err != nil { + return nil, err + } + + resp, err = b.client.Do(req) + if err != nil { + if attempt == b.config.MaxRetries { + return nil, fmt.Errorf("failed to send request after retries: %w", err) + } + time.Sleep(time.Second) // Simple fixed one-second delay between retries + continue + } + + // Check for rate limit response + if resp.StatusCode == http.StatusTooManyRequests { + if attempt == b.config.MaxRetries { + return nil, errors.New("rate limit reached") + } + time.Sleep(time.Second) + continue + } + + break + } + + defer resp.Body.Close() + + // Read response body + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, fmt.Errorf("failed to read response body: %w", err) + } + + // Parse search response + response, err := parseSearchResponse(body) + if err != nil { + return nil, fmt.Errorf("failed to parse search results: %w", err) + } + + // Check for no results + if len(response) == 0 { + return nil, errors.New("no search results found") + } + + return response, nil +} + +// Search sends a search request to Bing API and returns the search results. +func (b *BingClient) Search(ctx context.Context, params *SearchParams) ([]*searchResult, error) { + if params == nil { + return nil, errors.New("params is nil") + } + + // Validate search query + if err := params.validate(); err != nil { + return nil, err + } + + // Set default SafeSearch if not provided + query := params.build() + + // Check cache for existing results + if b.cache != nil { + params.cacheKey = params.getCacheKey() + + if results, ok := b.cache.get(params.cacheKey); ok { + return results.([]*searchResult), nil + } + } + + // Build query URL + queryURL := fmt.Sprintf("%s?%s", b.baseURL, query.Encode()) + req, err := http.NewRequestWithContext(ctx, "GET", queryURL, nil) + if err != nil { + return nil, fmt.Errorf("failed to create request: %w", err) + } + + // Set headers + for k, v := range b.headers { + req.Header.Set(k, v) + } + + // Set default User-Agent if not provided + if _, ok := req.Header["User-Agent"]; !ok { + req.Header.Set("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36") + } + + // Send request with retry + results, err := b.sendRequestWithRetry(ctx, req) + if err != nil { + return nil, err + } + + // Cache search results + if b.cache != nil && params.cacheKey != "" { + b.cache.set(params.cacheKey, results) + } + + return results, nil +} diff --git a/components/tool/bingsearch/bingcore/client_test.go b/components/tool/bingsearch/bingcore/client_test.go new file mode 100644 index 00000000..31bf4ec9 --- /dev/null +++ b/components/tool/bingsearch/bingcore/client_test.go @@ -0,0 +1,344 @@ +package bingcore + +import ( + "context" + "net/http" + "reflect" + "testing" + "time" +) + +func TestBingClient_Search(t *testing.T) { + type args struct { + ctx context.Context + params *SearchParams + } + tests := []struct { + name string + fields *Config + args args + want []*searchResult + wantErr bool + }{ + { + name: "TestBingClient_Search_Params_Missing", + fields: &Config{ + Headers: map[string]string{ + "Ocp-Apim-Subscription-Key": "api_key_to_test", + }, + }, + args: args{ + ctx: context.Background(), + params: nil, + }, + want: nil, + wantErr: true, + }, + { + name: "TestBingClient_Search_Params_Query_Missing", + fields: &Config{ + Headers: map[string]string{ + "Ocp-Apim-Subscription-Key": "api_key_to_test", + }, + }, + args: args{ + ctx: context.Background(), + params: &SearchParams{ + Query: "", + }, + }, + want: nil, + wantErr: true, + }, + { + name: "TestBingClient_Search_Params_Query_Valid", + fields: &Config{ + Headers: map[string]string{ + "Ocp-Apim-Subscription-Key": "api_key_to_test", + }, + }, + args: args{ + ctx: context.Background(), + params: &SearchParams{ + Query: "Test", + Count: 10, + }, + }, + want: nil, + wantErr: true, + }, + { + name: "TestBingClient_Search_Params_Query_Valid_With_Cache", + fields: &Config{ + Headers: map[string]string{ + "Ocp-Apim-Subscription-Key": "api_key_to_test", + }, + Cache: true, + }, + args: args{ + ctx: context.Background(), + params: &SearchParams{ + Query: "Test", + Count: 10, + }, + }, + want: []*searchResult{ + { + Title: "The Better Web Browser for Windows...", + URL: "https://ww.microsoft.com/en-us/...", + Description: "Microsoft Edge, now available on ios...", + }, + { + Title: "Microsoft Edge", + URL: "https://ww.microsoft.com/en-us/...", + Description: "Microsoft Edge, now available on ios...", + }, + }, + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + b, err := New(tt.fields) + if err != nil { + t.Errorf("New() error = %v", err) + return + } + if tt.fields.Cache { + if err := tt.args.params.validate(); err != nil { + return + } + cacheKey := tt.args.params.getCacheKey() + b.cache.set(cacheKey, []*searchResult{ + { + Title: "The Better Web Browser for Windows...", + URL: "https://ww.microsoft.com/en-us/...", + Description: "Microsoft Edge, now available on ios...", + }, + { + Title: "Microsoft Edge", + URL: "https://ww.microsoft.com/en-us/...", + Description: "Microsoft Edge, now available on ios...", + }, + }) + } + got, err := b.Search(tt.args.ctx, tt.args.params) + if (err != nil) != tt.wantErr { + t.Errorf("Search() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("Search() got = %v, want %v", got, tt.want) + } + }) + } +} + +func TestBingClient_sendRequestWithRetry(t *testing.T) { + type fields struct { + client *http.Client + baseURL string + headers map[string]string + timeout time.Duration + config *Config + } + type args struct { + ctx context.Context + req *http.Request + params *SearchParams + } + tests := []struct { + name string + fields fields + args args + want []*searchResult + wantErr bool + }{ + { + name: "TestBingClient_sendRequestWithRetry_Base", + fields: fields{ + client: &http.Client{}, + config: &Config{ + Headers: map[string]string{ + "Ocp-Apim-Subscription-Key": "api_key_to_test", + }, + MaxRetries: 0, + }, + }, + args: args{ + ctx: context.Background(), + req: &http.Request{ + Header: http.Header{}, + }, + params: &SearchParams{ + Query: "Test", + }, + }, + want: nil, + wantErr: true, + }, + { + name: "TestBingClient_sendRequestWithRetry_Max_Retries", + fields: fields{ + client: &http.Client{Timeout: 10 * time.Second}, + config: &Config{ + Headers: make(map[string]string), + Timeout: 10 * time.Second, + MaxRetries: 3, + }, + }, + args: args{ + ctx: context.Background(), + req: &http.Request{ + Header: http.Header{}, + }, + params: &SearchParams{ + Query: "Test", + Count: 10, + }, + }, + want: nil, + wantErr: true, + }, + { + + name: "TestBingClient_sendRequestWithRetry_Context_Cancelled", + fields: fields{ + client: &http.Client{Timeout: 10 * time.Second}, + config: &Config{ + Headers: make(map[string]string), + Timeout: 10 * time.Second, + MaxRetries: 3, + }, + }, + args: args{ + ctx: context.Background(), + req: &http.Request{ + Header: http.Header{}, + }, + params: &SearchParams{ + Query: "Test", + Count: 10, + }, + }, + want: nil, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + b := &BingClient{ + client: tt.fields.client, + baseURL: tt.fields.baseURL, + headers: tt.fields.headers, + timeout: tt.fields.timeout, + config: tt.fields.config, + } + if tt.name == "TestBingClient_sendRequestWithRetry_Context_Cancelled" { + ctx, cancel := context.WithTimeout(tt.args.ctx, 1*time.Second) + cancel() + tt.args.ctx = ctx + } + got, err := b.sendRequestWithRetry(tt.args.ctx, tt.args.req) + if (err != nil) != tt.wantErr { + t.Errorf("sendRequestWithRetry() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("sendRequestWithRetry() got = %v, want %v", got, tt.want) + } + }) + } +} + +func TestNew(t *testing.T) { + type args struct { + config *Config + } + tests := []struct { + name string + args args + want *BingClient + wantErr bool + }{ + { + name: "TestNew_Base", + args: args{ + config: &Config{ + Headers: map[string]string{ + "Ocp-Apim-Subscription-Key": "api_key_to_test", + }, + }, + }, + want: &BingClient{ + client: &http.Client{Timeout: 30 * time.Second}, + baseURL: "https://api.bing.microsoft.com/v7.0/search", + headers: map[string]string{ + "Ocp-Apim-Subscription-Key": "api_key_to_test", + }, + timeout: 30 * time.Second, + config: &Config{ + Headers: map[string]string{ + "Ocp-Apim-Subscription-Key": "api_key_to_test", + }, + Timeout: 30 * time.Second, + MaxRetries: 3, + }, + }, + wantErr: false, + }, + { + name: "TestNew_Invalid_Proxy", + args: args{ + config: &Config{ + Headers: map[string]string{ + "Ocp-Apim-Subscription-Key": "api_key_to_test", + }, + ProxyURL: "invalid_proxy", + }, + }, + want: nil, + wantErr: true, + }, + { + name: "TestNew_With_Cache", + args: args{ + config: &Config{ + Headers: map[string]string{ + "Ocp-Apim-Subscription-Key": "api_key_to_test", + }, + Cache: true, + }, + }, + want: &BingClient{ + client: &http.Client{Timeout: 30 * time.Second}, + baseURL: "https://api.bing.microsoft.com/v7.0/search", + headers: map[string]string{ + "Ocp-Apim-Subscription-Key": "api_key_to_test", + }, + timeout: 30 * time.Second, + cache: newCache(5 * time.Minute), + config: &Config{ + Headers: map[string]string{ + "Ocp-Apim-Subscription-Key": "api_key_to_test", + }, + Timeout: 30 * time.Second, + Cache: true, + MaxRetries: 3, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := New(tt.args.config) + if (err != nil) != tt.wantErr { + t.Errorf("New() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("New() got = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/components/tool/bingsearch/bingcore/types.go b/components/tool/bingsearch/bingcore/types.go new file mode 100644 index 00000000..13efe908 --- /dev/null +++ b/components/tool/bingsearch/bingcore/types.go @@ -0,0 +1,222 @@ +package bingcore + +import ( + "crypto/md5" + "fmt" + "net/url" + "strconv" + "time" +) + +// searchURL is the base URL for the Bing Web Search API. +const ( + searchURL = "https://api.bing.microsoft.com/v7.0/search" +) + +// Region This type represents the Bing search region. +// The region is used to customize the search results for a specific country or language. +// Supported regions: en-US, en-GB, en-CA, en-AU, de-DE, fr-FR, zh-CN, zh-HK, zh-TW, ja-JP, ko-KR. +// Please refer to https://learn.microsoft.com/en-us/bing/search-apis/bing-web-search/reference/market-codes +type Region string + +const ( + RegionUS Region = "en-US" + RegionGB Region = "en-GB" + RegionCA Region = "en-CA" + RegionAU Region = "en-AU" + RegionDE Region = "de-DE" + RegionFR Region = "fr-FR" + RegionCN Region = "zh-CN" + RegionHK Region = "zh-HK" + RegionTW Region = "zh-TW" + RegionJP Region = "ja-JP" + RegionKR Region = "ko-KR" +) + +// SafeSearch This type represents the Bing search safe search setting. +type SafeSearch string + +const ( + SafeSearchOff SafeSearch = "Off" + SafeSearchModerate SafeSearch = "Moderate" + SafeSearchStrict SafeSearch = "Strict" +) + +// TimeRange This type represents the Bing search time range. +type TimeRange string + +const ( + TimeRangeDay TimeRange = "Day" + TimeRangeWeek TimeRange = "Week" + TimeRangeMonth TimeRange = "Month" +) + +// SearchParams This struct represents the search parameters for the Bing Web Search API. +// The search parameters include the search query, region, safe search setting, time range, offset, and count. +// The search parameters are used to customize the search results. +// Please refer to https://learn.microsoft.com/en-us/bing/search-apis/bing-web-search/reference/query-parameters +type SearchParams struct { + // Query specifies the search query. + // The search query is the keyword or phrase to search the web for. And it's required. + Query string `json:"q"` + + // Region specifies the search region. + // The search region is used to customize the search results for a specific country or language. + Region Region `json:"mkt"` + + // SafeSearch specifies the safe search setting. + // The safe search setting filters adult content from the search results. Default is "Moderate". + SafeSearch SafeSearch `json:"safe_search"` + + // TimeRange specifies the time range for the search results. + // The time range filters the search results by the date they were last crawled. + TimeRange TimeRange `json:"freshness"` + + // Offset specifies the search result offset. + // The search result offset is the number of search results to skip before returning the search results. + // Default is 0 and must be greater than 0. + Offset int `json:"offset"` + + // Count specifies the number of search results to return. + // The number of search results to return must be greater than 0 and less than or equal to 50. + // Default is 10 and must be greater than 0. + Count int `json:"count"` + + cacheKey string +} + +// NextPage NewSearchParams creates a new SearchParams instance. +func (s *SearchParams) NextPage() *SearchParams { + return &SearchParams{ + Query: s.Query, + Region: s.Region, + SafeSearch: s.SafeSearch, + TimeRange: s.TimeRange, + Offset: s.Offset + 1, + Count: s.Count, + } +} + +// NewSearchParams creates a new SearchParams instance. +func (s *SearchParams) build() url.Values { + // Build search parameters + params := url.Values{} + + params.Set("q", s.Query) + params.Set("count", strconv.Itoa(s.Count)) + params.Set("offset", strconv.Itoa(s.Offset)) + + if s.Region != "" { + params.Set("mkt", string(s.Region)) + } + + if s.TimeRange != "" { + params.Set("freshness", string(s.TimeRange)) + } + + if s.SafeSearch != "" { + params.Set("safeSearch", string(s.SafeSearch)) + } + + return params +} + +// getCacheKey generates a cache key for the search parameters. +// The cache key is a combination of the search query and the hash of the search parameters. +func (s *SearchParams) getCacheKey() string { + params := s.build().Encode() + hash := md5.Sum([]byte(params)) + return fmt.Sprintf("%s_%x", s.Query, hash) +} + +// validate validates the search parameters. +func (s *SearchParams) validate() error { + // Validate params + if s.Query == "" { + return fmt.Errorf("search query cannot be empty") + } + + if s.Offset < 0 { + return fmt.Errorf("search offset must be greater than or equal to 0") + } + + if s.Count < 0 { + return fmt.Errorf("search count must be greater than 0") + } + + if s.SafeSearch == "" { + s.SafeSearch = SafeSearchModerate + } + + if s.Count == 0 { + s.Count = 10 + } + + if s.Count > 50 { + s.Count = 50 + } + + return nil +} + +// searchResult This struct formats the search results provided by the Bing Web Search API. +type searchResult struct { + Title string `json:"title"` + URL string `json:"url"` + Description string `json:"description"` +} + +// bingAnswer This struct formats the answers provided by the Bing Web Search API. +type bingAnswer struct { + Type string `json:"_type"` + QueryContext struct { + OriginalQuery string `json:"originalQuery"` + } `json:"queryContext"` + WebPages struct { + WebSearchURL string `json:"webSearchUrl"` + TotalEstimatedMatches int `json:"totalEstimatedMatches"` + Value []struct { + ID string `json:"id"` + Name string `json:"name"` + URL string `json:"url"` + IsFamilyFriendly bool `json:"isFamilyFriendly"` + DisplayURL string `json:"displayUrl"` + Snippet string `json:"snippet"` + DateLastCrawled time.Time `json:"dateLastCrawled"` + SearchTags []struct { + Name string `json:"name"` + Content string `json:"content"` + } `json:"searchTags,omitempty"` + About []struct { + Name string `json:"name"` + } `json:"about,omitempty"` + } `json:"value"` + } `json:"webPages"` + RelatedSearches struct { + ID string `json:"id"` + Value []struct { + Text string `json:"text"` + DisplayText string `json:"displayText"` + WebSearchURL string `json:"webSearchUrl"` + } `json:"value"` + } `json:"relatedSearches"` + RankingResponse struct { + Mainline struct { + Items []struct { + AnswerType string `json:"answerType"` + ResultIndex int `json:"resultIndex"` + Value struct { + ID string `json:"id"` + } `json:"value"` + } `json:"items"` + } `json:"mainline"` + Sidebar struct { + Items []struct { + AnswerType string `json:"answerType"` + Value struct { + ID string `json:"id"` + } `json:"value"` + } `json:"items"` + } `json:"sidebar"` + } `json:"rankingResponse"` +} diff --git a/components/tool/bingsearch/bingcore/utils.go b/components/tool/bingsearch/bingcore/utils.go new file mode 100644 index 00000000..22c14324 --- /dev/null +++ b/components/tool/bingsearch/bingcore/utils.go @@ -0,0 +1,29 @@ +package bingcore + +import ( + "fmt" + + "github.com/bytedance/sonic" +) + +// bingAnswer represents the response from Bing search API. +func parseSearchResponse(body []byte) ([]*searchResult, error) { + var response bingAnswer + + // Unmarshal response body + err := sonic.Unmarshal(body, &response) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal response: %w", err) + } + + // Convert response to search results + results := make([]*searchResult, 0, len(response.WebPages.Value)) + for _, resp := range response.WebPages.Value { + results = append(results, &searchResult{ + Title: resp.Name, + URL: resp.URL, + Description: resp.Snippet, + }) + } + return results, nil +} diff --git a/components/tool/bingsearch/bingcore/utils_test.go b/components/tool/bingsearch/bingcore/utils_test.go new file mode 100644 index 00000000..e60bca79 --- /dev/null +++ b/components/tool/bingsearch/bingcore/utils_test.go @@ -0,0 +1,110 @@ +package bingcore + +import ( + "reflect" + "testing" +) + +var response = []byte(` +{ + "_type": "SearchResponse", + "queryContext": { + "originalQuery": "microsoft edge" + }, + "webPages": { + "webSearchUrl": "https://ww.bing.com/search?q=microsoft+edge", + "totalEstimatedMatches": 203000000, + "value": [ + { + "name": "The Better Web Browser for Windows...", + "url": "https://ww.microsoft.com/en-us/...", + "isFamilyFriendly": true, + "displayUrl": "https://ww.microsoft.com/en-us/w...", + "snippet": "Microsoft Edge, now available on ios...", + "language": "", + "isNavigational": true + }, + { + "name": "Microsoft Edge", + "url": "https://ww.microsoft.com/en-us/...", + "isFamilyFriendly": true, + "displayUrl": "https://ww.microsoft.com/en-us/w...", + "snippet": "Microsoft Edge, now available on ios...", + "language": "", + "isNavigational": true + } + ] + }, + "computation": { + "id": "https://api.bing.microsoft.com/api/v7/#Computation", + "expression": "21000 / 8", + "value": "2625" + }, + "relatedSearches": { + "value": [ + { + "id": "https://api.bing.microsoft.com/api/v7/#RelatedSearches", + "text": "microsoft edge new download for windows 10", + "displayText": "microsoft edge new download for...", + "webSearchUrl": "https://ww.bing.com/search?q=micr..." + }, + { + "text": "download microsoft edge window 10", + "displayText": "download microsoft edge window 10", + "webSearchUrl": "https://ww.bing.com/search?q=down..." + } + ] + } +} +`) + +func Test_parseSearchResponse(t *testing.T) { + type args struct { + body []byte + } + tests := []struct { + name string + args args + want []*searchResult + wantErr bool + }{ + { + name: "Test_parseSearchResponse_Base", + args: args{ + body: response, + }, + want: []*searchResult{ + { + Title: "The Better Web Browser for Windows...", + URL: "https://ww.microsoft.com/en-us/...", + Description: "Microsoft Edge, now available on ios...", + }, + { + Title: "Microsoft Edge", + URL: "https://ww.microsoft.com/en-us/...", + Description: "Microsoft Edge, now available on ios...", + }, + }, + wantErr: false, + }, { + name: "Test_parseSearchResponse_JSON_Error", + args: args{ + body: []byte(`"error": "erro"}`), + }, + want: nil, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := parseSearchResponse(tt.args.body) + if (err != nil) != tt.wantErr { + t.Errorf("parseSearchResponse() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("parseSearchResponse() got = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/components/tool/bingsearch/example/main.go b/components/tool/bingsearch/example/main.go new file mode 100644 index 00000000..49ddaa97 --- /dev/null +++ b/components/tool/bingsearch/example/main.go @@ -0,0 +1,60 @@ +package main + +import ( + "context" + "fmt" + "log" + "os" + + "github.com/bytedance/sonic" + + "github.com/cloudwego/eino-ext/components/tool/bingsearch" + "github.com/cloudwego/eino-ext/components/tool/bingsearch/bingcore" +) + +func main() { + // Set the Bing Search API key + bingSearchAPIKey := os.Getenv("BING_SEARCH_API_KEY") + + // Create a context + ctx := context.Background() + + // Create the Bing Search tool + bingSearchTool, err := bingsearch.NewTool(ctx, &bingsearch.Config{ + APIKey: bingSearchAPIKey, + BingConfig: &bingcore.Config{ + Cache: true, + }, + }) + if err != nil { + log.Fatalf("Failed to create tool: %v", err) + } + + // Create a search request + request := &bingsearch.SearchRequest{ + Query: "Eino", + Page: 1, + } + + jsonReq, err := sonic.Marshal(request) + + // Execute the search + resp, err := bingSearchTool.InvokableRun(ctx, string(jsonReq)) + if err != nil { + log.Fatalf("Search failed: %v", err) + } + + // Unmarshal the search response + var searchResp bingsearch.SearchResponse + if err := sonic.Unmarshal([]byte(resp), &searchResp); err != nil { + log.Fatalf("Failed to unmarshal search response: %v", err) + } + + // Print the search results + fmt.Println("Search Results:") + for i, result := range searchResp.Results { + fmt.Printf("Title %d. %s\n", i+1, result.Title) + fmt.Printf("Link: %s\n", result.URL) + fmt.Printf("Description: %s\n", result.Description) + } +} diff --git a/components/tool/bingsearch/go.mod b/components/tool/bingsearch/go.mod new file mode 100644 index 00000000..6e9b6414 --- /dev/null +++ b/components/tool/bingsearch/go.mod @@ -0,0 +1,44 @@ +module github.com/cloudwego/eino-ext/components/tool/bingsearch + +go 1.23.4 + +require ( + github.com/bytedance/mockey v1.2.14 + github.com/bytedance/sonic v1.12.7 + github.com/cloudwego/eino v0.3.7 +) + +require ( + github.com/bytedance/sonic/loader v0.2.2 // indirect + github.com/cloudwego/base64x v0.1.4 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/getkin/kin-openapi v0.118.0 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/swag v0.19.5 // indirect + github.com/goph/emperror v0.17.2 // indirect + github.com/gopherjs/gopherjs v1.17.2 // indirect + github.com/invopop/yaml v0.1.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/jtolds/gls v4.20.0+incompatible // indirect + github.com/klauspost/cpuid/v2 v2.0.9 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect + github.com/nikolalohinski/gonja v1.5.3 // indirect + github.com/pelletier/go-toml/v2 v2.0.9 // indirect + github.com/perimeterx/marshmallow v1.1.4 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/slongfield/pyfmt v0.0.0-20220222012616-ea85ff4c361f // indirect + github.com/smarty/assertions v1.15.0 // indirect + github.com/smartystreets/goconvey v1.8.1 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/yargevad/filepathx v1.0.0 // indirect + golang.org/x/arch v0.11.0 // indirect + golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect + golang.org/x/sys v0.26.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/components/tool/bingsearch/go.sum b/components/tool/bingsearch/go.sum new file mode 100644 index 00000000..094fb049 --- /dev/null +++ b/components/tool/bingsearch/go.sum @@ -0,0 +1,157 @@ +github.com/airbrake/gobrake v3.6.1+incompatible/go.mod h1:wM4gu3Cn0W0K7GUuVWnlXZU11AGBXMILnrdOU8Kn00o= +github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bugsnag/bugsnag-go v1.4.0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/bytedance/mockey v1.2.14 h1:KZaFgPdiUwW+jOWFieo3Lr7INM1P+6adO3hxZhDswY8= +github.com/bytedance/mockey v1.2.14/go.mod h1:1BPHF9sol5R1ud/+0VEHGQq/+i2lN+GTsr3O2Q9IENY= +github.com/bytedance/sonic v1.12.7 h1:CQU8pxOy9HToxhndH0Kx/S1qU/CuS9GnKYrGioDcU1Q= +github.com/bytedance/sonic v1.12.7/go.mod h1:tnbal4mxOMju17EGfknm2XyYcpyCnIROYOEYuemj13I= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.2 h1:jxAJuN9fOot/cyz5Q6dUuMJF5OqQ6+5GfA8FjjQ0R4o= +github.com/bytedance/sonic/loader v0.2.2/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= +github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM= +github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/goph/emperror v0.17.2 h1:yLapQcmEsO0ipe9p5TaN22djm3OFV/TfM/fcYP0/J18= +github.com/goph/emperror v0.17.2/go.mod h1:+ZbQ+fUNO/6FNiUo0ujtMjhgad9Xa6fQL9KhH4LNHic= +github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g= +github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/invopop/yaml v0.1.0 h1:YW3WGUoJEXYfzWBjn00zIlrw7brGVD0fUKRYDPAPhrc= +github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= +github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/nikolalohinski/gonja v1.5.3 h1:GsA+EEaZDZPGJ8JtpeGN78jidhOlxeJROpqMT9fTj9c= +github.com/nikolalohinski/gonja v1.5.3/go.mod h1:RmjwxNiXAEqcq1HeK5SSMmqFJvKOfTfXhkJv6YBtPa4= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= +github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/perimeterx/marshmallow v1.1.4 h1:pZLDH9RjlLGGorbXhcaQLhfuV0pFMNfPO55FuFkxqLw= +github.com/perimeterx/marshmallow v1.1.4/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rollbar/rollbar-go v1.0.2/go.mod h1:AcFs5f0I+c71bpHlXNNDbOWJiKwjFDtISeXco0L5PKQ= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/slongfield/pyfmt v0.0.0-20220222012616-ea85ff4c361f h1:Z2cODYsUxQPofhpYRMQVwWz4yUVpHF+vPi+eUdruUYI= +github.com/slongfield/pyfmt v0.0.0-20220222012616-ea85ff4c361f/go.mod h1:JqzWyvTuI2X4+9wOHmKSQCYxybB/8j6Ko43qVmXDuZg= +github.com/smarty/assertions v1.15.0 h1:cR//PqUBUiQRakZWqBiFFQ9wb8emQGDb0HeGdqGByCY= +github.com/smarty/assertions v1.15.0/go.mod h1:yABtdzeQs6l1brC900WlRNwj6ZR55d7B+E8C6HtKdec= +github.com/smartystreets/goconvey v1.8.1 h1:qGjIddxOk4grTu9JPOU31tVfq3cNdBlNa5sSznIX1xY= +github.com/smartystreets/goconvey v1.8.1/go.mod h1:+/u4qLyY6x1jReYOp7GOM2FSt8aP9CzCZL03bI28W60= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +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/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= +github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= +github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= +github.com/yargevad/filepathx v1.0.0 h1:SYcT+N3tYGi+NvazubCNlvgIPbzAk7i7y2dwg3I5FYc= +github.com/yargevad/filepathx v1.0.0/go.mod h1:BprfX/gpYNJHJfc35GjRRpVcwWXS89gGulUIU5tK3tA= +golang.org/x/arch v0.11.0 h1:KXV8WWKCXm6tRpLirl2szsO5j/oOODwZf4hATmGVNs4= +golang.org/x/arch v0.11.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= diff --git a/components/tool/duckduckgo/go.mod b/components/tool/duckduckgo/go.mod index 174230d7..9141cdec 100644 --- a/components/tool/duckduckgo/go.mod +++ b/components/tool/duckduckgo/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/bytedance/mockey v1.2.13 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/stretchr/testify v1.9.0 ) diff --git a/components/tool/duckduckgo/go.sum b/components/tool/duckduckgo/go.sum index fc2cc676..9d198c6f 100644 --- a/components/tool/duckduckgo/go.sum +++ b/components/tool/duckduckgo/go.sum @@ -13,8 +13,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/components/tool/googlesearch/go.mod b/components/tool/googlesearch/go.mod index ba06bd13..381d5a86 100644 --- a/components/tool/googlesearch/go.mod +++ b/components/tool/googlesearch/go.mod @@ -5,7 +5,7 @@ go 1.21 require ( github.com/bytedance/mockey v1.2.13 github.com/bytedance/sonic v1.12.3 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/stretchr/testify v1.9.0 google.golang.org/api v0.204.0 ) diff --git a/components/tool/googlesearch/go.sum b/components/tool/googlesearch/go.sum index d1c14510..f5f30ec3 100644 --- a/components/tool/googlesearch/go.sum +++ b/components/tool/googlesearch/go.sum @@ -23,8 +23,8 @@ github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEex github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= diff --git a/libs/acl/langfuse/go.mod b/libs/acl/langfuse/go.mod index 824546f1..c7dc7d68 100644 --- a/libs/acl/langfuse/go.mod +++ b/libs/acl/langfuse/go.mod @@ -6,7 +6,7 @@ require ( github.com/bytedance/mockey v1.2.13 github.com/bytedance/sonic v1.12.6 github.com/cenkalti/backoff/v4 v4.3.0 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/golang/mock v1.6.0 github.com/google/uuid v1.6.0 github.com/stretchr/testify v1.9.0 diff --git a/libs/acl/langfuse/go.sum b/libs/acl/langfuse/go.sum index a1f702aa..0edeb7cb 100644 --- a/libs/acl/langfuse/go.sum +++ b/libs/acl/langfuse/go.sum @@ -15,8 +15,8 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/libs/acl/openai/go.mod b/libs/acl/openai/go.mod index 0237abb2..64686e74 100644 --- a/libs/acl/openai/go.mod +++ b/libs/acl/openai/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/bytedance/mockey v1.2.13 - github.com/cloudwego/eino v0.3.4 + github.com/cloudwego/eino v0.3.7 github.com/getkin/kin-openapi v0.118.0 github.com/sashabaranov/go-openai v1.32.5 github.com/stretchr/testify v1.9.0 diff --git a/libs/acl/openai/go.sum b/libs/acl/openai/go.sum index 8dd8d4c4..bda146c4 100644 --- a/libs/acl/openai/go.sum +++ b/libs/acl/openai/go.sum @@ -13,8 +13,8 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4 github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/eino v0.3.4 h1:trWw8lKU1t1b7PMKSW1GXEJ4H2rLiGWFyVoMJJ3pRDg= -github.com/cloudwego/eino v0.3.4/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= +github.com/cloudwego/eino v0.3.7 h1:PE1yFaAPVenRhDl0x6N1U2rKrfZkSr1hKlcacO6P+VA= +github.com/cloudwego/eino v0.3.7/go.mod h1:+kmJimGEcKuSI6OKhet7kBedkm1WUZS3H1QRazxgWUo= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=