智信-agent
  1. 文件分析
智信-agent
  • 文件分析
    • 文件解析接口
      POST
    • 文本分段测试接口
      POST
    • 二进制文件
      POST
    • 二进制文件【json】
      POST
  • 知识库管理
    • 知识库初始化
      POST
    • 知识库召回测试
      POST
    • 知识库查询
      POST
    • 知识库文件添加
      POST
  • 工作流
    • AI生成prompt
      POST
    • 工作流运行
      POST
    • 单节点运行
      POST
    • 工作流保存接口
      POST
    • 代码生成
      POST
    • 获取工作流
      GET
  • MCP管理
    • 建立MCP服务器
      POST
    • MCP服务器工具的添加
      POST
    • MCP服务器工具的删除
      POST
    • MCP服务器工具的修改
      POST
    • 修改服务器名称和描述
      POST
    • 关闭MCP服务器
      POST
    • 查看所有的工具
      POST
    • 查询当前活跃的mcp服务器信息
      GET
    • 使用指定工具
      POST
  • 数据库开发
    • 数据库内部接口
      • 接口整合
      • 自然语言及SQL执行
      • schma查询
      • 单表的字段描述查询
      • all
    • 数据库工作流运行
      • 数据库工作流保存
      • 数据库单节点运行
  • 未命名接口
    GET
  • mineru
    POST
  1. 文件分析

文本分段测试接口

开发环境
http://172.29.50.10:2333
开发环境
http://172.29.50.10:2333
POST
/zhixin_agent/knowledge_database/indexing_estimate
针对单文件,切分知识库里的文章,把大段文字拆成小段,做知识库配置部分的分段预览功能使用

请求参数

Body 参数application/json

示例
{
    "info_list": {
        "data_source_type": "upload_file",
        "file_info_list": {
            "file_ids": [
                "c969a6f5-89e6-41b6-8dbc-cff137ec53b5"
            ]
        }
    },
    "user_id": "admin",
    "process_rule": {
        "rules": {
            "pre_processing_rules": [
                {
                    "id": "remove_extra_spaces",
                    "enabled": true
                },
                {
                    "id": "remove_urls_emails",
                    "enabled": false
                }
            ],
            "segmentation": {
                "separator": "\n\n, \n, 。, !, ?, ",
                "max_tokens": 500,
                "chunk_overlap": 50
            }
        },
        "mode": "custom"
    },
    "indexing_technique": "economy",
    "doc_form": "text_model",
    "doc_language": "Chinese"
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST 'http://172.29.50.10:2333/zhixin_agent/knowledge_database/indexing_estimate' \
--header 'Content-Type: application/json' \
--data-raw '{
    "info_list": {
        "data_source_type": "upload_file",
        "file_info_list": {
            "file_ids": [
                "c969a6f5-89e6-41b6-8dbc-cff137ec53b5"
            ]
        }
    },
    "user_id": "admin",
    "process_rule": {
        "rules": {
            "pre_processing_rules": [
                {
                    "id": "remove_extra_spaces",
                    "enabled": true
                },
                {
                    "id": "remove_urls_emails",
                    "enabled": false
                }
            ],
            "segmentation": {
                "separator": "\n\n, \n, 。, !, ?, ",
                "max_tokens": 500,
                "chunk_overlap": 50
            }
        },
        "mode": "custom"
    },
    "indexing_technique": "economy",
    "doc_form": "text_model",
    "doc_language": "Chinese"
}'

返回响应

🟢200成功
application/json
Body

示例
{
    "total_segments": 0,
    "preview": [
        {
            "content": "string",
            "child_chunks": null
        }
    ],
    "qa_preview": null
}
修改于 2025-07-03 07:28:04
上一页
文件解析接口
下一页
二进制文件
Built with