peichao.dong commited on
Commit ·
5c65101
1
Parent(s): 2a0c033
update embedding
Browse files- embedding.py +3 -3
embedding.py
CHANGED
|
@@ -39,7 +39,7 @@ class CustomEmbedding:
|
|
| 39 |
docsearch = FAISS.load_local(
|
| 40 |
"./documents/abstract.faiss", self.embeddings)
|
| 41 |
# retriever = VectorStoreRetriever(vectorstore=docsearch)
|
| 42 |
-
_template = """Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question
|
| 43 |
|
| 44 |
Chat History:
|
| 45 |
{chat_history}
|
|
@@ -64,8 +64,8 @@ class CustomEmbedding:
|
|
| 64 |
tools = [Tool(name="ABstract system FAQ", func= self.faq, description="Useful for anwer questions about ABstract system")]
|
| 65 |
memory = ConversationBufferMemory(memory_key="chat_history")
|
| 66 |
|
| 67 |
-
prefix = """Have a conversation with a human, answering the following questions as best you can.
|
| 68 |
-
suffix = """Begin!"
|
| 69 |
|
| 70 |
{chat_history}
|
| 71 |
Question: {input}
|
|
|
|
| 39 |
docsearch = FAISS.load_local(
|
| 40 |
"./documents/abstract.faiss", self.embeddings)
|
| 41 |
# retriever = VectorStoreRetriever(vectorstore=docsearch)
|
| 42 |
+
_template = """Given the following conversation and a follow up question, rephrase the follow up question to be a chinese standalone question.
|
| 43 |
|
| 44 |
Chat History:
|
| 45 |
{chat_history}
|
|
|
|
| 64 |
tools = [Tool(name="ABstract system FAQ", func= self.faq, description="Useful for anwer questions about ABstract system")]
|
| 65 |
memory = ConversationBufferMemory(memory_key="chat_history")
|
| 66 |
|
| 67 |
+
prefix = """Have a conversation with a human, answering the following questions as best you can. You have access to the following tools:"""
|
| 68 |
+
suffix = """The final Answer should be in Chines! Begin!"
|
| 69 |
|
| 70 |
{chat_history}
|
| 71 |
Question: {input}
|