Spaces:
Runtime error
Runtime error
Commit
·
97419ef
1
Parent(s):
5d40f7a
update prompt
Browse files
app.py
CHANGED
|
@@ -480,7 +480,7 @@ prompt = ZeroShotAgent.create_prompt(
|
|
| 480 |
# input_variables=["input", "chat_history", "agent_scratchpad"]
|
| 481 |
)
|
| 482 |
|
| 483 |
-
|
| 484 |
"""
|
| 485 |
You are a helpful AI assistant. Your mission is to answer the following request as best as you can with detail information and explanation.
|
| 486 |
You must always check vector database first and try to answer the request based on the information in vector database only.
|
|
@@ -490,6 +490,12 @@ prompthead_openai_OR = \
|
|
| 490 |
"""
|
| 491 |
You are a helpful AI assistant.
|
| 492 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 493 |
|
| 494 |
prompt_openai = OpenAIMultiFunctionsAgent.create_prompt(
|
| 495 |
system_message = SystemMessage(
|
|
@@ -935,11 +941,11 @@ def QAQuery_p(question: str):
|
|
| 935 |
res = qa({"query": question})
|
| 936 |
|
| 937 |
print("-" * 20)
|
| 938 |
-
print("Question:", question)
|
| 939 |
# print("Answer:", res)
|
| 940 |
-
print("Answer:", res['result'])
|
| 941 |
print("-" * 20)
|
| 942 |
-
print("Source:", res['source_documents'])
|
| 943 |
response = res['result']
|
| 944 |
# response = res['source_documents']
|
| 945 |
source = res['source_documents']
|
|
|
|
| 480 |
# input_variables=["input", "chat_history", "agent_scratchpad"]
|
| 481 |
)
|
| 482 |
|
| 483 |
+
prompthead_openai_1 = \
|
| 484 |
"""
|
| 485 |
You are a helpful AI assistant. Your mission is to answer the following request as best as you can with detail information and explanation.
|
| 486 |
You must always check vector database first and try to answer the request based on the information in vector database only.
|
|
|
|
| 490 |
"""
|
| 491 |
You are a helpful AI assistant.
|
| 492 |
"""
|
| 493 |
+
prompthead_openai = \
|
| 494 |
+
"""
|
| 495 |
+
You are a helpful AI assistant. Your mission is to answer the following request as best as you can with detail information and explanation.
|
| 496 |
+
You must always check vector database first. The information in vector database can override the information found in any other tools.
|
| 497 |
+
"""
|
| 498 |
+
|
| 499 |
|
| 500 |
prompt_openai = OpenAIMultiFunctionsAgent.create_prompt(
|
| 501 |
system_message = SystemMessage(
|
|
|
|
| 941 |
res = qa({"query": question})
|
| 942 |
|
| 943 |
print("-" * 20)
|
| 944 |
+
# print("Question:", question)
|
| 945 |
# print("Answer:", res)
|
| 946 |
+
# print("Answer:", res['result'])
|
| 947 |
print("-" * 20)
|
| 948 |
+
# print("Source:", res['source_documents'])
|
| 949 |
response = res['result']
|
| 950 |
# response = res['source_documents']
|
| 951 |
source = res['source_documents']
|