From 9866a2a8e162ddf5a9f5e3304783f7ff89313b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=94=E5=BA=86=E6=89=8D=E4=B8=A8=E9=9D=99=E8=A7=85?= Date: Fri, 5 Apr 2024 14:39:40 +0800 Subject: [PATCH] Add round style for button and fix model name (#17) Co-authored-by: Germey --- ...-828cf724-b2d2-4b08-9653-8b2b1cb7c267.json | 7 +++++ src/components/chat/ModelSelector.vue | 10 ++++++- src/pages/chat/Conversation.vue | 9 +------ src/pages/console/application/List.vue | 2 +- src/pages/console/order/Detail.vue | 4 +-- src/pages/console/order/List.vue | 26 ++++++++++--------- src/pages/distribution/Index.vue | 10 +++---- src/pages/midjourney/History.vue | 2 +- src/pages/midjourney/Index.vue | 2 +- 9 files changed, 41 insertions(+), 31 deletions(-) create mode 100644 change/@acedatacloud-hub-828cf724-b2d2-4b08-9653-8b2b1cb7c267.json diff --git a/change/@acedatacloud-hub-828cf724-b2d2-4b08-9653-8b2b1cb7c267.json b/change/@acedatacloud-hub-828cf724-b2d2-4b08-9653-8b2b1cb7c267.json new file mode 100644 index 00000000..57c69177 --- /dev/null +++ b/change/@acedatacloud-hub-828cf724-b2d2-4b08-9653-8b2b1cb7c267.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix wrong model name", + "packageName": "@acedatacloud/hub", + "email": "germey@acedata.cloud", + "dependentChangeType": "patch" +} diff --git a/src/components/chat/ModelSelector.vue b/src/components/chat/ModelSelector.vue index f6add6f5..241b8fa3 100644 --- a/src/components/chat/ModelSelector.vue +++ b/src/components/chat/ModelSelector.vue @@ -97,7 +97,15 @@ export default defineComponent({ }, computed: { model() { - return this.$store.state.chat.model; + const modelName = this.$store.state.chat.model.name; + const model = [ + CHAT_MODEL_GPT_3_5, + CHAT_MODEL_GPT_3_5_BROWSING, + CHAT_MODEL_GPT_4, + CHAT_MODEL_GPT_4_BROWSING, + CHAT_MODEL_GPT_4_VISION + ].find((model) => model.name === modelName); + return model; } }, methods: { diff --git a/src/pages/chat/Conversation.vue b/src/pages/chat/Conversation.vue index 0905b89a..78f3afed 100644 --- a/src/pages/chat/Conversation.vue +++ b/src/pages/chat/Conversation.vue @@ -40,14 +40,7 @@ import axios from 'axios'; import { defineComponent } from 'vue'; import Message from '@/components/chat/Message.vue'; import { ROLE_ASSISTANT, ROLE_USER } from '@/constants'; -import { - IChatModel, - IApplication, - IChatMessageState, - IChatConversationResponse, - IChatConversation, - IChatMessage -} from '@/models'; +import { IChatModel, IChatMessageState, IChatConversationResponse, IChatConversation, IChatMessage } from '@/models'; import InputBox from '@/components/chat/InputBox.vue'; import ModelSelector from '@/components/chat/ModelSelector.vue'; import { ERROR_CODE_CANCELED, ERROR_CODE_NOT_APPLIED, ERROR_CODE_UNKNOWN } from '@/constants/errorCode'; diff --git a/src/pages/console/application/List.vue b/src/pages/console/application/List.vue index f269b63f..3da44bc8 100644 --- a/src/pages/console/application/List.vue +++ b/src/pages/console/application/List.vue @@ -52,7 +52,7 @@ - - - - - - - + - + + + + + + +