Skip to content

Commit

Permalink
feat: add enable_LLM_playground config on webserver (#2677)
Browse files Browse the repository at this point in the history
  • Loading branch information
agatha197 authored Aug 9, 2024
1 parent 9965d56 commit 60fda92
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/2677.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add an `enable_LLM_playground` option to show/hide the LLM playground tab on the serving page.
2 changes: 2 additions & 0 deletions configs/webserver/sample.conf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ brand = "Lablup Cloud"
#menu_blocklist = "pipeline"
# Comma-separated sidebar menu pages to disable
#menu_inactivelist = "statistics"
# Enable/disable the LLM Playground tab in the service page
# enable_LLM_playground = false

[api]
domain = "default"
Expand Down
1 change: 1 addition & 0 deletions src/ai/backend/web/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
t.Key("menu_blocklist", default=None): t.Null | tx.StringList(empty_str_as_empty_list=True),
t.Key("menu_inactivelist", default=None): t.Null
| tx.StringList(empty_str_as_empty_list=True),
t.Key("enable_LLM_playground", default=False): t.ToBool,
}).allow_extra("*"),
t.Key("api"): t.Dict({
t.Key("domain"): t.String,
Expand Down
1 change: 1 addition & 0 deletions src/ai/backend/web/templates/config.toml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{% toml_field "defaultSessionEnvironment" config["ui"]["default_environment"] %}
{% toml_field "defaultImportEnvironment" config["ui"]["default_import_environment"] %}
{% toml_field "siteDescription" config["ui"]["brand"] %}
{% toml_field "enableLLMPlayground" config["ui"]["enable_LLM_playground"] %}
connectionMode = "SESSION"
{% toml_field "signupSupport" config["service"]["enable_signup"] %}
{% toml_field "allowChangeSigninMode" config["service"]["allow_change_signin_mode"] %}
Expand Down
1 change: 1 addition & 0 deletions src/ai/backend/web/templates/config_ini.toml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% toml_field "apiEndpointText" config["api"]["text"] %}
{% toml_field "defaultSessionEnvironment" config["ui"]["default_environment"] %}
{% toml_field "siteDescription" config["ui"]["brand"] %}
{% toml_field "enableLLMPlayground" config["ui"]["enable_LLM_playground"] %}
connectionMode = "SESSION"

[wsproxy]
Expand Down

0 comments on commit 60fda92

Please sign in to comment.