Skip to content

Commit 440e9c3

Browse files
committed
async client now uses httpx, both clients are now very similar
1 parent 1536fad commit 440e9c3

5 files changed

Lines changed: 161 additions & 232 deletions

File tree

examples/async_list_models.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import os
2+
import asyncio
3+
4+
from mistralai.async_client import MistralAsyncClient
5+
6+
7+
async def main():
8+
api_key = os.environ["MISTRAL_API_KEY"]
9+
10+
client = MistralAsyncClient(api_key=api_key)
11+
12+
list_models_response = await client.list_models()
13+
print(list_models_response)
14+
15+
16+
if __name__ == "__main__":
17+
asyncio.run(main())

poetry.lock

Lines changed: 1 addition & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ exclude = ["docs", "tests", "examples", "tools", "build"]
2424

2525
[tool.poetry.dependencies]
2626
python = "^3.8"
27-
backoff = "^2.2.1"
2827
orjson = "^3.9.10"
2928
pydantic = "^2.5.2"
3029
httpx = "^0.25.2"
31-
tenacity = "^8.2.3"
3230

3331

3432
[tool.poetry.group.dev.dependencies]

0 commit comments

Comments
 (0)