diff --git a/app/app/v1alpha/app_pb2.py b/app/app/v1alpha/app_pb2.py index 9119dc8..415d7d4 100644 --- a/app/app/v1alpha/app_pb2.py +++ b/app/app/v1alpha/app_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19\x61pp/app/v1alpha/app.proto\x12\x0f\x61pp.app.v1alpha\x1a+common/healthcheck/v1beta/healthcheck.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x95\x01\n\x0fLivenessRequest\x12i\n\x14health_check_request\x18\x01 \x01(\x0b\x32-.common.healthcheck.v1beta.HealthCheckRequestB\x03\xe0\x41\x01H\x00R\x12healthCheckRequest\x88\x01\x01\x42\x17\n\x15_health_check_request\"{\n\x10LivenessResponse\x12g\n\x15health_check_response\x18\x01 \x01(\x0b\x32..common.healthcheck.v1beta.HealthCheckResponseB\x03\xe0\x41\x03R\x13healthCheckResponse\"\x96\x01\n\x10ReadinessRequest\x12i\n\x14health_check_request\x18\x01 \x01(\x0b\x32-.common.healthcheck.v1beta.HealthCheckRequestB\x03\xe0\x41\x01H\x00R\x12healthCheckRequest\x88\x01\x01\x42\x17\n\x15_health_check_request\"|\n\x11ReadinessResponse\x12g\n\x15health_check_response\x18\x01 \x01(\x0b\x32..common.healthcheck.v1beta.HealthCheckResponseB\x03\xe0\x41\x03R\x13healthCheckResponse\"\xeb\x03\n\x03\x41pp\x12\x1a\n\x06\x61pp_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x05\x61ppId\x12%\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01R\x0b\x64\x65scription\x12@\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03R\ncreateTime\x12@\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03R\nupdateTime\x12 \n\towner_uid\x18\x05 \x01(\tB\x03\xe0\x41\x03R\x08ownerUid\x12\x17\n\x04tags\x18\x06 \x03(\tB\x03\xe0\x41\x01R\x04tags\x12X\n\x10\x61i_assistant_app\x18\x07 \x01(\x0b\x32\'.app.app.v1alpha.AIAssistantAppMetadataB\x03\xe0\x41\x03H\x00R\x0e\x61iAssistantApp\x12\x38\n\x08\x61pp_type\x18\x08 \x01(\x0e\x32\x18.app.app.v1alpha.AppTypeB\x03\xe0\x41\x03R\x07\x61ppType\x12\x1c\n\x07\x61pp_uid\x18\t \x01(\tB\x03\xe0\x41\x03R\x06\x61ppUid\x12$\n\x0b\x63reator_uid\x18\n \x01(\tB\x03\xe0\x41\x03R\ncreatorUidB\n\n\x08metadata\"\x88\x01\n\x16\x41IAssistantAppMetadata\x12$\n\x0b\x63\x61talog_uid\x18\x01 \x01(\tB\x03\xe0\x41\x02R\ncatalogUid\x12\x18\n\x05top_k\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02R\x04topK\x12.\n\x10\x63onversation_uid\x18\x03 \x01(\tB\x03\xe0\x41\x02R\x0f\x63onversationUid\"\x8f\x01\n\x10\x43reateAppRequest\x12&\n\x0cnamespace_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0bnamespaceId\x12\x13\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x02id\x12%\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x0b\x64\x65scription\x12\x17\n\x04tags\x18\x04 \x03(\tB\x03\xe0\x41\x01R\x04tags\"@\n\x11\x43reateAppResponse\x12+\n\x03\x61pp\x18\x01 \x01(\x0b\x32\x14.app.app.v1alpha.AppB\x03\xe0\x41\x03R\x03\x61pp\"9\n\x0fListAppsRequest\x12&\n\x0cnamespace_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0bnamespaceId\"A\n\x10ListAppsResponse\x12-\n\x04\x61pps\x18\x01 \x03(\x0b\x32\x14.app.app.v1alpha.AppB\x03\xe0\x41\x03R\x04\x61pps\"\xd7\x02\n\x10UpdateAppRequest\x12&\n\x0cnamespace_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0bnamespaceId\x12\x1a\n\x06\x61pp_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x05\x61ppId\x12!\n\nnew_app_id\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x08newAppId\x12,\n\x0fnew_description\x18\x04 \x01(\tB\x03\xe0\x41\x01R\x0enewDescription\x12\x1e\n\x08new_tags\x18\x05 \x03(\tB\x03\xe0\x41\x01R\x07newTags\x12L\n!last_ai_assistant_app_catalog_uid\x18\x06 \x01(\tB\x03\xe0\x41\x01R\x1clastAiAssistantAppCatalogUid\x12@\n\x1blast_ai_assistant_app_top_k\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01R\x16lastAiAssistantAppTopK\"@\n\x11UpdateAppResponse\x12+\n\x03\x61pp\x18\x01 \x01(\x0b\x32\x14.app.app.v1alpha.AppB\x03\xe0\x41\x03R\x03\x61pp\"V\n\x10\x44\x65leteAppRequest\x12&\n\x0cnamespace_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0bnamespaceId\x12\x1a\n\x06\x61pp_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x05\x61ppId\"\x13\n\x11\x44\x65leteAppResponse\"\x9a\x02\n%UpdateAIAssistantAppPlaygroundRequest\x12&\n\x0cnamespace_id\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x0bnamespaceId\x12\x1a\n\x06\x61pp_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x05\x61ppId\x12\x39\n\x17last_ai_app_catalog_uid\x18\x03 \x01(\tB\x03\xe0\x41\x01R\x13lastAiAppCatalogUid\x12-\n\x11last_ai_app_top_k\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01R\rlastAiAppTopK\x12\x43\n\x1clast_ai_app_conversation_uid\x18\x05 \x01(\tB\x03\xe0\x41\x01R\x18lastAiAppConversationUid\"(\n&UpdateAIAssistantAppPlaygroundResponse*>\n\x07\x41ppType\x12\x18\n\x14\x41PP_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41PP_TYPE_AI_ASSISTANT\x10\x01\x42\xbb\x01\n\x13\x63om.app.app.v1alphaB\x08\x41ppProtoP\x01Z\n\x07\x41ppType\x12\x18\n\x14\x41PP_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41PP_TYPE_AI_ASSISTANT\x10\x01\x42\xbb\x01\n\x13\x63om.app.app.v1alphaB\x08\x41ppProtoP\x01Z None: ... global___UpdateAIAssistantAppPlaygroundResponse = UpdateAIAssistantAppPlaygroundResponse + +@typing_extensions.final +class RestartPlaygroundConversationRequest(google.protobuf.message.Message): + """RestartPlaygroundConversationRequest represents a request to restart a playground conversation.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_ID_FIELD_NUMBER: builtins.int + APP_ID_FIELD_NUMBER: builtins.int + namespace_id: builtins.str + """The namespace id.""" + app_id: builtins.str + """The app id.""" + def __init__( + self, + *, + namespace_id: builtins.str = ..., + app_id: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["app_id", b"app_id", "namespace_id", b"namespace_id"]) -> None: ... + +global___RestartPlaygroundConversationRequest = RestartPlaygroundConversationRequest + +@typing_extensions.final +class RestartPlaygroundConversationResponse(google.protobuf.message.Message): + """RestartPlaygroundConversationResponse represents a response for restarting a playground conversation.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CONVERSATION_UID_FIELD_NUMBER: builtins.int + CONVERSATION_ID_FIELD_NUMBER: builtins.int + conversation_uid: builtins.str + """Conversation uid""" + conversation_id: builtins.str + """Conversation id. this is generated by the server.""" + def __init__( + self, + *, + conversation_uid: builtins.str = ..., + conversation_id: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["conversation_id", b"conversation_id", "conversation_uid", b"conversation_uid"]) -> None: ... + +global___RestartPlaygroundConversationResponse = RestartPlaygroundConversationResponse + +@typing_extensions.final +class GetPlaygroundConversationRequest(google.protobuf.message.Message): + """GetPlaygroundConversationRequest represents a request to get a playground conversation.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAMESPACE_ID_FIELD_NUMBER: builtins.int + APP_ID_FIELD_NUMBER: builtins.int + namespace_id: builtins.str + """The namespace id.""" + app_id: builtins.str + """The app id.""" + def __init__( + self, + *, + namespace_id: builtins.str = ..., + app_id: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["app_id", b"app_id", "namespace_id", b"namespace_id"]) -> None: ... + +global___GetPlaygroundConversationRequest = GetPlaygroundConversationRequest + +@typing_extensions.final +class GetPlaygroundConversationResponse(google.protobuf.message.Message): + """GetPlaygroundConversationResponse represents a response for getting a playground conversation.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CONVERSATION_UID_FIELD_NUMBER: builtins.int + CONVERSATION_ID_FIELD_NUMBER: builtins.int + conversation_uid: builtins.str + """The conversation uid.""" + conversation_id: builtins.str + """The conversation id.""" + def __init__( + self, + *, + conversation_uid: builtins.str = ..., + conversation_id: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["conversation_id", b"conversation_id", "conversation_uid", b"conversation_uid"]) -> None: ... + +global___GetPlaygroundConversationResponse = GetPlaygroundConversationResponse diff --git a/app/app/v1alpha/app_public_service_pb2.py b/app/app/v1alpha/app_public_service_pb2.py index c0022e9..a1e07ba 100644 --- a/app/app/v1alpha/app_public_service_pb2.py +++ b/app/app/v1alpha/app_public_service_pb2.py @@ -18,7 +18,7 @@ from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(app/app/v1alpha/app_public_service.proto\x12\x0f\x61pp.app.v1alpha\x1a\x19\x61pp/app/v1alpha/app.proto\x1a\"app/app/v1alpha/conversation.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/api/visibility.proto\x1a.protoc-gen-openapiv2/options/annotations.proto2\xc4\x16\n\x10\x41ppPublicService\x12\x93\x01\n\x08Liveness\x12 .app.app.v1alpha.LivenessRequest\x1a!.app.app.v1alpha.LivenessResponse\"B\xfa\xd2\xe4\x93\x02\n\x12\x08INTERNAL\x82\xd3\xe4\x93\x02,\x12\x13/v1alpha/__livenessZ\x15\x12\x13/v1alpha/health/app\x12\x96\x01\n\tReadiness\x12!.app.app.v1alpha.ReadinessRequest\x1a\".app.app.v1alpha.ReadinessResponse\"B\xfa\xd2\xe4\x93\x02\n\x12\x08INTERNAL\x82\xd3\xe4\x93\x02,\x12\x14/v1alpha/__readinessZ\x14\x12\x12/v1alpha/ready/app\x12\x8e\x01\n\tCreateApp\x12!.app.app.v1alpha.CreateAppRequest\x1a\".app.app.v1alpha.CreateAppResponse\":\x92\x41\x05\n\x03\x41pp\x82\xd3\xe4\x93\x02,\"\'/v1alpha/namespaces/{namespace_id}/apps:\x01*\x12\x88\x01\n\x08ListApps\x12 .app.app.v1alpha.ListAppsRequest\x1a!.app.app.v1alpha.ListAppsResponse\"7\x92\x41\x05\n\x03\x41pp\x82\xd3\xe4\x93\x02)\x12\'/v1alpha/namespaces/{namespace_id}/apps\x12\x97\x01\n\tUpdateApp\x12!.app.app.v1alpha.UpdateAppRequest\x1a\".app.app.v1alpha.UpdateAppResponse\"C\x92\x41\x05\n\x03\x41pp\x82\xd3\xe4\x93\x02\x35\x1a\x30/v1alpha/namespaces/{namespace_id}/apps/{app_id}:\x01*\x12\x94\x01\n\tDeleteApp\x12!.app.app.v1alpha.DeleteAppRequest\x1a\".app.app.v1alpha.DeleteAppResponse\"@\x92\x41\x05\n\x03\x41pp\x82\xd3\xe4\x93\x02\x32*0/v1alpha/namespaces/{namespace_id}/apps/{app_id}\x12\xc9\x01\n\x12\x43reateConversation\x12*.app.app.v1alpha.CreateConversationRequest\x1a+.app.app.v1alpha.CreateConversationResponse\"Z\x92\x41\x0e\n\x0c\x43onversation\x82\xd3\xe4\x93\x02\x43\">/v1alpha/namespaces/{namespace_id}/apps/{app_id}/conversations:\x01*\x12\xc3\x01\n\x11ListConversations\x12).app.app.v1alpha.ListConversationsRequest\x1a*.app.app.v1alpha.ListConversationsResponse\"W\x92\x41\x0e\n\x0c\x43onversation\x82\xd3\xe4\x93\x02@\x12>/v1alpha/namespaces/{namespace_id}/apps/{app_id}/conversations\x12\xdb\x01\n\x12UpdateConversation\x12*.app.app.v1alpha.UpdateConversationRequest\x1a+.app.app.v1alpha.UpdateConversationResponse\"l\x92\x41\x0e\n\x0c\x43onversation\x82\xd3\xe4\x93\x02U\x1aP/v1alpha/namespaces/{namespace_id}/apps/{app_id}/conversations/{conversation_id}:\x01*\x12\xd8\x01\n\x12\x44\x65leteConversation\x12*.app.app.v1alpha.DeleteConversationRequest\x1a+.app.app.v1alpha.DeleteConversationResponse\"i\x92\x41\x0e\n\x0c\x43onversation\x82\xd3\xe4\x93\x02R*P/v1alpha/namespaces/{namespace_id}/apps/{app_id}/conversations/{conversation_id}\x12\xd0\x01\n\rCreateMessage\x12%.app.app.v1alpha.CreateMessageRequest\x1a&.app.app.v1alpha.CreateMessageResponse\"p\x92\x41\t\n\x07Message\x82\xd3\xe4\x93\x02^\"Y/v1alpha/namespaces/{namespace_id}/apps/{app_id}/conversations/{conversation_id}/messages:\x01*\x12\xca\x01\n\x0cListMessages\x12$.app.app.v1alpha.ListMessagesRequest\x1a%.app.app.v1alpha.ListMessagesResponse\"m\x92\x41\t\n\x07Message\x82\xd3\xe4\x93\x02[\x12Y/v1alpha/namespaces/{namespace_id}/apps/{app_id}/conversations/{conversation_id}/messages\x12\xde\x01\n\rUpdateMessage\x12%.app.app.v1alpha.UpdateMessageRequest\x1a&.app.app.v1alpha.UpdateMessageResponse\"~\x92\x41\t\n\x07Message\x82\xd3\xe4\x93\x02l\x1ag/v1alpha/namespaces/{namespace_id}/apps/{app_id}/conversations/{conversation_id}/messages/{message_uid}:\x01*\x12\xdb\x01\n\rDeleteMessage\x12%.app.app.v1alpha.DeleteMessageRequest\x1a&.app.app.v1alpha.DeleteMessageResponse\"{\x92\x41\t\n\x07Message\x82\xd3\xe4\x93\x02i*g/v1alpha/namespaces/{namespace_id}/apps/{app_id}/conversations/{conversation_id}/messages/{message_uid}\x12\xee\x01\n\x1eUpdateAIAssistantAppPlayground\x12\x36.app.app.v1alpha.UpdateAIAssistantAppPlaygroundRequest\x1a\x37.app.app.v1alpha.UpdateAIAssistantAppPlaygroundResponse\"[\x92\x41\x05\n\x03\x41pp\x82\xd3\xe4\x93\x02M\x1aH/v1alpha/namespaces/{namespace_id}/apps/{app_id}/ai_assistant_playground:\x01*\x1a\x19\x92\x41\x16\x12\x14Public App endpointsB\xc8\x01\n\x13\x63om.app.app.v1alphaB\x15\x41ppPublicServiceProtoP\x01Z/v1alpha/namespaces/{namespace_id}/apps/{app_id}/conversations:\x01*\x12\xc3\x01\n\x11ListConversations\x12).app.app.v1alpha.ListConversationsRequest\x1a*.app.app.v1alpha.ListConversationsResponse\"W\x92\x41\x0e\n\x0c\x43onversation\x82\xd3\xe4\x93\x02@\x12>/v1alpha/namespaces/{namespace_id}/apps/{app_id}/conversations\x12\xdb\x01\n\x12UpdateConversation\x12*.app.app.v1alpha.UpdateConversationRequest\x1a+.app.app.v1alpha.UpdateConversationResponse\"l\x92\x41\x0e\n\x0c\x43onversation\x82\xd3\xe4\x93\x02U\x1aP/v1alpha/namespaces/{namespace_id}/apps/{app_id}/conversations/{conversation_id}:\x01*\x12\xd8\x01\n\x12\x44\x65leteConversation\x12*.app.app.v1alpha.DeleteConversationRequest\x1a+.app.app.v1alpha.DeleteConversationResponse\"i\x92\x41\x0e\n\x0c\x43onversation\x82\xd3\xe4\x93\x02R*P/v1alpha/namespaces/{namespace_id}/apps/{app_id}/conversations/{conversation_id}\x12\xd0\x01\n\rCreateMessage\x12%.app.app.v1alpha.CreateMessageRequest\x1a&.app.app.v1alpha.CreateMessageResponse\"p\x92\x41\t\n\x07Message\x82\xd3\xe4\x93\x02^\"Y/v1alpha/namespaces/{namespace_id}/apps/{app_id}/conversations/{conversation_id}/messages:\x01*\x12\xca\x01\n\x0cListMessages\x12$.app.app.v1alpha.ListMessagesRequest\x1a%.app.app.v1alpha.ListMessagesResponse\"m\x92\x41\t\n\x07Message\x82\xd3\xe4\x93\x02[\x12Y/v1alpha/namespaces/{namespace_id}/apps/{app_id}/conversations/{conversation_id}/messages\x12\xde\x01\n\rUpdateMessage\x12%.app.app.v1alpha.UpdateMessageRequest\x1a&.app.app.v1alpha.UpdateMessageResponse\"~\x92\x41\t\n\x07Message\x82\xd3\xe4\x93\x02l\x1ag/v1alpha/namespaces/{namespace_id}/apps/{app_id}/conversations/{conversation_id}/messages/{message_uid}:\x01*\x12\xdb\x01\n\rDeleteMessage\x12%.app.app.v1alpha.DeleteMessageRequest\x1a&.app.app.v1alpha.DeleteMessageResponse\"{\x92\x41\t\n\x07Message\x82\xd3\xe4\x93\x02i*g/v1alpha/namespaces/{namespace_id}/apps/{app_id}/conversations/{conversation_id}/messages/{message_uid}\x12\xf5\x01\n\x1eUpdateAIAssistantAppPlayground\x12\x36.app.app.v1alpha.UpdateAIAssistantAppPlaygroundRequest\x1a\x37.app.app.v1alpha.UpdateAIAssistantAppPlaygroundResponse\"b\x92\x41\x0c\n\nPlayground\x82\xd3\xe4\x93\x02M\x1aH/v1alpha/namespaces/{namespace_id}/apps/{app_id}/ai_assistant_playground:\x01*\x12\xf0\x01\n\x19GetPlaygroundConversation\x12\x31.app.app.v1alpha.GetPlaygroundConversationRequest\x1a\x32.app.app.v1alpha.GetPlaygroundConversationResponse\"l\x92\x41\x0c\n\nPlayground\x82\xd3\xe4\x93\x02W\x12U/v1alpha/namespaces/{namespace_id}/apps/{app_id}/ai_assistant_playground/conversation\x12\xf7\x01\n\x1dRestartPlaygroundConversation\x12\x35.app.app.v1alpha.RestartPlaygroundConversationRequest\x1a\x36.app.app.v1alpha.RestartPlaygroundConversationResponse\"g\x92\x41\x0c\n\nPlayground\x82\xd3\xe4\x93\x02R\"P/v1alpha/namespaces/{namespace_id}/apps/{app_id}/ai_assistant_playground/restart\x1a\x19\x92\x41\x16\x12\x14Public App endpointsB\xc8\x01\n\x13\x63om.app.app.v1alphaB\x15\x41ppPublicServiceProtoP\x01Z typing.Union[app.app.v1alpha.app_pb2.UpdateAIAssistantAppPlaygroundResponse, collections.abc.Awaitable[app.app.v1alpha.app_pb2.UpdateAIAssistantAppPlaygroundResponse]]: """Update AI assistant app playground""" + @abc.abstractmethod + def GetPlaygroundConversation( + self, + request: app.app.v1alpha.app_pb2.GetPlaygroundConversationRequest, + context: _ServicerContext, + ) -> typing.Union[app.app.v1alpha.app_pb2.GetPlaygroundConversationResponse, collections.abc.Awaitable[app.app.v1alpha.app_pb2.GetPlaygroundConversationResponse]]: + """Get Playground Conversation + + get the latest conversation of auth user(e.g. login user and api key user) + """ + @abc.abstractmethod + def RestartPlaygroundConversation( + self, + request: app.app.v1alpha.app_pb2.RestartPlaygroundConversationRequest, + context: _ServicerContext, + ) -> typing.Union[app.app.v1alpha.app_pb2.RestartPlaygroundConversationResponse, collections.abc.Awaitable[app.app.v1alpha.app_pb2.RestartPlaygroundConversationResponse]]: + """Restart Playground Conversation + + create a new conversation and use the auth user uid as creator uid and auto + generate a new conversation id on the behalf of auth user. + """ def add_AppPublicServiceServicer_to_server(servicer: AppPublicServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...