Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@anthropic-ai/bedrock-sdk
Advanced tools
The official TypeScript library for the Anthropic Bedrock API
This library provides convenient access to the Anthropic Bedrock API.
For the non-Bedrock Anthropic API at api.anthropic.com, see @anthropic-ai/sdk
.
npm install --save @anthropic-ai/bedrock-sdk
# or
yarn add @anthropic-ai/bedrock-sdk
import { AnthropicBedrock } from '@anthropic-ai/bedrock-sdk';
// Note: this assumes you have configured AWS credentials in a way
// that the AWS Node SDK will recognise, typicaly a shared `~/.aws/credentials`
// file or `AWS_ACCESS_KEY_ID` & `AWS_SECRET_ACCESS_KEY` environment variables.
//
// https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/modules/_aws_sdk_credential_provider_node.html
const anthropic = new AnthropicBedrock();
async function main() {
const message = await anthropic.messages.create({
model: 'anthropic.claude-3-sonnet-20240229-v1:0',
messages: [
{
role: 'user',
content: 'Hello!',
},
],
max_tokens: 1024,
});
console.log(message);
}
main();
For more details on how to use the SDK, see the README.md for the main Anthropic SDK which this library extends.
TypeScript >= 4.5 is supported.
The following runtimes are supported:
import { AnthropicBedrock } from "npm:@anthropic-ai/bedrock-sdk"
."node"
environment ("jsdom"
is not supported at this time).Note that React Native is not supported at this time.
If you are interested in other runtime environments, please open or upvote an issue on GitHub.
FAQs
The official TypeScript library for the Anthropic Bedrock API
The npm package @anthropic-ai/bedrock-sdk receives a total of 28,261 weekly downloads. As such, @anthropic-ai/bedrock-sdk popularity was classified as popular.
We found that @anthropic-ai/bedrock-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.