Documentation ¶
Index ¶
- Variables
- func RegisterChatGsrvServer(s grpc.ServiceRegistrar, srv ChatGsrvServer)
- type Chat
- func (*Chat) Descriptor() ([]byte, []int)deprecated
- func (x *Chat) GetFunctions() []*ChatCompletionFunction
- func (x *Chat) GetMaxTokens() int32
- func (x *Chat) GetMessages() []*ChatCompletionMessage
- func (x *Chat) GetModel() string
- func (x *Chat) GetStoped() bool
- func (*Chat) ProtoMessage()
- func (x *Chat) ProtoReflect() protoreflect.Message
- func (x *Chat) Reset()
- func (x *Chat) String() string
- type ChatCompletionFunction
- func (*ChatCompletionFunction) Descriptor() ([]byte, []int)deprecated
- func (x *ChatCompletionFunction) GetDescription() string
- func (x *ChatCompletionFunction) GetName() string
- func (x *ChatCompletionFunction) GetParameters() *ChatCompletionFunctionParameters
- func (*ChatCompletionFunction) ProtoMessage()
- func (x *ChatCompletionFunction) ProtoReflect() protoreflect.Message
- func (x *ChatCompletionFunction) Reset()
- func (x *ChatCompletionFunction) String() string
- type ChatCompletionFunctionParameters
- func (*ChatCompletionFunctionParameters) Descriptor() ([]byte, []int)deprecated
- func (x *ChatCompletionFunctionParameters) GetProperties() map[string]*ChatCompletionFunctionParametersProperty
- func (x *ChatCompletionFunctionParameters) GetRequired() []string
- func (x *ChatCompletionFunctionParameters) GetType() string
- func (*ChatCompletionFunctionParameters) ProtoMessage()
- func (x *ChatCompletionFunctionParameters) ProtoReflect() protoreflect.Message
- func (x *ChatCompletionFunctionParameters) Reset()
- func (x *ChatCompletionFunctionParameters) String() string
- type ChatCompletionFunctionParametersProperty
- func (*ChatCompletionFunctionParametersProperty) Descriptor() ([]byte, []int)deprecated
- func (x *ChatCompletionFunctionParametersProperty) GetDescription() string
- func (x *ChatCompletionFunctionParametersProperty) GetEnum() []string
- func (x *ChatCompletionFunctionParametersProperty) GetType() string
- func (*ChatCompletionFunctionParametersProperty) ProtoMessage()
- func (x *ChatCompletionFunctionParametersProperty) ProtoReflect() protoreflect.Message
- func (x *ChatCompletionFunctionParametersProperty) Reset()
- func (x *ChatCompletionFunctionParametersProperty) String() string
- type ChatCompletionMessage
- func (*ChatCompletionMessage) Descriptor() ([]byte, []int)deprecated
- func (x *ChatCompletionMessage) GetContent() string
- func (x *ChatCompletionMessage) GetFinishReason() string
- func (x *ChatCompletionMessage) GetFunctionCall() *ChatCompletionMessageFunctionCall
- func (x *ChatCompletionMessage) GetName() string
- func (x *ChatCompletionMessage) GetRole() string
- func (*ChatCompletionMessage) ProtoMessage()
- func (x *ChatCompletionMessage) ProtoReflect() protoreflect.Message
- func (x *ChatCompletionMessage) Reset()
- func (x *ChatCompletionMessage) String() string
- type ChatCompletionMessageFunctionCall
- func (*ChatCompletionMessageFunctionCall) Descriptor() ([]byte, []int)deprecated
- func (x *ChatCompletionMessageFunctionCall) GetArguments() string
- func (x *ChatCompletionMessageFunctionCall) GetName() string
- func (*ChatCompletionMessageFunctionCall) ProtoMessage()
- func (x *ChatCompletionMessageFunctionCall) ProtoReflect() protoreflect.Message
- func (x *ChatCompletionMessageFunctionCall) Reset()
- func (x *ChatCompletionMessageFunctionCall) String() string
- type ChatGsrvClient
- type ChatGsrvServer
- type ChatGsrv_ChatEnquireStreamClient
- type ChatGsrv_ChatEnquireStreamServer
- type UnimplementedChatGsrvServer
- type UnsafeChatGsrvServer
Constants ¶
This section is empty.
Variables ¶
var ChatGsrv_ServiceDesc = grpc.ServiceDesc{ ServiceName: "chat.v1.ChatGsrv", HandlerType: (*ChatGsrvServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ChatEnquire", Handler: _ChatGsrv_ChatEnquire_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ChatEnquireStream", Handler: _ChatGsrv_ChatEnquireStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "chat/v1/chat.proto", }
ChatGsrv_ServiceDesc is the grpc.ServiceDesc for ChatGsrv service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_chat_v1_chat_proto protoreflect.FileDescriptor
Functions ¶
func RegisterChatGsrvServer ¶
func RegisterChatGsrvServer(s grpc.ServiceRegistrar, srv ChatGsrvServer)
Types ¶
type Chat ¶
type Chat struct { Messages []*ChatCompletionMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` MaxTokens int32 `protobuf:"varint,2,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"` Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"` Stoped bool `protobuf:"varint,4,opt,name=stoped,proto3" json:"stoped,omitempty"` Functions []*ChatCompletionFunction `protobuf:"bytes,5,rep,name=functions,proto3" json:"functions,omitempty"` // contains filtered or unexported fields }
func (*Chat) Descriptor
deprecated
func (*Chat) GetFunctions ¶
func (x *Chat) GetFunctions() []*ChatCompletionFunction
func (*Chat) GetMaxTokens ¶
func (*Chat) GetMessages ¶
func (x *Chat) GetMessages() []*ChatCompletionMessage
func (*Chat) ProtoMessage ¶
func (*Chat) ProtoMessage()
func (*Chat) ProtoReflect ¶
func (x *Chat) ProtoReflect() protoreflect.Message
type ChatCompletionFunction ¶
type ChatCompletionFunction struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Parameters *ChatCompletionFunctionParameters `protobuf:"bytes,3,opt,name=parameters,proto3" json:"parameters,omitempty"` // contains filtered or unexported fields }
func (*ChatCompletionFunction) Descriptor
deprecated
func (*ChatCompletionFunction) Descriptor() ([]byte, []int)
Deprecated: Use ChatCompletionFunction.ProtoReflect.Descriptor instead.
func (*ChatCompletionFunction) GetDescription ¶
func (x *ChatCompletionFunction) GetDescription() string
func (*ChatCompletionFunction) GetName ¶
func (x *ChatCompletionFunction) GetName() string
func (*ChatCompletionFunction) GetParameters ¶
func (x *ChatCompletionFunction) GetParameters() *ChatCompletionFunctionParameters
func (*ChatCompletionFunction) ProtoMessage ¶
func (*ChatCompletionFunction) ProtoMessage()
func (*ChatCompletionFunction) ProtoReflect ¶
func (x *ChatCompletionFunction) ProtoReflect() protoreflect.Message
func (*ChatCompletionFunction) Reset ¶
func (x *ChatCompletionFunction) Reset()
func (*ChatCompletionFunction) String ¶
func (x *ChatCompletionFunction) String() string
type ChatCompletionFunctionParameters ¶
type ChatCompletionFunctionParameters struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Properties map[string]*ChatCompletionFunctionParametersProperty `` /* 161-byte string literal not displayed */ Required []string `protobuf:"bytes,3,rep,name=required,proto3" json:"required,omitempty"` // contains filtered or unexported fields }
func (*ChatCompletionFunctionParameters) Descriptor
deprecated
func (*ChatCompletionFunctionParameters) Descriptor() ([]byte, []int)
Deprecated: Use ChatCompletionFunctionParameters.ProtoReflect.Descriptor instead.
func (*ChatCompletionFunctionParameters) GetProperties ¶
func (x *ChatCompletionFunctionParameters) GetProperties() map[string]*ChatCompletionFunctionParametersProperty
func (*ChatCompletionFunctionParameters) GetRequired ¶
func (x *ChatCompletionFunctionParameters) GetRequired() []string
func (*ChatCompletionFunctionParameters) GetType ¶
func (x *ChatCompletionFunctionParameters) GetType() string
func (*ChatCompletionFunctionParameters) ProtoMessage ¶
func (*ChatCompletionFunctionParameters) ProtoMessage()
func (*ChatCompletionFunctionParameters) ProtoReflect ¶
func (x *ChatCompletionFunctionParameters) ProtoReflect() protoreflect.Message
func (*ChatCompletionFunctionParameters) Reset ¶
func (x *ChatCompletionFunctionParameters) Reset()
func (*ChatCompletionFunctionParameters) String ¶
func (x *ChatCompletionFunctionParameters) String() string
type ChatCompletionFunctionParametersProperty ¶
type ChatCompletionFunctionParametersProperty struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Enum []string `protobuf:"bytes,3,rep,name=enum,proto3" json:"enum,omitempty"` // contains filtered or unexported fields }
func (*ChatCompletionFunctionParametersProperty) Descriptor
deprecated
func (*ChatCompletionFunctionParametersProperty) Descriptor() ([]byte, []int)
Deprecated: Use ChatCompletionFunctionParametersProperty.ProtoReflect.Descriptor instead.
func (*ChatCompletionFunctionParametersProperty) GetDescription ¶
func (x *ChatCompletionFunctionParametersProperty) GetDescription() string
func (*ChatCompletionFunctionParametersProperty) GetEnum ¶
func (x *ChatCompletionFunctionParametersProperty) GetEnum() []string
func (*ChatCompletionFunctionParametersProperty) GetType ¶
func (x *ChatCompletionFunctionParametersProperty) GetType() string
func (*ChatCompletionFunctionParametersProperty) ProtoMessage ¶
func (*ChatCompletionFunctionParametersProperty) ProtoMessage()
func (*ChatCompletionFunctionParametersProperty) ProtoReflect ¶
func (x *ChatCompletionFunctionParametersProperty) ProtoReflect() protoreflect.Message
func (*ChatCompletionFunctionParametersProperty) Reset ¶
func (x *ChatCompletionFunctionParametersProperty) Reset()
func (*ChatCompletionFunctionParametersProperty) String ¶
func (x *ChatCompletionFunctionParametersProperty) String() string
type ChatCompletionMessage ¶
type ChatCompletionMessage 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"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` FunctionCall *ChatCompletionMessageFunctionCall `protobuf:"bytes,4,opt,name=function_call,json=functionCall,proto3" json:"function_call,omitempty"` FinishReason string `protobuf:"bytes,5,opt,name=finish_reason,json=finishReason,proto3" json:"finish_reason,omitempty"` // contains filtered or unexported fields }
func (*ChatCompletionMessage) Descriptor
deprecated
func (*ChatCompletionMessage) Descriptor() ([]byte, []int)
Deprecated: Use ChatCompletionMessage.ProtoReflect.Descriptor instead.
func (*ChatCompletionMessage) GetContent ¶
func (x *ChatCompletionMessage) GetContent() string
func (*ChatCompletionMessage) GetFinishReason ¶
func (x *ChatCompletionMessage) GetFinishReason() string
func (*ChatCompletionMessage) GetFunctionCall ¶
func (x *ChatCompletionMessage) GetFunctionCall() *ChatCompletionMessageFunctionCall
func (*ChatCompletionMessage) GetName ¶
func (x *ChatCompletionMessage) GetName() string
func (*ChatCompletionMessage) GetRole ¶
func (x *ChatCompletionMessage) GetRole() string
func (*ChatCompletionMessage) ProtoMessage ¶
func (*ChatCompletionMessage) ProtoMessage()
func (*ChatCompletionMessage) ProtoReflect ¶
func (x *ChatCompletionMessage) ProtoReflect() protoreflect.Message
func (*ChatCompletionMessage) Reset ¶
func (x *ChatCompletionMessage) Reset()
func (*ChatCompletionMessage) String ¶
func (x *ChatCompletionMessage) String() string
type ChatCompletionMessageFunctionCall ¶
type ChatCompletionMessageFunctionCall struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Arguments string `protobuf:"bytes,2,opt,name=arguments,proto3" json:"arguments,omitempty"` // contains filtered or unexported fields }
func (*ChatCompletionMessageFunctionCall) Descriptor
deprecated
func (*ChatCompletionMessageFunctionCall) Descriptor() ([]byte, []int)
Deprecated: Use ChatCompletionMessageFunctionCall.ProtoReflect.Descriptor instead.
func (*ChatCompletionMessageFunctionCall) GetArguments ¶
func (x *ChatCompletionMessageFunctionCall) GetArguments() string
func (*ChatCompletionMessageFunctionCall) GetName ¶
func (x *ChatCompletionMessageFunctionCall) GetName() string
func (*ChatCompletionMessageFunctionCall) ProtoMessage ¶
func (*ChatCompletionMessageFunctionCall) ProtoMessage()
func (*ChatCompletionMessageFunctionCall) ProtoReflect ¶
func (x *ChatCompletionMessageFunctionCall) ProtoReflect() protoreflect.Message
func (*ChatCompletionMessageFunctionCall) Reset ¶
func (x *ChatCompletionMessageFunctionCall) Reset()
func (*ChatCompletionMessageFunctionCall) String ¶
func (x *ChatCompletionMessageFunctionCall) String() string
type ChatGsrvClient ¶
type ChatGsrvClient interface { ChatEnquire(ctx context.Context, in *anypb.Any, opts ...grpc.CallOption) (*anypb.Any, error) ChatEnquireStream(ctx context.Context, opts ...grpc.CallOption) (ChatGsrv_ChatEnquireStreamClient, error) }
ChatGsrvClient is the client API for ChatGsrv 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 NewChatGsrvClient ¶
func NewChatGsrvClient(cc grpc.ClientConnInterface) ChatGsrvClient
type ChatGsrvServer ¶
type ChatGsrvServer interface { ChatEnquire(context.Context, *anypb.Any) (*anypb.Any, error) ChatEnquireStream(ChatGsrv_ChatEnquireStreamServer) error // contains filtered or unexported methods }
ChatGsrvServer is the server API for ChatGsrv service. All implementations must embed UnimplementedChatGsrvServer for forward compatibility
type UnimplementedChatGsrvServer ¶
type UnimplementedChatGsrvServer struct { }
UnimplementedChatGsrvServer must be embedded to have forward compatible implementations.
func (UnimplementedChatGsrvServer) ChatEnquire ¶
func (UnimplementedChatGsrvServer) ChatEnquireStream ¶
func (UnimplementedChatGsrvServer) ChatEnquireStream(ChatGsrv_ChatEnquireStreamServer) error
type UnsafeChatGsrvServer ¶
type UnsafeChatGsrvServer interface {
// contains filtered or unexported methods
}
UnsafeChatGsrvServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ChatGsrvServer will result in compilation errors.