|
|
from util2 import ErrorBot |
|
|
|
|
|
print("hello") |
|
|
|
|
|
if __name__ == "__main__": |
|
|
EMBEDDING_MODEL = "BAAI/bge-base-en-v1.5" |
|
|
LLM_MODEL = "deepseek-ai/deepseek-coder-1.3b-instruct" |
|
|
|
|
|
bot = ErrorBot(embedding_model_name=EMBEDDING_MODEL, llm_model_name=LLM_MODEL) |
|
|
|
|
|
|
|
|
bot.ingest_from_mongodb( |
|
|
mongo_uri="mongodb+srv://dhaval:Dhaval15@cluster0.rwu1ze6.mongodb.net/prontoDB?retryWrites=true&w=majority&appName=Cluster0", |
|
|
db_name="prontoDB", |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bot.ask("What is the solution for this Installation failed In DCA State with NIV services in Stopped State || SprintLab837") |
|
|
|
|
|
history = [ |
|
|
{"role": "user", "content": "My name is Shreekant"}, |
|
|
{"role": "bot", "content": "Ok"} |
|
|
] |
|
|
|
|
|
answer = bot.ask("What is my name?", history=history) |
|
|
print(answer) |