Models
Anthropic offers a variety of differnet models depending on your needs. Pick the model that works best for you!
anthropic.claude-v1
This is the earliest version of Anthropic's general purpose LLMs.
Max Tokens
100k
Usage
import AnthropicBedrock from "anthropic-bedrock";
const anthropic = new AnthropicBedrock({
access_key: process.env["AWS_ACCESS_KEY"],
secret_key: process.env["AWS_SECRET_KEY"],
region: process.env["AWS_REGION"]
});
async function main() {
const completion = await anthropic.Completion.create(
model: "anthropic.claude-v1",
prompt: "In one sentence, what is good about the color blue?"
)
console.log(completion["completion"])
}
main();
anthropic.claude-v2
Anthropic's most powerful model, which excels at a wide range of tasks from sophisticated dialogue and creative content generation to detailed instruction following.
Max Tokens
100k
Usage
import AnthropicBedrock from "anthropic-bedrock";
const anthropic = new AnthropicBedrock({
access_key: process.env["AWS_ACCESS_KEY"],
secret_key: process.env["AWS_SECRET_KEY"],
region: process.env["AWS_REGION"]
});
async function main() {
const completion = await anthropic.Completion.create(
model: "anthropic.claude-v2",
prompt: "In one sentence, what is good about the color blue?"
)
console.log(completion["completion"])
}
main();
anthropic.claude-instant-v1
A faster and cheaper yet still very capable model, which can handle a range of tasks including casual dialogue, text analysis, summarization, and document question-answering.
Max Tokens
100k
Usage
import AnthropicBedrock from "anthropic-bedrock";
const anthropic = new AnthropicBedrock({
access_key: process.env["AWS_ACCESS_KEY"],
secret_key: process.env["AWS_SECRET_KEY"],
region: process.env["AWS_REGION"],
});
async function main() {
const completion = await anthropic.Completion.create({
model: "anthropic.claude-instant-v1",
prompt: "In one sentence, what is good about the color blue?",
});
console.log(completion["completion"]);
}
main();