From 9e87d7904c23263261ad82c7adca1bcca4fee429 Mon Sep 17 00:00:00 2001 From: Olivier Francon Date: Thu, 24 Jul 2025 18:44:52 -0700 Subject: [PATCH 1/3] Release <5.0 requirement on protobuf for Python 3.13 compatibility --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 8c21dcd8e..6d3e8d696 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ # In-house dependencies leaf-common>=1.2.23 -leaf-server-common>=0.1.20 +leaf-server-common>=0.1.21 # These are needed for generating code from .proto files grpcio>=1.62.0 @@ -15,7 +15,7 @@ grpcio-health-checking>=1.62.0 grpcio-reflection>=1.62.0 grpcio-tools>=1.62.0 -protobuf>=4.25.3,<5.0 +protobuf>=4.25.3 # Downgraded secondary dependencies for error-free pip installs pyhocon>=0.3.60 From 3aba0434f1c28010d31cdb4ef1551b959c43e1ef Mon Sep 17 00:00:00 2001 From: Dan Fink Date: Fri, 25 Jul 2025 10:43:48 -0700 Subject: [PATCH 2/3] Regenerate grpc files with latest protobufs --- neuro_san/api/grpc/agent_pb2.py | 22 +++++-- neuro_san/api/grpc/agent_pb2_grpc.py | 75 ++++++++++++++++++++---- neuro_san/api/grpc/chat_pb2.py | 16 ++++- neuro_san/api/grpc/chat_pb2_grpc.py | 20 +++++++ neuro_san/api/grpc/concierge_pb2.py | 18 ++++-- neuro_san/api/grpc/concierge_pb2_grpc.py | 39 ++++++++++-- neuro_san/api/grpc/mime_data_pb2.py | 16 ++++- neuro_san/api/grpc/mime_data_pb2_grpc.py | 20 +++++++ 8 files changed, 194 insertions(+), 32 deletions(-) diff --git a/neuro_san/api/grpc/agent_pb2.py b/neuro_san/api/grpc/agent_pb2.py index 30ed0e8ab..ed9382cfa 100644 --- a/neuro_san/api/grpc/agent_pb2.py +++ b/neuro_san/api/grpc/agent_pb2.py @@ -11,13 +11,23 @@ # END COPYRIGHT # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: neuro_san/api/grpc/agent.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 6.31.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'neuro_san/api/grpc/agent.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -33,14 +43,14 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'neuro_san.api.grpc.agent_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Zegithub.com/cognizant-ai-lab/neuro_san/internal/gen/dev.cognizant_ai/neuro_san/api/grpc/agent/v1;agent' - _globals['_AGENTSERVICE'].methods_by_name['Function']._options = None + _globals['_AGENTSERVICE'].methods_by_name['Function']._loaded_options = None _globals['_AGENTSERVICE'].methods_by_name['Function']._serialized_options = b'\202\323\344\223\002\037\022\035/api/v1/{agent_name}/function' - _globals['_AGENTSERVICE'].methods_by_name['StreamingChat']._options = None + _globals['_AGENTSERVICE'].methods_by_name['StreamingChat']._loaded_options = None _globals['_AGENTSERVICE'].methods_by_name['StreamingChat']._serialized_options = b'\202\323\344\223\002(\"#/api/v1/{agent_name}/streaming_chat:\001*' - _globals['_AGENTSERVICE'].methods_by_name['Connectivity']._options = None + _globals['_AGENTSERVICE'].methods_by_name['Connectivity']._loaded_options = None _globals['_AGENTSERVICE'].methods_by_name['Connectivity']._serialized_options = b'\202\323\344\223\002#\022!/api/v1/{agent_name}/connectivity' _globals['_CHATFILTERTYPE']._serialized_start=1342 _globals['_CHATFILTERTYPE']._serialized_end=1397 diff --git a/neuro_san/api/grpc/agent_pb2_grpc.py b/neuro_san/api/grpc/agent_pb2_grpc.py index 769eee5f4..a67756d82 100644 --- a/neuro_san/api/grpc/agent_pb2_grpc.py +++ b/neuro_san/api/grpc/agent_pb2_grpc.py @@ -12,9 +12,29 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings from neuro_san.api.grpc import agent_pb2 as neuro__san_dot_api_dot_grpc_dot_agent__pb2 +GRPC_GENERATED_VERSION = '1.74.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + f' but the generated code in neuro_san/api/grpc/agent_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + class AgentServiceStub(object): """The service comprises all the exchanges to the backend in support of a single agent's @@ -33,17 +53,17 @@ def __init__(self, channel): '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/Function', request_serializer=neuro__san_dot_api_dot_grpc_dot_agent__pb2.FunctionRequest.SerializeToString, response_deserializer=neuro__san_dot_api_dot_grpc_dot_agent__pb2.FunctionResponse.FromString, - ) + _registered_method=True) self.StreamingChat = channel.unary_stream( '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/StreamingChat', request_serializer=neuro__san_dot_api_dot_grpc_dot_agent__pb2.ChatRequest.SerializeToString, response_deserializer=neuro__san_dot_api_dot_grpc_dot_agent__pb2.ChatResponse.FromString, - ) + _registered_method=True) self.Connectivity = channel.unary_unary( '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/Connectivity', request_serializer=neuro__san_dot_api_dot_grpc_dot_agent__pb2.ConnectivityRequest.SerializeToString, response_deserializer=neuro__san_dot_api_dot_grpc_dot_agent__pb2.ConnectivityResponse.FromString, - ) + _registered_method=True) class AgentServiceServicer(object): @@ -111,6 +131,7 @@ def add_AgentServiceServicer_to_server(servicer, server): generic_handler = grpc.method_handlers_generic_handler( 'dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService', rpc_method_handlers) # This class is part of an EXPERIMENTAL API. @@ -132,11 +153,21 @@ def Function(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/Function', + return grpc.experimental.unary_unary( + request, + target, + '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/Function', neuro__san_dot_api_dot_grpc_dot_agent__pb2.FunctionRequest.SerializeToString, neuro__san_dot_api_dot_grpc_dot_agent__pb2.FunctionResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def StreamingChat(request, @@ -149,11 +180,21 @@ def StreamingChat(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_stream(request, target, '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/StreamingChat', + return grpc.experimental.unary_stream( + request, + target, + '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/StreamingChat', neuro__san_dot_api_dot_grpc_dot_agent__pb2.ChatRequest.SerializeToString, neuro__san_dot_api_dot_grpc_dot_agent__pb2.ChatResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def Connectivity(request, @@ -166,8 +207,18 @@ def Connectivity(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/Connectivity', + return grpc.experimental.unary_unary( + request, + target, + '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/Connectivity', neuro__san_dot_api_dot_grpc_dot_agent__pb2.ConnectivityRequest.SerializeToString, neuro__san_dot_api_dot_grpc_dot_agent__pb2.ConnectivityResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/neuro_san/api/grpc/chat_pb2.py b/neuro_san/api/grpc/chat_pb2.py index 62424da17..f536da538 100644 --- a/neuro_san/api/grpc/chat_pb2.py +++ b/neuro_san/api/grpc/chat_pb2.py @@ -11,13 +11,23 @@ # END COPYRIGHT # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: neuro_san/api/grpc/chat.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 6.31.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'neuro_san/api/grpc/chat.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -32,8 +42,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'neuro_san.api.grpc.chat_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Zcgithub.com/cognizant-ai-lab/neuro_san/internal/gen/dev.cognizant_ai/neuro_san/api/grpc/chat/v1;chat' _globals['_ORIGIN']._serialized_start=141 _globals['_ORIGIN']._serialized_end=219 diff --git a/neuro_san/api/grpc/chat_pb2_grpc.py b/neuro_san/api/grpc/chat_pb2_grpc.py index 3c68d9425..c02b51e99 100644 --- a/neuro_san/api/grpc/chat_pb2_grpc.py +++ b/neuro_san/api/grpc/chat_pb2_grpc.py @@ -12,4 +12,24 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings + +GRPC_GENERATED_VERSION = '1.74.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + f' but the generated code in neuro_san/api/grpc/chat_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/neuro_san/api/grpc/concierge_pb2.py b/neuro_san/api/grpc/concierge_pb2.py index 39e9a8653..13aec4893 100644 --- a/neuro_san/api/grpc/concierge_pb2.py +++ b/neuro_san/api/grpc/concierge_pb2.py @@ -11,13 +11,23 @@ # END COPYRIGHT # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: neuro_san/api/grpc/concierge.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 6.31.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'neuro_san/api/grpc/concierge.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -31,10 +41,10 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'neuro_san.api.grpc.concierge_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Zmgithub.com/cognizant-ai-lab/neuro_san/internal/gen/dev.cognizant_ai/neuro_san/api/grpc/concierge/v1;concierge' - _globals['_CONCIERGESERVICE'].methods_by_name['List']._options = None + _globals['_CONCIERGESERVICE'].methods_by_name['List']._loaded_options = None _globals['_CONCIERGESERVICE'].methods_by_name['List']._serialized_options = b'\202\323\344\223\002\016\022\014/api/v1/list' _globals['_CONCIERGEREQUEST']._serialized_start=115 _globals['_CONCIERGEREQUEST']._serialized_end=133 diff --git a/neuro_san/api/grpc/concierge_pb2_grpc.py b/neuro_san/api/grpc/concierge_pb2_grpc.py index 75c25adc7..4e8377b5e 100644 --- a/neuro_san/api/grpc/concierge_pb2_grpc.py +++ b/neuro_san/api/grpc/concierge_pb2_grpc.py @@ -12,9 +12,29 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings from neuro_san.api.grpc import concierge_pb2 as neuro__san_dot_api_dot_grpc_dot_concierge__pb2 +GRPC_GENERATED_VERSION = '1.74.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + f' but the generated code in neuro_san/api/grpc/concierge_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + class ConciergeServiceStub(object): """The service provides system-wide information about resources available @@ -31,7 +51,7 @@ def __init__(self, channel): '/dev.cognizant_ai.neuro_san.api.grpc.concierge.ConciergeService/List', request_serializer=neuro__san_dot_api_dot_grpc_dot_concierge__pb2.ConciergeRequest.SerializeToString, response_deserializer=neuro__san_dot_api_dot_grpc_dot_concierge__pb2.ConciergeResponse.FromString, - ) + _registered_method=True) class ConciergeServiceServicer(object): @@ -58,6 +78,7 @@ def add_ConciergeServiceServicer_to_server(servicer, server): generic_handler = grpc.method_handlers_generic_handler( 'dev.cognizant_ai.neuro_san.api.grpc.concierge.ConciergeService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('dev.cognizant_ai.neuro_san.api.grpc.concierge.ConciergeService', rpc_method_handlers) # This class is part of an EXPERIMENTAL API. @@ -77,8 +98,18 @@ def List(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/dev.cognizant_ai.neuro_san.api.grpc.concierge.ConciergeService/List', + return grpc.experimental.unary_unary( + request, + target, + '/dev.cognizant_ai.neuro_san.api.grpc.concierge.ConciergeService/List', neuro__san_dot_api_dot_grpc_dot_concierge__pb2.ConciergeRequest.SerializeToString, neuro__san_dot_api_dot_grpc_dot_concierge__pb2.ConciergeResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/neuro_san/api/grpc/mime_data_pb2.py b/neuro_san/api/grpc/mime_data_pb2.py index 2d19401e1..2610f7b22 100644 --- a/neuro_san/api/grpc/mime_data_pb2.py +++ b/neuro_san/api/grpc/mime_data_pb2.py @@ -11,13 +11,23 @@ # END COPYRIGHT # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: neuro_san/api/grpc/mime_data.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 6.31.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'neuro_san/api/grpc/mime_data.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -30,8 +40,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'neuro_san.api.grpc.mime_data_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Zmgithub.com/cognizant-ai-lab/neuro_san/internal/gen/dev.cognizant_ai/neuro_san/api/grpc/mime_data/v1;mime_data' _globals['_MIMEDATA']._serialized_start=85 _globals['_MIMEDATA']._serialized_end=157 diff --git a/neuro_san/api/grpc/mime_data_pb2_grpc.py b/neuro_san/api/grpc/mime_data_pb2_grpc.py index 3c68d9425..7577ec0fd 100644 --- a/neuro_san/api/grpc/mime_data_pb2_grpc.py +++ b/neuro_san/api/grpc/mime_data_pb2_grpc.py @@ -12,4 +12,24 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings + +GRPC_GENERATED_VERSION = '1.74.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + f' but the generated code in neuro_san/api/grpc/mime_data_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) From 32a484c6e20f0b39646baabced482cbab62484ab Mon Sep 17 00:00:00 2001 From: Dan Fink Date: Fri, 25 Jul 2025 11:13:12 -0700 Subject: [PATCH 3/3] Don't do protobuf6 api just yet --- neuro_san/api/grpc/agent_pb2.py | 22 ++----- neuro_san/api/grpc/agent_pb2_grpc.py | 75 ++++-------------------- neuro_san/api/grpc/chat_pb2.py | 16 +---- neuro_san/api/grpc/chat_pb2_grpc.py | 20 ------- neuro_san/api/grpc/concierge_pb2.py | 18 ++---- neuro_san/api/grpc/concierge_pb2_grpc.py | 39 ++---------- neuro_san/api/grpc/mime_data_pb2.py | 16 +---- neuro_san/api/grpc/mime_data_pb2_grpc.py | 20 ------- 8 files changed, 32 insertions(+), 194 deletions(-) diff --git a/neuro_san/api/grpc/agent_pb2.py b/neuro_san/api/grpc/agent_pb2.py index ed9382cfa..30ed0e8ab 100644 --- a/neuro_san/api/grpc/agent_pb2.py +++ b/neuro_san/api/grpc/agent_pb2.py @@ -11,23 +11,13 @@ # END COPYRIGHT # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: neuro_san/api/grpc/agent.proto -# Protobuf Python Version: 6.31.1 +# Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 6, - 31, - 1, - '', - 'neuro_san/api/grpc/agent.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -43,14 +33,14 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'neuro_san.api.grpc.agent_pb2', _globals) -if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'Zegithub.com/cognizant-ai-lab/neuro_san/internal/gen/dev.cognizant_ai/neuro_san/api/grpc/agent/v1;agent' - _globals['_AGENTSERVICE'].methods_by_name['Function']._loaded_options = None + _globals['_AGENTSERVICE'].methods_by_name['Function']._options = None _globals['_AGENTSERVICE'].methods_by_name['Function']._serialized_options = b'\202\323\344\223\002\037\022\035/api/v1/{agent_name}/function' - _globals['_AGENTSERVICE'].methods_by_name['StreamingChat']._loaded_options = None + _globals['_AGENTSERVICE'].methods_by_name['StreamingChat']._options = None _globals['_AGENTSERVICE'].methods_by_name['StreamingChat']._serialized_options = b'\202\323\344\223\002(\"#/api/v1/{agent_name}/streaming_chat:\001*' - _globals['_AGENTSERVICE'].methods_by_name['Connectivity']._loaded_options = None + _globals['_AGENTSERVICE'].methods_by_name['Connectivity']._options = None _globals['_AGENTSERVICE'].methods_by_name['Connectivity']._serialized_options = b'\202\323\344\223\002#\022!/api/v1/{agent_name}/connectivity' _globals['_CHATFILTERTYPE']._serialized_start=1342 _globals['_CHATFILTERTYPE']._serialized_end=1397 diff --git a/neuro_san/api/grpc/agent_pb2_grpc.py b/neuro_san/api/grpc/agent_pb2_grpc.py index a67756d82..769eee5f4 100644 --- a/neuro_san/api/grpc/agent_pb2_grpc.py +++ b/neuro_san/api/grpc/agent_pb2_grpc.py @@ -12,29 +12,9 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc -import warnings from neuro_san.api.grpc import agent_pb2 as neuro__san_dot_api_dot_grpc_dot_agent__pb2 -GRPC_GENERATED_VERSION = '1.74.0' -GRPC_VERSION = grpc.__version__ -_version_not_supported = False - -try: - from grpc._utilities import first_version_is_lower - _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) -except ImportError: - _version_not_supported = True - -if _version_not_supported: - raise RuntimeError( - f'The grpc package installed is at version {GRPC_VERSION},' - + f' but the generated code in neuro_san/api/grpc/agent_pb2_grpc.py depends on' - + f' grpcio>={GRPC_GENERATED_VERSION}.' - + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' - + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' - ) - class AgentServiceStub(object): """The service comprises all the exchanges to the backend in support of a single agent's @@ -53,17 +33,17 @@ def __init__(self, channel): '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/Function', request_serializer=neuro__san_dot_api_dot_grpc_dot_agent__pb2.FunctionRequest.SerializeToString, response_deserializer=neuro__san_dot_api_dot_grpc_dot_agent__pb2.FunctionResponse.FromString, - _registered_method=True) + ) self.StreamingChat = channel.unary_stream( '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/StreamingChat', request_serializer=neuro__san_dot_api_dot_grpc_dot_agent__pb2.ChatRequest.SerializeToString, response_deserializer=neuro__san_dot_api_dot_grpc_dot_agent__pb2.ChatResponse.FromString, - _registered_method=True) + ) self.Connectivity = channel.unary_unary( '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/Connectivity', request_serializer=neuro__san_dot_api_dot_grpc_dot_agent__pb2.ConnectivityRequest.SerializeToString, response_deserializer=neuro__san_dot_api_dot_grpc_dot_agent__pb2.ConnectivityResponse.FromString, - _registered_method=True) + ) class AgentServiceServicer(object): @@ -131,7 +111,6 @@ def add_AgentServiceServicer_to_server(servicer, server): generic_handler = grpc.method_handlers_generic_handler( 'dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) - server.add_registered_method_handlers('dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService', rpc_method_handlers) # This class is part of an EXPERIMENTAL API. @@ -153,21 +132,11 @@ def Function(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary( - request, - target, - '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/Function', + return grpc.experimental.unary_unary(request, target, '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/Function', neuro__san_dot_api_dot_grpc_dot_agent__pb2.FunctionRequest.SerializeToString, neuro__san_dot_api_dot_grpc_dot_agent__pb2.FunctionResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - _registered_method=True) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def StreamingChat(request, @@ -180,21 +149,11 @@ def StreamingChat(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_stream( - request, - target, - '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/StreamingChat', + return grpc.experimental.unary_stream(request, target, '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/StreamingChat', neuro__san_dot_api_dot_grpc_dot_agent__pb2.ChatRequest.SerializeToString, neuro__san_dot_api_dot_grpc_dot_agent__pb2.ChatResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - _registered_method=True) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def Connectivity(request, @@ -207,18 +166,8 @@ def Connectivity(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary( - request, - target, - '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/Connectivity', + return grpc.experimental.unary_unary(request, target, '/dev.cognizant_ai.neuro_san.api.grpc.agent.AgentService/Connectivity', neuro__san_dot_api_dot_grpc_dot_agent__pb2.ConnectivityRequest.SerializeToString, neuro__san_dot_api_dot_grpc_dot_agent__pb2.ConnectivityResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - _registered_method=True) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/neuro_san/api/grpc/chat_pb2.py b/neuro_san/api/grpc/chat_pb2.py index f536da538..62424da17 100644 --- a/neuro_san/api/grpc/chat_pb2.py +++ b/neuro_san/api/grpc/chat_pb2.py @@ -11,23 +11,13 @@ # END COPYRIGHT # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: neuro_san/api/grpc/chat.proto -# Protobuf Python Version: 6.31.1 +# Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 6, - 31, - 1, - '', - 'neuro_san/api/grpc/chat.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -42,8 +32,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'neuro_san.api.grpc.chat_pb2', _globals) -if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'Zcgithub.com/cognizant-ai-lab/neuro_san/internal/gen/dev.cognizant_ai/neuro_san/api/grpc/chat/v1;chat' _globals['_ORIGIN']._serialized_start=141 _globals['_ORIGIN']._serialized_end=219 diff --git a/neuro_san/api/grpc/chat_pb2_grpc.py b/neuro_san/api/grpc/chat_pb2_grpc.py index c02b51e99..3c68d9425 100644 --- a/neuro_san/api/grpc/chat_pb2_grpc.py +++ b/neuro_san/api/grpc/chat_pb2_grpc.py @@ -12,24 +12,4 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc -import warnings - -GRPC_GENERATED_VERSION = '1.74.0' -GRPC_VERSION = grpc.__version__ -_version_not_supported = False - -try: - from grpc._utilities import first_version_is_lower - _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) -except ImportError: - _version_not_supported = True - -if _version_not_supported: - raise RuntimeError( - f'The grpc package installed is at version {GRPC_VERSION},' - + f' but the generated code in neuro_san/api/grpc/chat_pb2_grpc.py depends on' - + f' grpcio>={GRPC_GENERATED_VERSION}.' - + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' - + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' - ) diff --git a/neuro_san/api/grpc/concierge_pb2.py b/neuro_san/api/grpc/concierge_pb2.py index 13aec4893..39e9a8653 100644 --- a/neuro_san/api/grpc/concierge_pb2.py +++ b/neuro_san/api/grpc/concierge_pb2.py @@ -11,23 +11,13 @@ # END COPYRIGHT # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: neuro_san/api/grpc/concierge.proto -# Protobuf Python Version: 6.31.1 +# Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 6, - 31, - 1, - '', - 'neuro_san/api/grpc/concierge.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -41,10 +31,10 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'neuro_san.api.grpc.concierge_pb2', _globals) -if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'Zmgithub.com/cognizant-ai-lab/neuro_san/internal/gen/dev.cognizant_ai/neuro_san/api/grpc/concierge/v1;concierge' - _globals['_CONCIERGESERVICE'].methods_by_name['List']._loaded_options = None + _globals['_CONCIERGESERVICE'].methods_by_name['List']._options = None _globals['_CONCIERGESERVICE'].methods_by_name['List']._serialized_options = b'\202\323\344\223\002\016\022\014/api/v1/list' _globals['_CONCIERGEREQUEST']._serialized_start=115 _globals['_CONCIERGEREQUEST']._serialized_end=133 diff --git a/neuro_san/api/grpc/concierge_pb2_grpc.py b/neuro_san/api/grpc/concierge_pb2_grpc.py index 4e8377b5e..75c25adc7 100644 --- a/neuro_san/api/grpc/concierge_pb2_grpc.py +++ b/neuro_san/api/grpc/concierge_pb2_grpc.py @@ -12,29 +12,9 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc -import warnings from neuro_san.api.grpc import concierge_pb2 as neuro__san_dot_api_dot_grpc_dot_concierge__pb2 -GRPC_GENERATED_VERSION = '1.74.0' -GRPC_VERSION = grpc.__version__ -_version_not_supported = False - -try: - from grpc._utilities import first_version_is_lower - _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) -except ImportError: - _version_not_supported = True - -if _version_not_supported: - raise RuntimeError( - f'The grpc package installed is at version {GRPC_VERSION},' - + f' but the generated code in neuro_san/api/grpc/concierge_pb2_grpc.py depends on' - + f' grpcio>={GRPC_GENERATED_VERSION}.' - + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' - + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' - ) - class ConciergeServiceStub(object): """The service provides system-wide information about resources available @@ -51,7 +31,7 @@ def __init__(self, channel): '/dev.cognizant_ai.neuro_san.api.grpc.concierge.ConciergeService/List', request_serializer=neuro__san_dot_api_dot_grpc_dot_concierge__pb2.ConciergeRequest.SerializeToString, response_deserializer=neuro__san_dot_api_dot_grpc_dot_concierge__pb2.ConciergeResponse.FromString, - _registered_method=True) + ) class ConciergeServiceServicer(object): @@ -78,7 +58,6 @@ def add_ConciergeServiceServicer_to_server(servicer, server): generic_handler = grpc.method_handlers_generic_handler( 'dev.cognizant_ai.neuro_san.api.grpc.concierge.ConciergeService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) - server.add_registered_method_handlers('dev.cognizant_ai.neuro_san.api.grpc.concierge.ConciergeService', rpc_method_handlers) # This class is part of an EXPERIMENTAL API. @@ -98,18 +77,8 @@ def List(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary( - request, - target, - '/dev.cognizant_ai.neuro_san.api.grpc.concierge.ConciergeService/List', + return grpc.experimental.unary_unary(request, target, '/dev.cognizant_ai.neuro_san.api.grpc.concierge.ConciergeService/List', neuro__san_dot_api_dot_grpc_dot_concierge__pb2.ConciergeRequest.SerializeToString, neuro__san_dot_api_dot_grpc_dot_concierge__pb2.ConciergeResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - _registered_method=True) + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/neuro_san/api/grpc/mime_data_pb2.py b/neuro_san/api/grpc/mime_data_pb2.py index 2610f7b22..2d19401e1 100644 --- a/neuro_san/api/grpc/mime_data_pb2.py +++ b/neuro_san/api/grpc/mime_data_pb2.py @@ -11,23 +11,13 @@ # END COPYRIGHT # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: neuro_san/api/grpc/mime_data.proto -# Protobuf Python Version: 6.31.1 +# Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 6, - 31, - 1, - '', - 'neuro_san/api/grpc/mime_data.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -40,8 +30,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'neuro_san.api.grpc.mime_data_pb2', _globals) -if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'Zmgithub.com/cognizant-ai-lab/neuro_san/internal/gen/dev.cognizant_ai/neuro_san/api/grpc/mime_data/v1;mime_data' _globals['_MIMEDATA']._serialized_start=85 _globals['_MIMEDATA']._serialized_end=157 diff --git a/neuro_san/api/grpc/mime_data_pb2_grpc.py b/neuro_san/api/grpc/mime_data_pb2_grpc.py index 7577ec0fd..3c68d9425 100644 --- a/neuro_san/api/grpc/mime_data_pb2_grpc.py +++ b/neuro_san/api/grpc/mime_data_pb2_grpc.py @@ -12,24 +12,4 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc -import warnings - -GRPC_GENERATED_VERSION = '1.74.0' -GRPC_VERSION = grpc.__version__ -_version_not_supported = False - -try: - from grpc._utilities import first_version_is_lower - _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) -except ImportError: - _version_not_supported = True - -if _version_not_supported: - raise RuntimeError( - f'The grpc package installed is at version {GRPC_VERSION},' - + f' but the generated code in neuro_san/api/grpc/mime_data_pb2_grpc.py depends on' - + f' grpcio>={GRPC_GENERATED_VERSION}.' - + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' - + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' - )