Skip to content

Commit 39cec5f

Browse files
authored
live tests for mistral (#249)
1 parent 5567dab commit 39cec5f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ jobs:
9797
--extra vertexai
9898
--extra groq
9999
--extra anthropic
100+
--extra mistral
100101
pytest tests/test_live.py -v
101102
--durations=100
102103
env:
@@ -106,6 +107,7 @@ jobs:
106107
GOOGLE_SERVICE_ACCOUNT_CONTENT: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_CONTENT }}
107108
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
108109
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
110+
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
109111
110112
test:
111113
name: test on ${{ matrix.python-version }}

tests/test_live.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,20 @@ def ollama(http_client: httpx.AsyncClient, _tmp_path: Path) -> Model:
6060
return OllamaModel('qwen2:0.5b', http_client=http_client)
6161

6262

63+
def mistral(http_client: httpx.AsyncClient, _tmp_path: Path) -> Model:
64+
from pydantic_ai.models.mistral import MistralModel
65+
66+
return MistralModel('mistral-small-latest', http_client=http_client)
67+
68+
6369
params = [
6470
pytest.param(openai, id='openai'),
6571
pytest.param(gemini, id='gemini'),
6672
pytest.param(vertexai, id='vertexai'),
6773
pytest.param(groq, id='groq'),
6874
pytest.param(anthropic, id='anthropic'),
6975
pytest.param(ollama, id='ollama'),
76+
pytest.param(mistral, id='mistral'),
7077
]
7178
GetModel = Callable[[httpx.AsyncClient, Path], Model]
7279

0 commit comments

Comments
 (0)