Skip to content

Commit

Permalink
feat: remove unused executor_id
Browse files Browse the repository at this point in the history
  • Loading branch information
JanPokorny committed Sep 30, 2024
1 parent a0b214e commit 79fbfe6
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2


DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8proto/code_interpreter/v1/code_interpreter_service.proto\x12\x13\x63ode_interpreter.v1\x1a\x1b\x62uf/validate/validate.proto\"\x9f\x02\n\x0e\x45xecuteRequest\x12\x39\n\x0b\x65xecutor_id\x18\x01 \x01(\tB\x18\xbaH\x15r\x13\x32\x11^[a-z0-9-]{1,32}$R\nexecutorId\x12\x1f\n\x0bsource_code\x18\x02 \x01(\tR\nsourceCode\x12w\n\x05\x66iles\x18\x03 \x03(\x0b\x32..code_interpreter.v1.ExecuteRequest.FilesEntryB1\xbaH.\x9a\x01+\"\rr\x0b\x32\t^/[^/].*$*\x1ar\x18\x32\x16^[0-9a-zA-Z_-]{1,255}$R\x05\x66iles\x1a\x38\n\nFilesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x92\x02\n\x0f\x45xecuteResponse\x12\x16\n\x06stdout\x18\x01 \x01(\tR\x06stdout\x12\x16\n\x06stderr\x18\x02 \x01(\tR\x06stderr\x12\x1b\n\texit_code\x18\x03 \x01(\x05R\x08\x65xitCode\x12x\n\x05\x66iles\x18\x04 \x03(\x0b\x32/.code_interpreter.v1.ExecuteResponse.FilesEntryB1\xbaH.\x9a\x01+\"\rr\x0b\x32\t^/[^/].*$*\x1ar\x18\x32\x16^[0-9a-zA-Z_-]{1,255}$R\x05\x66iles\x1a\x38\n\nFilesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"B\n\x16ParseCustomToolRequest\x12(\n\x10tool_source_code\x18\x01 \x01(\tR\x0etoolSourceCode\"\x9d\x01\n\x1eParseCustomToolResponseSuccess\x12\x1b\n\ttool_name\x18\x01 \x01(\tR\x08toolName\x12)\n\x10tool_description\x18\x02 \x01(\tR\x0ftoolDescription\x12\x33\n\x16tool_input_schema_json\x18\x03 \x01(\tR\x13toolInputSchemaJson\"E\n\x1cParseCustomToolResponseError\x12%\n\x0e\x65rror_messages\x18\x01 \x03(\tR\rerrorMessages\"\xc1\x01\n\x17ParseCustomToolResponse\x12O\n\x07success\x18\x01 \x01(\x0b\x32\x33.code_interpreter.v1.ParseCustomToolResponseSuccessH\x00R\x07success\x12I\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x31.code_interpreter.v1.ParseCustomToolResponseErrorH\x00R\x05\x65rrorB\n\n\x08response\"\xa7\x01\n\x18\x45xecuteCustomToolRequest\x12\x39\n\x0b\x65xecutor_id\x18\x01 \x01(\tB\x18\xbaH\x15r\x13\x32\x11^[a-z0-9-]{1,32}$R\nexecutorId\x12(\n\x10tool_source_code\x18\x02 \x01(\tR\x0etoolSourceCode\x12&\n\x0ftool_input_json\x18\x03 \x01(\tR\rtoolInputJson\"L\n ExecuteCustomToolResponseSuccess\x12(\n\x10tool_output_json\x18\x01 \x01(\tR\x0etoolOutputJson\"8\n\x1e\x45xecuteCustomToolResponseError\x12\x16\n\x06stderr\x18\x01 \x01(\tR\x06stderr\"\xc7\x01\n\x19\x45xecuteCustomToolResponse\x12Q\n\x07success\x18\x01 \x01(\x0b\x32\x35.code_interpreter.v1.ExecuteCustomToolResponseSuccessH\x00R\x07success\x12K\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x33.code_interpreter.v1.ExecuteCustomToolResponseErrorH\x00R\x05\x65rrorB\n\n\x08response2\xd0\x02\n\x16\x43odeInterpreterService\x12T\n\x07\x45xecute\x12#.code_interpreter.v1.ExecuteRequest\x1a$.code_interpreter.v1.ExecuteResponse\x12l\n\x0fParseCustomTool\x12+.code_interpreter.v1.ParseCustomToolRequest\x1a,.code_interpreter.v1.ParseCustomToolResponse\x12r\n\x11\x45xecuteCustomTool\x12-.code_interpreter.v1.ExecuteCustomToolRequest\x1a..code_interpreter.v1.ExecuteCustomToolResponseb\x06proto3')
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8proto/code_interpreter/v1/code_interpreter_service.proto\x12\x13\x63ode_interpreter.v1\x1a\x1b\x62uf/validate/validate.proto\"\xea\x01\n\x0e\x45xecuteRequest\x12\x1f\n\x0bsource_code\x18\x02 \x01(\tR\nsourceCode\x12w\n\x05\x66iles\x18\x03 \x03(\x0b\x32..code_interpreter.v1.ExecuteRequest.FilesEntryB1\xbaH.\x9a\x01+\"\rr\x0b\x32\t^/[^/].*$*\x1ar\x18\x32\x16^[0-9a-zA-Z_-]{1,255}$R\x05\x66iles\x1a\x38\n\nFilesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01J\x04\x08\x01\x10\x02\"\x92\x02\n\x0f\x45xecuteResponse\x12\x16\n\x06stdout\x18\x01 \x01(\tR\x06stdout\x12\x16\n\x06stderr\x18\x02 \x01(\tR\x06stderr\x12\x1b\n\texit_code\x18\x03 \x01(\x05R\x08\x65xitCode\x12x\n\x05\x66iles\x18\x04 \x03(\x0b\x32/.code_interpreter.v1.ExecuteResponse.FilesEntryB1\xbaH.\x9a\x01+\"\rr\x0b\x32\t^/[^/].*$*\x1ar\x18\x32\x16^[0-9a-zA-Z_-]{1,255}$R\x05\x66iles\x1a\x38\n\nFilesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"B\n\x16ParseCustomToolRequest\x12(\n\x10tool_source_code\x18\x01 \x01(\tR\x0etoolSourceCode\"\x9d\x01\n\x1eParseCustomToolResponseSuccess\x12\x1b\n\ttool_name\x18\x01 \x01(\tR\x08toolName\x12)\n\x10tool_description\x18\x02 \x01(\tR\x0ftoolDescription\x12\x33\n\x16tool_input_schema_json\x18\x03 \x01(\tR\x13toolInputSchemaJson\"E\n\x1cParseCustomToolResponseError\x12%\n\x0e\x65rror_messages\x18\x01 \x03(\tR\rerrorMessages\"\xc1\x01\n\x17ParseCustomToolResponse\x12O\n\x07success\x18\x01 \x01(\x0b\x32\x33.code_interpreter.v1.ParseCustomToolResponseSuccessH\x00R\x07success\x12I\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x31.code_interpreter.v1.ParseCustomToolResponseErrorH\x00R\x05\x65rrorB\n\n\x08response\"r\n\x18\x45xecuteCustomToolRequest\x12(\n\x10tool_source_code\x18\x02 \x01(\tR\x0etoolSourceCode\x12&\n\x0ftool_input_json\x18\x03 \x01(\tR\rtoolInputJsonJ\x04\x08\x01\x10\x02\"L\n ExecuteCustomToolResponseSuccess\x12(\n\x10tool_output_json\x18\x01 \x01(\tR\x0etoolOutputJson\"8\n\x1e\x45xecuteCustomToolResponseError\x12\x16\n\x06stderr\x18\x01 \x01(\tR\x06stderr\"\xc7\x01\n\x19\x45xecuteCustomToolResponse\x12Q\n\x07success\x18\x01 \x01(\x0b\x32\x35.code_interpreter.v1.ExecuteCustomToolResponseSuccessH\x00R\x07success\x12K\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x33.code_interpreter.v1.ExecuteCustomToolResponseErrorH\x00R\x05\x65rrorB\n\n\x08response2\xd0\x02\n\x16\x43odeInterpreterService\x12T\n\x07\x45xecute\x12#.code_interpreter.v1.ExecuteRequest\x1a$.code_interpreter.v1.ExecuteResponse\x12l\n\x0fParseCustomTool\x12+.code_interpreter.v1.ParseCustomToolRequest\x1a,.code_interpreter.v1.ParseCustomToolResponse\x12r\n\x11\x45xecuteCustomTool\x12-.code_interpreter.v1.ExecuteCustomToolRequest\x1a..code_interpreter.v1.ExecuteCustomToolResponseb\x06proto3')

_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
Expand All @@ -38,40 +38,36 @@
DESCRIPTOR._loaded_options = None
_globals['_EXECUTEREQUEST_FILESENTRY']._loaded_options = None
_globals['_EXECUTEREQUEST_FILESENTRY']._serialized_options = b'8\001'
_globals['_EXECUTEREQUEST'].fields_by_name['executor_id']._loaded_options = None
_globals['_EXECUTEREQUEST'].fields_by_name['executor_id']._serialized_options = b'\272H\025r\0232\021^[a-z0-9-]{1,32}$'
_globals['_EXECUTEREQUEST'].fields_by_name['files']._loaded_options = None
_globals['_EXECUTEREQUEST'].fields_by_name['files']._serialized_options = b'\272H.\232\001+\"\rr\0132\t^/[^/].*$*\032r\0302\026^[0-9a-zA-Z_-]{1,255}$'
_globals['_EXECUTERESPONSE_FILESENTRY']._loaded_options = None
_globals['_EXECUTERESPONSE_FILESENTRY']._serialized_options = b'8\001'
_globals['_EXECUTERESPONSE'].fields_by_name['files']._loaded_options = None
_globals['_EXECUTERESPONSE'].fields_by_name['files']._serialized_options = b'\272H.\232\001+\"\rr\0132\t^/[^/].*$*\032r\0302\026^[0-9a-zA-Z_-]{1,255}$'
_globals['_EXECUTECUSTOMTOOLREQUEST'].fields_by_name['executor_id']._loaded_options = None
_globals['_EXECUTECUSTOMTOOLREQUEST'].fields_by_name['executor_id']._serialized_options = b'\272H\025r\0232\021^[a-z0-9-]{1,32}$'
_globals['_EXECUTEREQUEST']._serialized_start=111
_globals['_EXECUTEREQUEST']._serialized_end=398
_globals['_EXECUTEREQUEST_FILESENTRY']._serialized_start=342
_globals['_EXECUTEREQUEST_FILESENTRY']._serialized_end=398
_globals['_EXECUTERESPONSE']._serialized_start=401
_globals['_EXECUTERESPONSE']._serialized_end=675
_globals['_EXECUTERESPONSE_FILESENTRY']._serialized_start=342
_globals['_EXECUTERESPONSE_FILESENTRY']._serialized_end=398
_globals['_PARSECUSTOMTOOLREQUEST']._serialized_start=677
_globals['_PARSECUSTOMTOOLREQUEST']._serialized_end=743
_globals['_PARSECUSTOMTOOLRESPONSESUCCESS']._serialized_start=746
_globals['_PARSECUSTOMTOOLRESPONSESUCCESS']._serialized_end=903
_globals['_PARSECUSTOMTOOLRESPONSEERROR']._serialized_start=905
_globals['_PARSECUSTOMTOOLRESPONSEERROR']._serialized_end=974
_globals['_PARSECUSTOMTOOLRESPONSE']._serialized_start=977
_globals['_PARSECUSTOMTOOLRESPONSE']._serialized_end=1170
_globals['_EXECUTECUSTOMTOOLREQUEST']._serialized_start=1173
_globals['_EXECUTECUSTOMTOOLREQUEST']._serialized_end=1340
_globals['_EXECUTECUSTOMTOOLRESPONSESUCCESS']._serialized_start=1342
_globals['_EXECUTECUSTOMTOOLRESPONSESUCCESS']._serialized_end=1418
_globals['_EXECUTECUSTOMTOOLRESPONSEERROR']._serialized_start=1420
_globals['_EXECUTECUSTOMTOOLRESPONSEERROR']._serialized_end=1476
_globals['_EXECUTECUSTOMTOOLRESPONSE']._serialized_start=1479
_globals['_EXECUTECUSTOMTOOLRESPONSE']._serialized_end=1678
_globals['_CODEINTERPRETERSERVICE']._serialized_start=1681
_globals['_CODEINTERPRETERSERVICE']._serialized_end=2017
_globals['_EXECUTEREQUEST']._serialized_end=345
_globals['_EXECUTEREQUEST_FILESENTRY']._serialized_start=283
_globals['_EXECUTEREQUEST_FILESENTRY']._serialized_end=339
_globals['_EXECUTERESPONSE']._serialized_start=348
_globals['_EXECUTERESPONSE']._serialized_end=622
_globals['_EXECUTERESPONSE_FILESENTRY']._serialized_start=283
_globals['_EXECUTERESPONSE_FILESENTRY']._serialized_end=339
_globals['_PARSECUSTOMTOOLREQUEST']._serialized_start=624
_globals['_PARSECUSTOMTOOLREQUEST']._serialized_end=690
_globals['_PARSECUSTOMTOOLRESPONSESUCCESS']._serialized_start=693
_globals['_PARSECUSTOMTOOLRESPONSESUCCESS']._serialized_end=850
_globals['_PARSECUSTOMTOOLRESPONSEERROR']._serialized_start=852
_globals['_PARSECUSTOMTOOLRESPONSEERROR']._serialized_end=921
_globals['_PARSECUSTOMTOOLRESPONSE']._serialized_start=924
_globals['_PARSECUSTOMTOOLRESPONSE']._serialized_end=1117
_globals['_EXECUTECUSTOMTOOLREQUEST']._serialized_start=1119
_globals['_EXECUTECUSTOMTOOLREQUEST']._serialized_end=1233
_globals['_EXECUTECUSTOMTOOLRESPONSESUCCESS']._serialized_start=1235
_globals['_EXECUTECUSTOMTOOLRESPONSESUCCESS']._serialized_end=1311
_globals['_EXECUTECUSTOMTOOLRESPONSEERROR']._serialized_start=1313
_globals['_EXECUTECUSTOMTOOLRESPONSEERROR']._serialized_end=1369
_globals['_EXECUTECUSTOMTOOLRESPONSE']._serialized_start=1372
_globals['_EXECUTECUSTOMTOOLRESPONSE']._serialized_end=1571
_globals['_CODEINTERPRETERSERVICE']._serialized_start=1574
_globals['_CODEINTERPRETERSERVICE']._serialized_end=1910
# @@protoc_insertion_point(module_scope)
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,19 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map
DESCRIPTOR: _descriptor.FileDescriptor

class ExecuteRequest(_message.Message):
__slots__ = ("executor_id", "source_code", "files")
__slots__ = ("source_code", "files")
class FilesEntry(_message.Message):
__slots__ = ("key", "value")
KEY_FIELD_NUMBER: _ClassVar[int]
VALUE_FIELD_NUMBER: _ClassVar[int]
key: str
value: str
def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
EXECUTOR_ID_FIELD_NUMBER: _ClassVar[int]
SOURCE_CODE_FIELD_NUMBER: _ClassVar[int]
FILES_FIELD_NUMBER: _ClassVar[int]
executor_id: str
source_code: str
files: _containers.ScalarMap[str, str]
def __init__(self, executor_id: _Optional[str] = ..., source_code: _Optional[str] = ..., files: _Optional[_Mapping[str, str]] = ...) -> None: ...
def __init__(self, source_code: _Optional[str] = ..., files: _Optional[_Mapping[str, str]] = ...) -> None: ...

class ExecuteResponse(_message.Message):
__slots__ = ("stdout", "stderr", "exit_code", "files")
Expand Down Expand Up @@ -73,14 +71,12 @@ class ParseCustomToolResponse(_message.Message):
def __init__(self, success: _Optional[_Union[ParseCustomToolResponseSuccess, _Mapping]] = ..., error: _Optional[_Union[ParseCustomToolResponseError, _Mapping]] = ...) -> None: ...

class ExecuteCustomToolRequest(_message.Message):
__slots__ = ("executor_id", "tool_source_code", "tool_input_json")
EXECUTOR_ID_FIELD_NUMBER: _ClassVar[int]
__slots__ = ("tool_source_code", "tool_input_json")
TOOL_SOURCE_CODE_FIELD_NUMBER: _ClassVar[int]
TOOL_INPUT_JSON_FIELD_NUMBER: _ClassVar[int]
executor_id: str
tool_source_code: str
tool_input_json: str
def __init__(self, executor_id: _Optional[str] = ..., tool_source_code: _Optional[str] = ..., tool_input_json: _Optional[str] = ...) -> None: ...
def __init__(self, tool_source_code: _Optional[str] = ..., tool_input_json: _Optional[str] = ...) -> None: ...

class ExecuteCustomToolResponseSuccess(_message.Message):
__slots__ = ("tool_output_json",)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ import { Message, proto3 } from "@bufbuild/protobuf";
* @generated from message code_interpreter.v1.ExecuteRequest
*/
export class ExecuteRequest extends Message<ExecuteRequest> {
/**
* @generated from field: string executor_id = 1;
*/
executorId = "";

/**
* @generated from field: string source_code = 2;
*/
Expand All @@ -47,7 +42,6 @@ export class ExecuteRequest extends Message<ExecuteRequest> {
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "code_interpreter.v1.ExecuteRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "executor_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "source_code", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "files", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
]);
Expand Down Expand Up @@ -301,11 +295,6 @@ export class ParseCustomToolResponse extends Message<ParseCustomToolResponse> {
* @generated from message code_interpreter.v1.ExecuteCustomToolRequest
*/
export class ExecuteCustomToolRequest extends Message<ExecuteCustomToolRequest> {
/**
* @generated from field: string executor_id = 1;
*/
executorId = "";

/**
* @generated from field: string tool_source_code = 2;
*/
Expand All @@ -324,7 +313,6 @@ export class ExecuteCustomToolRequest extends Message<ExecuteCustomToolRequest>
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "code_interpreter.v1.ExecuteCustomToolRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "executor_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "tool_source_code", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "tool_input_json", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
Expand Down
4 changes: 2 additions & 2 deletions proto/code_interpreter/v1/code_interpreter_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ service CodeInterpreterService {
}

message ExecuteRequest {
string executor_id = 1 [(buf.validate.field).string.pattern = "^[a-z0-9-]{1,32}$"];
reserved 1; // executor_id not used anymore
string source_code = 2;
map<string, string> files = 3 [(buf.validate.field).map = {
keys: { string: { pattern: "^/[^/].*$" } }
Expand Down Expand Up @@ -65,7 +65,7 @@ message ParseCustomToolResponse {
}

message ExecuteCustomToolRequest {
string executor_id = 1 [(buf.validate.field).string.pattern = "^[a-z0-9-]{1,32}$"];
reserved 1; // executor_id not used anymore
string tool_source_code = 2;
string tool_input_json = 3;
}
Expand Down

0 comments on commit 79fbfe6

Please sign in to comment.