We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4a83e0 commit e21cff5Copy full SHA for e21cff5
mcp_bridge/openai_clients/utils.py
@@ -9,6 +9,14 @@
9
from mcp_bridge.tool_mappers import mcp2openai
10
11
12
+def json_pretty_print(obj) -> str:
13
+ if type(obj) == bytes:
14
+ obj = obj.decode()
15
+ if type(obj) == str:
16
+ obj = json.loads(obj)
17
+ ret = json.dumps(obj, indent=4, ensure_ascii=False)
18
+ return ret
19
+
20
def validate_if_json_object_parsable(content: str):
21
try:
22
json.loads(content)
0 commit comments