mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Feat: add MCP dashboard operations (#8460)
### What problem does this PR solve? Add MCP server dashboard operations. ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -116,4 +116,14 @@ def is_valid_url(url: str) -> bool:
|
||||
return False
|
||||
except socket.gaierror:
|
||||
return False
|
||||
return True
|
||||
return True
|
||||
|
||||
|
||||
def safe_json_parse(data: str | dict) -> dict:
|
||||
if isinstance(data, dict):
|
||||
return data
|
||||
try:
|
||||
return json.loads(data) if data else {}
|
||||
except (json.JSONDecodeError, TypeError):
|
||||
return {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user