Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
GetConversation(ctx context.Context, id string, options ...Option) (*Conversation, error)
GetConversations(ctx context.Context) ([]*Conversation, error)
PatchConversations(ctx context.Context, conversations *MutableConversation) error
GetPayload(ctx context.Context, id string) (*Payload, error)
PatchPayload(ctx context.Context, payload *MutablePayload) error
PatchMessage(ctx context.Context, message *MutableMessage) error
GetMessage(ctx context.Context, id string) (*Message, error)
GetMessageByElicitation(ctx context.Context, conversationID, elicitationID string) (*Message, error)
PatchModelCall(ctx context.Context, modelCall *MutableModelCall) error
PatchToolCall(ctx context.Context, toolCall *MutableToolCall) error
PatchTurn(ctx context.Context, turn *MutableTurn) error
DeleteConversation(ctx context.Context, id string) error
}
type Conversation ¶
type Conversation agconv.ConversationView
func (*Conversation) GetTranscript ¶
func (c *Conversation) GetTranscript() Transcript
type GetRequest ¶
GetRequest defines parameters to retrieve a conversation view.
type GetResponse ¶
type GetResponse struct {
Conversation *Conversation
}
GetResponse wraps the conversation view.
type Input ¶
type Input = agconv.ConversationInput
type Messages ¶
type Messages []*Message
func (Messages) SortByCreatedAt ¶
SortByCreatedAt sorts the messages in-place by CreatedAt. When asc is true, earlier messages come first; otherwise latest first.
func (Messages) SortedByCreatedAt ¶
SortedByCreatedAt returns a new slice with messages ordered by CreatedAt. When asc is true, earlier messages come first; otherwise latest first.
type MutableConversation ¶
type MutableConversation = convw.Conversation
func NewConversation ¶
func NewConversation() *MutableConversation
NewConversation allocates a mutable conversation with Has populated.
type MutableMessage ¶
func NewMessage ¶
func NewMessage() *MutableMessage
NewMessage allocates a mutable message with Has populated.
type MutableModelCall ¶
func NewModelCall ¶
func NewModelCall() *MutableModelCall
NewModelCall allocates a mutable model call with Has populated.
type MutablePayload ¶
func NewPayload ¶
func NewPayload() *MutablePayload
NewPayload allocates a mutable payload with Has populated.
type MutableToolCall ¶
func NewToolCall ¶
func NewToolCall() *MutableToolCall
NewToolCall allocates a mutable tool call with Has populated.
type MutableTurn ¶
type Option ¶
type Option func(input *Input)
func WithIncludeModelCall ¶
func WithIncludeToolCall ¶
func WithScheduledEq ¶ added in v0.2.1
WithScheduledEq applies coalesce(t.scheduled,0) = value (0 or 1).
func WithScheduledOnly ¶ added in v0.2.1
func WithScheduledOnly() Option
WithScheduledOnly is a convenience for WithScheduledEq(1).
func WithToolFeedSpec ¶ added in v0.2.1
WithToolFeedSpec populates the transient FeedSpec list on the input so that OnRelation hooks can compute tool executions based on metadata.
type Payload ¶
type Payload = payloadread.PayloadView
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a thin wrapper around API to support request/response types.
func NewService ¶
func (*Service) Get ¶
func (s *Service) Get(ctx context.Context, req GetRequest) (*GetResponse, error)
Get fetches a conversation based on the request fields.
type Transcript ¶
type Transcript []*Turn
func (*Transcript) History ¶
func (t *Transcript) History() []*prompt.Message
func (Transcript) UniqueToolNames ¶ added in v0.2.1
func (t Transcript) UniqueToolNames() []string
UniqueToolNames returns a de-duplicated list of tool names (service/method) observed across all messages in the transcript, preserving encounter order.