Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -45,13 +45,12 @@ agent=create_csv_agent(llm,['data/Gretel_Data.csv','data/RAN_Data _T.csv'],verbo
|
|
45 |
def echo(message, history):
|
46 |
context_prompt = """<s> [INST] Assume the role of Clara, a seasoned senior telecom network engineer with access to troubleshooting tickets data and various technical and product documentation.
|
47 |
Rely on information derived from these tickets to address queries. Feel free to seek clarification through relevant questions."""
|
48 |
-
csv_context_prompt = """Assume access to multiple files, including a CSV with ticket details (ticket ID as primary key, columns like network element, location, RCA, status, severity, etc.).
|
49 |
-
The model should refer to the CSV file specifically when users inquire about tickets or related network issues. For other queries, the model can utilize information from the broader context or available data sources as needed."""
|
50 |
# message = "Your name is Clara. You are a helpful senior telecom network engineer having access to troubleshooting tickets data and other technical and product documentation.Stick to the knowledge from these tickets. Ask clarification questions if needed. "+ message
|
51 |
-
message= context_prompt +
|
52 |
result=qa({"question":message})
|
53 |
bold_answer= "<b>" + result['answer'] + "</b>"
|
54 |
return bold_answer + "<br></br>" +'1. ' + str(result["source_documents"][0]) +"<br>" + '2. ' + str(result["source_documents"][1]) + "<br>" + "3. " + str(result["source_documents"][2])
|
|
|
55 |
def echo_agent(message, history):
|
56 |
message="There are 2 df's. If you find a KeyError check for the same in the other df." + "<br>" + message
|
57 |
try:
|
|
|
45 |
def echo(message, history):
|
46 |
context_prompt = """<s> [INST] Assume the role of Clara, a seasoned senior telecom network engineer with access to troubleshooting tickets data and various technical and product documentation.
|
47 |
Rely on information derived from these tickets to address queries. Feel free to seek clarification through relevant questions."""
|
|
|
|
|
48 |
# message = "Your name is Clara. You are a helpful senior telecom network engineer having access to troubleshooting tickets data and other technical and product documentation.Stick to the knowledge from these tickets. Ask clarification questions if needed. "+ message
|
49 |
+
message= context_prompt + "User Query: "+ message + "If asked about Root cause analysis (rca), give only one possible awnser and then give the steps to resolve in the exact format which is :- The steps to resolve could be - [/INST]"
|
50 |
result=qa({"question":message})
|
51 |
bold_answer= "<b>" + result['answer'] + "</b>"
|
52 |
return bold_answer + "<br></br>" +'1. ' + str(result["source_documents"][0]) +"<br>" + '2. ' + str(result["source_documents"][1]) + "<br>" + "3. " + str(result["source_documents"][2])
|
53 |
+
|
54 |
def echo_agent(message, history):
|
55 |
message="There are 2 df's. If you find a KeyError check for the same in the other df." + "<br>" + message
|
56 |
try:
|