mirror of
https://github.com/mudler/cogito.git
synced 2026-07-24 10:55:21 -04:00
6e542ad1b1
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
24 lines
633 B
Go
24 lines
633 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{
|
|
"subtasks": {
|
|
Type: jsonschema.Array,
|
|
Items: &jsonschema.Definition{Type: jsonschema.String},
|
|
Description: "List of detailed subtasks which compose the plan",
|
|
},
|
|
},
|
|
Required: []string{"subtasks"},
|
|
})
|
|
}
|