style(openai): wrap json_mode finish_reason ternary for ruff format

Signed-off-by: Saylee <saylee21@users.noreply.github.com>
This commit is contained in:
Saylee 2026-10-12 22:44:14 +05:30
parent 5e65f314eb
commit 039f42516d

View file

@ -793,7 +793,11 @@ class OpenAIGPTConfig(BaseLLMModelInfo, BaseConfig):
json_mode_content_str: str | None = str(new_tool_calls[0]["function"].get("arguments", "")) or None
if json_mode_content_str is not None:
translated_message = Message(content=json_mode_content_str)
finish_reason = "stop" if choice["finish_reason"] in ("tool_calls", "function_call") else choice["finish_reason"]
finish_reason = (
"stop"
if choice["finish_reason"] in ("tool_calls", "function_call")
else choice["finish_reason"]
)
if translated_message is None:
## get the reasoning content