feat: 优化卡片内容显示

This commit is contained in:
Cassianvale
2025-03-06 14:46:59 +08:00
parent 4393bf68cd
commit 8781eebdfa
5 changed files with 939 additions and 53 deletions

View File

@@ -502,7 +502,8 @@ class StockAnalyzer:
try:
json_data = json.loads(data_content)
if 'choices' in json_data:
# 检查 choices 列表是否为空
if 'choices' in json_data and json_data['choices']:
delta = json_data['choices'][0].get('delta', {})
content = delta.get('content', '')