Spaces:
Sleeping
Sleeping
change name
Browse files
app.py
CHANGED
|
@@ -66,7 +66,7 @@ collection = chroma_client.get_or_create_collection(name="insurance_database", e
|
|
| 66 |
########################################
|
| 67 |
# Streamlit 介面配置
|
| 68 |
########################################
|
| 69 |
-
st.title("💬
|
| 70 |
st.write("🔍 與 AI 互動,詢問保險相關問題。")
|
| 71 |
|
| 72 |
# 自訂背景
|
|
@@ -101,7 +101,7 @@ if "chat" not in st.session_state:
|
|
| 101 |
{
|
| 102 |
"role": "model",
|
| 103 |
"parts": [(
|
| 104 |
-
"背景設定:
|
| 105 |
"你可以使用知識庫中儲存的保險內容作為專業知識,回答使用者問題。"
|
| 106 |
"也能根據使用者提供的個人資訊推薦客製化保險方案。"
|
| 107 |
"若資訊不足或無法找到答案,請直接說明無法回答。"
|
|
@@ -149,7 +149,7 @@ if st.button("送出"):
|
|
| 149 |
response = chat.send_message(user_message)
|
| 150 |
|
| 151 |
# 顯示回應
|
| 152 |
-
st.markdown(f"### 🤖
|
| 153 |
|
| 154 |
# 更新 chat 狀態
|
| 155 |
st.session_state.chat = chat
|
|
|
|
| 66 |
########################################
|
| 67 |
# Streamlit 介面配置
|
| 68 |
########################################
|
| 69 |
+
st.title("💬 InsureGPT保險顧問")
|
| 70 |
st.write("🔍 與 AI 互動,詢問保險相關問題。")
|
| 71 |
|
| 72 |
# 自訂背景
|
|
|
|
| 101 |
{
|
| 102 |
"role": "model",
|
| 103 |
"parts": [(
|
| 104 |
+
"背景設定: 你是一位精通台灣保險法規與保險商品的專業顧問,名字叫做InsureGPT。"
|
| 105 |
"你可以使用知識庫中儲存的保險內容作為專業知識,回答使用者問題。"
|
| 106 |
"也能根據使用者提供的個人資訊推薦客製化保險方案。"
|
| 107 |
"若資訊不足或無法找到答案,請直接說明無法回答。"
|
|
|
|
| 149 |
response = chat.send_message(user_message)
|
| 150 |
|
| 151 |
# 顯示回應
|
| 152 |
+
st.markdown(f"### 🤖 InsureGPT 回應:\n{response.text}")
|
| 153 |
|
| 154 |
# 更新 chat 狀態
|
| 155 |
st.session_state.chat = chat
|