Documentation
¶
Index ¶
- Variables
- func RegisterLlamaGoServiceServer(s grpc.ServiceRegistrar, srv LlamaGoServiceServer)
- type Job
- type JobStub
- type LlamaGoServiceClient
- type LlamaGoServiceServer
- type LlamaGoService_DoClient
- type LlamaGoService_DoServer
- type Output
- type Server
- type Status
- type UnimplementedLlamaGoServiceServer
- type UnsafeLlamaGoServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( Status_name = map[int32]string{ 0: "PENDING", 1: "RUNNING", 2: "FINISHED", 3: "FAILED", } Status_value = map[string]int32{ "PENDING": 0, "RUNNING": 1, "FINISHED": 2, "FAILED": 3, } )
Enum value maps for Status.
var File_pkg_grpc_message_proto protoreflect.FileDescriptor
var LlamaGoService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "module.LlamaGoService", HandlerType: (*LlamaGoServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Do", Handler: _LlamaGoService_Do_Handler, ServerStreams: true, }, }, Metadata: "pkg/grpc/message.proto", }
LlamaGoService_ServiceDesc is the grpc.ServiceDesc for LlamaGoService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLlamaGoServiceServer ¶
func RegisterLlamaGoServiceServer(s grpc.ServiceRegistrar, srv LlamaGoServiceServer)
Types ¶
type Job ¶
type Job struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Prompt string `protobuf:"bytes,2,opt,name=prompt,proto3" json:"prompt,omitempty"` // contains filtered or unexported fields }
func (*Job) Descriptor
deprecated
func (*Job) ProtoMessage ¶
func (*Job) ProtoMessage()
func (*Job) ProtoReflect ¶
func (x *Job) ProtoReflect() protoreflect.Message
type JobStub ¶
type JobStub struct { JobCancelFn context.CancelFunc // contains filtered or unexported fields }
func (*JobStub) SendResponse ¶
type LlamaGoServiceClient ¶
type LlamaGoServiceClient interface {
Do(ctx context.Context, in *Job, opts ...grpc.CallOption) (LlamaGoService_DoClient, error)
}
LlamaGoServiceClient is the client API for LlamaGoService 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 NewLlamaGoServiceClient ¶
func NewLlamaGoServiceClient(cc grpc.ClientConnInterface) LlamaGoServiceClient
type LlamaGoServiceServer ¶
type LlamaGoServiceServer interface { Do(*Job, LlamaGoService_DoServer) error // contains filtered or unexported methods }
LlamaGoServiceServer is the server API for LlamaGoService service. All implementations must embed UnimplementedLlamaGoServiceServer for forward compatibility
type LlamaGoService_DoClient ¶
type LlamaGoService_DoClient interface { Recv() (*Output, error) grpc.ClientStream }
type LlamaGoService_DoServer ¶
type LlamaGoService_DoServer interface { Send(*Output) error grpc.ServerStream }
type Output ¶
type Output struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=module.Status" json:"status,omitempty"` Output string `protobuf:"bytes,3,opt,name=output,proto3" json:"output,omitempty"` // contains filtered or unexported fields }
func (*Output) Descriptor
deprecated
func (*Output) ProtoMessage ¶
func (*Output) ProtoMessage()
func (*Output) ProtoReflect ¶
func (x *Output) ProtoReflect() protoreflect.Message
type Server ¶
type Server struct { LlamaGoServiceServer RunningPods int64 MaxPods int64 Vocab *ml.Vocab Model *llama.Model Params *llama.ModelParams // contains filtered or unexported fields }
type Status ¶
type Status int32
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type UnimplementedLlamaGoServiceServer ¶
type UnimplementedLlamaGoServiceServer struct { }
UnimplementedLlamaGoServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedLlamaGoServiceServer) Do ¶
func (UnimplementedLlamaGoServiceServer) Do(*Job, LlamaGoService_DoServer) error
type UnsafeLlamaGoServiceServer ¶
type UnsafeLlamaGoServiceServer interface {
// contains filtered or unexported methods
}
UnsafeLlamaGoServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LlamaGoServiceServer will result in compilation errors.