Skip to content

Commit

Permalink
v2.15.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Dooy committed Feb 4, 2024
1 parent 3e1080a commit 8484dc7
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 12 deletions.
6 changes: 6 additions & 0 deletions changlog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# 功能升级日志

# 计划
# 2.15.2
- 😄 新增: 输入预览 增加md功能 #124
- 🐞 修复: 更新模型logo未变化 #137
- 😄 新增: 模型 `gpt-3.5-turbo-0125`
- 😄 新增: MJ 模型 `niji V6`

# 2.15.1
- 🐞 修复: tts转化在微信内播放有问题 #126 @yoke1990
- 🐞 修复: 自定义GPTs 在vercel 不可使用 #115
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": "chatgpt-web-midjourney-proxy",
"version": "2.15.1",
"version": "2.15.2",
"private": false,
"description": "ChatGPT Web Midjourney Proxy",
"author": "Dooy <[email protected]>",
Expand Down
2 changes: 2 additions & 0 deletions src/api/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { gptConfigStore, gptConfigType } from "@/store";
import { ss } from '@/utils/storage'
import { mlog } from "./mjapi";

export class chatSetting{
private uuid: number;
Expand Down Expand Up @@ -33,6 +34,7 @@ export class chatSetting{
return this.getObjs().findIndex(v=>v.uuid && v.uuid==this.uuid )
}
public save( obj : Partial<gptConfigType>){
mlog("chatsave","gogo")
let sobj ={ ...gptConfigStore.myData , ...obj };
sobj.uuid= this.uuid;
const index = this.findIndex();
Expand Down
2 changes: 1 addition & 1 deletion src/api/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ const getModelMax=( model:string )=>{
model= model.toLowerCase();
if( model.indexOf('8k')>-1 ){
return 8;
}else if( model.indexOf('16k')>-1 || model=='gpt-3.5-turbo-1106' ){
}else if( model.indexOf('16k')>-1 || model=='gpt-3.5-turbo-1106' || model=='gpt-3.5-turbo-0125' ){
return 16;
}else if( model.indexOf('32k')>-1 ){
return 32;
Expand Down
10 changes: 6 additions & 4 deletions src/views/chat/components/Message/Text.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ const wrapClass = computed(() => {
const text = computed(() => {
const value = props.text ?? ''
if (!props.asRawText)
return mdi.render(value)
return value
// if (!props.asRawText)
// return mdi.render(value)
// return value
return mdi.render(value)
})
function highlightBlock(str: string, lang?: string) {
Expand Down Expand Up @@ -126,7 +127,8 @@ onUnmounted(() => {
</template>
</div>
<whisperText v-else-if="text=='whisper' && chat.opt?.lkey " :chat="chat" />
<div v-else class="whitespace-pre-wrap" v-text="text" />
<div v-else class="markdown-body " style="--color-fg-default:#24292f" v-html="text" />
<!-- <div v-else class="whitespace-pre-wrap" v-text="text" /> -->
<MjTextAttr :image="chat.opt?.images[0]" v-if="chat.opt?.images"></MjTextAttr>
<whisperText v-if="chat.model && chat.model.indexOf('whisper')>-1 && chat.opt?.lkey " :isW="true" :chat="chat" class="w-full" />
<ttsText v-if="!inversion && chat.opt?.duration && chat.opt?.duration>0 && chat.opt?.lkey " :isW="true" :chat="chat" class="w-full" />
Expand Down
2 changes: 1 addition & 1 deletion src/views/chat/components/Message/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function handleRegenerate2() {
<AvatarComponent :image="inversion" :logo="chat.logo"/>
</div>
<div class="overflow-hidden text-sm " :class="[inversion ? 'items-end' : 'items-start']">
<p class="text-xs group text-[#b4bbc4] flex justify-start items-center space-x-2 " :class="[inversion ? 'text-right' : 'text-left']">
<p class="text-xs group text-[#b4bbc4] flex items-center space-x-2 " :class="[inversion ? 'justify-end' : 'justify-start']">
<span>{{ dateTime }}</span>
<span v-if="chat.model" class="text-[#b4bbc4]/50">{{ chat.model }}</span>
<!-- <span>{{ chat.opt?.progress }}</span> -->
Expand Down
16 changes: 16 additions & 0 deletions src/views/chat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,15 @@ watch(()=>homeStore.myData.act,(n)=>{
const st =ref({inputme:true});
watch( ()=>loading.value ,(n)=> homeStore.setMyData({isLoader:n }))
const ychat = computed( ()=>{
let text= prompt.value
if (loading.value) text= "";
else {
scrollToBottomIfAtBottom();
}
return { text, dateTime:"预览"} as Chat.Chat;
})
</script>

<template>
Expand Down Expand Up @@ -526,6 +535,13 @@ watch( ()=>loading.value ,(n)=> homeStore.setMyData({isLoader:n }))
:chat="item"
:index="index"
/>
<Message v-if="ychat.text"
:key="dataSources.length" :inversion="true"
date-time="正在输入"
:chat="ychat"
:text="ychat.text"
:index="dataSources.length"
/>
<div class="sticky bottom-0 left-0 flex justify-center">
<NButton v-if="loading" type="warning" @click="handleStop">
<template #icon>
Expand Down
15 changes: 11 additions & 4 deletions src/views/mj/aiGpt.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
import { computed, ref,watch } from 'vue'
import { useRoute } from 'vue-router'
import { useChat } from '../chat/hooks/useChat'
import { gptConfigStore, homeStore, useChatStore } from '@/store'
import { getInitChat, mlog, subModel,getSystemMessage , localSaveAny, canVisionModel, isTTS, subTTS, file2blob, whisperUpload, getHistoryMessage, localGet, checkDisableGpt4, chatSetting } from '@/api'
import { homeStore, useChatStore } from '@/store'
import { getInitChat, mlog, subModel,getSystemMessage , localSaveAny, canVisionModel
,isTTS, subTTS, file2blob, whisperUpload, getHistoryMessage, checkDisableGpt4, chatSetting } from '@/api'
//import { isNumber } from '@/utils/is'
import { useMessage } from "naive-ui";
import { t } from "@/locales";
Expand Down Expand Up @@ -133,8 +134,14 @@ watch(()=>homeStore.myData.act, async (n)=>{
model ,
myid: `${Date.now()}`
}
if(gptConfigStore.myData.gpts){
outMsg.logo= gptConfigStore.myData.gpts.logo ;
// if(gptConfigStore.myData.gpts){
// outMsg.logo= gptConfigStore.myData.gpts.logo ;
// }
// const chatSet = new chatSetting( +st.value.uuid );
// const nGptStore = chatSet.getGptConfig() ;
//chatSet
if( nGptStore.gpts ){
outMsg.logo= nGptStore.gpts.logo ;
}
addChat( +uuid2, outMsg )
st.value.index= dataSources.value.length - 1;
Expand Down
2 changes: 1 addition & 1 deletion src/views/mj/aiModel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const nGptStore = ref( chatSet.getGptConfig() );
const config = ref({
model:[ 'gpt-4-0125-preview','gpt-3.5-turbo',`gpt-4-1106-preview`,`gpt-3.5-turbo-16k`,'gpt-4','gpt-4-0613','gpt-4-32k-0613' ,'gpt-4-32k','gpt-4-32k-0314',`gpt-3.5-turbo-16k-0613`
,`gpt-4-vision-preview`,`gpt-3.5-turbo-1106`
,`gpt-4-vision-preview`,`gpt-3.5-turbo-1106` ,'gpt-3.5-turbo-0125'
,'gpt-3.5-turbo-0301','gpt-3.5-turbo-0613','gpt-4-all','gpt-3.5-net','gemini-pro']
,maxToken:2048
});
Expand Down
3 changes: 3 additions & 0 deletions src/views/mj/draw.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@
}, {
"label": "MJ V5.1",
"value": "--v 5.1"
}, {
"label": "二次元 niji V6",
"value": "--niji 6"
}, {
"label": "二次元 niji V5",
"value": "--niji 5"
Expand Down

0 comments on commit 8484dc7

Please sign in to comment.