From f022b79518a4071c07d96d5add8c92ad7160aaeb Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 20 Dec 2024 16:24:00 +0800 Subject: [PATCH] Add 'functions' field to assistant table in Xun implementation - Introduced a new 'functions' field in the assistant table, enhancing the structure for better management of assistant capabilities. - Updated the fields array to include 'functions', ensuring it is recognized as a required attribute in the assistant structure. --- neo/conversation/xun.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neo/conversation/xun.go b/neo/conversation/xun.go index b76fb66f..7ef29e4a 100644 --- a/neo/conversation/xun.go +++ b/neo/conversation/xun.go @@ -216,6 +216,7 @@ func (conv *Xun) initAssistantTable() error { table.JSON("prompts").Null() table.JSON("flows").Null() table.JSON("files").Null() + table.JSON("functions").Null() table.Boolean("mentionable").SetDefault(true).Index() // Whether this assistant can appear in @ mention list table.TimestampTz("created_at").SetDefaultRaw("NOW()").Index() table.TimestampTz("updated_at").Null().Index() @@ -233,7 +234,7 @@ func (conv *Xun) initAssistantTable() error { return err } - fields := []string{"id", "assistant_id", "type", "name", "avatar", "connector", "description", "option", "prompts", "flows", "files", "mentionable", "created_at", "updated_at"} + fields := []string{"id", "assistant_id", "type", "name", "avatar", "connector", "description", "option", "prompts", "flows", "files", "functions", "mentionable", "created_at", "updated_at"} for _, field := range fields { if !tab.HasColumn(field) { return fmt.Errorf("%s is required", field)