File tree 3 files changed +10
-6
lines changed
3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ IBM_ENDPOINT=https://us-south.ml.cloud.ibm.com
34
34
IBM_API_KEY =
35
35
IBM_PROJECT_ID =
36
36
37
+ # set default LLM
38
+ DEFAULT_LLM = openai
39
+
37
40
# Set to false to disable anonymized telemetry
38
41
ANONYMIZED_TELEMETRY = false
39
42
@@ -47,6 +50,7 @@ BROWSER_DEBUGGING_PORT=9222
47
50
BROWSER_DEBUGGING_HOST = localhost
48
51
# Set to true to keep browser open between AI tasks
49
52
KEEP_BROWSER_OPEN = true
53
+ USE_OWN_BROWSER = false
50
54
BROWSER_CDP =
51
55
# Display settings
52
56
# Format: WIDTHxHEIGHTxDEPTH
Original file line number Diff line number Diff line change @@ -64,14 +64,14 @@ def create_agent_settings_tab(webui_manager: WebuiManager):
64
64
llm_provider = gr .Dropdown (
65
65
choices = [provider for provider , model in config .model_names .items ()],
66
66
label = "LLM Provider" ,
67
- value = " openai" ,
67
+ value = os . getenv ( "DEFAULT_LLM" , " openai") ,
68
68
info = "Select LLM provider for LLM" ,
69
69
interactive = True
70
70
)
71
71
llm_model_name = gr .Dropdown (
72
72
label = "LLM Model Name" ,
73
- choices = config .model_names [' openai' ],
74
- value = "gpt-4o" ,
73
+ choices = config .model_names [os . getenv ( "DEFAULT_LLM" , " openai" ) ],
74
+ value = config . model_names [ os . getenv ( "DEFAULT_LLM" , "openai" )][ 0 ] ,
75
75
interactive = True ,
76
76
allow_custom_value = True ,
77
77
info = "Select a model in the dropdown options or directly type a custom model name"
Original file line number Diff line number Diff line change 1
1
import os
2
-
2
+ from distutils . util import strtobool
3
3
import gradio as gr
4
4
import logging
5
5
from gradio .components import Component
@@ -52,13 +52,13 @@ def create_browser_settings_tab(webui_manager: WebuiManager):
52
52
with gr .Row ():
53
53
use_own_browser = gr .Checkbox (
54
54
label = "Use Own Browser" ,
55
- value = False ,
55
+ value = bool ( strtobool ( os . getenv ( "USE_OWN_BROWSER" , "false" ))) ,
56
56
info = "Use your existing browser instance" ,
57
57
interactive = True
58
58
)
59
59
keep_browser_open = gr .Checkbox (
60
60
label = "Keep Browser Open" ,
61
- value = os .getenv ("KEEP_BROWSER_OPEN" , True ),
61
+ value = bool ( strtobool ( os .getenv ("KEEP_BROWSER_OPEN" , "true" )) ),
62
62
info = "Keep Browser Open between Tasks" ,
63
63
interactive = True
64
64
)
You can’t perform that action at this time.
0 commit comments