Documentation ¶
Overview ¶
Package languagemodelingv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterLanguageModelingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterLanguageModelingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterLanguageModelingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterLanguageModelingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterLanguageModelingServiceServer(s grpc.ServiceRegistrar, srv LanguageModelingServiceServer)
- type LanguageModelingParameters
- func (*LanguageModelingParameters) Descriptor() ([]byte, []int)deprecated
- func (x *LanguageModelingParameters) GetK() int32
- func (*LanguageModelingParameters) ProtoMessage()
- func (x *LanguageModelingParameters) ProtoReflect() protoreflect.Message
- func (x *LanguageModelingParameters) Reset()
- func (x *LanguageModelingParameters) String() string
- type LanguageModelingRequest
- func (*LanguageModelingRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LanguageModelingRequest) GetInput() string
- func (x *LanguageModelingRequest) GetParameters() *LanguageModelingParameters
- func (*LanguageModelingRequest) ProtoMessage()
- func (x *LanguageModelingRequest) ProtoReflect() protoreflect.Message
- func (x *LanguageModelingRequest) Reset()
- func (x *LanguageModelingRequest) String() string
- type LanguageModelingResponse
- func (*LanguageModelingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LanguageModelingResponse) GetTokens() []*Token
- func (*LanguageModelingResponse) ProtoMessage()
- func (x *LanguageModelingResponse) ProtoReflect() protoreflect.Message
- func (x *LanguageModelingResponse) Reset()
- func (x *LanguageModelingResponse) String() string
- type LanguageModelingServiceClient
- type LanguageModelingServiceServer
- type Token
- func (*Token) Descriptor() ([]byte, []int)deprecated
- func (x *Token) GetEnd() int32
- func (x *Token) GetScores() []float64
- func (x *Token) GetStart() int32
- func (x *Token) GetWords() []string
- func (*Token) ProtoMessage()
- func (x *Token) ProtoReflect() protoreflect.Message
- func (x *Token) Reset()
- func (x *Token) String() string
- type UnimplementedLanguageModelingServiceServer
- type UnsafeLanguageModelingServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_languagemodeling_v1_languagemodeling_proto protoreflect.FileDescriptor
var LanguageModelingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "languagemodeling.v1.LanguageModelingService", HandlerType: (*LanguageModelingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Predict", Handler: _LanguageModelingService_Predict_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "languagemodeling/v1/languagemodeling.proto", }
LanguageModelingService_ServiceDesc is the grpc.ServiceDesc for LanguageModelingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLanguageModelingServiceHandler ¶
func RegisterLanguageModelingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterLanguageModelingServiceHandler registers the http handlers for service LanguageModelingService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterLanguageModelingServiceHandlerClient ¶
func RegisterLanguageModelingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LanguageModelingServiceClient) error
RegisterLanguageModelingServiceHandlerClient registers the http handlers for service LanguageModelingService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LanguageModelingServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LanguageModelingServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "LanguageModelingServiceClient" to call the correct interceptors.
func RegisterLanguageModelingServiceHandlerFromEndpoint ¶
func RegisterLanguageModelingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterLanguageModelingServiceHandlerFromEndpoint is same as RegisterLanguageModelingServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterLanguageModelingServiceHandlerServer ¶
func RegisterLanguageModelingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LanguageModelingServiceServer) error
RegisterLanguageModelingServiceHandlerServer registers the http handlers for service LanguageModelingService to "mux". UnaryRPC :call LanguageModelingServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterLanguageModelingServiceHandlerFromEndpoint instead.
func RegisterLanguageModelingServiceServer ¶
func RegisterLanguageModelingServiceServer(s grpc.ServiceRegistrar, srv LanguageModelingServiceServer)
Types ¶
type LanguageModelingParameters ¶
type LanguageModelingParameters struct { K int32 `protobuf:"varint,1,opt,name=k,proto3" json:"k,omitempty"` // contains filtered or unexported fields }
func (*LanguageModelingParameters) Descriptor
deprecated
func (*LanguageModelingParameters) Descriptor() ([]byte, []int)
Deprecated: Use LanguageModelingParameters.ProtoReflect.Descriptor instead.
func (*LanguageModelingParameters) GetK ¶
func (x *LanguageModelingParameters) GetK() int32
func (*LanguageModelingParameters) ProtoMessage ¶
func (*LanguageModelingParameters) ProtoMessage()
func (*LanguageModelingParameters) ProtoReflect ¶
func (x *LanguageModelingParameters) ProtoReflect() protoreflect.Message
func (*LanguageModelingParameters) Reset ¶
func (x *LanguageModelingParameters) Reset()
func (*LanguageModelingParameters) String ¶
func (x *LanguageModelingParameters) String() string
type LanguageModelingRequest ¶
type LanguageModelingRequest struct { Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` Parameters *LanguageModelingParameters `protobuf:"bytes,2,opt,name=parameters,proto3" json:"parameters,omitempty"` // contains filtered or unexported fields }
func (*LanguageModelingRequest) Descriptor
deprecated
func (*LanguageModelingRequest) Descriptor() ([]byte, []int)
Deprecated: Use LanguageModelingRequest.ProtoReflect.Descriptor instead.
func (*LanguageModelingRequest) GetInput ¶
func (x *LanguageModelingRequest) GetInput() string
func (*LanguageModelingRequest) GetParameters ¶
func (x *LanguageModelingRequest) GetParameters() *LanguageModelingParameters
func (*LanguageModelingRequest) ProtoMessage ¶
func (*LanguageModelingRequest) ProtoMessage()
func (*LanguageModelingRequest) ProtoReflect ¶
func (x *LanguageModelingRequest) ProtoReflect() protoreflect.Message
func (*LanguageModelingRequest) Reset ¶
func (x *LanguageModelingRequest) Reset()
func (*LanguageModelingRequest) String ¶
func (x *LanguageModelingRequest) String() string
type LanguageModelingResponse ¶
type LanguageModelingResponse struct { Tokens []*Token `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"` // contains filtered or unexported fields }
func (*LanguageModelingResponse) Descriptor
deprecated
func (*LanguageModelingResponse) Descriptor() ([]byte, []int)
Deprecated: Use LanguageModelingResponse.ProtoReflect.Descriptor instead.
func (*LanguageModelingResponse) GetTokens ¶
func (x *LanguageModelingResponse) GetTokens() []*Token
func (*LanguageModelingResponse) ProtoMessage ¶
func (*LanguageModelingResponse) ProtoMessage()
func (*LanguageModelingResponse) ProtoReflect ¶
func (x *LanguageModelingResponse) ProtoReflect() protoreflect.Message
func (*LanguageModelingResponse) Reset ¶
func (x *LanguageModelingResponse) Reset()
func (*LanguageModelingResponse) String ¶
func (x *LanguageModelingResponse) String() string
type LanguageModelingServiceClient ¶
type LanguageModelingServiceClient interface {
Predict(ctx context.Context, in *LanguageModelingRequest, opts ...grpc.CallOption) (*LanguageModelingResponse, error)
}
LanguageModelingServiceClient is the client API for LanguageModelingService 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 NewLanguageModelingServiceClient ¶
func NewLanguageModelingServiceClient(cc grpc.ClientConnInterface) LanguageModelingServiceClient
type LanguageModelingServiceServer ¶
type LanguageModelingServiceServer interface { Predict(context.Context, *LanguageModelingRequest) (*LanguageModelingResponse, error) // contains filtered or unexported methods }
LanguageModelingServiceServer is the server API for LanguageModelingService service. All implementations must embed UnimplementedLanguageModelingServiceServer for forward compatibility
type Token ¶
type Token struct { Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` Words []string `protobuf:"bytes,3,rep,name=words,proto3" json:"words,omitempty"` Scores []float64 `protobuf:"fixed64,4,rep,packed,name=scores,proto3" json:"scores,omitempty"` // contains filtered or unexported fields }
func (*Token) Descriptor
deprecated
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶
func (x *Token) ProtoReflect() protoreflect.Message
type UnimplementedLanguageModelingServiceServer ¶
type UnimplementedLanguageModelingServiceServer struct { }
UnimplementedLanguageModelingServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedLanguageModelingServiceServer) Predict ¶
func (UnimplementedLanguageModelingServiceServer) Predict(context.Context, *LanguageModelingRequest) (*LanguageModelingResponse, error)
type UnsafeLanguageModelingServiceServer ¶
type UnsafeLanguageModelingServiceServer interface {
// contains filtered or unexported methods
}
UnsafeLanguageModelingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LanguageModelingServiceServer will result in compilation errors.