Update app.py
Browse files
app.py
CHANGED
|
@@ -30,8 +30,7 @@ llm = HuggingFaceEndpoint(
|
|
| 30 |
def chat_template_prompt():
|
| 31 |
template = """
|
| 32 |
Do not repeat questions and do not generate answer for user/human.Do not repeat yourself and do not create/generate dialogues.
|
| 33 |
-
|
| 34 |
-
You are a helpful hotel booking asssitant and you generate a response only for the assistant.
|
| 35 |
Below is an instruction that describes a task. During the conversation you need to ask the user
|
| 36 |
the following questions to complete the hotel booking task. After each of the following questions you wait for the response by the user.
|
| 37 |
1) Where would you like to stay and when?
|
|
@@ -46,7 +45,9 @@ def chat_template_prompt():
|
|
| 46 |
"""
|
| 47 |
|
| 48 |
system_prompt = SystemMessagePromptTemplate.from_template(template)
|
| 49 |
-
human_prompt = HumanMessagePromptTemplate.from_template("
|
|
|
|
|
|
|
| 50 |
chat_prompt = ChatPromptTemplate.from_messages([system_prompt, human_prompt])
|
| 51 |
return chat_prompt
|
| 52 |
|
|
|
|
| 30 |
def chat_template_prompt():
|
| 31 |
template = """
|
| 32 |
Do not repeat questions and do not generate answer for user/human.Do not repeat yourself and do not create/generate dialogues.
|
| 33 |
+
|
|
|
|
| 34 |
Below is an instruction that describes a task. During the conversation you need to ask the user
|
| 35 |
the following questions to complete the hotel booking task. After each of the following questions you wait for the response by the user.
|
| 36 |
1) Where would you like to stay and when?
|
|
|
|
| 45 |
"""
|
| 46 |
|
| 47 |
system_prompt = SystemMessagePromptTemplate.from_template(template)
|
| 48 |
+
human_prompt = HumanMessagePromptTemplate.from_template("""You are a helpful hotel booking asssitant that replies to the
|
| 49 |
+
user's input and you generate a response only for the assistant.
|
| 50 |
+
{input}""")
|
| 51 |
chat_prompt = ChatPromptTemplate.from_messages([system_prompt, human_prompt])
|
| 52 |
return chat_prompt
|
| 53 |
|