diff --git a/.env.development b/.env.development
index 1320e72..4562df8 100644
--- a/.env.development
+++ b/.env.development
@@ -7,5 +7,7 @@ VITE_PUBLIC_PATH=/
#新数据接口
VITE_APP_API_BASE_URL="http://39.101.133.168:8828/link"
+#RAGFlow API
+VITE_APP_RAGFLOW_API_BASE_URL = http://hsy8b7.natappfree.cc/api/v1/chats
# Whether to open mock
VITE_USE_MOCK=true
diff --git a/.env.production b/.env.production
index 5c74376..8b4e9ba 100644
--- a/.env.production
+++ b/.env.production
@@ -9,7 +9,8 @@ VITE_USE_MOCK = true
#新数据接口
VITE_APP_API_BASE_URL = https://api.homilychart.com/link
-
+#RAGFlow API
+VITE_APP_RAGFLOW_API_BASE_URL = http://hsy8b7.natappfree.cc/api/v1/chats
# Whether to enable gzip or brotli compression
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
diff --git a/src/api/sword.js b/src/api/sword.js
index 1ee2cfa..6ea1be6 100644
--- a/src/api/sword.js
+++ b/src/api/sword.js
@@ -2,6 +2,31 @@ import request from '../utils/request'
// 路径
const APIurl = import.meta.env.VITE_APP_API_BASE_URL
+const RAGFlowAPIurl = import.meta.env.VITE_APP_RAGFLOW_API_BASE_URL
+// 创建客服新对话接口
+export const newSessionAPI = function (params) {
+ return request({
+ url: `${APIurl}/api/deepseek/getResponse`,
+ method: 'post',
+ data: new URLSearchParams(params),
+ headers: {
+ Authorization: 'Bearer ragflow-hkNjEwYjcwZjBlMDExZWZiYjYzMDI0Mm'
+ }
+ })
+}
+// 股票代码对话接口
+export const codeAPI = function (params) {
+ return request({
+ url: `${RAGFlowAPIurl}/d107d300f38211ef93e60242ac120003/completions`,
+ method: 'post',
+ data: new URLSearchParams(params.data),
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: 'Bearer ragflow-hkNjEwYjcwZjBlMDExZWZiYjYzMDI0Mm'
+ },
+ body: JSON.stringify({ question: content, stream: true, session_id: params.sessionId.value }) // 设置 stream 为 true
+ })
+}
//统计用户行为接口
export const computedUsersAPI = function (params) {
diff --git a/src/views/chat.vue b/src/views/chat.vue
index 6b3cd77..81fb791 100644
--- a/src/views/chat.vue
+++ b/src/views/chat.vue
@@ -1,87 +1,105 @@
@@ -310,8 +411,8 @@ onMounted(async () => {
-