Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PlanStatusMapping = map[PlanStatus]string{ PlanStatusTodo: "待执行", PlanStatusDoing: "执行中", PlanStatusDone: "已完成", PlanStatusFailed: "执行失败", PlanStatusSkipped: "已跳过", }
View Source
var PlanToolInfo = &schema.ToolInfo{ Name: "create_plan", Desc: "Generates a structured, step-by-step execution plan to solve a given complex task. Each step in the plan must be assigned to a specialized agent and must have a clear, actionable description.", ParamsOneOf: schema.NewParamsOneOfByParams( map[string]*schema.ParameterInfo{ "steps": { Type: schema.Array, ElemInfo: &schema.ParameterInfo{ Type: schema.Object, SubParams: map[string]*schema.ParameterInfo{ "index": { Type: schema.Integer, Desc: "The sequential number of this step in the overall plan. **Must start from 1 and increment by exactly 1 for each subsequent step.**", Required: true, }, "desc": { Type: schema.String, Desc: "A clear, concise, and actionable description of the specific task to be performed in this step. It should be a direct instruction for the assigned agent.", Required: true, }, }, }, Desc: "different steps to follow, should be in sorted order", Required: true, }, }, ), }
Functions ¶
func FullPlan2String ¶
func Write2PlanMD ¶
Types ¶
type FullPlan ¶
type FullPlan struct {
TaskID int `json:"task_id,omitempty"`
Status PlanStatus `json:"status,omitempty"`
AgentName string `json:"agent_name,omitempty"`
Desc string `json:"desc,omitempty"`
ExecResult *SubmitResult `json:"exec_result,omitempty"`
}
func (*FullPlan) PlanString ¶
type Plan ¶
type Plan struct {
Steps []Step `json:"steps"`
}
func (*Plan) MarshalJSON ¶
func (*Plan) UnmarshalJSON ¶
type PlanStatus ¶
type PlanStatus string
const ( PlanStatusTodo PlanStatus = "todo" PlanStatusDoing PlanStatus = "doing" PlanStatusDone PlanStatus = "done" PlanStatusFailed PlanStatus = "failed" PlanStatusSkipped PlanStatus = "skipped" )
type PreviewFile ¶
type PreviewFile struct {
FilePath string `json:"file_path,omitempty" xml:"file_path"`
SingleFilePreviews []*SingleFilePreview `json:"single_file_previews,omitempty" xml:"single_file_previews>single_file_preview"`
}
func PreviewPath ¶
func PreviewPath(path string) ([]*PreviewFile, error)
type SingleFilePreview ¶
type SubmitResult ¶
type SubmitResult struct {
IsSuccess *bool `json:"is_success,omitempty"`
Result string `json:"result,omitempty"`
Files []*SubmitResultFile `json:"files,omitempty"`
}
func (*SubmitResult) String ¶
func (s *SubmitResult) String() string
type SubmitResultFile ¶
type SubmitResultFile struct {
Path string `json:"path,omitempty"`
Desc string `json:"desc,omitempty"`
}
func ListDir ¶
func ListDir(dir string) ([]*SubmitResultFile, error)
Click to show internal directories.
Click to hide internal directories.