Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: remove finish_reason condition logic when deltaContent is empty (#2270)
geosmart9d072920da2a
diff --git a/api/core/model_runtime/model_providers/openai_api_compatible/llm/llm.py b/api/core/model_runtime/model_providers/openai_api_compatible/llm/llm.pyindex 102f54eff6e..53ee5817d9e 100644--- a/api/core/model_runtime/model_providers/openai_api_compatible/llm/llm.py+++ b/api/core/model_runtime/model_providers/openai_api_compatible/llm/llm.py@@ -372,15 +372,9 @@ class OAIAPICompatLargeLanguageModel(_CommonOAI_API_Compat, LargeLanguageModel):if 'delta' in choice:delta = choice['delta']- if delta.get('content') is None or delta.get('content') == '':- if finish_reason is not None:- yield create_final_llm_result_chunk(- index=chunk_index,- message=AssistantPromptMessage(content=choice.get('text', '')),- finish_reason=finish_reason- )- else:- continue+ delta_content = delta.get('content')+ if delta_content is None or delta_content == '':+ continueassistant_message_tool_calls = delta.get('tool_calls', None)# assistant_message_function_call = delta.delta.function_call@@ -393,11 +387,11 @@ class OAIAPICompatLargeLanguageModel(_CommonOAI_API_Compat, LargeLanguageModel):# transform assistant message to prompt messageassistant_prompt_message = AssistantPromptMessage(- content=delta.get('content', ''),+ content=delta_content,tool_calls=tool_calls if assistant_message_tool_calls else [])- full_assistant_content += delta.get('content', '')+ full_assistant_content += delta_contentelif 'text' in choice:choice_text = choice.get('text', '')if choice_text == '':