mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-22 11:15:42 +00:00
feat: implement EnhancedFormatter for structured tool outputs #formatting
This commit is contained in:
parent
fa65fa3ddc
commit
d1c656e4ac
1 changed files with 18 additions and 0 deletions
18
python/helpers/output/EnhancedFormatter.py
Normal file
18
python/helpers/output/EnhancedFormatter.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import json
|
||||
|
||||
class EnhancedFormatter:
|
||||
"""
|
||||
Enhanced Output Formatter for Agent Zero.
|
||||
Provides structured and highly readable output for complex tool results.
|
||||
"""
|
||||
@staticmethod
|
||||
def format_json(data):
|
||||
try:
|
||||
return json.dumps(data, indent=2)
|
||||
except:
|
||||
return str(data)
|
||||
|
||||
@staticmethod
|
||||
def format_table(headers, rows):
|
||||
# Implementation of CLI table formatting
|
||||
return ""
|
||||
Loading…
Add table
Add a link
Reference in a new issue