From c856a6c2c1bb2d7b2b514280d1c3c39cf6105350 Mon Sep 17 00:00:00 2001 From: hlohaus <983577+hlohaus@users.noreply.github.com> Date: Thu, 1 May 2025 11:27:34 +0200 Subject: [PATCH] Update _llm_caption.py --- packages/markitdown/src/markitdown/converters/_llm_caption.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/markitdown/src/markitdown/converters/_llm_caption.py b/packages/markitdown/src/markitdown/converters/_llm_caption.py index 9108eab..d8fc921 100644 --- a/packages/markitdown/src/markitdown/converters/_llm_caption.py +++ b/packages/markitdown/src/markitdown/converters/_llm_caption.py @@ -49,8 +49,8 @@ def llm_caption( # Call the OpenAI API response = client.chat.completions.create(model=model, messages=messages) if asyncio.iscoroutine(response): - async def read_content(): + async def read_content(response): response = await response return response.choices[0].message.content - return read_content() + return read_content(response) return response.choices[0].message.content