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

thread

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: MIT Imports: 17 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 {
	Frames []MessagesFrame

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

func (*History) Clone

func (h *History) Clone() *History

type MessagesFrame

type MessagesFrame struct {
	Request  string
	Response string

	Messages []openai.ChatCompletionMessageParamUnion

	Toks int
}

type Thread

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

func NewThread

func NewThread(history *History, ref *client.Ref, 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 (c *ToolRunner) Add(toolCall *openai.ChatCompletionMessageToolCall, functionDescr string) error

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