mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
fix: tool server not loading
This commit is contained in:
parent
279e3e970f
commit
278a4edd0b
1 changed files with 3 additions and 3 deletions
|
|
@ -489,14 +489,14 @@ async def get_tool_servers(request: Request):
|
||||||
if request.app.state.redis is not None:
|
if request.app.state.redis is not None:
|
||||||
try:
|
try:
|
||||||
tool_servers = json.loads(await request.app.state.redis.get("tool_servers"))
|
tool_servers = json.loads(await request.app.state.redis.get("tool_servers"))
|
||||||
|
request.app.state.TOOL_SERVERS = tool_servers
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.error(f"Error fetching tool_servers from Redis: {e}")
|
log.error(f"Error fetching tool_servers from Redis: {e}")
|
||||||
|
|
||||||
if not tool_servers:
|
if not tool_servers:
|
||||||
await set_tool_servers(request)
|
tool_servers = await set_tool_servers(request)
|
||||||
|
|
||||||
request.app.state.TOOL_SERVERS = tool_servers
|
return tool_servers
|
||||||
return request.app.state.TOOL_SERVERS
|
|
||||||
|
|
||||||
|
|
||||||
async def get_tool_server_data(token: str, url: str) -> Dict[str, Any]:
|
async def get_tool_server_data(token: str, url: str) -> Dict[str, Any]:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue