Skip to content

Commit

Permalink
Merge pull request #5 from aurelio-labs/tolga/semantic-router-compati…
Browse files Browse the repository at this point in the history
…bility

fix: update the semantic-router version field
  • Loading branch information
jamescalam authored May 15, 2024
2 parents abc803e + 76fb13b commit e68232b
Show file tree
Hide file tree
Showing 6 changed files with 2,869 additions and 2,875 deletions.
5,638 changes: 2,820 additions & 2,818 deletions docs/00-chunkers-intro.ipynb

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions docs/01-video-chunking.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"outputs": [],
"source": [
"!pip install -qU \\\n",
" \"semantic-chunkers[stats]==0.0.3\" \\\n",
" \"semantic-chunkers[stats]\" \\\n",
" \"semantic-router[vision]==0.0.39\" \\\n",
" opencv-python"
]
Expand Down Expand Up @@ -128,8 +128,11 @@
"import torch\n",
"from semantic_router.encoders import VitEncoder\n",
"\n",
"device = \"mps\" if torch.backends.mps.is_available() else \"cuda\" \\\n",
" if torch.cuda.is_available() else \"cpu\"\n",
"device = (\n",
" \"mps\"\n",
" if torch.backends.mps.is_available()\n",
" else \"cuda\" if torch.cuda.is_available() else \"cpu\"\n",
")\n",
"print(f\"Using '{device}'\")\n",
"\n",
"encoder = VitEncoder(device=device)"
Expand Down
87 changes: 39 additions & 48 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "semantic-chunkers"
version = "0.0.3"
version = "0.0.4"
description = "Super advanced chunking methods for AI"
authors = ["Aurelio AI <[email protected]>"]
readme = "README.md"
Expand All @@ -16,7 +16,7 @@ regex = "^2023.12.25"
tiktoken = "^0.6.0"
matplotlib = { version = "^3.8.3", optional = true}
requests-mock = "^1.12.1"
semantic-router = "^0.0.39"
semantic-router = ">=0.0.20,<0.1.0"

[tool.poetry.extras]
stats = ["matplotlib"]
Expand All @@ -31,7 +31,7 @@ pytest-xdist = "^3.5.0"
mypy = "^1.7.1"
types-pyyaml = "^6.0.12.12"
types-requests = "^2.31.0"
black = "^24.0.0"
black = "^23.12.1"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 1 addition & 1 deletion semantic_chunkers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
"StatisticalChunker",
]

__version__ = "0.0.3"
__version__ = "0.0.4"
2 changes: 0 additions & 2 deletions tests/unit/test_splitters.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def test_consecutive_sim_splitter():
cohere_encoder = CohereEncoder(
name="",
cohere_api_key="a",
input_type="",
)
# Instantiate the ConsecutiveSimSplitter with the mock encoder
splitter = ConsecutiveChunker(encoder=cohere_encoder, score_threshold=0.9)
Expand Down Expand Up @@ -55,7 +54,6 @@ def test_cumulative_sim_splitter():
cohere_encoder = CohereEncoder(
name="",
cohere_api_key="a",
input_type="",
)
splitter = CumulativeChunker(encoder=cohere_encoder, score_threshold=0.9)
splitter.encoder = mock_encoder
Expand Down

0 comments on commit e68232b

Please sign in to comment.