mirror of
https://github.com/mudler/cogito.git
synced 2026-07-23 10:25:44 -04:00
2ec99d0648
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
28 lines
783 B
Go
28 lines
783 B
Go
package structures
|
|
|
|
import "github.com/sashabaranov/go-openai/jsonschema"
|
|
|
|
type Plan struct {
|
|
Subtasks []string `json:"subtasks"`
|
|
Description string `json:"description"`
|
|
}
|
|
|
|
func StructurePlan() (Structure, *Plan) {
|
|
return structureType[Plan](jsonschema.Definition{
|
|
Type: jsonschema.Object,
|
|
AdditionalProperties: false,
|
|
Properties: map[string]jsonschema.Definition{
|
|
"description": {
|
|
Type: jsonschema.String,
|
|
Description: "Detailed description of the plan to achieve the goal",
|
|
},
|
|
"subtasks": {
|
|
Type: jsonschema.Array,
|
|
Items: &jsonschema.Definition{Type: jsonschema.String},
|
|
Description: "List of detailed subtasks which compose the plan",
|
|
},
|
|
},
|
|
Required: []string{"description", "subtasks"},
|
|
})
|
|
}
|