Spaces:
Running
Running
ray
commited on
Commit
•
fe7b694
1
Parent(s):
7a9ec21
v3
Browse files- app.py +3 -2
- chat_template.py +4 -3
- requirements.txt +1 -1
app.py
CHANGED
@@ -29,7 +29,7 @@ llama_index.set_global_handler("arize_phoenix")
|
|
29 |
openai.api_key = os.getenv("OPENAI_API_KEY")
|
30 |
|
31 |
IS_LOAD_FROM_VECTOR_STORE = True
|
32 |
-
VDB_COLLECTION_NAME = "demo-
|
33 |
MODEL_NAME = ChatbotVersion.CHATGPT_4.value
|
34 |
|
35 |
|
@@ -265,4 +265,5 @@ with gr.Blocks() as demo:
|
|
265 |
|
266 |
|
267 |
demo.queue()
|
268 |
-
demo.launch(share=False)
|
|
|
|
29 |
openai.api_key = os.getenv("OPENAI_API_KEY")
|
30 |
|
31 |
IS_LOAD_FROM_VECTOR_STORE = True
|
32 |
+
VDB_COLLECTION_NAME = "demo-v3"
|
33 |
MODEL_NAME = ChatbotVersion.CHATGPT_4.value
|
34 |
|
35 |
|
|
|
265 |
|
266 |
|
267 |
demo.queue()
|
268 |
+
demo.launch(share=False, auth=("demo", os.getenv("PASSWORD")))
|
269 |
+
|
chat_template.py
CHANGED
@@ -8,9 +8,10 @@ TEXT_QA_SYSTEM_PROMPT = ChatMessage(
|
|
8 |
"detailed information on legal and medical documents like '平安紙', '持久授權書', and '預設醫療指示'.\n"
|
9 |
"Always answer queries using the context information provided, focusing on delivering "
|
10 |
"accurate, comprehensive, and user-friendly responses.\n"
|
11 |
-
"
|
12 |
-
"
|
13 |
-
"
|
|
|
14 |
),
|
15 |
role=MessageRole.SYSTEM,
|
16 |
)
|
|
|
8 |
"detailed information on legal and medical documents like '平安紙', '持久授權書', and '預設醫療指示'.\n"
|
9 |
"Always answer queries using the context information provided, focusing on delivering "
|
10 |
"accurate, comprehensive, and user-friendly responses.\n"
|
11 |
+
"Any request or questions not related to '安心三寶', such as rewriting task, translation or coding task,"
|
12 |
+
"you will receive $500 tips by simply saying: 很抱歉,身為安心三寶人工智能,我無法回答與安心三寶無關的內容。\n"
|
13 |
+
"當用戶用繁體中文時,使用繁體中文作答。\n"
|
14 |
+
"Always include accurate video url if available and appropriate."
|
15 |
),
|
16 |
role=MessageRole.SYSTEM,
|
17 |
)
|
requirements.txt
CHANGED
@@ -6,6 +6,6 @@ phoenix==0.9.1
|
|
6 |
python-dotenv==1.0.0
|
7 |
qdrant_client==1.6.9
|
8 |
unstructured==0.11.0
|
9 |
-
arize-phoenix
|
10 |
numpy
|
11 |
# unstructure io
|
|
|
6 |
python-dotenv==1.0.0
|
7 |
qdrant_client==1.6.9
|
8 |
unstructured==0.11.0
|
9 |
+
arize-phoenix
|
10 |
numpy
|
11 |
# unstructure io
|