AWS SDK Version 4 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

The input value for token counting. The value should be either an InvokeModel or Converse request body.

Inheritance Hierarchy

System.Object
  Amazon.BedrockRuntime.Model.CountTokensInput

Namespace: Amazon.BedrockRuntime.Model
Assembly: AWSSDK.BedrockRuntime.dll
Version: 3.x.y.z

Syntax

C#
public class CountTokensInput

The CountTokensInput type exposes the following members

Constructors

NameDescription
Public Method CountTokensInput()

Properties

NameTypeDescription
Public Property Converse Amazon.BedrockRuntime.Model.ConverseTokensRequest

Gets and sets the property Converse.

A Converse request for which to count tokens. Use this field when you want to count tokens for a conversation-based input that would be sent to the Converse operation.

Public Property InvokeModel Amazon.BedrockRuntime.Model.InvokeModelTokensRequest

Gets and sets the property InvokeModel.

An InvokeModel request for which to count tokens. Use this field when you want to count tokens for a raw text input that would be sent to the InvokeModel operation.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer