[AUR-411] Adopt to Example2 project (#28)
Add the chatbot from Example2. Create the UI for chat.
This commit is contained in:
committed by
GitHub
parent
533fffa6db
commit
6e7905cbc0
13
knowledgehub/chatbot/simple_respondent.py
Normal file
13
knowledgehub/chatbot/simple_respondent.py
Normal file
@@ -0,0 +1,13 @@
|
||||
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[0]
|
Reference in New Issue
Block a user