diff --git a/src/pages/assistants/[id]/edit.vue b/src/pages/assistants/[id]/edit.vue
index b8cf081..ec200b8 100644
--- a/src/pages/assistants/[id]/edit.vue
+++ b/src/pages/assistants/[id]/edit.vue
@@ -71,7 +71,7 @@
主页地址: {{ tool.data?.homepage_url }}
- 绑定
+ 绑定
@@ -157,7 +157,7 @@ function refresh() {
getBindedTools();
}
-function bindTool(toolId: string) {
+function bindTool(toolId: Number | undefined) {
api.Assistant.apiV1AssistantsIdToolsToolIdPost(assistantId, Number(toolId))
.then(() => {
refresh();
diff --git a/src/pages/assistants/[id]/shares.vue b/src/pages/assistants/[id]/shares.vue
index 934fa42..149b0f6 100644
--- a/src/pages/assistants/[id]/shares.vue
+++ b/src/pages/assistants/[id]/shares.vue
@@ -26,8 +26,8 @@
API Key: {{ s.token }}
- 访问
- 删除
+ 访问
+ 删除
@@ -78,7 +78,7 @@ function createShare() {
});
}
-function deleteShare(shareId: string) {
+function deleteShare(shareId: string | undefined | Number) {
api.Assistant.apiV1AssistantsIdSharesShareIdDelete(
assistantId,
Number(shareId),
diff --git a/src/pages/assistants/index.vue b/src/pages/assistants/index.vue
index 7e64fbb..a07f765 100644
--- a/src/pages/assistants/index.vue
+++ b/src/pages/assistants/index.vue
@@ -22,14 +22,14 @@
Phone: {{ assistant.phone }}
-->
-
+
对话
- 编辑
- 删除
@@ -88,7 +88,7 @@ const deleteResult = ref({
message: "",
});
-function deleteAssistant(assistantId: string) {
+function deleteAssistant(assistantId: string | undefined | number) {
selectedAssistantId.value = Number(assistantId);
dialog.value = true;
}
@@ -107,11 +107,11 @@ function deleteAssistantConfirmed() {
refresh();
}
-function editAssistant(assistantId: string) {
+function editAssistant(assistantId: string | undefined | number) {
router.push(`/assistants/${assistantId}/edit`);
}
-function showChats(assistantId: string) {
+function showChats(assistantId: string | undefined | number) {
router.push(`/assistants/${assistantId}/chats`);
}
diff --git a/src/pages/chats/[id]/index.vue b/src/pages/chats/[id]/index.vue
index 8985bfd..d11370b 100644
--- a/src/pages/chats/[id]/index.vue
+++ b/src/pages/chats/[id]/index.vue
@@ -93,6 +93,7 @@ function sendMessage() {
toolError.value = false;
api.ChatMessage.apiV1ChatsIdMessagesPost(chatId, {
message: input.value,
+ role: "user",
})
.then((res) => {
const newMessage = {
diff --git a/src/pages/ping/index.vue b/src/pages/ping/index.vue
deleted file mode 100644
index 000f1ad..0000000
--- a/src/pages/ping/index.vue
+++ /dev/null
@@ -1,20 +0,0 @@
-
- Ping 与服务器连通性测试
-
- Greet
-
-
- 服务器回应:{{ response }}
-
-
-
diff --git a/src/pages/public_chat/index.vue b/src/pages/public_chat/index.vue
index 7f4601a..0e6aefc 100644
--- a/src/pages/public_chat/index.vue
+++ b/src/pages/public_chat/index.vue
@@ -127,6 +127,7 @@ function sendMessage() {
message: input.value,
assistant_token: publicChatInfo.value.assistant_token,
guest_id: publicChatStore.guest_id,
+ role: "user",
})
.then((res) => {
const newMessage = {