Documentation
¶
Index ¶
- Constants
- Variables
- func DefineComponent(ctx context.Context, srv *datly.Service) (*repository.Component, error)
- type Conversation
- func (c *Conversation) SetAgentName(value string)
- func (c *Conversation) SetCreatedAt(value time.Time)
- func (c *Conversation) SetCreatedByUserID(value string)
- func (c *Conversation) SetDefaultModel(value string)
- func (c *Conversation) SetDefaultModelParams(value string)
- func (c *Conversation) SetDefaultModelProvider(value string)
- func (c *Conversation) SetId(value string)
- func (c *Conversation) SetLastActivity(value time.Time)
- func (c *Conversation) SetMetadata(value string)
- func (c *Conversation) SetSummary(value string)
- func (c *Conversation) SetTitle(value string)
- func (c *Conversation) SetUsageEmbeddingTokens(value int)
- func (c *Conversation) SetUsageInputTokens(value int)
- func (c *Conversation) SetUsageOutputTokens(value int)
- func (c *Conversation) SetVisibility(value string)
- type ConversationHas
- type ConversationSlice
- type Conversations
- type Handler
- type IndexedConversation
- type Input
- type Output
Constants ¶
View Source
const ( VisibilityPrivate = "private" VisibilityPublic = "public" )
Variables ¶
View Source
var ConversationPostFS embed.FS
View Source
var PackageName = "conversation/write"
View Source
var PathURI = "/v1/api/agently/conversation"
Functions ¶
func DefineComponent ¶
Types ¶
type Conversation ¶
type Conversation struct {
Id string `sqlx:"id,primaryKey" validate:"required"`
Summary *string `sqlx:"summary" json:",omitempty"`
AgentName string `sqlx:"agent_name" `
Title *string `sqlx:"title" json:",omitempty"`
Visibility *string `sqlx:"visibility" json:",omitempty"`
CreatedAt *time.Time `sqlx:"created_at" json:",omitempty"`
LastActivity *time.Time `sqlx:"last_activity" json:",omitempty"`
UsageInputTokens int `sqlx:"usage_input_tokens" json:",omitempty"`
UsageOutputTokens int `sqlx:"usage_output_tokens" json:",omitempty"`
UsageEmbeddingTokens int `sqlx:"usage_embedding_tokens" json:",omitempty"`
CreatedByUserID *string `sqlx:"created_by_user_id" json:",omitempty"`
DefaultModelProvider *string `sqlx:"default_model_provider" json:",omitempty"`
DefaultModel *string `sqlx:"default_model" json:",omitempty"`
DefaultModelParams *string `sqlx:"default_model_params" json:",omitempty"`
Metadata *string `sqlx:"metadata" json:",omitempty"`
Has *ConversationHas `setMarker:"true" format:"-" sqlx:"-" diff:"-" json:"-"`
}
func (*Conversation) SetAgentName ¶
func (c *Conversation) SetAgentName(value string)
func (*Conversation) SetCreatedAt ¶
func (c *Conversation) SetCreatedAt(value time.Time)
func (*Conversation) SetCreatedByUserID ¶
func (c *Conversation) SetCreatedByUserID(value string)
func (*Conversation) SetDefaultModel ¶
func (c *Conversation) SetDefaultModel(value string)
func (*Conversation) SetDefaultModelParams ¶
func (c *Conversation) SetDefaultModelParams(value string)
func (*Conversation) SetDefaultModelProvider ¶
func (c *Conversation) SetDefaultModelProvider(value string)
func (*Conversation) SetId ¶
func (c *Conversation) SetId(value string)
func (*Conversation) SetLastActivity ¶
func (c *Conversation) SetLastActivity(value time.Time)
func (*Conversation) SetMetadata ¶
func (c *Conversation) SetMetadata(value string)
func (*Conversation) SetSummary ¶
func (c *Conversation) SetSummary(value string)
func (*Conversation) SetTitle ¶
func (c *Conversation) SetTitle(value string)
func (*Conversation) SetUsageEmbeddingTokens ¶
func (c *Conversation) SetUsageEmbeddingTokens(value int)
func (*Conversation) SetUsageInputTokens ¶
func (c *Conversation) SetUsageInputTokens(value int)
func (*Conversation) SetUsageOutputTokens ¶
func (c *Conversation) SetUsageOutputTokens(value int)
func (*Conversation) SetVisibility ¶
func (c *Conversation) SetVisibility(value string)
type ConversationHas ¶
type ConversationHas struct {
Id bool
Summary bool
AgentName bool
Title bool
Visibility bool
CreatedAt bool
LastActivity bool
UsageInputTokens bool
UsageOutputTokens bool
UsageEmbeddingTokens bool
CreatedByUserID bool
DefaultModelProvider bool
DefaultModel bool
DefaultModelParams bool
Metadata bool
}
type ConversationSlice ¶
type ConversationSlice []*Conversation
func (ConversationSlice) IndexById ¶
func (c ConversationSlice) IndexById() IndexedConversation
type Conversations ¶
type Conversations struct {
Conversations []*Conversation
}
type IndexedConversation ¶
type IndexedConversation map[string]*Conversation
type Input ¶
type Input struct {
Conversations []*Conversation `parameter:",kind=body,in=data"`
CurConversationsId *struct{ Values []string } `` /* 126-byte string literal not displayed */
CurConversation []*Conversation `parameter:",kind=view,in=CurConversation" view:"CurConversation" sql:"uri=sql/cur_conversation.sql"`
CurConversationById IndexedConversation
}
Click to show internal directories.
Click to hide internal directories.