Skip to content

Commit

Permalink
Merge branch 'main' into tolga/function-schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
Vits-99 committed Sep 2, 2024
2 parents 5a64c95 + b17ea3d commit 6b650b1
Show file tree
Hide file tree
Showing 69 changed files with 3,579 additions and 742 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release Docs

on:
push:
branches:
- main

jobs:
build-docs:
permissions:
contents: read
id-token: write
name: Build Docs
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.11"
env:
POETRY_VERSION: "1.8.3"
steps:
- uses: actions/checkout@v4
- name: Cache Poetry
uses: actions/cache@v2
with:
path: ~/.poetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install poetry
run: |
pipx install poetry==$POETRY_VERSION
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: |
poetry install --all-extras
- name: Build docs
run: |
poetry run sphinx-build -M html docs/source docs/build
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }}
- name: Upload Docs
run: |
gcloud storage rsync docs/build/html gs://docs-bucket-production/semantic-router --recursive --delete-unmatched-destination-objects
# - name: Upload Docs
# id: upload-directory
# uses: google-github-actions/upload-cloud-storage@v2
# with:
# path: docs/build/html
# destination: docs-bucket-production/semantic-router
# parent: false
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
pip install nltk
- name: Download nltk data
run: |
python -m nltk.downloader punkt stopwords wordnet
python -m nltk.downloader punkt stopwords wordnet punkt_tab
- name: Pytest All
env:
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.encoders.AutoEncoder
semantic\_router.encoders.AutoEncoder
=====================================

.. currentmodule:: semantic_router.encoders
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.encoders.base.BaseEncoder
semantic\_router.encoders.base.BaseEncoder
==========================================

.. currentmodule:: semantic_router.encoders.base
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.encoders.bedrock.BedrockEncoder
semantic\_router.encoders.bedrock.BedrockEncoder
================================================

.. currentmodule:: semantic_router.encoders.bedrock
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.encoders.bm25.BM25Encoder
semantic\_router.encoders.bm25.BM25Encoder
==========================================

.. currentmodule:: semantic_router.encoders.bm25
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.encoders.clip.CLIPEncoder
semantic\_router.encoders.clip.CLIPEncoder
==========================================

.. currentmodule:: semantic_router.encoders.clip
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.encoders.cohere.CohereEncoder
semantic\_router.encoders.cohere.CohereEncoder
==============================================

.. currentmodule:: semantic_router.encoders.cohere
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.encoders.fastembed.FastEmbedEncoder
semantic\_router.encoders.fastembed.FastEmbedEncoder
====================================================

.. currentmodule:: semantic_router.encoders.fastembed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.encoders.google.GoogleEncoder
semantic\_router.encoders.google.GoogleEncoder
==============================================

.. currentmodule:: semantic_router.encoders.google
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.encoders.huggingface.HFEndpointEncoder
semantic\_router.encoders.huggingface.HFEndpointEncoder
=======================================================

.. currentmodule:: semantic_router.encoders.huggingface
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.encoders.huggingface.HuggingFaceEncoder
semantic\_router.encoders.huggingface.HuggingFaceEncoder
========================================================

.. currentmodule:: semantic_router.encoders.huggingface
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.encoders.mistral.MistralEncoder
semantic\_router.encoders.mistral.MistralEncoder
================================================

.. currentmodule:: semantic_router.encoders.mistral
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.encoders.openai.OpenAIEncoder
semantic\_router.encoders.openai.OpenAIEncoder
==============================================

.. currentmodule:: semantic_router.encoders.openai
Expand Down Expand Up @@ -45,6 +45,7 @@ semantic\_router.encoders.openai.OpenAIEncoder
~OpenAIEncoder.dimensions
~OpenAIEncoder.token_limit
~OpenAIEncoder.type
~OpenAIEncoder.max_retries
~OpenAIEncoder.name
~OpenAIEncoder.score_threshold

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.encoders.tfidf.TfidfEncoder
semantic\_router.encoders.tfidf.TfidfEncoder
============================================

.. currentmodule:: semantic_router.encoders.tfidf
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.encoders.vit.VitEncoder
semantic\_router.encoders.vit.VitEncoder
========================================

.. currentmodule:: semantic_router.encoders.vit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.encoders.zure.AzureOpenAIEncoder
semantic\_router.encoders.zure.AzureOpenAIEncoder
=================================================

.. currentmodule:: semantic_router.encoders.zure
Expand Down Expand Up @@ -49,6 +49,7 @@ semantic\_router.encoders.zure.AzureOpenAIEncoder
~AzureOpenAIEncoder.azure_endpoint
~AzureOpenAIEncoder.api_version
~AzureOpenAIEncoder.model
~AzureOpenAIEncoder.max_retries
~AzureOpenAIEncoder.name
~AzureOpenAIEncoder.score_threshold

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.hybrid\_layer.HybridRouteLayer
semantic\_router.hybrid\_layer.HybridRouteLayer
===============================================

.. currentmodule:: semantic_router.hybrid_layer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.index.base.BaseIndex
semantic\_router.index.base.BaseIndex
=====================================

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

~BaseIndex.__init__
~BaseIndex.add
~BaseIndex.aget_routes
~BaseIndex.aquery
~BaseIndex.construct
~BaseIndex.copy
Expand All @@ -26,6 +27,7 @@ semantic\_router.index.base.BaseIndex
~BaseIndex.describe
~BaseIndex.dict
~BaseIndex.from_orm
~BaseIndex.get_routes
~BaseIndex.json
~BaseIndex.parse_file
~BaseIndex.parse_obj
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.index.local.LocalIndex
semantic\_router.index.local.LocalIndex
=======================================

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

~LocalIndex.__init__
~LocalIndex.add
~LocalIndex.aget_routes
~LocalIndex.aquery
~LocalIndex.construct
~LocalIndex.copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.index.pinecone.PineconeIndex
semantic\_router.index.pinecone.PineconeIndex
=============================================

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

~PineconeIndex.__init__
~PineconeIndex.add
~PineconeIndex.aget_routes
~PineconeIndex.aquery
~PineconeIndex.construct
~PineconeIndex.copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
semantic\_router.index.pinecone.PineconeRecord
semantic\_router.index.pinecone.PineconeRecord
==============================================

.. currentmodule:: semantic_router.index.pinecone
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
semantic\_router.index.postgres.MetricPgVecOperatorMap
======================================================

.. currentmodule:: semantic_router.index.postgres

.. autoclass:: MetricPgVecOperatorMap
:members:
:show-inheritance:
:inherited-members:


.. automethod:: __init__






.. rubric:: Attributes

.. autosummary::

~MetricPgVecOperatorMap.cosine
~MetricPgVecOperatorMap.dotproduct
~MetricPgVecOperatorMap.euclidean
~MetricPgVecOperatorMap.manhattan


Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
semantic\_router.index.postgres.PostgresIndex
=============================================

.. currentmodule:: semantic_router.index.postgres

.. autoclass:: PostgresIndex
:members:
:show-inheritance:
:inherited-members:


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~PostgresIndex.__init__
~PostgresIndex.add
~PostgresIndex.aget_routes
~PostgresIndex.aquery
~PostgresIndex.construct
~PostgresIndex.copy
~PostgresIndex.delete
~PostgresIndex.delete_all
~PostgresIndex.delete_index
~PostgresIndex.describe
~PostgresIndex.dict
~PostgresIndex.from_orm
~PostgresIndex.get_routes
~PostgresIndex.json
~PostgresIndex.parse_file
~PostgresIndex.parse_obj
~PostgresIndex.parse_raw
~PostgresIndex.query
~PostgresIndex.schema
~PostgresIndex.schema_json
~PostgresIndex.setup_index
~PostgresIndex.update_forward_refs
~PostgresIndex.validate





.. rubric:: Attributes

.. autosummary::

~PostgresIndex.connection_string
~PostgresIndex.index_prefix
~PostgresIndex.index_name
~PostgresIndex.dimensions
~PostgresIndex.metric
~PostgresIndex.namespace
~PostgresIndex.conn
~PostgresIndex.type
~PostgresIndex.index
~PostgresIndex.routes
~PostgresIndex.utterances
~PostgresIndex.init_async_index
~PostgresIndex.sync


Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
semantic\_router.index.postgres.PostgresIndexRecord
===================================================

.. currentmodule:: semantic_router.index.postgres

.. autoclass:: PostgresIndexRecord
:members:
:show-inheritance:
:inherited-members:


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~PostgresIndexRecord.__init__
~PostgresIndexRecord.construct
~PostgresIndexRecord.copy
~PostgresIndexRecord.dict
~PostgresIndexRecord.from_orm
~PostgresIndexRecord.json
~PostgresIndexRecord.model_construct
~PostgresIndexRecord.model_copy
~PostgresIndexRecord.model_dump
~PostgresIndexRecord.model_dump_json
~PostgresIndexRecord.model_json_schema
~PostgresIndexRecord.model_parametrized_name
~PostgresIndexRecord.model_post_init
~PostgresIndexRecord.model_rebuild
~PostgresIndexRecord.model_validate
~PostgresIndexRecord.model_validate_json
~PostgresIndexRecord.model_validate_strings
~PostgresIndexRecord.parse_file
~PostgresIndexRecord.parse_obj
~PostgresIndexRecord.parse_raw
~PostgresIndexRecord.schema
~PostgresIndexRecord.schema_json
~PostgresIndexRecord.to_dict
~PostgresIndexRecord.update_forward_refs
~PostgresIndexRecord.validate





.. rubric:: Attributes

.. autosummary::

~PostgresIndexRecord.model_computed_fields
~PostgresIndexRecord.model_config
~PostgresIndexRecord.model_extra
~PostgresIndexRecord.model_fields
~PostgresIndexRecord.model_fields_set
~PostgresIndexRecord.id
~PostgresIndexRecord.route
~PostgresIndexRecord.utterance
~PostgresIndexRecord.vector


Loading

0 comments on commit 6b650b1

Please sign in to comment.