Documentation
¶
Overview ¶
Package agent_llm is a base agent extended with common LLM prompts.
Index ¶
- Variables
- func LogArgs(args am.A) map[string]string
- func Pass(args *A) am.A
- func PassRPC(args *A) am.A
- type A
- type A2
- type A2RPC
- type ARPC
- 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, logArgs am.LogArgsMapperFn, ...) 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 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 Pass2 = shared.Pass
View Source
var Pass2RPC = shared.PassRPC
Functions ¶
Types ¶
type A ¶ added in v0.5.0
type A struct {
// base args of the framework
*shared.A
// agent's args
Move *sa.ResultOrienting `log:"move"`
}
A is a struct for node arguments. It's a typesafe alternative to am.A.
type ARPC ¶ added in v0.5.0
type ARPC struct {
// base args of the framework
*shared.A
// agent's args
Move *sa.ResultOrienting `log:"move"`
}
ARPC is a subset of A that can be passed over RPC (eg no channels, conns, etc)
func NewArgsRPC ¶ added in v0.5.0
func NewArgsRPC() ARPC
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 *secai.Document
// 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 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.