fix memory router naming

This commit is contained in:
Xi Yan 2024-09-22 22:30:53 -07:00
parent 28065ca53a
commit e0ad4fb99c
3 changed files with 52 additions and 41 deletions

View file

@ -46,9 +46,9 @@ class MemoryRouter(Memory):
url: Optional[URL] = None,
) -> MemoryBank:
bank_type = config.type
provider = await self.routing_table.get_provider_impl(
bank_type
).create_memory_bank(name, config, url)
bank = await self.routing_table.get_provider_impl(bank_type).create_memory_bank(
name, config, url
)
self.bank_id_to_type[bank.bank_id] = bank_type
return bank