Class TextContent
- Namespace
- AnthropicClient.Models
- Assembly
- AnthropicClient.dll
Represents text content that is part of a message.
public class TextContent : Content
- Inheritance
-
TextContent
- Inherited Members
Constructors
TextContent(string)
Initializes a new instance of the TextContent class.
public TextContent(string text)
Parameters
text
stringThe text of the content.
Exceptions
- ArgumentNullException
Thrown when the text is null.
TextContent(string, CacheControl)
Initializes a new instance of the TextContent class.
public TextContent(string text, CacheControl cacheControl)
Parameters
text
stringThe text of the content.
cacheControl
CacheControlThe cache control to be used for the content.
Exceptions
- ArgumentNullException
Thrown when the text or cache control is null.
Properties
Text
Gets the text of the content.
public string Text { get; init; }