feat: add metadata {"agent":xx} to assistant message

This commit is contained in:
莘权 马 2024-04-30 12:24:30 +08:00
parent db34c6f458
commit e37aa8e5bf
2 changed files with 4 additions and 1 deletions

View file

@ -378,6 +378,7 @@ class AIMessage(Message):
def with_agent(self, name: str):
self.add_metadata(key=AGENT, value=name)
return self
@property
def agent(self) -> str: