| from chatbots.chatbot_base import ChatbotBase | |
| from utils.tools import txt2string | |
| from pathlib import Path | |
| import os | |
| current_dir = Path(__file__).resolve().parent | |
| class Chatbot(ChatbotBase): | |
| def __init__(self) -> None: | |
| super().__init__(txt2string(os.path.join(current_dir,'system.txt'))) | |
| def generate_code(self,requirement,html_source,base64_img): | |
| self.add_message('The first picture is the reference picture, and the last one is how the given source code looks.\n'+requirement+html_source,base64_img,role='user') | |
| return self.generate() | |