Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterRagServiceServer(s grpc.ServiceRegistrar, srv RagServiceServer)
- type AppBriefList
- type ChatRagReq
- func (*ChatRagReq) Descriptor() ([]byte, []int)deprecated
- func (x *ChatRagReq) GetHistory() []*HistoryItem
- func (x *ChatRagReq) GetIdentity() *Identity
- func (x *ChatRagReq) GetQuestion() string
- func (x *ChatRagReq) GetRagId() string
- func (*ChatRagReq) ProtoMessage()
- func (x *ChatRagReq) ProtoReflect() protoreflect.Message
- func (x *ChatRagReq) Reset()
- func (x *ChatRagReq) String() string
- type ChatRagResp
- type CopyRagReq
- type CreateRagReq
- func (*CreateRagReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRagReq) GetAppBrief() *common.AppBriefConfig
- func (x *CreateRagReq) GetIdentity() *Identity
- func (*CreateRagReq) ProtoMessage()
- func (x *CreateRagReq) ProtoReflect() protoreflect.Message
- func (x *CreateRagReq) Reset()
- func (x *CreateRagReq) String() string
- type CreateRagResp
- type GetRagByIdsReq
- type HistoryItem
- func (*HistoryItem) Descriptor() ([]byte, []int)deprecated
- func (x *HistoryItem) GetNeedHistory() bool
- func (x *HistoryItem) GetQuery() string
- func (x *HistoryItem) GetResponse() string
- func (*HistoryItem) ProtoMessage()
- func (x *HistoryItem) ProtoReflect() protoreflect.Message
- func (x *HistoryItem) Reset()
- func (x *HistoryItem) String() string
- type Identity
- type RagDeleteReq
- type RagDetailReq
- type RagGlobalConfig
- func (*RagGlobalConfig) Descriptor() ([]byte, []int)deprecated
- func (x *RagGlobalConfig) GetKeywordPriority() float32
- func (x *RagGlobalConfig) GetMatchType() string
- func (x *RagGlobalConfig) GetMaxHistory() int32
- func (x *RagGlobalConfig) GetPriorityMatch() int32
- func (x *RagGlobalConfig) GetSemanticsPriority() float32
- func (x *RagGlobalConfig) GetTermWeight() float32
- func (x *RagGlobalConfig) GetTermWeightEnable() bool
- func (x *RagGlobalConfig) GetThreshold() float32
- func (x *RagGlobalConfig) GetTopK() int32
- func (x *RagGlobalConfig) GetUseGraph() bool
- func (*RagGlobalConfig) ProtoMessage()
- func (x *RagGlobalConfig) ProtoReflect() protoreflect.Message
- func (x *RagGlobalConfig) Reset()
- func (x *RagGlobalConfig) String() string
- type RagInfo
- func (*RagInfo) Descriptor() ([]byte, []int)deprecated
- func (x *RagInfo) GetBriefConfig() *common.AppBriefConfig
- func (x *RagInfo) GetIdentity() *Identity
- func (x *RagInfo) GetKnowledgeBaseConfig() *RagKnowledgeBaseConfig
- func (x *RagInfo) GetModelConfig() *common.AppModelConfig
- func (x *RagInfo) GetRagId() string
- func (x *RagInfo) GetRerankConfig() *common.AppModelConfig
- func (x *RagInfo) GetSensitiveConfig() *RagSensitiveConfig
- func (*RagInfo) ProtoMessage()
- func (x *RagInfo) ProtoReflect() protoreflect.Message
- func (x *RagInfo) Reset()
- func (x *RagInfo) String() string
- type RagKnowledgeBaseConfig
- func (*RagKnowledgeBaseConfig) Descriptor() ([]byte, []int)deprecated
- func (x *RagKnowledgeBaseConfig) GetGlobalConfig() *RagGlobalConfig
- func (x *RagKnowledgeBaseConfig) GetPerKnowledgeConfigs() []*RagPerKnowledgeConfig
- func (*RagKnowledgeBaseConfig) ProtoMessage()
- func (x *RagKnowledgeBaseConfig) ProtoReflect() protoreflect.Message
- func (x *RagKnowledgeBaseConfig) Reset()
- func (x *RagKnowledgeBaseConfig) String() string
- type RagListReq
- type RagListResp
- func (*RagListResp) Descriptor() ([]byte, []int)deprecated
- func (x *RagListResp) GetRagInfos() []*common.AppBrief
- func (x *RagListResp) GetTotal() int64
- func (*RagListResp) ProtoMessage()
- func (x *RagListResp) ProtoReflect() protoreflect.Message
- func (x *RagListResp) Reset()
- func (x *RagListResp) String() string
- type RagMetaFilter
- func (*RagMetaFilter) Descriptor() ([]byte, []int)deprecated
- func (x *RagMetaFilter) GetFilterEnable() bool
- func (x *RagMetaFilter) GetFilterItems() []*RagMetaFilterItem
- func (x *RagMetaFilter) GetFilterLogicType() string
- func (*RagMetaFilter) ProtoMessage()
- func (x *RagMetaFilter) ProtoReflect() protoreflect.Message
- func (x *RagMetaFilter) Reset()
- func (x *RagMetaFilter) String() string
- type RagMetaFilterItem
- func (*RagMetaFilterItem) Descriptor() ([]byte, []int)deprecated
- func (x *RagMetaFilterItem) GetCondition() string
- func (x *RagMetaFilterItem) GetKey() string
- func (x *RagMetaFilterItem) GetType() string
- func (x *RagMetaFilterItem) GetValue() string
- func (*RagMetaFilterItem) ProtoMessage()
- func (x *RagMetaFilterItem) ProtoReflect() protoreflect.Message
- func (x *RagMetaFilterItem) Reset()
- func (x *RagMetaFilterItem) String() string
- type RagPerKnowledgeConfig
- func (*RagPerKnowledgeConfig) Descriptor() ([]byte, []int)deprecated
- func (x *RagPerKnowledgeConfig) GetGraphSwitch() int32
- func (x *RagPerKnowledgeConfig) GetKnowledgeId() string
- func (x *RagPerKnowledgeConfig) GetRagMetaFilter() *RagMetaFilter
- func (*RagPerKnowledgeConfig) ProtoMessage()
- func (x *RagPerKnowledgeConfig) ProtoReflect() protoreflect.Message
- func (x *RagPerKnowledgeConfig) Reset()
- func (x *RagPerKnowledgeConfig) String() string
- type RagSensitiveConfig
- func (*RagSensitiveConfig) Descriptor() ([]byte, []int)deprecated
- func (x *RagSensitiveConfig) GetEnable() bool
- func (x *RagSensitiveConfig) GetTableIds() []string
- func (*RagSensitiveConfig) ProtoMessage()
- func (x *RagSensitiveConfig) ProtoReflect() protoreflect.Message
- func (x *RagSensitiveConfig) Reset()
- func (x *RagSensitiveConfig) String() string
- type RagServiceClient
- type RagServiceServer
- type RagService_ChatRagClient
- type RagService_ChatRagServer
- type UnimplementedRagServiceServer
- func (UnimplementedRagServiceServer) ChatRag(*ChatRagReq, grpc.ServerStreamingServer[ChatRagResp]) error
- func (UnimplementedRagServiceServer) CopyRag(context.Context, *CopyRagReq) (*CreateRagResp, error)
- func (UnimplementedRagServiceServer) CreateRag(context.Context, *CreateRagReq) (*CreateRagResp, error)
- func (UnimplementedRagServiceServer) DeleteRag(context.Context, *RagDeleteReq) (*emptypb.Empty, error)
- func (UnimplementedRagServiceServer) GetRagByIds(context.Context, *GetRagByIdsReq) (*AppBriefList, error)
- func (UnimplementedRagServiceServer) GetRagDetail(context.Context, *RagDetailReq) (*RagInfo, error)
- func (UnimplementedRagServiceServer) ListRag(context.Context, *RagListReq) (*RagListResp, error)
- func (UnimplementedRagServiceServer) UpdateRag(context.Context, *UpdateRagReq) (*emptypb.Empty, error)
- func (UnimplementedRagServiceServer) UpdateRagConfig(context.Context, *UpdateRagConfigReq) (*emptypb.Empty, error)
- type UnsafeRagServiceServer
- type UpdateRagConfigReq
- func (*UpdateRagConfigReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRagConfigReq) GetKnowledgeBaseConfig() *RagKnowledgeBaseConfig
- func (x *UpdateRagConfigReq) GetModelConfig() *common.AppModelConfig
- func (x *UpdateRagConfigReq) GetRagId() string
- func (x *UpdateRagConfigReq) GetRerankConfig() *common.AppModelConfig
- func (x *UpdateRagConfigReq) GetSensitiveConfig() *RagSensitiveConfig
- func (*UpdateRagConfigReq) ProtoMessage()
- func (x *UpdateRagConfigReq) ProtoReflect() protoreflect.Message
- func (x *UpdateRagConfigReq) Reset()
- func (x *UpdateRagConfigReq) String() string
- type UpdateRagReq
- func (*UpdateRagReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRagReq) GetAppBrief() *common.AppBriefConfig
- func (x *UpdateRagReq) GetIdentity() *Identity
- func (x *UpdateRagReq) GetRagId() string
- func (*UpdateRagReq) ProtoMessage()
- func (x *UpdateRagReq) ProtoReflect() protoreflect.Message
- func (x *UpdateRagReq) Reset()
- func (x *UpdateRagReq) String() string
Constants ¶
const ( RagService_ChatRag_FullMethodName = "/rag_service.RagService/ChatRag" RagService_CreateRag_FullMethodName = "/rag_service.RagService/CreateRag" RagService_UpdateRag_FullMethodName = "/rag_service.RagService/UpdateRag" RagService_UpdateRagConfig_FullMethodName = "/rag_service.RagService/UpdateRagConfig" RagService_DeleteRag_FullMethodName = "/rag_service.RagService/DeleteRag" RagService_GetRagDetail_FullMethodName = "/rag_service.RagService/GetRagDetail" RagService_ListRag_FullMethodName = "/rag_service.RagService/ListRag" RagService_GetRagByIds_FullMethodName = "/rag_service.RagService/GetRagByIds" RagService_CopyRag_FullMethodName = "/rag_service.RagService/CopyRag" )
Variables ¶
var File_proto_rag_service_rag_service_proto protoreflect.FileDescriptor
var RagService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "rag_service.RagService", HandlerType: (*RagServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateRag", Handler: _RagService_CreateRag_Handler, }, { MethodName: "UpdateRag", Handler: _RagService_UpdateRag_Handler, }, { MethodName: "UpdateRagConfig", Handler: _RagService_UpdateRagConfig_Handler, }, { MethodName: "DeleteRag", Handler: _RagService_DeleteRag_Handler, }, { MethodName: "GetRagDetail", Handler: _RagService_GetRagDetail_Handler, }, { MethodName: "ListRag", Handler: _RagService_ListRag_Handler, }, { MethodName: "GetRagByIds", Handler: _RagService_GetRagByIds_Handler, }, { MethodName: "CopyRag", Handler: _RagService_CopyRag_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ChatRag", Handler: _RagService_ChatRag_Handler, ServerStreams: true, }, }, Metadata: "proto/rag-service/rag-service.proto", }
RagService_ServiceDesc is the grpc.ServiceDesc for RagService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRagServiceServer ¶
func RegisterRagServiceServer(s grpc.ServiceRegistrar, srv RagServiceServer)
Types ¶
type AppBriefList ¶
type AppBriefList struct {
RagInfos []*common.AppBrief `protobuf:"bytes,1,rep,name=ragInfos,proto3" json:"ragInfos,omitempty"`
// contains filtered or unexported fields
}
func (*AppBriefList) Descriptor
deprecated
func (*AppBriefList) Descriptor() ([]byte, []int)
Deprecated: Use AppBriefList.ProtoReflect.Descriptor instead.
func (*AppBriefList) GetRagInfos ¶
func (x *AppBriefList) GetRagInfos() []*common.AppBrief
func (*AppBriefList) ProtoMessage ¶
func (*AppBriefList) ProtoMessage()
func (*AppBriefList) ProtoReflect ¶
func (x *AppBriefList) ProtoReflect() protoreflect.Message
func (*AppBriefList) Reset ¶
func (x *AppBriefList) Reset()
func (*AppBriefList) String ¶
func (x *AppBriefList) String() string
type ChatRagReq ¶
type ChatRagReq struct {
RagId string `protobuf:"bytes,1,opt,name=ragId,proto3" json:"ragId,omitempty"`
Question string `protobuf:"bytes,2,opt,name=question,proto3" json:"question,omitempty"`
Identity *Identity `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"`
History []*HistoryItem `protobuf:"bytes,4,rep,name=history,proto3" json:"history,omitempty"`
// contains filtered or unexported fields
}
func (*ChatRagReq) Descriptor
deprecated
func (*ChatRagReq) Descriptor() ([]byte, []int)
Deprecated: Use ChatRagReq.ProtoReflect.Descriptor instead.
func (*ChatRagReq) GetHistory ¶ added in v0.2.3
func (x *ChatRagReq) GetHistory() []*HistoryItem
func (*ChatRagReq) GetIdentity ¶
func (x *ChatRagReq) GetIdentity() *Identity
func (*ChatRagReq) GetQuestion ¶
func (x *ChatRagReq) GetQuestion() string
func (*ChatRagReq) GetRagId ¶
func (x *ChatRagReq) GetRagId() string
func (*ChatRagReq) ProtoMessage ¶
func (*ChatRagReq) ProtoMessage()
func (*ChatRagReq) ProtoReflect ¶
func (x *ChatRagReq) ProtoReflect() protoreflect.Message
func (*ChatRagReq) Reset ¶
func (x *ChatRagReq) Reset()
func (*ChatRagReq) String ¶
func (x *ChatRagReq) String() string
type ChatRagResp ¶
type ChatRagResp struct {
Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
// contains filtered or unexported fields
}
func (*ChatRagResp) Descriptor
deprecated
func (*ChatRagResp) Descriptor() ([]byte, []int)
Deprecated: Use ChatRagResp.ProtoReflect.Descriptor instead.
func (*ChatRagResp) GetContent ¶
func (x *ChatRagResp) GetContent() string
func (*ChatRagResp) ProtoMessage ¶
func (*ChatRagResp) ProtoMessage()
func (*ChatRagResp) ProtoReflect ¶
func (x *ChatRagResp) ProtoReflect() protoreflect.Message
func (*ChatRagResp) Reset ¶
func (x *ChatRagResp) Reset()
func (*ChatRagResp) String ¶
func (x *ChatRagResp) String() string
type CopyRagReq ¶ added in v0.2.5
type CopyRagReq struct {
RagId string `protobuf:"bytes,1,opt,name=ragId,proto3" json:"ragId,omitempty"`
Identity *Identity `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
// contains filtered or unexported fields
}
func (*CopyRagReq) Descriptor
deprecated
added in
v0.2.5
func (*CopyRagReq) Descriptor() ([]byte, []int)
Deprecated: Use CopyRagReq.ProtoReflect.Descriptor instead.
func (*CopyRagReq) GetIdentity ¶ added in v0.2.5
func (x *CopyRagReq) GetIdentity() *Identity
func (*CopyRagReq) GetRagId ¶ added in v0.2.5
func (x *CopyRagReq) GetRagId() string
func (*CopyRagReq) ProtoMessage ¶ added in v0.2.5
func (*CopyRagReq) ProtoMessage()
func (*CopyRagReq) ProtoReflect ¶ added in v0.2.5
func (x *CopyRagReq) ProtoReflect() protoreflect.Message
func (*CopyRagReq) Reset ¶ added in v0.2.5
func (x *CopyRagReq) Reset()
func (*CopyRagReq) String ¶ added in v0.2.5
func (x *CopyRagReq) String() string
type CreateRagReq ¶
type CreateRagReq struct {
AppBrief *common.AppBriefConfig `protobuf:"bytes,1,opt,name=appBrief,proto3" json:"appBrief,omitempty"`
Identity *Identity `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
// contains filtered or unexported fields
}
func (*CreateRagReq) Descriptor
deprecated
func (*CreateRagReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateRagReq.ProtoReflect.Descriptor instead.
func (*CreateRagReq) GetAppBrief ¶
func (x *CreateRagReq) GetAppBrief() *common.AppBriefConfig
func (*CreateRagReq) GetIdentity ¶
func (x *CreateRagReq) GetIdentity() *Identity
func (*CreateRagReq) ProtoMessage ¶
func (*CreateRagReq) ProtoMessage()
func (*CreateRagReq) ProtoReflect ¶
func (x *CreateRagReq) ProtoReflect() protoreflect.Message
func (*CreateRagReq) Reset ¶
func (x *CreateRagReq) Reset()
func (*CreateRagReq) String ¶
func (x *CreateRagReq) String() string
type CreateRagResp ¶
type CreateRagResp struct {
RagId string `protobuf:"bytes,1,opt,name=ragId,proto3" json:"ragId,omitempty"`
// contains filtered or unexported fields
}
func (*CreateRagResp) Descriptor
deprecated
func (*CreateRagResp) Descriptor() ([]byte, []int)
Deprecated: Use CreateRagResp.ProtoReflect.Descriptor instead.
func (*CreateRagResp) GetRagId ¶
func (x *CreateRagResp) GetRagId() string
func (*CreateRagResp) ProtoMessage ¶
func (*CreateRagResp) ProtoMessage()
func (*CreateRagResp) ProtoReflect ¶
func (x *CreateRagResp) ProtoReflect() protoreflect.Message
func (*CreateRagResp) Reset ¶
func (x *CreateRagResp) Reset()
func (*CreateRagResp) String ¶
func (x *CreateRagResp) String() string
type GetRagByIdsReq ¶
type GetRagByIdsReq struct {
RagIdList []string `protobuf:"bytes,1,rep,name=ragIdList,proto3" json:"ragIdList,omitempty"`
// contains filtered or unexported fields
}
func (*GetRagByIdsReq) Descriptor
deprecated
func (*GetRagByIdsReq) Descriptor() ([]byte, []int)
Deprecated: Use GetRagByIdsReq.ProtoReflect.Descriptor instead.
func (*GetRagByIdsReq) GetRagIdList ¶
func (x *GetRagByIdsReq) GetRagIdList() []string
func (*GetRagByIdsReq) ProtoMessage ¶
func (*GetRagByIdsReq) ProtoMessage()
func (*GetRagByIdsReq) ProtoReflect ¶
func (x *GetRagByIdsReq) ProtoReflect() protoreflect.Message
func (*GetRagByIdsReq) Reset ¶
func (x *GetRagByIdsReq) Reset()
func (*GetRagByIdsReq) String ¶
func (x *GetRagByIdsReq) String() string
type HistoryItem ¶ added in v0.2.3
type HistoryItem struct {
Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
Response string `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"`
NeedHistory bool `protobuf:"varint,3,opt,name=needHistory,proto3" json:"needHistory,omitempty"`
// contains filtered or unexported fields
}
func (*HistoryItem) Descriptor
deprecated
added in
v0.2.3
func (*HistoryItem) Descriptor() ([]byte, []int)
Deprecated: Use HistoryItem.ProtoReflect.Descriptor instead.
func (*HistoryItem) GetNeedHistory ¶ added in v0.2.3
func (x *HistoryItem) GetNeedHistory() bool
func (*HistoryItem) GetQuery ¶ added in v0.2.3
func (x *HistoryItem) GetQuery() string
func (*HistoryItem) GetResponse ¶ added in v0.2.3
func (x *HistoryItem) GetResponse() string
func (*HistoryItem) ProtoMessage ¶ added in v0.2.3
func (*HistoryItem) ProtoMessage()
func (*HistoryItem) ProtoReflect ¶ added in v0.2.3
func (x *HistoryItem) ProtoReflect() protoreflect.Message
func (*HistoryItem) Reset ¶ added in v0.2.3
func (x *HistoryItem) Reset()
func (*HistoryItem) String ¶ added in v0.2.3
func (x *HistoryItem) String() string
type Identity ¶
type Identity struct {
UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
OrgId string `protobuf:"bytes,2,opt,name=orgId,proto3" json:"orgId,omitempty"`
// contains filtered or unexported fields
}
func (*Identity) Descriptor
deprecated
func (*Identity) ProtoMessage ¶
func (*Identity) ProtoMessage()
func (*Identity) ProtoReflect ¶
func (x *Identity) ProtoReflect() protoreflect.Message
type RagDeleteReq ¶
type RagDeleteReq struct {
RagId string `protobuf:"bytes,1,opt,name=ragId,proto3" json:"ragId,omitempty"`
// contains filtered or unexported fields
}
func (*RagDeleteReq) Descriptor
deprecated
func (*RagDeleteReq) Descriptor() ([]byte, []int)
Deprecated: Use RagDeleteReq.ProtoReflect.Descriptor instead.
func (*RagDeleteReq) GetRagId ¶
func (x *RagDeleteReq) GetRagId() string
func (*RagDeleteReq) ProtoMessage ¶
func (*RagDeleteReq) ProtoMessage()
func (*RagDeleteReq) ProtoReflect ¶
func (x *RagDeleteReq) ProtoReflect() protoreflect.Message
func (*RagDeleteReq) Reset ¶
func (x *RagDeleteReq) Reset()
func (*RagDeleteReq) String ¶
func (x *RagDeleteReq) String() string
type RagDetailReq ¶
type RagDetailReq struct {
RagId string `protobuf:"bytes,1,opt,name=ragId,proto3" json:"ragId,omitempty"`
// contains filtered or unexported fields
}
func (*RagDetailReq) Descriptor
deprecated
func (*RagDetailReq) Descriptor() ([]byte, []int)
Deprecated: Use RagDetailReq.ProtoReflect.Descriptor instead.
func (*RagDetailReq) GetRagId ¶
func (x *RagDetailReq) GetRagId() string
func (*RagDetailReq) ProtoMessage ¶
func (*RagDetailReq) ProtoMessage()
func (*RagDetailReq) ProtoReflect ¶
func (x *RagDetailReq) ProtoReflect() protoreflect.Message
func (*RagDetailReq) Reset ¶
func (x *RagDetailReq) Reset()
func (*RagDetailReq) String ¶
func (x *RagDetailReq) String() string
type RagGlobalConfig ¶ added in v0.2.2
type RagGlobalConfig struct {
MaxHistory int32 `protobuf:"varint,1,opt,name=maxHistory,proto3" json:"maxHistory,omitempty"` // 最长上下文
Threshold float32 `protobuf:"fixed32,2,opt,name=threshold,proto3" json:"threshold,omitempty"` // 过滤阈值
TopK int32 `protobuf:"varint,3,opt,name=topK,proto3" json:"topK,omitempty"` // topK
MatchType string `protobuf:"bytes,4,opt,name=matchType,proto3" json:"matchType,omitempty"` //matchType:vector(向量检索)、text(文本检索)、mix(混合检索:向量+文本)
KeywordPriority float32 `protobuf:"fixed32,5,opt,name=keywordPriority,proto3" json:"keywordPriority,omitempty"` // 关键词权重
PriorityMatch int32 `protobuf:"varint,6,opt,name=priorityMatch,proto3" json:"priorityMatch,omitempty"` // 权重匹配,只有在混合检索模式下,选择权重设置后,这个才设置为1
SemanticsPriority float32 `protobuf:"fixed32,7,opt,name=semanticsPriority,proto3" json:"semanticsPriority,omitempty"` // 语义权重
TermWeight float32 `protobuf:"fixed32,8,opt,name=termWeight,proto3" json:"termWeight,omitempty"` // 关键词系数,默认为1
TermWeightEnable bool `protobuf:"varint,9,opt,name=termWeightEnable,proto3" json:"termWeightEnable,omitempty"` // 关键词系数开关
UseGraph bool `protobuf:"varint,10,opt,name=useGraph,proto3" json:"useGraph,omitempty"` // 知识图谱开关
// contains filtered or unexported fields
}
func (*RagGlobalConfig) Descriptor
deprecated
added in
v0.2.2
func (*RagGlobalConfig) Descriptor() ([]byte, []int)
Deprecated: Use RagGlobalConfig.ProtoReflect.Descriptor instead.
func (*RagGlobalConfig) GetKeywordPriority ¶ added in v0.2.2
func (x *RagGlobalConfig) GetKeywordPriority() float32
func (*RagGlobalConfig) GetMatchType ¶ added in v0.2.2
func (x *RagGlobalConfig) GetMatchType() string
func (*RagGlobalConfig) GetMaxHistory ¶ added in v0.2.2
func (x *RagGlobalConfig) GetMaxHistory() int32
func (*RagGlobalConfig) GetPriorityMatch ¶ added in v0.2.2
func (x *RagGlobalConfig) GetPriorityMatch() int32
func (*RagGlobalConfig) GetSemanticsPriority ¶ added in v0.2.2
func (x *RagGlobalConfig) GetSemanticsPriority() float32
func (*RagGlobalConfig) GetTermWeight ¶ added in v0.2.2
func (x *RagGlobalConfig) GetTermWeight() float32
func (*RagGlobalConfig) GetTermWeightEnable ¶ added in v0.2.2
func (x *RagGlobalConfig) GetTermWeightEnable() bool
func (*RagGlobalConfig) GetThreshold ¶ added in v0.2.2
func (x *RagGlobalConfig) GetThreshold() float32
func (*RagGlobalConfig) GetTopK ¶ added in v0.2.2
func (x *RagGlobalConfig) GetTopK() int32
func (*RagGlobalConfig) GetUseGraph ¶ added in v0.2.7
func (x *RagGlobalConfig) GetUseGraph() bool
func (*RagGlobalConfig) ProtoMessage ¶ added in v0.2.2
func (*RagGlobalConfig) ProtoMessage()
func (*RagGlobalConfig) ProtoReflect ¶ added in v0.2.2
func (x *RagGlobalConfig) ProtoReflect() protoreflect.Message
func (*RagGlobalConfig) Reset ¶ added in v0.2.2
func (x *RagGlobalConfig) Reset()
func (*RagGlobalConfig) String ¶ added in v0.2.2
func (x *RagGlobalConfig) String() string
type RagInfo ¶
type RagInfo struct {
RagId string `protobuf:"bytes,1,opt,name=ragId,proto3" json:"ragId,omitempty"`
BriefConfig *common.AppBriefConfig `protobuf:"bytes,2,opt,name=briefConfig,proto3" json:"briefConfig,omitempty"`
ModelConfig *common.AppModelConfig `protobuf:"bytes,3,opt,name=modelConfig,proto3" json:"modelConfig,omitempty"` // 模型
RerankConfig *common.AppModelConfig `protobuf:"bytes,4,opt,name=rerankConfig,proto3" json:"rerankConfig,omitempty"` // Rerank模型
KnowledgeBaseConfig *RagKnowledgeBaseConfig `protobuf:"bytes,5,opt,name=knowledgeBaseConfig,proto3" json:"knowledgeBaseConfig,omitempty"` // 知识库
SensitiveConfig *RagSensitiveConfig `protobuf:"bytes,6,opt,name=sensitiveConfig,proto3" json:"sensitiveConfig,omitempty"` // 安全护栏
Identity *Identity `protobuf:"bytes,7,opt,name=identity,proto3" json:"identity,omitempty"`
// contains filtered or unexported fields
}
func (*RagInfo) Descriptor
deprecated
func (*RagInfo) GetBriefConfig ¶
func (x *RagInfo) GetBriefConfig() *common.AppBriefConfig
func (*RagInfo) GetIdentity ¶
func (*RagInfo) GetKnowledgeBaseConfig ¶
func (x *RagInfo) GetKnowledgeBaseConfig() *RagKnowledgeBaseConfig
func (*RagInfo) GetModelConfig ¶
func (x *RagInfo) GetModelConfig() *common.AppModelConfig
func (*RagInfo) GetRerankConfig ¶
func (x *RagInfo) GetRerankConfig() *common.AppModelConfig
func (*RagInfo) GetSensitiveConfig ¶ added in v0.1.5
func (x *RagInfo) GetSensitiveConfig() *RagSensitiveConfig
func (*RagInfo) ProtoMessage ¶
func (*RagInfo) ProtoMessage()
func (*RagInfo) ProtoReflect ¶
func (x *RagInfo) ProtoReflect() protoreflect.Message
type RagKnowledgeBaseConfig ¶
type RagKnowledgeBaseConfig struct {
PerKnowledgeConfigs []*RagPerKnowledgeConfig `protobuf:"bytes,1,rep,name=perKnowledgeConfigs,proto3" json:"perKnowledgeConfigs,omitempty"`
GlobalConfig *RagGlobalConfig `protobuf:"bytes,2,opt,name=globalConfig,proto3" json:"globalConfig,omitempty"`
// contains filtered or unexported fields
}
func (*RagKnowledgeBaseConfig) Descriptor
deprecated
func (*RagKnowledgeBaseConfig) Descriptor() ([]byte, []int)
Deprecated: Use RagKnowledgeBaseConfig.ProtoReflect.Descriptor instead.
func (*RagKnowledgeBaseConfig) GetGlobalConfig ¶ added in v0.2.2
func (x *RagKnowledgeBaseConfig) GetGlobalConfig() *RagGlobalConfig
func (*RagKnowledgeBaseConfig) GetPerKnowledgeConfigs ¶ added in v0.2.2
func (x *RagKnowledgeBaseConfig) GetPerKnowledgeConfigs() []*RagPerKnowledgeConfig
func (*RagKnowledgeBaseConfig) ProtoMessage ¶
func (*RagKnowledgeBaseConfig) ProtoMessage()
func (*RagKnowledgeBaseConfig) ProtoReflect ¶
func (x *RagKnowledgeBaseConfig) ProtoReflect() protoreflect.Message
func (*RagKnowledgeBaseConfig) Reset ¶
func (x *RagKnowledgeBaseConfig) Reset()
func (*RagKnowledgeBaseConfig) String ¶
func (x *RagKnowledgeBaseConfig) String() string
type RagListReq ¶
type RagListReq struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Identity *Identity `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
// contains filtered or unexported fields
}
func (*RagListReq) Descriptor
deprecated
func (*RagListReq) Descriptor() ([]byte, []int)
Deprecated: Use RagListReq.ProtoReflect.Descriptor instead.
func (*RagListReq) GetIdentity ¶
func (x *RagListReq) GetIdentity() *Identity
func (*RagListReq) GetName ¶
func (x *RagListReq) GetName() string
func (*RagListReq) ProtoMessage ¶
func (*RagListReq) ProtoMessage()
func (*RagListReq) ProtoReflect ¶
func (x *RagListReq) ProtoReflect() protoreflect.Message
func (*RagListReq) Reset ¶
func (x *RagListReq) Reset()
func (*RagListReq) String ¶
func (x *RagListReq) String() string
type RagListResp ¶
type RagListResp struct {
RagInfos []*common.AppBrief `protobuf:"bytes,1,rep,name=ragInfos,proto3" json:"ragInfos,omitempty"`
Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
// contains filtered or unexported fields
}
func (*RagListResp) Descriptor
deprecated
func (*RagListResp) Descriptor() ([]byte, []int)
Deprecated: Use RagListResp.ProtoReflect.Descriptor instead.
func (*RagListResp) GetRagInfos ¶
func (x *RagListResp) GetRagInfos() []*common.AppBrief
func (*RagListResp) GetTotal ¶
func (x *RagListResp) GetTotal() int64
func (*RagListResp) ProtoMessage ¶
func (*RagListResp) ProtoMessage()
func (*RagListResp) ProtoReflect ¶
func (x *RagListResp) ProtoReflect() protoreflect.Message
func (*RagListResp) Reset ¶
func (x *RagListResp) Reset()
func (*RagListResp) String ¶
func (x *RagListResp) String() string
type RagMetaFilter ¶ added in v0.2.2
type RagMetaFilter struct {
FilterEnable bool `protobuf:"varint,1,opt,name=filterEnable,proto3" json:"filterEnable,omitempty"`
FilterLogicType string `protobuf:"bytes,2,opt,name=filterLogicType,proto3" json:"filterLogicType,omitempty"`
FilterItems []*RagMetaFilterItem `protobuf:"bytes,3,rep,name=filterItems,proto3" json:"filterItems,omitempty"`
// contains filtered or unexported fields
}
func (*RagMetaFilter) Descriptor
deprecated
added in
v0.2.2
func (*RagMetaFilter) Descriptor() ([]byte, []int)
Deprecated: Use RagMetaFilter.ProtoReflect.Descriptor instead.
func (*RagMetaFilter) GetFilterEnable ¶ added in v0.2.2
func (x *RagMetaFilter) GetFilterEnable() bool
func (*RagMetaFilter) GetFilterItems ¶ added in v0.2.2
func (x *RagMetaFilter) GetFilterItems() []*RagMetaFilterItem
func (*RagMetaFilter) GetFilterLogicType ¶ added in v0.2.2
func (x *RagMetaFilter) GetFilterLogicType() string
func (*RagMetaFilter) ProtoMessage ¶ added in v0.2.2
func (*RagMetaFilter) ProtoMessage()
func (*RagMetaFilter) ProtoReflect ¶ added in v0.2.2
func (x *RagMetaFilter) ProtoReflect() protoreflect.Message
func (*RagMetaFilter) Reset ¶ added in v0.2.2
func (x *RagMetaFilter) Reset()
func (*RagMetaFilter) String ¶ added in v0.2.2
func (x *RagMetaFilter) String() string
type RagMetaFilterItem ¶ added in v0.2.2
type RagMetaFilterItem struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
Condition string `protobuf:"bytes,4,opt,name=condition,proto3" json:"condition,omitempty"`
// contains filtered or unexported fields
}
func (*RagMetaFilterItem) Descriptor
deprecated
added in
v0.2.2
func (*RagMetaFilterItem) Descriptor() ([]byte, []int)
Deprecated: Use RagMetaFilterItem.ProtoReflect.Descriptor instead.
func (*RagMetaFilterItem) GetCondition ¶ added in v0.2.2
func (x *RagMetaFilterItem) GetCondition() string
func (*RagMetaFilterItem) GetKey ¶ added in v0.2.2
func (x *RagMetaFilterItem) GetKey() string
func (*RagMetaFilterItem) GetType ¶ added in v0.2.2
func (x *RagMetaFilterItem) GetType() string
func (*RagMetaFilterItem) GetValue ¶ added in v0.2.2
func (x *RagMetaFilterItem) GetValue() string
func (*RagMetaFilterItem) ProtoMessage ¶ added in v0.2.2
func (*RagMetaFilterItem) ProtoMessage()
func (*RagMetaFilterItem) ProtoReflect ¶ added in v0.2.2
func (x *RagMetaFilterItem) ProtoReflect() protoreflect.Message
func (*RagMetaFilterItem) Reset ¶ added in v0.2.2
func (x *RagMetaFilterItem) Reset()
func (*RagMetaFilterItem) String ¶ added in v0.2.2
func (x *RagMetaFilterItem) String() string
type RagPerKnowledgeConfig ¶ added in v0.2.2
type RagPerKnowledgeConfig struct {
KnowledgeId string `protobuf:"bytes,1,opt,name=knowledgeId,proto3" json:"knowledgeId,omitempty"`
GraphSwitch int32 `protobuf:"varint,2,opt,name=graphSwitch,proto3" json:"graphSwitch,omitempty"`
RagMetaFilter *RagMetaFilter `protobuf:"bytes,3,opt,name=ragMetaFilter,proto3" json:"ragMetaFilter,omitempty"`
// contains filtered or unexported fields
}
func (*RagPerKnowledgeConfig) Descriptor
deprecated
added in
v0.2.2
func (*RagPerKnowledgeConfig) Descriptor() ([]byte, []int)
Deprecated: Use RagPerKnowledgeConfig.ProtoReflect.Descriptor instead.
func (*RagPerKnowledgeConfig) GetGraphSwitch ¶ added in v0.2.7
func (x *RagPerKnowledgeConfig) GetGraphSwitch() int32
func (*RagPerKnowledgeConfig) GetKnowledgeId ¶ added in v0.2.2
func (x *RagPerKnowledgeConfig) GetKnowledgeId() string
func (*RagPerKnowledgeConfig) GetRagMetaFilter ¶ added in v0.2.2
func (x *RagPerKnowledgeConfig) GetRagMetaFilter() *RagMetaFilter
func (*RagPerKnowledgeConfig) ProtoMessage ¶ added in v0.2.2
func (*RagPerKnowledgeConfig) ProtoMessage()
func (*RagPerKnowledgeConfig) ProtoReflect ¶ added in v0.2.2
func (x *RagPerKnowledgeConfig) ProtoReflect() protoreflect.Message
func (*RagPerKnowledgeConfig) Reset ¶ added in v0.2.2
func (x *RagPerKnowledgeConfig) Reset()
func (*RagPerKnowledgeConfig) String ¶ added in v0.2.2
func (x *RagPerKnowledgeConfig) String() string
type RagSensitiveConfig ¶ added in v0.1.5
type RagSensitiveConfig struct {
Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"` // 是否启用安全护栏
TableIds []string `protobuf:"bytes,2,rep,name=tableIds,proto3" json:"tableIds,omitempty"` // 敏感词表id
// contains filtered or unexported fields
}
func (*RagSensitiveConfig) Descriptor
deprecated
added in
v0.1.5
func (*RagSensitiveConfig) Descriptor() ([]byte, []int)
Deprecated: Use RagSensitiveConfig.ProtoReflect.Descriptor instead.
func (*RagSensitiveConfig) GetEnable ¶ added in v0.1.5
func (x *RagSensitiveConfig) GetEnable() bool
func (*RagSensitiveConfig) GetTableIds ¶ added in v0.1.5
func (x *RagSensitiveConfig) GetTableIds() []string
func (*RagSensitiveConfig) ProtoMessage ¶ added in v0.1.5
func (*RagSensitiveConfig) ProtoMessage()
func (*RagSensitiveConfig) ProtoReflect ¶ added in v0.1.5
func (x *RagSensitiveConfig) ProtoReflect() protoreflect.Message
func (*RagSensitiveConfig) Reset ¶ added in v0.1.5
func (x *RagSensitiveConfig) Reset()
func (*RagSensitiveConfig) String ¶ added in v0.1.5
func (x *RagSensitiveConfig) String() string
type RagServiceClient ¶
type RagServiceClient interface {
// 流式对话
ChatRag(ctx context.Context, in *ChatRagReq, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ChatRagResp], error)
// 创建 rag
CreateRag(ctx context.Context, in *CreateRagReq, opts ...grpc.CallOption) (*CreateRagResp, error)
// 更新 rag 基本信息
UpdateRag(ctx context.Context, in *UpdateRagReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
// 更新 rag 配置信息
UpdateRagConfig(ctx context.Context, in *UpdateRagConfigReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
// 删除 rag
DeleteRag(ctx context.Context, in *RagDeleteReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
// 获取 rag
GetRagDetail(ctx context.Context, in *RagDetailReq, opts ...grpc.CallOption) (*RagInfo, error)
// 获取 rag 列表
ListRag(ctx context.Context, in *RagListReq, opts ...grpc.CallOption) (*RagListResp, error)
// 根据 ragIds 获取 rag 列表
GetRagByIds(ctx context.Context, in *GetRagByIdsReq, opts ...grpc.CallOption) (*AppBriefList, error)
// 复制 rag
CopyRag(ctx context.Context, in *CopyRagReq, opts ...grpc.CallOption) (*CreateRagResp, error)
}
RagServiceClient is the client API for RagService 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.
func NewRagServiceClient ¶
func NewRagServiceClient(cc grpc.ClientConnInterface) RagServiceClient
type RagServiceServer ¶
type RagServiceServer interface {
// 流式对话
ChatRag(*ChatRagReq, grpc.ServerStreamingServer[ChatRagResp]) error
// 创建 rag
CreateRag(context.Context, *CreateRagReq) (*CreateRagResp, error)
// 更新 rag 基本信息
UpdateRag(context.Context, *UpdateRagReq) (*emptypb.Empty, error)
// 更新 rag 配置信息
UpdateRagConfig(context.Context, *UpdateRagConfigReq) (*emptypb.Empty, error)
// 删除 rag
DeleteRag(context.Context, *RagDeleteReq) (*emptypb.Empty, error)
// 获取 rag
GetRagDetail(context.Context, *RagDetailReq) (*RagInfo, error)
// 获取 rag 列表
ListRag(context.Context, *RagListReq) (*RagListResp, error)
// 根据 ragIds 获取 rag 列表
GetRagByIds(context.Context, *GetRagByIdsReq) (*AppBriefList, error)
// 复制 rag
CopyRag(context.Context, *CopyRagReq) (*CreateRagResp, error)
// contains filtered or unexported methods
}
RagServiceServer is the server API for RagService service. All implementations must embed UnimplementedRagServiceServer for forward compatibility.
type RagService_ChatRagClient ¶
type RagService_ChatRagClient = grpc.ServerStreamingClient[ChatRagResp]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type RagService_ChatRagServer ¶
type RagService_ChatRagServer = grpc.ServerStreamingServer[ChatRagResp]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type UnimplementedRagServiceServer ¶
type UnimplementedRagServiceServer struct{}
UnimplementedRagServiceServer 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.
func (UnimplementedRagServiceServer) ChatRag ¶
func (UnimplementedRagServiceServer) ChatRag(*ChatRagReq, grpc.ServerStreamingServer[ChatRagResp]) error
func (UnimplementedRagServiceServer) CopyRag ¶ added in v0.2.5
func (UnimplementedRagServiceServer) CopyRag(context.Context, *CopyRagReq) (*CreateRagResp, error)
func (UnimplementedRagServiceServer) CreateRag ¶
func (UnimplementedRagServiceServer) CreateRag(context.Context, *CreateRagReq) (*CreateRagResp, error)
func (UnimplementedRagServiceServer) DeleteRag ¶
func (UnimplementedRagServiceServer) DeleteRag(context.Context, *RagDeleteReq) (*emptypb.Empty, error)
func (UnimplementedRagServiceServer) GetRagByIds ¶
func (UnimplementedRagServiceServer) GetRagByIds(context.Context, *GetRagByIdsReq) (*AppBriefList, error)
func (UnimplementedRagServiceServer) GetRagDetail ¶
func (UnimplementedRagServiceServer) GetRagDetail(context.Context, *RagDetailReq) (*RagInfo, error)
func (UnimplementedRagServiceServer) ListRag ¶
func (UnimplementedRagServiceServer) ListRag(context.Context, *RagListReq) (*RagListResp, error)
func (UnimplementedRagServiceServer) UpdateRag ¶
func (UnimplementedRagServiceServer) UpdateRag(context.Context, *UpdateRagReq) (*emptypb.Empty, error)
func (UnimplementedRagServiceServer) UpdateRagConfig ¶
func (UnimplementedRagServiceServer) UpdateRagConfig(context.Context, *UpdateRagConfigReq) (*emptypb.Empty, error)
type UnsafeRagServiceServer ¶
type UnsafeRagServiceServer interface {
// contains filtered or unexported methods
}
UnsafeRagServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RagServiceServer will result in compilation errors.
type UpdateRagConfigReq ¶
type UpdateRagConfigReq struct {
RagId string `protobuf:"bytes,1,opt,name=ragId,proto3" json:"ragId,omitempty"`
ModelConfig *common.AppModelConfig `protobuf:"bytes,2,opt,name=modelConfig,proto3" json:"modelConfig,omitempty"` // 模型
RerankConfig *common.AppModelConfig `protobuf:"bytes,3,opt,name=rerankConfig,proto3" json:"rerankConfig,omitempty"` // Rerank模型
KnowledgeBaseConfig *RagKnowledgeBaseConfig `protobuf:"bytes,4,opt,name=knowledgeBaseConfig,proto3" json:"knowledgeBaseConfig,omitempty"` // 知识库
SensitiveConfig *RagSensitiveConfig `protobuf:"bytes,5,opt,name=sensitiveConfig,proto3" json:"sensitiveConfig,omitempty"` // 安全护栏
// contains filtered or unexported fields
}
func (*UpdateRagConfigReq) Descriptor
deprecated
func (*UpdateRagConfigReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRagConfigReq.ProtoReflect.Descriptor instead.
func (*UpdateRagConfigReq) GetKnowledgeBaseConfig ¶
func (x *UpdateRagConfigReq) GetKnowledgeBaseConfig() *RagKnowledgeBaseConfig
func (*UpdateRagConfigReq) GetModelConfig ¶
func (x *UpdateRagConfigReq) GetModelConfig() *common.AppModelConfig
func (*UpdateRagConfigReq) GetRagId ¶
func (x *UpdateRagConfigReq) GetRagId() string
func (*UpdateRagConfigReq) GetRerankConfig ¶
func (x *UpdateRagConfigReq) GetRerankConfig() *common.AppModelConfig
func (*UpdateRagConfigReq) GetSensitiveConfig ¶ added in v0.1.5
func (x *UpdateRagConfigReq) GetSensitiveConfig() *RagSensitiveConfig
func (*UpdateRagConfigReq) ProtoMessage ¶
func (*UpdateRagConfigReq) ProtoMessage()
func (*UpdateRagConfigReq) ProtoReflect ¶
func (x *UpdateRagConfigReq) ProtoReflect() protoreflect.Message
func (*UpdateRagConfigReq) Reset ¶
func (x *UpdateRagConfigReq) Reset()
func (*UpdateRagConfigReq) String ¶
func (x *UpdateRagConfigReq) String() string
type UpdateRagReq ¶
type UpdateRagReq struct {
RagId string `protobuf:"bytes,1,opt,name=ragId,proto3" json:"ragId,omitempty"`
AppBrief *common.AppBriefConfig `protobuf:"bytes,2,opt,name=appBrief,proto3" json:"appBrief,omitempty"`
Identity *Identity `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"`
// contains filtered or unexported fields
}
func (*UpdateRagReq) Descriptor
deprecated
func (*UpdateRagReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRagReq.ProtoReflect.Descriptor instead.
func (*UpdateRagReq) GetAppBrief ¶
func (x *UpdateRagReq) GetAppBrief() *common.AppBriefConfig
func (*UpdateRagReq) GetIdentity ¶ added in v0.2.5
func (x *UpdateRagReq) GetIdentity() *Identity
func (*UpdateRagReq) GetRagId ¶
func (x *UpdateRagReq) GetRagId() string
func (*UpdateRagReq) ProtoMessage ¶
func (*UpdateRagReq) ProtoMessage()
func (*UpdateRagReq) ProtoReflect ¶
func (x *UpdateRagReq) ProtoReflect() protoreflect.Message
func (*UpdateRagReq) Reset ¶
func (x *UpdateRagReq) Reset()
func (*UpdateRagReq) String ¶
func (x *UpdateRagReq) String() string