Update app.py
Browse files
app.py
CHANGED
@@ -110,9 +110,9 @@ retriever = db.as_retriever(
|
|
110 |
# Set up the LLM
|
111 |
llm = ChatOpenAI(
|
112 |
base_url="https://api-inference.huggingface.co/v1/",
|
113 |
-
temperature=0
|
114 |
api_key=HF_TOKEN,
|
115 |
-
model="
|
116 |
max_tokens=None,
|
117 |
timeout=None
|
118 |
|
@@ -120,14 +120,15 @@ llm = ChatOpenAI(
|
|
120 |
|
121 |
# Create prompt template with chat history
|
122 |
template = """
|
123 |
-
You are an expert assistant specializing in the Mawared HR System. Your task is to provide accurate and contextually relevant answers based on the provided context and chat history.
|
|
|
124 |
Previous Conversation:
|
125 |
{chat_history}
|
126 |
Current Context:
|
127 |
{context}
|
128 |
Current Question:
|
129 |
{question}
|
130 |
-
Please provide a response that takes into account both the current context and the previous conversation history.
|
131 |
Answer:
|
132 |
"""
|
133 |
|
|
|
110 |
# Set up the LLM
|
111 |
llm = ChatOpenAI(
|
112 |
base_url="https://api-inference.huggingface.co/v1/",
|
113 |
+
temperature=0,
|
114 |
api_key=HF_TOKEN,
|
115 |
+
model="meta-llama/Llama-3.3-70B-Instruct",
|
116 |
max_tokens=None,
|
117 |
timeout=None
|
118 |
|
|
|
120 |
|
121 |
# Create prompt template with chat history
|
122 |
template = """
|
123 |
+
You are an expert assistant specializing in the Mawared HR System. Your task is to provide accurate and contextually relevant answers based on the provided context and chat history.
|
124 |
+
If you need more information, ask targeted clarifying questions.
|
125 |
Previous Conversation:
|
126 |
{chat_history}
|
127 |
Current Context:
|
128 |
{context}
|
129 |
Current Question:
|
130 |
{question}
|
131 |
+
Please provide a response that takes into account both the current context and the previous conversation history without mentioning past conversations , just give the user the answer.
|
132 |
Answer:
|
133 |
"""
|
134 |
|