AmazonBedrockEndpoint
Wisej.AI.Endpoints.AmazonBedrockEndpoint
Namespace: Wisej.AI.Endpoints
Assembly: Wisej.AI (3.5.0.0)
Represents an endpoint for connecting to Amazon Bedrock services.
public class AmazonBedrockEndpoint : SmartHttpEndpoint
This class is used to configure and manage connections to Amazon Bedrock endpoints, specifically for interacting with the Anthropic API.
Constructors
AmazonBedrockEndpoint()

Initializes a new instance of the AmazonBedrockEndpoint class.
Sets default values for authentication, model, URL, and headers.
Properties
Authentication

String: Gets or sets the authentication method for the endpoint. (Default: "x-api-key"
)
Model

String: Gets or sets the model used for the endpoint. (Default: "claude-3-opus-20240229"
)
URL

String: Gets or sets the URL for the endpoint. (Default: "https://api.anthropic.com/v1/messages"
)
Methods
AddMessages(payload, session, messages)

Adds messages to the payload.
Ensures the system message is complete and prepares the payload for sending.
AddOptions(message, session)

Adds options to the message payload.
Sets default values for temperature and max tokens in the message payload.
BuildMessage(message)

Builds a message object from a Message instance.
Returns: Object. A dynamic object representing the message.
Handles different input types, including text and images.
ReadAssistantMessage(response, message)

Reads the assistant's message from the response.
Parses the response stream to extract the assistant's message content.
ReadUsage(message, reply)

Reads the usage information from the reply.
Last updated