Mon Jul 3 09:01:00 UTC 2023 inscode

上级 d7b9e4cf
...@@ -7,8 +7,10 @@ ...@@ -7,8 +7,10 @@
"preview": "vite preview --port 4173" "preview": "vite preview --port 4173"
}, },
"dependencies": { "dependencies": {
"fetch-event-source": "^1.0.0-alpha.2", "@microsoft/fetch-event-source": "^2.0.1",
"guess": "^1.0.2", "guess": "^1.0.2",
"npm": "^9.7.2",
"tdesign-vue-next": "^1.3.9",
"vue": "^3.2.37" "vue": "^3.2.37"
}, },
"devDependencies": { "devDependencies": {
......
...@@ -103,7 +103,7 @@ import Config from './js/config.js' ...@@ -103,7 +103,7 @@ import Config from './js/config.js'
// import 'markdown-it-vue/dist/markdown-it-vue.css' // import 'markdown-it-vue/dist/markdown-it-vue.css'
// https://github.com/ravenq/markdown-it-vue // https://github.com/ravenq/markdown-it-vue
const DataServe = new Data() // const DataServe = new Data()
export default { export default {
name: 'LlmApp', name: 'LlmApp',
...@@ -273,11 +273,12 @@ export default { ...@@ -273,11 +273,12 @@ export default {
getAppInfo() { getAppInfo() {
const data = Config.getData() const data = Config.getData().data
this.name = data.name this.name = data.name
document.title = this.name document.title = this.name
if (data.ext) { if (data.ext) {
const config = JSON.parse(data.ext) const config = data.ext
debugger
this.config = config this.config = config
if (config.default_prompt) { if (config.default_prompt) {
this.prompt = config.default_prompt this.prompt = config.default_prompt
...@@ -295,7 +296,6 @@ export default { ...@@ -295,7 +296,6 @@ export default {
this.showProfileSetting = config?.show_profile_setting??false this.showProfileSetting = config?.show_profile_setting??false
this.initAIClient() this.initAIClient()
this.initIndexClient()
console.info(config) console.info(config)
} }
}, },
...@@ -356,7 +356,7 @@ export default { ...@@ -356,7 +356,7 @@ export default {
this.id = this.$route?.params?.id this.id = this.$route?.params?.id
this.recoveryHistory() this.recoveryHistory()
this.getAppInfo() this.getAppInfo()
this.getAvatar() // this.getAvatar()
} }
}; };
......
...@@ -8,7 +8,19 @@ export default { ...@@ -8,7 +8,19 @@ export default {
"create_time": 1684920670901, "create_time": 1684920670901,
"app": "llm_rep", "app": "llm_rep",
"resource_type": "app", "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" "message": "success"
} }
......
import { createApp } from 'vue' import { createApp } from 'vue'
import TDesign from 'tdesign-vue-next';
import App from './App.vue' import App from './App.vue'
import 'tdesign-vue-next/es/style/index.css';
import './assets/main.css'
import './style.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.
先完成此消息的编辑!
想要评论请 注册