Skip to content

Commit 85780a1

Browse files
committed
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.561.0
1 parent 53c4cf9 commit 85780a1

File tree

623 files changed

+49784
-261
lines changed

Some content is hidden

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

623 files changed

+49784
-261
lines changed

.speakeasy/gen.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: 3e3290ca-0ee8-4981-b1bc-14536048fa63
33
management:
4-
docChecksum: 59c6e14049dbd73093349e44990e95cc
4+
docChecksum: adc860b8099788fe237e893e2a1ce2a4
55
docVersion: 0.9.0
6-
speakeasyVersion: 1.558.0
7-
generationVersion: 2.623.2
8-
releaseVersion: 0.6.5
9-
configChecksum: bb2b0d325af46323cdd0a355d5cb36cd
6+
speakeasyVersion: 1.561.0
7+
generationVersion: 2.628.0
8+
releaseVersion: 0.6.6
9+
configChecksum: 54e19d98f8aa0a9fc3ab2088a73617f6
1010
repoURL: https://github.com/gleanwork/api-client-python.git
1111
installationURL: https://github.com/gleanwork/api-client-python.git
1212
published: true
@@ -15,7 +15,7 @@ features:
1515
additionalDependencies: 1.0.0
1616
additionalProperties: 1.0.1
1717
constsAndDefaults: 1.0.5
18-
core: 5.19.2
18+
core: 5.19.3
1919
defaultEnabledRetries: 0.2.0
2020
deprecations: 3.0.2
2121
devContainers: 3.0.0

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ generation:
2525
generateNewTests: true
2626
skipResponseBodyAssertions: true
2727
python:
28-
version: 0.6.5
28+
version: 0.6.6
2929
additionalDependencies:
3030
dev: {}
3131
main: {}

.speakeasy/glean-merged-spec.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ paths:
841841
tags:
842842
- Agents
843843
summary: Search agents
844-
description: "Search for [agents](https://developers.glean.com/agents/agents-api) by agent name. "
844+
description: Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
845845
operationId: searchAgents
846846
x-visibility: Preview
847847
requestBody:
@@ -7554,6 +7554,11 @@ components:
75547554
$ref: "#/components/schemas/Message"
75557555
title: Messages
75567556
description: The messages to pass an input to the agent.
7557+
metadata:
7558+
type: object
7559+
title: Metadata
7560+
description: The metadata to pass to the agent.
7561+
additionalProperties: true
75577562
AgentExecutionStatus:
75587563
description: The status of the run. One of 'error', 'success'.
75597564
type: string

.speakeasy/workflow.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
speakeasyVersion: 1.558.0
1+
speakeasyVersion: 1.561.0
22
sources:
33
Glean API:
44
sourceNamespace: glean-api-specs
5-
sourceRevisionDigest: sha256:8a528d68d247ecb98ea1d9d49c135154477cbfbab078b6159359a09f64628fba
6-
sourceBlobDigest: sha256:09d1624a9a347738790040f1fcdc5f2eff15461dd39941a1535efb55e2c8939f
5+
sourceRevisionDigest: sha256:def878110682ba33071e9369f2fc13e9ace94ee3de38b09cbcc5ad93fa083bfb
6+
sourceBlobDigest: sha256:eceb178c5d2537e6d21c0461c81f6af1dc245da2c327fdf5305a8191184eff94
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1749491200
9+
- speakeasy-sdk-regen-1749670145
1010
Glean Client API:
1111
sourceNamespace: glean-client-api
1212
sourceRevisionDigest: sha256:4edc63ad559e4f2c9fb9ebf5edaaaaa9269f1874d271cfd84b441d6dacac43d2
@@ -17,10 +17,10 @@ targets:
1717
glean:
1818
source: Glean API
1919
sourceNamespace: glean-api-specs
20-
sourceRevisionDigest: sha256:8a528d68d247ecb98ea1d9d49c135154477cbfbab078b6159359a09f64628fba
21-
sourceBlobDigest: sha256:09d1624a9a347738790040f1fcdc5f2eff15461dd39941a1535efb55e2c8939f
20+
sourceRevisionDigest: sha256:def878110682ba33071e9369f2fc13e9ace94ee3de38b09cbcc5ad93fa083bfb
21+
sourceBlobDigest: sha256:eceb178c5d2537e6d21c0461c81f6af1dc245da2c327fdf5305a8191184eff94
2222
codeSamplesNamespace: glean-api-specs-python-code-samples
23-
codeSamplesRevisionDigest: sha256:d2defba5ce9f2980f4c7a8ed3cd58df2629ca3a2e7c380959c3028c6f231d6ab
23+
codeSamplesRevisionDigest: sha256:5adc983a9e2fa66afe237a09323add429a113dbe981428940bb8c6390a078db7
2424
workflow:
2525
workflowVersion: 1.0.0
2626
speakeasyVersion: latest

README.md

Lines changed: 52 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Remember that each namespace requires its own authentication token type as descr
4949
* [SDK Example Usage](#sdk-example-usage)
5050
* [Authentication](#authentication)
5151
* [Available Resources and Operations](#available-resources-and-operations)
52+
* [File uploads](#file-uploads)
5253
* [Retries](#retries)
5354
* [Error Handling](#error-handling)
5455
* [Server Selection](#server-selection)
@@ -135,7 +136,7 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
135136

136137
```python
137138
# Synchronous Example
138-
from glean.api_client import Glean, models
139+
from glean import Glean, models
139140
import os
140141

141142

@@ -163,7 +164,7 @@ The same SDK client can also be used to make asychronous requests by importing a
163164
```python
164165
# Asynchronous Example
165166
import asyncio
166-
from glean.api_client import Glean, models
167+
from glean import Glean, models
167168
import os
168169

169170
async def main():
@@ -192,7 +193,7 @@ asyncio.run(main())
192193

193194
```python
194195
# Synchronous Example
195-
from glean.api_client import Glean, models
196+
from glean import Glean, models
196197
import os
197198

198199

@@ -220,7 +221,7 @@ The same SDK client can also be used to make asychronous requests by importing a
220221
```python
221222
# Asynchronous Example
222223
import asyncio
223-
from glean.api_client import Glean, models
224+
from glean import Glean, models
224225
import os
225226

226227
async def main():
@@ -259,8 +260,8 @@ This SDK supports the following security scheme globally:
259260

260261
To authenticate with the API the `api_token` parameter must be set when initializing the SDK client instance. For example:
261262
```python
262-
from glean.api_client import Glean, models
263-
from glean.api_client.utils import parse_datetime
263+
from glean import Glean, models
264+
from glean.utils import parse_datetime
264265
import os
265266

266267

@@ -534,15 +535,47 @@ For more information on obtaining the appropriate token type, please contact you
534535
</details>
535536
<!-- End Available Resources and Operations [operations] -->
536537

538+
<!-- Start File uploads [file-upload] -->
539+
## File uploads
540+
541+
Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
542+
543+
> [!TIP]
544+
>
545+
> For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files.
546+
>
547+
548+
```python
549+
from glean import Glean
550+
import os
551+
552+
553+
with Glean(
554+
api_token=os.getenv("GLEAN_API_TOKEN", ""),
555+
) as g_client:
556+
557+
res = g_client.client.chat.upload_files(files=[
558+
{
559+
"file_name": "example.file",
560+
"content": open("example.file", "rb"),
561+
},
562+
])
563+
564+
# Handle response
565+
print(res)
566+
567+
```
568+
<!-- End File uploads [file-upload] -->
569+
537570
<!-- Start Retries [retries] -->
538571
## Retries
539572

540573
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
541574

542575
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
543576
```python
544-
from glean.api_client import Glean, models
545-
from glean.api_client.utils import BackoffStrategy, RetryConfig, parse_datetime
577+
from glean import Glean, models
578+
from glean.utils import BackoffStrategy, RetryConfig, parse_datetime
546579
import os
547580

548581

@@ -582,8 +615,8 @@ with Glean(
582615

583616
If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
584617
```python
585-
from glean.api_client import Glean, models
586-
from glean.api_client.utils import BackoffStrategy, RetryConfig, parse_datetime
618+
from glean import Glean, models
619+
from glean.utils import BackoffStrategy, RetryConfig, parse_datetime
587620
import os
588621

589622

@@ -720,8 +753,8 @@ The default server `https://{instance}-be.glean.com` contains variables and is s
720753
#### Example
721754

722755
```python
723-
from glean.api_client import Glean, models
724-
from glean.api_client.utils import parse_datetime
756+
from glean import Glean, models
757+
from glean.utils import parse_datetime
725758
import os
726759

727760

@@ -763,8 +796,8 @@ with Glean(
763796

764797
The default server can be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
765798
```python
766-
from glean.api_client import Glean, models
767-
from glean.api_client.utils import parse_datetime
799+
from glean import Glean, models
800+
from glean.utils import parse_datetime
768801
import os
769802

770803

@@ -812,7 +845,7 @@ This allows you to wrap the client with your own custom logic, such as adding cu
812845

813846
For example, you could specify a header for every request that this sdk makes as follows:
814847
```python
815-
from glean.api_client import Glean
848+
from glean import Glean
816849
import httpx
817850

818851
http_client = httpx.Client(headers={"x-custom-header": "someValue"})
@@ -821,8 +854,8 @@ s = Glean(client=http_client)
821854

822855
or you could wrap the client with your own custom logic:
823856
```python
824-
from glean.api_client import Glean
825-
from glean.api_client.httpclient import AsyncHttpClient
857+
from glean import Glean
858+
from glean.httpclient import AsyncHttpClient
826859
import httpx
827860

828861
class CustomClient(AsyncHttpClient):
@@ -892,7 +925,7 @@ The `Glean` class implements the context manager protocol and registers a finali
892925
[context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
893926

894927
```python
895-
from glean.api_client import Glean
928+
from glean import Glean
896929
import os
897930
def main():
898931

@@ -919,7 +952,7 @@ You can setup your SDK to emit debug logs for SDK requests and responses.
919952

920953
You can pass your own logger class directly into your SDK.
921954
```python
922-
from glean.api_client import Glean
955+
from glean import Glean
923956
import logging
924957

925958
logging.basicConfig(level=logging.DEBUG)

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,14 @@ Based on:
158158
### Generated
159159
- [python v0.6.5] .
160160
### Releases
161-
- [PyPI v0.6.5] https://pypi.org/project/glean/0.6.5 - .
161+
- [PyPI v0.6.5] https://pypi.org/project/glean/0.6.5 - .
162+
163+
## 2025-06-11 19:28:43
164+
### Changes
165+
Based on:
166+
- OpenAPI Doc
167+
- Speakeasy CLI 1.561.0 (2.628.0) https://github.com/speakeasy-api/speakeasy
168+
### Generated
169+
- [python v0.6.6] .
170+
### Releases
171+
- [PyPI v0.6.6] https://pypi.org/project/glean/0.6.6 - .

USAGE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- Start SDK Example Usage [usage] -->
22
```python
33
# Synchronous Example
4-
from glean.api_client import Glean, models
4+
from glean import Glean, models
55
import os
66

77

@@ -29,7 +29,7 @@ The same SDK client can also be used to make asychronous requests by importing a
2929
```python
3030
# Asynchronous Example
3131
import asyncio
32-
from glean.api_client import Glean, models
32+
from glean import Glean, models
3333
import os
3434

3535
async def main():
@@ -56,7 +56,7 @@ asyncio.run(main())
5656

5757
```python
5858
# Synchronous Example
59-
from glean.api_client import Glean, models
59+
from glean import Glean, models
6060
import os
6161

6262

@@ -84,7 +84,7 @@ The same SDK client can also be used to make asychronous requests by importing a
8484
```python
8585
# Asynchronous Example
8686
import asyncio
87-
from glean.api_client import Glean, models
87+
from glean import Glean, models
8888
import os
8989

9090
async def main():

docs/models/agentrun.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ Payload for creating a run.
1010
| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to run. |
1111
| `input` | Dict[str, *Any*] | :heavy_minus_sign: | The input to the agent. |
1212
| `messages` | List[[models.Message](../models/message.md)] | :heavy_minus_sign: | The messages to pass an input to the agent. |
13+
| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | The metadata to pass to the agent. |
1314
| `status` | [Optional[models.AgentExecutionStatus]](../models/agentexecutionstatus.md) | :heavy_minus_sign: | The status of the run. One of 'error', 'success'. |

docs/models/agentruncreate.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ Payload for creating a run.
99
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
1010
| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to run. |
1111
| `input` | Dict[str, *Any*] | :heavy_minus_sign: | The input to the agent. |
12-
| `messages` | List[[models.Message](../models/message.md)] | :heavy_minus_sign: | The messages to pass an input to the agent. |
12+
| `messages` | List[[models.Message](../models/message.md)] | :heavy_minus_sign: | The messages to pass an input to the agent. |
13+
| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | The metadata to pass to the agent. |

0 commit comments

Comments
 (0)