Skip to content

armgit / dify

Public Imported from GitHub
0

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.

Fix/assistant none type (#2143)

Yeuoly9525ca08b939
diff --git a/api/core/tools/provider/builtin/yahoo/tools/analytics.py b/api/core/tools/provider/builtin/yahoo/tools/analytics.py
index 09bf17fe630..b2336f547f5 100644
--- a/api/core/tools/provider/builtin/yahoo/tools/analytics.py
+++ b/api/core/tools/provider/builtin/yahoo/tools/analytics.py
@@ -33,7 +33,7 @@ class YahooFinanceAnalyticsTool(BuiltinTool):
stock_data = download(symbol, start=time_range[0], end=time_range[1])
max_segments = min(15, len(stock_data))
- rows_per_segment = len(stock_data) // max_segments
+ rows_per_segment = len(stock_data) // (max_segments or 1)
summary_data = []
for i in range(max_segments):
start_idx = i * rows_per_segment