Class AnthropicMessage
Inherited Members
Namespace: Glitch9.AIDevKit.Anthropic
Assembly: .dll
Syntax
public class AnthropicMessage : AnthropicResponse
Properties
Container
Required. Information about the container used in this request.
This will be non-null if a container tool (e.g. code execution) was used.
Declaration
public AnthropicContainer Container { get; set; }
Property Value
Type | Description |
---|---|
AnthropicContainer |
Content
Required. Content generated by the model.
This is an array of content blocks, each of which has a type that determines its shape.
Example:
[{"type": "text", "text": "Hi, I'm Claude."}]
If the request input messages ended with an assistant turn, then the response content will continue directly from that last turn. You can use this to constrain the model's output.
For example, if the input messages were:
[{"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, {"role": "assistant", "content": "The best answer is ("}]
Then the response content might be: [{"type": "text", "text": "B)"}]
Declaration
public StringOrMany<ContentBlock> Content { get; set; }
Property Value
Type | Description |
---|---|
StringOrMany<ContentBlock> |
Model
Required. The model that handled the request.
Declaration
public string Model { get; set; }
Property Value
Type | Description |
---|---|
string |
Role
Required. Conversational role of the generated message.
This will always be "assistant".
Declaration
public ChatRole Role { get; set; }
Property Value
Type | Description |
---|---|
ChatRole |
StopReason
Required. The reason that we stopped.
This may be one the following values:
"end_turn": the model reached a natural stopping point "max_tokens": we exceeded the requested max_tokens or the model's maximum "stop_sequence": one of your provided custom stop_sequences was generated "tool_use": the model invoked one or more tools "pause_turn": we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue. "refusal": when streaming classifiers intervene to handle potential policy violations
In non-streaming mode this value is always non-null. In streaming mode, it is null in the message_start event and non-null otherwise.
Declaration
public StopReason? StopReason { get; set; }
Property Value
Type | Description |
---|---|
StopReason? |
StopSequence
Required. Which custom stop sequence was generated, if any.
This value will be a non-null string if one of your custom stop sequences was generated.
Declaration
public string StopSequence { get; set; }
Property Value
Type | Description |
---|---|
string |
Usage
Required. Billing and rate-limit usage.
Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.
Declaration
public AnthropicUsage Usage { get; set; }
Property Value
Type | Description |
---|---|
AnthropicUsage |