Skip to content
Framework Docs

Documents

Create Batch Pipeline Documents
client.Pipelines.Documents.New(ctx, pipelineID, body) (*[]CloudDocument, error)
POST/api/v1/pipelines/{pipeline_id}/documents
Paginated List Pipeline Documents
client.Pipelines.Documents.List(ctx, pipelineID, query) (*PaginatedCloudDocuments[CloudDocument], error)
GET/api/v1/pipelines/{pipeline_id}/documents/paginated
Get Pipeline Document
client.Pipelines.Documents.Get(ctx, documentID, query) (*CloudDocument, error)
GET/api/v1/pipelines/{pipeline_id}/documents/{document_id}
Delete Pipeline Document
client.Pipelines.Documents.Delete(ctx, documentID, body) error
DELETE/api/v1/pipelines/{pipeline_id}/documents/{document_id}
Get Pipeline Document Status
client.Pipelines.Documents.GetStatus(ctx, documentID, query) (*ManagedIngestionStatusResponse, error)
GET/api/v1/pipelines/{pipeline_id}/documents/{document_id}/status
Sync Pipeline Document
client.Pipelines.Documents.Sync(ctx, documentID, body) (*PipelineDocumentSyncResponse, error)
POST/api/v1/pipelines/{pipeline_id}/documents/{document_id}/sync
List Pipeline Document Chunks
client.Pipelines.Documents.GetChunks(ctx, documentID, query) (*[]TextNode, error)
GET/api/v1/pipelines/{pipeline_id}/documents/{document_id}/chunks
Upsert Batch Pipeline Documents
client.Pipelines.Documents.Upsert(ctx, pipelineID, body) (*[]CloudDocument, error)
PUT/api/v1/pipelines/{pipeline_id}/documents
ModelsExpand Collapse
type CloudDocument struct{…}

Cloud document stored in S3.

ID string
Metadata map[string, any]
Text string
ExcludedEmbedMetadataKeys []stringoptional
ExcludedLlmMetadataKeys []stringoptional
PagePositions []int64optional

indices in the CloudDocument.text where a new page begins. e.g. Second page starts at index specified by page_positions[1].

StatusMetadata map[string, any]optional
type CloudDocumentCreate struct{…}

Create a new cloud document.

Metadata map[string, any]
Text string
ID stringoptional
ExcludedEmbedMetadataKeys []stringoptional
ExcludedLlmMetadataKeys []stringoptional
PagePositions []int64optional

indices in the CloudDocument.text where a new page begins. e.g. Second page starts at index specified by page_positions[1].

type TextNode struct{…}

Provided for backward compatibility.

ClassName stringoptional
Embedding []float64optional

Embedding of the node.

EndCharIdx int64optional

End char index of the node.

ExcludedEmbedMetadataKeys []stringoptional

Metadata keys that are excluded from text for the embed model.

ExcludedLlmMetadataKeys []stringoptional

Metadata keys that are excluded from text for the LLM.

ExtraInfo map[string, any]optional

A flat dictionary of metadata fields

ID stringoptional

Unique ID of the node.

MetadataSeperator stringoptional

Separator between metadata fields when converting to string.

MetadataTemplate stringoptional

Template for how metadata is formatted, with {key} and {value} placeholders.

Mimetype stringoptional

MIME type of the node content.

Relationships map[string, TextNodeRelationshipUnion]optional

A mapping of relationships to other node information.

One of the following:
type TextNodeRelationshipRelatedNodeInfo struct{…}
NodeID string
ClassName stringoptional
Hash stringoptional
Metadata map[string, any]optional
NodeType stringoptional
One of the following:
string
One of the following:
const TextNodeRelationshipRelatedNodeInfoNodeType1 TextNodeRelationshipRelatedNodeInfoNodeType = "1"
const TextNodeRelationshipRelatedNodeInfoNodeType2 TextNodeRelationshipRelatedNodeInfoNodeType = "2"
const TextNodeRelationshipRelatedNodeInfoNodeType3 TextNodeRelationshipRelatedNodeInfoNodeType = "3"
const TextNodeRelationshipRelatedNodeInfoNodeType4 TextNodeRelationshipRelatedNodeInfoNodeType = "4"
const TextNodeRelationshipRelatedNodeInfoNodeType5 TextNodeRelationshipRelatedNodeInfoNodeType = "5"
string
type TextNodeRelationshipArray []TextNodeRelationshipArrayItem
NodeID string
ClassName stringoptional
Hash stringoptional
Metadata map[string, any]optional
NodeType stringoptional
One of the following:
string
One of the following:
const TextNodeRelationshipArrayItemNodeType1 TextNodeRelationshipArrayItemNodeType = "1"
const TextNodeRelationshipArrayItemNodeType2 TextNodeRelationshipArrayItemNodeType = "2"
const TextNodeRelationshipArrayItemNodeType3 TextNodeRelationshipArrayItemNodeType = "3"
const TextNodeRelationshipArrayItemNodeType4 TextNodeRelationshipArrayItemNodeType = "4"
const TextNodeRelationshipArrayItemNodeType5 TextNodeRelationshipArrayItemNodeType = "5"
string
StartCharIdx int64optional

Start char index of the node.

Text stringoptional

Text content of the node.

TextTemplate stringoptional

Template for how text is formatted, with {content} and {metadata_str} placeholders.