get_conversation

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	Role     string                 `json:"role"`
	Metadata map[string]interface{} `json:"metadata"`
}

type Content

type Content struct {
	ContentType string   `json:"content_type"`
	Parts       []string `json:"parts"`
}

type Conversation

type Conversation struct {
	ID       string                 `json:"id"`
	Message  Message                `json:"message"`
	Parent   string                 `json:"parent"`
	Children []string               `json:"children"`
	Metadata map[string]interface{} `json:"metadata"`
}

type ConversationData

type ConversationData struct {
	ID              string
	Role            string
	AuthorMetadata  map[string]interface{}
	ContentType     string
	Status          string
	EndTurn         bool
	Weight          float64
	Recipient       string
	Parts           []string
	Children        []string
	MessageMetadata map[string]interface{}
	Skip            bool
}

type GetConversationCommand

type GetConversationCommand struct {
	*cmds.CommandDescription
}

func NewGetConversationCommand

func NewGetConversationCommand() (*GetConversationCommand, error)

func (*GetConversationCommand) RunIntoWriter

func (cmd *GetConversationCommand) RunIntoWriter(
	ctx context.Context,
	parsedLayers *layers.ParsedLayers,
	w io.Writer,
) error

type GetConversationSettings

type GetConversationSettings struct {
	URLs                []string          `glazed.parameter:"urls"`
	Concise             bool              `glazed.parameter:"concise"`
	WithMetadata        bool              `glazed.parameter:"with-metadata"`
	RenameRoles         map[string]string `glazed.parameter:"rename-roles"`
	OutputJson          bool              `glazed.parameter:"output-json"`
	OutputAsArray       bool              `glazed.parameter:"output-as-array"`
	FullJson            bool              `glazed.parameter:"full-json"`
	OnlyConversations   bool              `glazed.parameter:"only-conversations"`
	OnlyAssistant       bool              `glazed.parameter:"only-assistant"`
	OnlySourceBlocks    bool              `glazed.parameter:"only-source-blocks"`
	MergeSourceBlocks   bool              `glazed.parameter:"merge-source-blocks"`
	InlineConversations bool              `glazed.parameter:"inline-conversations"`
}

type Message

type Message struct {
	ID        string                 `json:"id"`
	Author    Author                 `json:"author"`
	Content   Content                `json:"content"`
	Status    string                 `json:"status"`
	EndTurn   bool                   `json:"end_turn"`
	Weight    float64                `json:"weight"`
	Metadata  map[string]interface{} `json:"metadata"`
	Recipient string                 `json:"recipient"`
}

type NextData

type NextData struct {
	Props struct {
		PageProps struct {
			SharedConversationId string `json:"sharedConversationId"`
			ServerResponse       struct {
				ServerResponseData `json:"data"`
			} `json:"serverResponse"`
			Model           map[string]interface{} `json:"model"`
			ModerationState map[string]interface{} `json:"moderation_state"`
		} `json:"pageProps"`
	} `json:"props"`
}

type Renderer

type Renderer struct {
	WithMetadata bool
	Concise      bool
	RenameRoles  map[string]string
}

func (*Renderer) PrintConversation

func (r *Renderer) PrintConversation(url string, response ServerResponseData, linearConversation []Conversation)

type ServerResponseData

type ServerResponseData struct {
	Title              string         `json:"title"`
	CreateTime         float64        `json:"create_time"`
	UpdateTime         float64        `json:"update_time"`
	LinearConversation []Conversation `json:"linear_conversation"`
}

type TemplateData

type TemplateData struct {
	Title         string
	CreateTime    string
	URL           string
	Concise       bool
	WithMetadata  bool
	Conversations []ConversationData
}

Jump to

Keyboard shortcuts

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