Skip to content

Commit 9745860

Browse files
committed
chore: auto-gen by protobufs
triggered by commit: instill-ai/protobufs@56f6036
1 parent 2282fb0 commit 9745860

File tree

5 files changed

+197
-43
lines changed

5 files changed

+197
-43
lines changed

app/app/v1alpha/app_public_service_pb2.py

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/app/v1alpha/app_public_service_pb2_grpc.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ def __init__(self, channel):
102102
request_serializer=app_dot_app_dot_v1alpha_dot_app__pb2.RestartPlaygroundConversationRequest.SerializeToString,
103103
response_deserializer=app_dot_app_dot_v1alpha_dot_app__pb2.RestartPlaygroundConversationResponse.FromString,
104104
)
105+
self.Chat = channel.unary_stream(
106+
'/app.app.v1alpha.AppPublicService/Chat',
107+
request_serializer=app_dot_app_dot_v1alpha_dot_conversation__pb2.ChatRequest.SerializeToString,
108+
response_deserializer=app_dot_app_dot_v1alpha_dot_conversation__pb2.ChatResponse.FromString,
109+
)
105110

106111

107112
class AppPublicServiceServicer(object):
@@ -237,6 +242,17 @@ def RestartPlaygroundConversation(self, request, context):
237242
context.set_details('Method not implemented!')
238243
raise NotImplementedError('Method not implemented!')
239244

245+
def Chat(self, request, context):
246+
"""Chat
247+
248+
Chat sends a message asynchronously and streams back the response.
249+
This method is intended for real-time conversation with a chatbot
250+
and the response needs to be processed incrementally.
251+
"""
252+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
253+
context.set_details('Method not implemented!')
254+
raise NotImplementedError('Method not implemented!')
255+
240256

241257
def add_AppPublicServiceServicer_to_server(servicer, server):
242258
rpc_method_handlers = {
@@ -325,6 +341,11 @@ def add_AppPublicServiceServicer_to_server(servicer, server):
325341
request_deserializer=app_dot_app_dot_v1alpha_dot_app__pb2.RestartPlaygroundConversationRequest.FromString,
326342
response_serializer=app_dot_app_dot_v1alpha_dot_app__pb2.RestartPlaygroundConversationResponse.SerializeToString,
327343
),
344+
'Chat': grpc.unary_stream_rpc_method_handler(
345+
servicer.Chat,
346+
request_deserializer=app_dot_app_dot_v1alpha_dot_conversation__pb2.ChatRequest.FromString,
347+
response_serializer=app_dot_app_dot_v1alpha_dot_conversation__pb2.ChatResponse.SerializeToString,
348+
),
328349
}
329350
generic_handler = grpc.method_handlers_generic_handler(
330351
'app.app.v1alpha.AppPublicService', rpc_method_handlers)
@@ -625,3 +646,20 @@ def RestartPlaygroundConversation(request,
625646
app_dot_app_dot_v1alpha_dot_app__pb2.RestartPlaygroundConversationResponse.FromString,
626647
options, channel_credentials,
627648
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
649+
650+
@staticmethod
651+
def Chat(request,
652+
target,
653+
options=(),
654+
channel_credentials=None,
655+
call_credentials=None,
656+
insecure=False,
657+
compression=None,
658+
wait_for_ready=None,
659+
timeout=None,
660+
metadata=None):
661+
return grpc.experimental.unary_stream(request, target, '/app.app.v1alpha.AppPublicService/Chat',
662+
app_dot_app_dot_v1alpha_dot_conversation__pb2.ChatRequest.SerializeToString,
663+
app_dot_app_dot_v1alpha_dot_conversation__pb2.ChatResponse.FromString,
664+
options, channel_credentials,
665+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

app/app/v1alpha/app_public_service_pb2_grpc.pyi

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,16 @@ class AppPublicServiceStub:
122122
create a new conversation and use the auth user uid as creator uid and auto
123123
generate a new conversation id on the behalf of auth user.
124124
"""
125+
Chat: grpc.UnaryStreamMultiCallable[
126+
app.app.v1alpha.conversation_pb2.ChatRequest,
127+
app.app.v1alpha.conversation_pb2.ChatResponse,
128+
]
129+
"""Chat
130+
131+
Chat sends a message asynchronously and streams back the response.
132+
This method is intended for real-time conversation with a chatbot
133+
and the response needs to be processed incrementally.
134+
"""
125135

126136
class AppPublicServiceAsyncStub:
127137
"""AppPublicService exposes the public endpoints that allow clients to
@@ -226,6 +236,16 @@ class AppPublicServiceAsyncStub:
226236
create a new conversation and use the auth user uid as creator uid and auto
227237
generate a new conversation id on the behalf of auth user.
228238
"""
239+
Chat: grpc.aio.UnaryStreamMultiCallable[
240+
app.app.v1alpha.conversation_pb2.ChatRequest,
241+
app.app.v1alpha.conversation_pb2.ChatResponse,
242+
]
243+
"""Chat
244+
245+
Chat sends a message asynchronously and streams back the response.
246+
This method is intended for real-time conversation with a chatbot
247+
and the response needs to be processed incrementally.
248+
"""
229249

230250
class AppPublicServiceServicer(metaclass=abc.ABCMeta):
231251
"""AppPublicService exposes the public endpoints that allow clients to
@@ -364,5 +384,17 @@ class AppPublicServiceServicer(metaclass=abc.ABCMeta):
364384
create a new conversation and use the auth user uid as creator uid and auto
365385
generate a new conversation id on the behalf of auth user.
366386
"""
387+
@abc.abstractmethod
388+
def Chat(
389+
self,
390+
request: app.app.v1alpha.conversation_pb2.ChatRequest,
391+
context: _ServicerContext,
392+
) -> typing.Union[collections.abc.Iterator[app.app.v1alpha.conversation_pb2.ChatResponse], collections.abc.AsyncIterator[app.app.v1alpha.conversation_pb2.ChatResponse]]:
393+
"""Chat
394+
395+
Chat sends a message asynchronously and streams back the response.
396+
This method is intended for real-time conversation with a chatbot
397+
and the response needs to be processed incrementally.
398+
"""
367399

368400
def add_AppPublicServiceServicer_to_server(servicer: AppPublicServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...

0 commit comments

Comments
 (0)