Skip to content

Commit 34d1d4a

Browse files
committed
Fix
1 parent 813522b commit 34d1d4a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/agents/models/openai_chatcompletions.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,8 @@ async def get_response(
9090
json.dumps(message.model_dump(), indent=2),
9191
)
9292
else:
93-
logger.debug(
94-
"LLM resp had no message. finish_reason: %s",
95-
first_choice.finish_reason,
96-
)
93+
finish_reason = first_choice.finish_reason if first_choice else "-"
94+
logger.debug("LLM resp had no message. finish_reason: %s", finish_reason)
9795

9896
usage = (
9997
Usage(

0 commit comments

Comments
 (0)