jamesone_1
10/28/2025, 8:17 AM---REQUEST OPTIONS---
---ERROR (InvalidAuthentication (401))---
ServiceError(
ServiceError {
source: ValidationException(
ValidationException {
message: Some(
"The document file name can only contain alphanumeric characters, whitespace characters, hyphens, parentheses, and square brackets. The name can't contain more than one consecutive whitespace character. Check that the file name conforms to these restrictions and retry your request.",
),
meta: ErrorMetadata {
code: Some(
"ValidationException",
),
message: Some(
"The document file name can only contain alphanumeric characters, whitespace characters, hyphens, parentheses, and square brackets. The name can't contain more than one consecutive whitespace character. Check that the file name conforms to these restrictions and retry your request.",
),
extras: Some(
{
"aws_request_id": "22222-7cde-222-bc2e-3190206ddafb",
},
),
},
},
),
A simple function which is given a PDF:
function Extract(
PDF: pdf
) -> StandardResponse {
client BedrockClaude
prompt #"
<role>You are a....</role>
{{ quotePDF }}
{{ ctx.output_format }}
"#
}
Calling it in TS:
const base64Pdf = Buffer.from(pdfBuffer).toString("base64")
const pdfObject = Pdf.fromBase64(base64Pdf)
const result = await b.Extract(pdfObject)
The fileName of the PDF is Template-Example.pdf
I think I am doing everything right 🤔jamesone_1
10/28/2025, 8:24 AM>=0.210
I guess I'll leave this here incase someone has the same problem?Vaibhav (BAML 🐑)
10/28/2025, 2:50 PM