Răsfoiți Sursa

fix: image num limit

zhayujie 2 ani în urmă
părinte
comite
9e281d20ab
2 a modificat fișierele cu 5 adăugiri și 1 ștergeri
  1. 1 1
      README.md
  2. 4 0
      bot/linkai/link_ai_bot.py

+ 1 - 1
README.md

@@ -24,7 +24,7 @@ SaaS服务、私有化部署、稳定托管接入 等多种模式。
 >
 >
 > 目前已在私域运营、智能客服、企业效率助手等场景积累了丰富的 AI 解决方案, 在电商、文教、健康、新消费等各行业沉淀了 AI 落地的最佳实践,致力于打造助力中小企业拥抱 AI 的一站式平台。
 > 目前已在私域运营、智能客服、企业效率助手等场景积累了丰富的 AI 解决方案, 在电商、文教、健康、新消费等各行业沉淀了 AI 落地的最佳实践,致力于打造助力中小企业拥抱 AI 的一站式平台。
 
 
-企业服务和商咨询可联系产品顾问:
+企业服务和商咨询可联系产品顾问:
 
 
 <img width="240" src="https://img-1317903499.cos.ap-guangzhou.myqcloud.com/docs/product-manager-qrcode.jpg">
 <img width="240" src="https://img-1317903499.cos.ap-guangzhou.myqcloud.com/docs/product-manager-qrcode.jpg">
 
 

+ 4 - 0
bot/linkai/link_ai_bot.py

@@ -387,7 +387,11 @@ class LinkAIBot(Bot):
         if not image_urls:
         if not image_urls:
             return
             return
         try:
         try:
+            i = 0
             for url in image_urls:
             for url in image_urls:
+                if i >= 2:
+                    continue
+                i += 1
                 if url.endswith(".mp4"):
                 if url.endswith(".mp4"):
                     reply_type = ReplyType.VIDEO_URL
                     reply_type = ReplyType.VIDEO_URL
                 elif url.endswith(".pdf") or url.endswith(".doc") or url.endswith(".docx"):
                 elif url.endswith(".pdf") or url.endswith(".doc") or url.endswith(".docx"):