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
package/src/App.vue
CHANGED
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 '
|
|
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
|
-
|
|
335
|
+
按身体数据领取食谱
|
|
336
336
|
</div>
|
|
337
337
|
</div>
|
|
338
338
|
|