【问题标题】:change chatbot name in python在python中更改聊天机器人名称
【发布时间】:2021-06-30 22:40:07
【问题描述】:

我创建了一个聊天机器人,一切正常,但当我问它“你叫什么名字?”时它应该回应“我是ReLebot。请问我一个数学问题。”但他实际上并没有回应“我是 pybot。请问我一个数学问题。”。我该怎么办?

from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer
import pyttsx3 as tts;
from tkinter import *



my_bot = ChatBot(name='ReLebot', read_only=True,
          logic_adapters=
['chatterbot.logic.MathematicalEvaluation',
          'chatterbot.logic.BestMatch'])
small_talk = ['hi there!',
          'hi!',
          'how do you do?',
          'how are you?',
          'i\'m cool.',
          'fine, you?',
          'always cool.',
          'i\'m ok',
          'glad to hear that.',
          'i\'m fine',
          'glad to hear that.',
          'i feel awesome',
          'excellent, glad to hear that.',
          'not so good',
          'sorry to hear that.',
          'what\'s your name?',
          'i\'m ReLebot. ask me a math question, please.',
              'bye',
              'good bye it was nice talk']

【问题讨论】:

    标签: python bots chatbot chatterbot


    【解决方案1】:

    如果您在自定义文件夹的 myown.yml 中添加以下代码,这可能是可能的。

    categories:
    - My Own 
    - This is my own data
    conversations:
    - - what's your name?
      - i'm ReLebot.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-09-21
      • 2023-01-23
      • 1970-01-01
      • 2017-03-05
      • 1970-01-01
      • 1970-01-01
      • 2022-12-23
      相关资源
      最近更新 更多