Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libs/agno/agno/db/postgres/async_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ async def upsert_cultural_knowledge(
Exception: If an error occurs during upsert.
"""
try:
table = await self._get_table(table_type="culture")
table = await self._get_table(table_type="culture", create_table_if_not_found=True)

# Generate ID if not present
if cultural_knowledge.id is None:
Expand Down Expand Up @@ -1381,7 +1381,7 @@ async def upsert_user_memory(
Exception: If an error occurs during upsert.
"""
try:
table = await self._get_table(table_type="memories")
table = await self._get_table(table_type="memories", create_table_if_not_found=True)

current_time = int(time.time())

Expand Down Expand Up @@ -1725,7 +1725,7 @@ async def upsert_knowledge_content(self, knowledge_row: KnowledgeRow):
Optional[KnowledgeRow]: The upserted knowledge row, or None if the operation fails.
"""
try:
table = await self._get_table(table_type="knowledge")
table = await self._get_table(table_type="knowledge", create_table_if_not_found=True)
async with self.async_session_factory() as sess, sess.begin():
# Get the actual table columns to avoid "unconsumed column names" error
table_columns = set(table.columns.keys())
Expand Down