Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Generate playground API client
Tomas Valenta75fca24e1c1b
diff --git a/api-service/.openapi-generator/FILES b/api-service/.openapi-generator/FILESindex 7b6bb46ab..38d835836 100644--- a/api-service/.openapi-generator/FILES+++ b/api-service/.openapi-generator/FILES@@ -15,7 +15,7 @@ playground_client/docs/OutTypeStderr.mdplayground_client/docs/OutTypeStdout.mdplayground_client/docs/ProcessResponse.mdplayground_client/docs/ReadFilesystemFileResponse.md-playground_client/docs/RunProcessParams.md+playground_client/docs/StartProcessParams.mdplayground_client/docs/WriteFilesystemFileRequest.mdplayground_client/docs/WriteProcessStdinRequest.mdplayground_client/exceptions.py@@ -31,7 +31,7 @@ playground_client/models/out_type_stderr.pyplayground_client/models/out_type_stdout.pyplayground_client/models/process_response.pyplayground_client/models/read_filesystem_file_response.py-playground_client/models/run_process_params.py+playground_client/models/start_process_params.pyplayground_client/models/write_filesystem_file_request.pyplayground_client/models/write_process_stdin_request.pyplayground_client/rest.py@@ -48,7 +48,7 @@ playground_client/test/test_out_type_stderr.pyplayground_client/test/test_out_type_stdout.pyplayground_client/test/test_process_response.pyplayground_client/test/test_read_filesystem_file_response.py-playground_client/test/test_run_process_params.py+playground_client/test/test_start_process_params.pyplayground_client/test/test_write_filesystem_file_request.pyplayground_client/test/test_write_process_stdin_request.pyplayground_client_README.mddiff --git a/api-service/playground_client/__init__.py b/api-service/playground_client/__init__.pyindex 7d68bc5ca..e15841a8e 100644--- a/api-service/playground_client/__init__.py+++ b/api-service/playground_client/__init__.py@@ -40,6 +40,6 @@ from playground_client.models.out_type_stderr import OutTypeStderrfrom playground_client.models.out_type_stdout import OutTypeStdoutfrom playground_client.models.process_response import ProcessResponsefrom playground_client.models.read_filesystem_file_response import ReadFilesystemFileResponse-from playground_client.models.run_process_params import RunProcessParams+from playground_client.models.start_process_params import StartProcessParamsfrom playground_client.models.write_filesystem_file_request import WriteFilesystemFileRequestfrom playground_client.models.write_process_stdin_request import WriteProcessStdinRequestdiff --git a/api-service/playground_client/api/default_api.py b/api-service/playground_client/api/default_api.pyindex bd0f1d319..6bf9a70c4 100644--- a/api-service/playground_client/api/default_api.py+++ b/api-service/playground_client/api/default_api.py@@ -24,7 +24,7 @@ from playground_client.models.create_sessions_request import CreateSessionsRequefrom playground_client.models.list_filesystem_dir_response import ListFilesystemDirResponsefrom playground_client.models.process_response import ProcessResponsefrom playground_client.models.read_filesystem_file_response import ReadFilesystemFileResponse-from playground_client.models.run_process_params import RunProcessParams+from playground_client.models.start_process_params import StartProcessParamsfrom playground_client.models.write_filesystem_file_request import WriteFilesystemFileRequestfrom playground_client.models.write_process_stdin_request import WriteProcessStdinRequest@@ -1066,21 +1066,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`.")], run_process_params : RunProcessParams, **kwargs) -> ProcessResponse: # noqa: E501+ 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"""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, run_process_params, async_req=True)+ >>> thread = api.start_process(id, wait, start_process_params, 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 run_process_params: (required)- :type run_process_params: RunProcessParams+ :param start_process_params: (required)+ :type start_process_params: StartProcessParams: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 +1097,24 @@ class DefaultApi(object)::rtype: ProcessResponse"""kwargs['_return_http_data_only'] = True- return self.start_process_with_http_info(id, wait, run_process_params, **kwargs) # noqa: E501+ return self.start_process_with_http_info(id, wait, start_process_params, **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`.")], run_process_params : RunProcessParams, **kwargs): # noqa: E501+ 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"""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, run_process_params, async_req=True)+ >>> thread = api.start_process_with_http_info(id, wait, start_process_params, 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 run_process_params: (required)- :type run_process_params: RunProcessParams+ :param start_process_params: (required)+ :type start_process_params: StartProcessParams: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@@ -1144,7 +1144,7 @@ class DefaultApi(object):_all_params = ['id','wait',- 'run_process_params'+ 'start_process_params']_all_params.extend([@@ -1189,8 +1189,8 @@ class DefaultApi(object):# process the body parameter_body_params = None- if _params['run_process_params']:- _body_params = _params['run_process_params']+ if _params['start_process_params']:+ _body_params = _params['start_process_params']# set the HTTP header `Accept`_header_params['Accept'] = self.api_client.select_header_accept(diff --git a/api-service/playground_client/docs/DefaultApi.md b/api-service/playground_client/docs/DefaultApi.mdindex b9921108b..62f5719ce 100644--- a/api-service/playground_client/docs/DefaultApi.md+++ b/api-service/playground_client/docs/DefaultApi.md@@ -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, run_process_params)+> ProcessResponse start_process(id, wait, start_process_params)@@ -477,10 +477,10 @@ with playground_client.ApiClient(configuration) as api_client:api_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`.- run_process_params = playground_client.RunProcessParams() # RunProcessParams |+ start_process_params = playground_client.StartProcessParams() # StartProcessParams |try:- api_response = api_instance.start_process(id, wait, run_process_params)+ api_response = api_instance.start_process(id, wait, start_process_params)print("The response of DefaultApi->start_process:\n")pprint(api_response)except Exception as e:@@ -493,7 +493,7 @@ 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`. |- **run_process_params** | [**RunProcessParams**](RunProcessParams.md)| |+ **start_process_params** | [**StartProcessParams**](StartProcessParams.md)| |### Return typediff --git a/api-service/playground_client/docs/RunProcessParams.md b/api-service/playground_client/docs/StartProcessParams.mdsimilarity index 53%rename from api-service/playground_client/docs/RunProcessParams.mdrename to api-service/playground_client/docs/StartProcessParams.mdindex 1372ce0a2..376008f90 100644--- a/api-service/playground_client/docs/RunProcessParams.md+++ b/api-service/playground_client/docs/StartProcessParams.md@@ -1,4 +1,4 @@-# RunProcessParams+# StartProcessParams## Properties@@ -11,19 +11,19 @@ Name | Type | Description | Notes## Example```python-from playground_client.models.run_process_params import RunProcessParams+from playground_client.models.start_process_params import StartProcessParams# TODO update the JSON string belowjson = "{}"-# create an instance of RunProcessParams from a JSON string-run_process_params_instance = RunProcessParams.from_json(json)+# create an instance of StartProcessParams from a JSON string+start_process_params_instance = StartProcessParams.from_json(json)# print the JSON string representation of the object-print RunProcessParams.to_json()+print StartProcessParams.to_json()# convert the object into a dict-run_process_params_dict = run_process_params_instance.to_dict()-# create an instance of RunProcessParams from a dict-run_process_params_form_dict = run_process_params.from_dict(run_process_params_dict)+start_process_params_dict = start_process_params_instance.to_dict()+# create an instance of StartProcessParams from a dict+start_process_params_form_dict = start_process_params.from_dict(start_process_params_dict)```[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)diff --git a/api-service/playground_client/models/__init__.py b/api-service/playground_client/models/__init__.pyindex a6521119f..7baf60813 100644--- a/api-service/playground_client/models/__init__.py+++ b/api-service/playground_client/models/__init__.py@@ -25,6 +25,6 @@ from playground_client.models.out_type_stderr import OutTypeStderrfrom playground_client.models.out_type_stdout import OutTypeStdoutfrom playground_client.models.process_response import ProcessResponsefrom playground_client.models.read_filesystem_file_response import ReadFilesystemFileResponse-from playground_client.models.run_process_params import RunProcessParams+from playground_client.models.start_process_params import StartProcessParamsfrom playground_client.models.write_filesystem_file_request import WriteFilesystemFileRequestfrom playground_client.models.write_process_stdin_request import WriteProcessStdinRequestdiff --git a/api-service/playground_client/models/run_process_params.py b/api-service/playground_client/models/start_process_params.pysimilarity index 81%rename from api-service/playground_client/models/run_process_params.pyrename to api-service/playground_client/models/start_process_params.pyindex e5653beeb..60376c2e4 100644--- a/api-service/playground_client/models/run_process_params.py+++ b/api-service/playground_client/models/start_process_params.py@@ -20,7 +20,7 @@ import jsonfrom typing import Dict, Optionalfrom pydantic import BaseModel, Field, StrictStr-class RunProcessParams(BaseModel):+class StartProcessParams(BaseModel):"""NOTE: This class is auto generated by OpenAPI Generator.Ref: https://openapi-generator.tech@@ -44,8 +44,8 @@ class RunProcessParams(BaseModel):return json.dumps(self.to_dict())@classmethod- def from_json(cls, json_str: str) -> RunProcessParams:- """Create an instance of RunProcessParams from a JSON string"""+ def from_json(cls, json_str: str) -> StartProcessParams:+ """Create an instance of StartProcessParams from a JSON string"""return cls.from_dict(json.loads(json_str))def to_dict(self):@@ -57,20 +57,20 @@ class RunProcessParams(BaseModel):return _dict@classmethod- def from_dict(cls, obj: dict) -> RunProcessParams:- """Create an instance of RunProcessParams from a dict"""+ def from_dict(cls, obj: dict) -> StartProcessParams:+ """Create an instance of StartProcessParams from a dict"""if obj is None:return Noneif type(obj) is not dict:- return RunProcessParams.parse_obj(obj)+ return StartProcessParams.parse_obj(obj)# raise errors for additional fields in the inputfor _key in obj.keys():if _key not in cls.__properties:- raise ValueError("Error due to additional fields (not defined in RunProcessParams) in the input: " + obj)+ raise ValueError("Error due to additional fields (not defined in StartProcessParams) in the input: " + obj)- _obj = RunProcessParams.parse_obj({+ _obj = StartProcessParams.parse_obj({"cmd": obj.get("cmd"),"env_vars": obj.get("envVars"),"rootdir": obj.get("rootdir")diff --git a/api-service/playground_client/test/test_run_process_params.py b/api-service/playground_client/test/test_start_process_params.pysimilarity index 68%rename from api-service/playground_client/test/test_run_process_params.pyrename to api-service/playground_client/test/test_start_process_params.pyindex e148b0b1b..a65e71d02 100644--- a/api-service/playground_client/test/test_run_process_params.py+++ b/api-service/playground_client/test/test_start_process_params.py@@ -16,11 +16,11 @@ import unittestimport datetimeimport playground_client-from playground_client.models.run_process_params import RunProcessParams # noqa: E501+from playground_client.models.start_process_params import StartProcessParams # noqa: E501from playground_client.rest import ApiException-class TestRunProcessParams(unittest.TestCase):- """RunProcessParams unit test stubs"""+class TestStartProcessParams(unittest.TestCase):+ """StartProcessParams unit test stubs"""def setUp(self):pass@@ -29,15 +29,15 @@ class TestRunProcessParams(unittest.TestCase):passdef make_instance(self, include_optional):- """Test RunProcessParams+ """Test StartProcessParamsinclude_option is a boolean, when False only requiredparams are included, when True both required andoptional params are included """- # uncomment below to create an instance of `RunProcessParams`+ # uncomment below to create an instance of `StartProcessParams`"""- model = playground_client.models.run_process_params.RunProcessParams() # noqa: E501+ model = playground_client.models.start_process_params.StartProcessParams() # noqa: E501if include_optional :- return RunProcessParams(+ return StartProcessParams(cmd = '',env_vars = {'key' : ''@@ -45,13 +45,13 @@ class TestRunProcessParams(unittest.TestCase):rootdir = '')else :- return RunProcessParams(+ return StartProcessParams(cmd = '',)"""- def testRunProcessParams(self):- """Test RunProcessParams"""+ def testStartProcessParams(self):+ """Test StartProcessParams"""# inst_req_only = self.make_instance(include_optional=False)# inst_req_and_optional = self.make_instance(include_optional=True)diff --git a/api-service/playground_client_README.md b/api-service/playground_client_README.mdindex 6f0807b21..0cedb2f23 100644--- a/api-service/playground_client_README.md+++ b/api-service/playground_client_README.md@@ -90,7 +90,7 @@ Class | Method | HTTP request | Description- [OutTypeStdout](playground_client/docs/OutTypeStdout.md)- [ProcessResponse](playground_client/docs/ProcessResponse.md)- [ReadFilesystemFileResponse](playground_client/docs/ReadFilesystemFileResponse.md)- - [RunProcessParams](playground_client/docs/RunProcessParams.md)+ - [StartProcessParams](playground_client/docs/StartProcessParams.md)- [WriteFilesystemFileRequest](playground_client/docs/WriteFilesystemFileRequest.md)- [WriteProcessStdinRequest](playground_client/docs/WriteProcessStdinRequest.md)