mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-29 04:55:09 +02:00
Nicer item repr (#2655)
This commit is contained in:
@@ -80,13 +80,16 @@ class Item:
|
||||
|
||||
def dict(self) -> dict:
|
||||
return {
|
||||
"value": self.value,
|
||||
"key": self.key,
|
||||
"namespace": list(self.namespace),
|
||||
"key": self.key,
|
||||
"value": self.value,
|
||||
"created_at": self.created_at.isoformat(),
|
||||
"updated_at": self.updated_at.isoformat(),
|
||||
}
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"Item({', '.join(f'{k}={v!r}' for k, v in self.dict().items())})"
|
||||
|
||||
|
||||
class SearchItem(Item):
|
||||
"""Represents an item returned from a search operation with additional metadata."""
|
||||
|
||||
Reference in New Issue
Block a user