Skip to content

Commit ce990e7

Browse files
committed
ci: update the run example workflow
1 parent 1cfd45e commit ce990e7

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

.github/workflows/run_example_scripts.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,27 @@ 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:
48-
MISTRAL_AGENT_ID: ${{ vars.CI_AGENT_ID }}
52+
MISTRAL_AGENT_ID: ${{ secrets.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
5861
env:
59-
MISTRAL_AGENT_ID: ${{ vars.CI_AGENT_ID }}
62+
MISTRAL_AGENT_ID: ${{ secrets.CI_AGENT_ID }}
6063
MISTRAL_API_KEY: ${{ env.MISTRAL_API_KEY }}

examples/async_conversation_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
import asyncio
33
import os
44

5-
from mistralai_private import MistralPrivate
5+
from mistralai import Mistral
66

77
MODEL = "mistral-medium-latest"
88

99

1010
async 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,

0 commit comments

Comments
 (0)