Skip to content

Commit 9370820

Browse files
authored
Generate version v1.10.0 #297
2 parents d4144a0 + 13d22ba commit 9370820

File tree

136 files changed

+2471
-649
lines changed

Some content is hidden

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

136 files changed

+2471
-649
lines changed

.speakeasy/gen.lock

Lines changed: 155 additions & 25 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ generation:
2121
generateNewTests: false
2222
skipResponseBodyAssertions: false
2323
python:
24-
version: 1.9.11
24+
version: 1.10.0
2525
additionalDependencies:
2626
dev:
2727
pytest: ^8.2.2

.speakeasy/workflow.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ sources:
1414
- latest
1515
mistral-openapi:
1616
sourceNamespace: mistral-openapi
17-
sourceRevisionDigest: sha256:eefc1f0b6a5e9ec673d317d61cad766290710b5fc369412491b75f732cccfedd
18-
sourceBlobDigest: sha256:97767522559603de92a9738938e522cea4d558b2a854500acf6fe8d81f8ccfb8
17+
sourceRevisionDigest: sha256:cb63bd997cefe7b3b36e91a475df57cb779bf79f183340e0713d8ffb16a2dabc
18+
sourceBlobDigest: sha256:f0caa06fb9bcadc35b097aa5ff69bb5020937652df311722b5e44a282bd95d6d
1919
tags:
2020
- latest
21-
- speakeasy-sdk-regen-1759420102
21+
- speakeasy-sdk-regen-1765914268
2222
targets:
2323
mistralai-azure-sdk:
2424
source: mistral-azure-source
@@ -37,10 +37,10 @@ targets:
3737
mistralai-sdk:
3838
source: mistral-openapi
3939
sourceNamespace: mistral-openapi
40-
sourceRevisionDigest: sha256:eefc1f0b6a5e9ec673d317d61cad766290710b5fc369412491b75f732cccfedd
41-
sourceBlobDigest: sha256:97767522559603de92a9738938e522cea4d558b2a854500acf6fe8d81f8ccfb8
40+
sourceRevisionDigest: sha256:cb63bd997cefe7b3b36e91a475df57cb779bf79f183340e0713d8ffb16a2dabc
41+
sourceBlobDigest: sha256:f0caa06fb9bcadc35b097aa5ff69bb5020937652df311722b5e44a282bd95d6d
4242
codeSamplesNamespace: mistral-openapi-code-samples
43-
codeSamplesRevisionDigest: sha256:8ed158c9c1ed8252f86b620219dd93e9650b45e7c6403cda7fdd9b4ee0d17dac
43+
codeSamplesRevisionDigest: sha256:b1eacff97275a14ab0c2143e07bdfa4f4bd58f5370b2f106bcc6ada92b754d08
4444
workflow:
4545
workflowVersion: 1.0.0
4646
speakeasyVersion: 1.606.10

README.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,14 @@ with Mistral(
145145
api_key=os.getenv("MISTRAL_API_KEY", ""),
146146
) as mistral:
147147

148-
res = mistral.chat.complete(model="mistral-small-latest", messages=[
148+
res = mistral.chat.complete(model="mistral-large-latest", messages=[
149149
{
150150
"content": "Who is the best French painter? Answer in one short sentence.",
151151
"role": "user",
152152
},
153-
], stream=False)
153+
], stream=False, response_format={
154+
"type": "text",
155+
})
154156

155157
# Handle response
156158
print(res)
@@ -171,12 +173,14 @@ async def main():
171173
api_key=os.getenv("MISTRAL_API_KEY", ""),
172174
) as mistral:
173175

174-
res = await mistral.chat.complete_async(model="mistral-small-latest", messages=[
176+
res = await mistral.chat.complete_async(model="mistral-large-latest", messages=[
175177
{
176178
"content": "Who is the best French painter? Answer in one short sentence.",
177179
"role": "user",
178180
},
179-
], stream=False)
181+
], stream=False, response_format={
182+
"type": "text",
183+
})
180184

181185
# Handle response
182186
print(res)
@@ -252,7 +256,9 @@ with Mistral(
252256
"content": "Who is the best French painter? Answer in one short sentence.",
253257
"role": "user",
254258
},
255-
], agent_id="<id>", stream=False)
259+
], agent_id="<id>", stream=False, response_format={
260+
"type": "text",
261+
})
256262

257263
# Handle response
258264
print(res)
@@ -278,7 +284,9 @@ async def main():
278284
"content": "Who is the best French painter? Answer in one short sentence.",
279285
"role": "user",
280286
},
281-
], agent_id="<id>", stream=False)
287+
], agent_id="<id>", stream=False, response_format={
288+
"type": "text",
289+
})
282290

283291
# Handle response
284292
print(res)
@@ -448,7 +456,7 @@ The documentation for the GCP SDK is available [here](packages/mistralai_gcp/REA
448456
#### [audio.transcriptions](docs/sdks/transcriptions/README.md)
449457

450458
* [complete](docs/sdks/transcriptions/README.md#complete) - Create Transcription
451-
* [stream](docs/sdks/transcriptions/README.md#stream) - Create streaming transcription (SSE)
459+
* [stream](docs/sdks/transcriptions/README.md#stream) - Create Streaming Transcription (SSE)
452460

453461
### [batch](docs/sdks/batch/README.md)
454462

@@ -469,13 +477,15 @@ The documentation for the GCP SDK is available [here](packages/mistralai_gcp/REA
469477
* [list](docs/sdks/mistralagents/README.md#list) - List agent entities.
470478
* [get](docs/sdks/mistralagents/README.md#get) - Retrieve an agent entity.
471479
* [update](docs/sdks/mistralagents/README.md#update) - Update an agent entity.
480+
* [delete](docs/sdks/mistralagents/README.md#delete) - Delete an agent entity.
472481
* [update_version](docs/sdks/mistralagents/README.md#update_version) - Update an agent version.
473482

474483
#### [beta.conversations](docs/sdks/conversations/README.md)
475484

476485
* [start](docs/sdks/conversations/README.md#start) - Create a conversation and append entries to it.
477486
* [list](docs/sdks/conversations/README.md#list) - List all created conversations.
478487
* [get](docs/sdks/conversations/README.md#get) - Retrieve a conversation information.
488+
* [delete](docs/sdks/conversations/README.md#delete) - Delete a conversation.
479489
* [append](docs/sdks/conversations/README.md#append) - Append new entries to an existing conversation.
480490
* [get_history](docs/sdks/conversations/README.md#get_history) - Retrieve all entries in a conversation.
481491
* [get_messages](docs/sdks/conversations/README.md#get_messages) - Retrieve all messages in a conversation.
@@ -500,7 +510,7 @@ The documentation for the GCP SDK is available [here](packages/mistralai_gcp/REA
500510

501511
#### [beta.libraries.documents](docs/sdks/documents/README.md)
502512

503-
* [list](docs/sdks/documents/README.md#list) - List document in a given library.
513+
* [list](docs/sdks/documents/README.md#list) - List documents in a given library.
504514
* [upload](docs/sdks/documents/README.md#upload) - Upload a new document.
505515
* [get](docs/sdks/documents/README.md#get) - Retrieve the metadata of a specific document.
506516
* [update](docs/sdks/documents/README.md#update) - Update the metadata of a specific document.
@@ -597,7 +607,11 @@ with Mistral(
597607
"tool_call_id": "<id>",
598608
"result": "<value>",
599609
},
600-
], stream=True)
610+
], stream=True, completion_args={
611+
"response_format": {
612+
"type": "text",
613+
},
614+
})
601615

602616
with res as event_stream:
603617
for event in event_stream:
@@ -712,7 +726,7 @@ with Mistral(
712726
res = None
713727
try:
714728

715-
res = mistral.models.list()
729+
res = mistral.models.retrieve(model_id="ft:open-mistral-7b:587a6b29:20240514:7e773925")
716730

717731
# Handle response
718732
print(res)
@@ -746,7 +760,7 @@ with Mistral(
746760

747761

748762
**Inherit from [`MistralError`](./src/mistralai/models/mistralerror.py)**:
749-
* [`HTTPValidationError`](./src/mistralai/models/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 47 of 68 methods.*
763+
* [`HTTPValidationError`](./src/mistralai/models/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 48 of 70 methods.*
750764
* [`ResponseValidationError`](./src/mistralai/models/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
751765

752766
</details>

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,4 +328,14 @@ Based on:
328328
### Generated
329329
- [python v1.9.11] .
330330
### Releases
331-
- [PyPI v1.9.11] https://pypi.org/project/mistralai/1.9.11 - .
331+
- [PyPI v1.9.11] https://pypi.org/project/mistralai/1.9.11 - .
332+
333+
## 2025-12-16 19:44:09
334+
### Changes
335+
Based on:
336+
- OpenAPI Doc
337+
- Speakeasy CLI 1.606.10 (2.687.13) https://github.com/speakeasy-api/speakeasy
338+
### Generated
339+
- [python v1.10.0] .
340+
### Releases
341+
- [PyPI v1.10.0] https://pypi.org/project/mistralai/1.10.0 - .

USAGE.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ with Mistral(
1313
api_key=os.getenv("MISTRAL_API_KEY", ""),
1414
) as mistral:
1515

16-
res = mistral.chat.complete(model="mistral-small-latest", messages=[
16+
res = mistral.chat.complete(model="mistral-large-latest", messages=[
1717
{
1818
"content": "Who is the best French painter? Answer in one short sentence.",
1919
"role": "user",
2020
},
21-
], stream=False)
21+
], stream=False, response_format={
22+
"type": "text",
23+
})
2224

2325
# Handle response
2426
print(res)
@@ -39,12 +41,14 @@ async def main():
3941
api_key=os.getenv("MISTRAL_API_KEY", ""),
4042
) as mistral:
4143

42-
res = await mistral.chat.complete_async(model="mistral-small-latest", messages=[
44+
res = await mistral.chat.complete_async(model="mistral-large-latest", messages=[
4345
{
4446
"content": "Who is the best French painter? Answer in one short sentence.",
4547
"role": "user",
4648
},
47-
], stream=False)
49+
], stream=False, response_format={
50+
"type": "text",
51+
})
4852

4953
# Handle response
5054
print(res)
@@ -120,7 +124,9 @@ with Mistral(
120124
"content": "Who is the best French painter? Answer in one short sentence.",
121125
"role": "user",
122126
},
123-
], agent_id="<id>", stream=False)
127+
], agent_id="<id>", stream=False, response_format={
128+
"type": "text",
129+
})
124130

125131
# Handle response
126132
print(res)
@@ -146,7 +152,9 @@ async def main():
146152
"content": "Who is the best French painter? Answer in one short sentence.",
147153
"role": "user",
148154
},
149-
], agent_id="<id>", stream=False)
155+
], agent_id="<id>", stream=False, response_format={
156+
"type": "text",
157+
})
150158

151159
# Handle response
152160
print(res)

docs/models/agent.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@
1212
| `name` | *str* | :heavy_check_mark: | N/A |
1313
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
1414
| `handoffs` | List[*str*] | :heavy_minus_sign: | N/A |
15+
| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A |
1516
| `object` | [Optional[models.AgentObject]](../models/agentobject.md) | :heavy_minus_sign: | N/A |
1617
| `id` | *str* | :heavy_check_mark: | N/A |
1718
| `version` | *int* | :heavy_check_mark: | N/A |
19+
| `versions` | List[*int*] | :heavy_check_mark: | N/A |
1820
| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A |
19-
| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A |
21+
| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A |
22+
| `deployment_chat` | *bool* | :heavy_check_mark: | N/A |
23+
| `source` | *str* | :heavy_check_mark: | N/A |

docs/models/agentconversation.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
88
| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name given to the conversation. |
99
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the what the conversation is about. |
10+
| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. |
1011
| `object` | [Optional[models.AgentConversationObject]](../models/agentconversationobject.md) | :heavy_minus_sign: | N/A |
1112
| `id` | *str* | :heavy_check_mark: | N/A |
1213
| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A |
1314
| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A |
14-
| `agent_id` | *str* | :heavy_check_mark: | N/A |
15+
| `agent_id` | *str* | :heavy_check_mark: | N/A |
16+
| `agent_version` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |

docs/models/agentcreationrequest.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111
| `model` | *str* | :heavy_check_mark: | N/A |
1212
| `name` | *str* | :heavy_check_mark: | N/A |
1313
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
14-
| `handoffs` | List[*str*] | :heavy_minus_sign: | N/A |
14+
| `handoffs` | List[*str*] | :heavy_minus_sign: | N/A |
15+
| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# AgentsAPIV1AgentsDeleteRequest
2+
3+
4+
## Fields
5+
6+
| Field | Type | Required | Description |
7+
| ------------------ | ------------------ | ------------------ | ------------------ |
8+
| `agent_id` | *str* | :heavy_check_mark: | N/A |

0 commit comments

Comments
 (0)