await anthropic.beta.messages.batches.create({
requests: [
{
custom_id: some_id,
params: {
betas: ['prompt-caching-2024-07-31', 'message-batches-2024-09-24'],
model: 'claude-3-5-sonnet-20240620',
max_tokens: 100,
system: [
{
text: very_long_text,
type: 'text',
cache_control: {
type: 'ephemeral'
}
}
],
messages: [
{
role: 'user',
content: 'What is this very long text?',
}
]
}
},
]
})
Hey there,
I see I get a
system.0.cache_control: Extra inputs are not permittedormessages.0.cache_control: Extra inputs are not permittedwhen trying to use thecache_controlwith the Batch API. Is this by design? Looking at the docs I should be able to: https://docs.anthropic.com/en/docs/build-with-claude/message-batches#can-i-use-the-message-batches-api-in-conjunction-with-other-betasMy code: