drive

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RpcProto_SendChat_FullMethodName  = "/drive.RpcProto/SendChat"
	RpcProto_SendQuery_FullMethodName = "/drive.RpcProto/SendQuery"
)

Variables

View Source
var File_drive_rpc_rpc_proto protoreflect.FileDescriptor
View Source
var RpcProto_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "drive.RpcProto",
	HandlerType: (*RpcProtoServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendChat",
			Handler:    _RpcProto_SendChat_Handler,
		},
		{
			MethodName: "SendQuery",
			Handler:    _RpcProto_SendQuery_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "drive/rpc/rpc.proto",
}

RpcProto_ServiceDesc is the grpc.ServiceDesc for RpcProto service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterRpcProtoServer added in v0.2.0

func RegisterRpcProtoServer(s grpc.ServiceRegistrar, srv RpcProtoServer)

Types

type ChatMessage added in v0.2.0

type ChatMessage struct {
	Role    string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatMessage) Descriptor deprecated added in v0.2.0

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

Deprecated: Use ChatMessage.ProtoReflect.Descriptor instead.

func (*ChatMessage) GetContent added in v0.2.0

func (x *ChatMessage) GetContent() string

func (*ChatMessage) GetRole added in v0.2.0

func (x *ChatMessage) GetRole() string

func (*ChatMessage) ProtoMessage added in v0.2.0

func (*ChatMessage) ProtoMessage()

func (*ChatMessage) ProtoReflect added in v0.2.0

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

func (*ChatMessage) Reset added in v0.2.0

func (x *ChatMessage) Reset()

func (*ChatMessage) String added in v0.2.0

func (x *ChatMessage) String() string

type ChatOption added in v0.2.0

type ChatOption struct {
	Temperature float32 `protobuf:"fixed32,1,opt,name=temperature,proto3" json:"temperature,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatOption) Descriptor deprecated added in v0.2.0

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

Deprecated: Use ChatOption.ProtoReflect.Descriptor instead.

func (*ChatOption) GetTemperature added in v0.2.0

func (x *ChatOption) GetTemperature() float32

func (*ChatOption) ProtoMessage added in v0.2.0

func (*ChatOption) ProtoMessage()

func (*ChatOption) ProtoReflect added in v0.2.0

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

func (*ChatOption) Reset added in v0.2.0

func (x *ChatOption) Reset()

func (*ChatOption) String added in v0.2.0

func (x *ChatOption) String() string

type ChatReply added in v0.2.0

type ChatReply struct {
	Model     string       `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	CreatedAt string       `protobuf:"bytes,2,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
	Message   *ChatMessage `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Done      bool         `protobuf:"varint,4,opt,name=done,proto3" json:"done,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatReply) Descriptor deprecated added in v0.2.0

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

Deprecated: Use ChatReply.ProtoReflect.Descriptor instead.

func (*ChatReply) GetCreatedAt added in v0.2.0

func (x *ChatReply) GetCreatedAt() string

func (*ChatReply) GetDone added in v0.2.0

func (x *ChatReply) GetDone() bool

func (*ChatReply) GetMessage added in v0.2.0

func (x *ChatReply) GetMessage() *ChatMessage

func (*ChatReply) GetModel added in v0.2.0

func (x *ChatReply) GetModel() string

func (*ChatReply) ProtoMessage added in v0.2.0

func (*ChatReply) ProtoMessage()

func (*ChatReply) ProtoReflect added in v0.2.0

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

func (*ChatReply) Reset added in v0.2.0

func (x *ChatReply) Reset()

func (*ChatReply) String added in v0.2.0

func (x *ChatReply) String() string

type ChatRequest added in v0.2.0

type ChatRequest struct {
	Model     string         `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	Messages  []*ChatMessage `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
	Format    string         `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"`
	Options   *ChatOption    `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"`
	Stream    bool           `protobuf:"varint,5,opt,name=stream,proto3" json:"stream,omitempty"`
	KeepAlive string         `protobuf:"bytes,6,opt,name=keepAlive,proto3" json:"keepAlive,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use ChatRequest.ProtoReflect.Descriptor instead.

func (*ChatRequest) GetFormat added in v0.2.0

func (x *ChatRequest) GetFormat() string

func (*ChatRequest) GetKeepAlive added in v0.2.0

func (x *ChatRequest) GetKeepAlive() string

func (*ChatRequest) GetMessages added in v0.2.0

func (x *ChatRequest) GetMessages() []*ChatMessage

func (*ChatRequest) GetModel added in v0.2.0

func (x *ChatRequest) GetModel() string

func (*ChatRequest) GetOptions added in v0.2.0

func (x *ChatRequest) GetOptions() *ChatOption

func (*ChatRequest) GetStream added in v0.2.0

func (x *ChatRequest) GetStream() bool

func (*ChatRequest) ProtoMessage added in v0.2.0

func (*ChatRequest) ProtoMessage()

func (*ChatRequest) ProtoReflect added in v0.2.0

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

func (*ChatRequest) Reset added in v0.2.0

func (x *ChatRequest) Reset()

func (*ChatRequest) String added in v0.2.0

func (x *ChatRequest) String() string

type QueryReply added in v0.2.0

type QueryReply struct {
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Url     string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	User    string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"`
	Pass    string `protobuf:"bytes,4,opt,name=pass,proto3" json:"pass,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryReply) Descriptor deprecated added in v0.2.0

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

Deprecated: Use QueryReply.ProtoReflect.Descriptor instead.

func (*QueryReply) GetPass added in v0.2.0

func (x *QueryReply) GetPass() string

func (*QueryReply) GetUrl added in v0.2.0

func (x *QueryReply) GetUrl() string

func (*QueryReply) GetUser added in v0.2.0

func (x *QueryReply) GetUser() string

func (*QueryReply) GetVersion added in v0.2.0

func (x *QueryReply) GetVersion() string

func (*QueryReply) ProtoMessage added in v0.2.0

func (*QueryReply) ProtoMessage()

func (*QueryReply) ProtoReflect added in v0.2.0

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

func (*QueryReply) Reset added in v0.2.0

func (x *QueryReply) Reset()

func (*QueryReply) String added in v0.2.0

func (x *QueryReply) String() string

type QueryRequest added in v0.2.0

type QueryRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Arch string `protobuf:"bytes,2,opt,name=arch,proto3" json:"arch,omitempty"`
	Os   string `protobuf:"bytes,3,opt,name=os,proto3" json:"os,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.

func (*QueryRequest) GetArch added in v0.2.0

func (x *QueryRequest) GetArch() string

func (*QueryRequest) GetName added in v0.2.0

func (x *QueryRequest) GetName() string

func (*QueryRequest) GetOs added in v0.2.0

func (x *QueryRequest) GetOs() string

func (*QueryRequest) ProtoMessage added in v0.2.0

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) ProtoReflect added in v0.2.0

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

func (*QueryRequest) Reset added in v0.2.0

func (x *QueryRequest) Reset()

func (*QueryRequest) String added in v0.2.0

func (x *QueryRequest) String() string

type RpcProtoClient added in v0.2.0

type RpcProtoClient interface {
	SendChat(ctx context.Context, in *ChatRequest, opts ...grpc.CallOption) (*ChatReply, error)
	SendQuery(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryReply, error)
}

RpcProtoClient is the client API for RpcProto 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 NewRpcProtoClient added in v0.2.0

func NewRpcProtoClient(cc grpc.ClientConnInterface) RpcProtoClient

type RpcProtoServer added in v0.2.0

type RpcProtoServer interface {
	SendChat(context.Context, *ChatRequest) (*ChatReply, error)
	SendQuery(context.Context, *QueryRequest) (*QueryReply, error)
	// contains filtered or unexported methods
}

RpcProtoServer is the server API for RpcProto service. All implementations must embed UnimplementedRpcProtoServer for forward compatibility

type UnimplementedRpcProtoServer added in v0.2.0

type UnimplementedRpcProtoServer struct {
}

UnimplementedRpcProtoServer must be embedded to have forward compatible implementations.

func (UnimplementedRpcProtoServer) SendChat added in v0.2.0

func (UnimplementedRpcProtoServer) SendQuery added in v0.2.0

type UnsafeRpcProtoServer added in v0.2.0

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

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

Jump to

Keyboard shortcuts

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