RESEARCH

RESEARCH · Acciones GPT

GPT Companion

  • POST /api/research/searchSearch
Esquema original API
{
  "openapi": "3.1.0",
  "info": {
    "title": "GPT Companion",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://www.blocksandarrows.com",
      "description": "Development server"
    }
  ],
  "components": {
    "schemas": {},
    "parameters": {}
  },
  "paths": {
    "/api/research/search": {
      "post": {
        "summary": "Search",
        "x-openai-isConsequential": false,
        "operationId": "post_SearchRoute",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string"
                  },
                  "minYear": {
                    "type": "number"
                  },
                  "maxYear": {
                    "type": "number"
                  },
                  "minCitedCount": {
                    "type": "number"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "journal-article",
                      "book",
                      "book-chapter",
                      "proceedings-article",
                      "report",
                      "working-paper",
                      "dataset",
                      "posted-content",
                      "thesis",
                      "monograph",
                      "peer-review",
                      "other"
                    ]
                  },
                  "language": {
                    "type": "string",
                    "enum": [
                      "en",
                      "ru",
                      "fr",
                      "de",
                      "es",
                      "zh",
                      "ja",
                      "it",
                      "pt",
                      "ar",
                      "ko",
                      "nl",
                      "sv",
                      "pl",
                      "hi"
                    ]
                  },
                  "page": {
                    "type": "number"
                  },
                  "countPerPage": {
                    "type": "number"
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "answer from api",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "answer": {
                      "type": "string",
                      "description": "How to reply to the user"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Error while searching",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorMessage": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "errorMessage"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {}
}