Commit 555bfc9
committed
fix: send images as filePart entries (partId='image') instead of base64 in JSON
PubNub publishes are size-capped (~32KB default); inlining a 100-300KB
base64 image into the textPart JSON exceeded that and failed with
'failed to publish request event'.
filePart hands the bytes to the SDK, which uploads anything >16KB via
the pre-signed URL flow (out-of-band of the PubNub message). The
PubNub message itself stays tiny — just an artifactRef pointing at
the upload session.
Pairs with the agent-card image input declaration (contentType
image/jpeg) and the handler change that reads file parts via
ctx.download_input_artifact(part).1 parent 0b704ba commit 555bfc9
1 file changed
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
305 | 317 | | |
306 | 318 | | |
307 | | - | |
| 319 | + | |
308 | 320 | | |
309 | 321 | | |
310 | 322 | | |
| |||
0 commit comments