diff --git a/api/swagger.yaml b/api/swagger.yaml index eee6bc4..c1892f3 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -80,6 +80,8 @@ definitions: type: string owner: type: string + prompt: + type: string updated_at: type: string user_id: @@ -409,6 +411,9 @@ definitions: name: maxLength: 30 type: string + prompt: + maxLength: 1024 + type: string required: - name type: object @@ -472,6 +477,9 @@ definitions: name: maxLength: 30 type: string + prompt: + maxLength: 1024 + type: string required: - name type: object diff --git a/src/api/api.ts b/src/api/api.ts index aeebb27..ee9a83e 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -949,6 +949,12 @@ export interface EntityChat { * @memberof EntityChat */ 'owner'?: string; + /** + * + * @type {string} + * @memberof EntityChat + */ + 'prompt'?: string; /** * * @type {string} @@ -1665,6 +1671,12 @@ export interface SchemaChatCreateRequest { * @memberof SchemaChatCreateRequest */ 'name': string; + /** + * + * @type {string} + * @memberof SchemaChatCreateRequest + */ + 'prompt'?: string; } /** * @@ -1790,6 +1802,12 @@ export interface SchemaChatUpdateRequest { * @memberof SchemaChatUpdateRequest */ 'name': string; + /** + * + * @type {string} + * @memberof SchemaChatUpdateRequest + */ + 'prompt'?: string; } /** * diff --git a/src/components/settings/ChatSettings.vue b/src/components/settings/ChatSettings.vue index fd57be8..ca413ce 100644 --- a/src/components/settings/ChatSettings.vue +++ b/src/components/settings/ChatSettings.vue @@ -4,7 +4,9 @@ v-for="c in chatStore.chats" :key="c.id" :class=" - c.id === chatStore.currentChat?.id ? ' bg-gray-100 dark:bg-gray-700' : '' + c.id === chatStore.currentChat?.id + ? ' bg-gray-100 dark:bg-gray-700' + : '' " @click="viewChat(c.id ?? 0)" > @@ -71,6 +73,14 @@ /> + + + + 更新 @@ -142,6 +152,7 @@ const editChatPost = async () => { await getApi().Chat.apiV1ChatsIdPut(currentChatId.value, { name: currentChat.value?.name ?? "", assistant_id: currentChat.value?.assistant_id, + prompt: currentChat.value?.prompt ?? "", }); await getChats(); };