lats

package
v0.0.0-...-fa69716 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_REFLECTION_PROMPT = `` /* 932-byte string literal not displayed */

	DEFAULT_CANDIDATES_PROMPT = `` /* 347-byte string literal not displayed */

)

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

func New

func New(llm providers.Client, worker agents.Agent, opt Option) *Agent

func (*Agent) Chat

func (a *Agent) Chat(ctx context.Context, req *agtapi.Request) *agtapi.Response

type Candidates

type Candidates struct {
	Candidates []string `json:"candidates" jsonschema:"required,description=List of candidates for the next reasoning step"`
}

type ConversationHistory

type ConversationHistory struct {
	XMLName  xml.Name `xml:"conversation_history"`
	Messages []string `xml:"messages"`
}

type Evaluation

type Evaluation struct {
	Score     float64 `json:"score" jsonschema:"required,description=Rate from 1-100 where 1 is incorrect and 100 is correct"`
	IsDone    bool    `json:"is_done" jsonschema:"required,description=Whether the final answer is found yet"`
	Reasoning string  `json:"reasoning" jsonschema:"required,description=Your reasoning and analysis in detail DON'T more than 50 words'"`
}

type Option

type Option struct {
	Expansions  int
	MaxRollouts int
	MaxParallel int
	MaxSteps    int
	FastMode    bool

	SystemPrompt     string
	ExpansionPrompt  string
	ReflectionPrompt string

	Tools []*tools.Tool
}

type SearchNode

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

func (*SearchNode) BackPropagate

func (n *SearchNode) BackPropagate(reward float64)

func (*SearchNode) Expand

func (n *SearchNode) Expand(ctx context.Context, node *SearchNode, evaluation *Evaluation)

func (*SearchNode) GetBestNode

func (n *SearchNode) GetBestNode() *SearchNode

func (*SearchNode) Latest

func (n *SearchNode) Latest() string

Jump to

Keyboard shortcuts

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