Bug Description
In SQLAlchemyChatStore's _setup_tables function, it ignores the db_schema value if it checks is_sqlite_database() to be true. This function checks if the async_database_uri starts with "sqlite".
However, if a async_engine is passed instead of async_database_uri, the default value does start with "sqlite". This causes the db_schema to be ignored.
Workaround is to pass whatever to async_database_uri to fix it.
memory = Memory.from_defaults(
session_id="chat_id",
table_name="conversations",
async_database_uri="fake placeholder",
async_engine=my_async_engine,
db_schema="llama",
)
Related PR: !19741
Version
0.14.10
Steps to Reproduce
Create Memory passing both db_schema and async_engine, without passing in async_database_uri
memory = Memory.from_defaults(
session_id="chat_id",
table_name="conversations",
async_engine=my_async_engine,
db_schema="llama",
)
Relevant Logs/Tracbacks