Spaces:
Paused
Paused
Daniel Marques
commited on
Commit
·
57fab83
1
Parent(s):
793d7d0
feat: add support multilingual
Browse files- prompt_template_utils.py +6 -3
prompt_template_utils.py
CHANGED
@@ -9,12 +9,15 @@ from langchain.prompts import PromptTemplate
|
|
9 |
|
10 |
# this is specific to Llama-2.
|
11 |
|
12 |
-
system_prompt = """You are a helpful assistant, you will use the context and documents provided in the training to answer users questions.
|
13 |
-
Read the context provided before answering questions and think step by step. If you can't answer a user's question based on the
|
14 |
-
context provided, inform the user. Don't use any other information to answer the user."""
|
15 |
|
16 |
# system_prompt = """You are a helpful assistant, and you will use the context and documents provided in the training to answer users' questions. Please read the context provided carefully before responding to questions and follow a step-by-step thought process. If you cannot answer a user's question based on the provided context, please inform the user. Do not use any other information to answer the user. Provide a detailed response based on the content of locally trained documents."""
|
17 |
|
|
|
|
|
|
|
18 |
def get_prompt_template(system_prompt=system_prompt, promptTemplate_type=None, history=False):
|
19 |
if promptTemplate_type == "llama":
|
20 |
B_INST, E_INST = "[INST]", "[/INST]"
|
|
|
9 |
|
10 |
# this is specific to Llama-2.
|
11 |
|
12 |
+
# system_prompt = """You are a helpful assistant, you will use the context and documents provided in the training to answer users questions.
|
13 |
+
# Read the context provided before answering questions and think step by step. If you can't answer a user's question based on the
|
14 |
+
# context provided, inform the user. Don't use any other information to answer the user."""
|
15 |
|
16 |
# system_prompt = """You are a helpful assistant, and you will use the context and documents provided in the training to answer users' questions. Please read the context provided carefully before responding to questions and follow a step-by-step thought process. If you cannot answer a user's question based on the provided context, please inform the user. Do not use any other information to answer the user. Provide a detailed response based on the content of locally trained documents."""
|
17 |
|
18 |
+
system_prompt = """It's a useful assistant who will use the context and documents provided in the training to answer users' questions.
|
19 |
+
Read the context provided before answering the questions and think step by step. If you can't answer, just say "I don't know" and don't try to put together an answer to respond to the user."""
|
20 |
+
|
21 |
def get_prompt_template(system_prompt=system_prompt, promptTemplate_type=None, history=False):
|
22 |
if promptTemplate_type == "llama":
|
23 |
B_INST, E_INST = "[INST]", "[/INST]"
|