replitlmpb

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 CodeGenerator_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "replitlm.CodeGenerator",
	HandlerType: (*CodeGeneratorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendPrompt",
			Handler:    _CodeGenerator_SendPrompt_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "replitlmpb/replitlm.proto",
}

CodeGenerator_ServiceDesc is the grpc.ServiceDesc for CodeGenerator 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_replitlmpb_replitlm_proto protoreflect.FileDescriptor

Functions

func RegisterCodeGeneratorServer

func RegisterCodeGeneratorServer(s grpc.ServiceRegistrar, srv CodeGeneratorServer)

Types

type CodeGeneratorClient

type CodeGeneratorClient interface {
	// Send prompt to ReplitLM
	SendPrompt(ctx context.Context, in *CodeRequest, opts ...grpc.CallOption) (*CodeResponse, error)
}

CodeGeneratorClient is the client API for CodeGenerator 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.

type CodeGeneratorServer

type CodeGeneratorServer interface {
	// Send prompt to ReplitLM
	SendPrompt(context.Context, *CodeRequest) (*CodeResponse, error)
	// contains filtered or unexported methods
}

CodeGeneratorServer is the server API for CodeGenerator service. All implementations must embed UnimplementedCodeGeneratorServer for forward compatibility

type CodeRequest

type CodeRequest struct {
	Prompt string `protobuf:"bytes,1,opt,name=prompt,proto3" json:"prompt,omitempty"`
	Lang   string `protobuf:"bytes,2,opt,name=lang,proto3" json:"lang,omitempty"`
	// contains filtered or unexported fields
}

The request message.

func (*CodeRequest) Descriptor deprecated

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

Deprecated: Use CodeRequest.ProtoReflect.Descriptor instead.

func (*CodeRequest) GetLang

func (x *CodeRequest) GetLang() string

func (*CodeRequest) GetPrompt

func (x *CodeRequest) GetPrompt() string

func (*CodeRequest) ProtoMessage

func (*CodeRequest) ProtoMessage()

func (*CodeRequest) ProtoReflect

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

func (*CodeRequest) Reset

func (x *CodeRequest) Reset()

func (*CodeRequest) String

func (x *CodeRequest) String() string

type CodeResponse

type CodeResponse struct {
	Ret  *Result `protobuf:"bytes,1,opt,name=ret,proto3" json:"ret,omitempty"`
	Code int32   `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
	Msg  string  `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

The response message.

func (*CodeResponse) Descriptor deprecated

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

Deprecated: Use CodeResponse.ProtoReflect.Descriptor instead.

func (*CodeResponse) GetCode

func (x *CodeResponse) GetCode() int32

func (*CodeResponse) GetMsg

func (x *CodeResponse) GetMsg() string

func (*CodeResponse) GetRet

func (x *CodeResponse) GetRet() *Result

func (*CodeResponse) ProtoMessage

func (*CodeResponse) ProtoMessage()

func (*CodeResponse) ProtoReflect

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

func (*CodeResponse) Reset

func (x *CodeResponse) Reset()

func (*CodeResponse) String

func (x *CodeResponse) String() string

type Result

type Result struct {
	CodeList           []string `protobuf:"bytes,1,rep,name=code_list,json=codeList,proto3" json:"code_list,omitempty"`
	CompletionTokenNum int32    `protobuf:"varint,2,opt,name=completion_token_num,json=completionTokenNum,proto3" json:"completion_token_num,omitempty"`
	PromptTokenNum     int32    `protobuf:"varint,3,opt,name=prompt_token_num,json=promptTokenNum,proto3" json:"prompt_token_num,omitempty"`
	// contains filtered or unexported fields
}

func (*Result) Descriptor deprecated

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

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetCodeList

func (x *Result) GetCodeList() []string

func (*Result) GetCompletionTokenNum

func (x *Result) GetCompletionTokenNum() int32

func (*Result) GetPromptTokenNum

func (x *Result) GetPromptTokenNum() int32

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

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

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

type UnimplementedCodeGeneratorServer

type UnimplementedCodeGeneratorServer struct {
}

UnimplementedCodeGeneratorServer must be embedded to have forward compatible implementations.

func (UnimplementedCodeGeneratorServer) SendPrompt

type UnsafeCodeGeneratorServer

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

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

Jump to

Keyboard shortcuts

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