Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Generate playground API client
Tomas Valentac7f0fa5c9999
diff --git a/api-service/playground_client/api/default_api.py b/api-service/playground_client/api/default_api.pyindex 6bf9a70c4..30e4d9219 100644--- a/api-service/playground_client/api/default_api.py+++ b/api-service/playground_client/api/default_api.py@@ -19,6 +19,8 @@ from typing_extensions import Annotatedfrom pydantic import Field, StrictBool, StrictStr+from typing import Optional+from playground_client.models.create_session_response import CreateSessionResponsefrom playground_client.models.create_sessions_request import CreateSessionsRequestfrom playground_client.models.list_filesystem_dir_response import ListFilesystemDirResponse@@ -473,7 +475,7 @@ class DefaultApi(object):_request_auth=_params.get('_request_auth'))@validate_arguments- def get_process(self, id : StrictStr, process_id : StrictStr, wait : Annotated[StrictBool, Field(..., description="if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.")], **kwargs) -> ProcessResponse: # noqa: E501+ def get_process(self, id : StrictStr, process_id : StrictStr, wait : Annotated[Optional[StrictBool], Field(description="if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.")] = None, **kwargs) -> ProcessResponse: # noqa: E501"""get_process # noqa: E501This method makes a synchronous HTTP request by default. To make an@@ -486,7 +488,7 @@ class DefaultApi(object)::type id: str:param process_id: (required):type process_id: str- :param wait: if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. (required)+ :param wait: if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.:type wait: bool:param async_req: Whether to execute the request asynchronously.:type async_req: bool, optional@@ -507,7 +509,7 @@ class DefaultApi(object):return self.get_process_with_http_info(id, process_id, wait, **kwargs) # noqa: E501@validate_arguments- def get_process_with_http_info(self, id : StrictStr, process_id : StrictStr, wait : Annotated[StrictBool, Field(..., description="if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.")], **kwargs): # noqa: E501+ def get_process_with_http_info(self, id : StrictStr, process_id : StrictStr, wait : Annotated[Optional[StrictBool], Field(description="if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.")] = None, **kwargs): # noqa: E501"""get_process # noqa: E501This method makes a synchronous HTTP request by default. To make an@@ -520,7 +522,7 @@ class DefaultApi(object)::type id: str:param process_id: (required):type process_id: str- :param wait: if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. (required)+ :param wait: if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.:type wait: bool:param async_req: Whether to execute the request asynchronously.:type async_req: bool, optional@@ -1066,21 +1068,21 @@ class DefaultApi(object):_request_auth=_params.get('_request_auth'))@validate_arguments- def start_process(self, id : StrictStr, wait : Annotated[StrictBool, Field(..., description="if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.")], start_process_params : StartProcessParams, **kwargs) -> ProcessResponse: # noqa: E501+ def start_process(self, id : StrictStr, start_process_params : StartProcessParams, wait : Annotated[Optional[StrictBool], Field(description="if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.")] = None, **kwargs) -> ProcessResponse: # noqa: E501"""start_process # noqa: E501This method makes a synchronous HTTP request by default. To make anasynchronous HTTP request, please pass async_req=True- >>> thread = api.start_process(id, wait, start_process_params, async_req=True)+ >>> thread = api.start_process(id, start_process_params, wait, async_req=True)>>> result = thread.get():param id: (required):type id: str- :param wait: if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. (required)- :type wait: bool:param start_process_params: (required):type start_process_params: StartProcessParams+ :param wait: if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.+ :type wait: bool:param async_req: Whether to execute the request asynchronously.:type async_req: bool, optional:param _preload_content: if False, the urllib3.HTTPResponse object will@@ -1097,24 +1099,24 @@ class DefaultApi(object)::rtype: ProcessResponse"""kwargs['_return_http_data_only'] = True- return self.start_process_with_http_info(id, wait, start_process_params, **kwargs) # noqa: E501+ return self.start_process_with_http_info(id, start_process_params, wait, **kwargs) # noqa: E501@validate_arguments- def start_process_with_http_info(self, id : StrictStr, wait : Annotated[StrictBool, Field(..., description="if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.")], start_process_params : StartProcessParams, **kwargs): # noqa: E501+ def start_process_with_http_info(self, id : StrictStr, start_process_params : StartProcessParams, wait : Annotated[Optional[StrictBool], Field(description="if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.")] = None, **kwargs): # noqa: E501"""start_process # noqa: E501This method makes a synchronous HTTP request by default. To make anasynchronous HTTP request, please pass async_req=True- >>> thread = api.start_process_with_http_info(id, wait, start_process_params, async_req=True)+ >>> thread = api.start_process_with_http_info(id, start_process_params, wait, async_req=True)>>> result = thread.get():param id: (required):type id: str- :param wait: if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. (required)- :type wait: bool:param start_process_params: (required):type start_process_params: StartProcessParams+ :param wait: if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.+ :type wait: bool:param async_req: Whether to execute the request asynchronously.:type async_req: bool, optional:param _return_http_data_only: response data without head status code@@ -1143,8 +1145,8 @@ class DefaultApi(object):_all_params = ['id',- 'wait',- 'start_process_params'+ 'start_process_params',+ 'wait']_all_params.extend([diff --git a/api-service/playground_client/docs/DefaultApi.md b/api-service/playground_client/docs/DefaultApi.mdindex 62f5719ce..0f5a583ec 100644--- a/api-service/playground_client/docs/DefaultApi.md+++ b/api-service/playground_client/docs/DefaultApi.md@@ -199,7 +199,7 @@ No authorization required[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)# **get_process**-> ProcessResponse get_process(id, process_id, wait)+> ProcessResponse get_process(id, process_id, wait=wait)@@ -225,10 +225,10 @@ with playground_client.ApiClient(configuration) as api_client:api_instance = playground_client.DefaultApi(api_client)id = 'id_example' # str |process_id = 'process_id_example' # str |- wait = True # bool | if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.+ wait = True # bool | if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. (optional)try:- api_response = api_instance.get_process(id, process_id, wait)+ api_response = api_instance.get_process(id, process_id, wait=wait)print("The response of DefaultApi->get_process:\n")pprint(api_response)except Exception as e:@@ -241,7 +241,7 @@ Name | Type | Description | Notes------------- | ------------- | ------------- | -------------**id** | **str**| |**process_id** | **str**| |- **wait** | **bool**| if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. |+ **wait** | **bool**| if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. | [optional]### Return type@@ -451,7 +451,7 @@ No authorization required[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)# **start_process**-> ProcessResponse start_process(id, wait, start_process_params)+> ProcessResponse start_process(id, start_process_params, wait=wait)@@ -476,11 +476,11 @@ with playground_client.ApiClient(configuration) as api_client:# Create an instance of the API classapi_instance = playground_client.DefaultApi(api_client)id = 'id_example' # str |- wait = True # bool | if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.start_process_params = playground_client.StartProcessParams() # StartProcessParams |+ wait = True # bool | if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. (optional)try:- api_response = api_instance.start_process(id, wait, start_process_params)+ api_response = api_instance.start_process(id, start_process_params, wait=wait)print("The response of DefaultApi->start_process:\n")pprint(api_response)except Exception as e:@@ -492,8 +492,8 @@ with playground_client.ApiClient(configuration) as api_client:Name | Type | Description | Notes------------- | ------------- | ------------- | -------------**id** | **str**| |- **wait** | **bool**| if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. |**start_process_params** | [**StartProcessParams**](StartProcessParams.md)| |+ **wait** | **bool**| if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. | [optional]### Return typediff --git a/api-service/playground_client/docs/ProcessResponse.md b/api-service/playground_client/docs/ProcessResponse.mdindex f0a560270..c5f3c914e 100644--- a/api-service/playground_client/docs/ProcessResponse.md+++ b/api-service/playground_client/docs/ProcessResponse.md@@ -7,6 +7,7 @@ Name | Type | Description | Notes**stderr** | [**List[OutStderrResponse]**](OutStderrResponse.md) | |**stdout** | [**List[OutStdoutResponse]**](OutStdoutResponse.md) | |**process_id** | **str** | |+**finished** | **bool** | |## Examplediff --git a/api-service/playground_client/models/process_response.py b/api-service/playground_client/models/process_response.pyindex 5205734db..b964e38cc 100644--- a/api-service/playground_client/models/process_response.py+++ b/api-service/playground_client/models/process_response.py@@ -18,7 +18,7 @@ import jsonfrom typing import List-from pydantic import BaseModel, Field, StrictStr+from pydantic import BaseModel, Field, StrictBool, StrictStrfrom playground_client.models.out_stderr_response import OutStderrResponsefrom playground_client.models.out_stdout_response import OutStdoutResponse@@ -31,7 +31,8 @@ class ProcessResponse(BaseModel):stderr: List[OutStderrResponse] = ...stdout: List[OutStdoutResponse] = ...process_id: StrictStr = Field(..., alias="processID")- __properties = ["stderr", "stdout", "processID"]+ finished: StrictBool = ...+ __properties = ["stderr", "stdout", "processID", "finished"]class Config:allow_population_by_field_name = True@@ -89,7 +90,8 @@ class ProcessResponse(BaseModel):_obj = ProcessResponse.parse_obj({"stderr": [OutStderrResponse.from_dict(_item) for _item in obj.get("stderr")] if obj.get("stderr") is not None else None,"stdout": [OutStdoutResponse.from_dict(_item) for _item in obj.get("stdout")] if obj.get("stdout") is not None else None,- "process_id": obj.get("processID")+ "process_id": obj.get("processID"),+ "finished": obj.get("finished")})return _objdiff --git a/api-service/playground_client/test/test_process_response.py b/api-service/playground_client/test/test_process_response.pyindex e08609350..edb2fbffd 100644--- a/api-service/playground_client/test/test_process_response.py+++ b/api-service/playground_client/test/test_process_response.py@@ -50,7 +50,8 @@ class TestProcessResponse(unittest.TestCase):timestamp = 1.337,line = '', )],- process_id = ''+ process_id = '',+ finished = True)else :return ProcessResponse(@@ -67,6 +68,7 @@ class TestProcessResponse(unittest.TestCase):line = '', )],process_id = '',+ finished = True,)"""