Skip to content

Commit d1d0f30

Browse files
authored
chore: 🐝 Update SDK - Generate MISTRALAI MISTRALAI-SDK 1.8.0 #225
2 parents 69374e8 + 3390e69 commit d1d0f30

File tree

234 files changed

+12454
-96
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+12454
-96
lines changed

.github/workflows/lint_custom_code.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install dependencies
2828
run: |
2929
touch README-PYPI.md
30-
poetry install
30+
poetry install --all-extras
3131
3232
# The init, sdkhooks.py and types.py files in the _hooks folders are generated by Speakeasy hence the exclusion
3333
- name: Run all linters

.github/workflows/run_example_scripts.yaml

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ jobs:
2828
- name: Install Poetry
2929
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1.4.1
3030

31-
- name: Build and install client
32-
run: |
33-
touch README-PYPI.md # Create this file since the client is not built from Speakeasy
34-
poetry build
35-
python3 -m pip install dist/mistralai-*.whl
36-
3731
- name: Set VERSION
3832
run: |
3933
VERSION=$(echo ${{ matrix.python-version }} | tr -d .)
@@ -43,20 +37,27 @@ jobs:
4337
run: |
4438
echo "MISTRAL_API_KEY=${{ secrets[format('CI_MISTRAL_API_KEY_PYTHON_{0}', env.VERSION)] }}" >> $GITHUB_ENV
4539
46-
- name: Run the example scripts
40+
- name: Build the package
41+
run: |
42+
touch README-PYPI.md # Create this file since the client is not built by Speakeasy
43+
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: |
48+
PACKAGE="dist/$(ls dist | grep whl | head -n 1)"
49+
python3 -m pip install "$PACKAGE"
50+
./scripts/run_examples.sh --no-extra-dep
51+
env:
52+
MISTRAL_AGENT_ID: ${{ secrets.CI_AGENT_ID }}
53+
MISTRAL_API_KEY: ${{ env.MISTRAL_API_KEY }}
54+
55+
- name: For python 3.10+, install client with extras and run all examples.
56+
if: matrix.python-version != '3.9'
4757
run: |
48-
failed=0
49-
for file in examples/*.py; do
50-
if [ -f "$file" ] && [ "$file" != "examples/chatbot_with_streaming.py" ]; then
51-
echo "Running $file"
52-
# Do not fail if the script fails, but save it in the failed variable
53-
python3 "$file" > /dev/null || failed=1
54-
fi
55-
done
56-
# If one of the example script failed then exit
57-
if [ $failed -ne 0 ]; then
58-
exit 1
59-
fi
58+
PACKAGE="dist/$(ls dist | grep whl | head -n 1)[agents]"
59+
python3 -m pip install "$PACKAGE"
60+
./scripts/run_examples.sh
6061
env:
6162
MISTRAL_AGENT_ID: ${{ secrets.CI_AGENT_ID }}
6263
MISTRAL_API_KEY: ${{ env.MISTRAL_API_KEY }}

0 commit comments

Comments
 (0)