|
|
@ -2406,12 +2406,14 @@ class Agent:
|
|
|
|
Dict[str, Any]: A dictionary representation of the class attributes.
|
|
|
|
Dict[str, Any]: A dictionary representation of the class attributes.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
# Remove the llm object from the dictionary
|
|
|
|
# Create a copy of the dict to avoid mutating the original object
|
|
|
|
self.__dict__.pop("llm", None)
|
|
|
|
# Remove the llm object from the copy since it's not serializable
|
|
|
|
|
|
|
|
dict_copy = self.__dict__.copy()
|
|
|
|
|
|
|
|
dict_copy.pop("llm", None)
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
attr_name: self._serialize_attr(attr_name, attr_value)
|
|
|
|
attr_name: self._serialize_attr(attr_name, attr_value)
|
|
|
|
for attr_name, attr_value in self.__dict__.items()
|
|
|
|
for attr_name, attr_value in dict_copy.items()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
def to_json(self, indent: int = 4, *args, **kwargs):
|
|
|
|
def to_json(self, indent: int = 4, *args, **kwargs):
|
|
|
|