KvrParaskevi
commited on
Update chatbot.py
Browse files- chatbot.py +3 -4
chatbot.py
CHANGED
@@ -10,7 +10,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfi
|
|
10 |
my_model_id = os.getenv('MODEL_REPO_ID', 'Default Value')
|
11 |
token = os.getenv('HUGGINGFACEHUB_API_TOKEN')
|
12 |
|
13 |
-
template = """
|
14 |
You are an AI having conversation with a human. Below is an instruction that describes a task.
|
15 |
Write a response that appropriately completes the request.
|
16 |
Reply with the most helpful and logic answer. During the conversation you need to ask the user
|
@@ -23,9 +23,8 @@ the following questions to complete the hotel booking task.
|
|
23 |
|
24 |
Make sure you receive a logical answer from the user from every question to complete the hotel
|
25 |
booking process.
|
26 |
-
<</SYS>>
|
27 |
|
28 |
-
|
29 |
{history}
|
30 |
|
31 |
Human: {input}
|
@@ -74,7 +73,7 @@ def demo_chain(input_text, memory):
|
|
74 |
conversation = ConversationChain(
|
75 |
prompt=PROMPT,
|
76 |
llm=llm,
|
77 |
-
verbose=langchain.globals.get_verbose(),
|
78 |
memory=memory
|
79 |
)
|
80 |
|
|
|
10 |
my_model_id = os.getenv('MODEL_REPO_ID', 'Default Value')
|
11 |
token = os.getenv('HUGGINGFACEHUB_API_TOKEN')
|
12 |
|
13 |
+
template = """
|
14 |
You are an AI having conversation with a human. Below is an instruction that describes a task.
|
15 |
Write a response that appropriately completes the request.
|
16 |
Reply with the most helpful and logic answer. During the conversation you need to ask the user
|
|
|
23 |
|
24 |
Make sure you receive a logical answer from the user from every question to complete the hotel
|
25 |
booking process.
|
|
|
26 |
|
27 |
+
Current conversation:
|
28 |
{history}
|
29 |
|
30 |
Human: {input}
|
|
|
73 |
conversation = ConversationChain(
|
74 |
prompt=PROMPT,
|
75 |
llm=llm,
|
76 |
+
#verbose=langchain.globals.get_verbose(),
|
77 |
memory=memory
|
78 |
)
|
79 |
|