Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterChatPredictorServer(s grpc.ServiceRegistrar, srv ChatPredictorServer)
- type ChatPredictorClient
- type ChatPredictorServer
- type PredictReply
- type PredictReply_PredictReplyElem
- func (*PredictReply_PredictReplyElem) Descriptor() ([]byte, []int)deprecated
- func (x *PredictReply_PredictReplyElem) GetMsg() string
- func (x *PredictReply_PredictReplyElem) GetSim() float32
- func (*PredictReply_PredictReplyElem) ProtoMessage()
- func (x *PredictReply_PredictReplyElem) ProtoReflect() protoreflect.Message
- func (x *PredictReply_PredictReplyElem) Reset()
- func (x *PredictReply_PredictReplyElem) String() string
- type PredictRequest
- func (*PredictRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PredictRequest) GetMsg() string
- func (x *PredictRequest) GetNPrediction() int64
- func (x *PredictRequest) GetSimCutoff() float32
- func (x *PredictRequest) GetTimeOffsetSeconds() int64
- func (*PredictRequest) ProtoMessage()
- func (x *PredictRequest) ProtoReflect() protoreflect.Message
- func (x *PredictRequest) Reset()
- func (x *PredictRequest) String() string
- type UnimplementedChatPredictorServer
- type UnsafeChatPredictorServer
Constants ¶
const ( Default_PredictRequest_NPrediction = int64(5) Default_PredictRequest_TimeOffsetSeconds = int64(300) Default_PredictRequest_SimCutoff = float32(0) )
Default values for PredictRequest fields.
Variables ¶
var ChatPredictor_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ChatPredictor", HandlerType: (*ChatPredictorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PredictOne", Handler: _ChatPredictor_PredictOne_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "protos/predictor.proto", }
ChatPredictor_ServiceDesc is the grpc.ServiceDesc for ChatPredictor service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_protos_predictor_proto protoreflect.FileDescriptor
Functions ¶
func RegisterChatPredictorServer ¶
func RegisterChatPredictorServer(s grpc.ServiceRegistrar, srv ChatPredictorServer)
Types ¶
type ChatPredictorClient ¶
type ChatPredictorClient interface { // get predictions for one chat msg PredictOne(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*PredictReply, error) }
ChatPredictorClient is the client API for ChatPredictor 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 NewChatPredictorClient ¶
func NewChatPredictorClient(cc grpc.ClientConnInterface) ChatPredictorClient
type ChatPredictorServer ¶
type ChatPredictorServer interface { // get predictions for one chat msg PredictOne(context.Context, *PredictRequest) (*PredictReply, error) // contains filtered or unexported methods }
ChatPredictorServer is the server API for ChatPredictor service. All implementations must embed UnimplementedChatPredictorServer for forward compatibility
type PredictReply ¶
type PredictReply struct { Result []*PredictReply_PredictReplyElem `protobuf:"bytes,1,rep,name=result" json:"result,omitempty"` // contains filtered or unexported fields }
The response message containing the greetings
func (*PredictReply) Descriptor
deprecated
func (*PredictReply) Descriptor() ([]byte, []int)
Deprecated: Use PredictReply.ProtoReflect.Descriptor instead.
func (*PredictReply) GetResult ¶
func (x *PredictReply) GetResult() []*PredictReply_PredictReplyElem
func (*PredictReply) ProtoMessage ¶
func (*PredictReply) ProtoMessage()
func (*PredictReply) ProtoReflect ¶
func (x *PredictReply) ProtoReflect() protoreflect.Message
func (*PredictReply) Reset ¶
func (x *PredictReply) Reset()
func (*PredictReply) String ¶
func (x *PredictReply) String() string
type PredictReply_PredictReplyElem ¶
type PredictReply_PredictReplyElem struct { Msg *string `protobuf:"bytes,1,req,name=msg" json:"msg,omitempty"` Sim *float32 `protobuf:"fixed32,2,req,name=sim" json:"sim,omitempty"` // contains filtered or unexported fields }
func (*PredictReply_PredictReplyElem) Descriptor
deprecated
func (*PredictReply_PredictReplyElem) Descriptor() ([]byte, []int)
Deprecated: Use PredictReply_PredictReplyElem.ProtoReflect.Descriptor instead.
func (*PredictReply_PredictReplyElem) GetMsg ¶
func (x *PredictReply_PredictReplyElem) GetMsg() string
func (*PredictReply_PredictReplyElem) GetSim ¶
func (x *PredictReply_PredictReplyElem) GetSim() float32
func (*PredictReply_PredictReplyElem) ProtoMessage ¶
func (*PredictReply_PredictReplyElem) ProtoMessage()
func (*PredictReply_PredictReplyElem) ProtoReflect ¶
func (x *PredictReply_PredictReplyElem) ProtoReflect() protoreflect.Message
func (*PredictReply_PredictReplyElem) Reset ¶
func (x *PredictReply_PredictReplyElem) Reset()
func (*PredictReply_PredictReplyElem) String ¶
func (x *PredictReply_PredictReplyElem) String() string
type PredictRequest ¶
type PredictRequest struct { Msg *string `protobuf:"bytes,1,req,name=msg" json:"msg,omitempty"` NPrediction *int64 `protobuf:"varint,2,opt,name=n_prediction,json=nPrediction,def=5" json:"n_prediction,omitempty"` TimeOffsetSeconds *int64 `protobuf:"varint,3,opt,name=time_offset_seconds,json=timeOffsetSeconds,def=300" json:"time_offset_seconds,omitempty"` SimCutoff *float32 `protobuf:"fixed32,4,opt,name=sim_cutoff,json=simCutoff,def=0" json:"sim_cutoff,omitempty"` // contains filtered or unexported fields }
The request message containing the user's name.
func (*PredictRequest) Descriptor
deprecated
func (*PredictRequest) Descriptor() ([]byte, []int)
Deprecated: Use PredictRequest.ProtoReflect.Descriptor instead.
func (*PredictRequest) GetMsg ¶
func (x *PredictRequest) GetMsg() string
func (*PredictRequest) GetNPrediction ¶
func (x *PredictRequest) GetNPrediction() int64
func (*PredictRequest) GetSimCutoff ¶
func (x *PredictRequest) GetSimCutoff() float32
func (*PredictRequest) GetTimeOffsetSeconds ¶
func (x *PredictRequest) GetTimeOffsetSeconds() int64
func (*PredictRequest) ProtoMessage ¶
func (*PredictRequest) ProtoMessage()
func (*PredictRequest) ProtoReflect ¶
func (x *PredictRequest) ProtoReflect() protoreflect.Message
func (*PredictRequest) Reset ¶
func (x *PredictRequest) Reset()
func (*PredictRequest) String ¶
func (x *PredictRequest) String() string
type UnimplementedChatPredictorServer ¶
type UnimplementedChatPredictorServer struct { }
UnimplementedChatPredictorServer must be embedded to have forward compatible implementations.
func (UnimplementedChatPredictorServer) PredictOne ¶
func (UnimplementedChatPredictorServer) PredictOne(context.Context, *PredictRequest) (*PredictReply, error)
type UnsafeChatPredictorServer ¶
type UnsafeChatPredictorServer interface {
// contains filtered or unexported methods
}
UnsafeChatPredictorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ChatPredictorServer will result in compilation errors.