Spaces:
Runtime error
Runtime error
File size: 707 Bytes
e2e8616 d40a923 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
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:
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()
|