export

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package export provides functionality to export conversations to different formats. Supported formats include JSON, Markdown, and HTML.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExportOptions

type ExportOptions struct {
	// Format specifies the export format (json, markdown, html)
	Format Format
	// IncludeMetrics includes token counts and costs in export
	IncludeMetrics bool
	// IncludeTimestamps includes message timestamps in export
	IncludeTimestamps bool
	// Title is an optional title for the exported conversation
	Title string
}

ExportOptions contains options for exporting conversations.

type ExportSummary

type ExportSummary struct {
	TotalMessages int     `json:"total_messages"`
	UniqueAgents  int     `json:"unique_agents"`
	TotalTokens   int     `json:"total_tokens"`
	TotalCost     float64 `json:"total_cost"`
}

ExportSummary contains summary statistics for an exported conversation.

type Exporter

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

Exporter handles conversation exports to different formats.

func NewExporter

func NewExporter(options ExportOptions) *Exporter

NewExporter creates a new Exporter with the given options.

func (*Exporter) Export

func (e *Exporter) Export(messages []agent.Message, writer io.Writer) error

Export writes the conversation messages to the writer in the configured format.

type Format

type Format string

Format represents the export format type.

const (
	// FormatJSON exports conversation as JSON
	FormatJSON Format = "json"
	// FormatMarkdown exports conversation as Markdown
	FormatMarkdown Format = "markdown"
	// FormatHTML exports conversation as HTML
	FormatHTML Format = "html"
)

Jump to

Keyboard shortcuts

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