get_conversation

package
v0.2.26 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 19 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 map[string]*layers.ParsedParameterLayer,
	ps map[string]interface{},
	w io.Writer,
) error

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