v1

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AIService_CreateGptMessage_FullMethodName = "/ai.v1.AIService/CreateGptMessage"
)
View Source
const OperationAIServiceCreateGptMessage = "/ai.v1.AIService/CreateGptMessage"

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "RECORD_NOT_FOUND",
		1: "RECORD_ALREADY_EXISTS",
		2: "BAD_REQUEST",
		3: "SYSTEM_ERROR",
	}
	ErrorReason_value = map[string]int32{
		"RECORD_NOT_FOUND":      0,
		"RECORD_ALREADY_EXISTS": 1,
		"BAD_REQUEST":           2,
		"SYSTEM_ERROR":          3,
	}
)

Enum value maps for ErrorReason.

View Source
var AIService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ai.v1.AIService",
	HandlerType: (*AIServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateGptMessage",
			Handler:    _AIService_CreateGptMessage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ai/v1/ai.proto",
}

AIService_ServiceDesc is the grpc.ServiceDesc for AIService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_ai_v1_ai_proto protoreflect.FileDescriptor
View Source
var File_ai_v1_error_reason_proto protoreflect.FileDescriptor

Functions

func ErrorBadRequest

func ErrorBadRequest(format string, args ...interface{}) *errors.Error

func ErrorRecordAlreadyExists

func ErrorRecordAlreadyExists(format string, args ...interface{}) *errors.Error

func ErrorRecordNotFound

func ErrorRecordNotFound(format string, args ...interface{}) *errors.Error

func ErrorSystemError

func ErrorSystemError(format string, args ...interface{}) *errors.Error

func IsBadRequest

func IsBadRequest(err error) bool

func IsRecordAlreadyExists

func IsRecordAlreadyExists(err error) bool

func IsRecordNotFound

func IsRecordNotFound(err error) bool

func IsSystemError

func IsSystemError(err error) bool

func RegisterAIServiceHTTPServer

func RegisterAIServiceHTTPServer(s *http.Server, srv AIServiceHTTPServer)

func RegisterAIServiceServer

func RegisterAIServiceServer(s grpc.ServiceRegistrar, srv AIServiceServer)

Types

type AIServiceClient

type AIServiceClient interface {
	// 创建
	CreateGptMessage(ctx context.Context, in *CreateGptMessageReq, opts ...grpc.CallOption) (*CreateGptMessageRes, error)
}

AIServiceClient is the client API for AIService 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 NewAIServiceClient

func NewAIServiceClient(cc grpc.ClientConnInterface) AIServiceClient

type AIServiceHTTPClient

type AIServiceHTTPClient interface {
	CreateGptMessage(ctx context.Context, req *CreateGptMessageReq, opts ...http.CallOption) (rsp *CreateGptMessageRes, err error)
}

func NewAIServiceHTTPClient

func NewAIServiceHTTPClient(client *http.Client) AIServiceHTTPClient

type AIServiceHTTPClientImpl

type AIServiceHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*AIServiceHTTPClientImpl) CreateGptMessage

type AIServiceHTTPServer

type AIServiceHTTPServer interface {
	CreateGptMessage(context.Context, *CreateGptMessageReq) (*CreateGptMessageRes, error)
}

type AIServiceServer

type AIServiceServer interface {
	// 创建
	CreateGptMessage(context.Context, *CreateGptMessageReq) (*CreateGptMessageRes, error)
	// contains filtered or unexported methods
}

AIServiceServer is the server API for AIService service. All implementations must embed UnimplementedAIServiceServer for forward compatibility

type ChatgptChoiceMessageRes

type ChatgptChoiceMessageRes struct {
	Role    string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatgptChoiceMessageRes) Descriptor deprecated

func (*ChatgptChoiceMessageRes) Descriptor() ([]byte, []int)

Deprecated: Use ChatgptChoiceMessageRes.ProtoReflect.Descriptor instead.

func (*ChatgptChoiceMessageRes) GetContent

func (x *ChatgptChoiceMessageRes) GetContent() string

func (*ChatgptChoiceMessageRes) GetRole

func (x *ChatgptChoiceMessageRes) GetRole() string

func (*ChatgptChoiceMessageRes) ProtoMessage

func (*ChatgptChoiceMessageRes) ProtoMessage()

func (*ChatgptChoiceMessageRes) ProtoReflect

func (x *ChatgptChoiceMessageRes) ProtoReflect() protoreflect.Message

func (*ChatgptChoiceMessageRes) Reset

func (x *ChatgptChoiceMessageRes) Reset()

func (*ChatgptChoiceMessageRes) String

func (x *ChatgptChoiceMessageRes) String() string

func (*ChatgptChoiceMessageRes) Validate

func (m *ChatgptChoiceMessageRes) Validate() error

Validate checks the field values on ChatgptChoiceMessageRes 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 (*ChatgptChoiceMessageRes) ValidateAll

func (m *ChatgptChoiceMessageRes) ValidateAll() error

ValidateAll checks the field values on ChatgptChoiceMessageRes 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 ChatgptChoiceMessageResMultiError, or nil if none found.

type ChatgptChoiceMessageResMultiError

type ChatgptChoiceMessageResMultiError []error

ChatgptChoiceMessageResMultiError is an error wrapping multiple validation errors returned by ChatgptChoiceMessageRes.ValidateAll() if the designated constraints aren't met.

func (ChatgptChoiceMessageResMultiError) AllErrors

func (m ChatgptChoiceMessageResMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ChatgptChoiceMessageResMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ChatgptChoiceMessageResValidationError

type ChatgptChoiceMessageResValidationError struct {
	// contains filtered or unexported fields
}

ChatgptChoiceMessageResValidationError is the validation error returned by ChatgptChoiceMessageRes.Validate if the designated constraints aren't met.

func (ChatgptChoiceMessageResValidationError) Cause

Cause function returns cause value.

func (ChatgptChoiceMessageResValidationError) Error

Error satisfies the builtin error interface

func (ChatgptChoiceMessageResValidationError) ErrorName

ErrorName returns error name.

func (ChatgptChoiceMessageResValidationError) Field

Field function returns field value.

func (ChatgptChoiceMessageResValidationError) Key

Key function returns key value.

func (ChatgptChoiceMessageResValidationError) Reason

Reason function returns reason value.

type ChatgptChoiceRes

type ChatgptChoiceRes struct {
	FinishReason string                   `protobuf:"bytes,1,opt,name=finish_reason,json=finishReason,proto3" json:"finish_reason,omitempty"`
	Index        string                   `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"`
	Message      *ChatgptChoiceMessageRes `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatgptChoiceRes) Descriptor deprecated

func (*ChatgptChoiceRes) Descriptor() ([]byte, []int)

Deprecated: Use ChatgptChoiceRes.ProtoReflect.Descriptor instead.

func (*ChatgptChoiceRes) GetFinishReason

func (x *ChatgptChoiceRes) GetFinishReason() string

func (*ChatgptChoiceRes) GetIndex

func (x *ChatgptChoiceRes) GetIndex() string

func (*ChatgptChoiceRes) GetMessage

func (x *ChatgptChoiceRes) GetMessage() *ChatgptChoiceMessageRes

func (*ChatgptChoiceRes) ProtoMessage

func (*ChatgptChoiceRes) ProtoMessage()

func (*ChatgptChoiceRes) ProtoReflect

func (x *ChatgptChoiceRes) ProtoReflect() protoreflect.Message

func (*ChatgptChoiceRes) Reset

func (x *ChatgptChoiceRes) Reset()

func (*ChatgptChoiceRes) String

func (x *ChatgptChoiceRes) String() string

func (*ChatgptChoiceRes) Validate

func (m *ChatgptChoiceRes) Validate() error

Validate checks the field values on ChatgptChoiceRes 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 (*ChatgptChoiceRes) ValidateAll

func (m *ChatgptChoiceRes) ValidateAll() error

ValidateAll checks the field values on ChatgptChoiceRes 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 ChatgptChoiceResMultiError, or nil if none found.

type ChatgptChoiceResMultiError

type ChatgptChoiceResMultiError []error

ChatgptChoiceResMultiError is an error wrapping multiple validation errors returned by ChatgptChoiceRes.ValidateAll() if the designated constraints aren't met.

func (ChatgptChoiceResMultiError) AllErrors

func (m ChatgptChoiceResMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ChatgptChoiceResMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ChatgptChoiceResValidationError

type ChatgptChoiceResValidationError struct {
	// contains filtered or unexported fields
}

ChatgptChoiceResValidationError is the validation error returned by ChatgptChoiceRes.Validate if the designated constraints aren't met.

func (ChatgptChoiceResValidationError) Cause

Cause function returns cause value.

func (ChatgptChoiceResValidationError) Error

Error satisfies the builtin error interface

func (ChatgptChoiceResValidationError) ErrorName

ErrorName returns error name.

func (ChatgptChoiceResValidationError) Field

Field function returns field value.

func (ChatgptChoiceResValidationError) Key

Key function returns key value.

func (ChatgptChoiceResValidationError) Reason

Reason function returns reason value.

type ChatgptChoicesRes

type ChatgptChoicesRes struct {
	Choices []*ChatgptChoiceRes `protobuf:"bytes,1,rep,name=choices,proto3" json:"choices,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatgptChoicesRes) Descriptor deprecated

func (*ChatgptChoicesRes) Descriptor() ([]byte, []int)

Deprecated: Use ChatgptChoicesRes.ProtoReflect.Descriptor instead.

func (*ChatgptChoicesRes) GetChoices

func (x *ChatgptChoicesRes) GetChoices() []*ChatgptChoiceRes

func (*ChatgptChoicesRes) ProtoMessage

func (*ChatgptChoicesRes) ProtoMessage()

func (*ChatgptChoicesRes) ProtoReflect

func (x *ChatgptChoicesRes) ProtoReflect() protoreflect.Message

func (*ChatgptChoicesRes) Reset

func (x *ChatgptChoicesRes) Reset()

func (*ChatgptChoicesRes) String

func (x *ChatgptChoicesRes) String() string

func (*ChatgptChoicesRes) Validate

func (m *ChatgptChoicesRes) Validate() error

Validate checks the field values on ChatgptChoicesRes 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 (*ChatgptChoicesRes) ValidateAll

func (m *ChatgptChoicesRes) ValidateAll() error

ValidateAll checks the field values on ChatgptChoicesRes 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 ChatgptChoicesResMultiError, or nil if none found.

type ChatgptChoicesResMultiError

type ChatgptChoicesResMultiError []error

ChatgptChoicesResMultiError is an error wrapping multiple validation errors returned by ChatgptChoicesRes.ValidateAll() if the designated constraints aren't met.

func (ChatgptChoicesResMultiError) AllErrors

func (m ChatgptChoicesResMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ChatgptChoicesResMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ChatgptChoicesResValidationError

type ChatgptChoicesResValidationError struct {
	// contains filtered or unexported fields
}

ChatgptChoicesResValidationError is the validation error returned by ChatgptChoicesRes.Validate if the designated constraints aren't met.

func (ChatgptChoicesResValidationError) Cause

Cause function returns cause value.

func (ChatgptChoicesResValidationError) Error

Error satisfies the builtin error interface

func (ChatgptChoicesResValidationError) ErrorName

ErrorName returns error name.

func (ChatgptChoicesResValidationError) Field

Field function returns field value.

func (ChatgptChoicesResValidationError) Key

Key function returns key value.

func (ChatgptChoicesResValidationError) Reason

Reason function returns reason value.

type ChatgptMessageReq

type ChatgptMessageReq struct {
	Role    string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatgptMessageReq) Descriptor deprecated

func (*ChatgptMessageReq) Descriptor() ([]byte, []int)

Deprecated: Use ChatgptMessageReq.ProtoReflect.Descriptor instead.

func (*ChatgptMessageReq) GetContent

func (x *ChatgptMessageReq) GetContent() string

func (*ChatgptMessageReq) GetRole

func (x *ChatgptMessageReq) GetRole() string

func (*ChatgptMessageReq) ProtoMessage

func (*ChatgptMessageReq) ProtoMessage()

func (*ChatgptMessageReq) ProtoReflect

func (x *ChatgptMessageReq) ProtoReflect() protoreflect.Message

func (*ChatgptMessageReq) Reset

func (x *ChatgptMessageReq) Reset()

func (*ChatgptMessageReq) String

func (x *ChatgptMessageReq) String() string

func (*ChatgptMessageReq) Validate

func (m *ChatgptMessageReq) Validate() error

Validate checks the field values on ChatgptMessageReq 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 (*ChatgptMessageReq) ValidateAll

func (m *ChatgptMessageReq) ValidateAll() error

ValidateAll checks the field values on ChatgptMessageReq 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 ChatgptMessageReqMultiError, or nil if none found.

type ChatgptMessageReqMultiError

type ChatgptMessageReqMultiError []error

ChatgptMessageReqMultiError is an error wrapping multiple validation errors returned by ChatgptMessageReq.ValidateAll() if the designated constraints aren't met.

func (ChatgptMessageReqMultiError) AllErrors

func (m ChatgptMessageReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ChatgptMessageReqMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ChatgptMessageReqValidationError

type ChatgptMessageReqValidationError struct {
	// contains filtered or unexported fields
}

ChatgptMessageReqValidationError is the validation error returned by ChatgptMessageReq.Validate if the designated constraints aren't met.

func (ChatgptMessageReqValidationError) Cause

Cause function returns cause value.

func (ChatgptMessageReqValidationError) Error

Error satisfies the builtin error interface

func (ChatgptMessageReqValidationError) ErrorName

ErrorName returns error name.

func (ChatgptMessageReqValidationError) Field

Field function returns field value.

func (ChatgptMessageReqValidationError) Key

Key function returns key value.

func (ChatgptMessageReqValidationError) Reason

Reason function returns reason value.

type ChatgptUsageRes

type ChatgptUsageRes struct {
	PromptTokes     string `protobuf:"bytes,1,opt,name=prompt_tokes,json=promptTokes,proto3" json:"prompt_tokes,omitempty"`
	CompletionTokes string `protobuf:"bytes,2,opt,name=completion_tokes,json=completionTokes,proto3" json:"completion_tokes,omitempty"`
	TotalTokens     int64  `protobuf:"varint,3,opt,name=total_tokens,json=totalTokens,proto3" json:"total_tokens,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatgptUsageRes) Descriptor deprecated

func (*ChatgptUsageRes) Descriptor() ([]byte, []int)

Deprecated: Use ChatgptUsageRes.ProtoReflect.Descriptor instead.

func (*ChatgptUsageRes) GetCompletionTokes

func (x *ChatgptUsageRes) GetCompletionTokes() string

func (*ChatgptUsageRes) GetPromptTokes

func (x *ChatgptUsageRes) GetPromptTokes() string

func (*ChatgptUsageRes) GetTotalTokens

func (x *ChatgptUsageRes) GetTotalTokens() int64

func (*ChatgptUsageRes) ProtoMessage

func (*ChatgptUsageRes) ProtoMessage()

func (*ChatgptUsageRes) ProtoReflect

func (x *ChatgptUsageRes) ProtoReflect() protoreflect.Message

func (*ChatgptUsageRes) Reset

func (x *ChatgptUsageRes) Reset()

func (*ChatgptUsageRes) String

func (x *ChatgptUsageRes) String() string

func (*ChatgptUsageRes) Validate

func (m *ChatgptUsageRes) Validate() error

Validate checks the field values on ChatgptUsageRes 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 (*ChatgptUsageRes) ValidateAll

func (m *ChatgptUsageRes) ValidateAll() error

ValidateAll checks the field values on ChatgptUsageRes 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 ChatgptUsageResMultiError, or nil if none found.

type ChatgptUsageResMultiError

type ChatgptUsageResMultiError []error

ChatgptUsageResMultiError is an error wrapping multiple validation errors returned by ChatgptUsageRes.ValidateAll() if the designated constraints aren't met.

func (ChatgptUsageResMultiError) AllErrors

func (m ChatgptUsageResMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ChatgptUsageResMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ChatgptUsageResValidationError

type ChatgptUsageResValidationError struct {
	// contains filtered or unexported fields
}

ChatgptUsageResValidationError is the validation error returned by ChatgptUsageRes.Validate if the designated constraints aren't met.

func (ChatgptUsageResValidationError) Cause

Cause function returns cause value.

func (ChatgptUsageResValidationError) Error

Error satisfies the builtin error interface

func (ChatgptUsageResValidationError) ErrorName

func (e ChatgptUsageResValidationError) ErrorName() string

ErrorName returns error name.

func (ChatgptUsageResValidationError) Field

Field function returns field value.

func (ChatgptUsageResValidationError) Key

Key function returns key value.

func (ChatgptUsageResValidationError) Reason

Reason function returns reason value.

type CreateGptMessageReq

type CreateGptMessageReq struct {

	// 模型
	Model    string               `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	Messages []*ChatgptMessageReq `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
	// contains filtered or unexported fields
}

请求 - chathpt请求查询

func (*CreateGptMessageReq) Descriptor deprecated

func (*CreateGptMessageReq) Descriptor() ([]byte, []int)

Deprecated: Use CreateGptMessageReq.ProtoReflect.Descriptor instead.

func (*CreateGptMessageReq) GetMessages

func (x *CreateGptMessageReq) GetMessages() []*ChatgptMessageReq

func (*CreateGptMessageReq) GetModel

func (x *CreateGptMessageReq) GetModel() string

func (*CreateGptMessageReq) ProtoMessage

func (*CreateGptMessageReq) ProtoMessage()

func (*CreateGptMessageReq) ProtoReflect

func (x *CreateGptMessageReq) ProtoReflect() protoreflect.Message

func (*CreateGptMessageReq) Reset

func (x *CreateGptMessageReq) Reset()

func (*CreateGptMessageReq) String

func (x *CreateGptMessageReq) String() string

func (*CreateGptMessageReq) Validate

func (m *CreateGptMessageReq) Validate() error

Validate checks the field values on CreateGptMessageReq 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 (*CreateGptMessageReq) ValidateAll

func (m *CreateGptMessageReq) ValidateAll() error

ValidateAll checks the field values on CreateGptMessageReq 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 CreateGptMessageReqMultiError, or nil if none found.

type CreateGptMessageReqMultiError

type CreateGptMessageReqMultiError []error

CreateGptMessageReqMultiError is an error wrapping multiple validation errors returned by CreateGptMessageReq.ValidateAll() if the designated constraints aren't met.

func (CreateGptMessageReqMultiError) AllErrors

func (m CreateGptMessageReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateGptMessageReqMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type CreateGptMessageReqValidationError

type CreateGptMessageReqValidationError struct {
	// contains filtered or unexported fields
}

CreateGptMessageReqValidationError is the validation error returned by CreateGptMessageReq.Validate if the designated constraints aren't met.

func (CreateGptMessageReqValidationError) Cause

Cause function returns cause value.

func (CreateGptMessageReqValidationError) Error

Error satisfies the builtin error interface

func (CreateGptMessageReqValidationError) ErrorName

ErrorName returns error name.

func (CreateGptMessageReqValidationError) Field

Field function returns field value.

func (CreateGptMessageReqValidationError) Key

Key function returns key value.

func (CreateGptMessageReqValidationError) Reason

Reason function returns reason value.

type CreateGptMessageRes

type CreateGptMessageRes struct {
	Id      string              `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Object  string              `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
	Created int64               `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"`
	Model   string              `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"`
	Usage   *ChatgptUsageRes    `protobuf:"bytes,5,opt,name=usage,proto3" json:"usage,omitempty"`
	Choices []*ChatgptChoiceRes `protobuf:"bytes,6,rep,name=choices,proto3" json:"choices,omitempty"`
	Error   *ErrorMessageRes    `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

响应 - chathpt请求查询

func (*CreateGptMessageRes) Descriptor deprecated

func (*CreateGptMessageRes) Descriptor() ([]byte, []int)

Deprecated: Use CreateGptMessageRes.ProtoReflect.Descriptor instead.

func (*CreateGptMessageRes) GetChoices

func (x *CreateGptMessageRes) GetChoices() []*ChatgptChoiceRes

func (*CreateGptMessageRes) GetCreated

func (x *CreateGptMessageRes) GetCreated() int64

func (*CreateGptMessageRes) GetError

func (x *CreateGptMessageRes) GetError() *ErrorMessageRes

func (*CreateGptMessageRes) GetId

func (x *CreateGptMessageRes) GetId() string

func (*CreateGptMessageRes) GetModel

func (x *CreateGptMessageRes) GetModel() string

func (*CreateGptMessageRes) GetObject

func (x *CreateGptMessageRes) GetObject() string

func (*CreateGptMessageRes) GetUsage

func (x *CreateGptMessageRes) GetUsage() *ChatgptUsageRes

func (*CreateGptMessageRes) ProtoMessage

func (*CreateGptMessageRes) ProtoMessage()

func (*CreateGptMessageRes) ProtoReflect

func (x *CreateGptMessageRes) ProtoReflect() protoreflect.Message

func (*CreateGptMessageRes) Reset

func (x *CreateGptMessageRes) Reset()

func (*CreateGptMessageRes) String

func (x *CreateGptMessageRes) String() string

func (*CreateGptMessageRes) Validate

func (m *CreateGptMessageRes) Validate() error

Validate checks the field values on CreateGptMessageRes 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 (*CreateGptMessageRes) ValidateAll

func (m *CreateGptMessageRes) ValidateAll() error

ValidateAll checks the field values on CreateGptMessageRes 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 CreateGptMessageResMultiError, or nil if none found.

type CreateGptMessageResMultiError

type CreateGptMessageResMultiError []error

CreateGptMessageResMultiError is an error wrapping multiple validation errors returned by CreateGptMessageRes.ValidateAll() if the designated constraints aren't met.

func (CreateGptMessageResMultiError) AllErrors

func (m CreateGptMessageResMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateGptMessageResMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type CreateGptMessageResValidationError

type CreateGptMessageResValidationError struct {
	// contains filtered or unexported fields
}

CreateGptMessageResValidationError is the validation error returned by CreateGptMessageRes.Validate if the designated constraints aren't met.

func (CreateGptMessageResValidationError) Cause

Cause function returns cause value.

func (CreateGptMessageResValidationError) Error

Error satisfies the builtin error interface

func (CreateGptMessageResValidationError) ErrorName

ErrorName returns error name.

func (CreateGptMessageResValidationError) Field

Field function returns field value.

func (CreateGptMessageResValidationError) Key

Key function returns key value.

func (CreateGptMessageResValidationError) Reason

Reason function returns reason value.

type ErrorMessageRes

type ErrorMessageRes struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*ErrorMessageRes) Descriptor deprecated

func (*ErrorMessageRes) Descriptor() ([]byte, []int)

Deprecated: Use ErrorMessageRes.ProtoReflect.Descriptor instead.

func (*ErrorMessageRes) GetMessage

func (x *ErrorMessageRes) GetMessage() string

func (*ErrorMessageRes) ProtoMessage

func (*ErrorMessageRes) ProtoMessage()

func (*ErrorMessageRes) ProtoReflect

func (x *ErrorMessageRes) ProtoReflect() protoreflect.Message

func (*ErrorMessageRes) Reset

func (x *ErrorMessageRes) Reset()

func (*ErrorMessageRes) String

func (x *ErrorMessageRes) String() string

func (*ErrorMessageRes) Validate

func (m *ErrorMessageRes) Validate() error

Validate checks the field values on ErrorMessageRes 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 (*ErrorMessageRes) ValidateAll

func (m *ErrorMessageRes) ValidateAll() error

ValidateAll checks the field values on ErrorMessageRes 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 ErrorMessageResMultiError, or nil if none found.

type ErrorMessageResMultiError

type ErrorMessageResMultiError []error

ErrorMessageResMultiError is an error wrapping multiple validation errors returned by ErrorMessageRes.ValidateAll() if the designated constraints aren't met.

func (ErrorMessageResMultiError) AllErrors

func (m ErrorMessageResMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ErrorMessageResMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ErrorMessageResValidationError

type ErrorMessageResValidationError struct {
	// contains filtered or unexported fields
}

ErrorMessageResValidationError is the validation error returned by ErrorMessageRes.Validate if the designated constraints aren't met.

func (ErrorMessageResValidationError) Cause

Cause function returns cause value.

func (ErrorMessageResValidationError) Error

Error satisfies the builtin error interface

func (ErrorMessageResValidationError) ErrorName

func (e ErrorMessageResValidationError) ErrorName() string

ErrorName returns error name.

func (ErrorMessageResValidationError) Field

Field function returns field value.

func (ErrorMessageResValidationError) Key

Key function returns key value.

func (ErrorMessageResValidationError) Reason

Reason function returns reason value.

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_RECORD_NOT_FOUND      ErrorReason = 0
	ErrorReason_RECORD_ALREADY_EXISTS ErrorReason = 1
	ErrorReason_BAD_REQUEST           ErrorReason = 2
	ErrorReason_SYSTEM_ERROR          ErrorReason = 3
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

func (ErrorReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type UnimplementedAIServiceServer

type UnimplementedAIServiceServer struct {
}

UnimplementedAIServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAIServiceServer) CreateGptMessage

type UnsafeAIServiceServer

type UnsafeAIServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeAIServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AIServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL