Table of Contents

Constructor DocumentMetadata

Namespace
LMKit.Retrieval
Assembly
LM-Kit.NET.dll

DocumentMetadata(Attachment, string, string, MetadataCollection)

Initializes a new instance of the DocumentRag.DocumentMetadata class.

public DocumentMetadata(Attachment attachment, string id = null, string sourceUri = null, MetadataCollection customMetadata = null)

Parameters

attachment Attachment

The document attachment. The Name is initialized from Name.

id string

An optional unique identifier for the document. If not specified or empty, a new Guid string is generated.

sourceUri string

An optional URI (URL, path, or identifier) for locating the original document.

customMetadata MetadataCollection

Optional custom metadata to attach to all sections from this document.

Exceptions

ArgumentNullException

Thrown if attachment is null.

DocumentMetadata(string, string, string, MetadataCollection)

Initializes a new instance of the DocumentRag.DocumentMetadata class with a specified name.

public DocumentMetadata(string name, string id = null, string sourceUri = null, MetadataCollection customMetadata = null)

Parameters

name string

The display name for the document.

id string

An optional unique identifier for the document. If not specified or empty, a new Guid string is generated.

sourceUri string

An optional URI (URL, path, or identifier) for locating the original document.

customMetadata MetadataCollection

Optional custom metadata to attach to all sections from this document.

Exceptions

ArgumentException

Thrown if name is null, empty, or whitespace.