From 511892b30c85ac27413d8079ebe69d0c2edd2b44 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Tue, 13 May 2025 16:36:53 -0700 Subject: [PATCH] Fix for Error binding parameter 2: type 'coroutine' is not supported --- llm/cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llm/cli.py b/llm/cli.py index eed9a75..856439a 100644 --- a/llm/cli.py +++ b/llm/cli.py @@ -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)