517 lines
23 KiB
Go
517 lines
23 KiB
Go
// Package conversation is the Conversation bounded context: chat threads
|
|
// and their messages/tool-call audit log. System of record for
|
|
// `conversations`, `messages` and `tool_calls` (see
|
|
// services/conversation/migrations/0001_init.sql).
|
|
//
|
|
// Mirrors internal/db/conversations.go, called both by the gateway
|
|
// (listing/renaming/deleting threads, loading history to render) and by
|
|
// the agent service (appending messages as a run proceeds).
|
|
|
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc v3.21.12
|
|
// source: conversation/v1/conversation.proto
|
|
|
|
package conversationv1
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
ConversationService_CreateConversation_FullMethodName = "/enkly.conversation.v1.ConversationService/CreateConversation"
|
|
ConversationService_GetConversation_FullMethodName = "/enkly.conversation.v1.ConversationService/GetConversation"
|
|
ConversationService_ListConversations_FullMethodName = "/enkly.conversation.v1.ConversationService/ListConversations"
|
|
ConversationService_MostRecentConversation_FullMethodName = "/enkly.conversation.v1.ConversationService/MostRecentConversation"
|
|
ConversationService_RenameConversation_FullMethodName = "/enkly.conversation.v1.ConversationService/RenameConversation"
|
|
ConversationService_AutoTitleConversation_FullMethodName = "/enkly.conversation.v1.ConversationService/AutoTitleConversation"
|
|
ConversationService_DeleteConversation_FullMethodName = "/enkly.conversation.v1.ConversationService/DeleteConversation"
|
|
ConversationService_CountMessages_FullMethodName = "/enkly.conversation.v1.ConversationService/CountMessages"
|
|
ConversationService_AddMessage_FullMethodName = "/enkly.conversation.v1.ConversationService/AddMessage"
|
|
ConversationService_ListMessages_FullMethodName = "/enkly.conversation.v1.ConversationService/ListMessages"
|
|
ConversationService_AddToolCall_FullMethodName = "/enkly.conversation.v1.ConversationService/AddToolCall"
|
|
)
|
|
|
|
// ConversationServiceClient is the client API for ConversationService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
type ConversationServiceClient interface {
|
|
CreateConversation(ctx context.Context, in *CreateConversationRequest, opts ...grpc.CallOption) (*Conversation, error)
|
|
GetConversation(ctx context.Context, in *GetConversationRequest, opts ...grpc.CallOption) (*Conversation, error)
|
|
ListConversations(ctx context.Context, in *ListConversationsRequest, opts ...grpc.CallOption) (*ListConversationsResponse, error)
|
|
MostRecentConversation(ctx context.Context, in *MostRecentConversationRequest, opts ...grpc.CallOption) (*Conversation, error)
|
|
RenameConversation(ctx context.Context, in *RenameConversationRequest, opts ...grpc.CallOption) (*Conversation, error)
|
|
// AutoTitleConversation replaces db.AutoTitleConversation: sets the
|
|
// title from the first prompt only if the conversation still has the
|
|
// default title (returns retitled=true when it actually changed it).
|
|
AutoTitleConversation(ctx context.Context, in *AutoTitleConversationRequest, opts ...grpc.CallOption) (*AutoTitleConversationResponse, error)
|
|
DeleteConversation(ctx context.Context, in *DeleteConversationRequest, opts ...grpc.CallOption) (*DeleteConversationResponse, error)
|
|
CountMessages(ctx context.Context, in *CountMessagesRequest, opts ...grpc.CallOption) (*CountMessagesResponse, error)
|
|
AddMessage(ctx context.Context, in *AddMessageRequest, opts ...grpc.CallOption) (*Message, error)
|
|
ListMessages(ctx context.Context, in *ListMessagesRequest, opts ...grpc.CallOption) (*ListMessagesResponse, error)
|
|
AddToolCall(ctx context.Context, in *AddToolCallRequest, opts ...grpc.CallOption) (*AddToolCallResponse, error)
|
|
}
|
|
|
|
type conversationServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewConversationServiceClient(cc grpc.ClientConnInterface) ConversationServiceClient {
|
|
return &conversationServiceClient{cc}
|
|
}
|
|
|
|
func (c *conversationServiceClient) CreateConversation(ctx context.Context, in *CreateConversationRequest, opts ...grpc.CallOption) (*Conversation, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Conversation)
|
|
err := c.cc.Invoke(ctx, ConversationService_CreateConversation_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *conversationServiceClient) GetConversation(ctx context.Context, in *GetConversationRequest, opts ...grpc.CallOption) (*Conversation, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Conversation)
|
|
err := c.cc.Invoke(ctx, ConversationService_GetConversation_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *conversationServiceClient) ListConversations(ctx context.Context, in *ListConversationsRequest, opts ...grpc.CallOption) (*ListConversationsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListConversationsResponse)
|
|
err := c.cc.Invoke(ctx, ConversationService_ListConversations_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *conversationServiceClient) MostRecentConversation(ctx context.Context, in *MostRecentConversationRequest, opts ...grpc.CallOption) (*Conversation, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Conversation)
|
|
err := c.cc.Invoke(ctx, ConversationService_MostRecentConversation_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *conversationServiceClient) RenameConversation(ctx context.Context, in *RenameConversationRequest, opts ...grpc.CallOption) (*Conversation, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Conversation)
|
|
err := c.cc.Invoke(ctx, ConversationService_RenameConversation_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *conversationServiceClient) AutoTitleConversation(ctx context.Context, in *AutoTitleConversationRequest, opts ...grpc.CallOption) (*AutoTitleConversationResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(AutoTitleConversationResponse)
|
|
err := c.cc.Invoke(ctx, ConversationService_AutoTitleConversation_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *conversationServiceClient) DeleteConversation(ctx context.Context, in *DeleteConversationRequest, opts ...grpc.CallOption) (*DeleteConversationResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(DeleteConversationResponse)
|
|
err := c.cc.Invoke(ctx, ConversationService_DeleteConversation_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *conversationServiceClient) CountMessages(ctx context.Context, in *CountMessagesRequest, opts ...grpc.CallOption) (*CountMessagesResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CountMessagesResponse)
|
|
err := c.cc.Invoke(ctx, ConversationService_CountMessages_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *conversationServiceClient) AddMessage(ctx context.Context, in *AddMessageRequest, opts ...grpc.CallOption) (*Message, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Message)
|
|
err := c.cc.Invoke(ctx, ConversationService_AddMessage_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *conversationServiceClient) ListMessages(ctx context.Context, in *ListMessagesRequest, opts ...grpc.CallOption) (*ListMessagesResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListMessagesResponse)
|
|
err := c.cc.Invoke(ctx, ConversationService_ListMessages_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *conversationServiceClient) AddToolCall(ctx context.Context, in *AddToolCallRequest, opts ...grpc.CallOption) (*AddToolCallResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(AddToolCallResponse)
|
|
err := c.cc.Invoke(ctx, ConversationService_AddToolCall_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ConversationServiceServer is the server API for ConversationService service.
|
|
// All implementations must embed UnimplementedConversationServiceServer
|
|
// for forward compatibility.
|
|
type ConversationServiceServer interface {
|
|
CreateConversation(context.Context, *CreateConversationRequest) (*Conversation, error)
|
|
GetConversation(context.Context, *GetConversationRequest) (*Conversation, error)
|
|
ListConversations(context.Context, *ListConversationsRequest) (*ListConversationsResponse, error)
|
|
MostRecentConversation(context.Context, *MostRecentConversationRequest) (*Conversation, error)
|
|
RenameConversation(context.Context, *RenameConversationRequest) (*Conversation, error)
|
|
// AutoTitleConversation replaces db.AutoTitleConversation: sets the
|
|
// title from the first prompt only if the conversation still has the
|
|
// default title (returns retitled=true when it actually changed it).
|
|
AutoTitleConversation(context.Context, *AutoTitleConversationRequest) (*AutoTitleConversationResponse, error)
|
|
DeleteConversation(context.Context, *DeleteConversationRequest) (*DeleteConversationResponse, error)
|
|
CountMessages(context.Context, *CountMessagesRequest) (*CountMessagesResponse, error)
|
|
AddMessage(context.Context, *AddMessageRequest) (*Message, error)
|
|
ListMessages(context.Context, *ListMessagesRequest) (*ListMessagesResponse, error)
|
|
AddToolCall(context.Context, *AddToolCallRequest) (*AddToolCallResponse, error)
|
|
mustEmbedUnimplementedConversationServiceServer()
|
|
}
|
|
|
|
// UnimplementedConversationServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedConversationServiceServer struct{}
|
|
|
|
func (UnimplementedConversationServiceServer) CreateConversation(context.Context, *CreateConversationRequest) (*Conversation, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateConversation not implemented")
|
|
}
|
|
func (UnimplementedConversationServiceServer) GetConversation(context.Context, *GetConversationRequest) (*Conversation, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetConversation not implemented")
|
|
}
|
|
func (UnimplementedConversationServiceServer) ListConversations(context.Context, *ListConversationsRequest) (*ListConversationsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListConversations not implemented")
|
|
}
|
|
func (UnimplementedConversationServiceServer) MostRecentConversation(context.Context, *MostRecentConversationRequest) (*Conversation, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method MostRecentConversation not implemented")
|
|
}
|
|
func (UnimplementedConversationServiceServer) RenameConversation(context.Context, *RenameConversationRequest) (*Conversation, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method RenameConversation not implemented")
|
|
}
|
|
func (UnimplementedConversationServiceServer) AutoTitleConversation(context.Context, *AutoTitleConversationRequest) (*AutoTitleConversationResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method AutoTitleConversation not implemented")
|
|
}
|
|
func (UnimplementedConversationServiceServer) DeleteConversation(context.Context, *DeleteConversationRequest) (*DeleteConversationResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteConversation not implemented")
|
|
}
|
|
func (UnimplementedConversationServiceServer) CountMessages(context.Context, *CountMessagesRequest) (*CountMessagesResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CountMessages not implemented")
|
|
}
|
|
func (UnimplementedConversationServiceServer) AddMessage(context.Context, *AddMessageRequest) (*Message, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method AddMessage not implemented")
|
|
}
|
|
func (UnimplementedConversationServiceServer) ListMessages(context.Context, *ListMessagesRequest) (*ListMessagesResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListMessages not implemented")
|
|
}
|
|
func (UnimplementedConversationServiceServer) AddToolCall(context.Context, *AddToolCallRequest) (*AddToolCallResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method AddToolCall not implemented")
|
|
}
|
|
func (UnimplementedConversationServiceServer) mustEmbedUnimplementedConversationServiceServer() {}
|
|
func (UnimplementedConversationServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeConversationServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ConversationServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeConversationServiceServer interface {
|
|
mustEmbedUnimplementedConversationServiceServer()
|
|
}
|
|
|
|
func RegisterConversationServiceServer(s grpc.ServiceRegistrar, srv ConversationServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedConversationServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&ConversationService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ConversationService_CreateConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateConversationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ConversationServiceServer).CreateConversation(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ConversationService_CreateConversation_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ConversationServiceServer).CreateConversation(ctx, req.(*CreateConversationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ConversationService_GetConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetConversationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ConversationServiceServer).GetConversation(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ConversationService_GetConversation_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ConversationServiceServer).GetConversation(ctx, req.(*GetConversationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ConversationService_ListConversations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListConversationsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ConversationServiceServer).ListConversations(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ConversationService_ListConversations_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ConversationServiceServer).ListConversations(ctx, req.(*ListConversationsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ConversationService_MostRecentConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(MostRecentConversationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ConversationServiceServer).MostRecentConversation(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ConversationService_MostRecentConversation_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ConversationServiceServer).MostRecentConversation(ctx, req.(*MostRecentConversationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ConversationService_RenameConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RenameConversationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ConversationServiceServer).RenameConversation(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ConversationService_RenameConversation_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ConversationServiceServer).RenameConversation(ctx, req.(*RenameConversationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ConversationService_AutoTitleConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AutoTitleConversationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ConversationServiceServer).AutoTitleConversation(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ConversationService_AutoTitleConversation_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ConversationServiceServer).AutoTitleConversation(ctx, req.(*AutoTitleConversationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ConversationService_DeleteConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteConversationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ConversationServiceServer).DeleteConversation(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ConversationService_DeleteConversation_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ConversationServiceServer).DeleteConversation(ctx, req.(*DeleteConversationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ConversationService_CountMessages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CountMessagesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ConversationServiceServer).CountMessages(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ConversationService_CountMessages_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ConversationServiceServer).CountMessages(ctx, req.(*CountMessagesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ConversationService_AddMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AddMessageRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ConversationServiceServer).AddMessage(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ConversationService_AddMessage_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ConversationServiceServer).AddMessage(ctx, req.(*AddMessageRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ConversationService_ListMessages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListMessagesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ConversationServiceServer).ListMessages(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ConversationService_ListMessages_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ConversationServiceServer).ListMessages(ctx, req.(*ListMessagesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ConversationService_AddToolCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AddToolCallRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ConversationServiceServer).AddToolCall(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ConversationService_AddToolCall_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ConversationServiceServer).AddToolCall(ctx, req.(*AddToolCallRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ConversationService_ServiceDesc is the grpc.ServiceDesc for ConversationService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ConversationService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "enkly.conversation.v1.ConversationService",
|
|
HandlerType: (*ConversationServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "CreateConversation",
|
|
Handler: _ConversationService_CreateConversation_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetConversation",
|
|
Handler: _ConversationService_GetConversation_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListConversations",
|
|
Handler: _ConversationService_ListConversations_Handler,
|
|
},
|
|
{
|
|
MethodName: "MostRecentConversation",
|
|
Handler: _ConversationService_MostRecentConversation_Handler,
|
|
},
|
|
{
|
|
MethodName: "RenameConversation",
|
|
Handler: _ConversationService_RenameConversation_Handler,
|
|
},
|
|
{
|
|
MethodName: "AutoTitleConversation",
|
|
Handler: _ConversationService_AutoTitleConversation_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteConversation",
|
|
Handler: _ConversationService_DeleteConversation_Handler,
|
|
},
|
|
{
|
|
MethodName: "CountMessages",
|
|
Handler: _ConversationService_CountMessages_Handler,
|
|
},
|
|
{
|
|
MethodName: "AddMessage",
|
|
Handler: _ConversationService_AddMessage_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListMessages",
|
|
Handler: _ConversationService_ListMessages_Handler,
|
|
},
|
|
{
|
|
MethodName: "AddToolCall",
|
|
Handler: _ConversationService_AddToolCall_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "conversation/v1/conversation.proto",
|
|
}
|