复制项目
This commit is contained in:
830
pkg/protocol/bot/bot.pb.go
Normal file
830
pkg/protocol/bot/bot.pb.go
Normal file
@@ -0,0 +1,830 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.1
|
||||
// protoc v5.29.0
|
||||
// source: bot/bot.proto
|
||||
|
||||
package bot
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
sdkws "git.imall.cloud/openim/protocol/sdkws"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type Agent struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
|
||||
Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname"`
|
||||
FaceURL string `protobuf:"bytes,3,opt,name=faceURL,proto3" json:"faceURL"`
|
||||
Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url"`
|
||||
Key string `protobuf:"bytes,5,opt,name=key,proto3" json:"key"`
|
||||
Identity string `protobuf:"bytes,6,opt,name=identity,proto3" json:"identity"`
|
||||
Model string `protobuf:"bytes,7,opt,name=model,proto3" json:"model"`
|
||||
Prompts string `protobuf:"bytes,8,opt,name=prompts,proto3" json:"prompts"`
|
||||
CreateTime int64 `protobuf:"varint,9,opt,name=createTime,proto3" json:"createTime"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Agent) Reset() {
|
||||
*x = Agent{}
|
||||
mi := &file_bot_bot_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Agent) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Agent) ProtoMessage() {}
|
||||
|
||||
func (x *Agent) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bot_bot_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Agent.ProtoReflect.Descriptor instead.
|
||||
func (*Agent) Descriptor() ([]byte, []int) {
|
||||
return file_bot_bot_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Agent) GetUserID() string {
|
||||
if x != nil {
|
||||
return x.UserID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Agent) GetNickname() string {
|
||||
if x != nil {
|
||||
return x.Nickname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Agent) GetFaceURL() string {
|
||||
if x != nil {
|
||||
return x.FaceURL
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Agent) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Agent) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Agent) GetIdentity() string {
|
||||
if x != nil {
|
||||
return x.Identity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Agent) GetModel() string {
|
||||
if x != nil {
|
||||
return x.Model
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Agent) GetPrompts() string {
|
||||
if x != nil {
|
||||
return x.Prompts
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Agent) GetCreateTime() int64 {
|
||||
if x != nil {
|
||||
return x.CreateTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type CreateAgentReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Agent *Agent `protobuf:"bytes,1,opt,name=agent,proto3" json:"agent"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateAgentReq) Reset() {
|
||||
*x = CreateAgentReq{}
|
||||
mi := &file_bot_bot_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateAgentReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateAgentReq) ProtoMessage() {}
|
||||
|
||||
func (x *CreateAgentReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bot_bot_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateAgentReq.ProtoReflect.Descriptor instead.
|
||||
func (*CreateAgentReq) Descriptor() ([]byte, []int) {
|
||||
return file_bot_bot_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *CreateAgentReq) GetAgent() *Agent {
|
||||
if x != nil {
|
||||
return x.Agent
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CreateAgentResp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateAgentResp) Reset() {
|
||||
*x = CreateAgentResp{}
|
||||
mi := &file_bot_bot_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateAgentResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateAgentResp) ProtoMessage() {}
|
||||
|
||||
func (x *CreateAgentResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bot_bot_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateAgentResp.ProtoReflect.Descriptor instead.
|
||||
func (*CreateAgentResp) Descriptor() ([]byte, []int) {
|
||||
return file_bot_bot_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
type UpdateAgentReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
|
||||
Nickname *string `protobuf:"bytes,2,opt,name=nickname,proto3,oneof" json:"nickname"`
|
||||
FaceURL *string `protobuf:"bytes,3,opt,name=faceURL,proto3,oneof" json:"faceURL"`
|
||||
Url *string `protobuf:"bytes,4,opt,name=url,proto3,oneof" json:"url"`
|
||||
Key *string `protobuf:"bytes,5,opt,name=key,proto3,oneof" json:"key"`
|
||||
Identity *string `protobuf:"bytes,6,opt,name=identity,proto3,oneof" json:"identity"`
|
||||
Model *string `protobuf:"bytes,7,opt,name=model,proto3,oneof" json:"model"`
|
||||
Prompts *string `protobuf:"bytes,8,opt,name=prompts,proto3,oneof" json:"prompts"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateAgentReq) Reset() {
|
||||
*x = UpdateAgentReq{}
|
||||
mi := &file_bot_bot_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateAgentReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateAgentReq) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateAgentReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bot_bot_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateAgentReq.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateAgentReq) Descriptor() ([]byte, []int) {
|
||||
return file_bot_bot_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *UpdateAgentReq) GetUserID() string {
|
||||
if x != nil {
|
||||
return x.UserID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateAgentReq) GetNickname() string {
|
||||
if x != nil && x.Nickname != nil {
|
||||
return *x.Nickname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateAgentReq) GetFaceURL() string {
|
||||
if x != nil && x.FaceURL != nil {
|
||||
return *x.FaceURL
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateAgentReq) GetUrl() string {
|
||||
if x != nil && x.Url != nil {
|
||||
return *x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateAgentReq) GetKey() string {
|
||||
if x != nil && x.Key != nil {
|
||||
return *x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateAgentReq) GetIdentity() string {
|
||||
if x != nil && x.Identity != nil {
|
||||
return *x.Identity
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateAgentReq) GetModel() string {
|
||||
if x != nil && x.Model != nil {
|
||||
return *x.Model
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateAgentReq) GetPrompts() string {
|
||||
if x != nil && x.Prompts != nil {
|
||||
return *x.Prompts
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type UpdateAgentResp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateAgentResp) Reset() {
|
||||
*x = UpdateAgentResp{}
|
||||
mi := &file_bot_bot_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateAgentResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateAgentResp) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateAgentResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bot_bot_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateAgentResp.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateAgentResp) Descriptor() ([]byte, []int) {
|
||||
return file_bot_bot_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
type PageFindAgentReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"`
|
||||
UserIDs []string `protobuf:"bytes,2,rep,name=userIDs,proto3" json:"userIDs"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PageFindAgentReq) Reset() {
|
||||
*x = PageFindAgentReq{}
|
||||
mi := &file_bot_bot_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *PageFindAgentReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PageFindAgentReq) ProtoMessage() {}
|
||||
|
||||
func (x *PageFindAgentReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bot_bot_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PageFindAgentReq.ProtoReflect.Descriptor instead.
|
||||
func (*PageFindAgentReq) Descriptor() ([]byte, []int) {
|
||||
return file_bot_bot_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *PageFindAgentReq) GetPagination() *sdkws.RequestPagination {
|
||||
if x != nil {
|
||||
return x.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PageFindAgentReq) GetUserIDs() []string {
|
||||
if x != nil {
|
||||
return x.UserIDs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type PageFindAgentResp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
|
||||
Agents []*Agent `protobuf:"bytes,2,rep,name=agents,proto3" json:"agents"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PageFindAgentResp) Reset() {
|
||||
*x = PageFindAgentResp{}
|
||||
mi := &file_bot_bot_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *PageFindAgentResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PageFindAgentResp) ProtoMessage() {}
|
||||
|
||||
func (x *PageFindAgentResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bot_bot_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PageFindAgentResp.ProtoReflect.Descriptor instead.
|
||||
func (*PageFindAgentResp) Descriptor() ([]byte, []int) {
|
||||
return file_bot_bot_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *PageFindAgentResp) GetTotal() int64 {
|
||||
if x != nil {
|
||||
return x.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PageFindAgentResp) GetAgents() []*Agent {
|
||||
if x != nil {
|
||||
return x.Agents
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteAgentReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserIDs []string `protobuf:"bytes,1,rep,name=userIDs,proto3" json:"userIDs"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteAgentReq) Reset() {
|
||||
*x = DeleteAgentReq{}
|
||||
mi := &file_bot_bot_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteAgentReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteAgentReq) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteAgentReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bot_bot_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteAgentReq.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteAgentReq) Descriptor() ([]byte, []int) {
|
||||
return file_bot_bot_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *DeleteAgentReq) GetUserIDs() []string {
|
||||
if x != nil {
|
||||
return x.UserIDs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteAgentResp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteAgentResp) Reset() {
|
||||
*x = DeleteAgentResp{}
|
||||
mi := &file_bot_bot_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteAgentResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteAgentResp) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteAgentResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bot_bot_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteAgentResp.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteAgentResp) Descriptor() ([]byte, []int) {
|
||||
return file_bot_bot_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
type SendBotMessageReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
AgentID string `protobuf:"bytes,1,opt,name=agentID,proto3" json:"agentID"`
|
||||
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
|
||||
ContentType int32 `protobuf:"varint,3,opt,name=contentType,proto3" json:"contentType"`
|
||||
Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content"`
|
||||
Ex string `protobuf:"bytes,5,opt,name=ex,proto3" json:"ex"`
|
||||
Key string `protobuf:"bytes,6,opt,name=key,proto3" json:"key"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SendBotMessageReq) Reset() {
|
||||
*x = SendBotMessageReq{}
|
||||
mi := &file_bot_bot_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SendBotMessageReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SendBotMessageReq) ProtoMessage() {}
|
||||
|
||||
func (x *SendBotMessageReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bot_bot_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SendBotMessageReq.ProtoReflect.Descriptor instead.
|
||||
func (*SendBotMessageReq) Descriptor() ([]byte, []int) {
|
||||
return file_bot_bot_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *SendBotMessageReq) GetAgentID() string {
|
||||
if x != nil {
|
||||
return x.AgentID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SendBotMessageReq) GetConversationID() string {
|
||||
if x != nil {
|
||||
return x.ConversationID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SendBotMessageReq) GetContentType() int32 {
|
||||
if x != nil {
|
||||
return x.ContentType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SendBotMessageReq) GetContent() string {
|
||||
if x != nil {
|
||||
return x.Content
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SendBotMessageReq) GetEx() string {
|
||||
if x != nil {
|
||||
return x.Ex
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SendBotMessageReq) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SendBotMessageResp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SendBotMessageResp) Reset() {
|
||||
*x = SendBotMessageResp{}
|
||||
mi := &file_bot_bot_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SendBotMessageResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SendBotMessageResp) ProtoMessage() {}
|
||||
|
||||
func (x *SendBotMessageResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bot_bot_proto_msgTypes[10]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SendBotMessageResp.ProtoReflect.Descriptor instead.
|
||||
func (*SendBotMessageResp) Descriptor() ([]byte, []int) {
|
||||
return file_bot_bot_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
var File_bot_bot_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_bot_bot_proto_rawDesc = []byte{
|
||||
0x0a, 0x0d, 0x62, 0x6f, 0x74, 0x2f, 0x62, 0x6f, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x0a, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x62, 0x6f, 0x74, 0x1a, 0x11, 0x73, 0x64, 0x6b,
|
||||
0x77, 0x73, 0x2f, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5,
|
||||
0x01, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72,
|
||||
0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44,
|
||||
0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66,
|
||||
0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64,
|
||||
0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64,
|
||||
0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70,
|
||||
0x72, 0x6f, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x39, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x27, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e,
|
||||
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
|
||||
0x2e, 0x62, 0x6f, 0x74, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x61, 0x67, 0x65, 0x6e,
|
||||
0x74, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74,
|
||||
0x52, 0x65, 0x73, 0x70, 0x22, 0xbd, 0x02, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41,
|
||||
0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
|
||||
0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12,
|
||||
0x1f, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01,
|
||||
0x12, 0x1d, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x48, 0x01, 0x52, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x88, 0x01, 0x01, 0x12,
|
||||
0x15, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x03,
|
||||
0x75, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a,
|
||||
0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48,
|
||||
0x04, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x19,
|
||||
0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52,
|
||||
0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x72, 0x6f,
|
||||
0x6d, 0x70, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x07, 0x70, 0x72,
|
||||
0x6f, 0x6d, 0x70, 0x74, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6e, 0x69, 0x63,
|
||||
0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52,
|
||||
0x4c, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x75, 0x72, 0x6c, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6b, 0x65,
|
||||
0x79, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x08,
|
||||
0x0a, 0x06, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x72, 0x6f,
|
||||
0x6d, 0x70, 0x74, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x67,
|
||||
0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x6d, 0x0a, 0x10, 0x50, 0x61, 0x67, 0x65, 0x46,
|
||||
0x69, 0x6e, 0x64, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x3f, 0x0a, 0x0a, 0x70,
|
||||
0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x75,
|
||||
0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0x54, 0x0a, 0x11, 0x50, 0x61, 0x67, 0x65, 0x46, 0x69,
|
||||
0x6e, 0x64, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74,
|
||||
0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61,
|
||||
0x6c, 0x12, 0x29, 0x0a, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x62, 0x6f, 0x74, 0x2e, 0x41,
|
||||
0x67, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x2a, 0x0a, 0x0e,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||
0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0xb3, 0x01, 0x0a, 0x11,
|
||||
0x53, 0x65, 0x6e, 0x64, 0x42, 0x6f, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65,
|
||||
0x71, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x63,
|
||||
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79,
|
||||
0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
|
||||
0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x22, 0x14, 0x0a, 0x12, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x6f, 0x74, 0x4d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x32, 0xfc, 0x02, 0x0a, 0x03, 0x62, 0x6f, 0x74, 0x12,
|
||||
0x46, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x1a,
|
||||
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x62, 0x6f, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6f, 0x70, 0x65,
|
||||
0x6e, 0x69, 0x6d, 0x2e, 0x62, 0x6f, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x67,
|
||||
0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x46, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
|
||||
0x62, 0x6f, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52,
|
||||
0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x62, 0x6f, 0x74, 0x2e,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||
0x4c, 0x0a, 0x0d, 0x50, 0x61, 0x67, 0x65, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x67, 0x65, 0x6e, 0x74,
|
||||
0x12, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x62, 0x6f, 0x74, 0x2e, 0x50, 0x61,
|
||||
0x67, 0x65, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1d,
|
||||
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x62, 0x6f, 0x74, 0x2e, 0x50, 0x61, 0x67, 0x65,
|
||||
0x46, 0x69, 0x6e, 0x64, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x46, 0x0a,
|
||||
0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x2e, 0x6f,
|
||||
0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x62, 0x6f, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
|
||||
0x6d, 0x2e, 0x62, 0x6f, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e,
|
||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x6f, 0x74,
|
||||
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
|
||||
0x2e, 0x62, 0x6f, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x6f, 0x74, 0x4d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
|
||||
0x62, 0x6f, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x6f, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
||||
0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x73, 0x64, 0x6b, 0x2f, 0x63,
|
||||
0x68, 0x61, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
|
||||
0x2f, 0x62, 0x6f, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_bot_bot_proto_rawDescOnce sync.Once
|
||||
file_bot_bot_proto_rawDescData = file_bot_bot_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_bot_bot_proto_rawDescGZIP() []byte {
|
||||
file_bot_bot_proto_rawDescOnce.Do(func() {
|
||||
file_bot_bot_proto_rawDescData = protoimpl.X.CompressGZIP(file_bot_bot_proto_rawDescData)
|
||||
})
|
||||
return file_bot_bot_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_bot_bot_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_bot_bot_proto_goTypes = []any{
|
||||
(*Agent)(nil), // 0: openim.bot.Agent
|
||||
(*CreateAgentReq)(nil), // 1: openim.bot.CreateAgentReq
|
||||
(*CreateAgentResp)(nil), // 2: openim.bot.CreateAgentResp
|
||||
(*UpdateAgentReq)(nil), // 3: openim.bot.UpdateAgentReq
|
||||
(*UpdateAgentResp)(nil), // 4: openim.bot.UpdateAgentResp
|
||||
(*PageFindAgentReq)(nil), // 5: openim.bot.PageFindAgentReq
|
||||
(*PageFindAgentResp)(nil), // 6: openim.bot.PageFindAgentResp
|
||||
(*DeleteAgentReq)(nil), // 7: openim.bot.DeleteAgentReq
|
||||
(*DeleteAgentResp)(nil), // 8: openim.bot.DeleteAgentResp
|
||||
(*SendBotMessageReq)(nil), // 9: openim.bot.SendBotMessageReq
|
||||
(*SendBotMessageResp)(nil), // 10: openim.bot.SendBotMessageResp
|
||||
(*sdkws.RequestPagination)(nil), // 11: openim.sdkws.RequestPagination
|
||||
}
|
||||
var file_bot_bot_proto_depIdxs = []int32{
|
||||
0, // 0: openim.bot.CreateAgentReq.agent:type_name -> openim.bot.Agent
|
||||
11, // 1: openim.bot.PageFindAgentReq.pagination:type_name -> openim.sdkws.RequestPagination
|
||||
0, // 2: openim.bot.PageFindAgentResp.agents:type_name -> openim.bot.Agent
|
||||
1, // 3: openim.bot.bot.CreateAgent:input_type -> openim.bot.CreateAgentReq
|
||||
3, // 4: openim.bot.bot.UpdateAgent:input_type -> openim.bot.UpdateAgentReq
|
||||
5, // 5: openim.bot.bot.PageFindAgent:input_type -> openim.bot.PageFindAgentReq
|
||||
7, // 6: openim.bot.bot.DeleteAgent:input_type -> openim.bot.DeleteAgentReq
|
||||
9, // 7: openim.bot.bot.SendBotMessage:input_type -> openim.bot.SendBotMessageReq
|
||||
2, // 8: openim.bot.bot.CreateAgent:output_type -> openim.bot.CreateAgentResp
|
||||
4, // 9: openim.bot.bot.UpdateAgent:output_type -> openim.bot.UpdateAgentResp
|
||||
6, // 10: openim.bot.bot.PageFindAgent:output_type -> openim.bot.PageFindAgentResp
|
||||
8, // 11: openim.bot.bot.DeleteAgent:output_type -> openim.bot.DeleteAgentResp
|
||||
10, // 12: openim.bot.bot.SendBotMessage:output_type -> openim.bot.SendBotMessageResp
|
||||
8, // [8:13] is the sub-list for method output_type
|
||||
3, // [3:8] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_bot_bot_proto_init() }
|
||||
func file_bot_bot_proto_init() {
|
||||
if File_bot_bot_proto != nil {
|
||||
return
|
||||
}
|
||||
file_bot_bot_proto_msgTypes[3].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_bot_bot_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 11,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_bot_bot_proto_goTypes,
|
||||
DependencyIndexes: file_bot_bot_proto_depIdxs,
|
||||
MessageInfos: file_bot_bot_proto_msgTypes,
|
||||
}.Build()
|
||||
File_bot_bot_proto = out.File
|
||||
file_bot_bot_proto_rawDesc = nil
|
||||
file_bot_bot_proto_goTypes = nil
|
||||
file_bot_bot_proto_depIdxs = nil
|
||||
}
|
||||
73
pkg/protocol/bot/bot.proto
Normal file
73
pkg/protocol/bot/bot.proto
Normal file
@@ -0,0 +1,73 @@
|
||||
syntax = "proto3";
|
||||
package openim.bot;
|
||||
|
||||
import "sdkws/sdkws.proto";
|
||||
|
||||
option go_package = "git.imall.cloud/openim/chat/pkg/protocol/bot";
|
||||
|
||||
message Agent {
|
||||
string userID = 1;
|
||||
string nickname = 2;
|
||||
string faceURL = 3;
|
||||
string url = 4;
|
||||
string key = 5;
|
||||
string identity = 6;
|
||||
string model = 7;
|
||||
string prompts = 8;
|
||||
int64 createTime = 9;
|
||||
}
|
||||
|
||||
message CreateAgentReq {
|
||||
Agent agent = 1;
|
||||
}
|
||||
|
||||
message CreateAgentResp {
|
||||
}
|
||||
|
||||
message UpdateAgentReq {
|
||||
string userID = 1;
|
||||
optional string nickname = 2;
|
||||
optional string faceURL = 3;
|
||||
optional string url = 4;
|
||||
optional string key = 5;
|
||||
optional string identity = 6;
|
||||
optional string model = 7;
|
||||
optional string prompts = 8;
|
||||
}
|
||||
|
||||
message UpdateAgentResp {
|
||||
}
|
||||
|
||||
message PageFindAgentReq {
|
||||
openim.sdkws.RequestPagination pagination = 1;
|
||||
repeated string userIDs = 2;
|
||||
}
|
||||
|
||||
message PageFindAgentResp {
|
||||
int64 total = 1;
|
||||
repeated Agent agents = 2;
|
||||
}
|
||||
|
||||
message DeleteAgentReq{
|
||||
repeated string userIDs = 1;
|
||||
}
|
||||
message DeleteAgentResp{}
|
||||
|
||||
message SendBotMessageReq{
|
||||
string agentID = 1;
|
||||
string conversationID = 2;
|
||||
int32 contentType = 3;
|
||||
string content = 4;
|
||||
string ex = 5;
|
||||
string key = 6;
|
||||
}
|
||||
message SendBotMessageResp{}
|
||||
|
||||
service bot {
|
||||
rpc CreateAgent(CreateAgentReq) returns (CreateAgentResp);
|
||||
rpc UpdateAgent(UpdateAgentReq) returns (UpdateAgentResp);
|
||||
rpc PageFindAgent(PageFindAgentReq) returns (PageFindAgentResp);
|
||||
rpc DeleteAgent(DeleteAgentReq) returns (DeleteAgentResp);
|
||||
|
||||
rpc SendBotMessage(SendBotMessageReq) returns (SendBotMessageResp);
|
||||
}
|
||||
273
pkg/protocol/bot/bot_grpc.pb.go
Normal file
273
pkg/protocol/bot/bot_grpc.pb.go
Normal file
@@ -0,0 +1,273 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.29.0
|
||||
// source: bot/bot.proto
|
||||
|
||||
package bot
|
||||
|
||||
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 (
|
||||
Bot_CreateAgent_FullMethodName = "/openim.bot.bot/CreateAgent"
|
||||
Bot_UpdateAgent_FullMethodName = "/openim.bot.bot/UpdateAgent"
|
||||
Bot_PageFindAgent_FullMethodName = "/openim.bot.bot/PageFindAgent"
|
||||
Bot_DeleteAgent_FullMethodName = "/openim.bot.bot/DeleteAgent"
|
||||
Bot_SendBotMessage_FullMethodName = "/openim.bot.bot/SendBotMessage"
|
||||
)
|
||||
|
||||
// BotClient is the client API for Bot 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 BotClient interface {
|
||||
CreateAgent(ctx context.Context, in *CreateAgentReq, opts ...grpc.CallOption) (*CreateAgentResp, error)
|
||||
UpdateAgent(ctx context.Context, in *UpdateAgentReq, opts ...grpc.CallOption) (*UpdateAgentResp, error)
|
||||
PageFindAgent(ctx context.Context, in *PageFindAgentReq, opts ...grpc.CallOption) (*PageFindAgentResp, error)
|
||||
DeleteAgent(ctx context.Context, in *DeleteAgentReq, opts ...grpc.CallOption) (*DeleteAgentResp, error)
|
||||
SendBotMessage(ctx context.Context, in *SendBotMessageReq, opts ...grpc.CallOption) (*SendBotMessageResp, error)
|
||||
}
|
||||
|
||||
type botClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewBotClient(cc grpc.ClientConnInterface) BotClient {
|
||||
return &botClient{cc}
|
||||
}
|
||||
|
||||
func (c *botClient) CreateAgent(ctx context.Context, in *CreateAgentReq, opts ...grpc.CallOption) (*CreateAgentResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CreateAgentResp)
|
||||
err := c.cc.Invoke(ctx, Bot_CreateAgent_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *botClient) UpdateAgent(ctx context.Context, in *UpdateAgentReq, opts ...grpc.CallOption) (*UpdateAgentResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(UpdateAgentResp)
|
||||
err := c.cc.Invoke(ctx, Bot_UpdateAgent_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *botClient) PageFindAgent(ctx context.Context, in *PageFindAgentReq, opts ...grpc.CallOption) (*PageFindAgentResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PageFindAgentResp)
|
||||
err := c.cc.Invoke(ctx, Bot_PageFindAgent_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *botClient) DeleteAgent(ctx context.Context, in *DeleteAgentReq, opts ...grpc.CallOption) (*DeleteAgentResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DeleteAgentResp)
|
||||
err := c.cc.Invoke(ctx, Bot_DeleteAgent_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *botClient) SendBotMessage(ctx context.Context, in *SendBotMessageReq, opts ...grpc.CallOption) (*SendBotMessageResp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SendBotMessageResp)
|
||||
err := c.cc.Invoke(ctx, Bot_SendBotMessage_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// BotServer is the server API for Bot service.
|
||||
// All implementations must embed UnimplementedBotServer
|
||||
// for forward compatibility.
|
||||
type BotServer interface {
|
||||
CreateAgent(context.Context, *CreateAgentReq) (*CreateAgentResp, error)
|
||||
UpdateAgent(context.Context, *UpdateAgentReq) (*UpdateAgentResp, error)
|
||||
PageFindAgent(context.Context, *PageFindAgentReq) (*PageFindAgentResp, error)
|
||||
DeleteAgent(context.Context, *DeleteAgentReq) (*DeleteAgentResp, error)
|
||||
SendBotMessage(context.Context, *SendBotMessageReq) (*SendBotMessageResp, error)
|
||||
mustEmbedUnimplementedBotServer()
|
||||
}
|
||||
|
||||
// UnimplementedBotServer 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 UnimplementedBotServer struct{}
|
||||
|
||||
func (UnimplementedBotServer) CreateAgent(context.Context, *CreateAgentReq) (*CreateAgentResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateAgent not implemented")
|
||||
}
|
||||
func (UnimplementedBotServer) UpdateAgent(context.Context, *UpdateAgentReq) (*UpdateAgentResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateAgent not implemented")
|
||||
}
|
||||
func (UnimplementedBotServer) PageFindAgent(context.Context, *PageFindAgentReq) (*PageFindAgentResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PageFindAgent not implemented")
|
||||
}
|
||||
func (UnimplementedBotServer) DeleteAgent(context.Context, *DeleteAgentReq) (*DeleteAgentResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteAgent not implemented")
|
||||
}
|
||||
func (UnimplementedBotServer) SendBotMessage(context.Context, *SendBotMessageReq) (*SendBotMessageResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SendBotMessage not implemented")
|
||||
}
|
||||
func (UnimplementedBotServer) mustEmbedUnimplementedBotServer() {}
|
||||
func (UnimplementedBotServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeBotServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to BotServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeBotServer interface {
|
||||
mustEmbedUnimplementedBotServer()
|
||||
}
|
||||
|
||||
func RegisterBotServer(s grpc.ServiceRegistrar, srv BotServer) {
|
||||
// If the following call pancis, it indicates UnimplementedBotServer 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(&Bot_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Bot_CreateAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateAgentReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BotServer).CreateAgent(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Bot_CreateAgent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BotServer).CreateAgent(ctx, req.(*CreateAgentReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bot_UpdateAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateAgentReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BotServer).UpdateAgent(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Bot_UpdateAgent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BotServer).UpdateAgent(ctx, req.(*UpdateAgentReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bot_PageFindAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PageFindAgentReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BotServer).PageFindAgent(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Bot_PageFindAgent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BotServer).PageFindAgent(ctx, req.(*PageFindAgentReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bot_DeleteAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteAgentReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BotServer).DeleteAgent(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Bot_DeleteAgent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BotServer).DeleteAgent(ctx, req.(*DeleteAgentReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bot_SendBotMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SendBotMessageReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BotServer).SendBotMessage(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Bot_SendBotMessage_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BotServer).SendBotMessage(ctx, req.(*SendBotMessageReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Bot_ServiceDesc is the grpc.ServiceDesc for Bot service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Bot_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "openim.bot.bot",
|
||||
HandlerType: (*BotServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateAgent",
|
||||
Handler: _Bot_CreateAgent_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateAgent",
|
||||
Handler: _Bot_UpdateAgent_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "PageFindAgent",
|
||||
Handler: _Bot_PageFindAgent_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteAgent",
|
||||
Handler: _Bot_DeleteAgent_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SendBotMessage",
|
||||
Handler: _Bot_SendBotMessage_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "bot/bot.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user