Skip to content

Commit 5275a86

Browse files
authored
Merge pull request #57 from langchain-ai/nc/16apr/ii
Small changes to spec
2 parents fbc8989 + cd39b85 commit 5275a86

30 files changed

+689
-163
lines changed

client-python/.openapi-generator/FILES

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ap_client/exceptions.py
1717
ap_client/models/__init__.py
1818
ap_client/models/agent.py
1919
ap_client/models/agent_capabilities.py
20-
ap_client/models/agent_schemas.py
20+
ap_client/models/agent_schema.py
2121
ap_client/models/config.py
2222
ap_client/models/content.py
2323
ap_client/models/content_one_of_inner.py
@@ -31,6 +31,7 @@ ap_client/models/run.py
3131
ap_client/models/run_create.py
3232
ap_client/models/run_search_request.py
3333
ap_client/models/run_status.py
34+
ap_client/models/run_stream.py
3435
ap_client/models/run_wait_response.py
3536
ap_client/models/search_agents_request.py
3637
ap_client/models/search_items_response.py
@@ -50,7 +51,7 @@ ap_client/py.typed
5051
ap_client/rest.py
5152
docs/Agent.md
5253
docs/AgentCapabilities.md
53-
docs/AgentSchemas.md
54+
docs/AgentSchema.md
5455
docs/AgentsApi.md
5556
docs/BackgroundRunsApi.md
5657
docs/Config.md
@@ -66,6 +67,7 @@ docs/Run.md
6667
docs/RunCreate.md
6768
docs/RunSearchRequest.md
6869
docs/RunStatus.md
70+
docs/RunStream.md
6971
docs/RunWaitResponse.md
7072
docs/RunsApi.md
7173
docs/SearchAgentsRequest.md
@@ -91,4 +93,6 @@ setup.cfg
9193
setup.py
9294
test-requirements.txt
9395
test/__init__.py
96+
test/test_agent_schema.py
97+
test/test_run_stream.py
9498
tox.ini

client-python/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Class | Method | HTTP request | Description
115115

116116
- [Agent](docs/Agent.md)
117117
- [AgentCapabilities](docs/AgentCapabilities.md)
118-
- [AgentSchemas](docs/AgentSchemas.md)
118+
- [AgentSchema](docs/AgentSchema.md)
119119
- [Config](docs/Config.md)
120120
- [Content](docs/Content.md)
121121
- [ContentOneOfInner](docs/ContentOneOfInner.md)
@@ -129,6 +129,7 @@ Class | Method | HTTP request | Description
129129
- [RunCreate](docs/RunCreate.md)
130130
- [RunSearchRequest](docs/RunSearchRequest.md)
131131
- [RunStatus](docs/RunStatus.md)
132+
- [RunStream](docs/RunStream.md)
132133
- [RunWaitResponse](docs/RunWaitResponse.md)
133134
- [SearchAgentsRequest](docs/SearchAgentsRequest.md)
134135
- [SearchItemsResponse](docs/SearchItemsResponse.md)

client-python/ap_client/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
# import models into sdk package
3737
from ap_client.models.agent import Agent
3838
from ap_client.models.agent_capabilities import AgentCapabilities
39-
from ap_client.models.agent_schemas import AgentSchemas
39+
from ap_client.models.agent_schema import AgentSchema
4040
from ap_client.models.config import Config
4141
from ap_client.models.content import Content
4242
from ap_client.models.content_one_of_inner import ContentOneOfInner
@@ -50,6 +50,7 @@
5050
from ap_client.models.run_create import RunCreate
5151
from ap_client.models.run_search_request import RunSearchRequest
5252
from ap_client.models.run_status import RunStatus
53+
from ap_client.models.run_stream import RunStream
5354
from ap_client.models.run_wait_response import RunWaitResponse
5455
from ap_client.models.search_agents_request import SearchAgentsRequest
5556
from ap_client.models.search_items_response import SearchItemsResponse

client-python/ap_client/api/agents_api.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from typing_extensions import Annotated
1717

1818
from ap_client.models.agent import Agent
19-
from ap_client.models.agent_schemas import AgentSchemas
19+
from ap_client.models.agent_schema import AgentSchema
2020
from ap_client.models.search_agents_request import SearchAgentsRequest
2121

2222
from ap_client.api_client import ApiClient, RequestSerialized
@@ -295,7 +295,7 @@ def get_agent_schemas(
295295
_content_type: Optional[StrictStr] = None,
296296
_headers: Optional[Dict[StrictStr, Any]] = None,
297297
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
298-
) -> AgentSchemas:
298+
) -> AgentSchema:
299299
"""Get Agent Schemas
300300
301301
Get an agent's schemas by ID.
@@ -333,7 +333,7 @@ def get_agent_schemas(
333333
)
334334

335335
_response_types_map: Dict[str, Optional[str]] = {
336-
"200": "AgentSchemas",
336+
"200": "AgentSchema",
337337
"404": "ErrorResponse",
338338
"422": "ErrorResponse",
339339
}
@@ -361,7 +361,7 @@ def get_agent_schemas_with_http_info(
361361
_content_type: Optional[StrictStr] = None,
362362
_headers: Optional[Dict[StrictStr, Any]] = None,
363363
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
364-
) -> ApiResponse[AgentSchemas]:
364+
) -> ApiResponse[AgentSchema]:
365365
"""Get Agent Schemas
366366
367367
Get an agent's schemas by ID.
@@ -399,7 +399,7 @@ def get_agent_schemas_with_http_info(
399399
)
400400

401401
_response_types_map: Dict[str, Optional[str]] = {
402-
"200": "AgentSchemas",
402+
"200": "AgentSchema",
403403
"404": "ErrorResponse",
404404
"422": "ErrorResponse",
405405
}
@@ -465,7 +465,7 @@ def get_agent_schemas_without_preload_content(
465465
)
466466

467467
_response_types_map: Dict[str, Optional[str]] = {
468-
"200": "AgentSchemas",
468+
"200": "AgentSchema",
469469
"404": "ErrorResponse",
470470
"422": "ErrorResponse",
471471
}

client-python/ap_client/api/background_runs_api.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
from pydantic import StrictBool
1919
from ap_client.models.run import Run
20-
from ap_client.models.run_create import RunCreate
2120
from ap_client.models.run_search_request import RunSearchRequest
21+
from ap_client.models.run_stream import RunStream
2222
from ap_client.models.run_wait_response import RunWaitResponse
2323

2424
from ap_client.api_client import ApiClient, RequestSerialized
@@ -332,7 +332,7 @@ def _cancel_run_serialize(
332332
@validate_call
333333
def create_run(
334334
self,
335-
run_create: RunCreate,
335+
run_stream: RunStream,
336336
_request_timeout: Union[
337337
None,
338338
Annotated[StrictFloat, Field(gt=0)],
@@ -349,8 +349,8 @@ def create_run(
349349
350350
Create a run in a new thread, return the run ID immediately. Don't wait for the final run output.
351351
352-
:param run_create: (required)
353-
:type run_create: RunCreate
352+
:param run_stream: (required)
353+
:type run_stream: RunStream
354354
:param _request_timeout: timeout setting for this request. If one
355355
number provided, it will be total request
356356
timeout. It can also be a pair (tuple) of
@@ -374,7 +374,7 @@ def create_run(
374374
""" # noqa: E501
375375

376376
_param = self._create_run_serialize(
377-
run_create=run_create,
377+
run_stream=run_stream,
378378
_request_auth=_request_auth,
379379
_content_type=_content_type,
380380
_headers=_headers,
@@ -399,7 +399,7 @@ def create_run(
399399
@validate_call
400400
def create_run_with_http_info(
401401
self,
402-
run_create: RunCreate,
402+
run_stream: RunStream,
403403
_request_timeout: Union[
404404
None,
405405
Annotated[StrictFloat, Field(gt=0)],
@@ -416,8 +416,8 @@ def create_run_with_http_info(
416416
417417
Create a run in a new thread, return the run ID immediately. Don't wait for the final run output.
418418
419-
:param run_create: (required)
420-
:type run_create: RunCreate
419+
:param run_stream: (required)
420+
:type run_stream: RunStream
421421
:param _request_timeout: timeout setting for this request. If one
422422
number provided, it will be total request
423423
timeout. It can also be a pair (tuple) of
@@ -441,7 +441,7 @@ def create_run_with_http_info(
441441
""" # noqa: E501
442442

443443
_param = self._create_run_serialize(
444-
run_create=run_create,
444+
run_stream=run_stream,
445445
_request_auth=_request_auth,
446446
_content_type=_content_type,
447447
_headers=_headers,
@@ -466,7 +466,7 @@ def create_run_with_http_info(
466466
@validate_call
467467
def create_run_without_preload_content(
468468
self,
469-
run_create: RunCreate,
469+
run_stream: RunStream,
470470
_request_timeout: Union[
471471
None,
472472
Annotated[StrictFloat, Field(gt=0)],
@@ -483,8 +483,8 @@ def create_run_without_preload_content(
483483
484484
Create a run in a new thread, return the run ID immediately. Don't wait for the final run output.
485485
486-
:param run_create: (required)
487-
:type run_create: RunCreate
486+
:param run_stream: (required)
487+
:type run_stream: RunStream
488488
:param _request_timeout: timeout setting for this request. If one
489489
number provided, it will be total request
490490
timeout. It can also be a pair (tuple) of
@@ -508,7 +508,7 @@ def create_run_without_preload_content(
508508
""" # noqa: E501
509509

510510
_param = self._create_run_serialize(
511-
run_create=run_create,
511+
run_stream=run_stream,
512512
_request_auth=_request_auth,
513513
_content_type=_content_type,
514514
_headers=_headers,
@@ -528,7 +528,7 @@ def create_run_without_preload_content(
528528

529529
def _create_run_serialize(
530530
self,
531-
run_create,
531+
run_stream,
532532
_request_auth,
533533
_content_type,
534534
_headers,
@@ -552,8 +552,8 @@ def _create_run_serialize(
552552
# process the header parameters
553553
# process the form parameters
554554
# process the body parameter
555-
if run_create is not None:
556-
_body_params = run_create
555+
if run_stream is not None:
556+
_body_params = run_stream
557557

558558
# set the HTTP header `Accept`
559559
if "Accept" not in _header_params:

client-python/ap_client/api/runs_api.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from typing_extensions import Annotated
1717

1818
from ap_client.models.run_create import RunCreate
19+
from ap_client.models.run_stream import RunStream
1920
from ap_client.models.run_wait_response import RunWaitResponse
2021

2122
from ap_client.api_client import ApiClient, RequestSerialized
@@ -38,7 +39,7 @@ def __init__(self, api_client=None) -> None:
3839
@validate_call
3940
def create_and_stream_run(
4041
self,
41-
run_create: RunCreate,
42+
run_stream: RunStream,
4243
_request_timeout: Union[
4344
None,
4445
Annotated[StrictFloat, Field(gt=0)],
@@ -55,8 +56,8 @@ def create_and_stream_run(
5556
5657
Create a run in a new thread, stream the output.
5758
58-
:param run_create: (required)
59-
:type run_create: RunCreate
59+
:param run_stream: (required)
60+
:type run_stream: RunStream
6061
:param _request_timeout: timeout setting for this request. If one
6162
number provided, it will be total request
6263
timeout. It can also be a pair (tuple) of
@@ -80,7 +81,7 @@ def create_and_stream_run(
8081
""" # noqa: E501
8182

8283
_param = self._create_and_stream_run_serialize(
83-
run_create=run_create,
84+
run_stream=run_stream,
8485
_request_auth=_request_auth,
8586
_content_type=_content_type,
8687
_headers=_headers,
@@ -105,7 +106,7 @@ def create_and_stream_run(
105106
@validate_call
106107
def create_and_stream_run_with_http_info(
107108
self,
108-
run_create: RunCreate,
109+
run_stream: RunStream,
109110
_request_timeout: Union[
110111
None,
111112
Annotated[StrictFloat, Field(gt=0)],
@@ -122,8 +123,8 @@ def create_and_stream_run_with_http_info(
122123
123124
Create a run in a new thread, stream the output.
124125
125-
:param run_create: (required)
126-
:type run_create: RunCreate
126+
:param run_stream: (required)
127+
:type run_stream: RunStream
127128
:param _request_timeout: timeout setting for this request. If one
128129
number provided, it will be total request
129130
timeout. It can also be a pair (tuple) of
@@ -147,7 +148,7 @@ def create_and_stream_run_with_http_info(
147148
""" # noqa: E501
148149

149150
_param = self._create_and_stream_run_serialize(
150-
run_create=run_create,
151+
run_stream=run_stream,
151152
_request_auth=_request_auth,
152153
_content_type=_content_type,
153154
_headers=_headers,
@@ -172,7 +173,7 @@ def create_and_stream_run_with_http_info(
172173
@validate_call
173174
def create_and_stream_run_without_preload_content(
174175
self,
175-
run_create: RunCreate,
176+
run_stream: RunStream,
176177
_request_timeout: Union[
177178
None,
178179
Annotated[StrictFloat, Field(gt=0)],
@@ -189,8 +190,8 @@ def create_and_stream_run_without_preload_content(
189190
190191
Create a run in a new thread, stream the output.
191192
192-
:param run_create: (required)
193-
:type run_create: RunCreate
193+
:param run_stream: (required)
194+
:type run_stream: RunStream
194195
:param _request_timeout: timeout setting for this request. If one
195196
number provided, it will be total request
196197
timeout. It can also be a pair (tuple) of
@@ -214,7 +215,7 @@ def create_and_stream_run_without_preload_content(
214215
""" # noqa: E501
215216

216217
_param = self._create_and_stream_run_serialize(
217-
run_create=run_create,
218+
run_stream=run_stream,
218219
_request_auth=_request_auth,
219220
_content_type=_content_type,
220221
_headers=_headers,
@@ -234,7 +235,7 @@ def create_and_stream_run_without_preload_content(
234235

235236
def _create_and_stream_run_serialize(
236237
self,
237-
run_create,
238+
run_stream,
238239
_request_auth,
239240
_content_type,
240241
_headers,
@@ -258,8 +259,8 @@ def _create_and_stream_run_serialize(
258259
# process the header parameters
259260
# process the form parameters
260261
# process the body parameter
261-
if run_create is not None:
262-
_body_params = run_create
262+
if run_stream is not None:
263+
_body_params = run_stream
263264

264265
# set the HTTP header `Accept`
265266
if "Accept" not in _header_params:

client-python/ap_client/models/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# import models into model package
1616
from ap_client.models.agent import Agent
1717
from ap_client.models.agent_capabilities import AgentCapabilities
18-
from ap_client.models.agent_schemas import AgentSchemas
18+
from ap_client.models.agent_schema import AgentSchema
1919
from ap_client.models.config import Config
2020
from ap_client.models.content import Content
2121
from ap_client.models.content_one_of_inner import ContentOneOfInner
@@ -29,6 +29,7 @@
2929
from ap_client.models.run_create import RunCreate
3030
from ap_client.models.run_search_request import RunSearchRequest
3131
from ap_client.models.run_status import RunStatus
32+
from ap_client.models.run_stream import RunStream
3233
from ap_client.models.run_wait_response import RunWaitResponse
3334
from ap_client.models.search_agents_request import SearchAgentsRequest
3435
from ap_client.models.search_items_response import SearchItemsResponse

0 commit comments

Comments
 (0)