AmazonBedrockEndpoint
Wisej.AI.Endpoints.AmazonBedrockEndpoint
Last updated
Wisej.AI.Endpoints.AmazonBedrockEndpoint
Last updated
Namespace: Wisej.AI.Endpoints
Assembly: Wisej.AI (3.5.0.0)
Represents an endpoint for connecting to Amazon Bedrock services.
This class is used to configure and manage connections to Amazon Bedrock endpoints, specifically for interacting with the Anthropic API.
Initializes a new instance of the class.
Sets default values for authentication, model, URL, and headers.
Adds messages to the payload.
payload
The payload to which messages are added.
session
The current session context.
messages
The list of messages to add.
Ensures the system message is complete and prepares the payload for sending.
Adds options to the message payload.
message
The message payload to modify.
session
The current session context.
Sets default values for temperature and max tokens in the message payload.
message
The message to convert.
Handles different input types, including text and images.
Reads the assistant's message from the response.
response
The response containing the assistant's message.
message
The message object to populate.
Parses the response stream to extract the assistant's message content.
Reads the usage information from the reply.
message
The message object to update with usage data.
reply
The dynamic reply object containing usage information.
: Gets or sets the authentication method for the endpoint. (Default: "x-api-key"
)
: Gets or sets the model used for the endpoint. (Default: "claude-3-opus-20240229"
)
: Gets or sets the URL for the endpoint. (Default: "https://api.anthropic.com/v1/messages"
)
Builds a message object from a instance.
Returns: . A dynamic object representing the message.