enh: TOOL_SERVER_CONNECTIONS env var support

This commit is contained in:
Timothy Jaeryang Baek 2025-05-07 01:11:28 +04:00
parent 62e57a4cf5
commit ace3303ff5

View File

@ -921,11 +921,19 @@ OPENAI_API_BASE_URL = "https://api.openai.com/v1"
# 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",
"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?",
},
]
DEFAULT_PROMPT_SUGGESTIONS = PersistentConfig(
"DEFAULT_PROMPT_SUGGESTIONS",
"ui.prompt_suggestions",