gpt4 book ai didi

Python RASA - 导入 "object() takes no parameters"时出现错误 "from rasa_core.agent import Agent"

转载 作者:太空宇宙 更新时间:2023-11-03 21:10:15 31 4
gpt4 key购买 nike

导入命令:

“从rasa_core.agent导入代理”

给我以下错误

---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-43-bdf78c35345b> in <module>()
5 from rasa_core import training
6 from rasa_core.actions import Action
----> 7 from rasa_core.agent import Agent
8 from rasa_core.domain import Domain
9 from rasa_core.policies.keras_policy import KerasPolicy

C:\ProgramData\Miniconda3\lib\site-packages\rasa_core\agent.py in <module>()
15 import rasa_core
16 from rasa_core import training, constants
---> 17 from rasa_core.channels import UserMessage, OutputChannel, InputChannel
18 from rasa_core.constants import DEFAULT_REQUEST_TIMEOUT
19 from rasa_core.dispatcher import Dispatcher

C:\ProgramData\Miniconda3\lib\site-packages\rasa_core\channels\__init__.py in <module>()
15 from rasa_core.channels.botframework import BotFrameworkInput # nopep8
16 from rasa_core.channels.callback import CallbackInput # nopep8
---> 17 from rasa_core.channels.console import CmdlineInput # nopep8
18 from rasa_core.channels.facebook import FacebookInput # nopep8
19 from rasa_core.channels.mattermost import MattermostInput # nopep8

C:\ProgramData\Miniconda3\lib\site-packages\rasa_core\channels\console.py in <module>()
1 # this builtin is needed so we can overwrite in test
----> 2 import questionary
3
4 import json
5 import requests

C:\ProgramData\Miniconda3\lib\site-packages\questionary\__init__.py in <module>()
3
4 import questionary.version
----> 5 from questionary.form import Form
6 from questionary.form import form
7 from questionary.prompt import prompt

C:\ProgramData\Miniconda3\lib\site-packages\questionary\form.py in <module>()
1 from collections import namedtuple
2
----> 3 from questionary.constants import DEFAULT_KBI_MESSAGE
4 from questionary.question import Question
5

C:\ProgramData\Miniconda3\lib\site-packages\questionary\constants.py in <module>()
38 ('selected', ''), # style for a selected item of a checkbox
39 ('separator', ''), # separator in lists
---> 40 ('instruction', '') # user instructions for select, rawselect, checkbox
41 ])

TypeError: object() takes no parameters

此错误也会在其他一些 Rasa 导入中再次出现。

以下是我的版本:

Python - 3.6.6rasa_core - 0.13.3rasa_nlu- 0.14.4

有一个要求list这可以在线获得,但发布的答案导致错误仍然无法解决。

感谢任何帮助。

最佳答案

我也遇到过类似的问题。

安装以下版本的库应该可以解决该错误:

  • python==3.6.7
  • rasa_core==0.9.6
  • rasa_nlu==0.14.4
  • spacy==2.0.18
  • Pandas ==0.22.0
  • sklearn_crfsuite== 0.3.6

干杯!

编辑:确保在安装上述内容时创建一个新的 python 环境,以避免相互依赖问题。

关于Python RASA - 导入 "object() takes no parameters"时出现错误 "from rasa_core.agent import Agent",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55119349/

31 4 0
文章推荐: javascript - 改变