Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentStep ¶
type AgentStep struct {
Agent core.AgentExecutor
// contains filtered or unexported fields
}
AgentStep 通过 AgentExecutor 抽象执行 agent。
func NewAgentStep ¶
func NewAgentStep(id string, agent core.AgentExecutor) *AgentStep
NewAgentStep 创建 agent 步骤。
type CodeHandler ¶
CodeHandler CodeStep 执行函数签名。
type CodeStep ¶
type CodeStep struct {
Handler CodeHandler
// contains filtered or unexported fields
}
CodeStep 执行自定义代码逻辑。
type HumanStep ¶
type HumanStep struct {
Prompt string
InputType string
Options []string
Timeout time.Duration
Handler core.HumanInputHandler
// contains filtered or unexported fields
}
HumanStep 通过 HumanInputHandler 请求人工输入。
func NewHumanStep ¶
func NewHumanStep(id string, handler core.HumanInputHandler) *HumanStep
NewHumanStep 创建人工步骤。
type HybridRetrieveStep ¶
type HybridRetrieveStep struct {
Query string
Retriever HybridRetriever
// contains filtered or unexported fields
}
HybridRetrieveStep executes a hybrid retrieval node in DAG.
func NewHybridRetrieveStep ¶
func NewHybridRetrieveStep(id string, retriever HybridRetriever) *HybridRetrieveStep
func (*HybridRetrieveStep) Execute ¶
func (s *HybridRetrieveStep) Execute(ctx context.Context, input core.StepInput) (core.StepOutput, error)
func (*HybridRetrieveStep) ID ¶
func (s *HybridRetrieveStep) ID() string
func (*HybridRetrieveStep) Type ¶
func (s *HybridRetrieveStep) Type() core.StepType
func (*HybridRetrieveStep) Validate ¶
func (s *HybridRetrieveStep) Validate() error
type HybridRetriever ¶
type HybridRetriever interface {
Retrieve(ctx context.Context, query string, queryEmbedding []float64) ([]rag.RetrievalResult, error)
}
HybridRetriever abstracts hybrid retrieval execution.
type LLMStep ¶
type LLMStep struct {
Model string
Prompt string
Temperature float64
MaxTokens int
Gateway core.GatewayLike
// contains filtered or unexported fields
}
LLMStep 通过 GatewayLike 抽象调用 LLM。
func NewLLMStep ¶
func NewLLMStep(id string, gateway core.GatewayLike) *LLMStep
NewLLMStep 创建 LLM 步骤。
type MultiHopReasoner ¶
type MultiHopReasoner interface {
Reason(ctx context.Context, query string) (*rag.ReasoningChain, error)
}
MultiHopReasoner abstracts multi-hop retrieval reasoning.
type MultiHopRetrieveStep ¶
type MultiHopRetrieveStep struct {
Query string
Reasoner MultiHopReasoner
// contains filtered or unexported fields
}
MultiHopRetrieveStep executes multi-hop retrieval and flattens hop results.
func NewMultiHopRetrieveStep ¶
func NewMultiHopRetrieveStep(id string, reasoner MultiHopReasoner) *MultiHopRetrieveStep
func (*MultiHopRetrieveStep) Execute ¶
func (s *MultiHopRetrieveStep) Execute(ctx context.Context, input core.StepInput) (core.StepOutput, error)
func (*MultiHopRetrieveStep) ID ¶
func (s *MultiHopRetrieveStep) ID() string
func (*MultiHopRetrieveStep) Type ¶
func (s *MultiHopRetrieveStep) Type() core.StepType
func (*MultiHopRetrieveStep) Validate ¶
func (s *MultiHopRetrieveStep) Validate() error
type RerankStep ¶
type RerankStep struct {
Query string
Reranker RetrievalReranker
// contains filtered or unexported fields
}
RerankStep re-orders retrieval results in DAG.
func NewRerankStep ¶
func NewRerankStep(id string, reranker RetrievalReranker) *RerankStep
func (*RerankStep) Execute ¶
func (s *RerankStep) Execute(ctx context.Context, input core.StepInput) (core.StepOutput, error)
func (*RerankStep) ID ¶
func (s *RerankStep) ID() string
func (*RerankStep) Type ¶
func (s *RerankStep) Type() core.StepType
func (*RerankStep) Validate ¶
func (s *RerankStep) Validate() error
type RetrievalReranker ¶
type RetrievalReranker interface {
Rerank(ctx context.Context, query string, results []rag.RetrievalResult) ([]rag.RetrievalResult, error)
}
RetrievalReranker abstracts retrieval rerank behavior.
type ToolStep ¶
type ToolStep struct {
ToolName string
Params map[string]any
Registry core.ToolRegistry
// contains filtered or unexported fields
}
ToolStep 通过 ToolRegistry 执行工具调用。
func NewToolStep ¶
func NewToolStep(id string, toolName string, registry core.ToolRegistry) *ToolStep
NewToolStep 创建工具步骤。