GPT

package
v0.0.0-...-f684a93 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_gpt_proto protoreflect.FileDescriptor
View Source
var GptService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gpt.GptService",
	HandlerType: (*GptServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Ask",
			Handler:       _GptService_Ask_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "proto/gpt.proto",
}

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

Functions

func RegisterGptServiceServer

func RegisterGptServiceServer(s grpc.ServiceRegistrar, srv GptServiceServer)

Types

type AskRequest

type AskRequest struct {
	Id    string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Text  string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	Style string `protobuf:"bytes,3,opt,name=style,proto3" json:"style,omitempty"`
	// contains filtered or unexported fields
}

func (*AskRequest) Descriptor deprecated

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

Deprecated: Use AskRequest.ProtoReflect.Descriptor instead.

func (*AskRequest) GetId

func (x *AskRequest) GetId() string

func (*AskRequest) GetStyle

func (x *AskRequest) GetStyle() string

func (*AskRequest) GetText

func (x *AskRequest) GetText() string

func (*AskRequest) ProtoMessage

func (*AskRequest) ProtoMessage()

func (*AskRequest) ProtoReflect

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

func (*AskRequest) Reset

func (x *AskRequest) Reset()

func (*AskRequest) String

func (x *AskRequest) String() string

type AskResponse

type AskResponse struct {
	Final       bool               `protobuf:"varint,1,opt,name=final,proto3" json:"final,omitempty"`
	Text        string             `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	MaxUnit     uint64             `protobuf:"varint,3,opt,name=maxUnit,proto3" json:"maxUnit,omitempty"`
	UnitUser    uint64             `protobuf:"varint,4,opt,name=unitUser,proto3" json:"unitUser,omitempty"`
	ExpiryTime  uint64             `protobuf:"varint,5,opt,name=ExpiryTime,proto3" json:"ExpiryTime,omitempty"`
	Suggestions []*structpb.Struct `protobuf:"bytes,6,rep,name=suggestions,proto3" json:"suggestions,omitempty"`
	// contains filtered or unexported fields
}

func (*AskResponse) Descriptor deprecated

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

Deprecated: Use AskResponse.ProtoReflect.Descriptor instead.

func (*AskResponse) GetExpiryTime

func (x *AskResponse) GetExpiryTime() uint64

func (*AskResponse) GetFinal

func (x *AskResponse) GetFinal() bool

func (*AskResponse) GetMaxUnit

func (x *AskResponse) GetMaxUnit() uint64

func (*AskResponse) GetSuggestions

func (x *AskResponse) GetSuggestions() []*structpb.Struct

func (*AskResponse) GetText

func (x *AskResponse) GetText() string

func (*AskResponse) GetUnitUser

func (x *AskResponse) GetUnitUser() uint64

func (*AskResponse) ProtoMessage

func (*AskResponse) ProtoMessage()

func (*AskResponse) ProtoReflect

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

func (*AskResponse) Reset

func (x *AskResponse) Reset()

func (*AskResponse) String

func (x *AskResponse) String() string

type GptServiceClient

type GptServiceClient interface {
	Ask(ctx context.Context, in *AskRequest, opts ...grpc.CallOption) (GptService_AskClient, error)
}

GptServiceClient is the client API for GptService 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 NewGptServiceClient

func NewGptServiceClient(cc grpc.ClientConnInterface) GptServiceClient

type GptServiceServer

type GptServiceServer interface {
	Ask(*AskRequest, GptService_AskServer) error
	// contains filtered or unexported methods
}

GptServiceServer is the server API for GptService service. All implementations must embed UnimplementedGptServiceServer for forward compatibility

type GptService_AskClient

type GptService_AskClient interface {
	Recv() (*AskResponse, error)
	grpc.ClientStream
}

type GptService_AskServer

type GptService_AskServer interface {
	Send(*AskResponse) error
	grpc.ServerStream
}

type UnimplementedGptServiceServer

type UnimplementedGptServiceServer struct {
}

UnimplementedGptServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedGptServiceServer) Ask

type UnsafeGptServiceServer

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

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

Jump to

Keyboard shortcuts

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