List Pipeline Document Chunks
client.Pipelines.Documents.GetChunks(ctx, documentID, query) (*[]TextNode, error)
GET/api/v1/pipelines/{pipeline_id}/documents/{document_id}/chunks
List Pipeline Document Chunks
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/llamacloud-prod-go"
"github.com/stainless-sdks/llamacloud-prod-go/option"
)
func main() {
client := llamacloudprod.NewClient(
option.WithAPIKey("My API Key"),
)
textNodes, err := client.Pipelines.Documents.GetChunks(
context.TODO(),
"document_id",
llamacloudprod.PipelineDocumentGetChunksParams{
PipelineID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", textNodes)
}
[
{
"class_name": "class_name",
"embedding": [
0
],
"end_char_idx": 0,
"excluded_embed_metadata_keys": [
"string"
],
"excluded_llm_metadata_keys": [
"string"
],
"extra_info": {
"foo": "bar"
},
"id_": "id_",
"metadata_seperator": "metadata_seperator",
"metadata_template": "metadata_template",
"mimetype": "mimetype",
"relationships": {
"foo": {
"node_id": "node_id",
"class_name": "class_name",
"hash": "hash",
"metadata": {
"foo": "bar"
},
"node_type": "1"
}
},
"start_char_idx": 0,
"text": "text",
"text_template": "text_template"
}
]Returns Examples
[
{
"class_name": "class_name",
"embedding": [
0
],
"end_char_idx": 0,
"excluded_embed_metadata_keys": [
"string"
],
"excluded_llm_metadata_keys": [
"string"
],
"extra_info": {
"foo": "bar"
},
"id_": "id_",
"metadata_seperator": "metadata_seperator",
"metadata_template": "metadata_template",
"mimetype": "mimetype",
"relationships": {
"foo": {
"node_id": "node_id",
"class_name": "class_name",
"hash": "hash",
"metadata": {
"foo": "bar"
},
"node_type": "1"
}
},
"start_char_idx": 0,
"text": "text",
"text_template": "text_template"
}
]