Skip to content

Commit 32d1bc6

Browse files
authored
Merge branch 'main' into qdrant-query
2 parents e541661 + 16001d2 commit 32d1bc6

File tree

80 files changed

+3900
-836
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+3900
-836
lines changed

.github/workflows/docs.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Release Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-docs:
10+
permissions:
11+
contents: read
12+
id-token: write
13+
name: Build Docs
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version:
18+
- "3.11"
19+
env:
20+
POETRY_VERSION: "1.8.3"
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Cache Poetry
24+
uses: actions/cache@v2
25+
with:
26+
path: ~/.poetry
27+
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
28+
restore-keys: |
29+
${{ runner.os }}-poetry-
30+
- name: Install poetry
31+
run: |
32+
pipx install poetry==$POETRY_VERSION
33+
- name: Set up Python ${{ matrix.python-version }}
34+
uses: actions/setup-python@v4
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
cache: poetry
38+
- name: Install dependencies
39+
run: |
40+
poetry install --all-extras
41+
- name: Build docs
42+
run: |
43+
poetry run sphinx-build -M html docs/source docs/build
44+
- name: Authenticate to Google Cloud
45+
id: auth
46+
uses: google-github-actions/auth@v2
47+
with:
48+
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }}
49+
- name: Upload Docs
50+
run: |
51+
gcloud storage rsync docs/build/html gs://docs-bucket-production/semantic-router --recursive --delete-unmatched-destination-objects
52+
# - name: Upload Docs
53+
# id: upload-directory
54+
# uses: google-github-actions/upload-cloud-storage@v2
55+
# with:
56+
# path: docs/build/html
57+
# destination: docs-bucket-production/semantic-router
58+
# parent: false

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
pip install nltk
4545
- name: Download nltk data
4646
run: |
47-
python -m nltk.downloader punkt stopwords wordnet
47+
python -m nltk.downloader punkt stopwords wordnet punkt_tab
4848
- name: Pytest All
4949
env:
5050
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ node_modules
2727
package-lock.json
2828
package.json
2929
test.ipynb
30+
test_sync.ipynb
3031
```
3132

3233
# docs

docs/source/_autosummary/semantic_router.encoders.AutoEncoder.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.encoders.AutoEncoder
1+
semantic\_router.encoders.AutoEncoder
22
=====================================
33

44
.. currentmodule:: semantic_router.encoders

docs/source/_autosummary/semantic_router.encoders.base.BaseEncoder.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.encoders.base.BaseEncoder
1+
semantic\_router.encoders.base.BaseEncoder
22
==========================================
33

44
.. currentmodule:: semantic_router.encoders.base

docs/source/_autosummary/semantic_router.encoders.bedrock.BedrockEncoder.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.encoders.bedrock.BedrockEncoder
1+
semantic\_router.encoders.bedrock.BedrockEncoder
22
================================================
33

44
.. currentmodule:: semantic_router.encoders.bedrock

docs/source/_autosummary/semantic_router.encoders.bm25.BM25Encoder.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.encoders.bm25.BM25Encoder
1+
semantic\_router.encoders.bm25.BM25Encoder
22
==========================================
33

44
.. currentmodule:: semantic_router.encoders.bm25

docs/source/_autosummary/semantic_router.encoders.clip.CLIPEncoder.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.encoders.clip.CLIPEncoder
1+
semantic\_router.encoders.clip.CLIPEncoder
22
==========================================
33

44
.. currentmodule:: semantic_router.encoders.clip

docs/source/_autosummary/semantic_router.encoders.cohere.CohereEncoder.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.encoders.cohere.CohereEncoder
1+
semantic\_router.encoders.cohere.CohereEncoder
22
==============================================
33

44
.. currentmodule:: semantic_router.encoders.cohere

docs/source/_autosummary/semantic_router.encoders.fastembed.FastEmbedEncoder.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.encoders.fastembed.FastEmbedEncoder
1+
semantic\_router.encoders.fastembed.FastEmbedEncoder
22
====================================================
33

44
.. currentmodule:: semantic_router.encoders.fastembed

docs/source/_autosummary/semantic_router.encoders.google.GoogleEncoder.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.encoders.google.GoogleEncoder
1+
semantic\_router.encoders.google.GoogleEncoder
22
==============================================
33

44
.. currentmodule:: semantic_router.encoders.google

docs/source/_autosummary/semantic_router.encoders.huggingface.HFEndpointEncoder.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.encoders.huggingface.HFEndpointEncoder
1+
semantic\_router.encoders.huggingface.HFEndpointEncoder
22
=======================================================
33

44
.. currentmodule:: semantic_router.encoders.huggingface

docs/source/_autosummary/semantic_router.encoders.huggingface.HuggingFaceEncoder.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.encoders.huggingface.HuggingFaceEncoder
1+
semantic\_router.encoders.huggingface.HuggingFaceEncoder
22
========================================================
33

44
.. currentmodule:: semantic_router.encoders.huggingface

docs/source/_autosummary/semantic_router.encoders.mistral.MistralEncoder.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.encoders.mistral.MistralEncoder
1+
semantic\_router.encoders.mistral.MistralEncoder
22
================================================
33

44
.. currentmodule:: semantic_router.encoders.mistral

docs/source/_autosummary/semantic_router.encoders.openai.OpenAIEncoder.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.encoders.openai.OpenAIEncoder
1+
semantic\_router.encoders.openai.OpenAIEncoder
22
==============================================
33

44
.. currentmodule:: semantic_router.encoders.openai
@@ -45,6 +45,7 @@ semantic\_router.encoders.openai.OpenAIEncoder
4545
~OpenAIEncoder.dimensions
4646
~OpenAIEncoder.token_limit
4747
~OpenAIEncoder.type
48+
~OpenAIEncoder.max_retries
4849
~OpenAIEncoder.name
4950
~OpenAIEncoder.score_threshold
5051

docs/source/_autosummary/semantic_router.encoders.tfidf.TfidfEncoder.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.encoders.tfidf.TfidfEncoder
1+
semantic\_router.encoders.tfidf.TfidfEncoder
22
============================================
33

44
.. currentmodule:: semantic_router.encoders.tfidf

docs/source/_autosummary/semantic_router.encoders.vit.VitEncoder.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.encoders.vit.VitEncoder
1+
semantic\_router.encoders.vit.VitEncoder
22
========================================
33

44
.. currentmodule:: semantic_router.encoders.vit

docs/source/_autosummary/semantic_router.encoders.zure.AzureOpenAIEncoder.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.encoders.zure.AzureOpenAIEncoder
1+
semantic\_router.encoders.zure.AzureOpenAIEncoder
22
=================================================
33

44
.. currentmodule:: semantic_router.encoders.zure
@@ -49,6 +49,7 @@ semantic\_router.encoders.zure.AzureOpenAIEncoder
4949
~AzureOpenAIEncoder.azure_endpoint
5050
~AzureOpenAIEncoder.api_version
5151
~AzureOpenAIEncoder.model
52+
~AzureOpenAIEncoder.max_retries
5253
~AzureOpenAIEncoder.name
5354
~AzureOpenAIEncoder.score_threshold
5455

docs/source/_autosummary/semantic_router.hybrid_layer.HybridRouteLayer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.hybrid\_layer.HybridRouteLayer
1+
semantic\_router.hybrid\_layer.HybridRouteLayer
22
===============================================
33

44
.. currentmodule:: semantic_router.hybrid_layer

docs/source/_autosummary/semantic_router.index.base.BaseIndex.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.index.base.BaseIndex
1+
semantic\_router.index.base.BaseIndex
22
=====================================
33

44
.. currentmodule:: semantic_router.index.base
@@ -18,6 +18,7 @@ semantic\_router.index.base.BaseIndex
1818

1919
~BaseIndex.__init__
2020
~BaseIndex.add
21+
~BaseIndex.aget_routes
2122
~BaseIndex.aquery
2223
~BaseIndex.construct
2324
~BaseIndex.copy
@@ -26,6 +27,7 @@ semantic\_router.index.base.BaseIndex
2627
~BaseIndex.describe
2728
~BaseIndex.dict
2829
~BaseIndex.from_orm
30+
~BaseIndex.get_routes
2931
~BaseIndex.json
3032
~BaseIndex.parse_file
3133
~BaseIndex.parse_obj

docs/source/_autosummary/semantic_router.index.local.LocalIndex.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.index.local.LocalIndex
1+
semantic\_router.index.local.LocalIndex
22
=======================================
33

44
.. currentmodule:: semantic_router.index.local
@@ -18,6 +18,7 @@ semantic\_router.index.local.LocalIndex
1818

1919
~LocalIndex.__init__
2020
~LocalIndex.add
21+
~LocalIndex.aget_routes
2122
~LocalIndex.aquery
2223
~LocalIndex.construct
2324
~LocalIndex.copy

docs/source/_autosummary/semantic_router.index.pinecone.PineconeIndex.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.index.pinecone.PineconeIndex
1+
semantic\_router.index.pinecone.PineconeIndex
22
=============================================
33

44
.. currentmodule:: semantic_router.index.pinecone
@@ -18,6 +18,7 @@ semantic\_router.index.pinecone.PineconeIndex
1818

1919
~PineconeIndex.__init__
2020
~PineconeIndex.add
21+
~PineconeIndex.aget_routes
2122
~PineconeIndex.aquery
2223
~PineconeIndex.construct
2324
~PineconeIndex.copy

docs/source/_autosummary/semantic_router.index.pinecone.PineconeRecord.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
semantic\_router.index.pinecone.PineconeRecord
1+
semantic\_router.index.pinecone.PineconeRecord
22
==============================================
33

44
.. currentmodule:: semantic_router.index.pinecone
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
semantic\_router.index.postgres.MetricPgVecOperatorMap
2+
======================================================
3+
4+
.. currentmodule:: semantic_router.index.postgres
5+
6+
.. autoclass:: MetricPgVecOperatorMap
7+
:members:
8+
:show-inheritance:
9+
:inherited-members:
10+
11+
12+
.. automethod:: __init__
13+
14+
15+
16+
17+
18+
19+
.. rubric:: Attributes
20+
21+
.. autosummary::
22+
23+
~MetricPgVecOperatorMap.cosine
24+
~MetricPgVecOperatorMap.dotproduct
25+
~MetricPgVecOperatorMap.euclidean
26+
~MetricPgVecOperatorMap.manhattan
27+
28+
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
semantic\_router.index.postgres.PostgresIndex
2+
=============================================
3+
4+
.. currentmodule:: semantic_router.index.postgres
5+
6+
.. autoclass:: PostgresIndex
7+
:members:
8+
:show-inheritance:
9+
:inherited-members:
10+
11+
12+
.. automethod:: __init__
13+
14+
15+
.. rubric:: Methods
16+
17+
.. autosummary::
18+
19+
~PostgresIndex.__init__
20+
~PostgresIndex.add
21+
~PostgresIndex.aget_routes
22+
~PostgresIndex.aquery
23+
~PostgresIndex.construct
24+
~PostgresIndex.copy
25+
~PostgresIndex.delete
26+
~PostgresIndex.delete_all
27+
~PostgresIndex.delete_index
28+
~PostgresIndex.describe
29+
~PostgresIndex.dict
30+
~PostgresIndex.from_orm
31+
~PostgresIndex.get_routes
32+
~PostgresIndex.json
33+
~PostgresIndex.parse_file
34+
~PostgresIndex.parse_obj
35+
~PostgresIndex.parse_raw
36+
~PostgresIndex.query
37+
~PostgresIndex.schema
38+
~PostgresIndex.schema_json
39+
~PostgresIndex.setup_index
40+
~PostgresIndex.update_forward_refs
41+
~PostgresIndex.validate
42+
43+
44+
45+
46+
47+
.. rubric:: Attributes
48+
49+
.. autosummary::
50+
51+
~PostgresIndex.connection_string
52+
~PostgresIndex.index_prefix
53+
~PostgresIndex.index_name
54+
~PostgresIndex.dimensions
55+
~PostgresIndex.metric
56+
~PostgresIndex.namespace
57+
~PostgresIndex.conn
58+
~PostgresIndex.type
59+
~PostgresIndex.index
60+
~PostgresIndex.routes
61+
~PostgresIndex.utterances
62+
~PostgresIndex.init_async_index
63+
~PostgresIndex.sync
64+
65+

0 commit comments

Comments
 (0)