ai-chat-bot-interface 1.6.15 → 1.6.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ai-chat-bot-interface",
3
3
  "private": false,
4
- "version": "1.6.15",
4
+ "version": "1.6.17",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "description": "A AI chat bot interface. (private)",
package/src/App.vue CHANGED
@@ -24,6 +24,7 @@ const handleLog = (log) => {
24
24
  ]"
25
25
  :need-log="true"
26
26
  content-type="markdown"
27
+ first-msg="你好"
27
28
  @log="handleLog"
28
29
  />
29
30
  </div>
package/src/ChatUi.vue CHANGED
@@ -355,7 +355,32 @@ onMounted(async () => {
355
355
  } else {
356
356
  await createConv();
357
357
  if (props.firstMsg) {
358
- await chatConv([{ content: props.firstMsg, text: props.firstMsg }]);
358
+ // await chatConv([{ content: props.firstMsg, text: props.firstMsg }]);
359
+ historyList.value = [
360
+ {
361
+ conversation_id: '',
362
+ bot_id: props.botId,
363
+ role: 'user',
364
+ content: props.firstMsg,
365
+ reasoning_content: '',
366
+ status: 'ended',
367
+ extra: [],
368
+ },
369
+ {
370
+ conversation_id: '',
371
+ bot_id: props.botId,
372
+ role: 'assistant',
373
+ content:
374
+ '你好!请提供你的身高、年龄、体重、性别、日常运动水平等身体数据,以及口味偏好、饮食禁忌、疾病史等信息,我会为你制定饮食方案和提供配餐信息。',
375
+ reasoning_content: '',
376
+ status: 'ended',
377
+ extra: [
378
+ {
379
+ showType: 'personalForm',
380
+ },
381
+ ],
382
+ },
383
+ ];
359
384
  }
360
385
  }
361
386
  scrollToEnd();
@@ -102,7 +102,7 @@
102
102
  import { computed, onMounted, ref } from 'vue';
103
103
  import { api as viewerApi } from 'v-viewer';
104
104
  import 'viewerjs/dist/viewer.css';
105
- import ArrowRight from '@/components/icons/ArrowRight.vue';
105
+ import ArrowRight from './icons/ArrowRight.vue';
106
106
 
107
107
  const props = defineProps({
108
108
  info: {
@@ -100,7 +100,7 @@ const pfForm = ref([
100
100
  {
101
101
  key: 'sport',
102
102
  label: '日常运动水平',
103
- value: '',
103
+ value: '轻体力',
104
104
  placeholder: '请输入',
105
105
  required: true,
106
106
  },
@@ -110,7 +110,7 @@ const pfForm = ref([
110
110
  value: '',
111
111
  taste: [],
112
112
  taboo: [],
113
- placeholder: '请输入',
113
+ placeholder: '无忌口',
114
114
  required: false,
115
115
  },
116
116
  ]);
@@ -332,7 +332,7 @@ const selectSex = (item) => {
332
332
  :class="{ disabled: !isValid }"
333
333
  @click.stop="handleSubmit"
334
334
  >
335
- 按身体数据领取7天食谱
335
+ 按身体数据领取食谱
336
336
  </div>
337
337
  </div>
338
338