官方cleverbot.com API的包装
cleverwrap的Python项目详细描述
cleverwrap.py
与官方CleverBot API交互的简单python包装类。
此程序包是为在python3上运行而创建的
安装
可以使用以下命令从pypi安装cleverwrap.py:pip install cleverwrap
您还可以克隆此存储库并直接导入库。
用法
>>> from cleverwrap import CleverWrap
>>> cw = CleverWrap("API_KEY")
>>> cw.say("Hello CleverBot.")
"Hello Human."
>>> cw.reset() # resets the conversation ID and conversation state.
>>> conv = cw.new_conversation() # Start a new conversation with CleverBot
>>> conv.say("Hellon there.")
"Hello Human."
>>> conv.reset() # Reset the conversation state
许可证
版权所有2017安德鲁爱德华兹使用MIT License。