Thich Nhat Hanh Shishya ❤️

Thich Nhat Hanh Shishya ❤️ · GPT-Aktionen

FastAPI

  • POST /searchRetrieve relevant talks by Thich Nhat Hanh based on user input .

    Retrieve relevant talks by Thich Nhat Hanh based on user input .

Ursprüngliches API-Schema
{
  "components": {
    "schemas": {
      "Document": {
        "description": "Class for storing a piece of text and associated metadata.",
        "properties": {
          "metadata": {
            "title": "Metadata",
            "type": "object",
            "properties": {
              "title": {
                "title": "Title of the document",
                "type": "string"
              },
              "source": {
                "title": "Link to the source document",
                "type": "string"
              }
            }
          },
          "page_content": {
            "title": "Page Content",
            "type": "string"
          },
          "type": {
            "default": "Document",
            "enum": [
              "Document"
            ],
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "page_content"
        ],
        "title": "Document",
        "type": "object"
      },
      "Error": {
        "description": "Error object that is modeled after an HTTP error format.",
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          },
          "status_code": {
            "title": "Status Code",
            "type": "integer"
          },
          "type": {
            "default": "error",
            "enum": [
              "error"
            ],
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "status_code",
          "message"
        ],
        "title": "Error",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "SearchInput": {
        "description": "Serializable base class.",
        "properties": {
          "content": {
            "type": "string",
            "title": "Content from user to search for relevant documents.",
            "description": "Content from user to search for relevant documents."
          }
        },
        "title": "SearchInput",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "objectΩ"
      },
      "api_searchInvokeRequest": {
        "properties": {
          "input": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SearchInput"
              }
            ],
            "description": "The input to the runnable.",
            "title": "Input"
          }
        },
        "required": [
          "input"
        ],
        "title": "api_searchInvokeRequest",
        "type": "object"
      },
      "api_searchInvokeResponse": {
        "description": "Base class for invoke request.",
        "properties": {
          "output": {
            "allOf": [
              {
                "$ref": "#/components/schemas/documents_output"
              }
            ],
            "description": "The output of the invocation.",
            "title": "Output"
          }
        },
        "required": [
          "output"
        ],
        "title": "api_searchInvokeResponse",
        "type": "object"
      },
      "documents_output": {
        "items": {
          "$ref": "#/components/schemas/Document"
        },
        "title": "documents_output",
        "type": "array"
      }
    }
  },
  "info": {
    "title": "FastAPI",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/search": {
      "post": {
        "description": "Retrieve relevant talks by Thich Nhat Hanh based on user input .",
        "operationId": "api_search",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api_searchInvokeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api_searchInvokeResponse"
                }
              }
            },
            "description": "A list of documents that match the user's input ."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Retrieve relevant talks by Thich Nhat Hanh based on user input ."
      }
    }
  },
  "servers": [
    {
      "url": "https://api.2in.ai"
    }
  ]
}