Kyori
08/27/2025, 2:23 PMIt looks like you mentioned a PDF, but I don't see an attached file. Please upload the PDF document you'd like summarized, and I'll be happy to help! when I run the test.Kyori
08/27/2025, 2:25 PMfunction ExtractFromPdf(testPdf: pdf) -> string {
client ResponsesClient
prompt #"
{{ _.role("user") }}
Summarize the PDF
{{ testPdf }}
"#
}
test TestName {
functions [ExtractFromPdf]
args {
testPdf { url "https://arxiv.org/pdf/2305.08675" }
}
}
---
client<llm> ResponsesClient {
provider "openai-responses"
options {
model "gpt-4.1"
api_key env.OPENAI_API_KEY
}
}prrao
08/27/2025, 2:36 PMprrao
08/27/2025, 2:37 PMKyori
08/27/2025, 3:02 PMclass Summary {
summaryText string
}
function ExtractFromPdf(testPdf: pdf) -> Summary {
client ResponsesClient
prompt #"
Summarize the PDF
{{ ctx.output_format }}
{{ _.role("user") }}
{{ testPdf }}
"#
}
test TestName {
functions [ExtractFromPdf]
args {
testPdf { url "https://arxiv.org/pdf/2305.08675" }
}
}
produces the following curl
curl -X POST 'https://api.openai.com/v1/responses' -H "authorization: Bearer $OPENAI_API_KEY" -H "content-type: application/json" -d "{
\"model\": \"gpt-4.1\",
\"input\": \"system: Summarize the PDF\n\nAnswer in JSON using this schema:\n{\n summaryText: string,\n}\nuser: \"
}"
with the response
It appears you haven't uploaded a PDF file. Please upload the PDF you'd like summarized, and I will respond with the summary in JSON format.
The PDF is displaying correctly in the playground
https://cdn.discordapp.com/attachments/1410268576853790760/1410278299883671614/Screenshot_2025-08-27_at_10.01.59_AM.png?ex=68b06f84&is=68af1e04&hm=4bb30ff6d8f3066c7fb4d097b2f748fe2c6271427f65441c1f101f1957b0123d&prrao
08/27/2025, 5:13 PMbaml-sam
08/27/2025, 9:47 PMbaml-sam
08/28/2025, 7:08 PM