mirror of
https://github.com/open-webui/open-webui
synced 2025-06-04 03:37:35 +00:00
enh: TOOL_SERVER_CONNECTIONS
env var support
This commit is contained in:
parent
62e57a4cf5
commit
ace3303ff5
@ -921,11 +921,19 @@ OPENAI_API_BASE_URL = "https://api.openai.com/v1"
|
|||||||
# TOOL_SERVERS
|
# TOOL_SERVERS
|
||||||
####################################
|
####################################
|
||||||
|
|
||||||
|
try:
|
||||||
|
tool_server_connections = json.loads(
|
||||||
|
os.environ.get("TOOL_SERVER_CONNECTIONS", "[]")
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
log.exception(f"Error loading TOOL_SERVER_CONNECTIONS: {e}")
|
||||||
|
tool_server_connections = []
|
||||||
|
|
||||||
|
|
||||||
TOOL_SERVER_CONNECTIONS = PersistentConfig(
|
TOOL_SERVER_CONNECTIONS = PersistentConfig(
|
||||||
"TOOL_SERVER_CONNECTIONS",
|
"TOOL_SERVER_CONNECTIONS",
|
||||||
"tool_server.connections",
|
"tool_server.connections",
|
||||||
[],
|
tool_server_connections,
|
||||||
)
|
)
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
@ -1002,6 +1010,7 @@ if default_prompt_suggestions == []:
|
|||||||
"content": "Could you start by asking me about instances when I procrastinate the most and then give me some suggestions to overcome it?",
|
"content": "Could you start by asking me about instances when I procrastinate the most and then give me some suggestions to overcome it?",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
DEFAULT_PROMPT_SUGGESTIONS = PersistentConfig(
|
DEFAULT_PROMPT_SUGGESTIONS = PersistentConfig(
|
||||||
"DEFAULT_PROMPT_SUGGESTIONS",
|
"DEFAULT_PROMPT_SUGGESTIONS",
|
||||||
"ui.prompt_suggestions",
|
"ui.prompt_suggestions",
|
||||||
|
Loading…
Reference in New Issue
Block a user