Class DocumentContent
- Namespace
- AnthropicClient.Models
- Assembly
- AnthropicClient.dll
Represents content from a document that is part of a message.
public class DocumentContent : Content
- Inheritance
-
DocumentContent
- Inherited Members
Constructors
DocumentContent(Source)
Initializes a new instance of the DocumentContent class with a document source.
public DocumentContent(Source source)
Parameters
source
SourceThe document source.
Exceptions
- ArgumentNullException
Thrown when the source is null.
DocumentContent(Source, CacheControl)
Initializes a new instance of the DocumentContent class with a document source and cache control.
public DocumentContent(Source source, CacheControl cacheControl)
Parameters
source
SourceThe document source.
cacheControl
CacheControlThe cache control to be used for the content.
Exceptions
- ArgumentNullException
Thrown when the source is null.
DocumentContent(string, string)
Initializes a new instance of the DocumentContent class.
public DocumentContent(string mediaType, string data)
Parameters
Exceptions
- ArgumentNullException
Thrown when the media type or data is null.
DocumentContent(string, string, CacheControl)
Initializes a new instance of the DocumentContent class.
public DocumentContent(string mediaType, string data, CacheControl cacheControl)
Parameters
mediaType
stringThe media type of the document.
data
stringThe data of the document.
cacheControl
CacheControlThe cache control to be used for the content.
Exceptions
- ArgumentNullException
Thrown when the media type, data, or cache control is null.
Properties
Citations
Gets whether citations are enabled for the document.
public CitationOption? Citations { get; init; }
Property Value
Context
Gets the context of the document.
public string? Context { get; init; }
Property Value
Source
Gets the source of the document.
public Source Source { get; init; }
Property Value
Title
Gets the title of the document.
public string? Title { get; init; }