Documentation ¶
Index ¶
- Variables
- func RegisterBERTServer(s grpc.ServiceRegistrar, srv BERTServer)
- type Answer
- func (*Answer) Descriptor() ([]byte, []int)deprecated
- func (x *Answer) GetConfidence() float64
- func (x *Answer) GetEnd() int32
- func (x *Answer) GetStart() int32
- func (x *Answer) GetText() string
- func (*Answer) ProtoMessage()
- func (x *Answer) ProtoReflect() protoreflect.Message
- func (x *Answer) Reset()
- func (x *Answer) String() string
- type AnswerReply
- func (*AnswerReply) Descriptor() ([]byte, []int)deprecated
- func (x *AnswerReply) GetAnswers() []*Answer
- func (x *AnswerReply) GetTook() int64
- func (*AnswerReply) ProtoMessage()
- func (x *AnswerReply) ProtoReflect() protoreflect.Message
- func (x *AnswerReply) Reset()
- func (x *AnswerReply) String() string
- type AnswerRequest
- func (*AnswerRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AnswerRequest) GetPassage() string
- func (x *AnswerRequest) GetQuestion() string
- func (*AnswerRequest) ProtoMessage()
- func (x *AnswerRequest) ProtoReflect() protoreflect.Message
- func (x *AnswerRequest) Reset()
- func (x *AnswerRequest) String() string
- type BERTClient
- type BERTServer
- type ClassConfidencePair
- func (*ClassConfidencePair) Descriptor() ([]byte, []int)deprecated
- func (x *ClassConfidencePair) GetClass() string
- func (x *ClassConfidencePair) GetConfidence() float64
- func (*ClassConfidencePair) ProtoMessage()
- func (x *ClassConfidencePair) ProtoReflect() protoreflect.Message
- func (x *ClassConfidencePair) Reset()
- func (x *ClassConfidencePair) String() string
- type ClassifyReply
- func (*ClassifyReply) Descriptor() ([]byte, []int)deprecated
- func (x *ClassifyReply) GetClass() string
- func (x *ClassifyReply) GetConfidence() float64
- func (x *ClassifyReply) GetDistribution() []*ClassConfidencePair
- func (x *ClassifyReply) GetTook() int64
- func (*ClassifyReply) ProtoMessage()
- func (x *ClassifyReply) ProtoReflect() protoreflect.Message
- func (x *ClassifyReply) Reset()
- func (x *ClassifyReply) String() string
- type ClassifyRequest
- func (*ClassifyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ClassifyRequest) GetHasText2() bool
- func (x *ClassifyRequest) GetText() string
- func (x *ClassifyRequest) GetText2() string
- func (*ClassifyRequest) ProtoMessage()
- func (x *ClassifyRequest) ProtoReflect() protoreflect.Message
- func (x *ClassifyRequest) Reset()
- func (x *ClassifyRequest) String() string
- type DiscriminateReply
- func (*DiscriminateReply) Descriptor() ([]byte, []int)deprecated
- func (x *DiscriminateReply) GetTokens() []*Token
- func (x *DiscriminateReply) GetTook() int64
- func (*DiscriminateReply) ProtoMessage()
- func (x *DiscriminateReply) ProtoReflect() protoreflect.Message
- func (x *DiscriminateReply) Reset()
- func (x *DiscriminateReply) String() string
- type DiscriminateRequest
- func (*DiscriminateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DiscriminateRequest) GetText() string
- func (*DiscriminateRequest) ProtoMessage()
- func (x *DiscriminateRequest) ProtoReflect() protoreflect.Message
- func (x *DiscriminateRequest) Reset()
- func (x *DiscriminateRequest) String() string
- type EncodeReply
- func (*EncodeReply) Descriptor() ([]byte, []int)deprecated
- func (x *EncodeReply) GetTook() int64
- func (x *EncodeReply) GetVector() []float32
- func (*EncodeReply) ProtoMessage()
- func (x *EncodeReply) ProtoReflect() protoreflect.Message
- func (x *EncodeReply) Reset()
- func (x *EncodeReply) String() string
- type EncodeRequest
- func (*EncodeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EncodeRequest) GetPoolingStrategy() EncodeRequest_PoolingStrategy
- func (x *EncodeRequest) GetText() string
- func (*EncodeRequest) ProtoMessage()
- func (x *EncodeRequest) ProtoReflect() protoreflect.Message
- func (x *EncodeRequest) Reset()
- func (x *EncodeRequest) String() string
- type EncodeRequest_PoolingStrategy
- func (EncodeRequest_PoolingStrategy) Descriptor() protoreflect.EnumDescriptor
- func (x EncodeRequest_PoolingStrategy) Enum() *EncodeRequest_PoolingStrategy
- func (EncodeRequest_PoolingStrategy) EnumDescriptor() ([]byte, []int)deprecated
- func (x EncodeRequest_PoolingStrategy) Number() protoreflect.EnumNumber
- func (x EncodeRequest_PoolingStrategy) String() string
- func (EncodeRequest_PoolingStrategy) Type() protoreflect.EnumType
- type PredictReply
- func (*PredictReply) Descriptor() ([]byte, []int)deprecated
- func (x *PredictReply) GetTokens() []*Token
- func (x *PredictReply) GetTook() int64
- func (*PredictReply) ProtoMessage()
- func (x *PredictReply) ProtoReflect() protoreflect.Message
- func (x *PredictReply) Reset()
- func (x *PredictReply) String() string
- type PredictRequest
- type Token
- func (*Token) Descriptor() ([]byte, []int)deprecated
- func (x *Token) GetEnd() int32
- func (x *Token) GetLabel() string
- func (x *Token) GetStart() int32
- func (x *Token) GetText() string
- func (*Token) ProtoMessage()
- func (x *Token) ProtoReflect() protoreflect.Message
- func (x *Token) Reset()
- func (x *Token) String() string
- type UnimplementedBERTServer
- func (UnimplementedBERTServer) Answer(context.Context, *AnswerRequest) (*AnswerReply, error)
- func (UnimplementedBERTServer) Classify(context.Context, *ClassifyRequest) (*ClassifyReply, error)
- func (UnimplementedBERTServer) Discriminate(context.Context, *DiscriminateRequest) (*DiscriminateReply, error)
- func (UnimplementedBERTServer) Encode(context.Context, *EncodeRequest) (*EncodeReply, error)
- func (UnimplementedBERTServer) Predict(context.Context, *PredictRequest) (*PredictReply, error)
- type UnsafeBERTServer
Constants ¶
This section is empty.
Variables ¶
var ( EncodeRequest_PoolingStrategy_name = map[int32]string{ 0: "CLS_TOKEN", 1: "REDUCE_MEAN", 2: "REDUCE_MAX", 3: "REDUCE_MEAN_MAX", } EncodeRequest_PoolingStrategy_value = map[string]int32{ "CLS_TOKEN": 0, "REDUCE_MEAN": 1, "REDUCE_MAX": 2, "REDUCE_MEAN_MAX": 3, } )
Enum value maps for EncodeRequest_PoolingStrategy.
var BERT_ServiceDesc = grpc.ServiceDesc{ ServiceName: "bert.grpcapi.BERT", HandlerType: (*BERTServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Answer", Handler: _BERT_Answer_Handler, }, { MethodName: "Discriminate", Handler: _BERT_Discriminate_Handler, }, { MethodName: "Predict", Handler: _BERT_Predict_Handler, }, { MethodName: "Encode", Handler: _BERT_Encode_Handler, }, { MethodName: "Classify", Handler: _BERT_Classify_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "bert.proto", }
BERT_ServiceDesc is the grpc.ServiceDesc for BERT service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_bert_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBERTServer ¶
func RegisterBERTServer(s grpc.ServiceRegistrar, srv BERTServer)
Types ¶
type Answer ¶
type Answer struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` Start int32 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` End int32 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` Confidence float64 `protobuf:"fixed64,4,opt,name=confidence,proto3" json:"confidence,omitempty"` // contains filtered or unexported fields }
The response message containing the answers.
func (*Answer) Descriptor
deprecated
func (*Answer) GetConfidence ¶
func (*Answer) ProtoMessage ¶
func (*Answer) ProtoMessage()
func (*Answer) ProtoReflect ¶
func (x *Answer) ProtoReflect() protoreflect.Message
type AnswerReply ¶
type AnswerReply struct { Answers []*Answer `protobuf:"bytes,1,rep,name=answers,proto3" json:"answers,omitempty"` // Took is the number of milliseconds it took the server to execute the request. Took int64 `protobuf:"varint,2,opt,name=took,proto3" json:"took,omitempty"` // contains filtered or unexported fields }
func (*AnswerReply) Descriptor
deprecated
func (*AnswerReply) Descriptor() ([]byte, []int)
Deprecated: Use AnswerReply.ProtoReflect.Descriptor instead.
func (*AnswerReply) GetAnswers ¶
func (x *AnswerReply) GetAnswers() []*Answer
func (*AnswerReply) GetTook ¶
func (x *AnswerReply) GetTook() int64
func (*AnswerReply) ProtoMessage ¶
func (*AnswerReply) ProtoMessage()
func (*AnswerReply) ProtoReflect ¶
func (x *AnswerReply) ProtoReflect() protoreflect.Message
func (*AnswerReply) Reset ¶
func (x *AnswerReply) Reset()
func (*AnswerReply) String ¶
func (x *AnswerReply) String() string
type AnswerRequest ¶
type AnswerRequest struct { Passage string `protobuf:"bytes,1,opt,name=passage,proto3" json:"passage,omitempty"` Question string `protobuf:"bytes,2,opt,name=question,proto3" json:"question,omitempty"` // contains filtered or unexported fields }
The answer request message containing the passage and question to answer.
func (*AnswerRequest) Descriptor
deprecated
func (*AnswerRequest) Descriptor() ([]byte, []int)
Deprecated: Use AnswerRequest.ProtoReflect.Descriptor instead.
func (*AnswerRequest) GetPassage ¶
func (x *AnswerRequest) GetPassage() string
func (*AnswerRequest) GetQuestion ¶
func (x *AnswerRequest) GetQuestion() string
func (*AnswerRequest) ProtoMessage ¶
func (*AnswerRequest) ProtoMessage()
func (*AnswerRequest) ProtoReflect ¶
func (x *AnswerRequest) ProtoReflect() protoreflect.Message
func (*AnswerRequest) Reset ¶
func (x *AnswerRequest) Reset()
func (*AnswerRequest) String ¶
func (x *AnswerRequest) String() string
type BERTClient ¶
type BERTClient interface { // Sends a request to /answer. Answer(ctx context.Context, in *AnswerRequest, opts ...grpc.CallOption) (*AnswerReply, error) // Sends a request to /discriminate. Discriminate(ctx context.Context, in *DiscriminateRequest, opts ...grpc.CallOption) (*DiscriminateReply, error) // Sends a request to /predict. Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*PredictReply, error) // Sends a request to /encode. Encode(ctx context.Context, in *EncodeRequest, opts ...grpc.CallOption) (*EncodeReply, error) // Sends a request to /classify. Classify(ctx context.Context, in *ClassifyRequest, opts ...grpc.CallOption) (*ClassifyReply, error) }
BERTClient is the client API for BERT 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 NewBERTClient ¶
func NewBERTClient(cc grpc.ClientConnInterface) BERTClient
type BERTServer ¶
type BERTServer interface { // Sends a request to /answer. Answer(context.Context, *AnswerRequest) (*AnswerReply, error) // Sends a request to /discriminate. Discriminate(context.Context, *DiscriminateRequest) (*DiscriminateReply, error) // Sends a request to /predict. Predict(context.Context, *PredictRequest) (*PredictReply, error) // Sends a request to /encode. Encode(context.Context, *EncodeRequest) (*EncodeReply, error) // Sends a request to /classify. Classify(context.Context, *ClassifyRequest) (*ClassifyReply, error) // contains filtered or unexported methods }
BERTServer is the server API for BERT service. All implementations must embed UnimplementedBERTServer for forward compatibility
type ClassConfidencePair ¶
type ClassConfidencePair struct { Class string `protobuf:"bytes,1,opt,name=class,proto3" json:"class,omitempty"` Confidence float64 `protobuf:"fixed64,2,opt,name=confidence,proto3" json:"confidence,omitempty"` // contains filtered or unexported fields }
The response message containing the classification.
func (*ClassConfidencePair) Descriptor
deprecated
func (*ClassConfidencePair) Descriptor() ([]byte, []int)
Deprecated: Use ClassConfidencePair.ProtoReflect.Descriptor instead.
func (*ClassConfidencePair) GetClass ¶
func (x *ClassConfidencePair) GetClass() string
func (*ClassConfidencePair) GetConfidence ¶
func (x *ClassConfidencePair) GetConfidence() float64
func (*ClassConfidencePair) ProtoMessage ¶
func (*ClassConfidencePair) ProtoMessage()
func (*ClassConfidencePair) ProtoReflect ¶
func (x *ClassConfidencePair) ProtoReflect() protoreflect.Message
func (*ClassConfidencePair) Reset ¶
func (x *ClassConfidencePair) Reset()
func (*ClassConfidencePair) String ¶
func (x *ClassConfidencePair) String() string
type ClassifyReply ¶
type ClassifyReply struct { Class string `protobuf:"bytes,1,opt,name=class,proto3" json:"class,omitempty"` Confidence float64 `protobuf:"fixed64,2,opt,name=confidence,proto3" json:"confidence,omitempty"` Distribution []*ClassConfidencePair `protobuf:"bytes,3,rep,name=distribution,proto3" json:"distribution,omitempty"` // Took is the number of milliseconds it took the server to execute the request. Took int64 `protobuf:"varint,4,opt,name=took,proto3" json:"took,omitempty"` // contains filtered or unexported fields }
func (*ClassifyReply) Descriptor
deprecated
func (*ClassifyReply) Descriptor() ([]byte, []int)
Deprecated: Use ClassifyReply.ProtoReflect.Descriptor instead.
func (*ClassifyReply) GetClass ¶
func (x *ClassifyReply) GetClass() string
func (*ClassifyReply) GetConfidence ¶
func (x *ClassifyReply) GetConfidence() float64
func (*ClassifyReply) GetDistribution ¶
func (x *ClassifyReply) GetDistribution() []*ClassConfidencePair
func (*ClassifyReply) GetTook ¶
func (x *ClassifyReply) GetTook() int64
func (*ClassifyReply) ProtoMessage ¶
func (*ClassifyReply) ProtoMessage()
func (*ClassifyReply) ProtoReflect ¶
func (x *ClassifyReply) ProtoReflect() protoreflect.Message
func (*ClassifyReply) Reset ¶
func (x *ClassifyReply) Reset()
func (*ClassifyReply) String ¶
func (x *ClassifyReply) String() string
type ClassifyRequest ¶
type ClassifyRequest struct { HasText2 bool `protobuf:"varint,1,opt,name=has_text2,json=hasText2,proto3" json:"has_text2,omitempty"` // always set this to "true" when using text2 Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` Text2 string `protobuf:"bytes,3,opt,name=text2,proto3" json:"text2,omitempty"` // contains filtered or unexported fields }
The classify request message containing the text to classify
func (*ClassifyRequest) Descriptor
deprecated
func (*ClassifyRequest) Descriptor() ([]byte, []int)
Deprecated: Use ClassifyRequest.ProtoReflect.Descriptor instead.
func (*ClassifyRequest) GetHasText2 ¶
func (x *ClassifyRequest) GetHasText2() bool
func (*ClassifyRequest) GetText ¶
func (x *ClassifyRequest) GetText() string
func (*ClassifyRequest) GetText2 ¶
func (x *ClassifyRequest) GetText2() string
func (*ClassifyRequest) ProtoMessage ¶
func (*ClassifyRequest) ProtoMessage()
func (*ClassifyRequest) ProtoReflect ¶
func (x *ClassifyRequest) ProtoReflect() protoreflect.Message
func (*ClassifyRequest) Reset ¶
func (x *ClassifyRequest) Reset()
func (*ClassifyRequest) String ¶
func (x *ClassifyRequest) String() string
type DiscriminateReply ¶
type DiscriminateReply struct { Tokens []*Token `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"` // Took is the number of milliseconds it took the server to execute the request. Took int64 `protobuf:"varint,2,opt,name=took,proto3" json:"took,omitempty"` // contains filtered or unexported fields }
func (*DiscriminateReply) Descriptor
deprecated
func (*DiscriminateReply) Descriptor() ([]byte, []int)
Deprecated: Use DiscriminateReply.ProtoReflect.Descriptor instead.
func (*DiscriminateReply) GetTokens ¶
func (x *DiscriminateReply) GetTokens() []*Token
func (*DiscriminateReply) GetTook ¶
func (x *DiscriminateReply) GetTook() int64
func (*DiscriminateReply) ProtoMessage ¶
func (*DiscriminateReply) ProtoMessage()
func (*DiscriminateReply) ProtoReflect ¶
func (x *DiscriminateReply) ProtoReflect() protoreflect.Message
func (*DiscriminateReply) Reset ¶
func (x *DiscriminateReply) Reset()
func (*DiscriminateReply) String ¶
func (x *DiscriminateReply) String() string
type DiscriminateRequest ¶
type DiscriminateRequest struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // contains filtered or unexported fields }
The discriminate request message containing the text.
func (*DiscriminateRequest) Descriptor
deprecated
func (*DiscriminateRequest) Descriptor() ([]byte, []int)
Deprecated: Use DiscriminateRequest.ProtoReflect.Descriptor instead.
func (*DiscriminateRequest) GetText ¶
func (x *DiscriminateRequest) GetText() string
func (*DiscriminateRequest) ProtoMessage ¶
func (*DiscriminateRequest) ProtoMessage()
func (*DiscriminateRequest) ProtoReflect ¶
func (x *DiscriminateRequest) ProtoReflect() protoreflect.Message
func (*DiscriminateRequest) Reset ¶
func (x *DiscriminateRequest) Reset()
func (*DiscriminateRequest) String ¶
func (x *DiscriminateRequest) String() string
type EncodeReply ¶
type EncodeReply struct { Vector []float32 `protobuf:"fixed32,1,rep,packed,name=vector,proto3" json:"vector,omitempty"` // Took is the number of milliseconds it took the server to execute the request. Took int64 `protobuf:"varint,2,opt,name=took,proto3" json:"took,omitempty"` // contains filtered or unexported fields }
The response message containing the tokens from BERT prediction.
func (*EncodeReply) Descriptor
deprecated
func (*EncodeReply) Descriptor() ([]byte, []int)
Deprecated: Use EncodeReply.ProtoReflect.Descriptor instead.
func (*EncodeReply) GetTook ¶
func (x *EncodeReply) GetTook() int64
func (*EncodeReply) GetVector ¶
func (x *EncodeReply) GetVector() []float32
func (*EncodeReply) ProtoMessage ¶
func (*EncodeReply) ProtoMessage()
func (*EncodeReply) ProtoReflect ¶
func (x *EncodeReply) ProtoReflect() protoreflect.Message
func (*EncodeReply) Reset ¶
func (x *EncodeReply) Reset()
func (*EncodeReply) String ¶
func (x *EncodeReply) String() string
type EncodeRequest ¶
type EncodeRequest struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` PoolingStrategy EncodeRequest_PoolingStrategy `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
The encode request message containing the text.
func (*EncodeRequest) Descriptor
deprecated
func (*EncodeRequest) Descriptor() ([]byte, []int)
Deprecated: Use EncodeRequest.ProtoReflect.Descriptor instead.
func (*EncodeRequest) GetPoolingStrategy ¶ added in v0.5.2
func (x *EncodeRequest) GetPoolingStrategy() EncodeRequest_PoolingStrategy
func (*EncodeRequest) GetText ¶
func (x *EncodeRequest) GetText() string
func (*EncodeRequest) ProtoMessage ¶
func (*EncodeRequest) ProtoMessage()
func (*EncodeRequest) ProtoReflect ¶
func (x *EncodeRequest) ProtoReflect() protoreflect.Message
func (*EncodeRequest) Reset ¶
func (x *EncodeRequest) Reset()
func (*EncodeRequest) String ¶
func (x *EncodeRequest) String() string
type EncodeRequest_PoolingStrategy ¶ added in v0.5.2
type EncodeRequest_PoolingStrategy int32
const ( // get the encoding state corresponding to [CLS], i.e. the first token (default) EncodeRequest_CLS_TOKEN EncodeRequest_PoolingStrategy = 0 // take the average of the encoding states EncodeRequest_REDUCE_MEAN EncodeRequest_PoolingStrategy = 1 // take the maximum of the encoding states EncodeRequest_REDUCE_MAX EncodeRequest_PoolingStrategy = 2 // do REDUCE_MEAN and REDUCE_MAX separately and then concat them together EncodeRequest_REDUCE_MEAN_MAX EncodeRequest_PoolingStrategy = 3 )
func (EncodeRequest_PoolingStrategy) Descriptor ¶ added in v0.5.2
func (EncodeRequest_PoolingStrategy) Descriptor() protoreflect.EnumDescriptor
func (EncodeRequest_PoolingStrategy) Enum ¶ added in v0.5.2
func (x EncodeRequest_PoolingStrategy) Enum() *EncodeRequest_PoolingStrategy
func (EncodeRequest_PoolingStrategy) EnumDescriptor
deprecated
added in
v0.5.2
func (EncodeRequest_PoolingStrategy) EnumDescriptor() ([]byte, []int)
Deprecated: Use EncodeRequest_PoolingStrategy.Descriptor instead.
func (EncodeRequest_PoolingStrategy) Number ¶ added in v0.5.2
func (x EncodeRequest_PoolingStrategy) Number() protoreflect.EnumNumber
func (EncodeRequest_PoolingStrategy) String ¶ added in v0.5.2
func (x EncodeRequest_PoolingStrategy) String() string
func (EncodeRequest_PoolingStrategy) Type ¶ added in v0.5.2
func (EncodeRequest_PoolingStrategy) Type() protoreflect.EnumType
type PredictReply ¶
type PredictReply struct { Tokens []*Token `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"` // Took is the number of milliseconds it took the server to execute the request. Took int64 `protobuf:"varint,2,opt,name=took,proto3" json:"took,omitempty"` // contains filtered or unexported fields }
The response message containing the tokens from BERT prediction.
func (*PredictReply) Descriptor
deprecated
func (*PredictReply) Descriptor() ([]byte, []int)
Deprecated: Use PredictReply.ProtoReflect.Descriptor instead.
func (*PredictReply) GetTokens ¶
func (x *PredictReply) GetTokens() []*Token
func (*PredictReply) GetTook ¶
func (x *PredictReply) GetTook() int64
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 PredictRequest ¶
type PredictRequest struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // contains filtered or unexported fields }
The predict request message containing the text.
func (*PredictRequest) Descriptor
deprecated
func (*PredictRequest) Descriptor() ([]byte, []int)
Deprecated: Use PredictRequest.ProtoReflect.Descriptor instead.
func (*PredictRequest) GetText ¶
func (x *PredictRequest) GetText() string
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 Token ¶
type Token struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` Start int32 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` End int32 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` Label string `protobuf:"bytes,4,opt,name=label,proto3" json:"label,omitempty"` // contains filtered or unexported fields }
The response message containing the tokens from discriminate analysis.
func (*Token) Descriptor
deprecated
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶
func (x *Token) ProtoReflect() protoreflect.Message
type UnimplementedBERTServer ¶
type UnimplementedBERTServer struct { }
UnimplementedBERTServer must be embedded to have forward compatible implementations.
func (UnimplementedBERTServer) Answer ¶
func (UnimplementedBERTServer) Answer(context.Context, *AnswerRequest) (*AnswerReply, error)
func (UnimplementedBERTServer) Classify ¶
func (UnimplementedBERTServer) Classify(context.Context, *ClassifyRequest) (*ClassifyReply, error)
func (UnimplementedBERTServer) Discriminate ¶
func (UnimplementedBERTServer) Discriminate(context.Context, *DiscriminateRequest) (*DiscriminateReply, error)
func (UnimplementedBERTServer) Encode ¶
func (UnimplementedBERTServer) Encode(context.Context, *EncodeRequest) (*EncodeReply, error)
func (UnimplementedBERTServer) Predict ¶
func (UnimplementedBERTServer) Predict(context.Context, *PredictRequest) (*PredictReply, error)
type UnsafeBERTServer ¶ added in v0.2.0
type UnsafeBERTServer interface {
// contains filtered or unexported methods
}
UnsafeBERTServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BERTServer will result in compilation errors.