File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -37,21 +37,24 @@ jobs:
3737 run : |
3838 echo "MISTRAL_API_KEY=${{ secrets[format('CI_MISTRAL_API_KEY_PYTHON_{0}', env.VERSION)] }}" >> $GITHUB_ENV
3939
40- - name : For python 3.9, build and install client. Run examples without extra dependencies.
41- if : matrix.python-version == '3.9'
40+ - name : Build the package
4241 run : |
42+ touch README-PYPI.md # Create this file since the client is not built by Speakeasy
4343 poetry build
44+
45+ - name : For python 3.9, install the client and run examples without extra dependencies.
46+ if : matrix.python-version == '3.9'
47+ run : |
4448 PACKAGE="dist/$(ls dist | grep whl | head -n 1)"
4549 python3 -m pip install "$PACKAGE"
4650 ./examples/run_all.sh --no-extra-dep
4751 env :
4852 MISTRAL_AGENT_ID : ${{ vars.CI_AGENT_ID }}
4953 MISTRAL_API_KEY : ${{ env.MISTRAL_API_KEY }}
5054
51- - name : For python 3.10+, build and install client with extras. Run all examples.
55+ - name : For python 3.10+, install client with extras and run all examples.
5256 if : matrix.python-version != '3.9'
5357 run : |
54- poetry build
5558 PACKAGE="dist/$(ls dist | grep whl | head -n 1)[agents]"
5659 python3 -m pip install "$PACKAGE"
5760 ./examples/run_all.sh
Original file line number Diff line number Diff line change 22import asyncio
33import os
44
5- from mistralai_private import MistralPrivate
5+ from mistralai import Mistral
66
77MODEL = "mistral-medium-latest"
88
99
1010async def main ():
1111 api_key = os .environ ["MISTRAL_API_KEY" ]
12- client = MistralPrivate (api_key = api_key )
12+ client = Mistral (api_key = api_key )
1313
1414 agent = client .beta .agents .create (
1515 model = MODEL ,
You can’t perform that action at this time.
0 commit comments