From 6f6c0b3d6ff5407689a92176dc0cdc40045ca656 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 20 Dec 2024 16:21:53 +0800 Subject: [PATCH] Enhance assistant table structure by adding 'files' field - Introduced a new 'files' field in the assistant table within the Xun implementation, allowing for better management of associated files. - Updated the fields array to include the new 'files' field, 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 5eecf4dc..b76fb66f 100644 --- a/neo/conversation/xun.go +++ b/neo/conversation/xun.go @@ -215,6 +215,7 @@ func (conv *Xun) initAssistantTable() error { table.JSON("option").Null() table.JSON("prompts").Null() table.JSON("flows").Null() + table.JSON("files").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() @@ -232,7 +233,7 @@ func (conv *Xun) initAssistantTable() error { return err } - fields := []string{"id", "assistant_id", "type", "name", "avatar", "connector", "description", "option", "prompts", "flows", "mentionable", "created_at", "updated_at"} + fields := []string{"id", "assistant_id", "type", "name", "avatar", "connector", "description", "option", "prompts", "flows", "files", "mentionable", "created_at", "updated_at"} for _, field := range fields { if !tab.HasColumn(field) { return fmt.Errorf("%s is required", field)