Spaces:
Sleeping
Sleeping
Adrian Cowham
commited on
Commit
•
8c14b99
1
Parent(s):
203ad1c
do not rephrase the question
Browse files- src/app.py +2 -1
src/app.py
CHANGED
@@ -23,7 +23,7 @@ K = 5
|
|
23 |
USE_VERBOSE = True
|
24 |
API_KEY = os.environ["OPENAI_API_KEY"]
|
25 |
system_template = """
|
26 |
-
|
27 |
"I'm sorry, but I can't find the answer to your question in, the book Freakonomics."
|
28 |
|
29 |
Here is the context:
|
@@ -93,6 +93,7 @@ def load_chain(inputs = None):
|
|
93 |
memory=AnswerConversationBufferMemory(memory_key="chat_history", return_messages=True),
|
94 |
verbose=USE_VERBOSE,
|
95 |
combine_docs_chain_kwargs={"prompt": qa_prompt})
|
|
|
96 |
return chain
|
97 |
|
98 |
with gr.Blocks() as block:
|
|
|
23 |
USE_VERBOSE = True
|
24 |
API_KEY = os.environ["OPENAI_API_KEY"]
|
25 |
system_template = """
|
26 |
+
You are a helpful assistant responding to inqueries about the content of the book Freakonomics, by Steven D. Levitt and Stephen J. Dubner. The context below contains excerpts from the book. You must only use the information in the context below to formulate your responses. If there is not enough information in the context to formulate a response, you must respond with
|
27 |
"I'm sorry, but I can't find the answer to your question in, the book Freakonomics."
|
28 |
|
29 |
Here is the context:
|
|
|
93 |
memory=AnswerConversationBufferMemory(memory_key="chat_history", return_messages=True),
|
94 |
verbose=USE_VERBOSE,
|
95 |
combine_docs_chain_kwargs={"prompt": qa_prompt})
|
96 |
+
chain.rephrase_question = False
|
97 |
return chain
|
98 |
|
99 |
with gr.Blocks() as block:
|