mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-29 06:23:20 +00:00
cr
This commit is contained in:
parent
cde3b1eb48
commit
5f87276c3a
@ -119,7 +119,10 @@ class BaseMessage(Serializable):
|
|||||||
print(self.pretty_repr(html=is_interactive_env())) # noqa: T201
|
print(self.pretty_repr(html=is_interactive_env())) # noqa: T201
|
||||||
|
|
||||||
def __getitem__(self, item: str) -> Any:
|
def __getitem__(self, item: str) -> Any:
|
||||||
return self.model_dump()[item]
|
if item in self.model_fields and hasattr(self, item):
|
||||||
|
return getattr(self, item)
|
||||||
|
else:
|
||||||
|
raise KeyError(item)
|
||||||
|
|
||||||
|
|
||||||
def merge_content(
|
def merge_content(
|
||||||
|
Loading…
Reference in New Issue
Block a user