Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 报错 #672

Open
1 of 2 tasks
ferocknew opened this issue Mar 3, 2025 · 3 comments
Open
1 of 2 tasks

[Bug] 报错 #672

ferocknew opened this issue Mar 3, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@ferocknew
Copy link

发生了什么

Task exception was never retrieved
future: <Task finished name='Task-93' coro=<PipelineScheduler.execute() done, defined at /AstrBot/astrbot/core/pipeline/scheduler.py:44> exception=IndexError('list index out of range')>
Traceback (most recent call last):
File "/AstrBot/astrbot/core/pipeline/scheduler.py", line 46, in execute
await self._process_stages(event)
File "/AstrBot/astrbot/core/pipeline/scheduler.py", line 34, in _process_stages
await coro
File "/AstrBot/astrbot/core/pipeline/respond/stage.py", line 83, in process
i = await self._calc_comp_interval(comp)
File "/AstrBot/astrbot/core/pipeline/respond/stage.py", line 57, in _calc_comp_interval
return random.uniform(self.interval[0], self.interval[1])
IndexError: list index out of range

如何复现?

Task exception was never retrieved
future: <Task finished name='Task-93' coro=<PipelineScheduler.execute() done, defined at /AstrBot/astrbot/core/pipeline/scheduler.py:44> exception=IndexError('list index out of range')>
Traceback (most recent call last):
File "/AstrBot/astrbot/core/pipeline/scheduler.py", line 46, in execute
await self._process_stages(event)
File "/AstrBot/astrbot/core/pipeline/scheduler.py", line 34, in _process_stages
await coro
File "/AstrBot/astrbot/core/pipeline/respond/stage.py", line 83, in process
i = await self._calc_comp_interval(comp)
File "/AstrBot/astrbot/core/pipeline/respond/stage.py", line 57, in _calc_comp_interval
return random.uniform(self.interval[0], self.interval[1])
IndexError: list index out of range

AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

Task exception was never retrieved
future: <Task finished name='Task-93' coro=<PipelineScheduler.execute() done, defined at /AstrBot/astrbot/core/pipeline/scheduler.py:44> exception=IndexError('list index out of range')>
Traceback (most recent call last):
File "/AstrBot/astrbot/core/pipeline/scheduler.py", line 46, in execute
await self._process_stages(event)
File "/AstrBot/astrbot/core/pipeline/scheduler.py", line 34, in _process_stages
await coro
File "/AstrBot/astrbot/core/pipeline/respond/stage.py", line 83, in process
i = await self._calc_comp_interval(comp)
File "/AstrBot/astrbot/core/pipeline/respond/stage.py", line 57, in _calc_comp_interval
return random.uniform(self.interval[0], self.interval[1])
IndexError: list index out of range

操作系统

Linux

报错日志

Task exception was never retrieved
future: <Task finished name='Task-93' coro=<PipelineScheduler.execute() done, defined at /AstrBot/astrbot/core/pipeline/scheduler.py:44> exception=IndexError('list index out of range')>
Traceback (most recent call last):
File "/AstrBot/astrbot/core/pipeline/scheduler.py", line 46, in execute
await self._process_stages(event)
File "/AstrBot/astrbot/core/pipeline/scheduler.py", line 34, in _process_stages
await coro
File "/AstrBot/astrbot/core/pipeline/respond/stage.py", line 83, in process
i = await self._calc_comp_interval(comp)
File "/AstrBot/astrbot/core/pipeline/respond/stage.py", line 57, in _calc_comp_interval
return random.uniform(self.interval[0], self.interval[1])
IndexError: list index out of range

你愿意提交 PR 吗?

  • 是的,我愿意提交 PR!

Code of Conduct

@ferocknew ferocknew added the bug Something isn't working label Mar 3, 2025
@ferocknew
Copy link
Author

docker compose 部署

@Soulter
Copy link
Owner

Soulter commented Mar 3, 2025

看起来是分段回复间隔导致的问题,请确保是这个格式:

Image

@ferocknew
Copy link
Author

几个建议,telegram 下

  1. bot 接受到用户消息以后,先自动回复一个 thinking(或者表情:🤔)。。。然后再 删除这个消息,返回AI 的内容
  2. 由于 AI 返回内容较慢 ,建议不要等 AI 全返回以后,而是,通过editMsg 的方法,呈现出文字流效果
  3. 如果启用了搜索,建议,末尾再提供一个 web search 的引用消息,方便用户查看引用网址。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants