chat_v1

package
v0.0.0-...-e7eda78 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Chat.ProtoReflect.Descriptor instead.

func (*Chat) GetFunctions

func (x *Chat) GetFunctions() []*ChatCompletionFunction

func (*Chat) GetMaxTokens

func (x *Chat) GetMaxTokens() int32

func (*Chat) GetMessages

func (x *Chat) GetMessages() []*ChatCompletionMessage

func (*Chat) GetModel

func (x *Chat) GetModel() string

func (*Chat) GetStoped

func (x *Chat) GetStoped() bool

func (*Chat) ProtoMessage

func (*Chat) ProtoMessage()

func (*Chat) ProtoReflect

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

func (*Chat) Reset

func (x *Chat) Reset()

func (*Chat) String

func (x *Chat) String() string

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 (*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 (*ChatCompletionFunctionParameters) GetRequired

func (x *ChatCompletionFunctionParameters) GetRequired() []string

func (*ChatCompletionFunctionParameters) GetType

func (*ChatCompletionFunctionParameters) ProtoMessage

func (*ChatCompletionFunctionParameters) ProtoMessage()

func (*ChatCompletionFunctionParameters) ProtoReflect

func (*ChatCompletionFunctionParameters) Reset

func (*ChatCompletionFunctionParameters) 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 (*ChatCompletionFunctionParametersProperty) GetEnum

func (*ChatCompletionFunctionParametersProperty) GetType

func (*ChatCompletionFunctionParametersProperty) ProtoMessage

func (*ChatCompletionFunctionParametersProperty) ProtoReflect

func (*ChatCompletionFunctionParametersProperty) Reset

func (*ChatCompletionFunctionParametersProperty) 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 (*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 (*ChatCompletionMessageFunctionCall) ProtoMessage

func (*ChatCompletionMessageFunctionCall) ProtoMessage()

func (*ChatCompletionMessageFunctionCall) ProtoReflect

func (*ChatCompletionMessageFunctionCall) Reset

func (*ChatCompletionMessageFunctionCall) 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 ChatGsrv_ChatEnquireStreamClient

type ChatGsrv_ChatEnquireStreamClient interface {
	Send(*anypb.Any) error
	Recv() (*anypb.Any, error)
	grpc.ClientStream
}

type ChatGsrv_ChatEnquireStreamServer

type ChatGsrv_ChatEnquireStreamServer interface {
	Send(*anypb.Any) error
	Recv() (*anypb.Any, error)
	grpc.ServerStream
}

type UnimplementedChatGsrvServer

type UnimplementedChatGsrvServer struct {
}

UnimplementedChatGsrvServer must be embedded to have forward compatible implementations.

func (UnimplementedChatGsrvServer) ChatEnquire

func (UnimplementedChatGsrvServer) ChatEnquireStream

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.

Jump to

Keyboard shortcuts

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