from enum import Enum class Icons(Enum): def __str__(self): return str(self.value) DOC = "📄" ERR = "❌" INDEX = "🗄ī¸" INFO = "ℹī¸" OK = "👌" SUCCESS = "✅" WAIT = "⌛" WARN = "⚠ī¸" class Message(): def __init__(self, icon, content): self.icon = icon self.content = content def __str__(self): return f"{self.icon} {self.content}" class Messages(): def __init__(self, messages=[]): self.messages = messages def __str__(self): return f"""
{("").join([f"
{x}
" for x in self.messages])}
""" def append(self, new_message): self.messages.append(new_message) def set(self, messages): self.messages = messages # class Message(): # def standing_by(self): # return "
👌 Standing by...
" # def not_ready(self): # return """ #
# You have to select a Zotero collection to proceed. #
# """ # def openai_api_key(self): # return """ #
# OpenAI API key is either missing or incorrect. #
# """ # def use_queries(queries): # query_str = ", ".join([f"{q}" for q in queries]) # return f"
Search your Zotero collection for {query_str}" # def update_status(messages): # return gr.HTML.update(f""" #
# {("").join(messages)} #
# """)