Skip to content

Commit

Permalink
Merge branch 'main' into germey/add-redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
Germey authored Aug 30, 2024
2 parents 210a7be + e453968 commit bdb9ca6
Show file tree
Hide file tree
Showing 46 changed files with 1,339 additions and 1,094 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "@acedatacloud/nexior",
"entries": [
{
"date": "Sun, 25 Aug 2024 05:58:27 GMT",
"version": "2.11.13",
"tag": "@acedatacloud/nexior_v2.11.13",
"comments": {
"patch": [
{
"author": "[email protected]",
"package": "@acedatacloud/nexior",
"commit": "efa156debcd0fb923e7aaf50b9fc08247807bbd0",
"comment": "add gpt all experience"
}
]
}
},
{
"date": "Sun, 25 Aug 2024 04:21:24 GMT",
"version": "2.11.12",
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Change Log - @acedatacloud/nexior

This log was last generated on Sun, 25 Aug 2024 04:21:24 GMT and should not be manually modified.
This log was last generated on Sun, 25 Aug 2024 05:58:27 GMT and should not be manually modified.

<!-- Start content -->

## 2.11.13

Sun, 25 Aug 2024 05:58:27 GMT

### Patches

- add gpt all experience ([email protected])

## 2.11.12

Sun, 25 Aug 2024 04:21:24 GMT
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@acedatacloud/nexior",
"version": "2.11.12",
"version": "2.11.13",
"author": "Germey Technology <[email protected]>",
"repository": {
"type": "git",
Expand Down
8 changes: 3 additions & 5 deletions src/components/chat/InputBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
25 changes: 24 additions & 1 deletion src/components/chat/Message.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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>
Expand Down Expand Up @@ -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;
Expand All @@ -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 {
Expand Down
11 changes: 9 additions & 2 deletions src/components/chat/ModelSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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
}
]
};
Expand 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;
}
Expand Down
7 changes: 7 additions & 0 deletions src/constants/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const CHAT_MODEL_NAME_GPT_3_5_BROWSING = 'gpt-3.5-browsing';
export const CHAT_MODEL_NAME_GPT_4 = 'gpt-4';
export const CHAT_MODEL_NAME_GPT_4_BROWSING = 'gpt-4-browsing';
export const CHAT_MODEL_NAME_GPT_4_VISION = 'gpt-4-vision';
export const CHAT_MODEL_NAME_GPT_4_ALL = 'gpt-4-all';

export const CHAT_SERVICE_ID = 'b1fbcc32-e218-4253-9dc3-4fe600a1bfb9';

Expand Down Expand Up @@ -42,3 +43,9 @@ export const CHAT_MODEL_GPT_4_VISION: IChatModel = {
getDisplayName: () => i18n.global.t('chat.model.4Vision'),
getDescription: () => i18n.global.t('chat.model.4VisionDescription')
};

export const CHAT_MODEL_GPT_4_ALL: IChatModel = {
name: CHAT_MODEL_NAME_GPT_4_ALL,
getDisplayName: () => i18n.global.t('chat.model.4All'),
getDescription: () => i18n.global.t('chat.model.4AllDescription')
};
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Loading

0 comments on commit bdb9ca6

Please sign in to comment.