Help us shape the future of Go! Take the 2026 Go Developer Survey

thread

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type History

type History struct {
	Messages []openai.ChatCompletionMessageParamUnion

	// Total number of tokens in the history. Doesn't include the
	// pending messages.
	Toks int

	// A collection of pending messages to be delivered with the next
	// user message.
	Pending []string
}

func Clone

func Clone(h *History) *History

func Reset

func Reset(h *History) *History

Reset returns only the part of the history that contains the system message, if any.

type Thread

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

func NewThread

func NewThread(
	history *History,
	client *bootstrap.ClientRef,
	host *host.Host,
) (*Thread, error)

func (*Thread) Post

func (t *Thread) Post(ctx context.Context, message string) (*History, error)

type ToolRunner

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

func NewToolRunner

func NewToolRunner(host *host.Host) *ToolRunner

func (*ToolRunner) Add

func (*ToolRunner) Complete

type ToolRunnerHandler

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

Jump to

Keyboard shortcuts

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