| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806 | {/**
  * @typedef Props
  * @property {string} apiBaseUrl
  */}
import { CodeGroup } from '@/app/components/develop/code.tsx'
import { Row, Col, Properties, Property, Heading, SubProperty, PropertyInstruction, Paragraph } from '@/app/components/develop/md.tsx'
# 知识库 API
<div>
  ### 鉴权
  Service API 使用 `API-Key` 进行鉴权。
  建议开发者把 `API-Key` 放在后端存储,而非分享或者放在客户端存储,以免 `API-Key` 泄露,导致财产损失。
  所有 API 请求都应在 **`Authorization`** HTTP Header 中包含您的 `API-Key`,如下所示:
  <CodeGroup title="Code">
    ```javascript
      Authorization: Bearer {API_KEY}
    ```
  </CodeGroup>
</div>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/document/create-by-text'
  method='POST'
  title='通过文本创建文档'
  name='#create-by-text'
/>
<Row>
  <Col>
    此接口基于已存在知识库,在此知识库的基础上通过文本创建新的文档
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
    </Properties>
    ### Request Body
    <Properties>
      <Property name='name' type='string' key='name'>
        文档名称
      </Property>
      <Property name='text' type='string' key='text'>
        文档内容
      </Property>
      <Property name='indexing_technique' type='string' key='indexing_technique'>
        索引方式
          - <code>high_quality</code> 高质量:使用  
        ding 模型进行嵌入,构建为向量数据库索引
          - <code>economy</code> 经济:使用 keyword table index 的倒排索引进行构建
      </Property>
      <Property name='doc_form' type='string' key='doc_form'>
        索引内容的形式
          - <code>text_model</code> text 文档直接 embedding,经济模式默认为该模式
          - <code>hierarchical_model</code> parent-child 模式
          - <code>qa_model</code> Q&A 模式:为分片文档生成 Q&A 对,然后对问题进行 embedding
      </Property>
      <Property name='doc_language' type='string' key='doc_language'>
        在 Q&A 模式下,指定文档的语言,例如:<code>English</code>、<code>Chinese</code>
      </Property>
      <Property name='process_rule' type='object' key='process_rule'>
        处理规则
          - <code>mode</code> (string) 清洗、分段模式 ,automatic 自动 / custom 自定义 / hierarchical 父子
          - <code>rules</code> (object) 自定义规则(自动模式下,该字段为空)
            - <code>pre_processing_rules</code> (array[object]) 预处理规则
              - <code>id</code> (string) 预处理规则的唯一标识符
                - 枚举:
                  - <code>remove_extra_spaces</code> 替换连续空格、换行符、制表符
                  - <code>remove_urls_emails</code> 删除 URL、电子邮件地址
              - <code>enabled</code> (bool) 是否选中该规则,不传入文档 ID 时代表默认值
            - <code>segmentation</code> (object) 分段规则
              - <code>separator</code> 自定义分段标识符,目前仅允许设置一个分隔符。默认为 <code>\n</code>
              - <code>max_tokens</code> 最大长度(token)默认为 1000
            - <code>parent_mode</code> 父分段的召回模式 <code>full-doc</code> 全文召回 / <code>paragraph</code> 段落召回
            - <code>subchunk_segmentation</code> (object) 子分段规则
              - <code>separator</code> 分段标识符,目前仅允许设置一个分隔符。默认为 <code>***</code>
              - <code>max_tokens</code> 最大长度 (token) 需要校验小于父级的长度
              - <code>chunk_overlap</code> 分段重叠指的是在对数据进行分段时,段与段之间存在一定的重叠部分(选填)
      </Property>
      <PropertyInstruction>当知识库未设置任何参数的时候,首次上传需要提供以下参数,未提供则使用默认选项:</PropertyInstruction>
      <Property name='retrieval_model' type='object' key='retrieval_model'>
        检索模式
          - <code>search_method</code> (string) 检索方法
            - <code>hybrid_search</code> 混合检索
            - <code>semantic_search</code> 语义检索
            - <code>full_text_search</code> 全文检索
          - <code>reranking_enable</code> (bool) 是否开启rerank
          - <code>reranking_mode</code> (String) 混合检索
            - <code>weighted_score</code> 权重设置
            - <code>reranking_model</code> Rerank 模型
          - <code>reranking_model</code> (object) Rerank 模型配置
            - <code>reranking_provider_name</code> (string) Rerank 模型的提供商
            - <code>reranking_model_name</code> (string) Rerank 模型的名称
          - <code>top_k</code> (int) 召回条数
          - <code>score_threshold_enabled</code> (bool)是否开启召回分数限制
          - <code>score_threshold</code> (float) 召回分数限制
      </Property>
      <Property name='embedding_model' type='string' key='embedding_model'>
        Embedding 模型名称
      </Property>
      <Property name='embedding_model_provider' type='string' key='embedding_model_provider'>
        Embedding 模型供应商
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="POST"
      label="/datasets/{dataset_id}/document/create-by-text"
      targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/document/create-by-text' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{"name": "text","text": "text","indexing_technique": "high_quality","process_rule": {"mode": "automatic"}}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/document/create-by-text' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "name": "text",
        "text": "text",
        "indexing_technique": "high_quality",
        "process_rule": {
            "mode": "automatic"
        }
    }'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "document": {
        "id": "",
        "position": 1,
        "data_source_type": "upload_file",
        "data_source_info": {
            "upload_file_id": ""
        },
        "dataset_process_rule_id": "",
        "name": "text.txt",
        "created_from": "api",
        "created_by": "",
        "created_at": 1695690280,
        "tokens": 0,
        "indexing_status": "waiting",
        "error": null,
        "enabled": true,
        "disabled_at": null,
        "disabled_by": null,
        "archived": false,
        "display_status": "queuing",
        "word_count": 0,
        "hit_count": 0,
        "doc_form": "text_model"
      },
      "batch": ""
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/document/create-by-file'
  method='POST'
  title='通过文件创建文档 '
  name='#create-by-file'
/>
<Row>
  <Col>
    此接口基于已存在知识库,在此知识库的基础上通过文件创建新的文档
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
    </Properties>
    ### Request Body
    <Properties>
      <Property name='data' type='multipart/form-data json string' key='data'>
        - <code>original_document_id</code> 源文档 ID(选填)
          - 用于重新上传文档或修改文档清洗、分段配置,缺失的信息从源文档复制
          - 源文档不可为归档的文档
          - 当传入 <code>original_document_id</code> 时,代表文档进行更新操作,<code>process_rule</code> 为可填项目,不填默认使用源文档的分段方式
          - 未传入 <code>original_document_id</code> 时,代表文档进行新增操作,<code>process_rule</code> 为必填
        - <code>indexing_technique</code> 索引方式
          - <code>high_quality</code> 高质量:使用  embedding 模型进行嵌入,构建为向量数据库索引
          - <code>economy</code> 经济:使用 keyword table index 的倒排索引进行构建
        - <code>doc_form</code> 索引内容的形式
          - <code>text_model</code> text 文档直接 embedding,经济模式默认为该模式
          - <code>hierarchical_model</code> parent-child 模式
          - <code>qa_model</code> Q&A 模式:为分片文档生成 Q&A 对,然后对问题进行 embedding
        - <code>doc_language</code> 在 Q&A 模式下,指定文档的语言,例如:<code>English</code>、<code>Chinese</code>
        - <code>process_rule</code> 处理规则
          - <code>mode</code> (string) 清洗、分段模式,automatic 自动 / custom 自定义 / hierarchical 父子
          - <code>rules</code> (object) 自定义规则(自动模式下,该字段为空)
            - <code>pre_processing_rules</code> (array[object]) 预处理规则
              - <code>id</code> (string) 预处理规则的唯一标识符
                - 枚举:
                  - <code>remove_extra_spaces</code> 替换连续空格、换行符、制表符
                  - <code>remove_urls_emails</code> 删除 URL、电子邮件地址
              - <code>enabled</code> (bool) 是否选中该规则,不传入文档 ID 时代表默认值
            - <code>segmentation</code> (object) 分段规则
              - <code>separator</code> 自定义分段标识符,目前仅允许设置一个分隔符。默认为 \n
              - <code>max_tokens</code> 最大长度(token)默认为 1000
            - <code>parent_mode</code> 父分段的召回模式 <code>full-doc</code> 全文召回 / <code>paragraph</code> 段落召回
            - <code>subchunk_segmentation</code> (object) 子分段规则
              - <code>separator</code> 分段标识符,目前仅允许设置一个分隔符。默认为 <code>***</code>
              - <code>max_tokens</code> 最大长度 (token) 需要校验小于父级的长度
              - <code>chunk_overlap</code> 分段重叠指的是在对数据进行分段时,段与段之间存在一定的重叠部分(选填)
      </Property>
      <Property name='file' type='multipart/form-data' key='file'>
        需要上传的文件。
      </Property>
      <PropertyInstruction>当知识库未设置任何参数的时候,首次上传需要提供以下参数,未提供则使用默认选项:</PropertyInstruction>
      <Property name='retrieval_model' type='object' key='retrieval_model'>
        检索模式
          - <code>search_method</code> (string) 检索方法
            - <code>hybrid_search</code> 混合检索
            - <code>semantic_search</code> 语义检索
            - <code>full_text_search</code> 全文检索
          - <code>reranking_enable</code> (bool) 是否开启 rerank
          - <code>reranking_model</code> (object) Rerank 模型配置
            - <code>reranking_provider_name</code> (string) Rerank 模型的提供商
            - <code>reranking_model_name</code> (string) Rerank 模型的名称
          - <code>top_k</code> (int) 召回条数
          - <code>score_threshold_enabled</code> (bool) 是否开启召回分数限制
          - <code>score_threshold</code> (float) 召回分数限制
      </Property>
      <Property name='embedding_model' type='string' key='embedding_model'>
        Embedding 模型名称
      </Property>
      <Property name='embedding_model_provider' type='string' key='embedding_model_provider'>
        Embedding 模型供应商
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="POST"
      label="/datasets/{dataset_id}/document/create-by-file"
      targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/document/create-by-file' \\\n--header 'Authorization: Bearer {api_key}' \\\n--form 'data="{"indexing_technique":"high_quality","process_rule":{"rules":{"pre_processing_rules":[{"id":"remove_extra_spaces","enabled":true},{"id":"remove_urls_emails","enabled":true}],"segmentation":{"separator":"###","max_tokens":500}},"mode":"custom"}}";type=text/plain' \\\n--form 'file=@"/path/to/file"'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/document/create-by-file' \
    --header 'Authorization: Bearer {api_key}' \
    --form 'data="{\"name\":\"Dify\",\"indexing_technique\":\"high_quality\",\"process_rule\":{\"rules\":{\"pre_processing_rules\":[{\"id\":\"remove_extra_spaces\",\"enabled\":true},{\"id\":\"remove_urls_emails\",\"enabled\":true}],\"segmentation\":{\"separator\":\"###\",\"max_tokens\":500}},\"mode\":\"custom\"}}";type=text/plain' \
    --form 'file=@"/path/to/file"'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "document": {
        "id": "",
        "position": 1,
        "data_source_type": "upload_file",
        "data_source_info": {
          "upload_file_id": ""
        },
        "dataset_process_rule_id": "",
        "name": "Dify.txt",
        "created_from": "api",
        "created_by": "",
        "created_at": 1695308667,
        "tokens": 0,
        "indexing_status": "waiting",
        "error": null,
        "enabled": true,
        "disabled_at": null,
        "disabled_by": null,
        "archived": false,
        "display_status": "queuing",
        "word_count": 0,
        "hit_count": 0,
        "doc_form": "text_model"
      },
      "batch": ""
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets'
  method='POST'
  title='创建空知识库'
  name='#create_empty_dataset'
/>
<Row>
  <Col>
    ### Request Body
    <Properties>
      <Property name='name' type='string' key='name'>
        知识库名称(必填)
      </Property>
      <Property name='description' type='string' key='description'>
        知识库描述(选填)
      </Property>
      <Property name='indexing_technique' type='string' key='indexing_technique'>
        索引模式(选填,建议填写)
          - <code>high_quality</code> 高质量
          - <code>economy</code> 经济
      </Property>
      <Property name='permission' type='string' key='permission'>
        权限(选填,默认 only_me)
          - <code>only_me</code> 仅自己
          - <code>all_team_members</code> 所有团队成员
          - <code>partial_members</code> 部分团队成员
      </Property>
      <Property name='provider' type='string' key='provider'>
        Provider(选填,默认 vendor)
          - <code>vendor</code> 上传文件
          - <code>external</code> 外部知识库
      </Property>
      <Property name='external_knowledge_api_id' type='str' key='external_knowledge_api_id'>
        外部知识库 API_ID(选填)
      </Property>
      <Property name='external_knowledge_id' type='str' key='external_knowledge_id'>
        外部知识库 ID(选填)
      </Property>
      <Property name='embedding_model' type='str' key='embedding_model'>
        Embedding 模型名称
      </Property>
      <Property name='embedding_model_provider' type='str' key='embedding_model_provider'>
        Embedding 模型供应商
      </Property>
      <Property name='retrieval_model' type='object' key='retrieval_model'>
        检索模式
          - <code>search_method</code> (string) 检索方法
            - <code>hybrid_search</code> 混合检索
            - <code>semantic_search</code> 语义检索
            - <code>full_text_search</code> 全文检索
          - <code>reranking_enable</code> (bool) 是否开启 rerank
          - <code>reranking_model</code> (object) Rerank 模型配置
            - <code>reranking_provider_name</code> (string) Rerank 模型的提供商
            - <code>reranking_model_name</code> (string) Rerank 模型的名称
          - <code>top_k</code> (int) 召回条数
          - <code>score_threshold_enabled</code> (bool) 是否开启召回分数限制
          - <code>score_threshold</code> (float) 召回分数限制
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="POST"
      label="/datasets"
      targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{"name": "name", "permission": "only_me"}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request POST '${props.apiBaseUrl}/datasets' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' \
    --data-raw '{
      "name": "name",
      "permission": "only_me"
    }'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "id": "",
      "name": "name",
      "description": null,
      "provider": "vendor",
      "permission": "only_me",
      "data_source_type": null,
      "indexing_technique": null,
      "app_count": 0,
      "document_count": 0,
      "word_count": 0,
      "created_by": "",
      "created_at": 1695636173,
      "updated_by": "",
      "updated_at": 1695636173,
      "embedding_model": null,
      "embedding_model_provider": null,
      "embedding_available": null
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets'
  method='GET'
  title='知识库列表'
  name='#dataset_list'
/>
<Row>
  <Col>
    ### Query
    <Properties>
      <Property name='keyword' type='string' key='keyword'>
        搜索关键词,可选
      </Property>
      <Property name='tag_ids' type='array[string]' key='tag_ids'>
        标签 ID 列表,可选
      </Property>
      <Property name='page' type='integer' key='page'>
        页码,可选,默认为 1
      </Property>
      <Property name='limit' type='string' key='limit'>
        返回条数,可选,默认 20,范围 1-100
      </Property>
      <Property name='include_all' type='boolean' key='include_all'>
        是否包含所有数据集(仅对所有者生效),可选,默认为 false
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="GET"
      label="/datasets"
      targetCode={`curl --location --request GET '${props.apiBaseUrl}/datasets?page=1&limit=20' \\\n--header 'Authorization: Bearer {api_key}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request GET '${props.apiBaseUrl}/datasets?page=1&limit=20' \
    --header 'Authorization: Bearer {api_key}'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "data": [
        {
          "id": "",
          "name": "知识库名称",
          "description": "描述信息",
          "permission": "only_me",
          "data_source_type": "upload_file",
          "indexing_technique": "",
          "app_count": 2,
          "document_count": 10,
          "word_count": 1200,
          "created_by": "",
          "created_at": "",
          "updated_by": "",
          "updated_at": ""
        },
        ...
      ],
      "has_more": true,
      "limit": 20,
      "total": 50,
      "page": 1
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}'
  method='GET'
  title='查看知识库详情'
  name='#view_dataset'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="GET"
      label="/datasets/{dataset_id}"
      targetCode={`curl --location --request GET '${props.apiBaseUrl}/datasets/{dataset_id}' \\\n--header 'Authorization: Bearer {api_key}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request GET '${props.apiBaseUrl}/datasets/{dataset_id}' \
    --header 'Authorization: Bearer {api_key}'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "id": "eaedb485-95ac-4ffd-ab1e-18da6d676a2f",
      "name": "Test Knowledge Base",
      "description": "",
      "provider": "vendor",
      "permission": "only_me",
      "data_source_type": null,
      "indexing_technique": null,
      "app_count": 0,
      "document_count": 0,
      "word_count": 0,
      "created_by": "e99a1635-f725-4951-a99a-1daaaa76cfc6",
      "created_at": 1735620612,
      "updated_by": "e99a1635-f725-4951-a99a-1daaaa76cfc6",
      "updated_at": 1735620612,
      "embedding_model": null,
      "embedding_model_provider": null,
      "embedding_available": true,
      "retrieval_model_dict": {
        "search_method": "semantic_search",
        "reranking_enable": false,
        "reranking_mode": null,
        "reranking_model": {
          "reranking_provider_name": "",
          "reranking_model_name": ""
        },
        "weights": null,
        "top_k": 2,
        "score_threshold_enabled": false,
        "score_threshold": null
      },
      "tags": [],
      "doc_form": null,
      "external_knowledge_info": {
        "external_knowledge_id": null,
        "external_knowledge_api_id": null,
        "external_knowledge_api_name": null,
        "external_knowledge_api_endpoint": null
      },
      "external_retrieval_model": {
        "top_k": 2,
        "score_threshold": 0.0,
        "score_threshold_enabled": null
      }
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}'
  method='PATCH'
  title='修改知识库详情'
  name='#update_dataset'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
    </Properties>
    ### Request Body
    <Properties>
      <Property name='indexing_technique' type='string' key='indexing_technique'>
        索引模式(选填,建议填写)
          - <code>high_quality</code> 高质量
          - <code>economy</code> 经济
      </Property>
      <Property name='permission' type='string' key='permission'>
        权限(选填,默认 only_me)
          - <code>only_me</code> 仅自己
          - <code>all_team_members</code> 所有团队成员
          - <code>partial_members</code> 部分团队成员
      </Property>
      <Property name='embedding_model_provider' type='string' key='embedding_model_provider'>
        嵌入模型提供商(选填), 必须先在系统内设定好接入的模型,对应的是provider字段
      </Property>
      <Property name='embedding_model' type='string' key='embedding_model'>
        嵌入模型(选填)
      </Property>
      <Property name='retrieval_model' type='object' key='retrieval_model'>
        检索参数(选填,如不填,按照默认方式召回)
        - <code>search_method</code> (text) 检索方法:以下四个关键字之一,必填
          - <code>keyword_search</code> 关键字检索
          - <code>semantic_search</code> 语义检索
          - <code>full_text_search</code> 全文检索
          - <code>hybrid_search</code> 混合检索
        - <code>reranking_enable</code> (bool) 是否启用 Reranking,非必填,如果检索模式为 semantic_search 模式或者 hybrid_search 则传值
        - <code>reranking_mode</code> (object) Rerank 模型配置,非必填,如果启用了 reranking 则传值
            - <code>reranking_provider_name</code> (string) Rerank 模型提供商
            - <code>reranking_model_name</code> (string) Rerank 模型名称
        - <code>weights</code> (float) 混合检索模式下语意检索的权重设置
        - <code>top_k</code> (integer) 返回结果数量,非必填
        - <code>score_threshold_enabled</code> (bool) 是否开启 score 阈值
        - <code>score_threshold</code> (float) Score 阈值
      </Property>
      <Property name='partial_member_list' type='array' key='partial_member_list'>
        部分团队成员 ID 列表(选填)
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="PATCH"
      label="/datasets/{dataset_id}"
      targetCode={`curl --location --request PATCH '${props.apiBaseUrl}/datasets/{dataset_id}' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{
        "name": "Test Knowledge Base", 
        "indexing_technique": "high_quality", 
        "permission": "only_me", 
        "embedding_model_provider": "zhipuai", 
        "embedding_model": "embedding-3", 
        "retrieval_model": {
          "search_method": "keyword_search",
          "reranking_enable": false,
          "reranking_mode": null,
          "reranking_model": {
              "reranking_provider_name": "",
              "reranking_model_name": ""
          },
          "weights": null,
          "top_k": 1,
          "score_threshold_enabled": false,
          "score_threshold": null
        }, 
        "partial_member_list": []
      }'
    `}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request PATCH '${props.apiBaseUrl}/datasets/{dataset_id}' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' \
    --data-raw '{
      "name": "Test Knowledge Base", 
      "indexing_technique": "high_quality", 
      "permission": "only_me", 
      "embedding_model_provider": "zhipuai", 
      "embedding_model": "embedding-3", 
      "retrieval_model": {
        "search_method": "keyword_search",
        "reranking_enable": false,
        "reranking_mode": null,
        "reranking_model": {
            "reranking_provider_name": "",
            "reranking_model_name": ""
        },
        "weights": null,
        "top_k": 1,
        "score_threshold_enabled": false,
        "score_threshold": null
      }, 
      "partial_member_list": []
    }'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "id": "eaedb485-95ac-4ffd-ab1e-18da6d676a2f",
      "name": "Test Knowledge Base",
      "description": "",
      "provider": "vendor",
      "permission": "only_me",
      "data_source_type": null,
      "indexing_technique": "high_quality",
      "app_count": 0,
      "document_count": 0,
      "word_count": 0,
      "created_by": "e99a1635-f725-4951-a99a-1daaaa76cfc6",
      "created_at": 1735620612,
      "updated_by": "e99a1635-f725-4951-a99a-1daaaa76cfc6",
      "updated_at": 1735622679,
      "embedding_model": "embedding-3",
      "embedding_model_provider": "zhipuai",
      "embedding_available": null,
      "retrieval_model_dict": {
          "search_method": "semantic_search",
          "reranking_enable": false,
          "reranking_mode": null,
          "reranking_model": {
              "reranking_provider_name": "",
              "reranking_model_name": ""
          },
          "weights": null,
          "top_k": 2,
          "score_threshold_enabled": false,
          "score_threshold": null
      },
      "tags": [],
      "doc_form": null,
      "external_knowledge_info": {
          "external_knowledge_id": null,
          "external_knowledge_api_id": null,
          "external_knowledge_api_name": null,
          "external_knowledge_api_endpoint": null
      },
      "external_retrieval_model": {
          "top_k": 2,
          "score_threshold": 0.0,
          "score_threshold_enabled": null
      },
      "partial_member_list": []
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}'
  method='DELETE'
  title='删除知识库'
  name='#delete_dataset'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="DELETE"
      label="/datasets/{dataset_id}"
      targetCode={`curl --location --request DELETE '${props.apiBaseUrl}/datasets/{dataset_id}' \\\n--header 'Authorization: Bearer {api_key}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request DELETE '${props.apiBaseUrl}/datasets/{dataset_id}' \
    --header 'Authorization: Bearer {api_key}'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```text {{ title: 'Response' }}
    204 No Content
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/documents/{document_id}/update-by-text'
  method='POST'
  title='通过文本更新文档'
  name='#update-by-text'
/>
<Row>
  <Col>
    此接口基于已存在知识库,在此知识库的基础上通过文本更新文档
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='document_id' type='string' key='document_id'>
        文档 ID
      </Property>
    </Properties>
    ### Request Body
    <Properties>
      <Property name='name' type='string' key='name'>
        文档名称(选填)
      </Property>
      <Property name='text' type='string' key='text'>
        文档内容(选填)
      </Property>
      <Property name='process_rule' type='object' key='process_rule'>
        处理规则(选填)
          - <code>mode</code> (string) 清洗、分段模式 ,automatic 自动 / custom 自定义 / hierarchical 父子
          - <code>rules</code> (object) 自定义规则(自动模式下,该字段为空)
            - <code>pre_processing_rules</code> (array[object]) 预处理规则
              - <code>id</code> (string) 预处理规则的唯一标识符
                - 枚举:
                  - <code>remove_extra_spaces</code> 替换连续空格、换行符、制表符
                  - <code>remove_urls_emails</code> 删除 URL、电子邮件地址
              - <code>enabled</code> (bool) 是否选中该规则,不传入文档 ID 时代表默认值
            - <code>segmentation</code> (object) 分段规则
              - <code>separator</code> 自定义分段标识符,目前仅允许设置一个分隔符。默认为 \n
              - <code>max_tokens</code> 最大长度(token)默认为 1000
            - <code>parent_mode</code> 父分段的召回模式 <code>full-doc</code> 全文召回 / <code>paragraph</code> 段落召回
            - <code>subchunk_segmentation</code> (object) 子分段规则
              - <code>separator</code> 分段标识符,目前仅允许设置一个分隔符。默认为 <code>***</code>
              - <code>max_tokens</code> 最大长度 (token) 需要校验小于父级的长度
              - <code>chunk_overlap</code> 分段重叠指的是在对数据进行分段时,段与段之间存在一定的重叠部分(选填)
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="POST"
      label="/datasets/{dataset_id}/documents/{document_id}/update-by-text"
      targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/update-by-text' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{"name": "name","text": "text"}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/update-by-text' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "name": "name",
        "text": "text"
    }'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "document": {
        "id": "",
        "position": 1,
        "data_source_type": "upload_file",
        "data_source_info": {
          "upload_file_id": ""
        },
        "dataset_process_rule_id": "",
        "name": "name.txt",
        "created_from": "api",
        "created_by": "",
        "created_at": 1695308667,
        "tokens": 0,
        "indexing_status": "waiting",
        "error": null,
        "enabled": true,
        "disabled_at": null,
        "disabled_by": null,
        "archived": false,
        "display_status": "queuing",
        "word_count": 0,
        "hit_count": 0,
        "doc_form": "text_model"
      },
      "batch": ""
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/documents/{document_id}/update-by-file'
  method='POST'
  title='通过文件更新文档'
  name='#update-by-file'
/>
<Row>
  <Col>
    此接口基于已存在知识库,在此知识库的基础上通过文件更新文档的操作。
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='document_id' type='string' key='document_id'>
        文档 ID
      </Property>
    </Properties>
    ### Request Body
    <Properties>
      <Property name='name' type='string' key='name'>
        文档名称(选填)
      </Property>
      <Property name='file' type='multipart/form-data' key='file'>
        需要上传的文件
      </Property>
      <Property name='process_rule' type='object' key='process_rule'>
        处理规则(选填)
          - <code>mode</code> (string) 清洗、分段模式 ,automatic 自动 / custom 自定义 / hierarchical 父子
          - <code>rules</code> (object) 自定义规则(自动模式下,该字段为空)
            - <code>pre_processing_rules</code> (array[object]) 预处理规则
              - <code>id</code> (string) 预处理规则的唯一标识符
                - 枚举:
                  - <code>remove_extra_spaces</code> 替换连续空格、换行符、制表符
                  - <code>remove_urls_emails</code> 删除 URL、电子邮件地址
              - <code>enabled</code> (bool) 是否选中该规则,不传入文档 ID 时代表默认值
            - <code>segmentation</code> (object) 分段规则
              - <code>separator</code> 自定义分段标识符,目前仅允许设置一个分隔符。默认为 \n
              - <code>max_tokens</code> 最大长度(token)默认为 1000
            - <code>parent_mode</code> 父分段的召回模式 <code>full-doc</code> 全文召回 / <code>paragraph</code> 段落召回
            - <code>subchunk_segmentation</code> (object) 子分段规则
              - <code>separator</code> 分段标识符,目前仅允许设置一个分隔符。默认为 <code>***</code>
              - <code>max_tokens</code> 最大长度 (token) 需要校验小于父级的长度
              - <code>chunk_overlap</code> 分段重叠指的是在对数据进行分段时,段与段之间存在一定的重叠部分(选填)
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="POST"
      label="/datasets/{dataset_id}/documents/{document_id}/update-by-file"
      targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/update-by-file' \\\n--header 'Authorization: Bearer {api_key}' \\\n--form 'data="{"name":"Dify","indexing_technique":"high_quality","process_rule":{"rules":{"pre_processing_rules":[{"id":"remove_extra_spaces","enabled":true},{"id":"remove_urls_emails","enabled":true}],"segmentation":{"separator":"###","max_tokens":500}},"mode":"custom"}}";type=text/plain' \\\n--form 'file=@"/path/to/file"'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/update-by-file' \
    --header 'Authorization: Bearer {api_key}' \
    --form 'data="{\"name\":\"Dify\",\"indexing_technique\":\"high_quality\",\"process_rule\":{\"rules\":{\"pre_processing_rules\":[{\"id\":\"remove_extra_spaces\",\"enabled\":true},{\"id\":\"remove_urls_emails\",\"enabled\":true}],\"segmentation\":{\"separator\":\"###\",\"max_tokens\":500}},\"mode\":\"custom\"}}";type=text/plain' \
    --form 'file=@"/path/to/file"'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "document": {
        "id": "",
        "position": 1,
        "data_source_type": "upload_file",
        "data_source_info": {
          "upload_file_id": ""
        },
        "dataset_process_rule_id": "",
        "name": "Dify.txt",
        "created_from": "api",
        "created_by": "",
        "created_at": 1695308667,
        "tokens": 0,
        "indexing_status": "waiting",
        "error": null,
        "enabled": true,
        "disabled_at": null,
        "disabled_by": null,
        "archived": false,
        "display_status": "queuing",
        "word_count": 0,
        "hit_count": 0,
        "doc_form": "text_model"
      },
      "batch": "20230921150427533684"
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/documents/{batch}/indexing-status'
  method='GET'
  title='获取文档嵌入状态(进度)'
  name='#indexing_status'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='batch' type='string' key='batch'>
        上传文档的批次号
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="GET"
      label="/datasets/{dataset_id}/documents/{batch}/indexing-status"
      targetCode={`curl --location --request GET '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{batch}/indexing-status' \\\n--header 'Authorization: Bearer {api_key}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request GET '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{batch}/indexing-status' \
    --header 'Authorization: Bearer {api_key}' \
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "data":[{
        "id": "",
        "indexing_status": "indexing",
        "processing_started_at": 1681623462.0,
        "parsing_completed_at": 1681623462.0,
        "cleaning_completed_at": 1681623462.0,
        "splitting_completed_at": 1681623462.0,
        "completed_at": null,
        "paused_at": null,
        "error": null,
        "stopped_at": null,
        "completed_segments": 24,
        "total_segments": 100
      }]
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/documents/{document_id}'
  method='DELETE'
  title='删除文档'
  name='#delete_document'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='document_id' type='string' key='document_id'>
        文档 ID
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="DELETE"
      label="/datasets/{dataset_id}/documents/{document_id}"
      targetCode={`curl --location --request DELETE '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}' \\\n--header 'Authorization: Bearer {api_key}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request DELETE '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}' \
    --header 'Authorization: Bearer {api_key}' \
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```text {{ title: 'Response' }}
    204 No Content
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/documents'
  method='GET'
  title='知识库文档列表'
  name='#dataset_document_list'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
    </Properties>
    ### Query
    <Properties>
      <Property name='keyword' type='string' key='keyword'>
        搜索关键词,可选,目前仅搜索文档名称
      </Property>
      <Property name='page' type='string' key='page'>
        页码,可选
      </Property>
      <Property name='limit' type='string' key='limit'>
        返回条数,可选,默认 20,范围 1-100
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="GET"
      label="/datasets/{dataset_id}/documents"
      targetCode={`curl --location --request GET '${props.apiBaseUrl}/datasets/{dataset_id}/documents' \\\n--header 'Authorization: Bearer {api_key}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request GET '${props.apiBaseUrl}/datasets/{dataset_id}/documents' \
    --header 'Authorization: Bearer {api_key}' \
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "data": [
        {
          "id": "",
          "position": 1,
          "data_source_type": "file_upload",
          "data_source_info": null,
          "dataset_process_rule_id": null,
          "name": "dify",
          "created_from": "",
          "created_by": "",
          "created_at": 1681623639,
          "tokens": 0,
          "indexing_status": "waiting",
          "error": null,
          "enabled": true,
          "disabled_at": null,
          "disabled_by": null,
          "archived": false
        },
      ],
      "has_more": false,
      "limit": 20,
      "total": 9,
      "page": 1
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/documents/{document_id}/segments'
  method='POST'
  title='新增分段'
  name='#create_new_segment'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='document_id' type='string' key='document_id'>
        文档 ID
      </Property>
    </Properties>
    ### Request Body
    <Properties>
      <Property name='segments' type='object list' key='segments'>
        - <code>content</code> (text) 文本内容/问题内容,必填
        - <code>answer</code> (text) 答案内容,非必填,如果知识库的模式为 Q&A 模式则传值
        - <code>keywords</code> (list) 关键字,非必填
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="POST"
      label="/datasets/{dataset_id}/documents/{document_id}/segments"
      targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{"segments": [{"content": "1","answer": "1","keywords": ["a"]}]}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' \
    --data-raw '{
      "segments": [
        {
          "content": "1",
          "answer": "1",
          "keywords": ["a"]
        }
      ]
    }'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "data": [{
        "id": "",
        "position": 1,
        "document_id": "",
        "content": "1",
        "answer": "1",
        "word_count": 25,
        "tokens": 0,
        "keywords": [
            "a"
        ],
        "index_node_id": "",
        "index_node_hash": "",
        "hit_count": 0,
        "enabled": true,
        "disabled_at": null,
        "disabled_by": null,
        "status": "completed",
        "created_by": "",
        "created_at": 1695312007,
        "indexing_at": 1695312007,
        "completed_at": 1695312007,
        "error": null,
        "stopped_at": null
      }],
      "doc_form": "text_model"
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/documents/{document_id}/segments'
  method='GET'
  title='查询文档分段'
  name='#get_segment'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='document_id' type='string' key='document_id'>
        文档 ID
      </Property>
    </Properties>
     ### Query
    <Properties>
      <Property name='keyword' type='string' key='keyword'>
        搜索关键词,可选
      </Property>
      <Property name='status' type='string' key='status'>
        搜索状态,completed
      </Property>
      <Property name='page' type='string' key='page'>
        页码,可选
      </Property>
      <Property name='limit' type='string' key='limit'>
        返回条数,可选,默认 20,范围 1-100
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="GET"
      label="/datasets/{dataset_id}/documents/{document_id}/segments"
      targetCode={`curl --location --request GET '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request GET '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "data": [{
        "id": "",
        "position": 1,
        "document_id": "",
        "content": "1",
        "answer": "1",
        "word_count": 25,
        "tokens": 0,
        "keywords": [
            "a"
        ],
        "index_node_id": "",
        "index_node_hash": "",
        "hit_count": 0,
        "enabled": true,
        "disabled_at": null,
        "disabled_by": null,
        "status": "completed",
        "created_by": "",
        "created_at": 1695312007,
        "indexing_at": 1695312007,
        "completed_at": 1695312007,
        "error": null,
        "stopped_at": null
      }],
      "doc_form": "text_model",
      "has_more": false,
      "limit": 20,
      "total": 9,
      "page": 1
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}'
  method='DELETE'
  title='删除文档分段'
  name='#delete_segment'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='document_id' type='string' key='document_id'>
        文档 ID
      </Property>
      <Property name='segment_id' type='string' key='segment_id'>
        文档分段 ID
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="DELETE"
      label="/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}"
      targetCode={`curl --location --request DELETE '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request DELETE '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```text {{ title: 'Response' }}
    204 No Content
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}'
  method='GET'
  title='查看文档分段详情'
  name='#view_document_segment'
/>
<Row>
  <Col>
    查看指定知识库中特定文档的分段详情
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='document_id' type='string' key='document_id'>
        文档 ID
      </Property>
      <Property name='segment_id' type='string' key='segment_id'>
        分段 ID
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="GET"
      label="/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}"
      targetCode={`curl --location --request GET '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}' \\\n--header 'Authorization: Bearer {api_key}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request GET '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}' \
    --header 'Authorization: Bearer {api_key}'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "data": {
        "id": "分段唯一ID",
        "position": 2,
        "document_id": "所属文档ID",
        "content": "分段内容文本",
        "sign_content": "签名内容文本",
        "answer": "答案内容(如果有)",
        "word_count": 470,
        "tokens": 382,
        "keywords": ["关键词1", "关键词2"],
        "index_node_id": "索引节点ID",
        "index_node_hash": "索引节点哈希值",
        "hit_count": 0,
        "enabled": true,
        "status": "completed",
        "created_by": "创建者ID",
        "created_at": 创建时间戳,
        "updated_at": 更新时间戳,
        "indexing_at": 索引时间戳,
        "completed_at": 完成时间戳,
        "error": null,
        "child_chunks": []
      },
      "doc_form": "text_model"
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  method='POST'
  title='更新文档分段'
  name='#update_segment'
/>
<Row>
  <Col>
    ### POST
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='document_id' type='string' key='document_id'>
        文档 ID
      </Property>
      <Property name='segment_id' type='string' key='segment_id'>
        文档分段 ID
      </Property>
    </Properties>
    ### Request Body
    <Properties>
      <Property name='segment' type='object' key='segment'>
        - <code>content</code> (text) 文本内容/问题内容,必填
        - <code>answer</code> (text) 答案内容,非必填,如果知识库的模式为 Q&A 模式则传值
        - <code>keywords</code> (list) 关键字,非必填
        - <code>enabled</code> (bool) false/true,非必填
        - <code>regenerate_child_chunks</code> (bool) 是否重新生成子分段,非必填
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="POST"
      label="/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}"
      targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json'\\\n--data-raw '{\"segment\": {\"content\": \"1\",\"answer\": \"1\", \"keywords\": [\"a\"], \"enabled\": false}}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' \
    --data-raw '{
      "segment": {
          "content": "1",
          "answer": "1",
          "keywords": ["a"],
          "enabled": false
      }
    }'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "data": {
        "id": "",
        "position": 1,
        "document_id": "",
        "content": "1",
        "answer": "1",
        "word_count": 25,
        "tokens": 0,
        "keywords": [
            "a"
        ],
        "index_node_id": "",
        "index_node_hash": "",
        "hit_count": 0,
        "enabled": true,
        "disabled_at": null,
        "disabled_by": null,
        "status": "completed",
        "created_by": "",
        "created_at": 1695312007,
        "indexing_at": 1695312007,
        "completed_at": 1695312007,
        "error": null,
        "stopped_at": null
      },
      "doc_form": "text_model"
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks'
  method='POST'
  title='新增文档子分段'
  name='#create_child_chunk'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='document_id' type='string' key='document_id'>
        文档 ID
      </Property>
      <Property name='segment_id' type='string' key='segment_id'>
        分段 ID
      </Property>
    </Properties>
    ### Request Body
    <Properties>
      <Property name='content' type='string' key='content'>
        子分段内容
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="POST"
      label="/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks"
      targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{"content": "子分段内容"}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "content": "子分段内容"
    }'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "data": {
        "id": "",
        "segment_id": "",
        "content": "子分段内容",
        "word_count": 25,
        "tokens": 0,
        "index_node_id": "",
        "index_node_hash": "",
        "status": "completed",
        "created_by": "",
        "created_at": 1695312007,
        "indexing_at": 1695312007,
        "completed_at": 1695312007,
        "error": null,
        "stopped_at": null
      }
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks'
  method='GET'
  title='查询文档子分段'
  name='#get_child_chunks'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='document_id' type='string' key='document_id'>
        文档 ID
      </Property>
      <Property name='segment_id' type='string' key='segment_id'>
        分段 ID
      </Property>
    </Properties>
    ### Query
    <Properties>
      <Property name='keyword' type='string' key='keyword'>
        搜索关键词(选填)
      </Property>
      <Property name='page' type='integer' key='page'>
        页码(选填,默认1)
      </Property>
      <Property name='limit' type='integer' key='limit'>
        每页数量(选填,默认20,最大100)
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="GET"
      label="/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks"
      targetCode={`curl --location --request GET '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks?page=1&limit=20' \\\n--header 'Authorization: Bearer {api_key}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request GET '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks?page=1&limit=20' \
    --header 'Authorization: Bearer {api_key}'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "data": [{
        "id": "",
        "segment_id": "",
        "content": "子分段内容",
        "word_count": 25,
        "tokens": 0,
        "index_node_id": "",
        "index_node_hash": "",
        "status": "completed",
        "created_by": "",
        "created_at": 1695312007,
        "indexing_at": 1695312007,
        "completed_at": 1695312007,
        "error": null,
        "stopped_at": null
      }],
      "total": 1,
      "total_pages": 1,
      "page": 1,
      "limit": 20
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}'
  method='DELETE'
  title='删除文档子分段'
  name='#delete_child_chunk'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='document_id' type='string' key='document_id'>
        文档 ID
      </Property>
      <Property name='segment_id' type='string' key='segment_id'>
        分段 ID
      </Property>
      <Property name='child_chunk_id' type='string' key='child_chunk_id'>
        子分段 ID
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="DELETE"
      label="/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}"
      targetCode={`curl --location --request DELETE '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}' \\\n--header 'Authorization: Bearer {api_key}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request DELETE '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}' \
    --header 'Authorization: Bearer {api_key}'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```text {{ title: 'Response' }}
    204 No Content
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Row>
  <Col>
    ### 错误信息
    <Properties>
      <Property name='code' type='string' key='code'>
        返回的错误代码
      </Property>
    </Properties>
    <Properties>
      <Property name='status' type='number' key='status'>
        返回的错误状态
      </Property>
    </Properties>
    <Properties>
      <Property name='message' type='string' key='message'>
        返回的错误信息
      </Property>
    </Properties>
  </Col>
  <Col>
    <CodeGroup title="Example">
    ```json {{ title: 'Response' }}
      {
        "code": "no_file_uploaded",
        "message": "Please upload your file.",
        "status": 400
      }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}'
  method='PATCH'
  title='更新文档子分段'
  name='#update_child_chunk'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='document_id' type='string' key='document_id'>
        文档 ID
      </Property>
      <Property name='segment_id' type='string' key='segment_id'>
        分段 ID
      </Property>
      <Property name='child_chunk_id' type='string' key='child_chunk_id'>
        子分段 ID
      </Property>
    </Properties>
    ### Request Body
    <Properties>
      <Property name='content' type='string' key='content'>
        子分段内容
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="PATCH"
      label="/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}"
      targetCode={`curl --location --request PATCH '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{"content": "更新的子分段内容"}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request PATCH '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "content": "更新的子分段内容"
    }'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "data": {
        "id": "",
        "segment_id": "",
        "content": "更新的子分段内容",
        "word_count": 25,
        "tokens": 0,
        "index_node_id": "",
        "index_node_hash": "",
        "status": "completed",
        "created_by": "",
        "created_at": 1695312007,
        "indexing_at": 1695312007,
        "completed_at": 1695312007,
        "error": null,
        "stopped_at": null
      }
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/documents/{document_id}/upload-file'
  method='GET'
  title='获取上传文件'
  name='#get_upload_file'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='document_id' type='string' key='document_id'>
        文档 ID
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="GET"
      label="/datasets/{dataset_id}/documents/{document_id}/upload-file"
      targetCode={`curl --location --request GET '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/upload-file' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request GET '${props.apiBaseUrl}/datasets/{dataset_id}/documents/{document_id}/upload-file' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "id": "file_id",
      "name": "file_name",
      "size": 1024,
      "extension": "txt",
      "url": "preview_url",
      "download_url": "download_url",
      "mime_type": "text/plain",
      "created_by": "user_id",
      "created_at": 1728734540,
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/retrieve'
  method='POST'
  title='检索知识库'
  name='#dataset_retrieval'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
    </Properties>
    ### Request Body
    <Properties>
      <Property name='query' type='string' key='query'>
        检索关键词
      </Property>
      <Property name='retrieval_model' type='object' key='retrieval_model'>
        检索参数(选填,如不填,按照默认方式召回)
        - <code>search_method</code> (text) 检索方法:以下四个关键字之一,必填
          - <code>keyword_search</code> 关键字检索
          - <code>semantic_search</code> 语义检索
          - <code>full_text_search</code> 全文检索
          - <code>hybrid_search</code> 混合检索
        - <code>reranking_enable</code> (bool) 是否启用 Reranking,非必填,如果检索模式为 semantic_search 模式或者 hybrid_search 则传值
        - <code>reranking_mode</code> (object) Rerank 模型配置,非必填,如果启用了 reranking 则传值
            - <code>reranking_provider_name</code> (string) Rerank 模型提供商
            - <code>reranking_model_name</code> (string) Rerank 模型名称
        - <code>weights</code> (float) 混合检索模式下语意检索的权重设置
        - <code>top_k</code> (integer) 返回结果数量,非必填
        - <code>score_threshold_enabled</code> (bool) 是否开启 score 阈值
        - <code>score_threshold</code> (float) Score 阈值
        - <code>metadata_filtering_conditions</code> (object) 元数据过滤条件
          - <code>logical_operator</code> (string) 逻辑运算符: <code>and</code> | <code>or</code>
          - <code>conditions</code> (array[object]) 条件列表
            - <code>name</code> (string) 元数据字段名
            - <code>comparison_operator</code> (string) 比较运算符,可选值:
              - 字符串比较:
                - <code>contains</code>: 包含
                - <code>not contains</code>: 不包含
                - <code>start with</code>: 以...开头
                - <code>end with</code>: 以...结尾
                - <code>is</code>: 等于
                - <code>is not</code>: 不等于
                - <code>empty</code>: 为空
                - <code>not empty</code>: 不为空
              - 数值比较:
                - <code>=</code>: 等于
                - <code>≠</code>: 不等于
                - <code>></code>: 大于
                - <code> < </code>: 小于
                - <code>≥</code>: 大于等于
                - <code>≤</code>: 小于等于
              - 时间比较:
                - <code>before</code>: 早于
                - <code>after</code>: 晚于
            - <code>value</code> (string|number|null) 比较值
      </Property>
      <Property name='external_retrieval_model' type='object' key='external_retrieval_model'>
          未启用字段
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="POST"
      label="/datasets/{dataset_id}/retrieve"
      targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/retrieve' \\\n--header 'Authorization: Bearer {api_key}'\\\n--header 'Content-Type: application/json'\\\n--data-raw '{
    "query": "test",
    "retrieval_model": {
        "search_method": "keyword_search",
        "reranking_enable": false,
        "reranking_mode": null,
        "reranking_model": {
            "reranking_provider_name": "",
            "reranking_model_name": ""
        },
        "weights": null,
        "top_k": 1,
        "score_threshold_enabled": false,
        "score_threshold": null,
        "metadata_filtering_conditions": {
            "logical_operator": "and",
            "conditions": [
                {
                    "name": "document_name",
                    "comparison_operator": "contains",
                    "value": "test"
                }
            ]
        }
    }
}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/retrieve' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "query": "test",
        "retrieval_model": {
            "search_method": "keyword_search",
            "reranking_enable": false,
            "reranking_mode": null,
            "reranking_model": {
                "reranking_provider_name": "",
                "reranking_model_name": ""
            },
            "weights": null,
            "top_k": 2,
            "score_threshold_enabled": false,
            "score_threshold": null
        }
    }'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "query": {
        "content": "test"
      },
      "records": [
        {
          "segment": {
            "id": "7fa6f24f-8679-48b3-bc9d-bdf28d73f218",
            "position": 1,
            "document_id": "a8c6c36f-9f5d-4d7a-8472-f5d7b75d71d2",
            "content": "Operation guide",
            "answer": null,
            "word_count": 847,
            "tokens": 280,
            "keywords": [
              "install",
              "java",
              "base",
              "scripts",
              "jdk",
              "manual",
              "internal",
              "opens",
              "add",
              "vmoptions"
            ],
            "index_node_id": "39dd8443-d960-45a8-bb46-7275ad7fbc8e",
            "index_node_hash": "0189157697b3c6a418ccf8264a09699f25858975578f3467c76d6bfc94df1d73",
            "hit_count": 0,
            "enabled": true,
            "disabled_at": null,
            "disabled_by": null,
            "status": "completed",
            "created_by": "dbcb1ab5-90c8-41a7-8b78-73b235eb6f6f",
            "created_at": 1728734540,
            "indexing_at": 1728734552,
            "completed_at": 1728734584,
            "error": null,
            "stopped_at": null,
            "document": {
              "id": "a8c6c36f-9f5d-4d7a-8472-f5d7b75d71d2",
              "data_source_type": "upload_file",
              "name": "readme.txt",
            }
          },
          "score": 3.730463140527718e-05,
          "tsne_position": null
        }
      ]
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/metadata'
  method='POST'
  title='新增元数据'
  name='#create_metadata'
/>
<Row>
  <Col>
    ### Params
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
    </Properties>
    ### Request Body
    <Properties>
      <Property name='segment' type='object' key='segment'>
        - <code>type</code> (string) 元数据类型,必填
        - <code>name</code> (string) 元数据名称,必填
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="POST"
      label="/datasets/{dataset_id}/metadata"
      targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/metadata' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json'\\\n--data-raw '{"type": "string", "name": "test"}'`}
    >
    ```bash {{ title: 'cURL' }}
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "id": "abc",
      "type": "string",
      "name": "test",
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/metadata/{metadata_id}'
  method='PATCH'
  title='更新元数据'
  name='#update_metadata'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='metadata_id' type='string' key='metadata_id'>
        元数据 ID
      </Property>
    </Properties>
    ### Request Body
    <Properties>
      <Property name='segment' type='object' key='segment'>
        - <code>name</code> (string) 元数据名称,必填
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="PATCH"
      label="/datasets/{dataset_id}/metadata/{metadata_id}"
      targetCode={`curl --location --request PATCH '${props.apiBaseUrl}/datasets/{dataset_id}/metadata/{metadata_id}' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json'\\\n--data-raw '{"name": "test"}'`}
    >
    ```bash {{ title: 'cURL' }}
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "id": "abc",
      "type": "string",
      "name": "test",
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/metadata/{metadata_id}'
  method='DELETE'
  title='删除元数据'
  name='#delete_metadata'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='metadata_id' type='string' key='metadata_id'>
        元数据 ID
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="DELETE"
      label="/datasets/{dataset_id}/metadata/{metadata_id}"
      targetCode={`curl --location --request DELETE '${props.apiBaseUrl}/datasets/{dataset_id}/metadata/{metadata_id}' \\\n--header 'Authorization: Bearer {api_key}'`}
    >
    ```bash {{ title: 'cURL' }}
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/metadata/built-in/{action}'
  method='POST'
  title='启用/禁用内置元数据'
  name='#toggle_metadata'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
      <Property name='action' type='string' key='action'>
        disable/enable
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="POST"
      label="/datasets/{dataset_id}/metadata/built-in/{action}"
      targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/metadata/built-in/{action}' \\\n--header 'Authorization: Bearer {api_key}'`}
    >
    ```bash {{ title: 'cURL' }}
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/documents/metadata'
  method='POST'
  title='更新文档元数据'
  name='#update_documents_metadata'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
    </Properties>
    ### Request Body
    <Properties>
      <Property name='operation_data' type='object list' key='segments'>
        - <code>document_id</code> (string) 文档 ID
        - <code>metadata_list</code> (list) 元数据列表
          - <code>id</code> (string) 元数据 ID
          - <code>value</code> (string) 元数据值
          - <code>name</code> (string) 元数据名称
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="POST"
      label="/datasets/{dataset_id}/documents/metadata"
      targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/{dataset_id}/documents/metadata' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json'\\\n--data-raw '{"operation_data": [{"document_id": "document_id", "metadata_list": [{"id": "id", "value": "value", "name": "name"}]}]}'`}
    >
    ```bash {{ title: 'cURL' }}
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/{dataset_id}/metadata'
  method='GET'
  title='查询知识库元数据列表'
  name='#dataset_metadata_list'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string' key='dataset_id'>
        知识库 ID
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="GET"
      label="/datasets/{dataset_id}/metadata"
      targetCode={`curl --location --request GET '${props.apiBaseUrl}/datasets/{dataset_id}/metadata' \\\n--header 'Authorization: Bearer {api_key}'`}
    >
    ```bash {{ title: 'cURL' }}
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "doc_metadata": [
        {
          "id": "",
          "name": "name",
          "type": "string",
          "use_count": 0,
        },
        ...
      ],
      "built_in_field_enabled": true
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
 
<Heading
 url='/workspaces/current/models/model-types/text-embedding'
 method='GET'
 title='获取嵌入模型列表'
 name='#model_type_list'
/>
<Row>
   <Col>
     ### Query
     <Properties>
     </Properties>
   </Col>
   <Col sticky>
     <CodeGroup
       title="Request"
       tag="GET"
       label="/datasets/{dataset_id}"
       targetCode={`curl --location --location --request GET '${props.apiBaseUrl}/workspaces/current/models/model-types/text-embedding' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' `}
     >
     ```bash {{ title: 'cURL' }}
     curl --location --request GET '${props.apiBaseUrl}/workspaces/current/models/model-types/text-embedding' \
     --header 'Authorization: Bearer {api_key}' \
     --header 'Content-Type: application/json' \
     ```
     </CodeGroup>
     <CodeGroup title="Response">
     ```json {{ title: 'Response' }}
     {
       "data": [
           {
               "provider": "zhipuai",
               "label": {
                   "zh_Hans": "智谱 AI",
                   "en_US": "ZHIPU AI"
               },
               "icon_small": {
                   "zh_Hans": "http://127.0.0.1:5001/console/api/workspaces/current/model-providers/zhipuai/icon_small/zh_Hans",
                   "en_US": "http://127.0.0.1:5001/console/api/workspaces/current/model-providers/zhipuai/icon_small/en_US"
               },
               "icon_large": {
                   "zh_Hans": "http://127.0.0.1:5001/console/api/workspaces/current/model-providers/zhipuai/icon_large/zh_Hans",
                   "en_US": "http://127.0.0.1:5001/console/api/workspaces/current/model-providers/zhipuai/icon_large/en_US"
               },
               "status": "active",
               "models": [
                   {
                       "model": "embedding-3",
                       "label": {
                           "zh_Hans": "embedding-3",
                           "en_US": "embedding-3"
                       },
                       "model_type": "text-embedding",
                       "features": null,
                       "fetch_from": "predefined-model",
                       "model_properties": {
                           "context_size": 8192
                       },
                       "deprecated": false,
                       "status": "active",
                       "load_balancing_enabled": false
                   },
                   {
                       "model": "embedding-2",
                       "label": {
                           "zh_Hans": "embedding-2",
                           "en_US": "embedding-2"
                       },
                       "model_type": "text-embedding",
                       "features": null,
                       "fetch_from": "predefined-model",
                       "model_properties": {
                           "context_size": 8192
                       },
                       "deprecated": false,
                       "status": "active",
                       "load_balancing_enabled": false
                   },
                   {
                       "model": "text_embedding",
                       "label": {
                           "zh_Hans": "text_embedding",
                           "en_US": "text_embedding"
                       },
                       "model_type": "text-embedding",
                       "features": null,
                       "fetch_from": "predefined-model",
                       "model_properties": {
                           "context_size": 512
                       },
                       "deprecated": false,
                       "status": "active",
                       "load_balancing_enabled": false
                   }
               ]
           }
       ]
     }
     ```
     </CodeGroup>
   </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/tags'
  method='POST'
  title='新增知识库类型标签'
  name='#create_new_knowledge_tag'
/>
<Row>
  <Col>
    ### Request Body
    <Properties>
      <Property name='name' type='string'>
        (text) 新标签名称,必填,最大长度为 50
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="POST"
      label="/datasets/tags"
      targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/tags' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{"name": "testtag1"}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request POST '${props.apiBaseUrl}/datasets/tags' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' \
    --data-raw '{"name": "testtag1"}'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
        "id": "eddb66c2-04a1-4e3a-8cb2-75abd01e12a6", 
        "name": "testtag1", 
        "type": "knowledge", 
        "binding_count": 0
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/tags'
  method='GET'
  title='获取知识库类型标签'
  name='#get_knowledge_type_tags'
/>
<Row>
  <Col>
    ### Request Body
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="GET"
      label="/datasets/tags"
      targetCode={`curl --location --request GET '${props.apiBaseUrl}/datasets/tags' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request GET '${props.apiBaseUrl}/datasets/tags' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' 
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    [
        {
            "id": "39d6934c-ed36-463d-b4a7-377fa1503dc0", 
            "name": "testtag1", 
            "type": "knowledge", 
            "binding_count": "0"
        }, 
        ...
    ]
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/tags'
  method='PATCH'
  title='修改知识库类型标签名称'
  name='#modify_knowledge_tag_name'
/>
<Row>
  <Col>
    ### Request Body
    <Properties>
      <Property name='name' type='string'>
        (text) 修改后的标签名称,必填,最大长度为 50
      </Property>
      <Property name='tag_id' type='string'>
        (text) 标签 ID,必填
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="PATCH"
      label="/datasets/tags"
      targetCode={`curl --location --request PATCH '${props.apiBaseUrl}/datasets/tags' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{"name": "testtag2", "tag_id": "e1a0a3db-ee34-4e04-842a-81555d5316fd"}`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request PATCH '${props.apiBaseUrl}/datasets/tags' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' \
    --data-raw '{"name": "testtag2", "tag_id": "e1a0a3db-ee34-4e04-842a-81555d5316fd"}'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
        "id": "eddb66c2-04a1-4e3a-8cb2-75abd01e12a6", 
        "name": "tag-renamed", 
        "type": "knowledge", 
        "binding_count": 0
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/tags'
  method='DELETE'
  title='删除知识库类型标签'
  name='#delete_knowledge_tag'
/>
<Row>
  <Col>
    ### Request Body
    <Properties>
      <Property name='tag_id' type='string'>
        (text) 标签 ID,必填
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="DELETE"
      label="/datasets/tags"
      targetCode={`curl --location --request DELETE '${props.apiBaseUrl}/datasets/tags' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{ "tag_id": "e1a0a3db-ee34-4e04-842a-81555d5316fd"}`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request DELETE '${props.apiBaseUrl}/datasets/tags' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' \
    --data-raw '{"tag_id": "e1a0a3db-ee34-4e04-842a-81555d5316fd"}'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
 
    {"result": "success"}
    
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/tags/binding'
  method='POST'
  title='绑定知识库到知识库类型标签'
  name='#bind_dataset_to_knowledge_tag'
/>
<Row>
  <Col>
    ### Request Body
    <Properties>
      <Property name='tag_ids' type='list'>
        (list) 标签 ID 列表,必填
      </Property>
      <Property name='target_id' type='string'>
        (text) 知识库 ID,必填
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="POST"
      label="/datasets/tags/binding"
      targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/tags/binding' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{"tag_ids": ["65cc29be-d072-4e26-adf4-2f727644da29","1e5348f3-d3ff-42b8-a1b7-0a86d518001a"], "target_id": "a932ea9f-fae1-4b2c-9b65-71c56e2cacd6"}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request POST '${props.apiBaseUrl}/datasets/tags/binding' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' \
    --data-raw '{"tag_ids": ["65cc29be-d072-4e26-adf4-2f727644da29","1e5348f3-d3ff-42b8-a1b7-0a86d518001a"], "target_id": "a932ea9f-fae1-4b2c-9b65-71c56e2cacd6"}'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {"result": "success"}
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/tags/unbinding'
  method='POST'
  title='解绑知识库和知识库类型标签'
  name='#unbind_dataset_and_knowledge_tag'
/>
<Row>
  <Col>
    ### Request Body
    <Properties>
      <Property name='tag_id' type='string'>
        (text) 标签 ID,必填
      </Property>
      <Property name='target_id' type='string'>
        (text) 知识库 ID,必填
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="POST"
      label="/datasets/tags/unbinding"
      targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/tags/unbinding' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{"tag_id": "1e5348f3-d3ff-42b8-a1b7-0a86d518001a", "target_id": "a932ea9f-fae1-4b2c-9b65-71c56e2cacd6"}'`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request POST '${props.apiBaseUrl}/datasets/tags/unbinding' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' \
    --data-raw '{"tag_id": "1e5348f3-d3ff-42b8-a1b7-0a86d518001a", "target_id": "a932ea9f-fae1-4b2c-9b65-71c56e2cacd6"}'
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {"result": "success"}
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Heading
  url='/datasets/<uuid:dataset_id>/tags'
  method='POST'
  title='查询知识库已绑定的标签'
  name='#query_dataset_tags'
/>
<Row>
  <Col>
    ### Path
    <Properties>
      <Property name='dataset_id' type='string'>
        (text) 知识库 ID
      </Property>
    </Properties>
  </Col>
  <Col sticky>
    <CodeGroup
      title="Request"
      tag="POST"
      label="/datasets/<uuid:dataset_id>/tags"
      targetCode={`curl --location --request POST '${props.apiBaseUrl}/datasets/<uuid:dataset_id>/tags' \\\n--header 'Authorization: Bearer {api_key}' \\\n--header 'Content-Type: application/json' \\\n`}
    >
    ```bash {{ title: 'cURL' }}
    curl --location --request POST '${props.apiBaseUrl}/datasets/<uuid:dataset_id>/tags' \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' \
    ```
    </CodeGroup>
    <CodeGroup title="Response">
    ```json {{ title: 'Response' }}
    {
      "data": 
        [
          {"id": "4a601f4f-f8a2-4166-ae7c-58c3b252a524", 
          "name": "123"
          }, 
          ...
        ], 
      "total": 3
    }
    ```
    </CodeGroup>
  </Col>
</Row>
<hr className='ml-0 mr-0' />
<Row>
  <Col>
    ### 错误信息
    <Properties>
      <Property name='code' type='string' key='code'>
        返回的错误代码
      </Property>
    </Properties>
    <Properties>
      <Property name='status' type='number' key='status'>
        返回的错误状态
      </Property>
    </Properties>
    <Properties>
      <Property name='message' type='string' key='message'>
        返回的错误信息
      </Property>
    </Properties>
  </Col>
  <Col>
    <CodeGroup title="Example">
    ```json {{ title: 'Response' }}
      {
        "code": "no_file_uploaded",
        "message": "Please upload your file.",
        "status": 400
      }
    ```
    </CodeGroup>
  </Col>
</Row>
<table className="max-w-auto border-collapse border border-slate-400" style={{ maxWidth: 'none', width: 'auto' }}>
  <thead style={{ background: '#f9fafc' }}>
    <tr>
      <th className="p-2 border border-slate-300">code</th>
      <th className="p-2 border border-slate-300">status</th>
      <th className="p-2 border border-slate-300">message</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td className="p-2 border border-slate-300">no_file_uploaded</td>
      <td className="p-2 border border-slate-300">400</td>
      <td className="p-2 border border-slate-300">Please upload your file.</td>
    </tr>
    <tr>
      <td className="p-2 border border-slate-300">too_many_files</td>
      <td className="p-2 border border-slate-300">400</td>
      <td className="p-2 border border-slate-300">Only one file is allowed.</td>
    </tr>
    <tr>
      <td className="p-2 border border-slate-300">file_too_large</td>
      <td className="p-2 border border-slate-300">413</td>
      <td className="p-2 border border-slate-300">File size exceeded.</td>
    </tr>
    <tr>
      <td className="p-2 border border-slate-300">unsupported_file_type</td>
      <td className="p-2 border border-slate-300">415</td>
      <td className="p-2 border border-slate-300">File type not allowed.</td>
    </tr>
    <tr>
      <td className="p-2 border border-slate-300">high_quality_dataset_only</td>
      <td className="p-2 border border-slate-300">400</td>
      <td className="p-2 border border-slate-300">Current operation only supports 'high-quality' datasets.</td>
    </tr>
    <tr>
      <td className="p-2 border border-slate-300">dataset_not_initialized</td>
      <td className="p-2 border border-slate-300">400</td>
      <td className="p-2 border border-slate-300">The dataset is still being initialized or indexing. Please wait a moment.</td>
    </tr>
    <tr>
      <td className="p-2 border border-slate-300">archived_document_immutable</td>
      <td className="p-2 border border-slate-300">403</td>
      <td className="p-2 border border-slate-300">The archived document is not editable.</td>
    </tr>
    <tr>
      <td className="p-2 border border-slate-300">dataset_name_duplicate</td>
      <td className="p-2 border border-slate-300">409</td>
      <td className="p-2 border border-slate-300">The dataset name already exists. Please modify your dataset name.</td>
    </tr>
    <tr>
      <td className="p-2 border border-slate-300">invalid_action</td>
      <td className="p-2 border border-slate-300">400</td>
      <td className="p-2 border border-slate-300">Invalid action.</td>
    </tr>
    <tr>
      <td className="p-2 border border-slate-300">document_already_finished</td>
      <td className="p-2 border border-slate-300">400</td>
      <td className="p-2 border border-slate-300">The document has been processed. Please refresh the page or go to the document details.</td>
    </tr>
    <tr>
      <td className="p-2 border border-slate-300">document_indexing</td>
      <td className="p-2 border border-slate-300">400</td>
      <td className="p-2 border border-slate-300">The document is being processed and cannot be edited.</td>
    </tr>
    <tr>
      <td className="p-2 border border-slate-300">invalid_metadata</td>
      <td className="p-2 border border-slate-300">400</td>
      <td className="p-2 border border-slate-300">The metadata content is incorrect. Please check and verify.</td>
    </tr>
  </tbody>
</table>
<div className="pb-4" />
 |