I have a custom GPT that I've given an action that should make a GET request to https www plantuml com.
The OpenAPI spec indicates that the response has Content-Type image/png.
(We're using deflated and encoded versions of the ASCII, that's not the problem, turns out GPT-4o can do that with python before running the action 🥳)
I've tried the URL with very few headers, and the only thing I can generate a 400 response by is to use a wrong Host header value.
The GPT can generate the URL fine by itself by examining the OpenAPI spec, but whenever it executes the action it gets a ClientResponseError.
See spec & request below. Assistance appreciated. 🙂
(Removed :// and . from domains to not break rules)
OpenAPI spec:
openapi: 3.1.0
info:
title: ...
description: ...
version: 1.0.0
servers:
- url: https www plantuml com
paths:
/plantuml/png/{encodedDiagram}:
get:
operationId: getPlantUmlPng
summary: "..."
description: "..."
parameters:
- name: encodedDiagram
in: path
required: true
schema:
type: string
description: "Encoded PlantUML diagram"
responses:
'200':
description: "A PNG image of the diagram"
content:
image/png:
schema:
type: string
format: binary
'301':
description: "Redirect, follow Location header"
headers:
Location:
# omitted
'400': # omitted
'500': # omitted
GPT request:
{
"domain": "plantuml com",
"method": "get",
"path": "/plantuml/png/{encodedDiagram}",
"operation": "getPlantUmlPng",
"operation_hash": "b925a73e3c1bb0724bf434aa22d46909b3fdba14",
"is_consequential": false,
"params": {
"encodedDiagram": "SoWkIImgAStDuNBAJrBGjLDmpCbCJbMmKiX8pSd9vt98pKi1IW80"
}
}