Documentation
¶
Index ¶
- type Client
- func (c *Client) DeleteConversation(_ context.Context, id string) error
- func (c *Client) DeleteMessage(_ context.Context, conversationID, messageID string) error
- func (c *Client) EnsureConversation(id string, opts ...func(*convcli.MutableConversation)) error
- func (c *Client) GetConversation(ctx context.Context, id string, options ...convcli.Option) (*convcli.Conversation, error)
- func (c *Client) GetConversations(ctx context.Context, input *convcli.Input) ([]*convcli.Conversation, error)
- func (c *Client) GetMessage(_ context.Context, id string, _ ...convcli.Option) (*convcli.Message, error)
- func (c *Client) GetMessageByElicitation(_ context.Context, conversationID, elicitationID string) (*convcli.Message, error)
- func (c *Client) GetPayload(_ context.Context, id string) (*convcli.Payload, error)
- func (c *Client) PatchConversations(ctx context.Context, in *convcli.MutableConversation) error
- func (c *Client) PatchMessage(_ context.Context, in *convcli.MutableMessage) error
- func (c *Client) PatchModelCall(_ context.Context, in *convcli.MutableModelCall) error
- func (c *Client) PatchPayload(_ context.Context, p *convcli.MutablePayload) error
- func (c *Client) PatchToolCall(_ context.Context, in *convcli.MutableToolCall) error
- func (c *Client) PatchTurn(_ context.Context, in *convcli.MutableTurn) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an in-memory implementation of conversation.Client. It is intended for tests and local runs without SQL/Datly.
func (*Client) DeleteConversation ¶
DeleteConversation removes a conversation and its dependent messages in-memory.
func (*Client) DeleteMessage ¶ added in v0.2.2
DeleteMessage removes a message by id from indexes and the conversation transcript.
func (*Client) EnsureConversation ¶
func (c *Client) EnsureConversation(id string, opts ...func(*convcli.MutableConversation)) error
EnsureConversation creates a conversation if it does not exist.
func (*Client) GetConversation ¶
func (c *Client) GetConversation(ctx context.Context, id string, options ...convcli.Option) (*convcli.Conversation, error)
GetConversation returns a single conversation with optional filtering.
func (*Client) GetConversations ¶
func (c *Client) GetConversations(ctx context.Context, input *convcli.Input) ([]*convcli.Conversation, error)
GetConversations returns all conversations without transcript for summary.
func (*Client) GetMessage ¶
func (c *Client) GetMessage(_ context.Context, id string, _ ...convcli.Option) (*convcli.Message, error)
GetMessage returns a message by id.
func (*Client) GetMessageByElicitation ¶
func (c *Client) GetMessageByElicitation(_ context.Context, conversationID, elicitationID string) (*convcli.Message, error)
GetMessageByElicitation returns a message matching the given conversation and elicitation IDs.
func (*Client) GetPayload ¶
GetPayload returns a payload by id.
func (*Client) PatchConversations ¶
PatchConversations upserts conversations and merges fields according to Has flags.
func (*Client) PatchMessage ¶
PatchMessage upserts a message and places it into its conversation/turn transcript.
func (*Client) PatchModelCall ¶
PatchModelCall upserts/attaches model-call to a message.
func (*Client) PatchPayload ¶
PatchPayload upserts a payload.
func (*Client) PatchToolCall ¶
PatchToolCall upserts/attaches tool-call to a message.