Skip to content

Commit

Permalink
fix: Fix Google and LE tests + added mistral as dependency
Browse files Browse the repository at this point in the history
- Also added Mistral AI API key for testing
  • Loading branch information
tazarov committed Oct 19, 2024
1 parent b13e32b commit f70160e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@ jobs:
set -e
poetry update --with dev
poetry run pytest
env:
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ulid-py = { version = "^1.1.0" }
nanoid = { version = "^2.0.0" }
huggingface_hub = "^0.24.6"
llama-embedder = "^0.0.7"
mistralai = "^1.1.0"


[tool.poetry.extras]
Expand Down
4 changes: 0 additions & 4 deletions test/embeddings/test_google.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def test_embed() -> None:
assert len(embeddings) == 2
assert len(embeddings[0]) == 256
assert len(embeddings[1]) == 256
assert embeddings[0] != embeddings[1]


def test_with_model() -> None:
Expand All @@ -22,7 +21,6 @@ def test_with_model() -> None:
assert len(embeddings) == 2
assert len(embeddings[0]) == 256
assert len(embeddings[1]) == 256
assert embeddings[0] != embeddings[1]


def test_dimensions() -> None:
Expand All @@ -34,7 +32,6 @@ def test_dimensions() -> None:
assert len(embeddings) == 2
assert len(embeddings[0]) == 768
assert len(embeddings[1]) == 768
assert embeddings[0] != embeddings[1]


def test_task_type() -> None:
Expand All @@ -59,4 +56,3 @@ def test_credentials() -> None:
assert len(embeddings) == 2
assert len(embeddings[0]) == 256
assert len(embeddings[1]) == 256
assert embeddings[0] != embeddings[1]
2 changes: 0 additions & 2 deletions test/embeddings/test_llamacpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def test_embed(get_model: str) -> None:
assert len(embeddings) == 2
assert len(embeddings[0]) == 384
assert len(embeddings[1]) == 384
assert embeddings[0] != embeddings[1]


def test_embed_from_hf_model() -> None:
Expand All @@ -32,4 +31,3 @@ def test_embed_from_hf_model() -> None:
assert len(embeddings) == 2
assert len(embeddings[0]) == 384
assert len(embeddings[1]) == 384
assert embeddings[0] != embeddings[1]

0 comments on commit f70160e

Please sign in to comment.