zhangxiao
2024-08-07 f91a756bec5747a0dc110bd16512aee32c34e5a9
src/views/dmx/IntelligentAgent/components/agentConfig.vue
@@ -32,7 +32,7 @@
  >
    <a-row class="">
      <a-col :span="24">
        <a-tabs type="capsule" size="large">
        <a-tabs type="capsule" size="large" v-model="keyLarge" @tab-click="console.log(keyLarge)">
          <a-tab-pane key="1" title="助理设置">
            <a-divider style="margin-bottom: 20px;margin-top: 0" />
            <div style="width: 100%;" :style="{height:height}">
@@ -309,6 +309,7 @@
const formRef = ref();
const formRef1 = ref();
const formRef2 = ref();
const keyLarge = ref('1');
const form = reactive({
  name: "",
  icon: "",
@@ -448,24 +449,27 @@
  //   txt: '',// 备注
  // });
  formRef.value.resetFields();
  form.name = "";
  form.prompt_config.system = "你是一个智能助手,请总结知识库的内容来回答问题,请列举知识库中的数据详细回答。当所有知识库内容都与问题无关时,你的回答必须包括“知识库中未找到您要的答案!”这句话。" +
    "回答需要考虑聊天历史。\n        以下是知识库:\n        {knowledge}\n        以上是知识库。";
  formRef.value.resetFields();
  formRef1.value.resetFields();
  formRef2.value.resetFields();
  if(props.typeAngint=='add'){
    form.name = "";
    form.prompt_config.system = "你是一个智能助手,请总结知识库的内容来回答问题,请列举知识库中的数据详细回答。当所有知识库内容都与问题无关时,你的回答必须包括“知识库中未找到您要的答案!”这句话。" +
      "回答需要考虑聊天历史。\n        以下是知识库:\n        {knowledge}\n        以上是知识库。";
  }
};
const handleBeforeOk = async (done) => {
  formRef.value.validate().then(res => {
    console.log('res:', res)
    // console.log('res:', res)
  })
  formRef1.value.validate().then(res => {
    console.log('res:', res)
    // console.log('res:', res)
  })
  formRef2.value.validate().then(res => {
    console.log('res:', res)
    // console.log('res:', res)
  })
  if (form.name && form.kb_ids.length>0 && form.prompt_config.system && form.llm_id) {
    let title = '创建成功';