import os from config import * from src.tools.llm import LlmAgent import src.view.view as view from src.control.control import Chatbot import chromadb from src.tools.retriever import Retriever os.environ["TOKENIZERS_PARALLELISM"] = "true" if not "OPENAI_API_KEY" in os.environ: from config_key import OPENAI_API_KEY os.environ['OPENAI_API_KEY'] = OPENAI_API_KEY llm_model = "gpt-4" llm = LlmAgent(llm_model=llm_model) if not os.path.exists("database_structure/"): os.makedirs("database_structure/") client_db = chromadb.PersistentClient("database_structure/") chat = Chatbot(client_db=client_db,retriever=Retriever(llmagent=llm),llm_agent=llm) ilumio_qna = view.run(ctrl=chat, config=view_config) ilumio_qna.queue().launch()