Rename fields in agent metadata (#336)

* Rename fields in agent metadata

* team one fixes

* another fix
This commit is contained in:
Jack Gerrits
2024-08-07 16:08:13 -04:00
committed by GitHub
parent 437dbefc32
commit 39489ba395
32 changed files with 94 additions and 95 deletions

View File

@@ -171,7 +171,7 @@ class TextualUserAgent(TypeRoutedAgent): # type: ignore
# Generate a ramdom file name.
for content in message.content:
if isinstance(content, Image):
filename = f"{self.metadata['name']}_{message.source}_{random.randbytes(16).hex()}.png"
filename = f"{self.metadata['type']}_{message.source}_{random.randbytes(16).hex()}.png"
content.image.save(filename)
await self._app.post_runtime_message(message)