Skip to content

Commit

Permalink
live tests for mistral
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Dec 14, 2024
1 parent 5567dab commit 6231c1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ jobs:
--extra vertexai
--extra groq
--extra anthropic
--extra mistral
pytest tests/test_live.py -v
--durations=100
env:
Expand All @@ -106,6 +107,7 @@ jobs:
GOOGLE_SERVICE_ACCOUNT_CONTENT: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_CONTENT }}
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
test:
name: test on ${{ matrix.python-version }}
Expand Down
7 changes: 7 additions & 0 deletions tests/test_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,20 @@ def ollama(http_client: httpx.AsyncClient, _tmp_path: Path) -> Model:
return OllamaModel('qwen2:0.5b', http_client=http_client)


def mistral(http_client: httpx.AsyncClient, _tmp_path: Path) -> Model:
from pydantic_ai.models.mistral import MistralModel

return MistralModel('mistral-small-latest', http_client=http_client)


params = [
pytest.param(openai, id='openai'),
pytest.param(gemini, id='gemini'),
pytest.param(vertexai, id='vertexai'),
pytest.param(groq, id='groq'),
pytest.param(anthropic, id='anthropic'),
pytest.param(ollama, id='ollama'),
pytest.param(mistral, id='mistral'),
]
GetModel = Callable[[httpx.AsyncClient, Path], Model]

Expand Down

0 comments on commit 6231c1c

Please sign in to comment.