mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 01:39:04 +08:00
Fix/assistant none type (#2143)
This commit is contained in:
parent
501caf0a69
commit
9525ca08b9
@ -33,7 +33,7 @@ class YahooFinanceAnalyticsTool(BuiltinTool):
|
|||||||
|
|
||||||
stock_data = download(symbol, start=time_range[0], end=time_range[1])
|
stock_data = download(symbol, start=time_range[0], end=time_range[1])
|
||||||
max_segments = min(15, len(stock_data))
|
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 = []
|
summary_data = []
|
||||||
for i in range(max_segments):
|
for i in range(max_segments):
|
||||||
start_idx = i * rows_per_segment
|
start_idx = i * rows_per_segment
|
||||||
|
Loading…
x
Reference in New Issue
Block a user