PulseAI-OpenAPI
  1. Dataset
PulseAI-OpenAPI
  • App
    • README
    • Send Chat Message
      POST
    • File Upload
      POST
    • Stop Generate
      POST
    • Message Feedback
      POST
    • Next Suggested Questions
      GET
    • Get Conversation History Messages
      GET
    • Get Conversations
      GET
    • Delete Conversation
      DELETE
    • Conversation Rename
      POST
    • Speech to Text
      POST
    • Text to Audio
      POST
    • Text to Audio V2
      POST
    • Get Application Information
      GET
    • Get Application Parameters
      GET
    • Get Application Meta Information
      GET
    • Create Chat
      POST
  • Dataset
    • README
    • Create a Document from Text
      POST
    • Create a Document from a File
      POST
    • Create an Empty Knowledge Base
      POST
    • Get Knowledge Base List
      GET
    • Delete a Knowledge Base
      DELETE
    • Update a Document with Text
      POST
    • Update a Document with a File
      POST
    • Get Document Embedding Status (Progress)
      GET
    • Delete a Document
      DELETE
    • Get the Document List of a Knowledge Base
      GET
    • Add Chunks to a Document
      POST
    • Get Chunks from a Document
      GET
    • Update a Chunk in a Document
      POST
    • Delete a Chunk in a Document
      DELETE
    • Retrieve Chunks from a Knowledge Base
      POST
  • Tenant
    • README
    • Get a List of Tenant Space Charactar
    • Figure txt2img
    • Get a List of Tenant Space Plot
    • Get a List of Tenant Space Audio
  • OpenAPI
    GET
  1. Dataset

Retrieve Chunks from a Knowledge Base

POST
https://api-platform.digitpulse.ai/v1/datasets/{dataset_id}/retrieve
Last modified:2025-01-13 09:31:33

Request

Path Params

Header Params

Body Params application/json

Example
{
    "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
    }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api-platform.digitpulse.ai/v1/datasets//retrieve' \
--header 'Authorization: ' \
--header 'X-Timestamp: 1739933362' \
--header 'X-Signature: 1739933362' \
--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": 1,
        "score_threshold_enabled": false,
        "score_threshold": null
    }
}'

Responses

🟢200Success
application/json
Body

Example
{
    "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",
                    "doc_type": null
                }
            },
            "score": 3.730463140527718e-05,
            "tsne_position": null
        }
    ]
}
Modified at 2025-01-13 09:31:33
Previous
Delete a Chunk in a Document
Next
README
Built with