Mon Jul 3 09:01:00 UTC 2023 inscode

上级 d7b9e4cf
......@@ -7,8 +7,10 @@
"preview": "vite preview --port 4173"
},
"dependencies": {
"fetch-event-source": "^1.0.0-alpha.2",
"@microsoft/fetch-event-source": "^2.0.1",
"guess": "^1.0.2",
"npm": "^9.7.2",
"tdesign-vue-next": "^1.3.9",
"vue": "^3.2.37"
},
"devDependencies": {
......
......@@ -103,7 +103,7 @@ import Config from './js/config.js'
// import 'markdown-it-vue/dist/markdown-it-vue.css'
// https://github.com/ravenq/markdown-it-vue
const DataServe = new Data()
// const DataServe = new Data()
export default {
name: 'LlmApp',
......@@ -273,11 +273,12 @@ export default {
getAppInfo() {
const data = Config.getData()
const data = Config.getData().data
this.name = data.name
document.title = this.name
if (data.ext) {
const config = JSON.parse(data.ext)
const config = data.ext
debugger
this.config = config
if (config.default_prompt) {
this.prompt = config.default_prompt
......@@ -295,7 +296,6 @@ export default {
this.showProfileSetting = config?.show_profile_setting??false
this.initAIClient()
this.initIndexClient()
console.info(config)
}
},
......@@ -356,7 +356,7 @@ export default {
this.id = this.$route?.params?.id
this.recoveryHistory()
this.getAppInfo()
this.getAvatar()
// this.getAvatar()
}
};
......
......@@ -8,7 +8,19 @@ export default {
"create_time": 1684920670901,
"app": "llm_rep",
"resource_type": "app",
"ext": "{\"mode\": \"chat\", \"model\": \"chatglm2-6b\", \"api_url\": \"https://gpu-pod647d498393e106496a046e94-8000.node.inscode.run/v1\", \"api_type\": \"openai\", \"robot_img\": null, \"api_max_token\": \"2048\", \"default_prompt\": \"请翻译成英文:你是谁?\", \"max_request_len\": \"10000\", \"prompt_template\": \"\", \"api_prompt_prefix\": \"\", \"show_profile_setting\": false}"
"ext": {
"mode":"chat",
"model":"vicuna-7b-all-v1.1",
"api_url":"https://gpu-pod647d498393e106496a046e94-8000.node.inscode.run/v1",
"api_type":"openai",
"robot_img":null,
"api_max_token":"2048",
"default_prompt":"请翻译成英文:你是谁?",
"max_request_len":"10000",
"prompt_template":"",
"api_prompt_prefix":"",
"show_profile_setting":false
}
},
"message": "success"
}
......
import { createApp } from 'vue'
import TDesign from 'tdesign-vue-next';
import App from './App.vue'
import 'tdesign-vue-next/es/style/index.css';
import './assets/main.css'
import './style.css'
createApp(App).mount('#app')
const app = createApp(App);
app.use(TDesign);
app.mount('#app')
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册