Adapter reranking API

The reranking API from Adapter — 1 operation(s) for reranking.

OpenAPI Specification

adapter-reranking-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Adapter Adapter API reranking API
  version: 0.1.0
tags:
- name: reranking
paths:
  /users/me/reranking:
    post:
      tags:
      - reranking
      summary: Reranking
      operationId: reranking_users_me_reranking_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RerankingRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RerankingResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
components:
  schemas:
    RerankingResponse:
      properties:
        options:
          items:
            $ref: '#/components/schemas/RankedOption'
          type: array
          title: Options
      type: object
      required:
      - options
      title: RerankingResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RankedOption:
      properties:
        option:
          title: Option
        score:
          type: number
          title: Score
        reasoning:
          anyOf:
          - type: string
          - type: 'null'
          title: Reasoning
      type: object
      required:
      - option
      - score
      title: RankedOption
    RerankingRequest:
      properties:
        options:
          items: {}
          type: array
          title: Options
        context:
          type: string
          title: Context
        reasoning:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Reasoning
          default: false
      type: object
      required:
      - options
      - context
      title: RerankingRequest
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
  securitySchemes:
    HTTPBasic:
      type: http
      scheme: basic
    HTTPBearer:
      type: http
      scheme: bearer