chrisyy2003 / nonebot-plugin-gpt3

A nonebot plugin base on OpenAI API (gpt-3.5-turbo)
112 stars 16 forks source link

插件正常启动,但触发对话后报错 #29

Closed YipSzeho closed 1 year ago

YipSzeho commented 1 year ago
03-01 14:22:27 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_gpt3)
03-01 14:22:27 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_gpt3) running complete
03-01 14:22:27 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_gpt3) failed.
Traceback (most recent call last):
  File "<string>", line 17, in <module>
  File "/root/nb/.venv/lib/python3.10/site-packages/nonebot/__init__.py", line 273, in run
    get_driver().run(*args, **kwargs)
  File "/root/nb/.venv/lib/python3.10/site-packages/nonebot/drivers/fastapi.py", line 187, in run
    uvicorn.run(
  File "/root/nb/.venv/lib/python3.10/site-packages/uvicorn/main.py", line 569, in run
    server.run()
  File "/root/nb/.venv/lib/python3.10/site-packages/uvicorn/server.py", line 60, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/root/nb/.venv/lib/python3.10/site-packages/nonebot/message.py", line 141, in _check_matcher
    await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
> File "/root/nb/.venv/lib/python3.10/site-packages/nonebot/message.py", line 187, in _run_matcher
    await matcher.run(bot, event, state, stack, dependency_cache)
  File "/root/nb/.venv/lib/python3.10/site-packages/nonebot/internal/matcher/matcher.py", line 732, in run
    await self.simple_run(bot, event, state, stack, dependency_cache)
  File "/root/nb/.venv/lib/python3.10/site-packages/nonebot/internal/matcher/matcher.py", line 707, in simple_run
    await handler(
  File "/root/nb/.venv/lib/python3.10/site-packages/nonebot/dependencies/__init__.py", line 108, in __call__
    return await cast(Callable[..., Awaitable[R]], self.call)(**values)
  File "/root/nb/.venv/lib/python3.10/site-packages/nonebot_plugin_gpt3/__init__.py", line 335, in handle_chat
    resp = await get_user_session(session_id).get_chat_response(msg)
TypeError: Session.get_chat_response() missing 1 required positional argument: 'is_admin'
chrisyy2003 commented 1 year ago

小bug,修复了,重装一遍即可 pip install nonebot-plugin-gpt3 -U

YipSzeho commented 1 year ago

ok,麻烦大佬了

02TAX commented 1 year ago

QQ截图20230303160333 大佬我重装了还是不行,这是什么问题

chrisyy2003 commented 1 year ago

QQ截图20230303160333 大佬我重装了还是不行,这是什么问题

报错能多截一点么

chrisyy2003 commented 1 year ago

QQ截图20230303160333 大佬我重装了还是不行,这是什么问题

看看最新的readme试试