mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-04-28 11:40:25 +00:00
Initial commit of eigent-main
This commit is contained in:
commit
723df5a03e
1144 changed files with 103478 additions and 0 deletions
15
backend/app/component/debug.py
Normal file
15
backend/app/component/debug.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import inspect
|
||||
|
||||
|
||||
def dump_class(obj, max_val_len=1000):
|
||||
cls = obj.__class__
|
||||
print(f"Class: {cls.__name__}")
|
||||
print("Attributes:")
|
||||
for name, val in vars(obj).items():
|
||||
val_str = repr(val)
|
||||
if len(val_str) > max_val_len:
|
||||
val_str = val_str[:max_val_len] + "... [truncated]"
|
||||
print(f" {name} = {val_str}")
|
||||
# print("Methods:")
|
||||
# for name, method in inspect.getmembers(cls, predicate=inspect.isfunction):
|
||||
# print(f" {name}()")
|
||||
Loading…
Add table
Add a link
Reference in a new issue