Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentsMDMessage ¶
func AgentsMDMessage(content, path string) taskengine.Message
Types ¶
type Agent ¶
type Agent interface {
Capabilities(ctx context.Context) (*AgentCapabilities, error)
SessionNew(ctx context.Context, name string) (string, error)
SessionList(ctx context.Context) ([]*SessionInfo, error)
SessionLoad(ctx context.Context, name string) (contenoxSessionID string, messages []taskengine.Message, err error)
SessionEnsureDefault(ctx context.Context) (string, error)
Prompt(ctx context.Context, req PromptRequest) (*PromptResponse, error)
}
type AgentCapabilities ¶
type NoopObserver ¶
type NoopObserver struct{}
func (NoopObserver) OnStepCompleted ¶
func (NoopObserver) OnStepCompleted(taskengine.CapturedStateUnit)
type Observer ¶
type Observer interface {
OnStepCompleted(step taskengine.CapturedStateUnit)
}
type PromptRequest ¶
type PromptRequest struct {
SessionID string
Input string
InputType taskengine.DataType
InputValue any
Chain *taskengine.TaskChainDefinition
TemplateVars map[string]string
ToolsAllowlist []string
HistoryTrim int
Observer Observer
AgentsMD string
AgentsMDSource string
}
type PromptResponse ¶
type PromptResponse struct {
Output any
OutputType taskengine.DataType
Steps []taskengine.CapturedStateUnit
StopReason StopReason
}
type StopReason ¶
type StopReason string
const ( StopEndTurn StopReason = "end_turn" StopMaxTokens StopReason = "max_tokens" StopMaxTurnRequests StopReason = "max_turn_requests" StopCancelled StopReason = "cancelled" )
func InferStopReason ¶
func InferStopReason(err error, steps []taskengine.CapturedStateUnit) StopReason
Click to show internal directories.
Click to hide internal directories.