Skip to content

Commit bd64f9c

Browse files
committed
refactor(core): simplify reasoning_content null check in OpenAI compatible LLM
1 parent 82e8bba commit bd64f9c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

flowllm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
from . import gallery # noqa: E402, F401 # pylint: disable=wrong-import-position,unused-import
1212
# from . import extensions # noqa: E402, F401 # pylint: disable=wrong-import-position,unused-import
1313

14-
__version__ = "0.2.0.9"
14+
__version__ = "0.2.0.10"

flowllm/core/llm/openai_compatible_llm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def stream_chat(
123123
else:
124124
delta = chunk.choices[0].delta
125125

126-
if hasattr(delta, "reasoning_content") and delta.reasoning_content is not None:
126+
if hasattr(delta, "reasoning_content") and delta.reasoning_content:
127127
yield FlowStreamChunk(chunk_type=ChunkEnum.THINK, chunk=delta.reasoning_content)
128128

129129
else:
@@ -225,7 +225,7 @@ async def astream_chat(
225225
else:
226226
delta = chunk.choices[0].delta
227227

228-
if hasattr(delta, "reasoning_content") and delta.reasoning_content is not None:
228+
if hasattr(delta, "reasoning_content") and delta.reasoning_content:
229229
yield FlowStreamChunk(chunk_type=ChunkEnum.THINK, chunk=delta.reasoning_content)
230230

231231
else:

0 commit comments

Comments
 (0)