Update app.py
Browse files
app.py
CHANGED
@@ -31,12 +31,10 @@ model = ChatTogether(
|
|
31 |
temperature=0.0,
|
32 |
max_tokens=500,)
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
{context}
|
37 |
-
|
38 |
-
"""
|
39 |
-
prompt = ChatPromptTemplate.from_template(template)
|
40 |
|
41 |
chain = (
|
42 |
{"context": retriever, "question": RunnablePassthrough()}
|
@@ -46,7 +44,7 @@ chain = (
|
|
46 |
)
|
47 |
|
48 |
|
49 |
-
st.title("Chat with me
|
50 |
|
51 |
# Initialize chat history
|
52 |
if "messages" not in st.session_state:
|
|
|
31 |
temperature=0.0,
|
32 |
max_tokens=500,)
|
33 |
|
34 |
+
prompt = ChatPromptTemplate([
|
35 |
+
("system", "You are an assistant for question-answering tasks. Use the following pieces of retrieved context to answer the question. If you don't know the answer, just say that you don't know. answer as if person is responding. and if user greets then greet back"),
|
36 |
+
("user", "context : {context}, Question: {question}")
|
37 |
+
])
|
|
|
|
|
38 |
|
39 |
chain = (
|
40 |
{"context": retriever, "question": RunnablePassthrough()}
|
|
|
44 |
)
|
45 |
|
46 |
|
47 |
+
st.title("Chat with me")
|
48 |
|
49 |
# Initialize chat history
|
50 |
if "messages" not in st.session_state:
|