![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@ai-sdk/anthropic
Advanced tools
Note: The Anthropic API does not support streaming tool calls.
The Anthropic provider contains language model support for the Anthropic Messages API.
It creates language model objects that can be used with the generateText
and streamText
AI functions.
The Anthropic provider is available in the @ai-sdk/anthropic
module. You can install it with
npm i @ai-sdk/anthropic
You can import createAnthropic
from @ai-sdk/anthropic
and create a provider instance with various settings:
import { createAnthropic } from '@ai-sdk/anthropic';
const anthropic = createAnthropic({
// optional base URL for proxies etc.:
baseURL: '',
// optional API key, default to env property ANTHROPIC_API_KEY:
apiKey: '',
// optional custom headers:
headers: {
'custom-header': 'value',
},
});
The AI SDK also provides a shorthand anthropic
import with a Anthropic provider instance that uses defaults:
import { anthropic } from '@ai-sdk/anthropic';
You can create models that call the Anthropic Messages API using the provider instance.
The first argument is the model id, e.g. claude-3-haiku-20240307
.
Some models have multi-modal capabilities.
const model = anthropic('claude-3-haiku-20240307');
Anthropic Messages` models support also some model specific settings that are not part of the standard call settings. You can pass them as an options argument:
const model = anthropic('claude-3-haiku-20240307', {
topK: 0.2,
});
FAQs
The **[Anthropic provider](https://sdk.vercel.ai/providers/ai-sdk-providers/anthropic)** for the [AI SDK](https://sdk.vercel.ai/docs) contains language model support for the [Anthropic Messages API](https://docs.anthropic.com/claude/reference/messages_pos
The npm package @ai-sdk/anthropic receives a total of 0 weekly downloads. As such, @ai-sdk/anthropic popularity was classified as not popular.
We found that @ai-sdk/anthropic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.