Versions in this module Expand all Collapse all v0 v0.1.1 Jun 26, 2023 v0.1.0 Jun 26, 2023 Changes in this version + const AIService_CreateGptMessage_FullMethodName + const OperationAIServiceCreateGptMessage + var AIService_ServiceDesc = grpc.ServiceDesc + var ErrorReason_name = map[int32]string + var ErrorReason_value = map[string]int32 + var File_ai_v1_ai_proto protoreflect.FileDescriptor + var File_ai_v1_error_reason_proto protoreflect.FileDescriptor + func ErrorBadRequest(format string, args ...interface{}) *errors.Error + func ErrorRecordAlreadyExists(format string, args ...interface{}) *errors.Error + func ErrorRecordNotFound(format string, args ...interface{}) *errors.Error + func ErrorSystemError(format string, args ...interface{}) *errors.Error + func IsBadRequest(err error) bool + func IsRecordAlreadyExists(err error) bool + func IsRecordNotFound(err error) bool + func IsSystemError(err error) bool + func RegisterAIServiceHTTPServer(s *http.Server, srv AIServiceHTTPServer) + func RegisterAIServiceServer(s grpc.ServiceRegistrar, srv AIServiceServer) + type AIServiceClient interface + CreateGptMessage func(ctx context.Context, in *CreateGptMessageReq, opts ...grpc.CallOption) (*CreateGptMessageRes, error) + func NewAIServiceClient(cc grpc.ClientConnInterface) AIServiceClient + type AIServiceHTTPClient interface + CreateGptMessage func(ctx context.Context, req *CreateGptMessageReq, opts ...http.CallOption) (rsp *CreateGptMessageRes, err error) + func NewAIServiceHTTPClient(client *http.Client) AIServiceHTTPClient + type AIServiceHTTPClientImpl struct + func (c *AIServiceHTTPClientImpl) CreateGptMessage(ctx context.Context, in *CreateGptMessageReq, opts ...http.CallOption) (*CreateGptMessageRes, error) + type AIServiceHTTPServer interface + CreateGptMessage func(context.Context, *CreateGptMessageReq) (*CreateGptMessageRes, error) + type AIServiceServer interface + CreateGptMessage func(context.Context, *CreateGptMessageReq) (*CreateGptMessageRes, error) + type ChatgptChoiceMessageRes struct + Content string + Role string + func (*ChatgptChoiceMessageRes) Descriptor() ([]byte, []int) + func (*ChatgptChoiceMessageRes) ProtoMessage() + func (m *ChatgptChoiceMessageRes) Validate() error + func (m *ChatgptChoiceMessageRes) ValidateAll() error + func (x *ChatgptChoiceMessageRes) GetContent() string + func (x *ChatgptChoiceMessageRes) GetRole() string + func (x *ChatgptChoiceMessageRes) ProtoReflect() protoreflect.Message + func (x *ChatgptChoiceMessageRes) Reset() + func (x *ChatgptChoiceMessageRes) String() string + type ChatgptChoiceMessageResMultiError []error + func (m ChatgptChoiceMessageResMultiError) AllErrors() []error + func (m ChatgptChoiceMessageResMultiError) Error() string + type ChatgptChoiceMessageResValidationError struct + func (e ChatgptChoiceMessageResValidationError) Cause() error + func (e ChatgptChoiceMessageResValidationError) Error() string + func (e ChatgptChoiceMessageResValidationError) ErrorName() string + func (e ChatgptChoiceMessageResValidationError) Field() string + func (e ChatgptChoiceMessageResValidationError) Key() bool + func (e ChatgptChoiceMessageResValidationError) Reason() string + type ChatgptChoiceRes struct + FinishReason string + Index string + Message *ChatgptChoiceMessageRes + func (*ChatgptChoiceRes) Descriptor() ([]byte, []int) + func (*ChatgptChoiceRes) ProtoMessage() + func (m *ChatgptChoiceRes) Validate() error + func (m *ChatgptChoiceRes) ValidateAll() error + func (x *ChatgptChoiceRes) GetFinishReason() string + func (x *ChatgptChoiceRes) GetIndex() string + func (x *ChatgptChoiceRes) GetMessage() *ChatgptChoiceMessageRes + func (x *ChatgptChoiceRes) ProtoReflect() protoreflect.Message + func (x *ChatgptChoiceRes) Reset() + func (x *ChatgptChoiceRes) String() string + type ChatgptChoiceResMultiError []error + func (m ChatgptChoiceResMultiError) AllErrors() []error + func (m ChatgptChoiceResMultiError) Error() string + type ChatgptChoiceResValidationError struct + func (e ChatgptChoiceResValidationError) Cause() error + func (e ChatgptChoiceResValidationError) Error() string + func (e ChatgptChoiceResValidationError) ErrorName() string + func (e ChatgptChoiceResValidationError) Field() string + func (e ChatgptChoiceResValidationError) Key() bool + func (e ChatgptChoiceResValidationError) Reason() string + type ChatgptChoicesRes struct + Choices []*ChatgptChoiceRes + func (*ChatgptChoicesRes) Descriptor() ([]byte, []int) + func (*ChatgptChoicesRes) ProtoMessage() + func (m *ChatgptChoicesRes) Validate() error + func (m *ChatgptChoicesRes) ValidateAll() error + func (x *ChatgptChoicesRes) GetChoices() []*ChatgptChoiceRes + func (x *ChatgptChoicesRes) ProtoReflect() protoreflect.Message + func (x *ChatgptChoicesRes) Reset() + func (x *ChatgptChoicesRes) String() string + type ChatgptChoicesResMultiError []error + func (m ChatgptChoicesResMultiError) AllErrors() []error + func (m ChatgptChoicesResMultiError) Error() string + type ChatgptChoicesResValidationError struct + func (e ChatgptChoicesResValidationError) Cause() error + func (e ChatgptChoicesResValidationError) Error() string + func (e ChatgptChoicesResValidationError) ErrorName() string + func (e ChatgptChoicesResValidationError) Field() string + func (e ChatgptChoicesResValidationError) Key() bool + func (e ChatgptChoicesResValidationError) Reason() string + type ChatgptMessageReq struct + Content string + Role string + func (*ChatgptMessageReq) Descriptor() ([]byte, []int) + func (*ChatgptMessageReq) ProtoMessage() + func (m *ChatgptMessageReq) Validate() error + func (m *ChatgptMessageReq) ValidateAll() error + func (x *ChatgptMessageReq) GetContent() string + func (x *ChatgptMessageReq) GetRole() string + func (x *ChatgptMessageReq) ProtoReflect() protoreflect.Message + func (x *ChatgptMessageReq) Reset() + func (x *ChatgptMessageReq) String() string + type ChatgptMessageReqMultiError []error + func (m ChatgptMessageReqMultiError) AllErrors() []error + func (m ChatgptMessageReqMultiError) Error() string + type ChatgptMessageReqValidationError struct + func (e ChatgptMessageReqValidationError) Cause() error + func (e ChatgptMessageReqValidationError) Error() string + func (e ChatgptMessageReqValidationError) ErrorName() string + func (e ChatgptMessageReqValidationError) Field() string + func (e ChatgptMessageReqValidationError) Key() bool + func (e ChatgptMessageReqValidationError) Reason() string + type ChatgptUsageRes struct + CompletionTokes string + PromptTokes string + TotalTokens int64 + func (*ChatgptUsageRes) Descriptor() ([]byte, []int) + func (*ChatgptUsageRes) ProtoMessage() + func (m *ChatgptUsageRes) Validate() error + func (m *ChatgptUsageRes) ValidateAll() error + func (x *ChatgptUsageRes) GetCompletionTokes() string + func (x *ChatgptUsageRes) GetPromptTokes() string + func (x *ChatgptUsageRes) GetTotalTokens() int64 + func (x *ChatgptUsageRes) ProtoReflect() protoreflect.Message + func (x *ChatgptUsageRes) Reset() + func (x *ChatgptUsageRes) String() string + type ChatgptUsageResMultiError []error + func (m ChatgptUsageResMultiError) AllErrors() []error + func (m ChatgptUsageResMultiError) Error() string + type ChatgptUsageResValidationError struct + func (e ChatgptUsageResValidationError) Cause() error + func (e ChatgptUsageResValidationError) Error() string + func (e ChatgptUsageResValidationError) ErrorName() string + func (e ChatgptUsageResValidationError) Field() string + func (e ChatgptUsageResValidationError) Key() bool + func (e ChatgptUsageResValidationError) Reason() string + type CreateGptMessageReq struct + Messages []*ChatgptMessageReq + Model string + func (*CreateGptMessageReq) Descriptor() ([]byte, []int) + func (*CreateGptMessageReq) ProtoMessage() + func (m *CreateGptMessageReq) Validate() error + func (m *CreateGptMessageReq) ValidateAll() error + func (x *CreateGptMessageReq) GetMessages() []*ChatgptMessageReq + func (x *CreateGptMessageReq) GetModel() string + func (x *CreateGptMessageReq) ProtoReflect() protoreflect.Message + func (x *CreateGptMessageReq) Reset() + func (x *CreateGptMessageReq) String() string + type CreateGptMessageReqMultiError []error + func (m CreateGptMessageReqMultiError) AllErrors() []error + func (m CreateGptMessageReqMultiError) Error() string + type CreateGptMessageReqValidationError struct + func (e CreateGptMessageReqValidationError) Cause() error + func (e CreateGptMessageReqValidationError) Error() string + func (e CreateGptMessageReqValidationError) ErrorName() string + func (e CreateGptMessageReqValidationError) Field() string + func (e CreateGptMessageReqValidationError) Key() bool + func (e CreateGptMessageReqValidationError) Reason() string + type CreateGptMessageRes struct + Choices []*ChatgptChoiceRes + Created int64 + Error *ErrorMessageRes + Id string + Model string + Object string + Usage *ChatgptUsageRes + func (*CreateGptMessageRes) Descriptor() ([]byte, []int) + func (*CreateGptMessageRes) ProtoMessage() + func (m *CreateGptMessageRes) Validate() error + func (m *CreateGptMessageRes) ValidateAll() error + func (x *CreateGptMessageRes) GetChoices() []*ChatgptChoiceRes + func (x *CreateGptMessageRes) GetCreated() int64 + func (x *CreateGptMessageRes) GetError() *ErrorMessageRes + func (x *CreateGptMessageRes) GetId() string + func (x *CreateGptMessageRes) GetModel() string + func (x *CreateGptMessageRes) GetObject() string + func (x *CreateGptMessageRes) GetUsage() *ChatgptUsageRes + func (x *CreateGptMessageRes) ProtoReflect() protoreflect.Message + func (x *CreateGptMessageRes) Reset() + func (x *CreateGptMessageRes) String() string + type CreateGptMessageResMultiError []error + func (m CreateGptMessageResMultiError) AllErrors() []error + func (m CreateGptMessageResMultiError) Error() string + type CreateGptMessageResValidationError struct + func (e CreateGptMessageResValidationError) Cause() error + func (e CreateGptMessageResValidationError) Error() string + func (e CreateGptMessageResValidationError) ErrorName() string + func (e CreateGptMessageResValidationError) Field() string + func (e CreateGptMessageResValidationError) Key() bool + func (e CreateGptMessageResValidationError) Reason() string + type ErrorMessageRes struct + Message string + func (*ErrorMessageRes) Descriptor() ([]byte, []int) + func (*ErrorMessageRes) ProtoMessage() + func (m *ErrorMessageRes) Validate() error + func (m *ErrorMessageRes) ValidateAll() error + func (x *ErrorMessageRes) GetMessage() string + func (x *ErrorMessageRes) ProtoReflect() protoreflect.Message + func (x *ErrorMessageRes) Reset() + func (x *ErrorMessageRes) String() string + type ErrorMessageResMultiError []error + func (m ErrorMessageResMultiError) AllErrors() []error + func (m ErrorMessageResMultiError) Error() string + type ErrorMessageResValidationError struct + func (e ErrorMessageResValidationError) Cause() error + func (e ErrorMessageResValidationError) Error() string + func (e ErrorMessageResValidationError) ErrorName() string + func (e ErrorMessageResValidationError) Field() string + func (e ErrorMessageResValidationError) Key() bool + func (e ErrorMessageResValidationError) Reason() string + type ErrorReason int32 + const ErrorReason_BAD_REQUEST + const ErrorReason_RECORD_ALREADY_EXISTS + const ErrorReason_RECORD_NOT_FOUND + const ErrorReason_SYSTEM_ERROR + func (ErrorReason) Descriptor() protoreflect.EnumDescriptor + func (ErrorReason) EnumDescriptor() ([]byte, []int) + func (ErrorReason) Type() protoreflect.EnumType + func (x ErrorReason) Enum() *ErrorReason + func (x ErrorReason) Number() protoreflect.EnumNumber + func (x ErrorReason) String() string + type UnimplementedAIServiceServer struct + func (UnimplementedAIServiceServer) CreateGptMessage(context.Context, *CreateGptMessageReq) (*CreateGptMessageRes, error) + type UnsafeAIServiceServer interface