conversation

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDatly

func NewDatly(ctx context.Context) (*datly.Service, error)

NewDatly constructs a datly.Service and wires the optional SQL connector from AGENTLY_DB_* environment variables. It returns the service with or without connector depending on configuration and bubbles up any connector wiring errors.

func NewDatlyServiceFromEnv

func NewDatlyServiceFromEnv(ctx context.Context) (*datly.Service, error)

Backward-compatible helper name used elsewhere in the repo.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, dao *datly.Service) (*Service, error)

New constructs a conversation Service using the provided datly service and registers the rich conversation components.

func (*Service) DeleteConversation

func (s *Service) DeleteConversation(ctx context.Context, id string) error

DeleteConversation removes a conversation by id. Dependent rows are removed via DB FKs (ON DELETE CASCADE).

func (*Service) DeleteMessage added in v0.2.2

func (s *Service) DeleteMessage(ctx context.Context, conversationID, messageID string) error

DeleteMessage removes a single message from a conversation using the dedicated DELETE component.

func (*Service) GetConversation

func (s *Service) GetConversation(ctx context.Context, id string, options ...convcli.Option) (*convcli.Conversation, error)

GetConversation implements conversation.API using the generated component and returns SDK Conversation.

func (*Service) GetConversations

func (s *Service) GetConversations(ctx context.Context, input *convcli.Input) ([]*convcli.Conversation, error)

GetConversations implements conversation.API using the generated component and returns SDK Conversation.

func (*Service) GetMessage

func (s *Service) GetMessage(ctx context.Context, id string, options ...convcli.Option) (*convcli.Message, error)

func (*Service) GetMessageByElicitation

func (s *Service) GetMessageByElicitation(ctx context.Context, conversationID, elicitationID string) (*convcli.Message, error)

func (*Service) GetPayload

func (s *Service) GetPayload(ctx context.Context, id string) (*convcli.Payload, error)

func (*Service) PatchConversations

func (s *Service) PatchConversations(ctx context.Context, conversations *convcli.MutableConversation) error

func (*Service) PatchMessage

func (s *Service) PatchMessage(ctx context.Context, message *convcli.MutableMessage) error

func (*Service) PatchModelCall

func (s *Service) PatchModelCall(ctx context.Context, modelCall *convcli.MutableModelCall) error

func (*Service) PatchPayload

func (s *Service) PatchPayload(ctx context.Context, payload *convcli.MutablePayload) error

func (*Service) PatchToolCall

func (s *Service) PatchToolCall(ctx context.Context, toolCall *convcli.MutableToolCall) error

func (*Service) PatchTurn

func (s *Service) PatchTurn(ctx context.Context, turn *convcli.MutableTurn) error

func (*Service) ToolCallTraceByOp added in v0.2.17

func (s *Service) ToolCallTraceByOp(ctx context.Context, conversationID, opID string) (string, error)

ToolCallTraceByOp returns the persisted trace_id (LLM response.id anchor) for a tool call op_id scoped to a conversation. It returns an empty string when not found.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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