You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,7 +135,7 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
135
135
136
136
```python
137
137
# Synchronous Example
138
-
from glean.api_clientimport Glean, models
138
+
from glean import Glean, models
139
139
import os
140
140
141
141
@@ -163,7 +163,7 @@ The same SDK client can also be used to make asychronous requests by importing a
163
163
```python
164
164
# Asynchronous Example
165
165
import asyncio
166
-
from glean.api_clientimport Glean, models
166
+
from glean import Glean, models
167
167
import os
168
168
169
169
asyncdefmain():
@@ -192,7 +192,7 @@ asyncio.run(main())
192
192
193
193
```python
194
194
# Synchronous Example
195
-
from glean.api_clientimport Glean, models
195
+
from glean import Glean, models
196
196
import os
197
197
198
198
@@ -220,7 +220,7 @@ The same SDK client can also be used to make asychronous requests by importing a
220
220
```python
221
221
# Asynchronous Example
222
222
import asyncio
223
-
from glean.api_clientimport Glean, models
223
+
from glean import Glean, models
224
224
import os
225
225
226
226
asyncdefmain():
@@ -259,8 +259,8 @@ This SDK supports the following security scheme globally:
259
259
260
260
To authenticate with the API the `api_token` parameter must be set when initializing the SDK client instance. For example:
261
261
```python
262
-
from glean.api_clientimport Glean, models
263
-
from glean.api_client.utils import parse_datetime
262
+
from glean import Glean, models
263
+
from glean.utils import parse_datetime
264
264
import os
265
265
266
266
@@ -541,8 +541,8 @@ Some of the endpoints in this SDK support retries. If you use the SDK without an
541
541
542
542
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
543
543
```python
544
-
from glean.api_clientimport Glean, models
545
-
from glean.api_client.utils import BackoffStrategy, RetryConfig, parse_datetime
544
+
from glean import Glean, models
545
+
from glean.utils import BackoffStrategy, RetryConfig, parse_datetime
546
546
import os
547
547
548
548
@@ -582,8 +582,8 @@ with Glean(
582
582
583
583
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:
584
584
```python
585
-
from glean.api_clientimport Glean, models
586
-
from glean.api_client.utils import BackoffStrategy, RetryConfig, parse_datetime
585
+
from glean import Glean, models
586
+
from glean.utils import BackoffStrategy, RetryConfig, parse_datetime
587
587
import os
588
588
589
589
@@ -720,8 +720,8 @@ The default server `https://{instance}-be.glean.com` contains variables and is s
720
720
#### Example
721
721
722
722
```python
723
-
from glean.api_clientimport Glean, models
724
-
from glean.api_client.utils import parse_datetime
723
+
from glean import Glean, models
724
+
from glean.utils import parse_datetime
725
725
import os
726
726
727
727
@@ -763,8 +763,8 @@ with Glean(
763
763
764
764
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:
765
765
```python
766
-
from glean.api_clientimport Glean, models
767
-
from glean.api_client.utils import parse_datetime
766
+
from glean import Glean, models
767
+
from glean.utils import parse_datetime
768
768
import os
769
769
770
770
@@ -812,7 +812,7 @@ This allows you to wrap the client with your own custom logic, such as adding cu
812
812
813
813
For example, you could specify a header for every request that this sdk makes as follows:
|`agent_id`|*Optional[str]*|:heavy_minus_sign:| The ID of the agent to run. |
10
+
|`agent_id`|*str*|:heavy_check_mark:| The ID of the agent to run. |
11
11
|`input`| Dict[str, *Any*]|:heavy_minus_sign:| The input to the agent. |
12
12
|`messages`| List[[models.Message](../models/message.md)]|:heavy_minus_sign:| The messages to pass an input to the agent. |
13
13
|`status`|[Optional[models.AgentExecutionStatus]](../models/agentexecutionstatus.md)|:heavy_minus_sign:| The status of the run. One of 'error', 'success'. |
|`request`|[models.AgentRunCreate](../../models/agentruncreate.md)|:heavy_check_mark:| The request object to use for the request. |
159
+
|`agent_id`|*str*|:heavy_check_mark:| The ID of the agent to run. |
160
+
|`input`| Dict[str, *Any*]|:heavy_minus_sign:| The input to the agent. |
161
+
|`messages`| List[[models.Message](../../models/message.md)]|:heavy_minus_sign:| The messages to pass an input to the agent. |
160
162
|`retries`|[Optional[utils.RetryConfig]](../../models/utils/retryconfig.md)|:heavy_minus_sign:| Configuration to override the default retry behavior of the client. |
161
163
162
164
### Response
@@ -176,15 +178,15 @@ Creates and triggers a run of an agent. Waits for final output and then returns
|`request`|[models.AgentRunCreate](../../models/agentruncreate.md)|:heavy_check_mark:| The request object to use for the request. |
200
+
|`agent_id`|*str*|:heavy_check_mark:| The ID of the agent to run. |
201
+
|`input`| Dict[str, *Any*]|:heavy_minus_sign:| The input to the agent. |
202
+
|`messages`| List[[models.Message](../../models/message.md)]|:heavy_minus_sign:| The messages to pass an input to the agent. |
199
203
|`retries`|[Optional[utils.RetryConfig]](../../models/utils/retryconfig.md)|:heavy_minus_sign:| Configuration to override the default retry behavior of the client. |
0 commit comments