openaipb

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Chatgpt_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "openai.Chatgpt",
	HandlerType: (*ChatgptServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Send",
			Handler:       _Chatgpt_Send_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "openaipb/openai.proto",
}

Chatgpt_ServiceDesc is the grpc.ServiceDesc for Chatgpt 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_openaipb_openai_proto protoreflect.FileDescriptor

Functions

func RegisterChatgptServer

func RegisterChatgptServer(s grpc.ServiceRegistrar, srv ChatgptServer)

Types

type Answer

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

func (*Answer) Descriptor deprecated

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

Deprecated: Use Answer.ProtoReflect.Descriptor instead.

func (*Answer) GetContent

func (x *Answer) GetContent() string

func (*Answer) GetError

func (x *Answer) GetError() string

func (*Answer) ProtoMessage

func (*Answer) ProtoMessage()

func (*Answer) ProtoReflect

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

func (*Answer) Reset

func (x *Answer) Reset()

func (*Answer) String

func (x *Answer) String() string

type ChatgptClient

type ChatgptClient interface {
	Send(ctx context.Context, in *Message, opts ...grpc.CallOption) (Chatgpt_SendClient, error)
}

ChatgptClient is the client API for Chatgpt 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 NewChatgptClient

func NewChatgptClient(cc grpc.ClientConnInterface) ChatgptClient

type ChatgptServer

type ChatgptServer interface {
	Send(*Message, Chatgpt_SendServer) error
	// contains filtered or unexported methods
}

ChatgptServer is the server API for Chatgpt service. All implementations must embed UnimplementedChatgptServer for forward compatibility

type Chatgpt_SendClient

type Chatgpt_SendClient interface {
	Recv() (*Answer, error)
	grpc.ClientStream
}

type Chatgpt_SendServer

type Chatgpt_SendServer interface {
	Send(*Answer) error
	grpc.ServerStream
}

type Message

type Message struct {
	Content string  `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	Params  *Params `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetContent

func (x *Message) GetContent() string

func (*Message) GetParams

func (x *Message) GetParams() *Params

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type Params

type Params struct {
	Model       string  `protobuf:"bytes,1,opt,name=models,proto3" json:"models,omitempty"`
	Temperature float32 `protobuf:"fixed32,2,opt,name=temperature,proto3" json:"temperature,omitempty"`
	// contains filtered or unexported fields
}

func (*Params) Descriptor deprecated

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

Deprecated: Use Params.ProtoReflect.Descriptor instead.

func (*Params) GetModel

func (x *Params) GetModel() string

func (*Params) GetTemperature

func (x *Params) GetTemperature() float32

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) ProtoReflect

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

func (*Params) Reset

func (x *Params) Reset()

func (*Params) String

func (x *Params) String() string

type UnimplementedChatgptServer

type UnimplementedChatgptServer struct {
}

UnimplementedChatgptServer must be embedded to have forward compatible implementations.

func (UnimplementedChatgptServer) Send

type UnsafeChatgptServer

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

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

Jump to

Keyboard shortcuts

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