conversation

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventDelta     = "delta"
	EventDone      = "done"
	EventNodeSaved = "node_saved"
	EventError     = "error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

func New

func New(store storage.Store, provider client.Provider) *Engine

func (*Engine) DeleteNode

func (e *Engine) DeleteNode(ctx context.Context, id string) error

func (*Engine) GetSubtree

func (e *Engine) GetSubtree(ctx context.Context, id string) ([]*storage.Node, error)

func (*Engine) ListConversations

func (e *Engine) ListConversations(ctx context.Context) ([]*storage.Node, error)

func (*Engine) Prompt

func (e *Engine) Prompt(ctx context.Context, message string, opts PromptOpts) (<-chan Event, error)

func (*Engine) PromptFrom

func (e *Engine) PromptFrom(ctx context.Context, parentNodeID, message string, opts PromptOpts) (<-chan Event, error)

func (*Engine) ResolveNode

func (e *Engine) ResolveNode(ctx context.Context, ref string) (*storage.Node, error)

type Event

type Event struct {
	Type    string `json:"type"`
	Content string `json:"content,omitempty"`
	NodeID  string `json:"node_id,omitempty"`
	Error   string `json:"error,omitempty"`
}

type PromptOpts

type PromptOpts struct {
	Model        string
	SystemPrompt string
	Tools        []client.EyrieTool
	MaxTokens    int
	Temperature  *float64
}

Jump to

Keyboard shortcuts

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