@@ -192,7 +226,7 @@ import { useChatStore } from "@/stores/chat";
import { ref } from "vue";
import {
EntityAssistant,
- EntityAssistantShare,
+ EntityAssistantKey,
EntityAssistantTool,
EntityLibrary,
EntityTool,
@@ -210,7 +244,7 @@ const currentAssistant: Ref = ref({});
const assistants: Ref = ref([]);
const librarySelects: any = ref([]);
const libraries: Ref = ref([]);
-const assistantShares: Ref = ref([]);
+const assistantApiKeys: Ref = ref([]);
const isMobile = useIsMobile();
const drawerWidth = computed(() => {
@@ -246,7 +280,7 @@ const showEditAssistant = async (id: number) => {
currentAssistantId.value = id;
currentAssistant.value =
(await getApi().Assistant.apiV1AssistantsIdGet(id)).data.data ?? {};
- await getAssistantsShares();
+ await getAssistantsKeys();
getTools();
};
@@ -257,7 +291,7 @@ const editAssistant = async () => {
currentAssistant.value
);
await getAssistants();
- await getAssistantsShares();
+ await getAssistantsKeys();
};
const getTools = async () => {
@@ -308,28 +342,26 @@ const getAssistants = async () => {
(await getApi().Assistant.apiV1AssistantsGet()).data.data ?? [];
};
-const getAssistantsShares = async () => {
- assistantShares.value =
+const getAssistantsKeys = async () => {
+ assistantApiKeys.value =
(
- await getApi().Assistant.apiV1AssistantsIdSharesGet(
+ await getApi().Assistant.apiV1AssistantsIdKeysGet(
currentAssistantId.value
)
).data.data ?? [];
};
-const createAssistantShare = async () => {
- await getApi().Assistant.apiV1AssistantsIdSharesPost(
- currentAssistantId.value
- );
- await getAssistantsShares();
+const createAssistantKey = async () => {
+ await getApi().Assistant.apiV1AssistantsIdKeysPost(currentAssistantId.value);
+ await getAssistantsKeys();
};
-const deleteAssistantShare = async (id: number) => {
- await getApi().Assistant.apiV1AssistantsIdSharesShareIdDelete(
+const deleteAssistantKey = async (id: number) => {
+ await getApi().Assistant.apiV1AssistantsIdKeysKeyIdDelete(
currentAssistantId.value,
id
);
- await getAssistantsShares();
+ await getAssistantsKeys();
};
getChats();