// Code generated by protoc-gen-go-grpc. DO NOT EDIT. package ai import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" emptypb "google.golang.org/protobuf/types/known/emptypb" ) // 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.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // AiClient is the client API for Ai 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 AiClient interface { // 查询AI模板 FindAITemplate(ctx context.Context, in *FindAITemplateRequest, opts ...grpc.CallOption) (*FindAITemplateReply, error) // 创建AI CreateAIRobot(ctx context.Context, in *CreateAIRobotRequest, opts ...grpc.CallOption) (*AIRobotIDReply, error) // 销毁AI DeleteAIRobot(ctx context.Context, in *AIRobotIDRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // 更新AI UpdateAIRobot(ctx context.Context, in *UpdateAIRobotRequest, opts ...grpc.CallOption) (*AIRobotIDReply, error) // 查询AI机器人列表 FindAIRobotList(ctx context.Context, in *FindAIRobotListRequest, opts ...grpc.CallOption) (*AIRobotList, error) // 查询AI机器人 GetAIRobot(ctx context.Context, in *AIRobotIDRequest, opts ...grpc.CallOption) (*AIRobotInfo, error) // 查询AI聊天记录 FindAIChatRecordList(ctx context.Context, in *FindAIChatRecordListRequest, opts ...grpc.CallOption) (*AIRecordListReply, error) // 发送消息给ai SendAIChat(ctx context.Context, in *SendAIChatRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) } type aiClient struct { cc grpc.ClientConnInterface } func NewAiClient(cc grpc.ClientConnInterface) AiClient { return &aiClient{cc} } func (c *aiClient) FindAITemplate(ctx context.Context, in *FindAITemplateRequest, opts ...grpc.CallOption) (*FindAITemplateReply, error) { out := new(FindAITemplateReply) err := c.cc.Invoke(ctx, "/api.ai.Ai/FindAITemplate", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aiClient) CreateAIRobot(ctx context.Context, in *CreateAIRobotRequest, opts ...grpc.CallOption) (*AIRobotIDReply, error) { out := new(AIRobotIDReply) err := c.cc.Invoke(ctx, "/api.ai.Ai/CreateAIRobot", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aiClient) DeleteAIRobot(ctx context.Context, in *AIRobotIDRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/api.ai.Ai/DeleteAIRobot", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aiClient) UpdateAIRobot(ctx context.Context, in *UpdateAIRobotRequest, opts ...grpc.CallOption) (*AIRobotIDReply, error) { out := new(AIRobotIDReply) err := c.cc.Invoke(ctx, "/api.ai.Ai/UpdateAIRobot", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aiClient) FindAIRobotList(ctx context.Context, in *FindAIRobotListRequest, opts ...grpc.CallOption) (*AIRobotList, error) { out := new(AIRobotList) err := c.cc.Invoke(ctx, "/api.ai.Ai/FindAIRobotList", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aiClient) GetAIRobot(ctx context.Context, in *AIRobotIDRequest, opts ...grpc.CallOption) (*AIRobotInfo, error) { out := new(AIRobotInfo) err := c.cc.Invoke(ctx, "/api.ai.Ai/GetAIRobot", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aiClient) FindAIChatRecordList(ctx context.Context, in *FindAIChatRecordListRequest, opts ...grpc.CallOption) (*AIRecordListReply, error) { out := new(AIRecordListReply) err := c.cc.Invoke(ctx, "/api.ai.Ai/FindAIChatRecordList", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aiClient) SendAIChat(ctx context.Context, in *SendAIChatRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/api.ai.Ai/SendAIChat", in, out, opts...) if err != nil { return nil, err } return out, nil } // AiServer is the server API for Ai service. // All implementations must embed UnimplementedAiServer // for forward compatibility type AiServer interface { // 查询AI模板 FindAITemplate(context.Context, *FindAITemplateRequest) (*FindAITemplateReply, error) // 创建AI CreateAIRobot(context.Context, *CreateAIRobotRequest) (*AIRobotIDReply, error) // 销毁AI DeleteAIRobot(context.Context, *AIRobotIDRequest) (*emptypb.Empty, error) // 更新AI UpdateAIRobot(context.Context, *UpdateAIRobotRequest) (*AIRobotIDReply, error) // 查询AI机器人列表 FindAIRobotList(context.Context, *FindAIRobotListRequest) (*AIRobotList, error) // 查询AI机器人 GetAIRobot(context.Context, *AIRobotIDRequest) (*AIRobotInfo, error) // 查询AI聊天记录 FindAIChatRecordList(context.Context, *FindAIChatRecordListRequest) (*AIRecordListReply, error) // 发送消息给ai SendAIChat(context.Context, *SendAIChatRequest) (*emptypb.Empty, error) mustEmbedUnimplementedAiServer() } // UnimplementedAiServer must be embedded to have forward compatible implementations. type UnimplementedAiServer struct { } func (UnimplementedAiServer) FindAITemplate(context.Context, *FindAITemplateRequest) (*FindAITemplateReply, error) { return nil, status.Errorf(codes.Unimplemented, "method FindAITemplate not implemented") } func (UnimplementedAiServer) CreateAIRobot(context.Context, *CreateAIRobotRequest) (*AIRobotIDReply, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateAIRobot not implemented") } func (UnimplementedAiServer) DeleteAIRobot(context.Context, *AIRobotIDRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteAIRobot not implemented") } func (UnimplementedAiServer) UpdateAIRobot(context.Context, *UpdateAIRobotRequest) (*AIRobotIDReply, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateAIRobot not implemented") } func (UnimplementedAiServer) FindAIRobotList(context.Context, *FindAIRobotListRequest) (*AIRobotList, error) { return nil, status.Errorf(codes.Unimplemented, "method FindAIRobotList not implemented") } func (UnimplementedAiServer) GetAIRobot(context.Context, *AIRobotIDRequest) (*AIRobotInfo, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAIRobot not implemented") } func (UnimplementedAiServer) FindAIChatRecordList(context.Context, *FindAIChatRecordListRequest) (*AIRecordListReply, error) { return nil, status.Errorf(codes.Unimplemented, "method FindAIChatRecordList not implemented") } func (UnimplementedAiServer) SendAIChat(context.Context, *SendAIChatRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method SendAIChat not implemented") } func (UnimplementedAiServer) mustEmbedUnimplementedAiServer() {} // UnsafeAiServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AiServer will // result in compilation errors. type UnsafeAiServer interface { mustEmbedUnimplementedAiServer() } func RegisterAiServer(s grpc.ServiceRegistrar, srv AiServer) { s.RegisterService(&Ai_ServiceDesc, srv) } func _Ai_FindAITemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FindAITemplateRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AiServer).FindAITemplate(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.ai.Ai/FindAITemplate", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AiServer).FindAITemplate(ctx, req.(*FindAITemplateRequest)) } return interceptor(ctx, in, info, handler) } func _Ai_CreateAIRobot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateAIRobotRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AiServer).CreateAIRobot(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.ai.Ai/CreateAIRobot", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AiServer).CreateAIRobot(ctx, req.(*CreateAIRobotRequest)) } return interceptor(ctx, in, info, handler) } func _Ai_DeleteAIRobot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AIRobotIDRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AiServer).DeleteAIRobot(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.ai.Ai/DeleteAIRobot", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AiServer).DeleteAIRobot(ctx, req.(*AIRobotIDRequest)) } return interceptor(ctx, in, info, handler) } func _Ai_UpdateAIRobot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateAIRobotRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AiServer).UpdateAIRobot(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.ai.Ai/UpdateAIRobot", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AiServer).UpdateAIRobot(ctx, req.(*UpdateAIRobotRequest)) } return interceptor(ctx, in, info, handler) } func _Ai_FindAIRobotList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FindAIRobotListRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AiServer).FindAIRobotList(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.ai.Ai/FindAIRobotList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AiServer).FindAIRobotList(ctx, req.(*FindAIRobotListRequest)) } return interceptor(ctx, in, info, handler) } func _Ai_GetAIRobot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AIRobotIDRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AiServer).GetAIRobot(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.ai.Ai/GetAIRobot", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AiServer).GetAIRobot(ctx, req.(*AIRobotIDRequest)) } return interceptor(ctx, in, info, handler) } func _Ai_FindAIChatRecordList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FindAIChatRecordListRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AiServer).FindAIChatRecordList(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.ai.Ai/FindAIChatRecordList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AiServer).FindAIChatRecordList(ctx, req.(*FindAIChatRecordListRequest)) } return interceptor(ctx, in, info, handler) } func _Ai_SendAIChat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SendAIChatRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AiServer).SendAIChat(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.ai.Ai/SendAIChat", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AiServer).SendAIChat(ctx, req.(*SendAIChatRequest)) } return interceptor(ctx, in, info, handler) } // Ai_ServiceDesc is the grpc.ServiceDesc for Ai service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Ai_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.ai.Ai", HandlerType: (*AiServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "FindAITemplate", Handler: _Ai_FindAITemplate_Handler, }, { MethodName: "CreateAIRobot", Handler: _Ai_CreateAIRobot_Handler, }, { MethodName: "DeleteAIRobot", Handler: _Ai_DeleteAIRobot_Handler, }, { MethodName: "UpdateAIRobot", Handler: _Ai_UpdateAIRobot_Handler, }, { MethodName: "FindAIRobotList", Handler: _Ai_FindAIRobotList_Handler, }, { MethodName: "GetAIRobot", Handler: _Ai_GetAIRobot_Handler, }, { MethodName: "FindAIChatRecordList", Handler: _Ai_FindAIChatRecordList_Handler, }, { MethodName: "SendAIChat", Handler: _Ai_SendAIChat_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "ai.proto", }