kotaemon/knowledgehub/chatbot/simple_respondent.py
2023-10-24 11:12:22 +07:00

14 lines
314 B
Python

from theflow import Node
from ..llms import ChatLLM
from .base import BaseChatBot
class SimpleRespondentChatbot(BaseChatBot):
"""Simple text respondent chatbot that essentially wraps around a chat LLM"""
llm: Node[ChatLLM]
def _get_message(self) -> str:
return self.llm(self.history).text