Documentation
¶
Index ¶
- Variables
- func DefineComponent(ctx context.Context, srv *datly.Service) (*repository.Component, error)
- func DefineDeleteComponent(ctx context.Context, srv *datly.Service) (*repository.Component, error)
- type DeleteHandler
- type DeleteInput
- type DeleteOutput
- type Handler
- type Input
- type Message
- func (m *Message) SetArchived(v int)
- func (m *Message) SetAttachmentPayloadID(v string)
- func (m *Message) SetContent(v string)
- func (m *Message) SetConversationID(v string)
- func (m *Message) SetCreatedAt(v time.Time)
- func (m *Message) SetCreatedByUserID(v string)
- func (m *Message) SetElicitationID(id string)
- func (m *Message) SetElicitationPayloadID(v string)
- func (m *Message) SetEmbeddingIndex(v []byte)
- func (m *Message) SetId(v string)
- func (m *Message) SetInterim(v int)
- func (m *Message) SetIteration(v int)
- func (m *Message) SetLinkedConversationID(v string)
- func (m *Message) SetMode(v string)
- func (m *Message) SetParentMessageID(v string)
- func (m *Message) SetPhase(v string)
- func (m *Message) SetPreamble(v string)
- func (m *Message) SetRawContent(v string)
- func (m *Message) SetRole(v string)
- func (m *Message) SetSequence(v int)
- func (m *Message) SetStatus(v string)
- func (m *Message) SetSummary(v string)
- func (m *Message) SetTags(v string)
- func (m *Message) SetToolName(v string)
- func (m *Message) SetTurnID(v string)
- func (m *Message) SetType(v string)
- func (m *Message) SetUpdatedAt(v time.Time)
- type MessageHas
- type MutableMessageView
- type MutableMessageViewOption
- func WithMessageContent(v string) MutableMessageViewOption
- func WithMessageConversationID(v string) MutableMessageViewOption
- func WithMessageID(v string) MutableMessageViewOption
- func WithMessageIteration(v int) MutableMessageViewOption
- func WithMessageParentID(v string) MutableMessageViewOption
- func WithMessagePhase(v string) MutableMessageViewOption
- func WithMessagePreamble(v string) MutableMessageViewOption
- func WithMessageRole(v string) MutableMessageViewOption
- func WithMessageTurnID(v string) MutableMessageViewOption
- func WithMessageType(v string) MutableMessageViewOption
- type MutableMessageViews
- type Output
Constants ¶
This section is empty.
Variables ¶
View Source
var FS embed.FS
View Source
var PackageName = "message/write"
View Source
var PathURI = "/v1/api/agently/message"
Functions ¶
func DefineComponent ¶
func DefineDeleteComponent ¶
Types ¶
type DeleteHandler ¶
type DeleteHandler struct{}
type DeleteInput ¶
type DeleteInput struct {
Rows []*MutableMessageView `parameter:",kind=body,in=data"`
}
type DeleteOutput ¶
type Input ¶
type Input struct {
Messages []*Message `parameter:",kind=body,in=data"`
CurMessagesId *struct{ Values []string } `parameter:",kind=param,in=Messages,dataType=message/write.Messages" codec:"structql,uri=sql/cur_messages_id.sql"`
CurMessage []*Message `parameter:",kind=view,in=CurMessage" view:"CurMessage" sql:"uri=sql/cur_message.sql"`
CurMessageById map[string]*Message
}
type Message ¶
type Message struct {
Id string `sqlx:"id,primaryKey" validate:"required"`
Archived *int `sqlx:"archived" json:",omitempty"`
ConversationID string `sqlx:"conversation_id" validate:"required"`
TurnID *string `sqlx:"turn_id" json:",omitempty"`
Sequence *int `sqlx:"sequence" json:",omitempty"`
CreatedAt *time.Time `sqlx:"created_at" json:",omitempty"`
UpdatedAt *time.Time `sqlx:"updated_at" json:",omitempty"`
CreatedByUserID *string `sqlx:"created_by_user_id" json:",omitempty"`
Mode *string `sqlx:"mode" json:",omitempty"`
Role string `sqlx:"role" validate:"required"`
Status *string `sqlx:"status" `
Type string `sqlx:"type" validate:"required"`
Content *string `sqlx:"content"`
RawContent *string `sqlx:"raw_content" json:",omitempty"`
// Summary holds a compact retained summary for this message.
Summary *string `sqlx:"summary" json:",omitempty"`
ContextSummary *string `sqlx:"context_summary" json:",omitempty"`
// EmbeddingIndex stores a serialized vector index used for semantic match.
EmbeddingIndex *[]byte `sqlx:"embedding_index" json:",omitempty"`
Tags *string `sqlx:"tags" json:",omitempty"`
Interim *int `sqlx:"interim" json:",omitempty"`
ElicitationID *string `sqlx:"elicitation_id" json:",omitempty"`
ParentMessageID *string `sqlx:"parent_message_id" json:",omitempty"`
SupersededBy *string `sqlx:"superseded_by" json:",omitempty"`
LinkedConversationID *string `sqlx:"linked_conversation_id" json:",omitempty"`
ToolName *string `sqlx:"tool_name" json:",omitempty"`
Preamble *string `sqlx:"preamble" json:",omitempty"`
Iteration *int `sqlx:"iteration" json:",omitempty"`
Phase *string `sqlx:"phase" json:",omitempty"`
// AttachmentPayloadID links a message to an uploaded/staged attachment payload.
AttachmentPayloadID *string `sqlx:"attachment_payload_id" json:",omitempty"`
// ElicitationPayloadID links a message to an elicitation response payload.
ElicitationPayloadID *string `sqlx:"elicitation_payload_id" json:",omitempty"`
Has *MessageHas `setMarker:"true" format:"-" sqlx:"-" diff:"-" json:"-"`
}
func (*Message) SetArchived ¶
func (*Message) SetAttachmentPayloadID ¶
func (*Message) SetContent ¶
func (*Message) SetConversationID ¶
func (*Message) SetCreatedAt ¶
func (*Message) SetCreatedByUserID ¶
func (*Message) SetElicitationID ¶
func (*Message) SetElicitationPayloadID ¶
func (*Message) SetEmbeddingIndex ¶
func (*Message) SetInterim ¶
func (*Message) SetIteration ¶
func (*Message) SetLinkedConversationID ¶
func (*Message) SetParentMessageID ¶
func (*Message) SetPreamble ¶
func (*Message) SetRawContent ¶
func (*Message) SetSequence ¶
func (*Message) SetSummary ¶
func (*Message) SetToolName ¶
func (*Message) SetUpdatedAt ¶
type MessageHas ¶
type MessageHas struct {
Id bool
Archived bool
ConversationID bool
TurnID bool
Sequence bool
CreatedAt bool
UpdatedAt bool
CreatedByUserID bool
Mode bool
Role bool
Status bool
Type bool
Content bool
RawContent bool
Summary bool
ContextSummary bool
EmbeddingIndex bool
Tags bool
Interim bool
ElicitationID bool
ParentMessageID bool
SupersededBy bool
LinkedConversationID bool
ToolName bool
Preamble bool
Iteration bool
Phase bool
AttachmentPayloadID bool
ElicitationPayloadID bool
}
type MutableMessageView ¶
type MutableMessageView = Message
func NewMutableMessageView ¶
func NewMutableMessageView(opts ...MutableMessageViewOption) *MutableMessageView
type MutableMessageViewOption ¶
type MutableMessageViewOption func(*MutableMessageView)
func WithMessageContent ¶
func WithMessageContent(v string) MutableMessageViewOption
func WithMessageConversationID ¶
func WithMessageConversationID(v string) MutableMessageViewOption
func WithMessageID ¶
func WithMessageID(v string) MutableMessageViewOption
func WithMessageIteration ¶
func WithMessageIteration(v int) MutableMessageViewOption
func WithMessageParentID ¶
func WithMessageParentID(v string) MutableMessageViewOption
func WithMessagePhase ¶
func WithMessagePhase(v string) MutableMessageViewOption
func WithMessagePreamble ¶
func WithMessagePreamble(v string) MutableMessageViewOption
func WithMessageRole ¶
func WithMessageRole(v string) MutableMessageViewOption
func WithMessageTurnID ¶
func WithMessageTurnID(v string) MutableMessageViewOption
func WithMessageType ¶
func WithMessageType(v string) MutableMessageViewOption
type MutableMessageViews ¶
type MutableMessageViews struct {
Messages []*MutableMessageView
}
func NewMutableMessageViews ¶
func NewMutableMessageViews(rows ...*MutableMessageView) *MutableMessageViews
Click to show internal directories.
Click to hide internal directories.