feat: initial attempt to create a schema
This commit is contained in:
@ -24,11 +24,10 @@ An example of lists are:
|
||||
- Movies
|
||||
- Books
|
||||
|
||||
You must call "listLists" to see which available lists are already available.
|
||||
Another one of your tasks is to create a schema for this list. This should contain information that this, and following
|
||||
pictures contain. Be specific but also generic. You should use the parameters in "createList" to create this schema.
|
||||
|
||||
*Important*
|
||||
You must not create lists with the names Locations, Events, Contacts or Notes. You can create lists adjacent to those, but
|
||||
those lists are dealt with seperately.
|
||||
You must call "listLists" to see which available lists are already available.
|
||||
|
||||
**Tools:**
|
||||
* think: Internal reasoning/planning step.
|
||||
@ -84,6 +83,22 @@ const listTools = `
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": "A simple description of this list."
|
||||
},
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "The name of the key for this specific field. Similar to a column in a database"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"enum": ["string", "number", "boolean"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["name", "description"]
|
||||
@ -126,6 +141,10 @@ type listListsArguments struct{}
|
||||
type createListArguments struct {
|
||||
Name string `json:"name"`
|
||||
Desription string `json:"description"`
|
||||
Schema []struct {
|
||||
Key string `json:"key"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
}
|
||||
type addToListArguments struct {
|
||||
ListID string `json:"listId"`
|
||||
@ -154,6 +173,8 @@ func NewListAgent(log *log.Logger, listModel models.ListModel) client.AgentClien
|
||||
return model.Events{}, err
|
||||
}
|
||||
|
||||
log.Debug("Create list", "schema", args.Schema)
|
||||
|
||||
ctx := context.Background()
|
||||
savedList, err := listModel.Save(ctx, info.UserId, args.Name, args.Desription)
|
||||
|
||||
|
Reference in New Issue
Block a user