I’m running into something bizarre — the ChatGPT plugin doesn’t seem to be reading the YAML file correctly, and tries to hit my POST endpoint with a GET request (and trying to send json data along with it), even though the POST endpoint is clearly specified. This only happens with my Replit version; if I switch to my localhost version (same code), it’s not a problem.
I had to resort to adding a GET version w/ a query parameter to make it work.
Here’s the yaml:
openapi: 3.0.1
info:
title: "BabyAGI localhost"
version: 'v1'
description: "Plugin for running autonomous agents to complete a final goal using BabyAGI. To use, first set the objective, then use add the appropriate tasks to achieve the goal. The goal is achieved by running the agent. Then call Execute next task until all tasks are done. Verify tasks are dne by getting the task list. Plugin has access to real-time data and internet search results."
servers:
- url: http://localhost:8002
- url: https://101-babyagi-plugin.janzheng.repl.co/
paths:
/set_objective:
post:
summary: "Set the objective"
operationId: "setObjective"
requestBody:
required: true
content:
application/json:
schema:
type: "object"
properties:
objective:
type: "string"
responses:
200:
description: "Objective set successfully"
content:
application/json:
schema:
type: "object"
properties:
status:
type: "string"
get:
summary: "Set the objective with a query parameter"
operationId: "setObjective_get"
parameters:
- name: "objective"
in: "query"
required: true
schema:
type: "string"
responses:
200:
description: "Objective set successfully"
content:
application/json:
schema:
type: "object"
properties:
status:
type: "string"
/add_task:
post:
summary: "Add a new task"
operationId: "addTask"
requestBody:
required: true
content:
application/json:
schema:
type: "object"
properties:
task_name:
type: "string"
responses:
200:
description: "Task added successfully"
content:
application/json:
schema:
type: "object"
properties:
status:
type: "string"
get:
summary: "Add a new task with a query parameter"
operationId: "addTask_get"
parameters:
- name: "task"
in: "query"
required: true
schema:
type: "string"
responses:
200:
description: "Task added successfully"
content:
application/json:
schema:
type: "object"
properties:
status:
type: "string"
/get_task_list:
get:
summary: "Get the list of tasks"
operationId: "getTaskList"
responses:
200:
description: "Task list retrieved successfully"
content:
application/json:
schema:
type: "object"
properties:
task_list:
type: "array"
items:
type: "string"
/execute_next_task:
post:
summary: "Execute the next task and update the task list"
operationId: "executeNextTask"
responses:
200:
description: "Task executed successfully and task list updated"
content:
application/json:
schema:
type: "object"
properties:
task_id:
type: "integer"
task_name:
type: "string"
result:
type: "string"
new_tasks:
type: "array"
items:
type: "object"
properties:
task_name:
type: "string"
get:
summary: "Execute the next task and update the task list"
operationId: "executeNextTask"
responses:
200:
description: "Task executed successfully and task list updated"
content:
application/json:
schema:
type: "object"
properties:
task_id:
type: "integer"
task_name:
type: "string"
result:
type: "string"
new_tasks:
type: "array"
items:
type: "object"
properties:
task_name:
type: "string"