Skip to content

UploadDocumentRequest

Namespace AgentPrism · Assembly AgentPrism.AspNetCore.dll

Request to upload a document.

public sealed record UploadDocumentRequest : IEquatable<UploadDocumentRequest>

objectUploadDocumentRequest

IEquatable<UploadDocumentRequest>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Either Text or UploadDocumentRequest.Chunks is given; both or neither cannot be given (see KnowledgeIngestionService.IngestAsync).

public UploadDocumentRequest()

Ready-made chunks. If UploadDocumentChunk.Embedding is left empty, the server embeds it; if it is filled in, it is written as is.

public IReadOnlyList<UploadDocumentChunk>? Chunks { get; init; }

IReadOnlyList<UploadDocumentChunk>?

Source identifier. Uploading again with the same identifier replaces the old one.

public required string SourceId { get; init; }

string

Raw text. If given, the server chunks and embeds it.

public string? Text { get; init; }

string?

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(UploadDocumentRequest? other)

other UploadDocumentRequest?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(UploadDocumentRequest?, UploadDocumentRequest?)

Section titled “ operator ==(UploadDocumentRequest?, UploadDocumentRequest?)”
public static bool operator ==(UploadDocumentRequest? left, UploadDocumentRequest? right)

left UploadDocumentRequest?

right UploadDocumentRequest?

bool

operator !=(UploadDocumentRequest?, UploadDocumentRequest?)

Section titled “ operator !=(UploadDocumentRequest?, UploadDocumentRequest?)”
public static bool operator !=(UploadDocumentRequest? left, UploadDocumentRequest? right)

left UploadDocumentRequest?

right UploadDocumentRequest?

bool