Fix for Error binding parameter 2: type 'coroutine' is not supported

This commit is contained in:
Simon Willison 2025-05-13 16:36:53 -07:00
parent a029e0b70c
commit 511892b30c

View file

@ -895,6 +895,8 @@ def prompt(
# Log to the database
if (logs_on() or log) and not no_log:
if isinstance(response, AsyncResponse):
response = asyncio.run(response.to_sync_response())
response.log_to_db(db)