| | |
| | | </div> |
| | | <div class="cursor-pointer"> |
| | | <span class="mr-1 changeBatch" @click="batchChange">换一批</span> |
| | | <i class="iconfont icon-shuaxin"></i> |
| | | <i class="myiconfont icon-shuaxin"></i> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | import { computed, onMounted, reactive, ref } from 'vue'; |
| | | import { getSelectSample } from '/@/api/ai/chat'; |
| | | import { activeRoomId, activeSampleId, activeSectionAId, setRoomConfig } from '/@/stores/chatRoom'; |
| | | import emitter from '/@/utils/mitt'; |
| | | let state = reactive({ |
| | | exampleContent: [], |
| | | exampleRandomContent: [], |
| | |
| | | const exampleList = ref([]); //模版列表 |
| | | const emits = defineEmits<{ |
| | | (event: 'advanceExampleClick', data): void; |
| | | (event:'updateChatInput',val):void; |
| | | (event: 'updateChatInput', val): void; |
| | | }>(); |
| | | onMounted(() => { |
| | | getSelectListSample(); |
| | |
| | | }); |
| | | //获取模版列表 |
| | | const getSelectListSample = async () => { |
| | | const res = await getSelectSample({ |
| | | section_b_id: '', |
| | | }); |
| | | // console.log(res, 63); |
| | | const res = await getSelectSample({}); |
| | | state.exampleRandomContent = res.samples; |
| | | |
| | | const array = []; |
| | |
| | | }; |
| | | |
| | | const changeExample = (item) => { |
| | | emits('updateChatInput',item.sample_question) |
| | | emits('updateChatInput', item.sample_question); |
| | | setRoomConfig(activeRoomId.value, 'isAnswerByLLM', false); |
| | | activeSampleId.value = item.sample_id; |
| | | activeSectionAId.value = item.section_a_id; |