Home / File/ apispec.json — langchain Source File

apispec.json — langchain Source File

Architecture documentation for apispec.json, a json file in the langchain codebase.

Entity Profile

Source Code

{
   "openapi": "3.0.1",
   "info": {
      "title": "Calculator Plugin",
      "description": "A plugin that allows the user to perform basic arithmetic operations like addition, subtraction, multiplication, division, power, and square root using ChatGPT.",
      "version": "v1"
   },
   "servers": [
      {
         "url": "https://chat-calculator-plugin.supportmirage.repl.co"
      }
   ],
   "paths": {
      "/calculator/{operation}/{a}/{b}": {
         "get": {
            "operationId": "calculate",
            "summary": "Perform a calculation",
            "parameters": [
               {
                  "in": "path",
                  "name": "operation",
                  "schema": {
                     "type": "string",
                     "enum": [
                        "add",
                        "subtract",
                        "multiply",
                        "divide",
                        "power"
                     ]
                  },
                  "required": true,
                  "description": "The operation to perform."
               },
               {
                  "in": "path",
                  "name": "a",
                  "schema": {
                     "type": "number"
                  },
                  "required": true,
                  "description": "The first operand."
               },
               {
                  "in": "path",
                  "name": "b",
                  "schema": {
                     "type": "number"
                  },
                  "required": true,
                  "description": "The second operand."
               }
            ],
            "responses": {
               "200": {
                  "description": "OK",
                  "content": {
                     "application/json": {
                        "schema": {
                           "$ref": "#/components/schemas/calculateResponse"
                        }
                     }
                  }
               }
            }
         }
      },
      "/calculator/sqrt/{a}": {
         "get": {
            "operationId": "sqrt",
            "summary": "Find the square root of a number",
            "parameters": [
               {
                  "in": "path",
                  "name": "a",
                  "schema": {
                     "type": "number"
                  },
                  "required": true,
                  "description": "The number to find the square root of."
               }
            ],
            "responses": {
               "200": {
                  "description": "OK",
                  "content": {
                     "application/json": {
                        "schema": {
                           "$ref": "#/components/schemas/calculateResponse"
                        }
                     }
                  }
               }
            }
         }
      }
   },
   "components": {
      "schemas": {
         "calculateResponse": {
            "type": "object",
            "properties": {
               "result": {
                  "type": "number",
                  "description": "The result of the calculation."
               }
            }
         }
      }
   }
}

Frequently Asked Questions

What does apispec.json do?
apispec.json is a source file in the langchain codebase, written in json.
Where is apispec.json in the architecture?
apispec.json is located at libs/langchain/tests/unit_tests/examples/test_specs/calculator/apispec.json (directory: libs/langchain/tests/unit_tests/examples/test_specs/calculator).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free