Documentation
¶
Overview ¶
Package agent_llm is a base agent extended with common LLM prompts.
Index ¶
- Variables
- func IsStory(state string) bool
- type AOrientingMove
- type AgentLLM
- func (a *AgentLLM) CharacterReadyEnd(e *am.Event)
- func (a *AgentLLM) CharacterReadyEnter(e *am.Event) bool
- func (a *AgentLLM) CharacterReadyState(e *am.Event)
- func (a *AgentLLM) CheckingMenuRefsState(e *am.Event)
- func (a *AgentLLM) ConfigUpdateState(e *am.Event)
- func (a *AgentLLM) ConfigValidatingState(e *am.Event)
- func (a *AgentLLM) GenCharacterEnd(e *am.Event)
- func (a *AgentLLM) GenCharacterState(e *am.Event)
- func (a *AgentLLM) GenResourcesEnd(e *am.Event)
- func (a *AgentLLM) GenResourcesEnter(e *am.Event) bool
- func (a *AgentLLM) GenResourcesState(e *am.Event)
- func (a *AgentLLM) Init(agentImpl shared.AgentAPI, cfg *shared.Config, deps AgentLLMDeps) error
- func (a *AgentLLM) MemoryWipe(ctx context.Context, e *am.Event)
- func (a *AgentLLM) OrientingMoveEnter(e *am.Event) bool
- func (a *AgentLLM) OrientingMoveState(e *am.Event)
- func (a *AgentLLM) OrientingState(e *am.Event)
- func (a *AgentLLM) OutputPhrase(key string, args ...any) error
- func (a *AgentLLM) Phrase(key string, args ...any) string
- func (a *AgentLLM) Queries() *sqlc.Queries
- func (a *AgentLLM) ResourcesReadyEnd(e *am.Event)
- func (a *AgentLLM) RestoreCharacterState(e *am.Event)
- func (a *AgentLLM) RestoreResourcesState(e *am.Event)
- type AgentLLMDeps
- type Args
- type ChildAPI
- type S
Constants ¶
This section is empty.
Variables ¶
View Source
var APrefix = "secaillm"
APrefix is the args prefix, set from config.
View Source
var ArgsRPC = []am.ArgsApi{AOrientingMove{}}
View Source
var ErrRetried = errors.New("retires reached")
TODO move
Functions ¶
Types ¶
type AOrientingMove ¶ added in v0.6.0
type AOrientingMove struct {
Args
Move *sa.ResultOrienting `log:"move"`
}
func (AOrientingMove) ArgsState ¶ added in v0.6.0
func (AOrientingMove) ArgsState() string
type AgentLLM ¶
type AgentLLM struct {
*secai.AgentBase
Character atomic.Pointer[sa.ResultGenCharacter]
Resources atomic.Pointer[sa.ResultGenResources]
MoveOrienting atomic.Pointer[sa.ResultOrienting]
PCheckingMenuRefs *sa.PromptCheckingMenuRefs
PGenResources *sa.PromptGenResources
PGenCharacter *sa.PromptGenCharacter
POrienting *sa.PromptOrienting
PConfigTest *sa.PromptConfigTest
DocCharacter *shared.Document
CharacterReadyMsg string
// contains filtered or unexported fields
}
AgentLLM is secai.AgentBase extended with common LLM prompts, meant to be embedded in final agents.
func (*AgentLLM) CharacterReadyEnd ¶ added in v0.5.0
func (*AgentLLM) CharacterReadyEnter ¶ added in v0.5.0
func (*AgentLLM) CharacterReadyState ¶ added in v0.5.0
func (*AgentLLM) CheckingMenuRefsState ¶ added in v0.5.0
func (*AgentLLM) ConfigUpdateState ¶ added in v0.5.0
func (*AgentLLM) ConfigValidatingState ¶ added in v0.5.0
func (*AgentLLM) GenCharacterEnd ¶ added in v0.5.0
func (*AgentLLM) GenCharacterState ¶ added in v0.5.0
func (*AgentLLM) GenResourcesEnd ¶ added in v0.5.0
func (*AgentLLM) GenResourcesEnter ¶ added in v0.5.0
func (*AgentLLM) GenResourcesState ¶ added in v0.5.0
func (*AgentLLM) MemoryWipe ¶ added in v0.5.0
func (*AgentLLM) OrientingMoveEnter ¶ added in v0.5.0
func (*AgentLLM) OrientingMoveState ¶ added in v0.5.0
func (*AgentLLM) OrientingState ¶ added in v0.5.0
func (*AgentLLM) OutputPhrase ¶ added in v0.5.0
OutputPhrase is sugar for Phrase followed by Output FromAssistant.
func (*AgentLLM) Phrase ¶ added in v0.5.0
Phrase returns a random phrase from resources under [key], or an empty string. TODO move to base agent
func (*AgentLLM) ResourcesReadyEnd ¶ added in v0.5.0
func (*AgentLLM) RestoreCharacterState ¶ added in v0.5.0
func (*AgentLLM) RestoreResourcesState ¶ added in v0.5.0
type AgentLLMDeps ¶ added in v0.6.0
type AgentLLMDeps struct {
LogArgs am.LogArgsMapperFn
Groups any
States am.States
// RPC args for REPL
ArgsREPL []am.ArgsApi
PromptGenCharacter *sa.PromptGenCharacter
PromptGenResources *sa.PromptGenResources
PromptOrienting *sa.PromptOrienting
// Certainty above which the orienting move should be accepted.
OrientingMoveThreshold float32
// Initial msg, optional, " " to disable.
CharacterReadyMsg string
}
type Args ¶ added in v0.6.0
func (Args) ArgsPrefix ¶ added in v0.6.0
type ChildAPI ¶ added in v0.5.0
type ChildAPI interface {
// LLMResources returns the params for the LLM prompt that generates resources, eg phrases.
LLMResources() sa.ParamsGenResources
}
Click to show internal directories.
Click to hide internal directories.