Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAssistantServiceServer(s grpc.ServiceRegistrar, srv AssistantServiceServer)
- type AssistantServiceClient
- type AssistantServiceServer
- type PromptMessage
- type PromptPart
- func (*PromptPart) Descriptor() ([]byte, []int)deprecated
- func (x *PromptPart) GetContent() string
- func (x *PromptPart) GetMimeType() string
- func (x *PromptPart) GetType() string
- func (*PromptPart) ProtoMessage()
- func (x *PromptPart) ProtoReflect() protoreflect.Message
- func (x *PromptPart) Reset()
- func (x *PromptPart) String() string
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetCurrentMessage() *PromptMessage
- func (x *Request) GetHistoryMessages() []*PromptMessage
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Response
- type UnimplementedAssistantServiceServer
- type UnsafeAssistantServiceServer
Constants ¶
const ( PartTypeText = "text" PartTypeImage = "image" )
Content part types for multimodal prompts
const (
AssistantService_Chat_FullMethodName = "/magic_conch_shell.v1.AssistantService/Chat"
)
Variables ¶
var AssistantService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "magic_conch_shell.v1.AssistantService", HandlerType: (*AssistantServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Chat", Handler: _AssistantService_Chat_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "structs.proto", }
AssistantService_ServiceDesc is the grpc.ServiceDesc for AssistantService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_structs_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAssistantServiceServer ¶
func RegisterAssistantServiceServer(s grpc.ServiceRegistrar, srv AssistantServiceServer)
Types ¶
type AssistantServiceClient ¶
type AssistantServiceClient interface {
Chat(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
AssistantServiceClient is the client API for AssistantService 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 NewAssistantServiceClient ¶
func NewAssistantServiceClient(cc grpc.ClientConnInterface) AssistantServiceClient
type AssistantServiceServer ¶
type AssistantServiceServer interface {
Chat(context.Context, *Request) (*Response, error)
// contains filtered or unexported methods
}
AssistantServiceServer is the server API for AssistantService service. All implementations must embed UnimplementedAssistantServiceServer for forward compatibility.
type PromptMessage ¶
type PromptMessage struct {
Parts []*PromptPart `protobuf:"bytes,1,rep,name=parts,proto3" json:"parts,omitempty"`
// contains filtered or unexported fields
}
structs.PromptMessage
func (*PromptMessage) Descriptor
deprecated
func (*PromptMessage) Descriptor() ([]byte, []int)
Deprecated: Use PromptMessage.ProtoReflect.Descriptor instead.
func (*PromptMessage) GetParts ¶
func (x *PromptMessage) GetParts() []*PromptPart
func (*PromptMessage) ProtoMessage ¶
func (*PromptMessage) ProtoMessage()
func (*PromptMessage) ProtoReflect ¶
func (x *PromptMessage) ProtoReflect() protoreflect.Message
func (*PromptMessage) Reset ¶
func (x *PromptMessage) Reset()
func (*PromptMessage) String ¶
func (x *PromptMessage) String() string
type PromptPart ¶
type PromptPart struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
// contains filtered or unexported fields
}
structs.PromptPart
func NewImagePart ¶
func NewImagePart(mimeType string, content string) *PromptPart
NewImagePart creates a new PromptPart containing image data reference.
func NewTextPart ¶
func NewTextPart(content string) *PromptPart
NewTextPart creates a new PromptPart containing text.
func (*PromptPart) Descriptor
deprecated
func (*PromptPart) Descriptor() ([]byte, []int)
Deprecated: Use PromptPart.ProtoReflect.Descriptor instead.
func (*PromptPart) GetContent ¶
func (x *PromptPart) GetContent() string
func (*PromptPart) GetMimeType ¶
func (x *PromptPart) GetMimeType() string
func (*PromptPart) GetType ¶
func (x *PromptPart) GetType() string
func (*PromptPart) ProtoMessage ¶
func (*PromptPart) ProtoMessage()
func (*PromptPart) ProtoReflect ¶
func (x *PromptPart) ProtoReflect() protoreflect.Message
func (*PromptPart) Reset ¶
func (x *PromptPart) Reset()
func (*PromptPart) String ¶
func (x *PromptPart) String() string
type Request ¶
type Request struct {
CurrentMessage *PromptMessage `protobuf:"bytes,1,opt,name=current_message,json=currentMessage,proto3" json:"current_message,omitempty"`
HistoryMessages []*PromptMessage `protobuf:"bytes,2,rep,name=history_messages,json=historyMessages,proto3" json:"history_messages,omitempty"`
// contains filtered or unexported fields
}
grpcserver.Request
func (*Request) Descriptor
deprecated
func (*Request) GetCurrentMessage ¶
func (x *Request) GetCurrentMessage() *PromptMessage
func (*Request) GetHistoryMessages ¶
func (x *Request) GetHistoryMessages() []*PromptMessage
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct {
Reply string `protobuf:"bytes,1,opt,name=reply,proto3" json:"reply,omitempty"`
// contains filtered or unexported fields
}
grpcserver.Response
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedAssistantServiceServer ¶
type UnimplementedAssistantServiceServer struct{}
UnimplementedAssistantServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
type UnsafeAssistantServiceServer ¶
type UnsafeAssistantServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAssistantServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AssistantServiceServer will result in compilation errors.