Update _llm_caption.py
This commit is contained in:
parent
4a2f793869
commit
c856a6c2c1
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue