Add gpt 4 all model (#131)
Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
1 parent
146f82dcaf
commit
efa156debc
44 files changed
+1321
-1092
No files matched your search
@@ -61,17 +61,15 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
// import { ElInput, ElMessage, ElTooltip, ElUpload } from 'element-plus';
|
||||
import { ElMessage, ElTooltip, ElUpload } from 'element-plus';
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
import { IChatModel } from '@/models';
|
||||
import { getBaseUrlPlatform } from '@/utils';
|
||||
import { CHAT_MODEL_GPT_4_VISION } from '@/constants';
|
||||
import { CHAT_MODEL_GPT_4_ALL, CHAT_MODEL_GPT_4_VISION } from '@/constants';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'InputBox',
|
||||
components: {
|
||||
// ElInput,
|
||||
ElTooltip,
|
||||
FontAwesomeIcon,
|
||||
ElUpload
|
||||
@@ -112,7 +110,7 @@ export default defineComponent({
|
||||
return this.fileList.map((file: UploadFile) => file?.response?.file_url);
|
||||
},
|
||||
canUpload() {
|
||||
return [CHAT_MODEL_GPT_4_VISION.name].includes(this.model.name);
|
||||
return [CHAT_MODEL_GPT_4_VISION.name, CHAT_MODEL_GPT_4_ALL.name].includes(this.model.name);
|
||||
},
|
||||
model(): IChatModel {
|
||||
return this.$store.state.chat.model;
|
||||
@@ -201,7 +199,7 @@ textarea.input:focus {
|
||||
.el-upload-list {
|
||||
position: absolute;
|
||||
width: 400px;
|
||||
bottom: 45px;
|
||||
bottom: 55px;
|
||||
}
|
||||
|
||||
.el-textarea.is-disabled .el-textarea__inner {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="content">
|
||||
<div class="edit-left">
|
||||
<el-tooltip
|
||||
v-if="message.role === 'user' && !isEditing"
|
||||
v-if="message.role === 'user' && !isEditing && !Array.isArray(message.content)"
|
||||
effect="dark"
|
||||
:content="$t('chat.button.edit')"
|
||||
placement="bottom"
|
||||
@@ -36,6 +36,14 @@
|
||||
fit="cover"
|
||||
class="image"
|
||||
/>
|
||||
<span v-if="item.type === 'file_url'" class="file">
|
||||
<font-awesome-icon icon="fa-regular fa-file" class="icon icon-file" />
|
||||
{{
|
||||
typeof item?.file_url === 'string'
|
||||
? item.file_url?.split('/')?.slice(-1)?.[0]
|
||||
: item.file_url?.url?.split('/')?.slice(-1)?.[0]
|
||||
}}
|
||||
</span>
|
||||
<markdown-renderer v-if="item.type === 'text'" :key="index" :content="item.text" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -330,6 +338,16 @@ export default defineComponent({
|
||||
margin: 5px 0;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.file {
|
||||
display: block;
|
||||
margin: 5px 0;
|
||||
border-radius: 10px;
|
||||
padding: 5px 10px;
|
||||
background-color: var(--el-bg-color);
|
||||
color: var(--el-text-color-regular);
|
||||
border: 1px solid var(--el-border-color);
|
||||
font-size: 14px;
|
||||
}
|
||||
.edit-area {
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
@@ -342,6 +360,11 @@ export default defineComponent({
|
||||
justify-content: flex-end;
|
||||
gap: 10px;
|
||||
}
|
||||
.icon-edit {
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
color: var(--el-text-color-regular);
|
||||
}
|
||||
}
|
||||
|
||||
.operations {
|
||||
|
||||
@@ -40,7 +40,8 @@ import {
|
||||
CHAT_MODEL_GPT_3_5_BROWSING,
|
||||
CHAT_MODEL_GPT_4,
|
||||
CHAT_MODEL_GPT_4_BROWSING,
|
||||
CHAT_MODEL_GPT_4_VISION
|
||||
CHAT_MODEL_GPT_4_VISION,
|
||||
CHAT_MODEL_GPT_4_ALL
|
||||
} from '@/constants';
|
||||
|
||||
export default defineComponent({
|
||||
@@ -79,6 +80,11 @@ export default defineComponent({
|
||||
icon: 'fa-solid fa-wand-magic-sparkles',
|
||||
color: '#ce65e6',
|
||||
model: CHAT_MODEL_GPT_4_VISION
|
||||
},
|
||||
{
|
||||
icon: 'fa-solid fa-wand-magic-sparkles',
|
||||
color: '#ce65e6',
|
||||
model: CHAT_MODEL_GPT_4_ALL
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -91,7 +97,8 @@ export default defineComponent({
|
||||
CHAT_MODEL_GPT_3_5_BROWSING,
|
||||
CHAT_MODEL_GPT_4,
|
||||
CHAT_MODEL_GPT_4_BROWSING,
|
||||
CHAT_MODEL_GPT_4_VISION
|
||||
CHAT_MODEL_GPT_4_VISION,
|
||||
CHAT_MODEL_GPT_4_ALL
|
||||
].find((model) => model.name === modelName);
|
||||
return model;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user