Documentation
¶
Index ¶
- Variables
- func RegisterAIServiceServer(s *grpc.Server, srv AIServiceServer)
- type AIServiceClient
- type AIServiceServer
- type ChatAIRequest
- func (*ChatAIRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChatAIRequest) GetChatHistory() []*ChatHistory
- func (x *ChatAIRequest) GetQuestion() string
- func (*ChatAIRequest) ProtoMessage()
- func (x *ChatAIRequest) ProtoReflect() protoreflect.Message
- func (x *ChatAIRequest) Reset()
- func (x *ChatAIRequest) String() string
- func (m *ChatAIRequest) Validate() error
- func (m *ChatAIRequest) ValidateAll() error
- type ChatAIRequestMultiError
- type ChatAIRequestValidationError
- func (e ChatAIRequestValidationError) Cause() error
- func (e ChatAIRequestValidationError) Error() string
- func (e ChatAIRequestValidationError) ErrorName() string
- func (e ChatAIRequestValidationError) Field() string
- func (e ChatAIRequestValidationError) Key() bool
- func (e ChatAIRequestValidationError) Reason() string
- type ChatAIResponse
- func (*ChatAIResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ChatAIResponse) GetAnswer() string
- func (*ChatAIResponse) ProtoMessage()
- func (x *ChatAIResponse) ProtoReflect() protoreflect.Message
- func (x *ChatAIResponse) Reset()
- func (x *ChatAIResponse) String() string
- func (m *ChatAIResponse) Validate() error
- func (m *ChatAIResponse) ValidateAll() error
- type ChatAIResponseMultiError
- type ChatAIResponseValidationError
- func (e ChatAIResponseValidationError) Cause() error
- func (e ChatAIResponseValidationError) Error() string
- func (e ChatAIResponseValidationError) ErrorName() string
- func (e ChatAIResponseValidationError) Field() string
- func (e ChatAIResponseValidationError) Key() bool
- func (e ChatAIResponseValidationError) Reason() string
- type ChatHistory
- func (*ChatHistory) Descriptor() ([]byte, []int)deprecated
- func (x *ChatHistory) GetContent() string
- func (x *ChatHistory) GetRole() ChatRole
- func (*ChatHistory) ProtoMessage()
- func (x *ChatHistory) ProtoReflect() protoreflect.Message
- func (x *ChatHistory) Reset()
- func (x *ChatHistory) String() string
- func (m *ChatHistory) Validate() error
- func (m *ChatHistory) ValidateAll() error
- type ChatHistoryMultiError
- type ChatHistoryValidationError
- func (e ChatHistoryValidationError) Cause() error
- func (e ChatHistoryValidationError) Error() string
- func (e ChatHistoryValidationError) ErrorName() string
- func (e ChatHistoryValidationError) Field() string
- func (e ChatHistoryValidationError) Key() bool
- func (e ChatHistoryValidationError) Reason() string
- type ChatRole
- type UnimplementedAIServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( ChatRole_name = map[int32]string{ 0: "CHAT_ROLE_UNSPECIFIED", 1: "CHAT_ROLE_USER", 2: "CHAT_ROLE_ASSISTANT", 3: "CHAT_ROLE_SYSTEM", } ChatRole_value = map[string]int32{ "CHAT_ROLE_UNSPECIFIED": 0, "CHAT_ROLE_USER": 1, "CHAT_ROLE_ASSISTANT": 2, "CHAT_ROLE_SYSTEM": 3, } )
Enum value maps for ChatRole.
var File_ai_entity_proto protoreflect.FileDescriptor
var File_ai_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAIServiceServer ¶
func RegisterAIServiceServer(s *grpc.Server, srv AIServiceServer)
Types ¶
type AIServiceClient ¶
type AIServiceClient interface {
ChatAI(ctx context.Context, in *ChatAIRequest, opts ...grpc.CallOption) (*ChatAIResponse, error)
}
AIServiceClient is the client API for AIService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAIServiceClient ¶
func NewAIServiceClient(cc grpc.ClientConnInterface) AIServiceClient
type AIServiceServer ¶
type AIServiceServer interface {
ChatAI(context.Context, *ChatAIRequest) (*ChatAIResponse, error)
}
AIServiceServer is the server API for AIService service.
type ChatAIRequest ¶
type ChatAIRequest struct { Question string `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"` // Required ChatHistory []*ChatHistory `protobuf:"bytes,2,rep,name=chat_history,json=chatHistory,proto3" json:"chat_history,omitempty"` // contains filtered or unexported fields }
func (*ChatAIRequest) Descriptor
deprecated
func (*ChatAIRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChatAIRequest.ProtoReflect.Descriptor instead.
func (*ChatAIRequest) GetChatHistory ¶
func (x *ChatAIRequest) GetChatHistory() []*ChatHistory
func (*ChatAIRequest) GetQuestion ¶
func (x *ChatAIRequest) GetQuestion() string
func (*ChatAIRequest) ProtoMessage ¶
func (*ChatAIRequest) ProtoMessage()
func (*ChatAIRequest) ProtoReflect ¶
func (x *ChatAIRequest) ProtoReflect() protoreflect.Message
func (*ChatAIRequest) Reset ¶
func (x *ChatAIRequest) Reset()
func (*ChatAIRequest) String ¶
func (x *ChatAIRequest) String() string
func (*ChatAIRequest) Validate ¶
func (m *ChatAIRequest) Validate() error
Validate checks the field values on ChatAIRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ChatAIRequest) ValidateAll ¶
func (m *ChatAIRequest) ValidateAll() error
ValidateAll checks the field values on ChatAIRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ChatAIRequestMultiError, or nil if none found.
type ChatAIRequestMultiError ¶
type ChatAIRequestMultiError []error
ChatAIRequestMultiError is an error wrapping multiple validation errors returned by ChatAIRequest.ValidateAll() if the designated constraints aren't met.
func (ChatAIRequestMultiError) AllErrors ¶
func (m ChatAIRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ChatAIRequestMultiError) Error ¶
func (m ChatAIRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ChatAIRequestValidationError ¶
type ChatAIRequestValidationError struct {
// contains filtered or unexported fields
}
ChatAIRequestValidationError is the validation error returned by ChatAIRequest.Validate if the designated constraints aren't met.
func (ChatAIRequestValidationError) Cause ¶
func (e ChatAIRequestValidationError) Cause() error
Cause function returns cause value.
func (ChatAIRequestValidationError) Error ¶
func (e ChatAIRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ChatAIRequestValidationError) ErrorName ¶
func (e ChatAIRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ChatAIRequestValidationError) Field ¶
func (e ChatAIRequestValidationError) Field() string
Field function returns field value.
func (ChatAIRequestValidationError) Key ¶
func (e ChatAIRequestValidationError) Key() bool
Key function returns key value.
func (ChatAIRequestValidationError) Reason ¶
func (e ChatAIRequestValidationError) Reason() string
Reason function returns reason value.
type ChatAIResponse ¶
type ChatAIResponse struct { Answer string `protobuf:"bytes,1,opt,name=answer,proto3" json:"answer,omitempty"` // contains filtered or unexported fields }
func (*ChatAIResponse) Descriptor
deprecated
func (*ChatAIResponse) Descriptor() ([]byte, []int)
Deprecated: Use ChatAIResponse.ProtoReflect.Descriptor instead.
func (*ChatAIResponse) GetAnswer ¶
func (x *ChatAIResponse) GetAnswer() string
func (*ChatAIResponse) ProtoMessage ¶
func (*ChatAIResponse) ProtoMessage()
func (*ChatAIResponse) ProtoReflect ¶
func (x *ChatAIResponse) ProtoReflect() protoreflect.Message
func (*ChatAIResponse) Reset ¶
func (x *ChatAIResponse) Reset()
func (*ChatAIResponse) String ¶
func (x *ChatAIResponse) String() string
func (*ChatAIResponse) Validate ¶
func (m *ChatAIResponse) Validate() error
Validate checks the field values on ChatAIResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ChatAIResponse) ValidateAll ¶
func (m *ChatAIResponse) ValidateAll() error
ValidateAll checks the field values on ChatAIResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ChatAIResponseMultiError, or nil if none found.
type ChatAIResponseMultiError ¶
type ChatAIResponseMultiError []error
ChatAIResponseMultiError is an error wrapping multiple validation errors returned by ChatAIResponse.ValidateAll() if the designated constraints aren't met.
func (ChatAIResponseMultiError) AllErrors ¶
func (m ChatAIResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ChatAIResponseMultiError) Error ¶
func (m ChatAIResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ChatAIResponseValidationError ¶
type ChatAIResponseValidationError struct {
// contains filtered or unexported fields
}
ChatAIResponseValidationError is the validation error returned by ChatAIResponse.Validate if the designated constraints aren't met.
func (ChatAIResponseValidationError) Cause ¶
func (e ChatAIResponseValidationError) Cause() error
Cause function returns cause value.
func (ChatAIResponseValidationError) Error ¶
func (e ChatAIResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ChatAIResponseValidationError) ErrorName ¶
func (e ChatAIResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ChatAIResponseValidationError) Field ¶
func (e ChatAIResponseValidationError) Field() string
Field function returns field value.
func (ChatAIResponseValidationError) Key ¶
func (e ChatAIResponseValidationError) Key() bool
Key function returns key value.
func (ChatAIResponseValidationError) Reason ¶
func (e ChatAIResponseValidationError) Reason() string
Reason function returns reason value.
type ChatHistory ¶
type ChatHistory struct { Role ChatRole `protobuf:"varint,1,opt,name=role,proto3,enum=core.ai.ChatRole" json:"role,omitempty"` Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
ChatHistory
func (*ChatHistory) Descriptor
deprecated
func (*ChatHistory) Descriptor() ([]byte, []int)
Deprecated: Use ChatHistory.ProtoReflect.Descriptor instead.
func (*ChatHistory) GetContent ¶
func (x *ChatHistory) GetContent() string
func (*ChatHistory) GetRole ¶
func (x *ChatHistory) GetRole() ChatRole
func (*ChatHistory) ProtoMessage ¶
func (*ChatHistory) ProtoMessage()
func (*ChatHistory) ProtoReflect ¶
func (x *ChatHistory) ProtoReflect() protoreflect.Message
func (*ChatHistory) Reset ¶
func (x *ChatHistory) Reset()
func (*ChatHistory) String ¶
func (x *ChatHistory) String() string
func (*ChatHistory) Validate ¶
func (m *ChatHistory) Validate() error
Validate checks the field values on ChatHistory with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ChatHistory) ValidateAll ¶
func (m *ChatHistory) ValidateAll() error
ValidateAll checks the field values on ChatHistory with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ChatHistoryMultiError, or nil if none found.
type ChatHistoryMultiError ¶
type ChatHistoryMultiError []error
ChatHistoryMultiError is an error wrapping multiple validation errors returned by ChatHistory.ValidateAll() if the designated constraints aren't met.
func (ChatHistoryMultiError) AllErrors ¶
func (m ChatHistoryMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ChatHistoryMultiError) Error ¶
func (m ChatHistoryMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ChatHistoryValidationError ¶
type ChatHistoryValidationError struct {
// contains filtered or unexported fields
}
ChatHistoryValidationError is the validation error returned by ChatHistory.Validate if the designated constraints aren't met.
func (ChatHistoryValidationError) Cause ¶
func (e ChatHistoryValidationError) Cause() error
Cause function returns cause value.
func (ChatHistoryValidationError) Error ¶
func (e ChatHistoryValidationError) Error() string
Error satisfies the builtin error interface
func (ChatHistoryValidationError) ErrorName ¶
func (e ChatHistoryValidationError) ErrorName() string
ErrorName returns error name.
func (ChatHistoryValidationError) Field ¶
func (e ChatHistoryValidationError) Field() string
Field function returns field value.
func (ChatHistoryValidationError) Key ¶
func (e ChatHistoryValidationError) Key() bool
Key function returns key value.
func (ChatHistoryValidationError) Reason ¶
func (e ChatHistoryValidationError) Reason() string
Reason function returns reason value.
type ChatRole ¶
type ChatRole int32
ChatRole
func (ChatRole) Descriptor ¶
func (ChatRole) Descriptor() protoreflect.EnumDescriptor
func (ChatRole) EnumDescriptor
deprecated
func (ChatRole) Number ¶
func (x ChatRole) Number() protoreflect.EnumNumber
func (ChatRole) Type ¶
func (ChatRole) Type() protoreflect.EnumType
type UnimplementedAIServiceServer ¶
type UnimplementedAIServiceServer struct { }
UnimplementedAIServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedAIServiceServer) ChatAI ¶
func (*UnimplementedAIServiceServer) ChatAI(context.Context, *ChatAIRequest) (*ChatAIResponse, error)