info:
  title: NucliaDB Agentic API
  description: API reference for NucliaDB Agentic API endpoints. Requires a Knowledge
    Box API Key.
  version: v1
openapi: 3.1.0
servers:
- url: https://{region-x}.dp.stashify.cloud/api/v1
  description: Development server
tags:
- name: Agentic configs
  description: Agentic configuration endpoints.
- name: Ask
  description: Agentic Ask endpoints.
- name: MCP
  description: Model Context Protocol endpoints.
- name: Sources
  description: Agentic source endpoints.
paths:
  /kb/{kbid}/agentic_configs:
    get:
      tags:
      - Agentic configs
      summary: List agentic configurations
      operationId: list_agentic_configs_endpoint_api_v1_kb__kbid__agentic_configs_get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/AgenticConfigSchema'
                title: Response List Agentic Configs Endpoint Api V1 Kb  Kbid  Agentic
                  Configs Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/agentic_configs/schema:
    get:
      tags:
      - Agentic configs
      summary: Get agentic configuration schema
      operationId: get_agentic_config_schema_endpoint_api_v1_kb__kbid__agentic_configs_schema_get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Get Agentic Config Schema Endpoint Api V1 Kb  Kbid  Agentic
                  Configs Schema Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/agentic_configs/{agentic_id}:
    post:
      tags:
      - Agentic configs
      summary: Create agentic configuration
      operationId: create_agentic_config_endpoint_api_v1_kb__kbid__agentic_configs__agentic_id__post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: agentic_id
        in: path
        required: true
        schema:
          type: string
          title: Agentic Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgenticConfigSchema'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Agentic configs
      summary: Get agentic configuration
      operationId: get_agentic_config_endpoint_api_v1_kb__kbid__agentic_configs__agentic_id__get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: agentic_id
        in: path
        required: true
        schema:
          type: string
          title: Agentic Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgenticConfigSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Agentic configs
      summary: Update agentic configuration
      operationId: patch_agentic_config_endpoint_api_v1_kb__kbid__agentic_configs__agentic_id__patch
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: agentic_id
        in: path
        required: true
        schema:
          type: string
          title: Agentic Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgenticConfigSchema'
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Agentic configs
      summary: Delete agentic configuration
      operationId: delete_agentic_config_endpoint_api_v1_kb__kbid__agentic_configs__agentic_id__delete
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: agentic_id
        in: path
        required: true
        schema:
          type: string
          title: Agentic Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/ask:
    post:
      tags:
      - Ask
      summary: Ask Knowledge Box
      description: Ask questions on a Knowledge Box
      operationId: ask_knowledgebox_endpoint_api_v1_kb__kbid__ask_post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: x-ndb-client
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/NucliaDBClientType'
          default: api
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      - name: x-nucliadb-user
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Nucliadb-User
      - name: x-forwarded-for
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Forwarded-For
      - name: x-synchronous
        in: header
        required: false
        schema:
          type: boolean
          description: When set to true, outputs response as JSON in a non-streaming
            way. This is slower and requires waiting for entire answer to be ready.
          default: false
          title: X-Synchronous
        description: When set to true, outputs response as JSON in a non-streaming
          way. This is slower and requires waiting for entire answer to be ready.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AskRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncAskResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/mcp:
    post:
      tags:
      - MCP
      summary: Mcp Handler
      operationId: mcp_handler_api_v1_kb__kbid__mcp_post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: x-ndb-client
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/NucliaDBClientType'
          default: api
      - name: x-nucliadb-user
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Nucliadb-User
      - name: x-forwarded-for
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Forwarded-For
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - MCP
      summary: Mcp Handler
      operationId: mcp_handler_api_v1_kb__kbid__mcp_get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: x-ndb-client
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/NucliaDBClientType'
          default: api
      - name: x-nucliadb-user
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Nucliadb-User
      - name: x-forwarded-for
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Forwarded-For
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/resource/{rid}/ask:
    post:
      tags:
      - Ask
      summary: Ask a resource (by id)
      description: Ask questions to a resource
      operationId: resource_ask_endpoint_by_uuid_api_v1_kb__kbid__resource__rid__ask_post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: rid
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Rid
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      - name: x-ndb-client
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/NucliaDBClientType'
          default: api
      - name: x-nucliadb-user
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Nucliadb-User
      - name: x-forwarded-for
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Forwarded-For
      - name: x-synchronous
        in: header
        required: false
        schema:
          type: boolean
          description: When set to true, outputs response as JSON in a non-streaming
            way. This is slower and requires waiting for entire answer to be ready.
          default: false
          title: X-Synchronous
        description: When set to true, outputs response as JSON in a non-streaming
          way. This is slower and requires waiting for entire answer to be ready.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AskRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncAskResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/slug/{slug}/ask:
    post:
      tags:
      - Ask
      summary: Ask a resource (by slug)
      description: Ask questions to a resource
      operationId: resource_ask_endpoint_by_slug_api_v1_kb__kbid__slug__slug__ask_post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: slug
        in: path
        required: true
        schema:
          type: string
          title: Slug
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      - name: x-ndb-client
        in: header
        required: false
        schema:
          $ref: '#/components/schemas/NucliaDBClientType'
          default: api
      - name: x-nucliadb-user
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Nucliadb-User
      - name: x-forwarded-for
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Forwarded-For
      - name: x-synchronous
        in: header
        required: false
        schema:
          type: boolean
          description: When set to true, outputs response as JSON in a non-streaming
            way. This is slower and requires waiting for entire answer to be ready.
          default: false
          title: X-Synchronous
        description: When set to true, outputs response as JSON in a non-streaming
          way. This is slower and requires waiting for entire answer to be ready.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AskRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncAskResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/sources:
    get:
      tags:
      - Sources
      summary: List sources
      operationId: list_sources_endpoint_api_v1_kb__kbid__sources_get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  anyOf:
                  - $ref: '#/components/schemas/NucliaDBSourceSchema-Output'
                  - $ref: '#/components/schemas/PerplexitySourceSchema'
                  - $ref: '#/components/schemas/MCPSourceSchema'
                  - $ref: '#/components/schemas/GoogleSourceSchema'
                title: Response List Sources Endpoint Api V1 Kb  Kbid  Sources Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/sources/{source_id}:
    post:
      tags:
      - Sources
      summary: Create a source
      operationId: create_source_endpoint_api_v1_kb__kbid__sources__source_id__post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: source_id
        in: path
        required: true
        schema:
          type: string
          title: Source Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
              - $ref: '#/components/schemas/NucliaDBSourceSchema-Input'
              - $ref: '#/components/schemas/PerplexitySourceSchema'
              - $ref: '#/components/schemas/MCPSourceSchema'
              - $ref: '#/components/schemas/GoogleSourceSchema'
              title: Item
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Sources
      summary: Get a source
      operationId: get_source_endpoint_api_v1_kb__kbid__sources__source_id__get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: source_id
        in: path
        required: true
        schema:
          type: string
          title: Source Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/NucliaDBSourceSchema-Output'
                - $ref: '#/components/schemas/PerplexitySourceSchema'
                - $ref: '#/components/schemas/MCPSourceSchema'
                - $ref: '#/components/schemas/GoogleSourceSchema'
                title: Response Get Source Endpoint Api V1 Kb  Kbid  Sources  Source
                  Id  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Sources
      summary: Update a source
      operationId: patch_source_endpoint_api_v1_kb__kbid__sources__source_id__patch
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: source_id
        in: path
        required: true
        schema:
          type: string
          title: Source Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
              - $ref: '#/components/schemas/NucliaDBSourceSchema-Input'
              - $ref: '#/components/schemas/PerplexitySourceSchema'
              - $ref: '#/components/schemas/MCPSourceSchema'
              - $ref: '#/components/schemas/GoogleSourceSchema'
              title: Item
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Sources
      summary: Delete a source
      operationId: delete_source_endpoint_api_v1_kb__kbid__sources__source_id__delete
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: source_id
        in: path
        required: true
        schema:
          type: string
          title: Source Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
x-metadata:
  nucliadb_agentic_api:
    commit: 237dd8554e15d68efab8a60f7d30dcb2ede33f71
    last_updated: '2026-08-24T09:45:03.753875+00:00'
components:
  schemas:
    AgenticConfigSchema:
      properties:
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        rephrase:
          anyOf:
          - $ref: '#/components/schemas/AgenticRephraseConfiguration'
          - type: 'null'
        smart_agent:
          anyOf:
          - $ref: '#/components/schemas/AgenticSmartAgentConfiguration'
          - type: 'null'
        summarize:
          anyOf:
          - $ref: '#/components/schemas/AgenticSummarizeConfiguration'
          - type: 'null'
      type: object
      title: AgenticConfigSchema
    AgenticRephraseConfiguration:
      properties:
        ask_to:
          anyOf:
          - type: string
          - type: 'null'
          title: Ask To
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Prompt
        model:
          anyOf:
          - $ref: '#/components/schemas/LLMConfig'
          - type: 'null'
          default:
            _type: llm_config
            model_id: chatgpt-azure-4o-mini
        history:
          anyOf:
          - type: boolean
          - type: 'null'
          title: History
          default: true
      type: object
      title: AgenticRephraseConfiguration
    AgenticSmartAgentConfiguration:
      properties:
        mode:
          $ref: '#/components/schemas/AgenticSmartAgentMode'
          default: reactive
        extra_prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Extra Prompt
        models:
          anyOf:
          - $ref: '#/components/schemas/AgenticSmartAgentModels'
          - type: 'null'
        sources:
          items:
            type: string
          type: array
          title: Sources
        history:
          anyOf:
          - type: boolean
          - type: 'null'
          title: History
          default: true
      type: object
      title: AgenticSmartAgentConfiguration
    AgenticSmartAgentMode:
      type: string
      enum:
      - reactive
      - plan_execute
      title: AgenticSmartAgentMode
    AgenticSmartAgentModels:
      properties:
        context_validation:
          anyOf:
          - $ref: '#/components/schemas/LLMConfig'
          - type: 'null'
          default:
            _type: llm_config
            model_id: chatgpt-azure-4o-mini
        planner:
          anyOf:
          - $ref: '#/components/schemas/LLMConfig'
          - type: 'null'
          default:
            _type: llm_config
            model_id: chatgpt-4.1
        executor:
          anyOf:
          - $ref: '#/components/schemas/LLMConfig'
          - type: 'null'
          default:
            _type: llm_config
            model_id: chatgpt-4.1
      type: object
      title: AgenticSmartAgentModels
    AgenticSummarizeConfiguration:
      properties:
        user_prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: User Prompt
        system_prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: System Prompt
        conversational:
          type: boolean
          title: Conversational
          default: true
        model:
          anyOf:
          - $ref: '#/components/schemas/LLMConfig'
          - type: 'null'
          default:
            _type: llm_config
            model_id: chatgpt-azure-4o-mini
        history:
          anyOf:
          - type: boolean
          - type: 'null'
          title: History
          default: true
      type: object
      title: AgenticSummarizeConfiguration
    And_FieldFilterExpressionType_-Input:
      properties:
        operands:
          items:
            anyOf:
            - $ref: '#/components/schemas/And_FieldFilterExpressionType_-Input'
            - $ref: '#/components/schemas/Or_FieldFilterExpressionType_-Input'
            - $ref: '#/components/schemas/Not_FieldFilterExpressionType_-Input'
            - $ref: '#/components/schemas/Resource'
            - $ref: '#/components/schemas/Field'
            - $ref: '#/components/schemas/Keyword'
            - $ref: '#/components/schemas/DateCreated'
            - $ref: '#/components/schemas/DateModified'
            - $ref: '#/components/schemas/Label'
            - $ref: '#/components/schemas/ResourceMimetype'
            - $ref: '#/components/schemas/FieldMimetype'
            - $ref: '#/components/schemas/Entity-Input'
            - $ref: '#/components/schemas/Language'
            - $ref: '#/components/schemas/OriginTag'
            - $ref: '#/components/schemas/OriginMetadata'
            - $ref: '#/components/schemas/OriginPath'
            - $ref: '#/components/schemas/OriginSource'
            - $ref: '#/components/schemas/OriginCollaborator'
            - $ref: '#/components/schemas/nucliadb_models__filters__Generated'
          type: array
          minItems: 1
          title: And Operands
      additionalProperties: false
      type: object
      required:
      - operands
      title: And[FieldFilterExpressionType]
    And_FieldFilterExpressionType_-Output:
      additionalProperties: true
      type: object
    And_GraphPathQuery_:
      properties:
        operands:
          items:
            oneOf:
            - $ref: '#/components/schemas/And_GraphPathQuery_'
            - $ref: '#/components/schemas/Or_GraphPathQuery_'
            - $ref: '#/components/schemas/Not_GraphPathQuery_'
            - $ref: '#/components/schemas/GraphPath'
            - $ref: '#/components/schemas/SourceNode'
            - $ref: '#/components/schemas/DestinationNode'
            - $ref: '#/components/schemas/AnyNode'
            - $ref: '#/components/schemas/Relation-Input'
            - $ref: '#/components/schemas/nucliadb_models__graph__requests__Generated'
          type: array
          minItems: 1
          title: And Operands
      additionalProperties: false
      type: object
      required:
      - operands
      title: And[GraphPathQuery]
    And_KVFilterExpression_-Input:
      properties:
        operands:
          items:
            oneOf:
            - $ref: '#/components/schemas/And_KVFilterExpression_-Input'
            - $ref: '#/components/schemas/Or_KVFilterExpression_-Input'
            - $ref: '#/components/schemas/Not_KVFilterExpression_-Input'
            - $ref: '#/components/schemas/Eq'
            - $ref: '#/components/schemas/Inequalities'
            - $ref: '#/components/schemas/Contains'
          type: array
          minItems: 1
          title: And Operands
      additionalProperties: false
      type: object
      required:
      - operands
      title: And[KVFilterExpression]
    And_KVFilterExpression_-Output:
      additionalProperties: true
      type: object
    And_ParagraphFilterExpression_-Input:
      properties:
        operands:
          items:
            oneOf:
            - $ref: '#/components/schemas/And_ParagraphFilterExpression_-Input'
            - $ref: '#/components/schemas/Or_ParagraphFilterExpression_-Input'
            - $ref: '#/components/schemas/Not_ParagraphFilterExpression_-Input'
            - $ref: '#/components/schemas/Label'
            - $ref: '#/components/schemas/Kind'
          type: array
          minItems: 1
          title: And Operands
      additionalProperties: false
      type: object
      required:
      - operands
      title: And[ParagraphFilterExpression]
    And_ParagraphFilterExpression_-Output:
      additionalProperties: true
      type: object
    Answer:
      properties:
        text:
          type: string
          title: Text
        language:
          anyOf:
          - type: string
          - type: 'null'
          title: Language
        ids_paragraphs:
          items:
            type: string
          type: array
          title: Ids Paragraphs
      type: object
      required:
      - text
      - ids_paragraphs
      title: Answer
    AnyNode:
      properties:
        prop:
          type: string
          const: node
          title: Prop
          default: node
        value:
          anyOf:
          - type: string
          - type: 'null'
          title: Value
        match:
          $ref: '#/components/schemas/NodeMatchKindName'
          default: exact
        type:
          anyOf:
          - $ref: '#/components/schemas/RelationNodeType'
          - type: 'null'
          default: entity
        group:
          anyOf:
          - type: string
          - type: 'null'
          title: Group
      additionalProperties: false
      type: object
      title: AnyNode
    AskRequest:
      properties:
        audit_metadata:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          title: Audit metadata
          description: A dictionary containing optional audit-specific metadata, such
            as user_id, environment, or other contextual information. This metadata
            can be leveraged for filtering and analyzing activity logs in future operations.
            Each key-value pair represents a piece of metadata relevant to the user's
            request.
          examples:
          - environment: test
            user: my-user-123
        query:
          type: string
          maxLength: 20000
          title: Query
          description: The query to get a generative answer for
        agentic_config_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Agentic configuration ID
          description: The ID of the agentic configuration to use for this request.
            If not provided, the default retrieval and generation parameters of the
            Knowledge Box will be used. If provided, the parameters in the agentic
            configuration will override the parameters in the request. Note that the
            `query` field in the agentic configuration will be ignored, and the query
            in the request will be used instead.
        top_k:
          type: integer
          maximum: 200.0
          minimum: 1.0
          title: Top k
          description: The top most relevant results to fetch at the retrieval step.
            The maximum number of results allowed is 200.
          default: 20
        filter_expression:
          anyOf:
          - $ref: '#/components/schemas/FilterExpression-Input'
          - type: 'null'
          title: Filter resource by an expression
          description: 'Returns only documents that match this filter expression.Filtering
            examples can be found here: https://docs.nuclia.dev/docs/rag/advanced/search-filters
            This allows building complex filtering expressions and replaces the following
            parameters:`fields`, `filters`, `range_*`, `resource_filters`, `keyword_filters`.'
        fields:
          items:
            type: string
          type: array
          title: Fields
          description: 'The list of fields to search in. For instance: `a/title` to
            search only on title field. For more details on filtering by field, see:
            https://docs.nuclia.dev/docs/rag/advanced/search/#search-in-a-specific-field. '
          default: []
        filters:
          anyOf:
          - items:
              type: string
            type: array
          - items:
              $ref: '#/components/schemas/Filter'
            type: array
          title: Search Filters
          description: 'The list of filters to apply. Filtering examples can be found
            here: https://docs.nuclia.dev/docs/rag/advanced/search-filters'
          default: []
        keyword_filters:
          anyOf:
          - items:
              type: string
            type: array
          - items:
              $ref: '#/components/schemas/Filter'
            type: array
          title: Keyword filters
          description: 'List of keyword filter expressions to apply to the retrieval
            step. The text block search will only be performed on the documents that
            contain the specified keywords. The filters are case-insensitive, and
            only alphanumeric characters and spaces are allowed. Filtering examples
            can be found here: https://docs.nuclia.dev/docs/rag/advanced/search-filters'
          default: []
          examples:
          - - NLP
            - BERT
          - - all:
              - NLP
              - BERT
          - - Friedrich Nietzsche
            - Immanuel Kant
        vectorset:
          anyOf:
          - type: string
          - type: 'null'
          title: Vectorset
          description: Vectors index to perform the search in. If not provided, NucliaDB
            will use the default one
        min_score:
          anyOf:
          - type: number
          - $ref: '#/components/schemas/MinScore'
          - type: 'null'
          title: Minimum score
          description: Minimum score to filter search results. Results with a lower
            score will be ignored. Accepts either a float or a dictionary with the
            minimum scores for the bm25 and vector indexes. If a float is provided,
            it is interpreted as the minimum score for vector index search.
        features:
          items:
            $ref: '#/components/schemas/ChatOptions'
          type: array
          title: Chat features
          description: Features enabled for the chat endpoint. Semantic search is
            done if `semantic` is included. If `keyword` is included, the results
            will include matching paragraphs from the bm25 index. If `relations` is
            included, a graph of entities related to the answer is returned. `paragraphs`
            and `vectors` are deprecated, please use `keyword` and `semantic` instead
          default:
          - semantic
          - keyword
        range_creation_start:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Resource creation range start
          description: 'Resources created before this date will be filtered out of
            search results. Datetime are represented as a str in ISO 8601 format,
            like: 2008-09-15T15:53:00+05:00.'
        range_creation_end:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Resource creation range end
          description: 'Resources created after this date will be filtered out of
            search results. Datetime are represented as a str in ISO 8601 format,
            like: 2008-09-15T15:53:00+05:00.'
        range_modification_start:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Resource modification range start
          description: 'Resources modified before this date will be filtered out of
            search results. Datetime are represented as a str in ISO 8601 format,
            like: 2008-09-15T15:53:00+05:00.'
        range_modification_end:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Resource modification range end
          description: 'Resources modified after this date will be filtered out of
            search results. Datetime are represented as a str in ISO 8601 format,
            like: 2008-09-15T15:53:00+05:00.'
        show:
          items:
            $ref: '#/components/schemas/ResourceProperties'
          type: array
          title: Show metadata
          description: Controls which types of metadata are serialized on resources
            of search results
          default:
          - basic
        field_type_filter:
          items:
            $ref: '#/components/schemas/FieldTypeName'
          type: array
          title: Field type filter
          description: Define which field types are serialized on resources of search
            results
          default:
          - text
          - file
          - link
          - conversation
          - generic
          - key_value
        extracted:
          items:
            $ref: '#/components/schemas/ExtractedDataTypeName'
          type: array
          title: Extracted metadata
          description: '[Deprecated] Please use GET resource endpoint instead to get
            extracted metadata'
          default: []
          deprecated: true
        context:
          anyOf:
          - items:
              $ref: '#/components/schemas/Message'
            type: array
          - type: 'null'
          title: Chat context (deprecated)
          description: DEPRECATED! Please, use `chat_history` instead.
          deprecated: true
        chat_history:
          anyOf:
          - items:
              $ref: '#/components/schemas/Message'
            type: array
          - type: 'null'
          title: Chat history
          description: Use to rephrase the new LLM query by taking into account the
            chat conversation history. This will be passed to the LLM so that it is
            aware of the previous conversation.
        extra_context:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Extra query context
          description: "Additional context that is added to the retrieval context\
            \ sent to the LLM.\n        It allows extending the chat feature with\
            \ content that may not be in the Knowledge Box."
        extra_context_images:
          anyOf:
          - items:
              $ref: '#/components/schemas/Image'
            type: array
          - type: 'null'
          title: Extra query context images
          description: "Additional images added to the retrieval context sent to the\
            \ LLM.\"\n        It allows extending the chat feature with content that\
            \ may not be in the Knowledge Box."
        query_image:
          anyOf:
          - $ref: '#/components/schemas/Image'
          - type: 'null'
          title: Query image
          description: Image that will be used together with the query text for retrieval
            and then sent to the LLM as part of the context. If a query image is provided,
            the `extra_context_images` and `rag_images_strategies` will be disabled.
        highlight:
          type: boolean
          title: Highlight
          description: If set to true, the query terms will be highlighted in the
            results between <mark>...</mark> tags
          default: false
        resource_filters:
          items:
            type: string
          type: array
          title: Resources filter
          description: List of resource ids to filter search results for. Only paragraphs
            from the specified resources will be returned.
          default: []
        prompt:
          anyOf:
          - type: string
          - $ref: '#/components/schemas/CustomPrompt'
          - type: 'null'
          title: Prompts
          description: Use to customize the prompts given to the generative model.
            Both system and user prompts can be customized. If a string is provided,
            it is interpreted as the user prompt.
        rank_fusion:
          anyOf:
          - $ref: '#/components/schemas/RankFusionName'
          - oneOf:
            - $ref: '#/components/schemas/ReciprocalRankFusion'
            discriminator:
              propertyName: name
              mapping:
                rrf: '#/components/schemas/ReciprocalRankFusion'
          title: Rank fusion
          description: Rank fusion algorithm to use to merge results from multiple
            retrievers (keyword, semantic)
          default: rrf
        reranker:
          anyOf:
          - $ref: '#/components/schemas/RerankerName'
          - oneOf:
            - $ref: '#/components/schemas/PredictReranker'
            discriminator:
              propertyName: name
              mapping:
                predict: '#/components/schemas/PredictReranker'
          title: Reranker
          description: Reranker let you specify which method you want to use to rerank
            your results at the end of retrieval
          default: predict
        citations:
          anyOf:
          - type: boolean
          - $ref: '#/components/schemas/CitationsType'
          - type: 'null'
          title: Citations
          description: Whether to include citations in the response. If set to None
            or False, no citations will be computed. If set to True or 'default',
            citations will be computed after answer generation and send as a separate
            `CitationsGenerativeResponse` chunk. If set to 'llm_footnotes', citations
            will be included in the LLM's response as markdown-styled footnotes. A
            `FootnoteCitationsGenerativeResponse` chunk will also be sent to map footnote
            ids to context keys in the `query_context`.
        citation_threshold:
          anyOf:
          - type: number
            maximum: 1.0
            minimum: 0.0
          - type: 'null'
          title: Citation Threshold
          description: If citations is set to True or 'default', this will be the
            similarity threshold. Value between 0 and 1, lower values will produce
            more citations. If not set, it will be set to the optimized threshold
            found by Nuclia.
        security:
          anyOf:
          - $ref: '#/components/schemas/RequestSecurity'
          - type: 'null'
          title: Security
          description: 'Security metadata for the request. Please refer to the documentation
            for more details on how security works: https://docs.rag.progress.cloud/docs/management/how-to/restrict-access'
        show_hidden:
          type: boolean
          title: Show hidden resources
          description: If set to false (default), excludes hidden resources from search
          default: false
        rag_strategies:
          items:
            oneOf:
            - $ref: '#/components/schemas/FieldExtensionStrategy'
            - $ref: '#/components/schemas/FullResourceStrategy'
            - $ref: '#/components/schemas/HierarchyResourceStrategy'
            - $ref: '#/components/schemas/NeighbouringParagraphsStrategy'
            - $ref: '#/components/schemas/MetadataExtensionStrategy'
            - $ref: '#/components/schemas/ConversationalStrategy'
            - $ref: '#/components/schemas/PreQueriesStrategy'
            - $ref: '#/components/schemas/GraphStrategy'
            discriminator:
              propertyName: name
              mapping:
                conversation: '#/components/schemas/ConversationalStrategy'
                field_extension: '#/components/schemas/FieldExtensionStrategy'
                full_resource: '#/components/schemas/FullResourceStrategy'
                graph_beta: '#/components/schemas/GraphStrategy'
                hierarchy: '#/components/schemas/HierarchyResourceStrategy'
                metadata_extension: '#/components/schemas/MetadataExtensionStrategy'
                neighbouring_paragraphs: '#/components/schemas/NeighbouringParagraphsStrategy'
                prequeries: '#/components/schemas/PreQueriesStrategy'
          type: array
          title: RAG context building strategies
          description: 'Options for tweaking how the context for the LLM model is
            crafted:

            - `full_resource` will add the full text of the matching resources to
            the context. This strategy cannot be combined with `hierarchy`, `neighbouring_paragraphs`,
            or `field_extension`.

            - `field_extension` will add the text of the matching resource''s specified
            fields to the context.

            - `hierarchy` will add the title and summary text of the parent resource
            to the context for each matching paragraph.

            - `neighbouring_paragraphs` will add the sorrounding paragraphs to the
            context for each matching paragraph.

            - `metadata_extension` will add the metadata of the matching paragraphs
            or its resources to the context.

            - `prequeries` allows to run multiple retrieval queries before the main
            query and add the results to the context. The results of specific queries
            can be boosted by the specifying weights.


            If empty, the default strategy is used, which simply adds the text of
            the matching paragraphs to the context.

            '
          default: []
          examples:
          - - count: 2
              name: full_resource
          - - fields:
              - t/amend
              - a/title
              name: field_extension
          - - count: 2
              name: hierarchy
          - - after: 2
              before: 2
              name: neighbouring_paragraphs
          - - name: metadata_extension
              types:
              - origin
              - classification_labels
          - - name: prequeries
              queries:
              - request:
                  features:
                  - keyword
                  query: What is the capital of France?
                weight: 0.5
              - request:
                  query: What is the capital of Germany?
                weight: 0.5
        rag_images_strategies:
          items:
            oneOf:
            - $ref: '#/components/schemas/PageImageStrategy'
            - $ref: '#/components/schemas/ParagraphImageStrategy'
            - $ref: '#/components/schemas/TableImageStrategy'
            discriminator:
              propertyName: name
              mapping:
                page_image: '#/components/schemas/PageImageStrategy'
                paragraph_image: '#/components/schemas/ParagraphImageStrategy'
                tables: '#/components/schemas/TableImageStrategy'
          type: array
          title: RAG image context building strategies
          description: 'Options for tweaking how the image based context for the LLM
            model is crafted:

            - `page_image` will add the full page image of the matching resources
            to the context.

            - `tables` will send the table images for the paragraphs that contain
            tables and matched the retrieval query.

            - `paragraph_image` will add the images of the paragraphs that contain
            images (images for tables are not included).

            No image strategy is used by default. Note that this is only available
            for LLM models that support visual inputs. If the model does not support
            visual inputs, the image strategies will be ignored.'
          default: []
        debug:
          type: boolean
          title: Debug mode
          description: If set, the response will include some extra metadata for debugging
            purposes, like the list of queried nodes.
          default: false
        generative_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Generative model
          description: The generative model to use for the chat endpoint. If not provided,
            the model configured for the Knowledge Box is used.
        generative_model_seed:
          anyOf:
          - type: integer
          - type: 'null'
          title: Seed for the generative model
          description: The seed to use for the generative model for deterministic
            generation. Only supported by some models.
        max_tokens:
          anyOf:
          - type: integer
          - $ref: '#/components/schemas/MaxTokens'
          - type: 'null'
          title: Maximum LLM tokens to use for the request
          description: Use to limit the amount of tokens used in the LLM context and/or
            for generating the answer. If not provided, the default maximum tokens
            of the generative model will be used. If an integer is provided, it is
            interpreted as the maximum tokens for the answer.
        rephrase:
          type: boolean
          title: Rephrase
          description: Rephrase the query for a more efficient retrieval. This will
            consume LLM tokens and make the request slower.
          default: false
        chat_history_relevance_threshold:
          anyOf:
          - type: number
            maximum: 1.0
            minimum: 0.0
          - type: 'null'
          title: Chat History Relevance Threshold
          description: Threshold to determine if the past chat history is relevant
            to rephrase the user's question. 0 - Always treat previous messages as
            relevant (always rephrase).1 - Always treat previous messages as irrelevant
            (never rephrase).Values in between adjust the sensitivity.
        prefer_markdown:
          type: boolean
          title: Prefer markdown
          description: If set to true, the response will be in markdown format
          default: false
        answer_json_schema:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Answer JSON schema
          description: 'Desired JSON schema for the LLM answer.

            This schema is passed to the LLM so that it answers in a scructured format
            following the schema. If not provided, textual response is returned.

            Note that when using this parameter, the answer in the generative response
            will not be returned in chunks, the whole response text will be returned
            instead.

            Using this feature also disables the `citations` parameter. For maximal
            accuracy, please include a `description` for each field of the schema.

            '
          examples:
          - description: Structured response with custom fields
            name: structred_response
            parameters:
              properties:
                answer:
                  description: Text responding to the user's query with the given
                    context.
                  type: string
                confidence:
                  description: The confidence level of the response, on a scale from
                    0 to 5.
                  maximum: 5
                  minimum: 0
                  type: integer
                machinery_mentioned:
                  description: Optional field listing any machinery mentioned in the
                    response.
                  items:
                    description: A list of machinery mentioned in the response, if
                      any. Use machine IDs if possible.
                    type: string
                  type: array
              required:
              - answer
              - confidence
              type: object
        generate_answer:
          type: boolean
          title: Generate Answer
          description: Whether to generate an answer using the generative model. If
            set to false, the response will only contain the retrieval results.
          default: true
        search_configuration:
          anyOf:
          - type: string
          - type: 'null'
          title: Search Configuration
          description: Load ask parameters from this configuration. Parameters in
            the request override parameters from the configuration.
        reasoning:
          anyOf:
          - $ref: '#/components/schemas/Reasoning'
          - type: boolean
          title: Reasoning options
          description: Reasoning options for the generative model. Set to True to
            enable default reasoning, False to disable, or provide a Reasoning object
            for custom options.
          default: false
      type: object
      required:
      - query
      title: AskRequest
    AskRetrievalMatch:
      properties:
        id:
          type: string
          title: Id
          description: Id of the matching text block
      type: object
      required:
      - id
      title: AskRetrievalMatch
    AskTimings:
      properties:
        generative_first_chunk:
          anyOf:
          - type: number
          - type: 'null'
          title: Generative first chunk
          description: Time the LLM took to generate the first chunk of the answer
        generative_total:
          anyOf:
          - type: number
          - type: 'null'
          title: Generative total
          description: Total time the LLM took to generate the answer
      type: object
      title: AskTimings
    AskTokens:
      properties:
        input:
          type: integer
          title: Input tokens
          description: Number of LLM tokens used for the context in the query
        output:
          type: integer
          title: Output tokens
          description: Number of LLM tokens used for the answer
        input_nuclia:
          anyOf:
          - type: number
          - type: 'null'
          title: Input Nuclia tokens
          description: Number of Nuclia LLM tokens used for the context in the query
        output_nuclia:
          anyOf:
          - type: number
          - type: 'null'
          title: Output Nuclia tokens
          description: Number of Nuclia LLM tokens used for the answer
      type: object
      required:
      - input
      - output
      title: AskTokens
    AugmentedContext:
      properties:
        paragraphs:
          additionalProperties:
            $ref: '#/components/schemas/AugmentedTextBlock'
          type: object
          title: Paragraphs
          description: Paragraphs added to the context as a result of using the `rag_strategies`
            parameter, typically the neighbouring_paragraphs or the conversation strategies
          default: {}
        fields:
          additionalProperties:
            $ref: '#/components/schemas/AugmentedTextBlock'
          type: object
          title: Fields
          description: Field extracted texts added to the context as a result of using
            the `rag_strategies` parameter, typically the hierarcy or full_resource
            strategies.
          default: {}
      type: object
      title: AugmentedContext
    AugmentedTextBlock:
      properties:
        id:
          type: string
          title: Id
          description: The id of the augmented text bloc. It can be a paragraph id
            or a field id.
        text:
          type: string
          title: Text
          description: The text of the augmented text block. It may include additional
            metadata to enrich the context
        position:
          anyOf:
          - $ref: '#/components/schemas/TextPosition'
          - type: 'null'
          description: Metadata about the position of the text block in the original
            document.
        parent:
          anyOf:
          - type: string
          - type: 'null'
          title: Parent
          description: The parent text block that was augmented for.
        augmentation_type:
          $ref: '#/components/schemas/TextBlockAugmentationType'
          description: Type of augmentation.
      type: object
      required:
      - id
      - text
      - augmentation_type
      title: AugmentedTextBlock
    Author:
      type: string
      enum:
      - NUCLIA
      - USER
      title: Author
    ChatOptions:
      type: string
      enum:
      - keyword
      - relations
      - semantic
      title: ChatOptions
    CitationsType:
      type: string
      enum:
      - none
      - default
      - llm_footnotes
      title: CitationsType
    Classification:
      properties:
        labelset:
          type: string
          title: The ID of the labelset
        label:
          type: string
          title: The label assigned from the labelset
      type: object
      required:
      - labelset
      - label
      title: Classification
    CloudLink:
      properties:
        uri:
          anyOf:
          - type: string
          - type: 'null'
          title: Uri
        size:
          anyOf:
          - type: integer
          - type: 'null'
          title: Size
        content_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Content Type
        filename:
          anyOf:
          - type: string
          - type: 'null'
          title: Filename
        md5:
          anyOf:
          - type: string
          - type: 'null'
          title: Md5
      type: object
      title: CloudLink
    ComputedMetadata:
      properties:
        field_classifications:
          items:
            $ref: '#/components/schemas/FieldClassification'
          type: array
          title: Field Classifications
          default: []
      type: object
      title: ComputedMetadata
      description: 'The purpose of this field is to show a cherry-picked set of fields
        from computed metadata

        without having to load the whole computed metadata field.'
    Consumption:
      properties:
        normalized_tokens:
          $ref: '#/components/schemas/TokensDetail'
        customer_key_tokens:
          $ref: '#/components/schemas/TokensDetail'
      type: object
      required:
      - normalized_tokens
      - customer_key_tokens
      title: Consumption
    Contains:
      properties:
        schema_id:
          type: string
          title: Schema Id
        key:
          type: string
          title: Key
        contains:
          anyOf:
          - type: integer
          - type: number
          - type: string
          title: Contains
      additionalProperties: false
      type: object
      required:
      - schema_id
      - key
      - contains
      title: Contains
      description: Computes whether a value exists inside a range or a repeated field
    ConversationFieldData:
      properties:
        value:
          anyOf:
          - $ref: '#/components/schemas/FieldConversation'
          - type: 'null'
        extracted:
          anyOf:
          - $ref: '#/components/schemas/ConversationFieldExtractedData'
          - type: 'null'
        error:
          anyOf:
          - $ref: '#/components/schemas/Error'
          - type: 'null'
        status:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
        errors:
          anyOf:
          - items:
              $ref: '#/components/schemas/Error'
            type: array
          - type: 'null'
          title: Errors
      type: object
      title: ConversationFieldData
    ConversationFieldExtractedData:
      properties:
        text:
          anyOf:
          - $ref: '#/components/schemas/ExtractedText'
          - type: 'null'
        metadata:
          anyOf:
          - $ref: '#/components/schemas/FieldComputedMetadata'
          - type: 'null'
        large_metadata:
          anyOf:
          - $ref: '#/components/schemas/LargeComputedMetadata'
          - type: 'null'
        vectors:
          anyOf:
          - $ref: '#/components/schemas/VectorObject'
          - type: 'null'
        question_answers:
          anyOf:
          - $ref: '#/components/schemas/FieldQuestionAnswers'
          - type: 'null'
        relation_node_vectors:
          anyOf:
          - additionalProperties:
              items:
                $ref: '#/components/schemas/RelationNodeVector'
              type: array
            type: object
          - type: 'null'
          title: Relation Node Vectors
        relation_edge_vectors:
          anyOf:
          - additionalProperties:
              items:
                $ref: '#/components/schemas/RelationEdgeVector'
              type: array
            type: object
          - type: 'null'
          title: Relation Edge Vectors
      type: object
      title: ConversationFieldExtractedData
    ConversationalStrategy:
      properties:
        name:
          type: string
          const: conversation
          title: Name
          default: conversation
        attachments_text:
          type: boolean
          title: Add attachments on context
          description: Add attachments on context retrieved on conversation
          default: false
        attachments_images:
          type: boolean
          title: Add attachments images on context
          description: Add attachments images on context retrieved on conversation
            if they are mime type image and using a visual LLM
          default: false
        full:
          type: boolean
          title: Add all conversation
          description: Add all conversation fields on matched blocks
          default: false
        max_messages:
          type: integer
          minimum: 0.0
          title: Max messages
          description: Max messages to append in case its not full field
          default: 15
      type: object
      title: ConversationalStrategy
    CustomPrompt:
      properties:
        system:
          anyOf:
          - type: string
            minLength: 1
          - type: 'null'
          title: System prompt
          description: System prompt given to the generative model responsible of
            generating the answer. This can help customize the behavior of the model
            when generating the answer. If not specified, the default model provider's
            prompt is used.
          examples:
          - You are a medical assistant, use medical terminology
          - You are an IT expert, express yourself like one
          - You are a very friendly customer service assistant, be polite
          - You are a financial expert, use correct terms
        user:
          anyOf:
          - type: string
            minLength: 1
          - type: 'null'
          title: User prompt
          description: User prompt given to the generative model responsible of generating
            the answer. Use the words {context} and {question} in brackets where you
            want those fields to be placed, in case you want them in your prompt.
            Context will be the data returned by the retrieval step and question will
            be the user's query.
          examples:
          - 'Taking into account our previous conversation, and this context: {context}
            answer this {question}'
          - 'Give a detailed answer to this {question} in a list format. If you do
            not find an answer in this context: {context}, say that you don''t have
            enough data.'
          - 'Given this context: {context}. Answer this {question} in a concise way
            using the provided context'
          - 'Given this context: {context}. Answer this {question} using the provided
            context. Please, answer always in French'
        rephrase:
          anyOf:
          - type: string
            minLength: 1
          - type: 'null'
          title: Rephrase
          description: 'Rephrase prompt given to the generative model responsible
            for rephrasing the query for a more effective retrieval step. This is
            only used if the `rephrase` flag is set to true in the request.

            If not specified, Nuclia''s default prompt is used. It must include the
            {question} placeholder. The placeholder will be replaced with the original
            question'
          examples:
          - 'Rephrase this question so its better for retrieval, and keep the rephrased
            question in the same language as the original.

            QUESTION: {question}

            Please return ONLY the question without any explanation. Just the rephrased
            question.'
          - "Rephrase this question so its better for retrieval, identify any part\
            \ numbers and append them to the end of the question separated by a commas.\n\
            \            QUESTION: {question}\n            Please return ONLY the\
            \ question without any explanation."
      type: object
      title: CustomPrompt
    DateCreated:
      properties:
        prop:
          type: string
          const: created
          title: Prop
          default: created
        since:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Since
          description: Start of the date range. Leave blank for unbounded
        until:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Until
          description: End of the date range. Leave blank for unbounded
      additionalProperties: false
      type: object
      title: DateCreated
      description: Matches all fields created in a date range
    DateModified:
      properties:
        prop:
          type: string
          const: modified
          title: Prop
          default: modified
        since:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Since
          description: Start of the date range. Leave blank for unbounded
        until:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Until
          description: End of the date range. Leave blank for unbounded
      additionalProperties: false
      type: object
      title: DateModified
      description: Matches all fields modified in a date range
    DestinationNode:
      properties:
        prop:
          type: string
          const: destination_node
          title: Prop
          default: destination_node
        value:
          anyOf:
          - type: string
          - type: 'null'
          title: Value
        match:
          $ref: '#/components/schemas/NodeMatchKindName'
          default: exact
        type:
          anyOf:
          - $ref: '#/components/schemas/RelationNodeType'
          - type: 'null'
          default: entity
        group:
          anyOf:
          - type: string
          - type: 'null'
          title: Group
      additionalProperties: false
      type: object
      title: DestinationNode
    DirectionalRelation:
      properties:
        entity:
          type: string
          title: Entity
        entity_type:
          $ref: '#/components/schemas/RelationNodeType'
        entity_subtype:
          type: string
          title: Entity Subtype
        relation:
          $ref: '#/components/schemas/RelationType'
        relation_label:
          type: string
          title: Relation Label
        direction:
          $ref: '#/components/schemas/RelationDirection'
        metadata:
          anyOf:
          - $ref: '#/components/schemas/RelationMetadata'
          - type: 'null'
        resource_id:
          type: string
          title: Resource Id
      type: object
      required:
      - entity
      - entity_type
      - entity_subtype
      - relation
      - relation_label
      - direction
      - resource_id
      title: DirectionalRelation
    Entity-Input:
      properties:
        prop:
          type: string
          const: entity
          title: Prop
          default: entity
        subtype:
          type: string
          title: Subtype
          description: 'Type of the entity. e.g: PERSON'
        value:
          anyOf:
          - type: string
          - type: 'null'
          title: Value
          description: 'Value of the entity. e.g: Anna. If blank, matches any entity
            of the given type'
      additionalProperties: false
      type: object
      required:
      - subtype
      title: Entity
      description: Matches fields that contains a detected entity
    EntitySubgraph:
      properties:
        related_to:
          items:
            $ref: '#/components/schemas/DirectionalRelation'
          type: array
          title: Related To
      type: object
      required:
      - related_to
      title: EntitySubgraph
    Eq:
      properties:
        schema_id:
          type: string
          title: Schema Id
        key:
          type: string
          title: Key
        eq:
          anyOf:
          - type: boolean
          - type: integer
          - type: number
          - type: string
            format: date-time
          - type: string
          title: Eq
      additionalProperties: false
      type: object
      required:
      - schema_id
      - key
      - eq
      title: Eq
      description: Equal (==) operator
    Error:
      properties:
        body:
          type: string
          title: Body
        code:
          type: integer
          title: Code
        code_str:
          type: string
          title: Code Str
        created:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created
        severity:
          type: string
          title: Severity
      type: object
      required:
      - body
      - code
      - code_str
      - created
      - severity
      title: Error
    Extra:
      properties:
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: Arbitrary JSON metadata provided by the user that is not meant
            to be searchable, but can be serialized on results.
      type: object
      required:
      - metadata
      title: Extra
    ExtractedDataTypeName:
      type: string
      enum:
      - text
      - metadata
      - shortened_metadata
      - large_metadata
      - vectors
      - link
      - file
      - question_answers
      - relation_vectors
      title: ExtractedDataTypeName
    ExtractedText:
      properties:
        text:
          anyOf:
          - type: string
          - type: 'null'
          title: Text
        split_text:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          title: Split Text
        deleted_splits:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Deleted Splits
      type: object
      title: ExtractedText
    Field:
      properties:
        prop:
          type: string
          const: field
          title: Prop
          default: field
        type:
          $ref: '#/components/schemas/FieldTypeName'
          description: 'Type of the field to match, '
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Field Filter
          description: Name of the field to match. If blank, matches all fields of
            the given type
      additionalProperties: false
      type: object
      required:
      - type
      title: Field
      description: Matches a field or set of fields
    FieldClassification:
      properties:
        field:
          $ref: '#/components/schemas/FieldID'
        classifications:
          items:
            $ref: '#/components/schemas/Classification'
          type: array
          title: Classifications
          default: []
      type: object
      required:
      - field
      title: FieldClassification
    FieldComputedMetadata:
      properties:
        metadata:
          $ref: '#/components/schemas/FieldMetadata'
        split_metadata:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/FieldMetadata'
            type: object
          - type: 'null'
          title: Split Metadata
        deleted_splits:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Deleted Splits
      type: object
      required:
      - metadata
      title: FieldComputedMetadata
    FieldConversation:
      properties:
        pages:
          anyOf:
          - type: integer
          - type: 'null'
          title: Pages
        size:
          anyOf:
          - type: integer
          - type: 'null'
          title: Size
        total:
          anyOf:
          - type: integer
          - type: 'null'
          title: Total
        extract_strategy:
          anyOf:
          - type: string
          - type: 'null'
          title: Extract Strategy
        split_strategy:
          anyOf:
          - type: string
          - type: 'null'
          title: Split Strategy
      type: object
      title: FieldConversation
      description: 'This is a metadata representation of a conversation about how
        many pages

        of messages and total of messages we have.


        This class is used mainly when exposing a conversation in the resource level'
    FieldEntities:
      properties:
        entities:
          items:
            $ref: '#/components/schemas/FieldEntity'
          type: array
          title: Entities
      type: object
      required:
      - entities
      title: FieldEntities
      description: Wrapper for the entities extracted from a field (required because
        protobuf doesn't support lists of lists)
    FieldEntity:
      properties:
        text:
          type: string
          title: Text
        label:
          type: string
          title: Label
        positions:
          items:
            $ref: '#/components/schemas/Position'
          type: array
          title: Positions
      type: object
      required:
      - text
      - label
      - positions
      title: FieldEntity
    FieldExtensionStrategy:
      properties:
        name:
          type: string
          const: field_extension
          title: Name
          default: field_extension
        fields:
          items:
            type: string
          type: array
          title: Fields
          description: List of field ids to extend the context with. It will try to
            extend the retrieval context with the specified fields in the matching
            resources. The field ids have to be in the format `{field_type}/{field_name}`,
            like 'a/title', 'a/summary' for title and summary fields or 't/amend'
            for a text field named 'amend'.
          default: []
        data_augmentation_field_prefixes:
          items:
            type: string
          type: array
          title: Data Augmentation Field Prefixes
          description: List of prefixes for data augmentation added fields to extend
            the context with. For example, if the prefix is 'simpson', all fields
            that are a result of data augmentation with that prefix will be used to
            extend the context.
          default: []
      type: object
      title: FieldExtensionStrategy
    FieldFile:
      properties:
        added:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Added
        file:
          anyOf:
          - $ref: '#/components/schemas/CloudLink'
          - type: 'null'
        language:
          anyOf:
          - type: string
          - type: 'null'
          title: Language
        password:
          anyOf:
          - type: string
          - type: 'null'
          title: Password
        external:
          type: boolean
          title: External
          default: false
        extract_strategy:
          anyOf:
          - type: string
          - type: 'null'
          title: Extract Strategy
          description: Id of the Nuclia extract strategy used at processing time.
            If not set, the default strategy was used. Extract strategies are defined
            at the learning configuration api.
        split_strategy:
          anyOf:
          - type: string
          - type: 'null'
          title: Split Strategy
          description: Id of the Nuclia split strategy used at processing time. If
            not set, the default strategy was used. Split strategies are defined at
            the learning configuration api.
      type: object
      title: FieldFile
    FieldID:
      properties:
        field_type:
          $ref: '#/components/schemas/FieldType'
        field:
          type: string
          title: Field
      type: object
      required:
      - field_type
      - field
      title: FieldID
    FieldLargeMetadata:
      properties:
        entities:
          anyOf:
          - items:
              $ref: '#/components/schemas/nucliadb_models__extracted__Entity'
            type: array
          - type: 'null'
          title: Entities
        tokens:
          anyOf:
          - additionalProperties:
              type: integer
            type: object
          - type: 'null'
          title: Tokens
      type: object
      title: FieldLargeMetadata
    FieldLink:
      properties:
        added:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Added
        headers:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          title: Headers
        cookies:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          title: Cookies
        uri:
          anyOf:
          - type: string
          - type: 'null'
          title: Uri
        language:
          anyOf:
          - type: string
          - type: 'null'
          title: Language
        localstorage:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          title: Localstorage
        css_selector:
          anyOf:
          - type: string
          - type: 'null'
          title: Css Selector
        xpath:
          anyOf:
          - type: string
          - type: 'null'
          title: Xpath
        extract_strategy:
          anyOf:
          - type: string
          - type: 'null'
          title: Extract Strategy
          description: Id of the Nuclia extract strategy used at processing time.
            If not set, the default strategy was used. Extract strategies are defined
            at the learning configuration api.
        split_strategy:
          anyOf:
          - type: string
          - type: 'null'
          title: Split Strategy
          description: Id of the Nuclia split strategy used at processing time. If
            not set, the default strategy was used. Split strategies are defined at
            the learning configuration api.
      type: object
      title: FieldLink
    FieldMetadata:
      properties:
        links:
          items:
            type: string
          type: array
          title: Links
        paragraphs:
          items:
            $ref: '#/components/schemas/Paragraph'
          type: array
          title: Paragraphs
        ner:
          additionalProperties:
            type: string
          type: object
          title: Ner
        entities:
          additionalProperties:
            $ref: '#/components/schemas/FieldEntities'
          type: object
          title: Entities
        classifications:
          items:
            $ref: '#/components/schemas/Classification'
          type: array
          title: Classifications
        last_index:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Index
        last_understanding:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Understanding
        last_extract:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Extract
        last_summary:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Summary
        last_processing_start:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Processing Start
        thumbnail:
          anyOf:
          - $ref: '#/components/schemas/CloudLink'
          - type: 'null'
        language:
          anyOf:
          - type: string
          - type: 'null'
          title: Language
        summary:
          anyOf:
          - type: string
          - type: 'null'
          title: Summary
        positions:
          additionalProperties:
            $ref: '#/components/schemas/Positions'
          type: object
          title: Positions
        relations:
          anyOf:
          - items:
              $ref: '#/components/schemas/Relation-Output'
            type: array
          - type: 'null'
          title: Relations
        mime_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Mime Type
      type: object
      required:
      - links
      - paragraphs
      - ner
      - entities
      - classifications
      - positions
      title: FieldMetadata
    FieldMimetype:
      properties:
        prop:
          type: string
          const: field_mimetype
          title: Prop
          default: field_mimetype
        type:
          type: string
          title: Type
          description: 'Type of the mimetype to match. e.g: In image/jpeg, type is
            image'
        subtype:
          anyOf:
          - type: string
          - type: 'null'
          title: Subtype
          description: 'Type of the mimetype to match. e.g: In image/jpeg, subtype
            is jpeg.Leave blank to match all mimetype of the type'
      additionalProperties: false
      type: object
      required:
      - type
      title: FieldMimetype
      description: Matches fields with a mimetype
    FieldQuestionAnswers:
      properties:
        question_answers:
          $ref: '#/components/schemas/QuestionAnswers'
        split_question_answers:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/QuestionAnswers'
            type: object
          - type: 'null'
          title: Split Question Answers
        deleted_splits:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Deleted Splits
      type: object
      required:
      - question_answers
      title: FieldQuestionAnswers
    FieldText:
      properties:
        body:
          anyOf:
          - type: string
          - type: 'null'
          title: Body
        format:
          anyOf:
          - $ref: '#/components/schemas/TextFormat'
          - type: 'null'
        md5:
          anyOf:
          - type: string
          - type: 'null'
          title: Md5
        extract_strategy:
          anyOf:
          - type: string
          - type: 'null'
          title: Extract Strategy
          description: Id of the Nuclia extract strategy used at processing time.
            If not set, the default strategy was used. Extract strategies are defined
            at the learning configuration api.
        split_strategy:
          anyOf:
          - type: string
          - type: 'null'
          title: Split Strategy
          description: Id of the Nuclia split strategy used at processing time. If
            not set, the default strategy was used. Split strategies are defined at
            the learning configuration api.
      type: object
      title: FieldText
    FieldType:
      type: string
      enum:
      - file
      - link
      - text
      - generic
      - conversation
      - key_value
      title: FieldType
    FieldTypeName:
      type: string
      enum:
      - text
      - file
      - link
      - conversation
      - generic
      - key_value
      title: FieldTypeName
      description: 'This map assumes that both values and extracted data field containers

        use the same names for its fields. See models.ResourceFieldValues and

        models.ResourceFieldExtractedData'
    FileExtractedData:
      properties:
        language:
          anyOf:
          - type: string
          - type: 'null'
          title: Language
        md5:
          anyOf:
          - type: string
          - type: 'null'
          title: Md5
        metadata:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          title: Metadata
        nested:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          title: Nested
        file_generated:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/CloudLink'
            type: object
          - type: 'null'
          title: File Generated
        file_rows_previews:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/RowsPreview'
            type: object
          - type: 'null'
          title: File Rows Previews
        file_preview:
          anyOf:
          - $ref: '#/components/schemas/CloudLink'
          - type: 'null'
        file_pages_previews:
          anyOf:
          - $ref: '#/components/schemas/FilePages'
          - type: 'null'
        file_thumbnail:
          anyOf:
          - $ref: '#/components/schemas/CloudLink'
          - type: 'null'
        field:
          anyOf:
          - type: string
          - type: 'null'
          title: Field
        icon:
          anyOf:
          - type: string
          - type: 'null'
          title: Icon
        nested_position:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/NestedPosition'
            type: object
          - type: 'null'
          title: Nested Position
        nested_list_position:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/NestedListPosition'
            type: object
          - type: 'null'
          title: Nested List Position
      type: object
      title: FileExtractedData
    FileFieldData:
      properties:
        value:
          anyOf:
          - $ref: '#/components/schemas/FieldFile'
          - type: 'null'
        extracted:
          anyOf:
          - $ref: '#/components/schemas/FileFieldExtractedData'
          - type: 'null'
        error:
          anyOf:
          - $ref: '#/components/schemas/Error'
          - type: 'null'
        status:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
        errors:
          anyOf:
          - items:
              $ref: '#/components/schemas/Error'
            type: array
          - type: 'null'
          title: Errors
      type: object
      title: FileFieldData
    FileFieldExtractedData:
      properties:
        text:
          anyOf:
          - $ref: '#/components/schemas/ExtractedText'
          - type: 'null'
        metadata:
          anyOf:
          - $ref: '#/components/schemas/FieldComputedMetadata'
          - type: 'null'
        large_metadata:
          anyOf:
          - $ref: '#/components/schemas/LargeComputedMetadata'
          - type: 'null'
        vectors:
          anyOf:
          - $ref: '#/components/schemas/VectorObject'
          - type: 'null'
        question_answers:
          anyOf:
          - $ref: '#/components/schemas/FieldQuestionAnswers'
          - type: 'null'
        relation_node_vectors:
          anyOf:
          - additionalProperties:
              items:
                $ref: '#/components/schemas/RelationNodeVector'
              type: array
            type: object
          - type: 'null'
          title: Relation Node Vectors
        relation_edge_vectors:
          anyOf:
          - additionalProperties:
              items:
                $ref: '#/components/schemas/RelationEdgeVector'
              type: array
            type: object
          - type: 'null'
          title: Relation Edge Vectors
        file:
          anyOf:
          - $ref: '#/components/schemas/FileExtractedData'
          - type: 'null'
      type: object
      title: FileFieldExtractedData
    FilePages:
      properties:
        pages:
          anyOf:
          - items:
              $ref: '#/components/schemas/CloudLink'
            type: array
          - type: 'null'
          title: Pages
        positions:
          anyOf:
          - items:
              $ref: '#/components/schemas/PagePositions'
            type: array
          - type: 'null'
          title: Positions
        structures:
          anyOf:
          - items:
              $ref: '#/components/schemas/PageStructure'
            type: array
          - type: 'null'
          title: Structures
      type: object
      title: FilePages
    Filter:
      properties:
        all:
          anyOf:
          - items:
              type: string
            type: array
            minItems: 1
          - type: 'null'
          title: All
        any:
          anyOf:
          - items:
              type: string
            type: array
            minItems: 1
          - type: 'null'
          title: Any
        none:
          anyOf:
          - items:
              type: string
            type: array
            minItems: 1
          - type: 'null'
          title: None
        not_all:
          anyOf:
          - items:
              type: string
            type: array
            minItems: 1
          - type: 'null'
          title: Not All
      type: object
      title: Filter
    FilterExpression-Input:
      properties:
        field:
          anyOf:
          - oneOf:
            - $ref: '#/components/schemas/And_FieldFilterExpressionType_-Input'
            - $ref: '#/components/schemas/Or_FieldFilterExpressionType_-Input'
            - $ref: '#/components/schemas/Not_FieldFilterExpressionType_-Input'
            - $ref: '#/components/schemas/Resource'
            - $ref: '#/components/schemas/Field'
            - $ref: '#/components/schemas/Keyword'
            - $ref: '#/components/schemas/DateCreated'
            - $ref: '#/components/schemas/DateModified'
            - $ref: '#/components/schemas/Label'
            - $ref: '#/components/schemas/ResourceMimetype'
            - $ref: '#/components/schemas/FieldMimetype'
            - $ref: '#/components/schemas/Entity-Input'
            - $ref: '#/components/schemas/Language'
            - $ref: '#/components/schemas/OriginTag'
            - $ref: '#/components/schemas/OriginMetadata'
            - $ref: '#/components/schemas/OriginPath'
            - $ref: '#/components/schemas/OriginSource'
            - $ref: '#/components/schemas/OriginCollaborator'
            - $ref: '#/components/schemas/nucliadb_models__filters__Generated'
          - type: 'null'
          title: Field Filters
          description: Filter to apply to fields
        paragraph:
          anyOf:
          - oneOf:
            - $ref: '#/components/schemas/And_ParagraphFilterExpression_-Input'
            - $ref: '#/components/schemas/Or_ParagraphFilterExpression_-Input'
            - $ref: '#/components/schemas/Not_ParagraphFilterExpression_-Input'
            - $ref: '#/components/schemas/Label'
            - $ref: '#/components/schemas/Kind'
          - type: 'null'
          title: Paragraph
          description: Filter to apply to each text block
        key_value:
          anyOf:
          - oneOf:
            - $ref: '#/components/schemas/And_KVFilterExpression_-Input'
            - $ref: '#/components/schemas/Or_KVFilterExpression_-Input'
            - $ref: '#/components/schemas/Not_KVFilterExpression_-Input'
            - $ref: '#/components/schemas/Eq'
            - $ref: '#/components/schemas/Inequalities'
            - $ref: '#/components/schemas/Contains'
          - type: 'null'
          title: Key Value
          description: Filter to apply to key-value fields (JSON index prefilter)
        operator:
          $ref: '#/components/schemas/Operator'
          description: How to combine field and paragraph filters (default is AND).AND
            returns text blocks that match both filters.OR returns text_blocks that
            match one of the two filters
          default: and
      additionalProperties: false
      type: object
      title: FilterExpression
      description: 'Returns only documents that match this filter expression.

        Filtering examples can be found here: https://docs.nuclia.dev/docs/rag/advanced/search-filters


        This allows building complex filtering expressions and replaces the following
        parameters:

        `fields`, `filters`, `range_*`, `resource_filters`, `keyword_filters`.'
    FilterExpression-Output:
      properties:
        field:
          anyOf:
          - oneOf:
            - $ref: '#/components/schemas/And_FieldFilterExpressionType_-Output'
            - $ref: '#/components/schemas/Or_FieldFilterExpressionType_-Output'
            - $ref: '#/components/schemas/Not_FieldFilterExpressionType_-Output'
            - $ref: '#/components/schemas/Resource'
            - $ref: '#/components/schemas/Field'
            - $ref: '#/components/schemas/Keyword'
            - $ref: '#/components/schemas/DateCreated'
            - $ref: '#/components/schemas/DateModified'
            - $ref: '#/components/schemas/Label'
            - $ref: '#/components/schemas/ResourceMimetype'
            - $ref: '#/components/schemas/FieldMimetype'
            - $ref: '#/components/schemas/nucliadb_models__filters__Entity'
            - $ref: '#/components/schemas/Language'
            - $ref: '#/components/schemas/OriginTag'
            - $ref: '#/components/schemas/OriginMetadata'
            - $ref: '#/components/schemas/OriginPath'
            - $ref: '#/components/schemas/OriginSource'
            - $ref: '#/components/schemas/OriginCollaborator'
            - $ref: '#/components/schemas/Generated-Output'
          - type: 'null'
          title: Field Filters
          description: Filter to apply to fields
        paragraph:
          anyOf:
          - oneOf:
            - $ref: '#/components/schemas/And_ParagraphFilterExpression_-Output'
            - $ref: '#/components/schemas/Or_ParagraphFilterExpression_-Output'
            - $ref: '#/components/schemas/Not_ParagraphFilterExpression_-Output'
            - $ref: '#/components/schemas/Label'
            - $ref: '#/components/schemas/Kind'
          - type: 'null'
          title: Paragraph
          description: Filter to apply to each text block
        key_value:
          anyOf:
          - oneOf:
            - $ref: '#/components/schemas/And_KVFilterExpression_-Output'
            - $ref: '#/components/schemas/Or_KVFilterExpression_-Output'
            - $ref: '#/components/schemas/Not_KVFilterExpression_-Output'
            - $ref: '#/components/schemas/Eq'
            - $ref: '#/components/schemas/Inequalities'
            - $ref: '#/components/schemas/Contains'
          - type: 'null'
          title: Key Value
          description: Filter to apply to key-value fields (JSON index prefilter)
        operator:
          $ref: '#/components/schemas/Operator'
          description: How to combine field and paragraph filters (default is AND).AND
            returns text blocks that match both filters.OR returns text_blocks that
            match one of the two filters
          default: and
      additionalProperties: false
      type: object
      title: FilterExpression
      description: 'Returns only documents that match this filter expression.

        Filtering examples can be found here: https://docs.nuclia.dev/docs/rag/advanced/search-filters


        This allows building complex filtering expressions and replaces the following
        parameters:

        `fields`, `filters`, `range_*`, `resource_filters`, `keyword_filters`.'
    FindField:
      properties:
        paragraphs:
          additionalProperties:
            $ref: '#/components/schemas/FindParagraph'
          type: object
          title: Paragraphs
      type: object
      required:
      - paragraphs
      title: FindField
    FindOptions:
      type: string
      enum:
      - keyword
      - semantic
      - relations
      - graph
      title: FindOptions
    FindParagraph:
      properties:
        score:
          type: number
          title: Score
        score_type:
          $ref: '#/components/schemas/SCORE_TYPE'
        order:
          type: integer
          minimum: 0.0
          title: Order
          default: 0
        text:
          type: string
          title: Text
        id:
          type: string
          title: Id
        labels:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Labels
          default: []
        position:
          anyOf:
          - $ref: '#/components/schemas/TextPosition'
          - type: 'null'
        fuzzy_result:
          type: boolean
          title: Fuzzy Result
          default: false
        page_with_visual:
          type: boolean
          title: Page where this paragraph belongs is a visual page
          description: This flag informs if the page may have information that has
            not been extracted
          default: false
        reference:
          anyOf:
          - type: string
          - type: 'null'
          title: Reference to the image that represents this text
          description: Reference to the extracted image that represents this paragraph
        is_a_table:
          type: boolean
          title: Is a table
          description: The referenced image of the paragraph is a table
          default: false
        relevant_relations:
          anyOf:
          - $ref: '#/components/schemas/Relations'
          - type: 'null'
          title: Relevant relations
          description: Relevant relations from which the paragraph was found, will
            only be filled if using the Graph RAG Strategy
      type: object
      required:
      - score
      - score_type
      - text
      - id
      title: FindParagraph
    FindRequest:
      properties:
        audit_metadata:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          title: Audit metadata
          description: A dictionary containing optional audit-specific metadata, such
            as user_id, environment, or other contextual information. This metadata
            can be leveraged for filtering and analyzing activity logs in future operations.
            Each key-value pair represents a piece of metadata relevant to the user's
            request.
          examples:
          - environment: test
            user: my-user-123
        query:
          type: string
          maxLength: 20000
          title: Query
          description: The query to search for
          default: ''
        filter_expression:
          anyOf:
          - $ref: '#/components/schemas/FilterExpression-Input'
          - type: 'null'
          title: Filter resource by an expression
          description: 'Returns only documents that match this filter expression.Filtering
            examples can be found here: https://docs.nuclia.dev/docs/rag/advanced/search-filters
            This allows building complex filtering expressions and replaces the following
            parameters:`fields`, `filters`, `range_*`, `resource_filters`, `keyword_filters`.'
        fields:
          items:
            type: string
          type: array
          title: Fields
          description: 'The list of fields to search in. For instance: `a/title` to
            search only on title field. For more details on filtering by field, see:
            https://docs.nuclia.dev/docs/rag/advanced/search/#search-in-a-specific-field. '
          default: []
        filters:
          anyOf:
          - items:
              type: string
            type: array
          - items:
              $ref: '#/components/schemas/Filter'
            type: array
          title: Search Filters
          description: 'The list of filters to apply. Filtering examples can be found
            here: https://docs.nuclia.dev/docs/rag/advanced/search-filters'
          default: []
        top_k:
          type: integer
          maximum: 200.0
          exclusiveMinimum: -1.0
          title: Top k
          description: The number of results search should return. The maximum number
            of results allowed is 200.
          default: 20
        min_score:
          anyOf:
          - type: number
          - $ref: '#/components/schemas/MinScore'
          - type: 'null'
          title: Minimum score
          description: Minimum score to filter search results. Results with a lower
            score will be ignored. Accepts either a float or a dictionary with the
            minimum scores for the bm25 and vector indexes. If a float is provided,
            it is interpreted as the minimum score for vector index search.
        range_creation_start:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Resource creation range start
          description: 'Resources created before this date will be filtered out of
            search results. Datetime are represented as a str in ISO 8601 format,
            like: 2008-09-15T15:53:00+05:00.'
        range_creation_end:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Resource creation range end
          description: 'Resources created after this date will be filtered out of
            search results. Datetime are represented as a str in ISO 8601 format,
            like: 2008-09-15T15:53:00+05:00.'
        range_modification_start:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Resource modification range start
          description: 'Resources modified before this date will be filtered out of
            search results. Datetime are represented as a str in ISO 8601 format,
            like: 2008-09-15T15:53:00+05:00.'
        range_modification_end:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Resource modification range end
          description: 'Resources modified after this date will be filtered out of
            search results. Datetime are represented as a str in ISO 8601 format,
            like: 2008-09-15T15:53:00+05:00.'
        debug:
          type: boolean
          title: Debug mode
          description: If set, the response will include some extra metadata for debugging
            purposes, like the list of queried nodes.
          default: false
        highlight:
          type: boolean
          title: Highlight
          description: If set to true, the query terms will be highlighted in the
            results between <mark>...</mark> tags
          default: false
        show:
          items:
            $ref: '#/components/schemas/ResourceProperties'
          type: array
          title: Show metadata
          description: Controls which types of metadata are serialized on resources
            of search results
          default:
          - basic
        field_type_filter:
          items:
            $ref: '#/components/schemas/FieldTypeName'
          type: array
          title: Field type filter
          description: Define which field types are serialized on resources of search
            results
          default:
          - text
          - file
          - link
          - conversation
          - generic
          - key_value
        extracted:
          items:
            $ref: '#/components/schemas/ExtractedDataTypeName'
          type: array
          title: Extracted metadata
          description: '[Deprecated] Please use GET resource endpoint instead to get
            extracted metadata'
          default: []
          deprecated: true
        vector:
          anyOf:
          - items:
              type: number
            type: array
          - type: 'null'
          title: Search Vector
          description: The vector to perform the search with. If not provided, NucliaDB
            will use Nuclia Predict API to create the vector off from the query.
        vectorset:
          anyOf:
          - type: string
          - type: 'null'
          title: Vectorset
          description: Vectors index to perform the search in. If not provided, NucliaDB
            will use the default one
        with_duplicates:
          type: boolean
          title: With duplicate paragraphs
          description: Whether to return duplicate paragraphs on the same document
          default: false
        with_synonyms:
          type: boolean
          title: With custom synonyms
          description: 'Whether to return matches for custom knowledge box synonyms
            of the query terms. Note: only supported for `keyword` and `fulltext`
            search options.'
          default: false
        resource_filters:
          items:
            type: string
          type: array
          title: Resources filter
          description: List of resource ids to filter search results for. Only paragraphs
            from the specified resources will be returned.
          default: []
        security:
          anyOf:
          - $ref: '#/components/schemas/RequestSecurity'
          - type: 'null'
          title: Security
          description: 'Security metadata for the request. Please refer to the documentation
            for more details on how security works: https://docs.rag.progress.cloud/docs/management/how-to/restrict-access'
        show_hidden:
          type: boolean
          title: Show hidden resources
          description: If set to false (default), excludes hidden resources from search
          default: false
        rephrase:
          type: boolean
          title: Rephrase
          description: Rephrase the query for a more efficient retrieval. This will
            consume LLM tokens and make the request slower.
          default: false
        rephrase_prompt:
          anyOf:
          - type: string
            minLength: 1
          - type: 'null'
          title: Rephrase
          description: 'Rephrase prompt given to the generative model responsible
            for rephrasing the query for a more effective retrieval step. This is
            only used if the `rephrase` flag is set to true in the request.

            If not specified, Nuclia''s default prompt is used. It must include the
            {question} placeholder. The placeholder will be replaced with the original
            question'
          examples:
          - 'Rephrase this question so its better for retrieval, and keep the rephrased
            question in the same language as the original.

            QUESTION: {question}

            Please return ONLY the question without any explanation. Just the rephrased
            question.'
          - "Rephrase this question so its better for retrieval, identify any part\
            \ numbers and append them to the end of the question separated by a commas.\n\
            \            QUESTION: {question}\n            Please return ONLY the\
            \ question without any explanation."
        query_image:
          anyOf:
          - $ref: '#/components/schemas/Image'
          - type: 'null'
          title: Query image
          description: Image that will be used together with the query text for retrieval.
        graph_query:
          anyOf:
          - oneOf:
            - $ref: '#/components/schemas/And_GraphPathQuery_'
            - $ref: '#/components/schemas/Or_GraphPathQuery_'
            - $ref: '#/components/schemas/Not_GraphPathQuery_'
            - $ref: '#/components/schemas/GraphPath'
            - $ref: '#/components/schemas/SourceNode'
            - $ref: '#/components/schemas/DestinationNode'
            - $ref: '#/components/schemas/AnyNode'
            - $ref: '#/components/schemas/Relation-Input'
            - $ref: '#/components/schemas/nucliadb_models__graph__requests__Generated'
          - type: 'null'
          title: Graph query
          description: Query for the knowledge graph. Paths (node-relation-node) extracted
            from a paragraph_id will be used to extend the results
        features:
          items:
            $ref: '#/components/schemas/FindOptions'
          type: array
          title: Search features
          description: List of search features to use. Each value corresponds to a
            lookup into on of the different indexes
          default:
          - keyword
          - semantic
        rank_fusion:
          anyOf:
          - $ref: '#/components/schemas/RankFusionName'
          - oneOf:
            - $ref: '#/components/schemas/ReciprocalRankFusion'
            discriminator:
              propertyName: name
              mapping:
                rrf: '#/components/schemas/ReciprocalRankFusion'
          title: Rank fusion
          description: Rank fusion algorithm to use to merge results from multiple
            retrievers (keyword, semantic)
          default: rrf
        reranker:
          anyOf:
          - $ref: '#/components/schemas/RerankerName'
          - oneOf:
            - $ref: '#/components/schemas/PredictReranker'
            discriminator:
              propertyName: name
              mapping:
                predict: '#/components/schemas/PredictReranker'
          title: Reranker
          description: Reranker let you specify which method you want to use to rerank
            your results at the end of retrieval
          default: predict
        keyword_filters:
          anyOf:
          - items:
              type: string
            type: array
          - items:
              $ref: '#/components/schemas/Filter'
            type: array
          title: Keyword filters
          description: 'List of keyword filter expressions to apply to the retrieval
            step. The text block search will only be performed on the documents that
            contain the specified keywords. The filters are case-insensitive, and
            only alphanumeric characters and spaces are allowed. Filtering examples
            can be found here: https://docs.nuclia.dev/docs/rag/advanced/search-filters'
          default: []
          examples:
          - - NLP
            - BERT
          - - all:
              - NLP
              - BERT
          - - Friedrich Nietzsche
            - Immanuel Kant
        search_configuration:
          anyOf:
          - type: string
          - type: 'null'
          title: Search Configuration
          description: Load find parameters from this configuration. Parameters in
            the request override parameters from the configuration.
        generative_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Generative model
          description: The generative model used to rephrase the query. If not provided,
            the model configured for the Knowledge Box is used.
        search_after:
          anyOf:
          - type: string
          - type: 'null'
          title: Search After
          description: 'Pass a token returned from another resquest to get the next
            results in the search. Only results from the paragraph index will be returned
            and rerankers will be disabled. '
      type: object
      title: FindRequest
    FindResource:
      properties:
        id:
          type: string
          title: Id
        slug:
          anyOf:
          - type: string
          - type: 'null'
          title: Slug
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        summary:
          anyOf:
          - type: string
          - type: 'null'
          title: Summary
        icon:
          anyOf:
          - type: string
          - type: 'null'
          title: Icon
        thumbnail:
          anyOf:
          - type: string
          - type: 'null'
          title: Thumbnail
        metadata:
          anyOf:
          - $ref: '#/components/schemas/Metadata'
          - type: 'null'
        usermetadata:
          anyOf:
          - $ref: '#/components/schemas/UserMetadata'
          - type: 'null'
        fieldmetadata:
          anyOf:
          - items:
              $ref: '#/components/schemas/UserFieldMetadata'
            type: array
          - type: 'null'
          title: Fieldmetadata
        computedmetadata:
          anyOf:
          - $ref: '#/components/schemas/ComputedMetadata'
          - type: 'null'
        created:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created
        modified:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Modified
        last_seqid:
          anyOf:
          - type: integer
          - type: 'null'
          title: Last Seqid
        last_account_seq:
          anyOf:
          - type: integer
          - type: 'null'
          title: Last Account Seq
        queue:
          anyOf:
          - $ref: '#/components/schemas/QueueType'
          - type: 'null'
        hidden:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Hidden
        origin:
          anyOf:
          - $ref: '#/components/schemas/Origin'
          - type: 'null'
        extra:
          anyOf:
          - $ref: '#/components/schemas/Extra'
          - type: 'null'
        relations:
          anyOf:
          - items:
              $ref: '#/components/schemas/Relation-Output'
            type: array
          - type: 'null'
          title: Relations
        data:
          anyOf:
          - $ref: '#/components/schemas/ResourceData'
          - type: 'null'
        security:
          anyOf:
          - $ref: '#/components/schemas/ResourceSecurity'
          - type: 'null'
          title: Security
          description: Resource security metadata
        fields:
          additionalProperties:
            $ref: '#/components/schemas/FindField'
          type: object
          title: Fields
      type: object
      required:
      - id
      - fields
      title: FindResource
    FullResourceApplyTo:
      properties:
        exclude:
          items:
            type: string
          type: array
          title: Labels to exclude from full resource expansion
          description: Resources from matches containing any of these labels won't
            expand to the full resource. This may be useful to exclude long and not
            interesting resources and expend less tokens
      type: object
      title: FullResourceApplyTo
    FullResourceStrategy:
      properties:
        name:
          type: string
          const: full_resource
          title: Name
          default: full_resource
        count:
          anyOf:
          - type: integer
            minimum: 1.0
          - type: 'null'
          title: Count
          description: Maximum number of full documents to retrieve. If not specified,
            all matching documents are retrieved.
        include_remaining_text_blocks:
          type: boolean
          title: Include remaining text blocks
          description: Whether to include the remaining text blocks after the maximum
            number of resources has been reached.
          default: false
        apply_to:
          anyOf:
          - $ref: '#/components/schemas/FullResourceApplyTo'
          - type: 'null'
          title: Apply to certain resources only
          description: Define which resources to exclude from serialization
      type: object
      title: FullResourceStrategy
    Generated-Output:
      properties:
        prop:
          type: string
          const: generated
          title: Prop
          default: generated
        by:
          type: string
          const: data-augmentation
          title: By
          description: Generator for this field. Currently, only data-augmentation
            is supported
        da_task:
          anyOf:
          - type: string
          - type: 'null'
          title: Da Task
          description: Matches field generated by an specific DA task, given its prefix
      additionalProperties: false
      type: object
      required:
      - by
      title: Generated
      description: Matches if the field was generated by the given source
    Generator:
      type: string
      enum:
      - data-augmentation
      - processor
      - user
      title: Generator
    GenericFieldData:
      properties:
        value:
          anyOf:
          - type: string
          - type: 'null'
          title: Value
        extracted:
          anyOf:
          - $ref: '#/components/schemas/TextFieldExtractedData'
          - type: 'null'
        error:
          anyOf:
          - $ref: '#/components/schemas/Error'
          - type: 'null'
        status:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
        errors:
          anyOf:
          - items:
              $ref: '#/components/schemas/Error'
            type: array
          - type: 'null'
          title: Errors
      type: object
      title: GenericFieldData
    GoogleSourceSchema:
      properties:
        type:
          type: string
          const: google
          title: Type
          default: google
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        time_range:
          anyOf:
          - $ref: '#/components/schemas/GoogleTimeRange'
          - type: 'null'
          description: Restrict Google results to a recent time window
        exclude_domains:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Exclude Domains
          description: Domains to exclude from Google search results
      type: object
      title: GoogleSourceSchema
    GoogleTimeRange:
      type: string
      enum:
      - past_day
      - past_week
      - past_month
      - past_year
      title: GoogleTimeRange
    GraphNode:
      properties:
        value:
          anyOf:
          - type: string
          - type: 'null'
          title: Value
        match:
          $ref: '#/components/schemas/NodeMatchKindName'
          default: exact
        type:
          anyOf:
          - $ref: '#/components/schemas/RelationNodeType'
          - type: 'null'
          default: entity
        group:
          anyOf:
          - type: string
          - type: 'null'
          title: Group
      additionalProperties: false
      type: object
      title: GraphNode
    GraphPath:
      properties:
        prop:
          type: string
          const: path
          title: Prop
          default: path
        source:
          anyOf:
          - $ref: '#/components/schemas/GraphNode'
          - type: 'null'
        relation:
          anyOf:
          - $ref: '#/components/schemas/GraphRelation'
          - type: 'null'
        destination:
          anyOf:
          - $ref: '#/components/schemas/GraphNode'
          - type: 'null'
        undirected:
          type: boolean
          title: Undirected
          default: false
      additionalProperties: false
      type: object
      title: GraphPath
    GraphRelation:
      properties:
        label:
          anyOf:
          - type: string
          - type: 'null'
          title: Label
        type:
          anyOf:
          - $ref: '#/components/schemas/RelationType'
          - type: 'null'
        match:
          $ref: '#/components/schemas/RelationMatchKindName'
          default: exact
      additionalProperties: false
      type: object
      title: GraphRelation
    GraphStrategy:
      properties:
        name:
          type: string
          const: graph_beta
          title: Name
          default: graph_beta
        hops:
          type: integer
          maximum: 10.0
          minimum: 1.0
          title: Number of hops
          description: 'Number of hops to take when exploring the graph for relevant
            context.

            For example,

            - hops=1 will explore the neighbors of the starting entities.

            - hops=2 will explore the neighbors of the neighbors of the starting entities.

            And so on.

            Bigger values will discover more intricate relationships but will also
            take more time to compute.'
          default: 3
        top_k:
          type: integer
          maximum: 300.0
          minimum: 1.0
          title: Top k
          description: Number of relationships to keep after each hop after ranking
            them by relevance to the query. This number correlates to more paragraphs
            being sent as context. If not set, this number will be set to 30 if `relation_text_as_paragraphs`
            is set to false or 200 if `relation_text_as_paragraphs` is set to true.
        agentic_graph_only:
          type: boolean
          title: Do not use relations extracted by processor.
          description: If set to true, only relationships extracted from a graph extraction
            agent are considered for context expansion.
          default: true
        relation_text_as_paragraphs:
          type: boolean
          title: Use relation text as context
          description: If set to true, the text of the relationships is to create
            context paragraphs, this enables to use bigger top K values without running
            into the generative model's context limits. If set to false, the paragraphs
            that contain the relationships are used as context.
          default: false
        relation_ranking:
          $ref: '#/components/schemas/RelationRanking'
          title: Method to rank relationships
          description: 'Method to rank relationships.

            - `reranker` uses the reranker model to rank relationships.

            - `generative` uses first the reranker to first lower the amount of relationships
            and then the generative model to rank relationships.

            The generative model is slower and consumes more tokens, but can provide
            better results.'
          default: reranker
        query_entity_detection:
          $ref: '#/components/schemas/QueryEntityDetection'
          title: Method to detect entities in the query
          description: 'Method to detect entities in the query.

            - `predict` uses NUA to detect entities in the query, slower and more
            accurate but requires an exact text match between Knowledge Box entities
            and entities in the query.

            - `suggest` uses fuzzy search to detect entities. It''s faster and more
            flexible but might have trouble matching entities composed of multiple
            words. It will fallback to Predict if no entities are detected.'
          default: predict
        weight:
          type: number
          minimum: 0.0
          title: Weight
          description: Weight of the graph strategy in the context. The weight is
            used to scale the results of the strategy before adding them to the context.The
            weight should be a positive number.
          default: 3.0
      type: object
      title: GraphStrategy
      description: 'This strategy retrieves context pieces by exploring the Knowledge
        Graph, starting from the entities present in the query.

        It works best if the Knowledge Box has a user-defined Graph Extraction agent
        enabled.'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    HierarchyResourceStrategy:
      properties:
        name:
          type: string
          const: hierarchy
          title: Name
          default: hierarchy
        count:
          type: integer
          maximum: 1024.0
          minimum: 0.0
          title: Count
          description: Number of extra characters that are added to each matching
            paragraph when adding to the context.
          default: 0
      type: object
      title: HierarchyResourceStrategy
    Image:
      properties:
        content_type:
          type: string
          title: Content Type
        b64encoded:
          type: string
          title: B64Encoded
      type: object
      required:
      - content_type
      - b64encoded
      title: Image
    Inequalities:
      properties:
        schema_id:
          type: string
          title: Schema Id
        key:
          type: string
          title: Key
        gte:
          anyOf:
          - type: integer
          - type: number
          - type: string
            format: date-time
          - type: 'null'
          title: Gte
        lte:
          anyOf:
          - type: integer
          - type: number
          - type: string
            format: date-time
          - type: 'null'
          title: Lte
      additionalProperties: false
      type: object
      required:
      - schema_id
      - key
      title: Inequalities
      description: Inequality operators that can be grouped to perform range queries.
    KeyValueField:
      properties:
        data:
          additionalProperties:
            anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: integer
            - type: number
            - type: boolean
            - type: string
              format: date-time
            - $ref: '#/components/schemas/Range'
          type: object
          title: Data
          description: Key-value pairs conforming to the schema.
      type: object
      title: KeyValueField
      description: "A key-value field value. The field id (key in the resource's key_values\
        \ dict)\nmust equal the schema name \u2014 enforcing one KV field per schema\
        \ per resource."
    KeyValueFieldData:
      properties:
        value:
          anyOf:
          - $ref: '#/components/schemas/KeyValueField'
          - type: 'null'
        error:
          anyOf:
          - $ref: '#/components/schemas/Error'
          - type: 'null'
        status:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
        errors:
          anyOf:
          - items:
              $ref: '#/components/schemas/Error'
            type: array
          - type: 'null'
          title: Errors
      type: object
      title: KeyValueFieldData
    Keyword:
      properties:
        prop:
          type: string
          const: keyword
          title: Prop
          default: keyword
        word:
          type: string
          title: Word
          description: Keyword to find
      additionalProperties: false
      type: object
      required:
      - word
      title: Keyword
      description: Matches all fields that contain a keyword
    Kind:
      properties:
        prop:
          type: string
          const: kind
          title: Prop
          default: kind
        kind:
          $ref: '#/components/schemas/TypeParagraph'
          description: The kind of paragraph to match
      additionalProperties: false
      type: object
      required:
      - kind
      title: Kind
      description: Matches paragraphs of a certain kind
    KnowledgeGraphEntity:
      properties:
        name:
          type: string
          title: Name
        type:
          anyOf:
          - $ref: '#/components/schemas/RelationNodeType'
          - type: 'null'
        subtype:
          anyOf:
          - type: string
          - type: 'null'
          title: Subtype
      type: object
      required:
      - name
      title: KnowledgeGraphEntity
    KnowledgeboxFindResults:
      properties:
        resources:
          additionalProperties:
            $ref: '#/components/schemas/FindResource'
          type: object
          title: Resources
        relations:
          anyOf:
          - $ref: '#/components/schemas/Relations'
          - type: 'null'
        query:
          anyOf:
          - type: string
          - type: 'null'
          title: Find Results Query
        rephrased_query:
          anyOf:
          - type: string
          - type: 'null'
          title: Rephrased Query
        total:
          type: integer
          title: Total
          default: 0
        page_number:
          type: integer
          title: Page Number
          description: Pagination will be deprecated, please, refer to `top_k` in
            the request
          default: 0
        page_size:
          type: integer
          title: Page Size
          description: Pagination will be deprecated, please, refer to `top_k` in
            the request
          default: 20
        next_page:
          type: boolean
          title: Next Page
          description: Pagination will be deprecated, please, refer to `top_k` in
            the request
          default: false
        nodes:
          anyOf:
          - items:
              additionalProperties:
                type: string
              type: object
            type: array
          - type: 'null'
          title: Nodes
          description: List of nodes queried in the search
        shards:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Shards
          description: The list of shard replica ids used for the search.
        autofilters:
          items:
            type: string
          type: array
          title: Applied autofilters
          description: '[deprecated] list of filters automatically applied to the
            search query'
          default: []
          deprecated: true
        min_score:
          anyOf:
          - type: number
          - $ref: '#/components/schemas/MinScore'
          - type: 'null'
          title: Minimum result score
          description: The minimum scores that have been used for the search operation.
          default:
            bm25: 0.0
        best_matches:
          items:
            type: string
          type: array
          title: Best matches
          description: List of ids of best matching paragraphs. The list is sorted
            by decreasing relevance (most relevant first).
          default: []
        metrics:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Metrics
          description: Metrics information about the search operation. The metadata
            included in this field is subject to change and should not be used in
            production. This is only available if the `debug` parameter is set to
            true in the request.
        search_after:
          anyOf:
          - type: string
          - type: 'null'
          title: Search After
          description: 'Pass this token to another request to get the next results
            in the search. Only results from the paragraph index will be returned
            and rerankers will be disabled. '
      type: object
      required:
      - resources
      title: KnowledgeboxFindResults
      description: Find on knowledgebox results
    LLMConfig:
      properties:
        _type:
          type: string
          title: Type
          default: llm_config
          widget: not_show
        model_id:
          type: string
          title: Model
          description: The model identifier (e.g. 'chatgpt-azure-4o-mini', 'chatgpt-4.1')
          widget: model_select
        reasoning:
          anyOf:
          - $ref: '#/components/schemas/SimpleReasoning'
          - type: 'null'
          title: Reasoning
          description: Simplified reasoning toggle. Set to 'enabled' for reasoning
            models.
          widget: enum_select
        advanced_reasoning:
          anyOf:
          - $ref: '#/components/schemas/ReasoningConfig'
          - type: 'null'
          title: Advanced reasoning
          description: Fine-grained reasoning configuration (effort level, budget
            tokens). Takes precedence over 'reasoning' if both are set.
          widget: not_show
      type: object
      required:
      - model_id
      title: LLMConfig
      description: 'Structured generative model configuration.


        The `_type` field serves as a discriminator/marker that makes instances

        of this model identifiable when stored as JSONB in the database.

        Migration scripts can locate all LLMConfig instances by querying for

        fields containing `{"_type": "llm_config"}`.'
    Label:
      properties:
        prop:
          type: string
          const: label
          title: Prop
          default: label
        labelset:
          type: string
          title: Labelset
          description: The ID of the labelset to match
        label:
          anyOf:
          - type: string
          - type: 'null'
          title: Label
          description: The label to match. If blank, matches all labels in the given
            labelset
      additionalProperties: false
      type: object
      required:
      - labelset
      title: Label
      description: Matches fields/paragraphs with a label (or labelset)
    Language:
      properties:
        prop:
          type: string
          const: language
          title: Prop
          default: language
        only_primary:
          type: boolean
          title: Only Primary
          description: Match only the primary language of the document. By default,
            matches any language that appears in the document
          default: false
        language:
          type: string
          title: Language
          description: 'The code of the language to match, e.g: en'
      additionalProperties: false
      type: object
      required:
      - language
      title: Language
      description: Matches the language of the field
    LargeComputedMetadata:
      properties:
        metadata:
          anyOf:
          - $ref: '#/components/schemas/FieldLargeMetadata'
          - type: 'null'
        split_metadata:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/FieldLargeMetadata'
            type: object
          - type: 'null'
          title: Split Metadata
        deleted_splits:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Deleted Splits
      type: object
      title: LargeComputedMetadata
    LinkExtractedData:
      properties:
        date:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Date
        language:
          anyOf:
          - type: string
          - type: 'null'
          title: Language
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        metadata:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          title: Metadata
        link_thumbnail:
          anyOf:
          - $ref: '#/components/schemas/CloudLink'
          - type: 'null'
        link_preview:
          anyOf:
          - $ref: '#/components/schemas/CloudLink'
          - type: 'null'
        field:
          anyOf:
          - type: string
          - type: 'null'
          title: Link Extracted Data Field
        link_image:
          anyOf:
          - $ref: '#/components/schemas/CloudLink'
          - type: 'null'
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        type:
          anyOf:
          - type: string
          - type: 'null'
          title: Type
        embed:
          anyOf:
          - type: string
          - type: 'null'
          title: Embed
        file_generated:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/CloudLink'
            type: object
          - type: 'null'
          title: File Generated
      type: object
      title: LinkExtractedData
    LinkFieldData:
      properties:
        value:
          anyOf:
          - $ref: '#/components/schemas/FieldLink'
          - type: 'null'
        extracted:
          anyOf:
          - $ref: '#/components/schemas/LinkFieldExtractedData'
          - type: 'null'
        error:
          anyOf:
          - $ref: '#/components/schemas/Error'
          - type: 'null'
        status:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
        errors:
          anyOf:
          - items:
              $ref: '#/components/schemas/Error'
            type: array
          - type: 'null'
          title: Errors
      type: object
      title: LinkFieldData
    LinkFieldExtractedData:
      properties:
        text:
          anyOf:
          - $ref: '#/components/schemas/ExtractedText'
          - type: 'null'
        metadata:
          anyOf:
          - $ref: '#/components/schemas/FieldComputedMetadata'
          - type: 'null'
        large_metadata:
          anyOf:
          - $ref: '#/components/schemas/LargeComputedMetadata'
          - type: 'null'
        vectors:
          anyOf:
          - $ref: '#/components/schemas/VectorObject'
          - type: 'null'
        question_answers:
          anyOf:
          - $ref: '#/components/schemas/FieldQuestionAnswers'
          - type: 'null'
        relation_node_vectors:
          anyOf:
          - additionalProperties:
              items:
                $ref: '#/components/schemas/RelationNodeVector'
              type: array
            type: object
          - type: 'null'
          title: Relation Node Vectors
        relation_edge_vectors:
          anyOf:
          - additionalProperties:
              items:
                $ref: '#/components/schemas/RelationEdgeVector'
              type: array
            type: object
          - type: 'null'
          title: Relation Edge Vectors
        link:
          anyOf:
          - $ref: '#/components/schemas/LinkExtractedData'
          - type: 'null'
      type: object
      title: LinkFieldExtractedData
    MCPSourceSchema:
      properties:
        type:
          type: string
          const: mcp
          title: Type
          default: mcp
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        uri:
          type: string
          title: Uri
          description: URI of the MCP server endpoint
        headers:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          title: Headers
          description: HTTP headers forwarded with every MCP request
        tool_choice_model:
          anyOf:
          - $ref: '#/components/schemas/LLMConfig'
          - type: 'null'
          description: Model used for MCP tool selection
          default:
            _type: llm_config
            model_id: chatgpt-4.1
        valid_headers:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Valid Headers
          description: Allowlist of header names that may be forwarded
      type: object
      required:
      - uri
      title: MCPSourceSchema
    MaxTokens:
      properties:
        context:
          anyOf:
          - type: integer
          - type: 'null'
          title: Maximum context tokens
          description: Use to limit the amount of tokens used in the LLM context
        answer:
          anyOf:
          - type: integer
          - type: 'null'
          title: Maximum answer tokens
          description: Use to limit the amount of tokens used in the LLM answer
      type: object
      title: MaxTokens
    Message:
      properties:
        type:
          type: string
          const: message
          title: Type
          default: message
        author:
          $ref: '#/components/schemas/Author'
        text:
          type: string
          title: Text
      type: object
      required:
      - author
      - text
      title: Message
    Metadata:
      properties:
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          default: {}
        language:
          anyOf:
          - type: string
          - type: 'null'
          title: Language
        languages:
          anyOf:
          - items:
              type: string
            type: array
            maxItems: 1024
          - type: 'null'
          title: Languages
        status:
          $ref: '#/components/schemas/ResourceProcessingStatus'
      type: object
      required:
      - status
      title: Metadata
    MetadataExtensionStrategy:
      properties:
        name:
          type: string
          const: metadata_extension
          title: Name
          default: metadata_extension
        types:
          items:
            $ref: '#/components/schemas/MetadataExtensionType'
          type: array
          minItems: 1
          title: Types
          description: "\nList of resource metadata types to add to the context.\n\
            \  - 'origin': origin metadata of the resource.\n  - 'classification_labels':\
            \ classification labels of the resource.\n  - 'ner': Named Entity Recognition\
            \ entities detected for the resource.\n  - 'extra_metadata': extra metadata\
            \ of the resource.\n\nTypes for which the metadata is not found at the\
            \ resource are ignored and not added to the context.\n"
          examples:
          - - origin
            - classification_labels
          - - ners
      type: object
      required:
      - types
      title: MetadataExtensionStrategy
      description: 'RAG strategy to enrich the context with metadata of the matching
        paragraphs or its resources.

        This strategy can be combined with any of the other strategies.'
    MetadataExtensionType:
      type: string
      enum:
      - origin
      - classification_labels
      - ners
      - extra_metadata
      title: MetadataExtensionType
    MinScore:
      properties:
        semantic:
          anyOf:
          - type: number
          - type: 'null'
          title: Minimum semantic score
          description: 'Minimum semantic similarity score used to filter vector index
            search. If not specified, the default minimum score of the semantic model
            associated to the Knowledge Box will be used. Check out the documentation
            for more information on how to use this parameter: https://docs.nuclia.dev/docs/rag/advanced/search#minimum-score'
        bm25:
          type: number
          minimum: 0.0
          title: Minimum bm25 score
          description: 'Minimum score used to filter bm25 index search. Check out
            the documentation for more information on how to use this parameter: https://docs.nuclia.dev/docs/rag/advanced/search#minimum-score'
          default: 0
      type: object
      title: MinScore
    NeighbouringParagraphsStrategy:
      properties:
        name:
          type: string
          const: neighbouring_paragraphs
          title: Name
          default: neighbouring_paragraphs
        before:
          type: integer
          minimum: 0.0
          title: Before
          description: Number of previous neighbouring paragraphs to add to the context,
            for each matching paragraph in the retrieval step.
          default: 2
        after:
          type: integer
          minimum: 0.0
          title: After
          description: Number of following neighbouring paragraphs to add to the context,
            for each matching paragraph in the retrieval step.
          default: 2
      type: object
      title: NeighbouringParagraphsStrategy
    NestedListPosition:
      properties:
        positions:
          items:
            $ref: '#/components/schemas/NestedPosition'
          type: array
          title: Positions
      type: object
      required:
      - positions
      title: NestedListPosition
    NestedPosition:
      properties:
        start:
          anyOf:
          - type: integer
          - type: 'null'
          title: Start
        end:
          anyOf:
          - type: integer
          - type: 'null'
          title: End
        page:
          anyOf:
          - type: integer
          - type: 'null'
          title: Position Page
      type: object
      title: NestedPosition
    NodeMatchKindName:
      type: string
      enum:
      - exact
      - fuzzy
      - fuzzy_words
      - semantic
      title: NodeMatchKindName
    Not_FieldFilterExpressionType_-Input:
      properties:
        operand:
          anyOf:
          - $ref: '#/components/schemas/And_FieldFilterExpressionType_-Input'
          - $ref: '#/components/schemas/Or_FieldFilterExpressionType_-Input'
          - $ref: '#/components/schemas/Not_FieldFilterExpressionType_-Input'
          - $ref: '#/components/schemas/Resource'
          - $ref: '#/components/schemas/Field'
          - $ref: '#/components/schemas/Keyword'
          - $ref: '#/components/schemas/DateCreated'
          - $ref: '#/components/schemas/DateModified'
          - $ref: '#/components/schemas/Label'
          - $ref: '#/components/schemas/ResourceMimetype'
          - $ref: '#/components/schemas/FieldMimetype'
          - $ref: '#/components/schemas/Entity-Input'
          - $ref: '#/components/schemas/Language'
          - $ref: '#/components/schemas/OriginTag'
          - $ref: '#/components/schemas/OriginMetadata'
          - $ref: '#/components/schemas/OriginPath'
          - $ref: '#/components/schemas/OriginSource'
          - $ref: '#/components/schemas/OriginCollaborator'
          - $ref: '#/components/schemas/nucliadb_models__filters__Generated'
          title: Not Operand
      additionalProperties: false
      type: object
      required:
      - operand
      title: Not[FieldFilterExpressionType]
    Not_FieldFilterExpressionType_-Output:
      additionalProperties: true
      type: object
    Not_GraphPathQuery_:
      properties:
        operand:
          oneOf:
          - $ref: '#/components/schemas/And_GraphPathQuery_'
          - $ref: '#/components/schemas/Or_GraphPathQuery_'
          - $ref: '#/components/schemas/Not_GraphPathQuery_'
          - $ref: '#/components/schemas/GraphPath'
          - $ref: '#/components/schemas/SourceNode'
          - $ref: '#/components/schemas/DestinationNode'
          - $ref: '#/components/schemas/AnyNode'
          - $ref: '#/components/schemas/Relation-Input'
          - $ref: '#/components/schemas/nucliadb_models__graph__requests__Generated'
          title: Not Operand
      additionalProperties: false
      type: object
      required:
      - operand
      title: Not[GraphPathQuery]
    Not_KVFilterExpression_-Input:
      properties:
        operand:
          oneOf:
          - $ref: '#/components/schemas/And_KVFilterExpression_-Input'
          - $ref: '#/components/schemas/Or_KVFilterExpression_-Input'
          - $ref: '#/components/schemas/Not_KVFilterExpression_-Input'
          - $ref: '#/components/schemas/Eq'
          - $ref: '#/components/schemas/Inequalities'
          - $ref: '#/components/schemas/Contains'
          title: Not Operand
      additionalProperties: false
      type: object
      required:
      - operand
      title: Not[KVFilterExpression]
    Not_KVFilterExpression_-Output:
      additionalProperties: true
      type: object
    Not_ParagraphFilterExpression_-Input:
      properties:
        operand:
          oneOf:
          - $ref: '#/components/schemas/And_ParagraphFilterExpression_-Input'
          - $ref: '#/components/schemas/Or_ParagraphFilterExpression_-Input'
          - $ref: '#/components/schemas/Not_ParagraphFilterExpression_-Input'
          - $ref: '#/components/schemas/Label'
          - $ref: '#/components/schemas/Kind'
          title: Not Operand
      additionalProperties: false
      type: object
      required:
      - operand
      title: Not[ParagraphFilterExpression]
    Not_ParagraphFilterExpression_-Output:
      additionalProperties: true
      type: object
    NucliaDBClientType:
      type: string
      enum:
      - api
      - widget
      - web
      - dashboard
      - desktop
      - chrome_extension
      title: NucliaDBClientType
    NucliaDBSourceSchema-Input:
      properties:
        type:
          type: string
          const: nucliadb
          title: Type
          default: nucliadb
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        search_config:
          anyOf:
          - type: string
          - type: 'null'
          title: Search Config
          description: ID of an ask search configuration applied to this source
        filter_expression:
          anyOf:
          - $ref: '#/components/schemas/FilterExpression-Input'
          - type: 'null'
          title: Filter expression
          description: Filter expression to narrow NucliaDB search results
        labels:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Labels
          description: Label filters to restrict which resources are searched
        resource_filters:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Resource filters
          description: Additional resource-level filters passed to the NucliaDB search
            API
      type: object
      title: NucliaDBSourceSchema
    NucliaDBSourceSchema-Output:
      properties:
        type:
          type: string
          const: nucliadb
          title: Type
          default: nucliadb
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        search_config:
          anyOf:
          - type: string
          - type: 'null'
          title: Search Config
          description: ID of an ask search configuration applied to this source
        filter_expression:
          anyOf:
          - $ref: '#/components/schemas/FilterExpression-Output'
          - type: 'null'
          title: Filter expression
          description: Filter expression to narrow NucliaDB search results
        labels:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Labels
          description: Label filters to restrict which resources are searched
        resource_filters:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Resource filters
          description: Additional resource-level filters passed to the NucliaDB search
            API
      type: object
      title: NucliaDBSourceSchema
    Operator:
      type: string
      enum:
      - and
      - or
      title: Operator
    Or_FieldFilterExpressionType_-Input:
      properties:
        operands:
          items:
            anyOf:
            - $ref: '#/components/schemas/And_FieldFilterExpressionType_-Input'
            - $ref: '#/components/schemas/Or_FieldFilterExpressionType_-Input'
            - $ref: '#/components/schemas/Not_FieldFilterExpressionType_-Input'
            - $ref: '#/components/schemas/Resource'
            - $ref: '#/components/schemas/Field'
            - $ref: '#/components/schemas/Keyword'
            - $ref: '#/components/schemas/DateCreated'
            - $ref: '#/components/schemas/DateModified'
            - $ref: '#/components/schemas/Label'
            - $ref: '#/components/schemas/ResourceMimetype'
            - $ref: '#/components/schemas/FieldMimetype'
            - $ref: '#/components/schemas/Entity-Input'
            - $ref: '#/components/schemas/Language'
            - $ref: '#/components/schemas/OriginTag'
            - $ref: '#/components/schemas/OriginMetadata'
            - $ref: '#/components/schemas/OriginPath'
            - $ref: '#/components/schemas/OriginSource'
            - $ref: '#/components/schemas/OriginCollaborator'
            - $ref: '#/components/schemas/nucliadb_models__filters__Generated'
          type: array
          minItems: 1
          title: Or Operands
      additionalProperties: false
      type: object
      required:
      - operands
      title: Or[FieldFilterExpressionType]
    Or_FieldFilterExpressionType_-Output:
      additionalProperties: true
      type: object
    Or_GraphPathQuery_:
      properties:
        operands:
          items:
            oneOf:
            - $ref: '#/components/schemas/And_GraphPathQuery_'
            - $ref: '#/components/schemas/Or_GraphPathQuery_'
            - $ref: '#/components/schemas/Not_GraphPathQuery_'
            - $ref: '#/components/schemas/GraphPath'
            - $ref: '#/components/schemas/SourceNode'
            - $ref: '#/components/schemas/DestinationNode'
            - $ref: '#/components/schemas/AnyNode'
            - $ref: '#/components/schemas/Relation-Input'
            - $ref: '#/components/schemas/nucliadb_models__graph__requests__Generated'
          type: array
          minItems: 1
          title: Or Operands
      additionalProperties: false
      type: object
      required:
      - operands
      title: Or[GraphPathQuery]
    Or_KVFilterExpression_-Input:
      properties:
        operands:
          items:
            oneOf:
            - $ref: '#/components/schemas/And_KVFilterExpression_-Input'
            - $ref: '#/components/schemas/Or_KVFilterExpression_-Input'
            - $ref: '#/components/schemas/Not_KVFilterExpression_-Input'
            - $ref: '#/components/schemas/Eq'
            - $ref: '#/components/schemas/Inequalities'
            - $ref: '#/components/schemas/Contains'
          type: array
          minItems: 1
          title: Or Operands
      additionalProperties: false
      type: object
      required:
      - operands
      title: Or[KVFilterExpression]
    Or_KVFilterExpression_-Output:
      additionalProperties: true
      type: object
    Or_ParagraphFilterExpression_-Input:
      properties:
        operands:
          items:
            oneOf:
            - $ref: '#/components/schemas/And_ParagraphFilterExpression_-Input'
            - $ref: '#/components/schemas/Or_ParagraphFilterExpression_-Input'
            - $ref: '#/components/schemas/Not_ParagraphFilterExpression_-Input'
            - $ref: '#/components/schemas/Label'
            - $ref: '#/components/schemas/Kind'
          type: array
          minItems: 1
          title: Or Operands
      additionalProperties: false
      type: object
      required:
      - operands
      title: Or[ParagraphFilterExpression]
    Or_ParagraphFilterExpression_-Output:
      additionalProperties: true
      type: object
    Origin:
      properties:
        source_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Source Id
        url:
          anyOf:
          - type: string
          - type: 'null'
          title: Url
        created:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created
        modified:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Modified
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: Generic metadata from the resource at the origin system. It
            can later be used for filtering on search endpoints with '/origin.metadata/{key}/{value}'
          default: {}
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: Resource tags about the origin system. It can later be used
            for filtering on search endpoints with '/origin.tags/{tag}'
          default: []
        collaborators:
          items:
            type: string
          type: array
          maxItems: 100
          title: Collaborators
          default: []
        filename:
          anyOf:
          - type: string
          - type: 'null'
          title: Filename
        related:
          items:
            type: string
          type: array
          maxItems: 100
          title: Related
          default: []
        path:
          anyOf:
          - type: string
            maxLength: 2048
          - type: 'null'
          title: Path
          description: Path of the original resource. Typically used to store folder
            structure information of the resource at the origin system. It can be
            later used for filtering on search endpoints with '/origin.path/{path}'
        sync_metadata:
          anyOf:
          - $ref: '#/components/schemas/SyncMetadata'
          - type: 'null'
          title: Sync Metadata
          description: Metadata related to the resource from the origin system fetched
            by the Progress Agentic RAG's Cloud Storage Sync service.
        source:
          anyOf:
          - $ref: '#/components/schemas/Source'
          - type: 'null'
          default: API
      type: object
      title: Origin
    OriginCollaborator:
      properties:
        prop:
          type: string
          const: origin_collaborator
          title: Prop
          default: origin_collaborator
        collaborator:
          type: string
          title: Collaborator
          description: Collaborator
      additionalProperties: false
      type: object
      required:
      - collaborator
      title: OriginCollaborator
      description: Matches the origin collaborators
    OriginMetadata:
      properties:
        prop:
          type: string
          const: origin_metadata
          title: Prop
          default: origin_metadata
        field:
          type: string
          title: Origin Metadata Field
          description: Metadata field
        value:
          anyOf:
          - type: string
          - type: 'null'
          title: Value
          description: Value of the metadata field. If blank, matches any document
            with the given metadata field set (to any value)
      additionalProperties: false
      type: object
      required:
      - field
      title: OriginMetadata
      description: Matches metadata from the origin
    OriginPath:
      properties:
        prop:
          type: string
          const: origin_path
          title: Prop
          default: origin_path
        prefix:
          anyOf:
          - type: string
          - type: 'null'
          title: Prefix
          description: 'Prefix of the path, matches all paths under this prefixe.g:
            `prefix=/dir/` matches `/dir` and `/dir/a/b` but not `/dirrrr`'
      additionalProperties: false
      type: object
      title: OriginPath
      description: Matches the origin path
    OriginSource:
      properties:
        prop:
          type: string
          const: origin_source
          title: Prop
          default: origin_source
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
          description: Source ID
      additionalProperties: false
      type: object
      title: OriginSource
      description: Matches the origin source id
    OriginTag:
      properties:
        prop:
          type: string
          const: origin_tag
          title: Prop
          default: origin_tag
        tag:
          type: string
          title: Tag
          description: The tag to match
      additionalProperties: false
      type: object
      required:
      - tag
      title: OriginTag
      description: Matches all fields with a given origin tag
    PageImageStrategy:
      properties:
        name:
          type: string
          const: page_image
          title: Name
          default: page_image
        count:
          anyOf:
          - type: integer
          - type: 'null'
          title: Count
          description: Maximum number of page images to retrieve. By default, at most
            5 images are retrieved.
      type: object
      title: PageImageStrategy
    PageInformation:
      properties:
        page:
          anyOf:
          - type: integer
          - type: 'null'
          title: Page Information Page
        page_with_visual:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Page With Visual
      type: object
      title: PageInformation
    PagePositions:
      properties:
        start:
          anyOf:
          - type: integer
          - type: 'null'
          title: Start
        end:
          anyOf:
          - type: integer
          - type: 'null'
          title: End
      type: object
      title: PagePositions
    PageStructure:
      properties:
        page:
          $ref: '#/components/schemas/PageStructurePage'
        tokens:
          items:
            $ref: '#/components/schemas/PageStructureToken'
          type: array
          title: Tokens
      type: object
      required:
      - page
      - tokens
      title: PageStructure
    PageStructurePage:
      properties:
        width:
          type: integer
          title: Width
        height:
          type: integer
          title: Height
      type: object
      required:
      - width
      - height
      title: PageStructurePage
    PageStructureToken:
      properties:
        x:
          type: number
          title: X
        y:
          type: number
          title: Y
        width:
          type: number
          title: Width
        height:
          type: number
          title: Height
        text:
          type: string
          title: Text
        line:
          type: number
          title: Line
      type: object
      required:
      - x
      - y
      - width
      - height
      - text
      - line
      title: PageStructureToken
    Paragraph:
      properties:
        start:
          anyOf:
          - type: integer
          - type: 'null'
          title: Start
        end:
          anyOf:
          - type: integer
          - type: 'null'
          title: End
        start_seconds:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: Start Seconds
        end_seconds:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: End Seconds
        kind:
          anyOf:
          - $ref: '#/components/schemas/TypeParagraph'
          - type: 'null'
        classifications:
          anyOf:
          - items:
              $ref: '#/components/schemas/Classification'
            type: array
          - type: 'null'
          title: Classifications
        sentences:
          anyOf:
          - items:
              $ref: '#/components/schemas/Sentence'
            type: array
          - type: 'null'
          title: Sentences
        key:
          anyOf:
          - type: string
          - type: 'null'
          title: Key
        page:
          anyOf:
          - $ref: '#/components/schemas/PageInformation'
          - type: 'null'
        representation:
          anyOf:
          - $ref: '#/components/schemas/Representation'
          - type: 'null'
        relations:
          anyOf:
          - $ref: '#/components/schemas/ParagraphRelations'
          - type: 'null'
      type: object
      title: Paragraph
    ParagraphAnnotation:
      properties:
        classifications:
          items:
            $ref: '#/components/schemas/UserClassification'
          type: array
          title: Classifications
          default: []
        key:
          type: string
          title: Key
      type: object
      required:
      - key
      title: ParagraphAnnotation
    ParagraphImageStrategy:
      properties:
        name:
          type: string
          const: paragraph_image
          title: Name
          default: paragraph_image
      type: object
      title: ParagraphImageStrategy
    ParagraphRelations:
      properties:
        parents:
          items:
            type: string
          type: array
          title: Parents
          default: []
        siblings:
          items:
            type: string
          type: array
          title: Siblings
          default: []
        replacements:
          items:
            type: string
          type: array
          title: Replacements
          default: []
      type: object
      title: ParagraphRelations
    PerplexitySourceSchema:
      properties:
        type:
          type: string
          const: perplexity
          title: Type
          default: perplexity
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        enabled_domains:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Enabled Domains
          description: List of domains that Perplexity is allowed to search
      type: object
      title: PerplexitySourceSchema
    Position:
      properties:
        start:
          type: integer
          title: Start
        end:
          type: integer
          title: End
      type: object
      required:
      - start
      - end
      title: Position
    Positions:
      properties:
        position:
          items:
            $ref: '#/components/schemas/Position'
          type: array
          title: Position
        entity:
          type: string
          title: Entity
      type: object
      required:
      - position
      - entity
      title: Positions
    PreQueriesStrategy:
      properties:
        name:
          type: string
          const: prequeries
          title: Name
          default: prequeries
        queries:
          items:
            $ref: '#/components/schemas/PreQuery'
          type: array
          maxItems: 15
          minItems: 1
          title: Queries
          description: List of queries to run before the main query. The results are
            added to the context with the specified weights for each query. There
            is a limit of 10 prequeries per request.
        main_query_weight:
          type: number
          minimum: 0.0
          title: Main query weight
          description: Weight of the main query in the context. Use this to control
            the importance of the main query in the context.
          default: 1.0
      type: object
      required:
      - queries
      title: PreQueriesStrategy
      description: 'This strategy allows to run a set of queries before the main query
        and add the results to the context.

        It allows to give more importance to some queries over others by setting the
        weight of each query.

        The weight of the main query can also be set with the `main_query_weight`
        parameter.'
    PreQuery:
      properties:
        request:
          $ref: '#/components/schemas/FindRequest'
          title: Request
          description: The request to be executed before the main query.
        weight:
          type: number
          minimum: 0.0
          title: Weight
          description: Weight of the prequery in the context. The weight is used to
            scale the results of the prequery before adding them to the context.The
            weight should be a positive number, and they are normalized so that the
            sum of all weights for all prequeries is 1.
          default: 1.0
        id:
          anyOf:
          - type: string
            maxLength: 100
            minLength: 1
          - type: 'null'
          title: Prequery id
          description: Identifier of the prequery. If not specified, it is autogenerated
            based on the index of the prequery in the list (prequery_0, prequery_1,
            ...).
          examples:
          - title_prequery
          - summary_prequery
          - prequery_1
        prefilter:
          type: boolean
          title: Prefilter
          description: If set to true, the prequery results are used to filter the
            scope of the remaining queries. The resources of the most relevant paragraphs
            of the prefilter queries are used as resource filters for the main query
            and other prequeries with the prefilter flag set to false.
          default: false
      type: object
      required:
      - request
      title: PreQuery
    PredictReranker:
      properties:
        name:
          type: string
          const: predict
          title: Name
          default: predict
        window:
          anyOf:
          - type: integer
            maximum: 200.0
          - type: 'null'
          title: Reranker window
          description: Number of elements reranker will use. Window must be greater
            or equal to top_k. Greater values will improve results at cost of retrieval
            and reranking time. By default, this reranker uses a default of 2 times
            top_k
      type: object
      title: PredictReranker
    QueryEntityDetection:
      type: string
      enum:
      - predict
      - suggest
      title: QueryEntityDetection
    Question:
      properties:
        text:
          type: string
          title: Text
        language:
          anyOf:
          - type: string
          - type: 'null'
          title: Language
        ids_paragraphs:
          items:
            type: string
          type: array
          title: Ids Paragraphs
      type: object
      required:
      - text
      - ids_paragraphs
      title: Question
    QuestionAnswer:
      properties:
        question:
          $ref: '#/components/schemas/Question'
        answers:
          items:
            $ref: '#/components/schemas/Answer'
          type: array
          title: Answers
      type: object
      required:
      - question
      - answers
      title: QuestionAnswer
    QuestionAnswerAnnotation:
      properties:
        question_answer:
          $ref: '#/components/schemas/QuestionAnswer'
        cancelled_by_user:
          type: boolean
          title: Cancelled By User
          default: false
      type: object
      required:
      - question_answer
      title: QuestionAnswerAnnotation
    QuestionAnswers:
      properties:
        question_answer:
          items:
            $ref: '#/components/schemas/QuestionAnswer'
          type: array
          title: Question Answer
      type: object
      required:
      - question_answer
      title: QuestionAnswers
    QueueType:
      type: string
      enum:
      - private
      - shared
      title: QueueType
    Range:
      additionalProperties: true
      type: object
    RankFusionName:
      type: string
      enum:
      - rrf
      title: RankFusionName
    Reasoning:
      properties:
        display:
          type: boolean
          title: Display
          description: Whether to display the reasoning steps in the response.
          default: true
        effort:
          type: string
          enum:
          - none
          - minimal
          - low
          - medium
          - high
          - xhigh
          title: Effort
          description: Level of reasoning effort. Used by OpenAI models to control
            the depth of reasoning. If the chosen model only supports budget_tokens,
            the server normalizes this value to an appropriate token budget automatically.
          default: medium
        budget_tokens:
          type: integer
          title: Budget Tokens
          description: Token budget for reasoning. Used by Anthropic or Google models
            to limit the number of tokens used for reasoning. If the chosen model
            only supports effort, the server normalizes this value to an appropriate
            effort level automatically.
          default: 15000
      type: object
      title: Reasoning
    ReasoningConfig:
      properties:
        effort:
          anyOf:
          - $ref: '#/components/schemas/ReasoningEffort'
          - type: 'null'
        budget_tokens:
          anyOf:
          - type: integer
          - type: 'null'
          title: Budget Tokens
      type: object
      title: ReasoningConfig
      description: Advanced reasoning configuration for models that support it.
    ReasoningEffort:
      type: string
      enum:
      - none
      - minimal
      - low
      - medium
      - high
      - xhigh
      title: ReasoningEffort
      description: Reasoning effort levels supported by model providers.
    ReciprocalRankFusion:
      properties:
        name:
          type: string
          const: rrf
          title: Name
          default: rrf
        k:
          type: number
          title: RRF k parameter
          description: k parameter changes the influence top-ranked and lower-ranked
            elements have. Research has shown that 60 is a performant value across
            datasets
          default: 60.0
        window:
          anyOf:
          - type: integer
            maximum: 500.0
          - type: 'null'
          title: RRF window
          description: Number of elements for retrieval to do RRF. Window must be
            greater or equal to top_k. Greater values will increase probability of
            multi match at cost of retrieval time
        boosting:
          $ref: '#/components/schemas/ReciprocalRankFusionWeights'
          title: Retrievers boosting
          description: "Define different weights for each retriever. This allows to\
            \ assign different priorities to different retrieval methods. RRF scores\
            \ will be multiplied by this value.\n\nThe default is 1 for each retriever,\
            \ which means no extra boost for any of them. Weights below 0 can be used\
            \ for negative boosting.\n\nThis kind of boosting can be useful in multilingual\
            \ search, for example, where keyword search may not give good results\
            \ and can degrade the final search experience\n        "
      type: object
      title: ReciprocalRankFusion
    ReciprocalRankFusionWeights:
      properties:
        keyword:
          type: number
          title: Keyword
          default: 1.0
        semantic:
          type: number
          title: Semantic
          default: 1.0
      type: object
      title: ReciprocalRankFusionWeights
    Relation-Input:
      properties:
        prop:
          type: string
          const: relation
          title: Prop
          default: relation
        label:
          anyOf:
          - type: string
          - type: 'null'
          title: Label
        type:
          anyOf:
          - $ref: '#/components/schemas/RelationType'
          - type: 'null'
        match:
          $ref: '#/components/schemas/RelationMatchKindName'
          default: exact
      additionalProperties: false
      type: object
      title: Relation
    Relation-Output:
      properties:
        relation:
          $ref: '#/components/schemas/RelationType'
        label:
          anyOf:
          - type: string
          - type: 'null'
          title: Label
        metadata:
          anyOf:
          - $ref: '#/components/schemas/RelationMetadata'
          - type: 'null'
        from:
          anyOf:
          - $ref: '#/components/schemas/RelationEntity'
          - type: 'null'
        to:
          $ref: '#/components/schemas/RelationEntity'
      type: object
      required:
      - relation
      - to
      title: Relation
    RelationDirection:
      type: string
      enum:
      - in
      - out
      title: RelationDirection
    RelationEdgeVector:
      properties:
        relation_label:
          type: string
          title: Relation Label
        vector:
          items:
            type: number
          type: array
          title: Vector
      type: object
      required:
      - relation_label
      - vector
      title: RelationEdgeVector
    RelationEntity:
      properties:
        value:
          type: string
          title: Value
        type:
          $ref: '#/components/schemas/RelationNodeType'
        group:
          anyOf:
          - type: string
          - type: 'null'
          title: Group
      type: object
      required:
      - value
      - type
      title: RelationEntity
    RelationMatchKindName:
      type: string
      enum:
      - exact
      - semantic
      title: RelationMatchKindName
    RelationMetadata:
      properties:
        paragraph_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Paragraph Id
        source_start:
          anyOf:
          - type: integer
          - type: 'null'
          title: Source Start
        source_end:
          anyOf:
          - type: integer
          - type: 'null'
          title: Source End
        to_start:
          anyOf:
          - type: integer
          - type: 'null'
          title: To Start
        to_end:
          anyOf:
          - type: integer
          - type: 'null'
          title: To End
        data_augmentation_task_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Data Augmentation Task Id
      type: object
      title: RelationMetadata
    RelationNodeType:
      type: string
      enum:
      - entity
      - label
      - resource
      - user
      title: RelationNodeType
    RelationNodeVector:
      properties:
        node_value:
          type: string
          title: Node Value
        vector:
          items:
            type: number
          type: array
          title: Vector
      type: object
      required:
      - node_value
      - vector
      title: RelationNodeVector
    RelationRanking:
      type: string
      enum:
      - reranker
      - generative
      title: RelationRanking
    RelationType:
      type: string
      enum:
      - ABOUT
      - CHILD
      - COLAB
      - ENTITY
      - OTHER
      - SYNONYM
      title: RelationType
    Relations:
      properties:
        entities:
          additionalProperties:
            $ref: '#/components/schemas/EntitySubgraph'
          type: object
          title: Entities
      type: object
      required:
      - entities
      title: Relations
    Representation:
      properties:
        is_a_table:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is A Table
        reference_file:
          anyOf:
          - type: string
          - type: 'null'
          title: Reference File
      type: object
      title: Representation
    RequestSecurity:
      properties:
        access_groups:
          items:
            type: string
          type: array
          title: Groups
          description: 'List of group ids to do the request with. '
          default: []
      type: object
      title: RequestSecurity
      description: Security metadata for the search request
    RerankerName:
      type: string
      enum:
      - predict
      - noop
      title: RerankerName
      description: "Rerankers\n\n- Predict reranker: after retrieval, send the results\
        \ to Predict API to\n  rerank it. This method uses a reranker model, so one\
        \ can expect better\n  results at the expense of more latency.\n\n  This will\
        \ be the new default\n\n- No-operation (noop) reranker: maintain order and\
        \ do not rerank the results\n  after retrieval"
    Resource:
      properties:
        prop:
          type: string
          const: resource
          title: Prop
          default: resource
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
          description: UUID of the resource to match
        slug:
          anyOf:
          - type: string
            maxLength: 250
            minLength: 1
            pattern: ^[a-zA-Z0-9:_-]+$
          - type: 'null'
          title: Slug
          description: Slug of the resource to match
      additionalProperties: false
      type: object
      title: Resource Filter
      description: Matches all fields of a resource given its id or slug
    ResourceData:
      properties:
        texts:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/TextFieldData'
            type: object
          - type: 'null'
          title: Texts
        files:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/FileFieldData'
            type: object
          - type: 'null'
          title: Files
        links:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/LinkFieldData'
            type: object
          - type: 'null'
          title: Links
        conversations:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/ConversationFieldData'
            type: object
          - type: 'null'
          title: Conversations
        generics:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/GenericFieldData'
            type: object
          - type: 'null'
          title: Generics
        key_values:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/KeyValueFieldData'
            type: object
          - type: 'null'
          title: Key Values
      type: object
      title: ResourceData
    ResourceFieldPrefix:
      properties:
        prop:
          type: string
          const: resource_field_prefix
          title: Prop
          default: resource_field_prefix
        resource_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Resource Id
          description: ID of the resource containing the field(s) to match
        resource_slug:
          anyOf:
          - type: string
          - type: 'null'
          title: Resource Slug
          description: Slug of the resource containing the field(s) to match.
        field_type:
          $ref: '#/components/schemas/FieldTypeName'
          description: Type of the fields to match
        field_name_prefix:
          type: string
          title: Field Name Prefix
          description: Prefix of the name of the field to match. If blank, matches
            all fields of the given type in the given resource
      additionalProperties: false
      type: object
      required:
      - field_type
      - field_name_prefix
      title: ResourceFieldPrefix
      description: 'Matches a field or set of fields.


        This filter is for internal use only and is not exposed in the public API
        schema.'
    ResourceMimetype:
      properties:
        prop:
          type: string
          const: resource_mimetype
          title: Prop
          default: resource_mimetype
        type:
          type: string
          title: Type
          description: 'Type of the mimetype to match. e.g: In image/jpeg, type is
            image'
        subtype:
          anyOf:
          - type: string
          - type: 'null'
          title: Subtype
          description: 'Type of the mimetype to match. e.g: In image/jpeg, subtype
            is jpeg.Leave blank to match all mimetype of the type'
      additionalProperties: false
      type: object
      required:
      - type
      title: ResourceMimetype
      description: 'Matches resources with a mimetype.


        The mimetype of a resource can be assigned independently of the mimetype of
        its fields.

        In resources with multiple fields, you may prefer to use `field_mimetype`'
    ResourceProcessingStatus:
      type: string
      enum:
      - PENDING
      - PROCESSED
      - ERROR
      - EMPTY
      - BLOCKED
      - EXPIRED
      title: ResourceProcessingStatus
    ResourceProperties:
      type: string
      enum:
      - basic
      - origin
      - extra
      - relations
      - values
      - extracted
      - errors
      - security
      title: ResourceProperties
    ResourceSecurity:
      properties:
        access_groups:
          items:
            type: string
          type: array
          title: Access groups
          description: List of group ids that can access the resource.
          default: []
      type: object
      title: ResourceSecurity
      description: Security metadata for the resource
    Row:
      properties:
        cell:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Cell
      type: object
      title: Row
    RowsPreview:
      properties:
        sheets:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/Sheet'
            type: object
          - type: 'null'
          title: Sheets
      type: object
      title: RowsPreview
    SCORE_TYPE:
      type: string
      enum:
      - VECTOR
      - BM25
      - BOTH
      - RERANKER
      - RELATION_RELEVANCE
      title: SCORE_TYPE
    Sentence:
      properties:
        start:
          anyOf:
          - type: integer
          - type: 'null'
          title: Start
        end:
          anyOf:
          - type: integer
          - type: 'null'
          title: End
        key:
          anyOf:
          - type: string
          - type: 'null'
          title: Key
      type: object
      title: Sentence
    Sheet:
      properties:
        rows:
          anyOf:
          - items:
              $ref: '#/components/schemas/Row'
            type: array
          - type: 'null'
          title: Rows
      type: object
      title: Sheet
    SimpleReasoning:
      type: string
      enum:
      - disabled
      - enabled
      title: SimpleReasoning
      description: 'Simplified reasoning toggle.


        When set, this is internally mapped to a ReasoningConfig:

        - DISABLED -> ReasoningConfig(effort=ReasoningEffort.NONE)

        - ENABLED -> ReasoningConfig(effort=ReasoningEffort.HIGH)'
    Source:
      type: string
      enum:
      - WEB
      - DESKTOP
      - API
      - PYSDK
      title: Source
    SourceNode:
      properties:
        prop:
          type: string
          const: source_node
          title: Prop
          default: source_node
        value:
          anyOf:
          - type: string
          - type: 'null'
          title: Value
        match:
          $ref: '#/components/schemas/NodeMatchKindName'
          default: exact
        type:
          anyOf:
          - $ref: '#/components/schemas/RelationNodeType'
          - type: 'null'
          default: entity
        group:
          anyOf:
          - type: string
          - type: 'null'
          title: Group
      additionalProperties: false
      type: object
      title: SourceNode
    SyncAskMetadata:
      properties:
        tokens:
          anyOf:
          - $ref: '#/components/schemas/AskTokens'
          - type: 'null'
          title: Tokens
          description: Number of tokens used in the LLM context and answer
        timings:
          anyOf:
          - $ref: '#/components/schemas/AskTimings'
          - type: 'null'
          title: Timings
          description: Timings of the generative model
      type: object
      title: SyncAskMetadata
    SyncAskResponse:
      properties:
        answer:
          type: string
          title: Answer
          description: The generative answer to the query
        reasoning:
          anyOf:
          - type: string
          - type: 'null'
          title: Reasoning steps
          description: The reasoning steps followed by the LLM to generate the answer.
            This is returned only if the reasoning feature is enabled in the request.
        answer_json:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Answer JSON
          description: The generative JSON answer to the query. This is returned only
            if the answer_json_schema parameter is provided in the request.
        status:
          type: string
          title: Status
          description: The status of the query execution. It can be 'success', 'error',
            'no_context' or 'no_retrieval_data'
        retrieval_results:
          $ref: '#/components/schemas/KnowledgeboxFindResults'
          title: Retrieval results
          description: The retrieval results of the query
        retrieval_best_matches:
          items:
            $ref: '#/components/schemas/AskRetrievalMatch'
          type: array
          title: Retrieval best matches
          description: Sorted list of best matching text blocks in the retrieval step.
            This includes the main query and prequeries results, if any.
          default: []
        prequeries:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/KnowledgeboxFindResults'
            type: object
          - type: 'null'
          title: Prequeries
          description: The retrieval results of the prequeries
        learning_id:
          type: string
          title: Learning id
          description: The id of the learning request. This id can be used to provide
            feedback on the learning process.
          default: ''
        relations:
          anyOf:
          - $ref: '#/components/schemas/Relations'
          - type: 'null'
          title: Relations
          description: The detected relations of the answer
        citations:
          additionalProperties: true
          type: object
          title: Citations
          description: The citations of the answer. List of references to the resources
            used to generate the answer.
        citation_footnote_to_context:
          additionalProperties:
            type: string
          type: object
          title: Citation footnote to context
          description: Maps ids in the footnote citations to query_context keys (normally
            paragraph ids)
        augmented_context:
          anyOf:
          - $ref: '#/components/schemas/AugmentedContext'
          - type: 'null'
          description: Augmented text blocks that were sent to the LLM as part of
            the RAG strategies applied on the retrieval results in the request.
        prompt_context:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Prompt context
          description: The prompt context used to generate the answer. Returned only
            if the debug flag is set to true
        predict_request:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Predict request
          description: The internal predict request used to generate the answer. Returned
            only if the debug flag is set to true
        metadata:
          anyOf:
          - $ref: '#/components/schemas/SyncAskMetadata'
          - type: 'null'
          title: Metadata
          description: Metadata of the query execution. This includes the number of
            tokens used in the LLM context and answer, and the timings of the generative
            model.
        consumption:
          anyOf:
          - $ref: '#/components/schemas/Consumption'
          - type: 'null'
          title: Consumption
          description: The consumption of the query execution. Return only if 'X-show-consumption'
            header is set to true in the request.
        error_details:
          anyOf:
          - type: string
          - type: 'null'
          title: Error details
          description: Error details message in case there was an error
        debug:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Debug information
          description: Debug information about the ask operation. The metadata included
            in this field is subject to change and should not be used in production.
            Note that it is only available if the `debug` parameter is set to true
            in the request.
      type: object
      required:
      - answer
      - status
      - retrieval_results
      title: SyncAskResponse
    SyncMetadata:
      properties:
        file_id:
          type: string
          title: File Id
          description: Identifier of the file in the origin cloud storage system
        auth_provider:
          type: string
          title: Auth Provider
          description: Authentication provider used to access the origin cloud storage
            system
        content_hash:
          type: string
          title: Content Hash
          description: Content hash of the file in the origin cloud storage system.
            The hash algorithm used depends on the origin system.
      type: object
      required:
      - file_id
      - auth_provider
      - content_hash
      title: SyncMetadata
    TableImageStrategy:
      properties:
        name:
          type: string
          const: tables
          title: Name
          default: tables
      type: object
      title: TableImageStrategy
    TextBlockAugmentationType:
      type: string
      enum:
      - neighbouring_paragraphs
      - conversation
      - hierarchy
      - full_resource
      - field_extension
      - metadata_extension
      title: TextBlockAugmentationType
    TextFieldData:
      properties:
        value:
          anyOf:
          - $ref: '#/components/schemas/FieldText'
          - type: 'null'
        extracted:
          anyOf:
          - $ref: '#/components/schemas/TextFieldExtractedData'
          - type: 'null'
        error:
          anyOf:
          - $ref: '#/components/schemas/Error'
          - type: 'null'
        status:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
        errors:
          anyOf:
          - items:
              $ref: '#/components/schemas/Error'
            type: array
          - type: 'null'
          title: Errors
      type: object
      title: TextFieldData
    TextFieldExtractedData:
      properties:
        text:
          anyOf:
          - $ref: '#/components/schemas/ExtractedText'
          - type: 'null'
        metadata:
          anyOf:
          - $ref: '#/components/schemas/FieldComputedMetadata'
          - type: 'null'
        large_metadata:
          anyOf:
          - $ref: '#/components/schemas/LargeComputedMetadata'
          - type: 'null'
        vectors:
          anyOf:
          - $ref: '#/components/schemas/VectorObject'
          - type: 'null'
        question_answers:
          anyOf:
          - $ref: '#/components/schemas/FieldQuestionAnswers'
          - type: 'null'
        relation_node_vectors:
          anyOf:
          - additionalProperties:
              items:
                $ref: '#/components/schemas/RelationNodeVector'
              type: array
            type: object
          - type: 'null'
          title: Relation Node Vectors
        relation_edge_vectors:
          anyOf:
          - additionalProperties:
              items:
                $ref: '#/components/schemas/RelationEdgeVector'
              type: array
            type: object
          - type: 'null'
          title: Relation Edge Vectors
      type: object
      title: TextFieldExtractedData
    TextFormat:
      type: string
      enum:
      - PLAIN
      - HTML
      - RST
      - MARKDOWN
      - JSON
      - KEEP_MARKDOWN
      - JSONL
      - PLAIN_BLANKLINE_SPLIT
      title: TextFormat
    TextPosition:
      properties:
        page_number:
          anyOf:
          - type: integer
          - type: 'null'
          title: Page Number
        index:
          type: integer
          title: Index
        start:
          type: integer
          title: Start
        end:
          type: integer
          title: End
        start_seconds:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: Start Seconds
        end_seconds:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: End Seconds
      type: object
      required:
      - index
      - start
      - end
      title: TextPosition
    TokensDetail:
      properties:
        input:
          type: number
          title: Input
        output:
          type: number
          title: Output
        image:
          type: number
          title: Image
      type: object
      required:
      - input
      - output
      - image
      title: TokensDetail
    TypeParagraph:
      type: string
      enum:
      - TEXT
      - OCR
      - INCEPTION
      - DESCRIPTION
      - TRANSCRIPT
      - TITLE
      - TABLE
      title: TypeParagraph
    UserClassification:
      properties:
        labelset:
          type: string
          title: The ID of the labelset
        label:
          type: string
          title: The label assigned from the labelset
        cancelled_by_user:
          type: boolean
          title: Cancelled By User
          default: false
      type: object
      required:
      - labelset
      - label
      title: UserClassification
    UserFieldMetadata:
      properties:
        paragraphs:
          items:
            $ref: '#/components/schemas/ParagraphAnnotation'
          type: array
          title: Paragraphs
          default: []
        question_answers:
          items:
            $ref: '#/components/schemas/QuestionAnswerAnnotation'
          type: array
          title: Question Answers
          default: []
        field:
          $ref: '#/components/schemas/FieldID'
      type: object
      required:
      - field
      title: UserFieldMetadata
      description: Field-level metadata set by the user via the rest api
    UserMetadata:
      properties:
        classifications:
          items:
            $ref: '#/components/schemas/UserClassification'
          type: array
          title: Classifications
          default: []
        relations:
          items:
            $ref: '#/components/schemas/Relation-Output'
          type: array
          title: Relations
          default: []
      type: object
      title: UserMetadata
    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
    Vector:
      properties:
        start:
          anyOf:
          - type: integer
          - type: 'null'
          title: Start
        end:
          anyOf:
          - type: integer
          - type: 'null'
          title: End
        start_paragraph:
          anyOf:
          - type: integer
          - type: 'null'
          title: Start Paragraph
        end_paragraph:
          anyOf:
          - type: integer
          - type: 'null'
          title: End Paragraph
        vector:
          anyOf:
          - items:
              type: number
            type: array
          - type: 'null'
          title: Vector
      type: object
      title: Vector
    VectorObject:
      properties:
        vectors:
          anyOf:
          - $ref: '#/components/schemas/Vectors'
          - type: 'null'
        split_vectors:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/Vectors'
            type: object
          - type: 'null'
          title: Split Vectors
        deleted_splits:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Deleted Splits
      type: object
      title: VectorObject
    Vectors:
      properties:
        vectors:
          anyOf:
          - items:
              $ref: '#/components/schemas/Vector'
            type: array
          - type: 'null'
          title: Vectors
      type: object
      title: Vectors
    nucliadb_models__extracted__Entity:
      properties:
        token:
          anyOf:
          - type: string
          - type: 'null'
          title: Token
        root:
          anyOf:
          - type: string
          - type: 'null'
          title: Root
        type:
          anyOf:
          - type: string
          - type: 'null'
          title: Type
      type: object
      title: Entity
    nucliadb_models__filters__Entity:
      properties:
        prop:
          type: string
          const: entity
          title: Prop
          default: entity
        subtype:
          type: string
          title: Subtype
          description: 'Type of the entity. e.g: PERSON'
        value:
          anyOf:
          - type: string
          - type: 'null'
          title: Value
          description: 'Value of the entity. e.g: Anna. If blank, matches any entity
            of the given type'
      additionalProperties: false
      type: object
      required:
      - subtype
      title: Entity
      description: Matches fields that contains a detected entity
    nucliadb_models__filters__Generated:
      properties:
        prop:
          type: string
          const: generated
          title: Prop
          default: generated
        by:
          type: string
          const: data-augmentation
          title: By
          description: Generator for this field. Currently, only data-augmentation
            is supported
        da_task:
          anyOf:
          - type: string
          - type: 'null'
          title: Da Task
          description: Matches field generated by an specific DA task, given its prefix
      additionalProperties: false
      type: object
      required:
      - by
      title: Generated
      description: Matches if the field was generated by the given source
    nucliadb_models__graph__requests__Generated:
      properties:
        prop:
          type: string
          const: generated
          title: Prop
          default: generated
        by:
          $ref: '#/components/schemas/Generator'
          description: Generator for this field.
        da_task:
          anyOf:
          - type: string
          - type: 'null'
          title: Da Task
          description: Matches relations generated by an specific DA task, given its
            prefix
      additionalProperties: false
      type: object
      required:
      - by
      title: Generated
      description: Matches if the relation was generated by the given source
