chat

package
v0.0.0-...-da38182 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = cli.Command{
	Name: "chat",
	Subcommands: []*cli.Command{
		{
			Name:   "new",
			Action: cmdNew,
			Flags: []cli.Flag{
				&cli.StringFlag{
					Name:        "model",
					DefaultText: "gpt-3.5-turbo-0301",
				},
			},
		},
		{
			Name:   "continue",
			Action: cmdContinue,
		},
		{
			Name:   "clear",
			Action: cmdClear,
		},
	},
}

Functions

func ListLog

func ListLog() ([]string, error)

Types

type Choice

type Choice struct {
	Message      Message `json:"message"`
	FinishReason string  `json:"finish_reason"`
	Index        int     `json:"index"`
}

type Message

type Message struct {
	Role    Role   `json:"role"`
	Content string `json:"content"`
}

type Role

type Role string
const (
	User Role = "user"
)

type Usage

type Usage struct {
	PromptTokens     int `json:"prompt_tokens"`
	CompletionTokens int `json:"completion_tokens"`
	TotalTokens      int `json:"total_tokens"`
}

Jump to

Keyboard shortcuts

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