File size: 959 Bytes
cd55ee8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11c5c35
 
cd55ee8
 
 
 
 
 
 
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
28
29
30
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)

    # Ingest MongoDB
    bot.ingest_from_mongodb(
        mongo_uri="mongodb+srv://dhaval:Dhaval15@cluster0.rwu1ze6.mongodb.net/prontoDB?retryWrites=true&w=majority&appName=Cluster0",
        db_name="prontoDB",
    )

    # Example queries
    #bot.ask("who is author of problem Id: PR787807")
    #bot.ask("Who is the responsiblePerson for correction CR1554963?")
    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)