The Diet Search for GPTs

The Diet Search for GPTs · GPT 작업

Japanese Diet Proceedings Search API

This is a plugin for searching parliamentary proceedings operated by Automatic Processing Inc.

  • POST /queryQuery Main
원본 API 스키마
{
  "openapi": "3.0.2",
  "info": {
    "title": "Japanese Diet Proceedings Search API",
    "version": "0.1.0",
    "description": "This is a plugin for searching parliamentary proceedings operated by Automatic Processing Inc."
  },
  "servers": [
    {
      "url": "https://the-diet-record.automation.jp",
      "description": "production environment"
    }
  ],
  "paths": {
    "/query": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "operationId": "query_main_query_post",
        "summary": "Query Main"
      }
    }
  },
  "components": {
    "schemas": {
      "DocumentChunkMetadata": {
        "title": "DocumentChunkMetadata",
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/Source"
          },
          "source_id": {
            "title": "Source Id",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          },
          "creation_date": {
            "title": "Creation Date",
            "type": "string"
          },
          "the_Diet_member": {
            "title": "The Diet Member",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          }
        }
      },
      "DocumentChunkWithScore": {
        "title": "DocumentChunkWithScore",
        "required": [
          "text",
          "metadata",
          "score"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "text": {
            "title": "Text",
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/DocumentChunkMetadata"
          },
          "score": {
            "title": "Score",
            "type": "number"
          }
        }
      },
      "HTTPValidationError": {
        "title": "HTTPValidationError",
        "type": "object",
        "properties": {
          "detail": {
            "title": "Detail",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            }
          }
        }
      },
      "Query": {
        "title": "Query",
        "required": [
          "topic"
        ],
        "type": "object",
        "properties": {
          "topic": {
            "title": "Topic",
            "type": "string"
          },
          "top_k": {
            "title": "Top K",
            "default": 5,
            "type": "integer"
          },
          "start_date": {
            "title": "Start Date",
            "type": "string"
          },
          "end_date": {
            "title": "End Date",
            "type": "string"
          },
          "the_Diet_member": {
            "title": "The Diet Member",
            "type": "string"
          }
        }
      },
      "QueryRequest": {
        "title": "QueryRequest",
        "required": [
          "topic"
        ],
        "type": "object",
        "properties": {
          "topic": {
            "title": "Topic",
            "description": "Sentence to be searched",
            "type": "string"
          },
          "top_k": {
            "title": "Top K",
            "description": "Number of returns",
            "default": 5,
            "type": "integer"
          },
          "start_date": {
            "title": "Start Date",
            "type": "string"
          },
          "end_date": {
            "title": "End Date",
            "type": "string"
          },
          "the_Diet_member": {
            "title": "The Diet Member",
            "description": "Diet member",
            "type": "string"
          }
        },
        "example": {
          "topic": "\u6700\u8fd1\u3001\u79c1\u305f\u3061\u306e\u751f\u6d3b\u8cbb\u306f\u6025\u6fc0\u306b\u4e0a\u6607\u3057\u3066\u3044\u307e\u3059\u3002\u98df\u54c1\u3001\u4ea4\u901a\u8cbb\u3001\u5149\u71b1\u8cbb\u306a\u3069\u3001\u65e5\u3005\u306e\u751f\u6d3b\u306b\u5fc5\u8981\u306a\u3082\u306e\u5168\u3066\u304c\u5024\u4e0a\u304c\u308a\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u3002\u3053\u308c\u306f\u79c1\u305f\u3061\u306e\u751f\u6d3b\u3092\u5927\u304d\u304f\u5727\u8feb\u3057\u3001\u751f\u6d3b\u306e\u8cea\u3092\u4f4e\u4e0b\u3055\u305b\u3066\u3044\u307e\u3059\u3002\u7279\u306b\u4f4e\u6240\u5f97\u8005\u3084\u9ad8\u9f62\u8005\u306b\u3068\u3063\u3066\u306f\u3001\u751f\u6d3b\u304c\u56f0\u96e3\u306b\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u554f\u984c\u306f\u3001\u79c1\u305f\u3061\u4e00\u4eba\u4e00\u4eba\u3060\u3051\u3067\u306a\u304f\u3001\u56fd\u5168\u4f53\u304c\u76f4\u9762\u3057\u3066\u3044\u308b\u8ab2\u984c\u3067\u3059\u3002\r\n\u3053\u306e\u3088\u3046\u306a\u72b6\u6cc1\u3092\u53d7\u3051\u3066\u3001\u56fd\u4f1a\u3067\u3082\u751f\u6d3b\u8cbb\u306e\u9ad8\u9a30\u306b\u3064\u3044\u3066\u306e\u8b70\u8ad6\u304c\u6d3b\u767a\u306b\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002\u653f\u5e9c\u306f\u3053\u306e\u554f\u984c\u306b\u3069\u306e\u3088\u3046\u306b\u5bfe\u5fdc\u3059\u308b\u306e\u304b\u3001\u307e\u305f\u3001\u79c1\u305f\u3061\u306e\u751f\u6d3b\u3092\u5b88\u308b\u305f\u3081\u306b\u4f55\u3092\u3059\u308b\u3079\u304d\u306a\u306e\u304b\u3001\u305d\u306e\u65b9\u7b56\u304c\u6a21\u7d22\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u79c1\u305f\u3061\u306f\u3001\u56fd\u4f1a\u306e\u8b70\u8ad6\u3092\u6ce8\u8996\u3057\u3001\u9069\u5207\u306a\u5bfe\u7b56\u304c\u8b1b\u3058\u3089\u308c\u308b\u3053\u3068\u3092\u671f\u5f85\u3057\u3066\u3044\u307e\u3059\u3002",
          "top_k": 5,
          "start_date": "2021-04-30",
          "end_date": "2023-04-30",
          "the_Diet_member": "\u5cb8\u7530\u6587\u96c4"
        }
      },
      "QueryResponse": {
        "title": "QueryResponse",
        "required": [
          "results"
        ],
        "type": "object",
        "properties": {
          "results": {
            "title": "Results",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueryResult"
            }
          }
        }
      },
      "QueryResult": {
        "title": "QueryResult",
        "required": [
          "results"
        ],
        "type": "object",
        "properties": {
          "query": {
            "$ref": "#/components/schemas/Query",
            "description": "Sentence retrieved"
          },
          "results": {
            "title": "Results",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentChunkWithScore"
            }
          }
        }
      },
      "Source": {
        "title": "Source",
        "description": "An enumeration.",
        "enum": [
          "outside"
        ],
        "type": "string"
      },
      "ValidationError": {
        "title": "ValidationError",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "type": "object",
        "properties": {
          "loc": {
            "title": "Location",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            }
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        }
      }
    }
  }
}