mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-13 08:52:02 +00:00
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:
parent
5e65f314eb
commit
039f42516d
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue