Hi, i’m trying to make my first chatgpt plugin, which calls the openai dall-e api to generate images through AI. I put the ai-plugin.json in the .well-known folder of one of my domain names and pointed it to the openapi.yaml. In the openapi.yaml i specified to call the dall-e apis to generate images. ChatGPT let me install the plugin and validate it, but when i try to use it, after chatgpt try to invoke it, it says “Error comunicating with plugin service”.
How can i understand/debug what is the problem ? The doc says that i can click on the arrows to see the api calls details, but there are no arrows to press or any other details to check in the chat UI.
When i install the plugin it asks me the secret key and i put my openai key there, then i paste the verification code in the verificationcode fields inside ai-plugin.json.
Here is my ai-plugin.json and openapi.yaml (i’m omitting sensitive informations, like verificationcode and email).
ai-plugin.json:
{
"schema_version": "v1",
"name_for_human": "AI Image Generation Plugin",
"name_for_model": "ai_imagegen",
"description_for_human": "Plugin for generating images using OpenAI's image generation API.",
"description_for_model": "Plugin for generating images using OpenAI's image generation API. You can generate a number of images based on a text prompt. The OpenAI API Key you type in the ChatGPT UI is used to make the requests.",
"auth": {
"type": "service_http",
"authorization_type": "bearer",
"verification_tokens": {
"openai": "*********"
}
},
"api": {
"type": "openapi",
"url": "https://paginedacolorare.it/ai-plugin/imagegen/openapi.yaml",
"is_user_authenticated": true
},
"logo_url": "",
"contact_email": "****@gmail.com",
"legal_info_url": ""
}
And here is the openapi.yaml:
openapi: 3.0.0
info:
version: 1.0.0
title: OpenAI Image Generation API
servers:
- url: 'https://api.openai.com/v1'
paths:
/images/generations:
post:
summary: Generate images from text
operationId: generateImages
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
prompt:
type: string
description: Textual prompt for the AI to generate an image from
n:
type: integer
description: The number of images to generate
size:
type: string
description: The size of the generated images
responses:
'200':
description: A successful response
content:
application/json:
schema:
type: object
properties:
created:
type: integer
description: Unix timestamp of the time when the images were generated
data:
type: array
items:
type: object
properties:
url:
type: string
description: URL of the generated image
security:
- bearerAuth: []
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'Authorization format: Bearer {openai_api_key}'