[Bug] 知识库不支持图片,未来任务选择send到私聊也会发送到webhook

Aperta
#11,022 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

The report names the future task flow and the 企业微信 adapter, but gives no source files or tests. Start by locating how scheduled tasks handle the “send to private chat” choice and how the adapter routes those messages; compare that path with webhook delivery. Done when a task configured for private chat reaches the private chat, while a task configured for a group reaches the group.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
问题描述

1、知识库不支持图片
2、未来任务选择send到私聊也会发送到webhook群里,是否能实现ui上选择私聊就发送私聊,选择群就发送到群,
没测试出来issues也没找到方法不知道是不是配置问题,最终就让ai写了个插件给patch来实现了

Image
如何复现?

1、打开未来任务,添加任务
2、选择send 推送到私聊
3、不会推送到私聊,还是发送到了配置的webhook

AstrBot 版本

4.29.4

操作系统

Linux

部署方式

uv

使用的消息平台适配器

企业微信

错误日志
14:40:04.226] [Core] [INFO] [runners.tool_loop_agent_runner:1185]: Agent 使用工具: ['astrbot_execute_python', 'astrbot_execute_shell']
[14:40:04.227] [Core] [INFO] [runners.tool_loop_agent_runner:1241]: 使用工具:astrbot_execute_python,参数:{'code': '\nimport json, urllib.request\nfrom datetime import datetime\nfrom zoneinfo import ZoneInfo\n\nlat, lon = 34.7466, 113.6254  # 郑州\nurl = (\n    "https://api.open-meteo.com/v1/forecast"\n    f"?latitude={lat}&longitude={lon}"\n    "&current=temperature_2m,relative_humidity_2m,apparent_temperature,precipitation,weather_code,wind_speed_10m,wind_direction_10m"\n    "&hourly=temperature_2m,precipitation_probability,precipitation"\n    "&daily=weather_code,temperature_2m_max,temperature_2m_min,precipitation_sum,precipitation_probability_max,sunrise,sunset"\n    "&timezone=Asia%2FShanghai&forecast_days=5"\n)\nwith urllib.request.urlopen(url, timeout=20) as r:\n    d = json.load(r)\n\nnow = datetime.now(ZoneInfo("Asia/Shanghai"))\nprint("采集时间:", now.strftime("%Y-%m-%d %H:%M"))\nprint("current:", d["current"])\nprint("daily:")\nfor i in range(len(d["daily"]["time"])):\n    print(d["daily"]["time"][i], "code=",d["daily"]["weather_code"][i],\n          "max=",d["daily"]["temperature_2m_max"][i],"min=",d["daily"]["temperature_2m_min"][i],\n          "prec=",d["daily"]["precipitation_sum"][i],"pop=",d["daily"]["precipitation_probability_max"][i],\n          "sunrise=",d["daily"]["sunrise"][i][-5:],"sunset=",d["daily"]["sunset"][i][-5:])\n# 今日剩余时段\nh = d["hourly"]\ncur_h = now.hour\nprint("hourly today:")\nfor t,tp,pp,pr in zip(h["time"],h["temperature_2m"],h["precipitation_probability"],h["precipitation"]):\n    if t.startswith(d["daily"]["time"][0]) and int(t[11:13]) >= cur_h:\n        print(t[11:16], tp, pp, pr)\n'}
[14:40:05.173] [Core] [INFO] [runners.tool_loop_agent_runner:1438]: Tool `astrbot_execute_python` Result: 采集时间: 2026-11-06 14:40
current: {'time': '2026-11-06T14:30', 'interval': 900, 'temperature_2m': 16.3, 'relative_humidity_2m': 45, 'apparent_temperature': 13.4, 'precipitation': 0.0, 'weather_code': 0, 'wind_speed_10m': 10.1, 'wind_direction_10m': 63}
daily:
2026-11-06 code= 3 max= 16.3 min= 9.3 prec= 0.0 pop= 0 sunrise= 06:50 sunset= 17:27
2026-11-07 code= 61 max= 15.6 min= 7.5 prec= 7.8 pop= 100 sunrise= 06:51 sunset= 17:26
2026-11-08 code= 61 max= 13.2 min= 5.6 prec= 2.2 pop= 98 sunrise= 06:52 sunset= 17:25
2026-11-09 code= 1 max= 12.7 min= 2.5 prec= 0.0 pop= 2 sunrise= 06:53 sunset= 17:25
2026-11-10 code= 0 max= 17.1 min= 2.5 prec= 0.0 pop= 0 sunrise= 06:54 sunset= 17:24
hourly today:
14:00 16.2 0 0.0
15:00 16.2 0 0.0
16:00 15.7 0 0.0
17:00 14.2 0 0.0
18:00 12.7 0 0.0
19:00 11.8 0 0.0
20:00 11.0 0 0.0
21:00 10.4 0 0.0
22:00 9.8 0 0.0
23:00 9.6 0 0.0
辅助信息

No response

检查清单
  • 我已在 Issue 列表中搜索过相关问题仍无法解决,或该问题从未被报告过。
  • 我已尝试过禁用所有插件,排除了可能是因插件导致的问题。
  • 我报告的问题与 AstrBot 本体相关,而非在报告某一插件的问题。
  • 我已阅读并同意本项目的贡献者行为准则。
  • (可选)我愿意提交 PR 以帮助修复该问题。
Lingua principale
Python
Stelle
46.4k
Fork
3.4k
Merge medio
1g 11h
PR unite (30g)
120

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di AstrBotDevs/AstrBot

Tutte le issue di AstrBotDevs/AstrBot

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.