| | |
| | | <Upload |
| | | :action="uploadAction" |
| | | :limit="1" |
| | | :url="httpUrl + form.icon" |
| | | :url="form.icon ? httpUrl + form.icon : ''" |
| | | @update:fileList="updateFileList" |
| | | @success="handleSuccess" |
| | | ></Upload> |
| | |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import { onMounted, onBeforeMount, reactive, ref, nextTick } from "vue"; |
| | | import { onMounted, onBeforeMount, reactive, ref, nextTick, onUnmounted } from "vue"; |
| | | import { kbdocumentupload, queryKbList, queryModelList } from "@/api/kbList"; |
| | | import useLoading from "@/hooks/loading"; |
| | | import { Message } from "@arco-design/web-vue"; |
| | |
| | | let frequency_penalty = ref(true); |
| | | let max_tokens = ref(true); |
| | | const httpUrl = localStorage.getItem('httpUrl'); |
| | | let avatarShow = ref(false); |
| | | |
| | | const height = ref('calc(500px)'); |
| | | const props = defineProps(['typeAngint', 'formData']); |
| | |
| | | formRef.value.resetFields(); |
| | | formRef1.value.resetFields(); |
| | | formRef2.value.resetFields(); |
| | | nextTick(()=>{ |
| | | if(props.typeAngint=='add'){ |
| | | form.name = ""; |
| | | form.icon = ""; |
| | | form.prompt_config.system = "你是一个智能助手,请总结知识库的内容来回答问题,请列举知识库中的数据详细回答。当所有知识库内容都与问题无关时,你的回答必须包括“知识库中未找到您要的答案!”这句话。" + |
| | | "回答需要考虑聊天历史。\n 以下是知识库:\n {knowledge}\n 以上是知识库。"; |
| | | |
| | | if(props.typeAngint=='add'){ |
| | | form.name = ""; |
| | | form.prompt_config.system = "你是一个智能助手,请总结知识库的内容来回答问题,请列举知识库中的数据详细回答。当所有知识库内容都与问题无关时,你的回答必须包括“知识库中未找到您要的答案!”这句话。" + |
| | | "回答需要考虑聊天历史。\n 以下是知识库:\n {knowledge}\n 以上是知识库。"; |
| | | } |
| | | } |
| | | console.log(form,'新建智能体弹窗'); |
| | | avatarShow.value = false; |
| | | setTimeout(() => { |
| | | avatarShow.value = true; |
| | | },100); |
| | | }) |
| | | |
| | | }; |
| | | |
| | |
| | | onMounted(() => {}); |
| | | |
| | | |
| | | onUnmounted(()=>{ |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | </script> |