structs

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

View Source
const (
	PartTypeText  = "text"
	PartTypeImage = "image"
)

Content part types for multimodal prompts

View Source
const (
	AssistantService_Chat_FullMethodName = "/magic_conch_shell.v1.AssistantService/Chat"
)

Variables

View Source
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)

View Source
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.

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) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetReply

func (x *Response) GetReply() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

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.

func (UnimplementedAssistantServiceServer) Chat

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.

Jump to

Keyboard shortcuts

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