Skip to content

Commit

Permalink
chore: update /settings/beta_features
Browse files Browse the repository at this point in the history
  • Loading branch information
soulteary committed Jul 13, 2023
1 parent 468b7b7 commit 0615468
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/api/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ func BetaFeatures(c *gin.Context) {
Browsing: false,
CodeInterpreter: false,
Plugins: false,
ChatPreferences: false,
}

if define.ENABLE_PLUGIN {
Expand All @@ -27,5 +28,9 @@ func BetaFeatures(c *gin.Context) {
features.CodeInterpreter = true
}

if define.ENABLE_CHAT_PREFERENCES {
features.ChatPreferences = true
}

c.JSON(http.StatusOK, features)
}
1 change: 1 addition & 0 deletions internal/datatypes/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ type BetaFeatures struct {
Browsing bool `json:"browsing"`
CodeInterpreter bool `json:"code_interpreter"`
Plugins bool `json:"plugins"`
ChatPreferences bool `json:"chat_preferences"` // added 0713
}
2 changes: 2 additions & 0 deletions internal/define/define.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ var (
ENABLE_PLUGIN_PLUGIN_DEV = GetBool("ENABLE_PLUGIN_PLUGIN_DEV", false) // Enable the plugin
ENABLE_PLUGIN_BROWSING = GetBool("ENABLE_PLUGIN_BROWSING", false) // Enable the plugin, Browsing
ENABLE_PLUGIN_CODE_INTERPRETER = GetBool("ENABLE_PLUGIN_CODE_INTERPRETER", false) // Enable the plugin, CodeInterpreter

ENABLE_CHAT_PREFERENCES = GetBool("ENABLE_CHAT_PREFERENCES", false) // Enable the chat preferences
)

var (
Expand Down

0 comments on commit 0615468

Please sign in to comment.