Text Chunking
Every registered text chunking instance operation, with source-derived inputs, outputs, access policy, and errors.
This reference covers 2 HTTP operations registered by the Akasha daemon. Call these paths on your instance base URL. See authentication, errors, and coverage before integrating.
| Method | Path | Operation |
|---|---|---|
POST | /v1/text/chunk | Chunk text |
GET | /v1/text/chunk/config | Chunk config |
POST /v1/text/chunk
Chunk text
| Availability | Source contract |
|---|---|
| Registration | always registered |
| Runtime service | No prefix-level service check; handler dependencies still apply. |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — ChunkTextRequest
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
text | String | Yes | |
config | Option<chunking::ChunkingConfig> | No; optional or defaulted | Optional per-request chunking configuration override. |
struct ChunkTextRequest {
text: String,
/// Optional per-request chunking configuration override.
config: Option<chunking::ChunkingConfig>,
}Response
Declared return: Result<impl IntoResponse, DaemonError>
The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.
serde_json::json!({
"chunks": chunks,
"total": chunks.len(),
"config": chunker.config(),
})Errors and validation
Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:2796. Registration: akasha-daemon/src/main.rs:4401.
GET /v1/text/chunk/config
Chunk config
| Availability | Source contract |
|---|---|
| Registration | always registered |
| Runtime service | No prefix-level service check; handler dependencies still apply. |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
No typed JSON, query, or path extractor is declared in the handler signature. Headers or request objects may still be consumed; the signature below is authoritative.
Response
Declared return: Result<impl IntoResponse, DaemonError>
The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.
serde_json::json!({
"config": state.chunker.config(),
})Errors and validation
Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:2814. Registration: akasha-daemon/src/main.rs:4402.