Spaces:
Runtime error
Runtime error
Update rag.py
Browse files
rag.py
CHANGED
@@ -57,12 +57,13 @@ class Rag:
|
|
57 |
self.vectorstore = vectorstore
|
58 |
self.memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True, output_key="answer")
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
64 |
The news should be written in a formal language.
|
65 |
-
The news should have between {min_words} and {max_words} words and it should be in
|
66 |
The news should be about the following context: <{context}>
|
67 |
Question: <{question}>
|
68 |
Answer here:"""
|
|
|
57 |
self.vectorstore = vectorstore
|
58 |
self.memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True, output_key="answer")
|
59 |
|
60 |
+
#Do not make up any information, create the news just based on the given information on the pieces of texts delimited by <>.
|
61 |
+
prompt_template = """Your task is to create news for a newspaper based on pieces of text delimited by <> and a question delimited by <>.
|
62 |
+
Do not use only your knowledge to make the news. Make the news based on the pieces of text delimited by <>.
|
63 |
+
If the pieces of text don't have relevant information about the question, just say that you need more information to make the news.
|
64 |
+
The news should have a title.
|
65 |
The news should be written in a formal language.
|
66 |
+
The news should have between {min_words} and {max_words} words and it should be in Portuguese language.
|
67 |
The news should be about the following context: <{context}>
|
68 |
Question: <{question}>
|
69 |
Answer here:"""
|