Skip to content

Commit

Permalink
fix(api/core/model_runtime/model_providers/azure_openai/llm/llm.py): …
Browse files Browse the repository at this point in the history
…Try to skip if `delta.delta` is None. (#6727)

Signed-off-by: -LAN- <[email protected]>
  • Loading branch information
laipz8200 authored Jul 26, 2024
1 parent cf258b7 commit 83af503
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,10 @@ def _handle_chat_generate_stream_response(
continue

delta = chunk.choices[0]
# NOTE: For fix https://github.com/langgenius/dify/issues/5790
if delta.delta is None:
continue


# extract tool calls from response
self._update_tool_calls(tool_calls=tool_calls, tool_calls_response=delta.delta.tool_calls)
Expand Down

0 comments on commit 83af503

Please sign in to comment.