File size: 587 Bytes
d5d3bd0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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()
|