info:
  title: Nuclia Understanding API
  description: API reference for the Nuclia Understanding API.
  version: v1
openapi: 3.0.2
servers:
- url: https://{region-x}.stashify.cloud/api/v1
  description: Development server
tags:
- name: Processing
  description: Ingest API endpoints to process data and get results back.
- name: Processing TUS uploads
  description: Processing uploads using TUS protocol
- name: Training
  description: Training API endpoints to train custom models with your data.
- name: Models
  description: Models API
- name: Knowledge Boxes
  description: Knowledge Boxes API
- name: Predict
  description: Predict API to get predictions from our models
- name: Collector
  description: Collector API
paths:
  /account/{account_id}/dataset/{dataset_id}:
    delete:
      tags:
      - Datasets
      summary: Delete Dataset
      description: Deletes a dataset
      operationId: delete_dataset_api_v1_account__account_id__dataset__dataset_id__delete
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Datasets
      summary: Get Dataset
      description: Get a dataset
      operationId: get_dataset_api_v1_account__account_id__dataset__dataset_id__get
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetCreated'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /account/{account_id}/dataset/{dataset_id}/models:
    get:
      tags:
      - Models
      summary: Learning Configuration Schema
      description: Get available models
      operationId: Learning_configuration_schema_api_v1_account__account_id__dataset__dataset_id__models_get
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Learning Configuration Schema Api V1 Account  Account
                  Id  Dataset  Dataset Id  Models Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /account/{account_id}/dataset/{dataset_id}/partition/{partition_id}:
    put:
      tags:
      - Datasets
      summary: Upload Partition Account
      description: Upload a partition of a dataset
      operationId: upload_partition_account_api_v1_account__account_id__dataset__dataset_id__partition__partition_id__put
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      - name: partition_id
        in: path
        required: true
        schema:
          type: string
          title: Partition Id
      - name: content-length
        in: header
        required: true
        schema:
          type: integer
          title: Content-Length
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Datasets
      summary: Delete Dataset Partition
      description: Deletes a partition of a dataset
      operationId: delete_dataset_partition_api_v1_account__account_id__dataset__dataset_id__partition__partition_id__delete
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      - name: partition_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z0-9-_]+$
          title: Partition Id
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /account/{account_id}/dataset/{dataset_id}/partitions:
    delete:
      tags:
      - Datasets
      summary: Delete Dataset Partitions
      description: Deletes all partitions of a dataset
      operationId: delete_dataset_partitions_api_v1_account__account_id__dataset__dataset_id__partitions_delete
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /account/{account_id}/datasets:
    post:
      tags:
      - Datasets
      summary: Create Dataset Account
      description: Creates a new dataset
      operationId: create_dataset_account_api_v1_account__account_id__datasets_post
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetInfo'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetCreated'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Datasets
      summary: List Datasets
      description: Lists all datasets
      operationId: list_datasets_api_v1_account__account_id__datasets_get
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetsList'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /account/{account_id}/model/{model_id}:
    get:
      tags:
      - Models
      summary: Learning Configuration Schema
      description: Get trained models
      operationId: Learning_configuration_schema_api_v1_account__account_id__model__model_id__get
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      - name: model_id
        in: path
        required: true
        schema:
          type: string
          format: uuid4
          title: Model Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelAccount'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Models
      summary: Model Deletion On Account
      description: Delete specific model from account, destroying action
      operationId: Model_deletion_on_account_api_v1_account__account_id__model__model_id__delete
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      - name: model_id
        in: path
        required: true
        schema:
          type: string
          format: uuid4
          title: Model Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /account/{account_id}/models:
    get:
      tags:
      - Models
      summary: Learning Configuration Models From Account
      description: Get trained models
      operationId: Learning_configuration_models_from_account_api_v1_account__account_id__models_get
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ModelsAccount'
                title: Response Learning Configuration Models From Account Api V1
                  Account  Account Id  Models Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /account/{account_id}/models/{kbid}: {}
  /account/{account_id}/models/{kbid}/{model_id}:
    delete:
      tags:
      - Models
      summary: Delete A Model From A Kb
      description: Remove from availability a model from a KB
      operationId: Delete_a_model_from_a_KB_api_v1_account__account_id__models__kbid___model_id__delete
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: model_id
        in: path
        required: true
        schema:
          type: string
          title: Model Id
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /account/{account_id}/schema:
    get:
      tags:
      - Models
      summary: Learning Configuration Schema
      description: Get schema for creating a KB
      operationId: Learning_configuration_schema_api_v1_account__account_id__schema_get
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          title: Account Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfigSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /collect/feedback/{kbid}:
    get:
      tags:
      - Collector
      summary: Feedback Avalaible Months
      description: List of months within the last year with feedback data
      operationId: Feedback_avalaible_months_api_v1_collect_feedback__kbid__get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /collect/feedback/{kbid}/{month}:
    get:
      tags:
      - Collector
      summary: Get Feedback
      description: Given a month, returns a csv with all the feedback data from it
      operationId: Get_feedback_api_v1_collect_feedback__kbid___month__get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: month
        in: path
        required: true
        schema:
          type: string
          title: Month
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /config/{kbid}:
    get:
      tags:
      - Knowledge Boxes
      summary: Knowledgebox Models Configuration
      description: Current configuration of models assigned to a knowledgebox
      operationId: Knowledgebox_models_configuration_api_v1_config__kbid__get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LearningConfiguration'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Knowledge Boxes
      summary: Knowledgebox Models Add Configuration
      description: Current configuration of models assigned to a knowledgebox
      operationId: Knowledgebox_models_Add_configuration_api_v1_config__kbid__post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LearningConfigurationCreation'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LearningConfiguration'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Knowledge Boxes
      summary: Knowledgebox Models Update Configuration
      description: Current configuration of models assigned to a knowledgebox
      operationId: Knowledgebox_models_update_configuration_api_v1_config__kbid__patch
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LearningConfigurationUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LearningConfiguration'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Knowledge Boxes
      summary: Knowledgebox Models Configuration
      description: Delete a KB configuration
      operationId: Knowledgebox_models_configuration_api_v1_config__kbid__delete
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /dataset/{dataset_id}:
    delete:
      tags:
      - Datasets
      summary: Dataset Delete
      description: Deletes a dataset
      operationId: dataset_delete_api_v1_dataset__dataset_id__delete
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /dataset/{dataset_id}/partition/{partition_id}:
    put:
      tags:
      - Datasets
      summary: Upload Partition
      description: Upload a partition of a dataset
      operationId: upload_partition_api_v1_dataset__dataset_id__partition__partition_id__put
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      - name: partition_id
        in: path
        required: true
        schema:
          type: string
          title: Partition Id
      - name: content-length
        in: header
        required: true
        schema:
          type: integer
          title: Content-Length
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /dataset/{dataset_id}/task/start:
    post:
      tags:
      - Ingestion Agents and Tasks
      summary: Start Dataset Task
      description: Start an Ingestion Agent or a Task on a Dataset
      operationId: start_dataset_task_api_v1_dataset__dataset_id__task_start_post
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskStart'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /dataset/{dataset_id}/task/{task_id}:
    delete:
      tags:
      - Ingestion Agents and Tasks
      summary: Delete Dataset Task
      description: Delete an Ingestion Agent or a Task of a Dataset
      operationId: delete_dataset_task_api_v1_dataset__dataset_id__task__task_id__delete
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /dataset/{dataset_id}/task/{task_id}/inspect:
    get:
      tags:
      - Ingestion Agents and Tasks
      summary: Inspect Dataset Task
      description: Get the status of an Ingestion Agent or a Task of a Dataset
      operationId: inspect_dataset_task_api_v1_dataset__dataset_id__task__task_id__inspect_get
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicTaskRequest'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /dataset/{dataset_id}/task/{task_id}/stop:
    post:
      tags:
      - Ingestion Agents and Tasks
      summary: Stop Dataset Task
      description: Stop an Ingestion Agent or a Task of a Dataset
      operationId: stop_dataset_task_api_v1_dataset__dataset_id__task__task_id__stop_post
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /dataset/{dataset_id}/tasks:
    get:
      tags:
      - Ingestion Agents and Tasks
      summary: List Account Available Tasks
      description: Get the available tasks for a Dataset
      operationId: list_account_available_tasks_api_v1_dataset__dataset_id__tasks_get
      parameters:
      - name: dataset_id
        in: path
        required: true
        schema:
          type: string
          title: Dataset Id
      - name: count
        in: query
        required: false
        schema:
          type: integer
          description: How many finished tasks to return
          default: 10
          title: Count
        description: How many finished tasks to return
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskList'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /datasets:
    post:
      tags:
      - Datasets
      summary: Create Dataset
      description: Creates a new dataset
      operationId: create_dataset_api_v1_datasets_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetInfo'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetCreated'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /download/{kbid}/model/{model_id}/{filename}:
    get:
      tags:
      - Training
      summary: Download Account Predictive Model File
      description: Download the trained model or any other generated file as a result
        of a training task on a Knowledge Box
      operationId: download_account_predictive_model_file_api_v1_download__kbid__model__model_id___filename__get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: model_id
        in: path
        required: true
        schema:
          type: string
          title: Model Id
      - name: filename
        in: path
        required: true
        schema:
          type: string
          title: Filename
      - name: account_id
        in: query
        required: true
        schema:
          type: string
          title: Account Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /extract_strategies/{kbid}:
    get:
      tags:
      - Extract Strategies
      summary: Learning Extract Strategies
      description: Get available extract strategies onprem
      operationId: Learning_extract_strategies_api_v1_extract_strategies__kbid__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/ExtractConfig-Output'
                title: Response Learning Extract Strategies Api V1 Extract Strategies  Kbid  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Extract Strategies
      summary: Add A Extract Strategy To A Kb Onprem
      description: Add a extract strategy to a KB to be used
      operationId: Add_a_extract_strategy_to_a_KB_OnPrem_api_v1_extract_strategies__kbid__post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExtractConfig-Input'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: string
                title: Response Add A Extract Strategy To A Kb Onprem Api V1 Extract
                  Strategies  Kbid  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /extract_strategies/{kbid}/strategies/{strategy_id}:
    get:
      tags:
      - Extract Strategies
      summary: Extract Strategy Configuration
      description: Get extract strategy for a given id
      operationId: Extract_strategy_configuration_api_v1_extract_strategies__kbid__strategies__strategy_id__get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: strategy_id
        in: path
        required: true
        schema:
          type: string
          title: Strategy Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractConfig-Output'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Extract Strategies
      summary: Disable Extract Strategy Onprem
      description: Disable a extract strategy from a Knowledge Box
      operationId: disable_extract_strategy_onprem_api_v1_extract_strategies__kbid__strategies__strategy_id__delete
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: strategy_id
        in: path
        required: true
        schema:
          type: string
          title: Strategy Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kb_uuid}/task/start:
    post:
      tags:
      - Ingestion Agents and Tasks
      summary: Start Knowledge Box Task
      description: Start an Ingestion Agent or a Task on a Knowledge Box
      operationId: start_knowledge_box_task_api_v1_kb__kb_uuid__task_start_post
      parameters:
      - name: kb_uuid
        in: path
        required: true
        schema:
          type: string
          title: Kb Uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskStartKB'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kb_uuid}/task/{task_id}:
    patch:
      tags:
      - Ingestion Agents and Tasks
      summary: Patch Knowledge Box Task
      description: Modify the parameters of a task. This is only available for tasks
        that run on `NEW` resources, tasks that run on `EXISTING` resources cannot
        be modified.
      operationId: patch_knowledge_box_task_api_v1_kb__kb_uuid__task__task_id__patch
      parameters:
      - name: kb_uuid
        in: path
        required: true
        schema:
          type: string
          title: Kb Uuid
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          title: Task Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskPatch'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRequest'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Ingestion Agents and Tasks
      summary: Delete Knowledge Box Task
      description: Delete an Ingestion Agent or a Task of a Knowledge Box
      operationId: delete_knowledge_box_task_api_v1_kb__kb_uuid__task__task_id__delete
      parameters:
      - name: kb_uuid
        in: path
        required: true
        schema:
          type: string
          title: Kb Uuid
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          title: Task Id
      - name: cleanup
        in: query
        required: false
        schema:
          type: boolean
          description: Cleanup all data associated with the task
          default: false
          title: Cleanup
        description: Cleanup all data associated with the task
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kb_uuid}/task/{task_id}/cleanup:
    post:
      tags:
      - Ingestion Agents and Tasks
      summary: Cleanup Knowledge Box Task
      description: Start a cleanup process for an Ingestion Agent or a Task of a Knowledge
        Box
      operationId: cleanup_knowledge_box_task_api_v1_kb__kb_uuid__task__task_id__cleanup_post
      parameters:
      - name: kb_uuid
        in: path
        required: true
        schema:
          type: string
          title: Kb Uuid
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicTaskSet'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kb_uuid}/task/{task_id}/enable:
    post:
      tags:
      - Ingestion Agents and Tasks
      summary: Enable Knowledge Box Task
      description: Enable or disable a task. This is only available for tasks that
        run on `NEW` resources. To disable a task that runs on `EXISTING` resources,
        use the `stop` endpoint.
      operationId: enable_knowledge_box_task_api_v1_kb__kb_uuid__task__task_id__enable_post
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          title: Task Id
      - name: kb_uuid
        in: path
        required: true
        schema:
          type: string
          title: Kb Uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskEnable'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kb_uuid}/task/{task_id}/inspect:
    get:
      tags:
      - Ingestion Agents and Tasks
      summary: Inspect Knowledge Box Task
      description: Get the details of an Ingestion Agent or a Task of a Knowledge
        Box
      operationId: inspect_knowledge_box_task_api_v1_kb__kb_uuid__task__task_id__inspect_get
      parameters:
      - name: kb_uuid
        in: path
        required: true
        schema:
          type: string
          title: Kb Uuid
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicTaskSet'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kb_uuid}/task/{task_id}/restart:
    post:
      tags:
      - Ingestion Agents and Tasks
      summary: Restart Knowledge Box Task
      description: Restart an Ingestion Agent or a Task of a Knowledge Box. This only
        affects tasks that are configured to run on `EXISTING` resources, for tasks
        that run on `NEW` resources, use the `enable` endpoint.
      operationId: restart_knowledge_box_task_api_v1_kb__kb_uuid__task__task_id__restart_post
      parameters:
      - name: kb_uuid
        in: path
        required: true
        schema:
          type: string
          title: Kb Uuid
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kb_uuid}/task/{task_id}/stop:
    post:
      tags:
      - Ingestion Agents and Tasks
      summary: Stop Knowledge Box Task
      description: Stop an Ingestion Agent or a Task of a Knowledge Box. This only
        affects tasks that are currently running on `EXISTING` resources, for disabling
        tasks that run on `NEW` resources, use the `enable` endpoint.
      operationId: stop_knowledge_box_task_api_v1_kb__kb_uuid__task__task_id__stop_post
      parameters:
      - name: kb_uuid
        in: path
        required: true
        schema:
          type: string
          title: Kb Uuid
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kb_uuid}/task/{task_id}/worker_config:
    get:
      tags:
      - Ingestion Agents and Tasks
      summary: Inspect Knowledge Box Task Worker
      description: Get the worker config of a task on a knowledge box
      operationId: inspect_knowledge_box_task_worker_api_v1_kb__kb_uuid__task__task_id__worker_config_get
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRequest'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kb_uuid}/tasks:
    get:
      tags:
      - Ingestion Agents and Tasks
      summary: List Knowledge Box Available Tasks
      description: Get the available Ingestion Agents and Tasks of a Knowledge Box
      operationId: list_knowledge_box_available_tasks_api_v1_kb__kb_uuid__tasks_get
      parameters:
      - name: kb_uuid
        in: path
        required: true
        schema:
          type: string
          title: Kb Uuid
      - name: count
        in: query
        required: false
        schema:
          type: integer
          description: How many finished tasks to return
          default: 10
          title: Count
        description: How many finished tasks to return
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskList'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/agent/context:
    post:
      tags:
      - Retrieval Agent
      summary: Add Context
      description: Add Context Agent Configuration
      operationId: add_context_api_v1_kb__kbid__agent_context_post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/SQLAgentConfig'
              - $ref: '#/components/schemas/TavilyAgentConfig'
              - $ref: '#/components/schemas/PythonAgentConfig'
              - $ref: '#/components/schemas/PerplexityAgentConfig'
              - $ref: '#/components/schemas/GoogleAgentConfig'
              - $ref: '#/components/schemas/BraveAgentConfig'
              - $ref: '#/components/schemas/CypherAgentConfig'
              - $ref: '#/components/schemas/AskAgentConfig-Input'
              - $ref: '#/components/schemas/BasicAskAgentConfig-Input'
              - $ref: '#/components/schemas/ContextConditionalAgentConfig-Input'
              - $ref: '#/components/schemas/SPARQLAgentConfig'
              - $ref: '#/components/schemas/MCPAgentConfig-Input'
              discriminator:
                propertyName: module
                mapping:
                  sql: '#/components/schemas/SQLAgentConfig'
                  tavily: '#/components/schemas/TavilyAgentConfig'
                  restricted: '#/components/schemas/PythonAgentConfig'
                  perplexity: '#/components/schemas/PerplexityAgentConfig'
                  google: '#/components/schemas/GoogleAgentConfig'
                  brave: '#/components/schemas/BraveAgentConfig'
                  cypher: '#/components/schemas/CypherAgentConfig'
                  ask: '#/components/schemas/AskAgentConfig-Input'
                  basic_ask: '#/components/schemas/BasicAskAgentConfig-Input'
                  context_conditional: '#/components/schemas/ContextConditionalAgentConfig-Input'
                  sparql: '#/components/schemas/SPARQLAgentConfig'
                  mcp: '#/components/schemas/MCPAgentConfig-Input'
              title: Item
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentID'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Retrieval Agent
      summary: Get Context
      description: Set Agent Configuration
      operationId: get_context_api_v1_kb__kbid__agent_context_get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                  - $ref: '#/components/schemas/SQLAgentConfig'
                  - $ref: '#/components/schemas/TavilyAgentConfig'
                  - $ref: '#/components/schemas/PythonAgentConfig'
                  - $ref: '#/components/schemas/PerplexityAgentConfig'
                  - $ref: '#/components/schemas/GoogleAgentConfig'
                  - $ref: '#/components/schemas/BraveAgentConfig'
                  - $ref: '#/components/schemas/CypherAgentConfig'
                  - $ref: '#/components/schemas/AskAgentConfig-Output'
                  - $ref: '#/components/schemas/BasicAskAgentConfig-Output'
                  - $ref: '#/components/schemas/ContextConditionalAgentConfig-Output'
                  - $ref: '#/components/schemas/SPARQLAgentConfig'
                  - $ref: '#/components/schemas/MCPAgentConfig-Output'
                  discriminator:
                    propertyName: module
                    mapping:
                      sql: '#/components/schemas/SQLAgentConfig'
                      tavily: '#/components/schemas/TavilyAgentConfig'
                      restricted: '#/components/schemas/PythonAgentConfig'
                      perplexity: '#/components/schemas/PerplexityAgentConfig'
                      google: '#/components/schemas/GoogleAgentConfig'
                      brave: '#/components/schemas/BraveAgentConfig'
                      cypher: '#/components/schemas/CypherAgentConfig'
                      ask: '#/components/schemas/AskAgentConfig-Output'
                      basic_ask: '#/components/schemas/BasicAskAgentConfig-Output'
                      context_conditional: '#/components/schemas/ContextConditionalAgentConfig-Output'
                      sparql: '#/components/schemas/SPARQLAgentConfig'
                      mcp: '#/components/schemas/MCPAgentConfig-Output'
                title: Response Get Context Api V1 Kb  Kbid  Agent Context Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/agent/context/{context}:
    patch:
      tags:
      - Retrieval Agent
      summary: Patch Context
      description: Set PostProcess Agent Configuration
      operationId: patch_context_api_v1_kb__kbid__agent_context__context__patch
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: context
        in: path
        required: true
        schema:
          type: string
          title: Context
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/SQLAgentConfig'
              - $ref: '#/components/schemas/TavilyAgentConfig'
              - $ref: '#/components/schemas/PythonAgentConfig'
              - $ref: '#/components/schemas/PerplexityAgentConfig'
              - $ref: '#/components/schemas/GoogleAgentConfig'
              - $ref: '#/components/schemas/BraveAgentConfig'
              - $ref: '#/components/schemas/CypherAgentConfig'
              - $ref: '#/components/schemas/AskAgentConfig-Input'
              - $ref: '#/components/schemas/BasicAskAgentConfig-Input'
              - $ref: '#/components/schemas/ContextConditionalAgentConfig-Input'
              - $ref: '#/components/schemas/SPARQLAgentConfig'
              - $ref: '#/components/schemas/MCPAgentConfig-Input'
              discriminator:
                propertyName: module
                mapping:
                  sql: '#/components/schemas/SQLAgentConfig'
                  tavily: '#/components/schemas/TavilyAgentConfig'
                  restricted: '#/components/schemas/PythonAgentConfig'
                  perplexity: '#/components/schemas/PerplexityAgentConfig'
                  google: '#/components/schemas/GoogleAgentConfig'
                  brave: '#/components/schemas/BraveAgentConfig'
                  cypher: '#/components/schemas/CypherAgentConfig'
                  ask: '#/components/schemas/AskAgentConfig-Input'
                  basic_ask: '#/components/schemas/BasicAskAgentConfig-Input'
                  context_conditional: '#/components/schemas/ContextConditionalAgentConfig-Input'
                  sparql: '#/components/schemas/SPARQLAgentConfig'
                  mcp: '#/components/schemas/MCPAgentConfig-Input'
              title: Item
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Retrieval Agent
      summary: Delete Context
      description: Delete PreProcess Agent Configuration
      operationId: delete_context_api_v1_kb__kbid__agent_context__context__delete
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: context
        in: path
        required: true
        schema:
          type: string
          title: Context
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/agent/driver/{driver}:
    patch:
      tags:
      - Retrieval Agent
      summary: Patch Driver
      description: Set Agent Configuration
      operationId: patch_driver_api_v1_kb__kbid__agent_driver__driver__patch
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: driver
        in: path
        required: true
        schema:
          type: string
          title: Driver
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/BraveDriverConfig'
              - $ref: '#/components/schemas/CypherDriverConfig'
              - $ref: '#/components/schemas/NucliaDBConfig'
              - $ref: '#/components/schemas/PerplexityDriverConfig'
              - $ref: '#/components/schemas/TavilyDriverConfig'
              - $ref: '#/components/schemas/SQLDriverConfig'
              - $ref: '#/components/schemas/GoogleDriverConfig'
              - $ref: '#/components/schemas/MCPStdioDriverConfig'
              - $ref: '#/components/schemas/MCPSSEDriverConfig'
              - $ref: '#/components/schemas/AliniaDriverConfig'
              discriminator:
                propertyName: provider
                mapping:
                  brave: '#/components/schemas/BraveDriverConfig'
                  cypher: '#/components/schemas/CypherDriverConfig'
                  nucliadb: '#/components/schemas/NucliaDBConfig'
                  perplexity: '#/components/schemas/PerplexityDriverConfig'
                  tavily: '#/components/schemas/TavilyDriverConfig'
                  sql: '#/components/schemas/SQLDriverConfig'
                  google: '#/components/schemas/GoogleDriverConfig'
                  mcpstdio: '#/components/schemas/MCPStdioDriverConfig'
                  mcpsse: '#/components/schemas/MCPSSEDriverConfig'
                  alinia: '#/components/schemas/AliniaDriverConfig'
              title: Item
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Retrieval Agent
      summary: Delete Driver
      description: Set Agent Configuration
      operationId: delete_driver_api_v1_kb__kbid__agent_driver__driver__delete
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: driver
        in: path
        required: true
        schema:
          type: string
          title: Driver
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/agent/drivers:
    post:
      tags:
      - Retrieval Agent
      summary: Add Driver
      description: Set Agent Configuration
      operationId: add_driver_api_v1_kb__kbid__agent_drivers_post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/BraveDriverConfig'
              - $ref: '#/components/schemas/CypherDriverConfig'
              - $ref: '#/components/schemas/NucliaDBConfig'
              - $ref: '#/components/schemas/PerplexityDriverConfig'
              - $ref: '#/components/schemas/TavilyDriverConfig'
              - $ref: '#/components/schemas/SQLDriverConfig'
              - $ref: '#/components/schemas/GoogleDriverConfig'
              - $ref: '#/components/schemas/MCPStdioDriverConfig'
              - $ref: '#/components/schemas/MCPSSEDriverConfig'
              - $ref: '#/components/schemas/AliniaDriverConfig'
              discriminator:
                propertyName: provider
                mapping:
                  brave: '#/components/schemas/BraveDriverConfig'
                  cypher: '#/components/schemas/CypherDriverConfig'
                  nucliadb: '#/components/schemas/NucliaDBConfig'
                  perplexity: '#/components/schemas/PerplexityDriverConfig'
                  tavily: '#/components/schemas/TavilyDriverConfig'
                  sql: '#/components/schemas/SQLDriverConfig'
                  google: '#/components/schemas/GoogleDriverConfig'
                  mcpstdio: '#/components/schemas/MCPStdioDriverConfig'
                  mcpsse: '#/components/schemas/MCPSSEDriverConfig'
                  alinia: '#/components/schemas/AliniaDriverConfig'
              title: Item
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DriverID'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Retrieval Agent
      summary: Get Driver
      description: Get Agent Configuration
      operationId: get_driver_api_v1_kb__kbid__agent_drivers_get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DriverConfigResponse'
                title: Response Get Driver Api V1 Kb  Kbid  Agent Drivers Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/agent/generation:
    post:
      tags:
      - Retrieval Agent
      summary: Add Generation
      description: Add Generation Agent Configuration
      operationId: add_generation_api_v1_kb__kbid__agent_generation_post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/SummarizeAgentConfig'
              - $ref: '#/components/schemas/GenerateAgentConfig'
              discriminator:
                propertyName: module
                mapping:
                  summarize: '#/components/schemas/SummarizeAgentConfig'
                  generate: '#/components/schemas/GenerateAgentConfig'
              title: Item
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentID'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Retrieval Agent
      summary: Get Generation
      description: Set Agent Configuration
      operationId: get_generation_api_v1_kb__kbid__agent_generation_get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                  - $ref: '#/components/schemas/SummarizeAgentConfig'
                  - $ref: '#/components/schemas/GenerateAgentConfig'
                  discriminator:
                    propertyName: module
                    mapping:
                      summarize: '#/components/schemas/SummarizeAgentConfig'
                      generate: '#/components/schemas/GenerateAgentConfig'
                title: Response Get Generation Api V1 Kb  Kbid  Agent Generation Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/agent/generation/{generation}:
    patch:
      tags:
      - Retrieval Agent
      summary: Patch Generation
      description: Set PreProcess Agent Configuration
      operationId: patch_generation_api_v1_kb__kbid__agent_generation__generation__patch
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: generation
        in: path
        required: true
        schema:
          type: string
          title: Generation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/SummarizeAgentConfig'
              - $ref: '#/components/schemas/GenerateAgentConfig'
              discriminator:
                propertyName: module
                mapping:
                  summarize: '#/components/schemas/SummarizeAgentConfig'
                  generate: '#/components/schemas/GenerateAgentConfig'
              title: Item
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Retrieval Agent
      summary: Delete Generation
      description: Delete Generation Agent Configuration
      operationId: delete_generation_api_v1_kb__kbid__agent_generation__generation__delete
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: generation
        in: path
        required: true
        schema:
          type: string
          title: Generation
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/agent/postprocess:
    post:
      tags:
      - Retrieval Agent
      summary: Add Postprocess
      description: Add PostProcess Agent Configuration
      operationId: add_postprocess_api_v1_kb__kbid__agent_postprocess_post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/RestartAgentConfig'
              - $ref: '#/components/schemas/RemiAgentConfig-Input'
              - $ref: '#/components/schemas/ExternalCallAgentConfig'
              - $ref: '#/components/schemas/PostprocessConditionalAgentConfig-Input'
              - $ref: '#/components/schemas/PostprocessAliniaAgentConfig-Input'
              discriminator:
                propertyName: module
                mapping:
                  restart: '#/components/schemas/RestartAgentConfig'
                  remi: '#/components/schemas/RemiAgentConfig-Input'
                  external: '#/components/schemas/ExternalCallAgentConfig'
                  post_conditional: '#/components/schemas/PostprocessConditionalAgentConfig-Input'
                  postprocess_alinia: '#/components/schemas/PostprocessAliniaAgentConfig-Input'
              title: Item
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentID'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Retrieval Agent
      summary: Get Postprocess
      description: Set Agent Configuration
      operationId: get_postprocess_api_v1_kb__kbid__agent_postprocess_get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                  - $ref: '#/components/schemas/RestartAgentConfig'
                  - $ref: '#/components/schemas/RemiAgentConfig-Output'
                  - $ref: '#/components/schemas/ExternalCallAgentConfig'
                  - $ref: '#/components/schemas/PostprocessConditionalAgentConfig-Output'
                  - $ref: '#/components/schemas/PostprocessAliniaAgentConfig-Output'
                  discriminator:
                    propertyName: module
                    mapping:
                      restart: '#/components/schemas/RestartAgentConfig'
                      remi: '#/components/schemas/RemiAgentConfig-Output'
                      external: '#/components/schemas/ExternalCallAgentConfig'
                      post_conditional: '#/components/schemas/PostprocessConditionalAgentConfig-Output'
                      postprocess_alinia: '#/components/schemas/PostprocessAliniaAgentConfig-Output'
                title: Response Get Postprocess Api V1 Kb  Kbid  Agent Postprocess
                  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/agent/postprocess/{postprocess}:
    patch:
      tags:
      - Retrieval Agent
      summary: Patch Postprocess
      description: Set PostProcess Agent Configuration
      operationId: patch_postprocess_api_v1_kb__kbid__agent_postprocess__postprocess__patch
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: postprocess
        in: path
        required: true
        schema:
          type: string
          title: Postprocess
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/RestartAgentConfig'
              - $ref: '#/components/schemas/RemiAgentConfig-Input'
              - $ref: '#/components/schemas/ExternalCallAgentConfig'
              - $ref: '#/components/schemas/PostprocessConditionalAgentConfig-Input'
              - $ref: '#/components/schemas/PostprocessAliniaAgentConfig-Input'
              discriminator:
                propertyName: module
                mapping:
                  restart: '#/components/schemas/RestartAgentConfig'
                  remi: '#/components/schemas/RemiAgentConfig-Input'
                  external: '#/components/schemas/ExternalCallAgentConfig'
                  post_conditional: '#/components/schemas/PostprocessConditionalAgentConfig-Input'
                  postprocess_alinia: '#/components/schemas/PostprocessAliniaAgentConfig-Input'
              title: Item
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Retrieval Agent
      summary: Delete Postprocess
      description: Delete PreProcess Agent Configuration
      operationId: delete_postprocess_api_v1_kb__kbid__agent_postprocess__postprocess__delete
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: postprocess
        in: path
        required: true
        schema:
          type: string
          title: Postprocess
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/agent/preprocess:
    post:
      tags:
      - Retrieval Agent
      summary: Add Preprocess
      description: Add PreProcess Agent Configuration
      operationId: add_preprocess_api_v1_kb__kbid__agent_preprocess_post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/HistoricalAgentConfig'
              - $ref: '#/components/schemas/RephraseAgentConfig'
              - $ref: '#/components/schemas/PreprocessConditionalAgentConfig-Input'
              - $ref: '#/components/schemas/PreprocessAliniaAgentConfig-Input'
              discriminator:
                propertyName: module
                mapping:
                  historical: '#/components/schemas/HistoricalAgentConfig'
                  rephrase: '#/components/schemas/RephraseAgentConfig'
                  pre_conditional: '#/components/schemas/PreprocessConditionalAgentConfig-Input'
                  preprocess_alinia: '#/components/schemas/PreprocessAliniaAgentConfig-Input'
              title: Item
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentID'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Retrieval Agent
      summary: Get Preprocess
      description: Set Agent Configuration
      operationId: get_preprocess_api_v1_kb__kbid__agent_preprocess_get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                  - $ref: '#/components/schemas/HistoricalAgentConfig'
                  - $ref: '#/components/schemas/RephraseAgentConfig'
                  - $ref: '#/components/schemas/PreprocessConditionalAgentConfig-Output'
                  - $ref: '#/components/schemas/PreprocessAliniaAgentConfig-Output'
                  discriminator:
                    propertyName: module
                    mapping:
                      historical: '#/components/schemas/HistoricalAgentConfig'
                      rephrase: '#/components/schemas/RephraseAgentConfig'
                      pre_conditional: '#/components/schemas/PreprocessConditionalAgentConfig-Output'
                      preprocess_alinia: '#/components/schemas/PreprocessAliniaAgentConfig-Output'
                title: Response Get Preprocess Api V1 Kb  Kbid  Agent Preprocess Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/agent/preprocess/{preprocess}:
    patch:
      tags:
      - Retrieval Agent
      summary: Patch Preprocess
      description: Set PreProcess Agent Configuration
      operationId: patch_preprocess_api_v1_kb__kbid__agent_preprocess__preprocess__patch
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: preprocess
        in: path
        required: true
        schema:
          type: string
          title: Preprocess
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/HistoricalAgentConfig'
              - $ref: '#/components/schemas/RephraseAgentConfig'
              - $ref: '#/components/schemas/PreprocessConditionalAgentConfig-Input'
              - $ref: '#/components/schemas/PreprocessAliniaAgentConfig-Input'
              discriminator:
                propertyName: module
                mapping:
                  historical: '#/components/schemas/HistoricalAgentConfig'
                  rephrase: '#/components/schemas/RephraseAgentConfig'
                  pre_conditional: '#/components/schemas/PreprocessConditionalAgentConfig-Input'
                  preprocess_alinia: '#/components/schemas/PreprocessAliniaAgentConfig-Input'
              title: Item
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Retrieval Agent
      summary: Delete Preprocess
      description: Delete PreProcess Agent Configuration
      operationId: delete_preprocess_api_v1_kb__kbid__agent_preprocess__preprocess__delete
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: preprocess
        in: path
        required: true
        schema:
          type: string
          title: Preprocess
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/agent/rules:
    post:
      tags:
      - Retrieval Agent
      summary: Set Rules
      description: Set Agent Configuration
      operationId: set_rules_api_v1_kb__kbid__agent_rules_post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Rules'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Retrieval Agent
      summary: Get Rules
      description: Set Agent Configuration
      operationId: get_rules_api_v1_kb__kbid__agent_rules_get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/agent/session/{session}:
    post:
      tags:
      - Retrieval Agent
      summary: Interaction
      description: Interact session
      operationId: interaction_api_v1_kb__kbid__agent_session__session__post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: session
        in: path
        required: true
        schema:
          type: string
          title: Session
      - name: from_cursor
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            minimum: 1
          - type: 'null'
          title: From Cursor
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InteractionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Retrieval Agent
      summary: Patch Session
      description: Create session
      operationId: patch_session_api_v1_kb__kbid__agent_session__session__patch
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: session
        in: path
        required: true
        schema:
          type: string
          title: Session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionData'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Retrieval Agent
      summary: Get Session
      description: Create session
      operationId: get_session_api_v1_kb__kbid__agent_session__session__get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: session
        in: path
        required: true
        schema:
          type: string
          title: Session
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Resource'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /kb/{kbid}/agent/sessions:
    post:
      tags:
      - Retrieval Agent
      summary: Create Session
      description: Create session
      operationId: create_session_api_v1_kb__kbid__agent_sessions_post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionData'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceCreated'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Retrieval Agent
      summary: Get Sessions
      description: Create session
      operationId: get_sessions_api_v1_kb__kbid__agent_sessions_get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: page
        in: query
        required: false
        schema:
          type: integer
          description: Requested page number (0-based)
          default: 0
          title: Page
        description: Requested page number (0-based)
      - name: size
        in: query
        required: false
        schema:
          type: integer
          description: Page size
          default: 20
          title: Size
        description: Page size
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceList'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /learning/configuration/schema:
    get:
      tags:
      - Knowledge Boxes
      summary: Learning Configuration Schema
      description: Get jsonschema definition for `learning_configuration` field of
        knowledgebox creation payload
      operationId: Learning_configuration_schema_api_v1_learning_configuration_schema_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfigSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /models/{kbid}:
    get:
      tags:
      - Models
      summary: Learning Configuration Schema
      description: Get available models onprem
      operationId: Learning_configuration_schema_api_v1_models__kbid__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 Learning Configuration Schema Api V1 Models  Kbid  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Models
      summary: Add A Model To A Kb Onprem
      description: Add a model to a KB to be used
      operationId: Add_a_model_to_a_KB_OnPrem_api_v1_models__kbid__post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelID'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /models/{kbid}/model/{model_id}:
    get:
      tags:
      - Models
      summary: Model Configuration
      description: Get trained models
      operationId: Model_configuration_api_v1_models__kbid__model__model_id__get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: model_id
        in: path
        required: true
        schema:
          type: string
          title: Model Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Model Configuration Api V1 Models  Kbid  Model  Model
                  Id  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /predict/chat:
    post:
      tags:
      - Predict
      summary: Predict Chat
      description: Chat interface for your NucliaDB
      operationId: predict_chat_api_v1_predict_chat_post
      parameters:
      - name: model
        in: query
        required: false
        schema:
          type: string
          default: chatgpt-azure-4o
          title: Model
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatModel'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /predict/chat/{kbid}:
    post:
      tags:
      - Predict
      summary: Predict Chat Kbid
      description: Chat interface for your NucliaDB
      operationId: predict_chat_kbid_api_v1_predict_chat__kbid__post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatModel'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /predict/query:
    get:
      tags:
      - Predict
      summary: Predict Query
      description: Get the vector of a sentence. This endpoint is deprecated, please
        use  the `POST` endpoint instead.
      operationId: predict_query_api_v1_predict_query_get
      deprecated: true
      parameters:
      - name: text
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Text to process
          title: Text
        description: Text to process
      - name: semantic_model
        in: query
        required: false
        schema:
          type: string
          default: multilingual-2024-05-06
          title: Semantic Model
      - name: token_model
        in: query
        required: false
        schema:
          type: string
          default: multilingual
          title: Token Model
      - name: generative_model
        in: query
        required: false
        schema:
          type: string
          default: chatgpt-azure-4o
          title: Generative Model
      - name: rephrase
        in: query
        required: false
        schema:
          type: boolean
          default: false
          title: Rephrase
      - name: rephrase_prompt
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Prompt to rephrase the sentence, if not provided, the default
            prompt will be 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."
          title: Rephrase Prompt
        description: Prompt to rephrase the sentence, if not provided, the default
          prompt will be used. It must include the {question} placeholder. The placeholder
          will be replaced with the original question.
      - name: agentic_entities
        in: query
        required: false
        schema:
          type: boolean
          description: If true, the model will return the entities detected in the
            sentence guided by an already defined Graph Extraction Agent in the Knowledge
            Box.
          default: false
          title: Agentic Entities
        description: If true, the model will return the entities detected in the sentence
          guided by an already defined Graph Extraction Agent in the Knowledge Box.
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryInfo'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Predict
      summary: Predict Query Post
      description: Preprocess a query.
      operationId: predict_query_post_api_v1_predict_query_post
      parameters:
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryModelAccount'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryInfo'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /predict/query/{kbid}:
    get:
      tags:
      - Predict
      summary: Predict Query Kbid
      description: Get the vector of a sentence
      operationId: predict_query_kbid_api_v1_predict_query__kbid__get
      deprecated: true
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: text
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Text to process
          title: Text
        description: Text to process
      - name: semantic_models
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              type: string
          - type: 'null'
          description: Semantic models to compute the sentence vector for, if not
            provided, it will only compute the sentence vector for default semantic
            model in the Knowledge box's configuration.
          title: Semantic Models
        description: Semantic models to compute the sentence vector for, if not provided,
          it will only compute the sentence vector for default semantic model in the
          Knowledge box's configuration.
      - name: generative_model
        in: query
        required: false
        schema:
          type: string
          default: chatgpt-azure-4o-mini
          title: Generative Model
      - name: rephrase
        in: query
        required: false
        schema:
          type: boolean
          default: false
          title: Rephrase
      - name: rephrase_prompt
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Prompt to rephrase the sentence, if not provided, the default
            prompt will be 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."
          title: Rephrase Prompt
        description: Prompt to rephrase the sentence, if not provided, the default
          prompt will be used. It must include the {question} placeholder. The placeholder
          will be replaced with the original question.
      - name: agentic_entities
        in: query
        required: false
        schema:
          type: boolean
          description: If true, the model will return the entities detected in the
            sentence guided by an already defined Graph Extraction Agent in the Knowledge
            Box.
          default: false
          title: Agentic Entities
        description: If true, the model will return the entities detected in the sentence
          guided by an already defined Graph Extraction Agent in the Knowledge Box.
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryInfo'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Predict
      summary: Predict Query Post Kbid
      description: Get the vector of a sentence
      operationId: predict_query_post_kbid_api_v1_predict_query__kbid__post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryModel'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryInfo'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /predict/remi:
    post:
      tags:
      - Predict
      summary: Predict Remi
      description: 'The REMi model is a model that computes metrics for a given question,
        answer and contexts. The metrics computed are:

        - Answer Relevance: Measures the relevance of the generated answer to the
        user query, in a scale of 0 to 5.

        - Context Relevance: Measures the relevance of the retrieved context to the
        user query, in a scale of 0 to 5.

        - Groundedness: Measures the degree to which the generated answer is grounded
        in the retrieved context, in a scale of 0 to 5.


        More information about REMi metrics and how to interpret in the following
        link: https://nuclia.com/developers/remi-open-source-rag-evaluation-model/'
      operationId: predict_remi_api_v1_predict_remi_post
      parameters:
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemiRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemiResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /predict/remi/{kbid}:
    post:
      tags:
      - Predict
      summary: Predict Remi Kbid
      description: 'The REMi model is a model that computes metrics for a given question,
        answer and contexts. The metrics computed are:

        - Answer Relevance: Measures the relevance of the generated answer to the
        user query, in a scale of 0 to 5.

        - Context Relevance: Measures the relevance of the retrieved context to the
        user query, in a scale of 0 to 5.

        - Groundedness: Measures the degree to which the generated answer is grounded
        in the retrieved context, in a scale of 0 to 5.


        More information about REMi metrics and how to interpret in the following
        link: https://nuclia.com/developers/remi-open-source-rag-evaluation-model/'
      operationId: predict_remi_kbid_api_v1_predict_remi__kbid__post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemiRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemiResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /predict/rephrase:
    post:
      tags:
      - Predict
      summary: Predict Rephrase
      description: Rephrase interface for your NucliaDB
      operationId: predict_rephrase_api_v1_predict_rephrase_post
      parameters:
      - name: model
        in: query
        required: false
        schema:
          type: string
          default: chatgpt-azure-4o
          title: Model
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RephraseModel'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: string
                title: Response Predict Rephrase Api V1 Predict Rephrase Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /predict/rephrase/{kbid}:
    post:
      tags:
      - Predict
      summary: Predict Rephrase Kbid
      description: Rephrase interface for your NucliaDB with Container
      operationId: predict_rephrase_kbid_api_v1_predict_rephrase__kbid__post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RephraseModel'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /predict/rerank:
    post:
      tags:
      - Predict
      summary: Predict Rerank
      description: Rerank your results
      operationId: predict_rerank_api_v1_predict_rerank_post
      parameters:
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RerankModel'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RerankResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /predict/rerank/{kbid}:
    post:
      tags:
      - Predict
      summary: Predict Rerank Kbid
      description: Rerank your results
      operationId: predict_rerank_kbid_api_v1_predict_rerank__kbid__post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RerankModel'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RerankResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /predict/sentence:
    get:
      tags:
      - Predict
      summary: Predict Sentence
      description: Get the vector of a sentence
      operationId: predict_sentence_api_v1_predict_sentence_get
      parameters:
      - name: text
        in: query
        required: true
        schema:
          type: string
          title: Text
      - name: model
        in: query
        required: false
        schema:
          type: string
          default: multilingual-2024-05-06
          title: Model
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SentenceSearch'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /predict/sentence/{kbid}:
    get:
      tags:
      - Predict
      summary: Predict Sentence Kbid
      description: Get the vector of a sentence
      operationId: predict_sentence_kbid_api_v1_predict_sentence__kbid__get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: text
        in: query
        required: true
        schema:
          type: string
          title: Text
      - name: models
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              type: string
          - type: 'null'
          description: Semantic models to compute the sentence vector for, if not
            provided, it will only compute the sentence vector for default semantic
            model in the Knowledge box's configuration.
          title: Models
        description: Semantic models to compute the sentence vector for, if not provided,
          it will only compute the sentence vector for default semantic model in the
          Knowledge box's configuration.
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SentenceSearch'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /predict/summarize:
    post:
      tags:
      - Predict
      summary: Predict Summarize
      description: Get summarized answers via NUA
      operationId: predict_summarize_api_v1_predict_summarize_post
      parameters:
      - name: model
        in: query
        required: false
        schema:
          type: string
          default: chatgpt-azure-4o
          title: Model
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SummarizeModel'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SummarizedModelWithConsumption'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /predict/summarize/{kbid}:
    post:
      tags:
      - Predict
      summary: Predict Summarize Kbid
      description: Get summarized answers via NUA with Container
      operationId: predict_summarize_kbid_api_v1_predict_summarize__kbid__post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SummarizeModel'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SummarizedModelWithConsumption'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /predict/tokens:
    get:
      tags:
      - Predict
      summary: Predict Tokens
      description: Get tokens of a sentence
      operationId: predict_tokens_api_v1_predict_tokens_get
      parameters:
      - name: text
        in: query
        required: true
        schema:
          type: string
          title: Text
      - name: model
        in: query
        required: false
        schema:
          type: string
          default: multilingual
          title: Model
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenSearch'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /predict/tokens/{kbid}:
    get:
      tags:
      - Predict
      summary: Predict Tokens Kbid
      description: Get tokens of a sentence with Container
      operationId: predict_tokens_kbid_api_v1_predict_tokens__kbid__get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: text
        in: query
        required: true
        schema:
          type: string
          title: Text
      - name: x-show-consumption
        in: header
        required: false
        schema:
          type: boolean
          default: false
          title: X-Show-Consumption
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenSearch'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /processing/download:
    get:
      tags:
      - Processing
      summary: Download Binary File
      description: Download a file referenced in an upload token
      operationId: Download_binary_file_api_v1_processing_download_get
      parameters:
      - name: token
        in: query
        required: true
        schema:
          type: string
          title: Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /processing/push:
    post:
      tags:
      - Processing
      summary: Send Data To Process
      description: Push data to process
      operationId: Send_data_to_process_api_v1_processing_push_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PushPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PushResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /processing/requests:
    get:
      tags:
      - Processing
      summary: Get Processed Data
      description: Retreive status of processed and unprocessed payloads from a zone
      operationId: Get_processed_data_api_v1_processing_requests_get
      parameters:
      - name: cursor
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Cursor
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 20
          title: Limit
      - name: scheduled
        in: query
        required: false
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Scheduled
      - name: kbid
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Kbid
      - name: sort_on
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/SortFields'
          default: timestamp
      - name: sort_order
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/SortOrder'
          default: asc
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProcessRequestStatusResults'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /processing/requests/{processing_id}:
    get:
      tags:
      - Processing
      summary: Get Processed Data
      description: Retreive status of processed and unprocessed payloads from a zone
      operationId: Get_processed_data_api_v1_processing_requests__processing_id__get
      parameters:
      - name: processing_id
        in: path
        required: true
        schema:
          type: string
          title: Processing Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProcessRequestStatus'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /processing/tusupload:
    post:
      tags:
      - Processing TUS uploads
      summary: Create New Upload
      description: An empty POST request is used to create a new upload resource.
        The Upload-Length header indicates the size of the entire upload in bytes.
      operationId: Create_new_upload_api_v1_processing_tusupload_post
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /processing/tusupload/{upload_id}:
    options:
      tags:
      - Processing TUS uploads
      summary: Tus Server Information
      description: "Gather information about the Server\u2019s current configuration\
        \ such as enabled extensions, version..."
      operationId: TUS_Server_information_api_v1_processing_tusupload__upload_id__options
      parameters:
      - name: upload_id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Upload Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    head:
      tags:
      - Processing TUS uploads
      summary: Upload Information
      description: Get information about a current download (completed upload size)
      operationId: Upload_information_api_v1_processing_tusupload__upload_id__head
      parameters:
      - name: upload_id
        in: path
        required: true
        schema:
          type: string
          title: Upload Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Processing TUS uploads
      summary: Upload Data
      description: Upload all bytes in the requests and append them in the specifyied
        offset
      operationId: Upload_data_api_v1_processing_tusupload__upload_id__patch
      parameters:
      - name: upload_id
        in: path
        required: true
        schema:
          type: string
          title: Upload Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /processing/upload:
    post:
      tags:
      - Processing
      summary: Upload Binary File
      description: Upload a file using a multipart request
      operationId: Upload_binary_file_api_v1_processing_upload_post
      parameters:
      - name: x-filename
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          default: ''
          title: X-Filename
      - name: x-password
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Password
      - name: x-language
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Language
      - name: x-md5
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Md5
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /schema:
    get:
      tags:
      - Knowledge Boxes
      summary: Learning Configuration Schema
      description: Get jsonschema definition for `learning_configuration` field of
        knowledgebox creation payload
      operationId: Learning_configuration_schema_api_v1_schema_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfigSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /schema/{kbid}:
    get:
      tags:
      - Knowledge Boxes
      summary: Learning Configuration Schema
      description: Get jsonschema definition for `learning_configuration` field of
        knowledgebox update payload
      operationId: Learning_configuration_schema_api_v1_schema__kbid__get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfigSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /split_strategies/{kbid}:
    get:
      tags:
      - split Strategies
      summary: Learning Split Strategies
      description: Get available split strategies onprem
      operationId: Learning_split_strategies_api_v1_split_strategies__kbid__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/SplitConfiguration-Output'
                title: Response Learning Split Strategies Api V1 Split Strategies  Kbid  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - split Strategies
      summary: Add A Split Strategy To A Kb Onprem
      description: Add a split strategy to a KB to be used
      operationId: Add_a_split_strategy_to_a_KB_OnPrem_api_v1_split_strategies__kbid__post
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SplitConfiguration-Input'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: string
                title: Response Add A Split Strategy To A Kb Onprem Api V1 Split Strategies  Kbid  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /split_strategies/{kbid}/strategies/{strategy_id}:
    get:
      tags:
      - split Strategies
      summary: Split Strategy Configuration
      description: Get split strategy for a given id
      operationId: split_strategy_configuration_api_v1_split_strategies__kbid__strategies__strategy_id__get
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: strategy_id
        in: path
        required: true
        schema:
          type: string
          title: Strategy Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SplitConfiguration-Output'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - split Strategies
      summary: Disable Split Strategy Onprem
      description: Disable a split strategy from a Knowledge Box
      operationId: disable_split_strategy_onprem_api_v1_split_strategies__kbid__strategies__strategy_id__delete
      parameters:
      - name: kbid
        in: path
        required: true
        schema:
          type: string
          title: Kbid
      - name: strategy_id
        in: path
        required: true
        schema:
          type: string
          title: Strategy Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
x-metadata:
  learning:
    commit: d6835af
    last_updated: '2025-09-12T08:04:19.662008'
  workers:
    commit: 4105b2f
    last_updated: '2025-09-05T13:59:59.841803'
  processing:
    commit: 4105b2f
    last_updated: '2025-09-05T07:13:38.116030'
  collector:
    commit: d8651a6
    last_updated: '2024-11-06T11:20:18.210121'
  arag:
    commit: e61ed55
    last_updated: '2025-09-08T15:27:44.617165'
  predict:
    commit: d6835af
    last_updated: '2025-09-12T08:11:17.248942'
components:
  schemas:
    AITables-Input:
      properties:
        llm:
          anyOf:
          - $ref: '#/components/schemas/LLMConfig-Input'
          - type: 'null'
        rules:
          items:
            type: string
          type: array
          title: Rules
        merge_pages:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Merge Pages
          default: false
        max_pages_to_merge:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Pages To Merge
          default: 0
      type: object
      title: AITables
    AITables-Output:
      properties:
        llm:
          anyOf:
          - $ref: '#/components/schemas/LLMConfig-Output'
          - type: 'null'
        rules:
          items:
            type: string
          type: array
          title: Rules
        merge_pages:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Merge Pages
          default: false
        max_pages_to_merge:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Pages To Merge
          default: 0
      type: object
      title: AITables
    AnonymizationModel:
      type: string
      enum:
      - disabled
      - multilingual
      title: AnonymizationModel
    AnthropicUserPrompt:
      properties:
        prompt:
          type: string
          title: Prompt
          default: ''
      type: object
      title: AnthropicUserPrompt
    AzureAIIKey:
      properties:
        key:
          type: string
          title: Key
          default: ''
        url:
          type: string
          title: Url
          default: ''
        model:
          type: string
          title: Model
          default: ''
      type: object
      title: AzureAIIKey
    AzureMistralKey:
      properties:
        key:
          type: string
          title: Key
          default: ''
        url:
          type: string
          title: Url
          default: ''
      type: object
      title: AzureMistralKey
    AzureMistralUserPrompt:
      properties:
        prompt:
          type: string
          title: Prompt
          default: ''
        system:
          type: string
          title: System
          default: ''
      type: object
      title: AzureMistralUserPrompt
    AzureUserPrompt:
      properties:
        system:
          type: string
          title: System
          default: ''
        prompt:
          type: string
          title: Prompt
          default: ''
      type: object
      title: AzureUserPrompt
    Claude3UserPrompt:
      properties:
        system:
          type: string
          title: System
          default: ''
        prompt:
          type: string
          title: Prompt
          default: ''
      type: object
      title: Claude3UserPrompt
    ConfigSchema:
      properties:
        semantic_model:
          anyOf:
          - $ref: '#/components/schemas/ConfigSchemaOptions'
          - type: 'null'
          deprecated: true
        semantic_models:
          anyOf:
          - $ref: '#/components/schemas/ConfigSchemaOptions'
          - type: 'null'
        default_semantic_model:
          anyOf:
          - $ref: '#/components/schemas/ConfigSchemaOptions'
          - type: 'null'
        anonymization_model:
          $ref: '#/components/schemas/ConfigSchemaOptions'
        visual_labeling:
          anyOf:
          - $ref: '#/components/schemas/ConfigSchemaOptions'
          - type: 'null'
        generative_model:
          anyOf:
          - $ref: '#/components/schemas/ConfigSchemaOptions'
          - type: 'null'
        ner_model:
          anyOf:
          - $ref: '#/components/schemas/ConfigSchemaOptions'
          - type: 'null'
        relation_model:
          anyOf:
          - $ref: '#/components/schemas/ConfigSchemaOptions'
          - type: 'null'
        summary_model:
          anyOf:
          - $ref: '#/components/schemas/ConfigSchemaOptions'
          - type: 'null'
        summary:
          anyOf:
          - $ref: '#/components/schemas/ConfigSchemaOptions'
          - type: 'null'
        user_keys:
          anyOf:
          - $ref: '#/components/schemas/ConfigSchemaElements'
          - type: 'null'
        user_prompts:
          anyOf:
          - $ref: '#/components/schemas/ConfigSchemaElements'
          - type: 'null'
        summary_prompt:
          anyOf:
          - $ref: '#/components/schemas/ConfigSchemaElements'
          - type: 'null'
        prefer_markdown_generative_response:
          anyOf:
          - $ref: '#/components/schemas/ConfigSchemaElements'
          - type: 'null'
      type: object
      required:
      - anonymization_model
      title: ConfigSchema
    ConfigSchemaElements:
      properties:
        schemas:
          additionalProperties: true
          type: object
          title: Schemas
        create:
          type: boolean
          title: Create
          default: false
        update:
          type: boolean
          title: Update
          default: false
      type: object
      required:
      - schemas
      title: ConfigSchemaElements
    ConfigSchemaOptions:
      properties:
        options:
          anyOf:
          - items:
              $ref: '#/components/schemas/GenerativeOption'
            type: array
          - items:
              $ref: '#/components/schemas/Option'
            type: array
          title: Options
        default:
          anyOf:
          - type: string
          - type: 'null'
          title: Default
        create:
          type: boolean
          title: Create
          default: false
        update:
          type: boolean
          title: Update
          default: false
        multiple:
          type: boolean
          title: Multiple
          default: false
      type: object
      required:
      - options
      title: ConfigSchemaOptions
    CreateAccountModel:
      properties:
        model_types:
          items:
            $ref: '#/components/schemas/StringModelTypes'
          type: array
          minItems: 1
          title: Model Types
        location:
          type: string
          title: Location
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        trained_date:
          type: string
          format: date-time
          title: Trained Date
          default: '2025-09-12T08:04:18.145710'
        trained_kbid:
          type: string
          title: Trained Kbid
          default: ''
        openai_compat:
          anyOf:
          - $ref: '#/components/schemas/OpenAICompatModel-Input'
          - type: 'null'
      type: object
      required:
      - model_types
      - location
      title: CreateAccountModel
    CustomSplitStrategy:
      type: integer
      enum:
      - 0
      - 1
      - 2
      title: CustomSplitStrategy
      description: Keeping this open to add more strategies
    DeepSeekUserPrompt:
      properties:
        system:
          type: string
          title: System
          default: ''
        prompt:
          type: string
          title: Prompt
          default: ''
      type: object
      title: DeepSeekUserPrompt
    ExtractConfig-Input:
      properties:
        name:
          type: string
          title: Name
          default: ''
        vllm_config:
          anyOf:
          - $ref: '#/components/schemas/VLLMExtractionConfig-Input'
          - type: 'null'
        ai_tables:
          anyOf:
          - $ref: '#/components/schemas/AITables-Input'
          - type: 'null'
        split:
          anyOf:
          - $ref: '#/components/schemas/SplitConfig'
          - type: 'null'
      type: object
      title: ExtractConfig
      description: Hey, developer! Keep this in sync with corresponding pydantic model
        in learning_config.models
    ExtractConfig-Output:
      properties:
        name:
          type: string
          title: Name
          default: ''
        vllm_config:
          anyOf:
          - $ref: '#/components/schemas/VLLMExtractionConfig-Output'
          - type: 'null'
        ai_tables:
          anyOf:
          - $ref: '#/components/schemas/AITables-Output'
          - type: 'null'
        split:
          anyOf:
          - $ref: '#/components/schemas/SplitConfig'
          - type: 'null'
      type: object
      title: ExtractConfig
      description: Hey, developer! Keep this in sync with corresponding pydantic model
        in learning_config.models
    GenerationConfig:
      properties:
        temperature:
          type: number
          title: Temperature
          description: Temperature to use when sampling
          default: 0.0
        default_max_completion_tokens:
          type: integer
          title: Default Maximum Completion Tokens
          description: Maximum number of output tokens to request by default
          default: 800
        max_input_tokens:
          type: integer
          title: Maximum Supported Input Tokens
          description: Maximum number of input tokens supported by the model.
          default: 64000
        max_supported_completion_tokens:
          anyOf:
          - type: integer
          - type: 'null'
          title: Maximum Supported Completion Tokens
          description: Maximum number of output tokens supported by the model, if
            not set, no check will be done that the supplied max_tokens is less than
            this value
      type: object
      title: GenerationConfig
      description: Stores parameters involved in generation that may vary from request
        to request
    GenerativeOption:
      properties:
        name:
          type: string
          title: Name
        value:
          type: string
          title: Value
        provider:
          type: string
          title: Provider
        user_prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: User Prompt
        user_key:
          anyOf:
          - type: string
          - type: 'null'
          title: User Key
      type: object
      required:
      - name
      - value
      - provider
      title: GenerativeOption
    HFUserPrompt:
      properties:
        system:
          type: string
          title: System
          default: ''
          examples: []
          info: Input here the behaviour you want the model to have
        prompt:
          type: string
          title: Prompt
          examples: []
          info: "Input here your prompt with the words {context} and {question} in\
            \ brackets where you want those fields to be placed, in case you want\
            \ them in your prompt.\n For this generative model {chat_history} is not\
            \ available to modify in the prompt"
      type: object
      required:
      - prompt
      title: HFUserPrompt
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LLMConfig-Input:
      properties:
        model:
          type: string
          title: Model
          default: ''
        provider:
          type: string
          title: Provider
          default: ''
        keys:
          anyOf:
          - $ref: '#/components/schemas/UserLearningKeys-Input'
          - type: 'null'
        prompts:
          anyOf:
          - $ref: '#/components/schemas/UserPrompts'
          - type: 'null'
      type: object
      title: LLMConfig
    LLMConfig-Output:
      properties:
        model:
          type: string
          title: Model
          default: ''
        provider:
          type: string
          title: Provider
          default: ''
        keys:
          anyOf:
          - $ref: '#/components/schemas/UserLearningKeys-Output'
          - type: 'null'
        prompts:
          anyOf:
          - $ref: '#/components/schemas/UserPrompts'
          - type: 'null'
      type: object
      title: LLMConfig
    LLMSplitConfig-Input:
      properties:
        llm:
          anyOf:
          - $ref: '#/components/schemas/LLMConfig-Input'
          - type: 'null'
        rules:
          items:
            type: string
          type: array
          title: Rules
      type: object
      title: LLMSplitConfig
    LLMSplitConfig-Output:
      properties:
        llm:
          anyOf:
          - $ref: '#/components/schemas/LLMConfig-Output'
          - type: 'null'
        rules:
          items:
            type: string
          type: array
          title: Rules
      type: object
      title: LLMSplitConfig
    LearningConfiguration:
      properties:
        resource_labelers_models:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Resource Labelers Models
        paragraph_labelers_models:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Paragraph Labelers Models
        intent_models:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Intent Models
        visual_labeling:
          anyOf:
          - type: string
          - type: 'null'
          title: Visual Labeling
          default: disabled
        ner_model:
          type: string
          title: Ner Model
          default: multilingual
        relation_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Relation Model
          default: base
        anonymization_model:
          type: string
          title: Anonymization Model
          default: disabled
        semantic_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Semantic Model
          deprecated: true
        semantic_models:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Semantic Models
        default_semantic_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Default Semantic Model
        semantic_vector_similarity:
          anyOf:
          - type: string
          - type: 'null'
          title: Semantic Vector Similarity
          default: DOT
          deprecated: true
        semantic_vector_size:
          anyOf:
          - type: integer
          - type: 'null'
          title: Semantic Vector Size
          default: 1024
          deprecated: true
        semantic_matryoshka_dims:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: Semantic Matryoshka Dims
          default: []
          deprecated: true
        semantic_threshold:
          anyOf:
          - type: number
          - type: 'null'
          title: Semantic Threshold
          default: 0.4
          deprecated: true
        generative_model:
          type: string
          title: Generative Model
          default: chatgpt-azure-4o
        user_keys:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__UserLearningKeys-Output'
          - type: 'null'
        user_prompts:
          anyOf:
          - $ref: '#/components/schemas/UserPrompts'
          - type: 'null'
        summary:
          $ref: '#/components/schemas/Summary'
          default: simple
        summary_model:
          type: string
          title: Summary Model
          default: chatgpt-azure-4o
        summary_prompt:
          anyOf:
          - $ref: '#/components/schemas/SummaryPrompt'
          - type: 'null'
        prefer_markdown_generative_response:
          type: boolean
          title: Prefer Markdown Generative Response
          default: false
        semantic_model_configs:
          additionalProperties:
            $ref: '#/components/schemas/SemanticConfig'
          type: object
          title: Semantic Model Configs
          default: {}
      type: object
      title: LearningConfiguration
      description: 'This model is to add the fields that are computed dynamically
        and not stored in the db, it also serves as a bridge

        between the stored config and what we want to send through the APIs'
    LearningConfigurationCreation:
      properties:
        anonymization_model:
          anyOf:
          - $ref: '#/components/schemas/AnonymizationModel'
          - type: string
          title: Anonymization Model
          default: disabled
        visual_labeling:
          anyOf:
          - $ref: '#/components/schemas/VisualLabeling'
          - type: string
          title: Visual Labeling
          default: disabled
        generative_model:
          type: string
          title: Generative Model
          default: chatgpt-azure-4o
        ner_model:
          anyOf:
          - $ref: '#/components/schemas/NERModel'
          - type: string
          title: Ner Model
          default: multilingual
        relation_model:
          anyOf:
          - $ref: '#/components/schemas/RelationModel'
          - type: string
          title: Relation Model
          default: base
        user_keys:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__UserLearningKeys-Input'
          - type: 'null'
        user_prompts:
          anyOf:
          - $ref: '#/components/schemas/UserPrompts'
          - type: 'null'
        summary:
          anyOf:
          - $ref: '#/components/schemas/Summary'
          - type: 'null'
          default: simple
        summary_model:
          type: string
          title: Summary Model
          default: chatgpt-azure-4o
        summary_prompt:
          anyOf:
          - $ref: '#/components/schemas/SummaryPrompt'
          - type: 'null'
        prefer_markdown_generative_response:
          type: boolean
          title: Prefer Markdown Generative Response
          default: false
        default_semantic_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Default Semantic Model
          description: The default vector set / semantic model to use. Must be one
            of the models defined in the `semantic_models` field. If not provided,
            the first model in the list will be used.
        semantic_model:
          anyOf:
          - $ref: '#/components/schemas/SemanticModel'
          - type: 'null'
          deprecated: true
        semantic_models:
          anyOf:
          - items:
              $ref: '#/components/schemas/SemanticModel'
            type: array
          - type: 'null'
          title: Semantic Models
      type: object
      title: LearningConfigurationCreation
    LearningConfigurationUpdate:
      properties:
        anonymization_model:
          anyOf:
          - $ref: '#/components/schemas/AnonymizationModel'
          - type: string
          title: Anonymization Model
          default: disabled
        visual_labeling:
          anyOf:
          - $ref: '#/components/schemas/VisualLabeling'
          - type: string
          title: Visual Labeling
          default: disabled
        generative_model:
          type: string
          title: Generative Model
          default: chatgpt-azure-4o
        ner_model:
          anyOf:
          - $ref: '#/components/schemas/NERModel'
          - type: string
          title: Ner Model
          default: multilingual
        relation_model:
          anyOf:
          - $ref: '#/components/schemas/RelationModel'
          - type: string
          title: Relation Model
          default: base
        user_keys:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__UserLearningKeys-Input'
          - type: 'null'
        user_prompts:
          anyOf:
          - $ref: '#/components/schemas/UserPrompts'
          - type: 'null'
        summary:
          anyOf:
          - $ref: '#/components/schemas/Summary'
          - type: 'null'
          default: simple
        summary_model:
          type: string
          title: Summary Model
          default: chatgpt-azure-4o
        summary_prompt:
          anyOf:
          - $ref: '#/components/schemas/SummaryPrompt'
          - type: 'null'
        prefer_markdown_generative_response:
          type: boolean
          title: Prefer Markdown Generative Response
          default: false
        default_semantic_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Default Semantic Model
          description: The default vector set / semantic model to use. Must be one
            of the models defined in the `semantic_models` field. If not provided,
            the first model in the list will be used.
      additionalProperties: false
      type: object
      title: LearningConfigurationUpdate
    ManualSplitConfig:
      properties:
        splitter:
          anyOf:
          - type: string
          - type: 'null'
          title: Splitter
          default: ''
      type: object
      title: ManualSplitConfig
    MistralUserPrompt:
      properties:
        prompt:
          type: string
          title: Prompt
          default: ''
      type: object
      title: MistralUserPrompt
    ModelAccount:
      properties:
        model_id:
          type: string
          title: Model Id
        account:
          type: string
          title: Account
        model_type:
          anyOf:
          - $ref: '#/components/schemas/StringModelTypes'
          - type: 'null'
        trained_date:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Trained Date
        location:
          anyOf:
          - type: string
          - type: 'null'
          title: Location
        trained_kbid:
          anyOf:
          - type: string
          - type: 'null'
          title: Trained Kbid
        model_types:
          items:
            $ref: '#/components/schemas/StringModelTypes'
          type: array
          title: Model Types
          default: []
        log:
          anyOf:
          - type: string
          - type: 'null'
          title: Log
        kbids:
          items:
            type: string
          type: array
          title: Kbids
        openai_compat:
          anyOf:
          - $ref: '#/components/schemas/OpenAICompatModel-Output'
          - type: 'null'
      type: object
      required:
      - model_id
      - account
      - model_type
      - trained_date
      - location
      - trained_kbid
      - log
      - kbids
      title: ModelAccount
      description: This is the pydantic model for the model details in the account.
    ModelFeatures:
      properties:
        logprobs:
          type: boolean
          title: Logprobs support
          description: Whether the model supports outputting logprobs
          default: false
        streaming:
          type: boolean
          title: Streaming support
          description: Whether the model supports streaming responses
          default: true
        system_message:
          type: boolean
          title: System message support
          description: Whether the model supports system messages
          default: true
        tool_use:
          type: boolean
          title: Tool use support
          description: Whether the model supports tool_use/function calling
          default: true
        vision:
          type: boolean
          title: Image support
          description: Whether the model supports image understanding (vision)
          default: true
        file_input:
          type: boolean
          title: File input support
          description: Whether the API and model support file inputs
          default: false
        max_images:
          type: integer
          title: Maximum number of images supported
          description: Maximum number of images that the model supports in a single
            request
          default: 5
        seed_support:
          type: boolean
          title: Seeded generation support
          description: Whether the model supports seeded generation, for deterministic
            outputs. If not enabled, using a seed will result in an error.
          default: false
        reasoning:
          $ref: '#/components/schemas/ReasoningType'
          title: Reasoning support
          description: "Type of reasoning supported by the model.\n\t- Unspecified:\
            \ Reasoning will be automatically detected, but won\xB4t be customizable.\n\
            \t- None: No reasoning capabilities are available.\n\t- Customizable Effort:\
            \ Reasoning can be customized by effort values (low, medium, high)"
          default: 0
      type: object
      title: ModelFeatures
      description: Stores the supported functionality of a model or API
    ModelID:
      properties:
        id:
          type: string
          title: Id
      type: object
      required:
      - id
      title: ModelID
    ModelType:
      type: integer
      enum:
      - 0
      - 1
      title: ModelType
    ModelsAccount:
      properties:
        model_id:
          type: string
          title: Model Id
        account:
          type: string
          title: Account
        model_type:
          anyOf:
          - $ref: '#/components/schemas/StringModelTypes'
          - type: 'null'
        trained_date:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Trained Date
        location:
          anyOf:
          - type: string
          - type: 'null'
          title: Location
        trained_kbid:
          anyOf:
          - type: string
          - type: 'null'
          title: Trained Kbid
        model_types:
          items:
            $ref: '#/components/schemas/StringModelTypes'
          type: array
          title: Model Types
          default: []
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
      type: object
      required:
      - model_id
      - account
      - model_type
      - trained_date
      - location
      - trained_kbid
      - title
      title: ModelsAccount
      description: This is the pydantic model for the listing of models in the account.
    NERModel:
      type: string
      enum:
      - multilingual
      title: NERModel
    OpenAICompatModel-Input:
      properties:
        key:
          type: string
          title: API Key
          description: The API key to use, can be left empty if not required
          default: ''
        url:
          type: string
          title: API URL
          description: The URL that the api is hosted on
        model_id:
          type: string
          title: Model ID
          description: The model id to use as defined in the API
        tokenizer:
          $ref: '#/components/schemas/Tokenizer'
          description: The tokenizer to use for counting tokens, if you require a
            different tokenizer, please contact support
          default: 0
        generation_config:
          $ref: '#/components/schemas/GenerationConfig'
          title: Generation Configuration
          description: The sampling parameters to use for the model
        model_features:
          $ref: '#/components/schemas/ModelFeatures'
          title: Supported Model Features
          description: The model features that the model or API supports
      type: object
      required:
      - url
      - model_id
      title: OpenAICompatModel
    OpenAICompatModel-Output:
      properties:
        key:
          type: string
          title: API Key
          description: The API key to use, can be left empty if not required
          default: ''
        url:
          type: string
          title: API URL
          description: The URL that the api is hosted on
        model_id:
          type: string
          title: Model ID
          description: The model id to use as defined in the API
        tokenizer:
          $ref: '#/components/schemas/Tokenizer'
          description: The tokenizer to use for counting tokens, if you require a
            different tokenizer, please contact support
          default: 0
        generation_config:
          $ref: '#/components/schemas/GenerationConfig'
          title: Generation Configuration
          description: The sampling parameters to use for the model
        model_features:
          $ref: '#/components/schemas/ModelFeatures'
          title: Supported Model Features
          description: The model features that the model or API supports
      type: object
      required:
      - url
      - model_id
      title: OpenAICompatModel
    OpenAICompatUserPrompt:
      properties:
        system:
          type: string
          title: System
          default: ''
          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
          info: Input here the behaviour you want the model to have
        prompt:
          type: string
          title: Prompt
          examples:
          - "Taking into account this provided context: <Context> {context} </Context>\n\
            \    Can you answer this question in a clear, concise way: <Question>\
            \ {question} </Question>"
          - "Taking into account this provided context.\n    Context:\n    {context}\n\
            \    Answer this QUESTION: \"{question}\" like an economy expert."
          - "Taking into account this provided context: <Context> {context} </Context>\n\
            \    Answer this question: <Question> {question} </Question>\n    If you\
            \ do not find an answer in the context, say that you don't have enough\
            \ data."
          info: Input here your prompt with the words {context} and {question} in
            brackets where you want those fields to be placed, in case you want them
            in your prompt.
      type: object
      required:
      - prompt
      title: OpenAICompatUserPrompt
    OpenAIUserPrompt:
      properties:
        system:
          type: string
          title: System
          default: ''
        prompt:
          type: string
          title: Prompt
          default: ''
      type: object
      title: OpenAIUserPrompt
    Option:
      properties:
        name:
          type: string
          title: Name
        value:
          type: string
          title: Value
      type: object
      required:
      - name
      - value
      title: Option
    PalmUserPrompt:
      properties:
        prompt:
          type: string
          title: Prompt
          default: ''
      type: object
      title: PalmUserPrompt
    PatchAccountModel:
      properties:
        model_types:
          anyOf:
          - items:
              $ref: '#/components/schemas/StringModelTypes'
            type: array
            minItems: 1
          - type: 'null'
          title: Model Types
        location:
          anyOf:
          - type: string
          - type: 'null'
          title: Location
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        trained_date:
          type: string
          format: date-time
          title: Trained Date
          default: '2025-09-12T08:04:18.146959'
        trained_kbid:
          type: string
          title: Trained Kbid
          default: ''
        openai_compat:
          anyOf:
          - $ref: '#/components/schemas/OpenAICompatModel-Input'
          - type: 'null'
      type: object
      title: PatchAccountModel
    ReasoningType:
      type: integer
      enum:
      - 0
      - 1
      - 2
      title: ReasoningType
    RelationModel:
      type: string
      enum:
      - base
      title: RelationModel
    SemanticConfig:
      properties:
        similarity:
          $ref: '#/components/schemas/SimilarityFunction'
        size:
          type: integer
          title: Size
        threshold:
          type: number
          title: Threshold
        max_tokens:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Tokens
        matryoshka_dims:
          items:
            type: integer
          type: array
          title: Matryoshka Dims
          default: []
        external:
          type: boolean
          title: External
          default: false
      type: object
      required:
      - similarity
      - size
      - threshold
      title: SemanticConfig
    SemanticModel:
      type: string
      enum:
      - en-2024-04-24
      - multilingual-2024-05-06
      - multilingual-2023-08-16
      - multilingual-2024-10-07
      - text-embedding-3-small
      - text-embedding-3-large
      - gecko-embeddings-multi
      - hf_embedding
      title: SemanticModel
    SimilarityFunction:
      type: integer
      enum:
      - 0
      - 1
      title: SimilarityFunction
    SplitConfig:
      properties:
        max_paragraph:
          type: integer
          title: Max Paragraph
          default: 0
        custom_split:
          anyOf:
          - $ref: '#/components/schemas/CustomSplitStrategy'
          - type: 'null'
          default: 0
      type: object
      title: SplitConfig
    SplitConfiguration-Input:
      properties:
        name:
          type: string
          title: Name
          default: ''
        max_paragraph:
          type: integer
          title: Max Paragraph
          default: 0
        custom_split:
          anyOf:
          - $ref: '#/components/schemas/CustomSplitStrategy'
          - type: 'null'
          default: 0
        llm_split:
          anyOf:
          - $ref: '#/components/schemas/LLMSplitConfig-Input'
          - type: 'null'
        manual_split:
          anyOf:
          - $ref: '#/components/schemas/ManualSplitConfig'
          - type: 'null'
      type: object
      title: SplitConfiguration
    SplitConfiguration-Output:
      properties:
        name:
          type: string
          title: Name
          default: ''
        max_paragraph:
          type: integer
          title: Max Paragraph
          default: 0
        custom_split:
          anyOf:
          - $ref: '#/components/schemas/CustomSplitStrategy'
          - type: 'null'
          default: 0
        llm_split:
          anyOf:
          - $ref: '#/components/schemas/LLMSplitConfig-Output'
          - type: 'null'
        manual_split:
          anyOf:
          - $ref: '#/components/schemas/ManualSplitConfig'
          - type: 'null'
      type: object
      title: SplitConfiguration
    StringModelTypes:
      type: string
      enum:
      - GENERATIVE
      - NER
      - RESOURCE_LABELER
      - CLASSIFIER
      - ANONYMIZER
      - VISUAL_LABELER
      - SUMMARY
      - DUMMY
      - PARAGRAPH_LABELER
      - EMBEDDINGS
      - RELATIONS
      title: StringModelTypes
    Summary:
      type: string
      enum:
      - extended
      - simple
      title: Summary
    SummaryPrompt:
      properties:
        prompt:
          type: string
          title: Prompt
          examples:
          - 'Make a bullet point summary of the following content: {text}'
          - 'Make a thorough summary of the following news article: {text}'
          info: Input here your prompt with the word {text} in brackets where you
            want the content to summarize to be placed
      type: object
      required:
      - prompt
      title: SummaryPrompt
    TextGenerationKey:
      properties:
        model:
          type: string
          title: Model
          default: ''
      type: object
      title: TextGenerationKey
    TextGenerationUserPrompt:
      properties:
        prompt:
          type: string
          title: Prompt
          default: ''
      type: object
      title: TextGenerationUserPrompt
    Tokenizer:
      type: integer
      enum:
      - 0
      - 1
      - 2
      title: Tokenizer
    UserPrompts:
      properties:
        openai:
          anyOf:
          - $ref: '#/components/schemas/OpenAIUserPrompt'
          - type: 'null'
        azure_openai:
          anyOf:
          - $ref: '#/components/schemas/AzureUserPrompt'
          - type: 'null'
        palm:
          anyOf:
          - $ref: '#/components/schemas/PalmUserPrompt'
          - type: 'null'
        anthropic:
          anyOf:
          - $ref: '#/components/schemas/AnthropicUserPrompt'
          - type: 'null'
        text_generation:
          anyOf:
          - $ref: '#/components/schemas/TextGenerationUserPrompt'
          - type: 'null'
        mistral:
          anyOf:
          - $ref: '#/components/schemas/MistralUserPrompt'
          - type: 'null'
        azure_mistral:
          anyOf:
          - $ref: '#/components/schemas/AzureMistralUserPrompt'
          - type: 'null'
        claude3:
          anyOf:
          - $ref: '#/components/schemas/Claude3UserPrompt'
          - type: 'null'
        deepseek:
          anyOf:
          - $ref: '#/components/schemas/DeepSeekUserPrompt'
          - type: 'null'
      type: object
      title: UserPrompts
    VLLMExtractionConfig-Input:
      properties:
        rules:
          items:
            type: string
          type: array
          title: Rules
        llm:
          anyOf:
          - $ref: '#/components/schemas/LLMConfig-Input'
          - type: 'null'
      type: object
      title: VLLMExtractionConfig
    VLLMExtractionConfig-Output:
      properties:
        rules:
          items:
            type: string
          type: array
          title: Rules
        llm:
          anyOf:
          - $ref: '#/components/schemas/LLMConfig-Output'
          - type: 'null'
      type: object
      title: VLLMExtractionConfig
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    VisualLabeling:
      type: string
      enum:
      - disabled
      - enabled
      title: VisualLabeling
    learning_config__models__AnthropicKey:
      properties:
        key:
          type: string
          title: Key
      type: object
      required:
      - key
      title: AnthropicKey
    learning_config__models__AzureOpenAIKey:
      properties:
        key:
          type: string
          title: Key
        url:
          type: string
          title: Url
        deployment:
          type: string
          title: Deployment
        model:
          type: string
          title: Model
      type: object
      required:
      - key
      - url
      - deployment
      - model
      title: AzureOpenAIKey
    learning_config__models__HFEmbeddingKey:
      properties:
        url:
          type: string
          title: Huggingface Endpoint URL
          description: URL of the Huggingface embedding model endpoint
        key:
          type: string
          title: Huggingface API Key
          description: API Key with access the desired Huggingface endpoint
        matryoshka:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: Matryoshka Dimensions
          description: List of matryoshka dimensions to use for the embedding, in
            descending order. If unknown, leave it empty
          examples:
          - - 768
            - 512
            - 256
        similarity:
          type: string
          title: Similarity Function
          description: Similarity function to use. It can be DOT or COSINE, leave
            it as DOT if unknown
          default: DOT
          examples:
          - DOT
          - COSINE
        size:
          type: integer
          title: Embedding Vector Size
          description: Size of the embeddings generated by the model. Must be set
            to the correct value for the specific model hosted in the endpoint
        threshold:
          type: number
          title: Semantic Threshold
          description: Threshold to use for semantic similarity
          default: 0.4
        passage_prompt:
          type: string
          title: Passage Prompt
          description: Prompt to use for passage embedding, only set this value if
            your embedding model requires it
          default: '{}'
          examples:
          - 'Passage: {}'
        query_prompt:
          type: string
          title: Query Prompt
          description: Prompt to use for query embedding, only set this value if your
            embedding model requires it
          default: '{}'
          examples:
          - 'Represent this sentence for searching relevant passages: {}'
      type: object
      required:
      - url
      - key
      - size
      title: HFEmbeddingKey
    learning_config__models__HFLLMKey:
      properties:
        url:
          type: string
          title: Url
        key:
          type: string
          title: Key
      type: object
      required:
      - url
      - key
      title: HFLLMKey
    learning_config__models__MistralKey:
      properties:
        key:
          type: string
          title: Key
      type: object
      required:
      - key
      title: MistralKey
    learning_config__models__OpenAIKey:
      properties:
        key:
          type: string
          title: Key
        org:
          type: string
          title: Org
      type: object
      required:
      - key
      - org
      title: OpenAIKey
    learning_config__models__PalmKey:
      properties:
        credentials:
          type: string
          title: Credentials
          widget: textarea
        location:
          type: string
          title: Location
      type: object
      required:
      - credentials
      - location
      title: PalmKey
    learning_config__models__UserLearningKeys-Input:
      properties:
        openai:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__OpenAIKey'
          - type: 'null'
        azure_openai:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__AzureOpenAIKey'
          - type: 'null'
        mistral:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__MistralKey'
          - type: 'null'
        palm:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__PalmKey'
          - type: 'null'
        anthropic:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__AnthropicKey'
          - type: 'null'
        claude3:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__AnthropicKey'
          - type: 'null'
        azure_mistral:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__MistralKey'
          - type: 'null'
        hf_llm:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__HFLLMKey'
          - type: 'null'
        hf_embedding:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__HFEmbeddingKey'
          - type: 'null'
        azure_aii:
          anyOf:
          - $ref: '#/components/schemas/AzureAIIKey'
          - type: 'null'
        openai_compat:
          anyOf:
          - $ref: '#/components/schemas/OpenAICompatModel-Input'
          - type: 'null'
      type: object
      title: UserLearningKeys
    learning_config__models__UserLearningKeys-Output:
      properties:
        openai:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__OpenAIKey'
          - type: 'null'
        azure_openai:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__AzureOpenAIKey'
          - type: 'null'
        mistral:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__MistralKey'
          - type: 'null'
        palm:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__PalmKey'
          - type: 'null'
        anthropic:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__AnthropicKey'
          - type: 'null'
        claude3:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__AnthropicKey'
          - type: 'null'
        azure_mistral:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__MistralKey'
          - type: 'null'
        hf_llm:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__HFLLMKey'
          - type: 'null'
        hf_embedding:
          anyOf:
          - $ref: '#/components/schemas/learning_config__models__HFEmbeddingKey'
          - type: 'null'
        azure_aii:
          anyOf:
          - $ref: '#/components/schemas/AzureAIIKey'
          - type: 'null'
        openai_compat:
          anyOf:
          - $ref: '#/components/schemas/OpenAICompatModel-Output'
          - type: 'null'
      type: object
      title: UserLearningKeys
    learning_protos__config_p2p__AnthropicKey:
      properties:
        key:
          type: string
          title: Key
          default: ''
      type: object
      title: AnthropicKey
    learning_protos__config_p2p__AzureOpenAIKey:
      properties:
        key:
          type: string
          title: Key
          default: ''
        url:
          type: string
          title: Url
          default: ''
        deployment:
          type: string
          title: Deployment
          default: ''
        model:
          type: string
          title: Model
          default: ''
      type: object
      title: AzureOpenAIKey
    learning_protos__config_p2p__HFEmbeddingKey:
      properties:
        url:
          type: string
          title: Url
          default: ''
        key:
          type: string
          title: Key
          default: ''
        matryoshka:
          items:
            type: integer
          type: array
          title: Matryoshka
        similarity:
          type: string
          title: Similarity
          default: ''
        size:
          type: integer
          title: Size
          default: 0
        threshold:
          type: number
          title: Threshold
          default: 0.0
        passage_prompt:
          type: string
          title: Passage Prompt
          default: ''
        query_prompt:
          type: string
          title: Query Prompt
          default: ''
      type: object
      title: HFEmbeddingKey
      description: "     Some models require a specific template (including prefix)\
        \ to work correctly in each task\nFor example Snowflake's Arctic-embed requires\
        \ a specific prefix to work correctly.\nIn that case, the query prompt will\
        \ be \n```\npassage_prompt: \"\"\nquery_prompt: \"Represent this sentence\
        \ for searching relevant passages: {}\"\n````\nwhere {} will be replaced by\
        \ the actual sentence.\n`passage_prompt` is empty because the model does not\
        \ require alterations to the sentence to embed is as a passage.\n    "
    learning_protos__config_p2p__HFLLMKey:
      properties:
        key:
          type: string
          title: Key
          default: ''
        url:
          type: string
          title: Url
          default: ''
        model:
          $ref: '#/components/schemas/ModelType'
          default: 0
      type: object
      title: HFLLMKey
    learning_protos__config_p2p__MistralKey:
      properties:
        key:
          type: string
          title: Key
          default: ''
      type: object
      title: MistralKey
    learning_protos__config_p2p__OpenAIKey:
      properties:
        key:
          type: string
          title: Key
          default: ''
        org:
          type: string
          title: Org
          default: ''
      type: object
      title: OpenAIKey
    learning_protos__config_p2p__PalmKey:
      properties:
        credentials:
          type: string
          title: Credentials
        location:
          type: string
          title: Location
          default: ''
      type: object
      required:
      - credentials
      title: PalmKey
    learning_protos__config_p2p__UserLearningKeys-Input:
      properties:
        openai:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__OpenAIKey'
          - type: 'null'
        azure_openai:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__AzureOpenAIKey'
          - type: 'null'
        palm:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__PalmKey'
          - type: 'null'
        anthropic:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__AnthropicKey'
          - type: 'null'
        claude3:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__AnthropicKey'
          - type: 'null'
        text_generation:
          anyOf:
          - $ref: '#/components/schemas/TextGenerationKey'
          - type: 'null'
        mistral:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__MistralKey'
          - type: 'null'
        azure_mistral:
          anyOf:
          - $ref: '#/components/schemas/AzureMistralKey'
          - type: 'null'
        hf_llm:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__HFLLMKey'
          - type: 'null'
        hf_embedding:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__HFEmbeddingKey'
          - type: 'null'
        azure_aii:
          anyOf:
          - $ref: '#/components/schemas/AzureAIIKey'
          - type: 'null'
        openai_compat:
          anyOf:
          - $ref: '#/components/schemas/OpenAICompatModel-Input'
          - type: 'null'
      type: object
      title: UserLearningKeys
    learning_protos__config_p2p__UserLearningKeys-Output:
      properties:
        openai:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__OpenAIKey'
          - type: 'null'
        azure_openai:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__AzureOpenAIKey'
          - type: 'null'
        palm:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__PalmKey'
          - type: 'null'
        anthropic:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__AnthropicKey'
          - type: 'null'
        claude3:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__AnthropicKey'
          - type: 'null'
        text_generation:
          anyOf:
          - $ref: '#/components/schemas/TextGenerationKey'
          - type: 'null'
        mistral:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__MistralKey'
          - type: 'null'
        azure_mistral:
          anyOf:
          - $ref: '#/components/schemas/AzureMistralKey'
          - type: 'null'
        hf_llm:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__HFLLMKey'
          - type: 'null'
        hf_embedding:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__HFEmbeddingKey'
          - type: 'null'
        azure_aii:
          anyOf:
          - $ref: '#/components/schemas/AzureAIIKey'
          - type: 'null'
        openai_compat:
          anyOf:
          - $ref: '#/components/schemas/OpenAICompatModel-Output'
          - type: 'null'
      type: object
      title: UserLearningKeys
    AnthropicKey:
      properties:
        key:
          type: string
          title: Key
          default: ''
      type: object
      title: AnthropicKey
    ApplyOptions:
      type: string
      enum:
      - EXISTING
      - NEW
      - ALL
      title: ApplyOptions
      description: 'Defines how the tasks should be applied to the existing data.

        - EXSITING: Only apply to existing data (starts a worker that executes the
        task)

        - NEW: Only apply to new data (enables the task at processing time)

        - ALL: Apply to all data (both of the above)'
    ApplyTo:
      type: integer
      enum:
      - 0
      - 1
      title: ApplyTo
    AskOperation:
      properties:
        question:
          type: string
          title: Question
        destination:
          type: string
          title: Destination
        json:
          type: boolean
          title: Json
          default: false
        triggers:
          items:
            $ref: '#/components/schemas/Trigger'
          type: array
          title: Triggers to execute when the operation is executed
        user_prompt:
          type: string
          title: Custom User Prompt
          description: Prompt to use when executing the agent over a field, it must
            include the {context} placeholder and optionally the {question} placeholder
            if you wish. If not given, the default prompt will be used. Only supported
            when `json` is not set
          default: ''
      type: object
      required:
      - question
      - destination
      title: AskOperation
    AzureOpenAIKey:
      properties:
        key:
          type: string
          title: Key
          default: ''
        url:
          type: string
          title: Url
          default: ''
        deployment:
          type: string
          title: Deployment
          default: ''
        model:
          type: string
          title: Model
          default: ''
      type: object
      title: AzureOpenAIKey
    DataAugmentation-Input:
      properties:
        name:
          type: string
          title: Name
          default: ''
        'on':
          $ref: '#/components/schemas/ApplyTo'
          description: Defines if the task should be applied to paragraphs (0) or
            whole fields (1)
          default: 0
        filter:
          anyOf:
          - $ref: '#/components/schemas/Filter'
          - type: 'null'
          description: Filter to apply the data augmentation
        operations:
          items:
            $ref: '#/components/schemas/Operation-Input'
          type: array
          title: Operations
        llm:
          $ref: '#/components/schemas/LLMConfig-Input'
        filter_expression_json:
          anyOf:
          - type: string
          - type: 'null'
          title: Filter Expression Json
          description: JSON representation of the filter expression, used to filter
            the data augmentation in the UI. If set, it takes precedence over the
            filter field
          default: ''
      type: object
      title: DataAugmentation
    DataAugmentation-Output:
      properties:
        name:
          type: string
          title: Name
          default: ''
        'on':
          $ref: '#/components/schemas/ApplyTo'
          description: Defines if the task should be applied to paragraphs (0) or
            whole fields (1)
          default: 0
        filter:
          anyOf:
          - $ref: '#/components/schemas/Filter'
          - type: 'null'
          description: Filter to apply the data augmentation
        operations:
          items:
            $ref: '#/components/schemas/Operation-Output'
          type: array
          title: Operations
        llm:
          $ref: '#/components/schemas/LLMConfig-Output'
        filter_expression_json:
          anyOf:
          - type: string
          - type: 'null'
          title: Filter Expression Json
          description: JSON representation of the filter expression, used to filter
            the data augmentation in the UI. If set, it takes precedence over the
            filter field
          default: ''
      type: object
      title: DataAugmentation
    Dataset:
      properties:
        id:
          type: string
          title: Id
        timestamp:
          type: string
          format: date-time
          title: Timestamp
        account_id:
          type: string
          title: Account Id
        nua_client_id:
          type: string
          title: Nua Client Id
        account_type:
          type: string
          title: Account Type
        type:
          type: string
          title: Type
        path:
          type: string
          title: Path
        filter:
          additionalProperties: true
          type: object
          title: Filter
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
      type: object
      required:
      - id
      - timestamp
      - account_id
      - nua_client_id
      - account_type
      - type
      - path
      - filter
      title: Dataset
    DatasetCreated:
      properties:
        id:
          type: string
          title: Id
      type: object
      required:
      - id
      title: DatasetCreated
    DatasetFilter:
      properties:
        labels:
          items:
            type: string
          type: array
          title: Labels
      type: object
      required:
      - labels
      title: DatasetFilter
    DatasetInfo:
      properties:
        name:
          type: string
          title: Name
        filter:
          $ref: '#/components/schemas/DatasetFilter'
        type:
          $ref: '#/components/schemas/Task-Input'
      type: object
      required:
      - name
      - filter
      - type
      title: DatasetInfo
    DatasetsList:
      properties:
        datasets:
          items:
            $ref: '#/components/schemas/Dataset'
          type: array
          title: Datasets
      type: object
      required:
      - datasets
      title: DatasetsList
    EntityDefinition:
      properties:
        label:
          type: string
          title: Label
          description: Entity type
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
          description: Description of the entity type
          default: ''
      type: object
      required:
      - label
      title: EntityDefinition
    EntityExample:
      properties:
        name:
          type: string
          title: Name
          description: Name associated with the entity
        label:
          type: string
          title: Label
          description: Type of entity
      type: object
      required:
      - name
      - label
      title: EntityExample
    ExtractOperation:
      properties:
        model:
          $ref: '#/components/schemas/Model'
          default: 0
        triggers:
          items:
            $ref: '#/components/schemas/Trigger'
          type: array
          title: Triggers to execute when the operation is executed
      type: object
      title: ExtractOperation
    Filter:
      properties:
        contains:
          items:
            type: string
          type: array
          title: Contains
          description: Text that must be contained in the field in order to apply
            the data augmentation, if multiple values are provided, they will be combined
            with the specified operator
        resource_type:
          items:
            type: string
          type: array
          title: Resource Type
          description: Data Augmentation will only be applied to resources of the
            specified types, if multiple values are provided, they will be combined
            with the specified operator
        field_types:
          items:
            type: string
          type: array
          title: Field Types
          description: Data Augmentation will only be applied to fields of the specified
            types
        not_field_types:
          items:
            type: string
          type: array
          title: Not Field Types
          description: Data Augmentation will not be applied to fields of the specified
            types
        rids:
          items:
            type: string
          type: array
          title: Rids
          description: Data Augmentation will only be applied resources matching the
            specified resource ids
        fields:
          items:
            type: string
          type: array
          title: Fields
          description: Data Augmentation will only be applied to fields matching the
            specified field ids
        splits:
          items:
            type: string
          type: array
          title: Splits
          description: Data Augmentation will only be applied to fields matching the
            specified field splits
        labels:
          items:
            type: string
          type: array
          title: Labels
          description: Data Augmentation will only be applied to fields matching the
            specified labels, if multiple values are provided, they will be combined
            with the specified operator
        apply_to_agent_generated_fields:
          type: boolean
          title: Apply To Agent Generated Fields
          description: If enabled, the data augmentation will also be applied to fields
            generated by other data augmentation agents. This functionality is only
            supported for agents that do not generate fields.
          default: false
        contains_operator:
          $ref: '#/components/schemas/FilterLogicalOperator'
          description: Way of combining the values in the contains field
          default: 0
        labels_operator:
          $ref: '#/components/schemas/FilterLogicalOperator'
          description: Way of combining the values in the labels field
          default: 0
      type: object
      title: Filter
    FilterLogicalOperator:
      type: integer
      enum:
      - 0
      - 1
      title: FilterLogicalOperator
    GraphExtractionExample:
      properties:
        entities:
          items:
            $ref: '#/components/schemas/EntityExample'
          type: array
          title: Entities
          description: Examples of entities extracted from the example text
        relations:
          items:
            $ref: '#/components/schemas/RelationExample'
          type: array
          title: Relations
          description: Examples of relations extracted from the example text, all
            entities must be included in the entities list
        text:
          type: string
          title: Text
          description: Example text where entities and relations were extracted
      type: object
      required:
      - entities
      - relations
      - text
      title: GraphExtractionExample
    GraphOperation-Input:
      properties:
        entity_defs:
          items:
            $ref: '#/components/schemas/EntityDefinition'
          type: array
          title: Entity Defs
          description: Types of entities that will be considered for extraction
        examples:
          items:
            $ref: '#/components/schemas/GraphExtractionExample'
          type: array
          title: Examples
          description: Examples to be sent to the model as few-shot learning
        ident:
          type: string
          title: ID of Operation, Will be used to tag the extracted entities and relationships
        triggers:
          items:
            $ref: '#/components/schemas/Trigger'
          type: array
          title: Triggers to execute when the operation is executed
      type: object
      required:
      - ident
      title: GraphOperation
    GraphOperation-Output:
      properties:
        entity_defs:
          items:
            $ref: '#/components/schemas/EntityDefinition'
          type: array
          title: Entity Defs
          description: Types of entities that will be considered for extraction
        examples:
          items:
            $ref: '#/components/schemas/GraphExtractionExample'
          type: array
          title: Examples
          description: Examples to be sent to the model as few-shot learning
        ident:
          type: string
          title: ID of Operation, Will be used to tag the extracted entities and relationships
        triggers:
          items:
            $ref: '#/components/schemas/Trigger'
          type: array
          title: Triggers to execute when the operation is executed
      type: object
      required:
      - ident
      title: GraphOperation
    GuardOperation:
      properties:
        enabled:
          type: boolean
          title: Enabled
          default: false
        triggers:
          items:
            $ref: '#/components/schemas/Trigger'
          type: array
          title: Triggers to execute when the operation is executed
      type: object
      title: GuardOperation
    HFLLMKey:
      properties:
        key:
          type: string
          title: Key
          default: ''
        url:
          type: string
          title: Url
          default: ''
        model:
          $ref: '#/components/schemas/ModelType'
          default: 0
      type: object
      title: HFLLMKey
    JobStatus:
      type: string
      enum:
      - not_running
      - finished
      - running
      - started
      - stopped
      - failed
      - terminating
      - starting
      title: JobStatus
    Label:
      properties:
        label:
          type: string
          title: Label Name
        description:
          type: string
          title: Description of the Label
          default: ''
        examples:
          items:
            type: string
          type: array
          title: Examples
      type: object
      required:
      - label
      title: Label
    LabelOperation:
      properties:
        labels:
          items:
            $ref: '#/components/schemas/Label'
          type: array
          title: Labels
        ident:
          type: string
          title: ID of Operation, Will be used to name the generated Label Set
        description:
          type: string
          title: Description of the Operation, will be used to describe to the model
            the task at hand
          default: ''
        multiple:
          type: boolean
          title: Multiple
          default: false
        triggers:
          items:
            $ref: '#/components/schemas/Trigger'
          type: array
          title: Triggers to execute when the operation is executed
      type: object
      required:
      - ident
      title: LabelOperation
    MistralKey:
      properties:
        key:
          type: string
          title: Key
          default: ''
      type: object
      title: MistralKey
    Model:
      type: integer
      enum:
      - 0
      title: Model
    OpenAIKey:
      properties:
        key:
          type: string
          title: Key
          default: ''
        org:
          type: string
          title: Org
          default: ''
      type: object
      title: OpenAIKey
    Operation-Input:
      properties:
        graph:
          anyOf:
          - $ref: '#/components/schemas/GraphOperation-Input'
          - type: 'null'
          title: Graph Config
        label:
          anyOf:
          - $ref: '#/components/schemas/LabelOperation'
          - type: 'null'
          title: Label Config
        ask:
          anyOf:
          - $ref: '#/components/schemas/AskOperation'
          - type: 'null'
          title: Ask Config
        qa:
          anyOf:
          - $ref: '#/components/schemas/QAOperation'
          - type: 'null'
          title: QA Config
        extract:
          anyOf:
          - $ref: '#/components/schemas/ExtractOperation'
          - type: 'null'
          title: Extract Config
        prompt_guard:
          anyOf:
          - $ref: '#/components/schemas/GuardOperation'
          - type: 'null'
          title: Prompt Guard Config
        llama_guard:
          anyOf:
          - $ref: '#/components/schemas/GuardOperation'
          - type: 'null'
          title: Llama Guard Config
      type: object
      title: Operation
      description: 'XXX: Hey developer! If you modify this message, update the `OperationType``
        enum above'
    Operation-Output:
      properties:
        graph:
          anyOf:
          - $ref: '#/components/schemas/GraphOperation-Output'
          - type: 'null'
          title: Graph Config
        label:
          anyOf:
          - $ref: '#/components/schemas/LabelOperation'
          - type: 'null'
          title: Label Config
        ask:
          anyOf:
          - $ref: '#/components/schemas/AskOperation'
          - type: 'null'
          title: Ask Config
        qa:
          anyOf:
          - $ref: '#/components/schemas/QAOperation'
          - type: 'null'
          title: QA Config
        extract:
          anyOf:
          - $ref: '#/components/schemas/ExtractOperation'
          - type: 'null'
          title: Extract Config
        prompt_guard:
          anyOf:
          - $ref: '#/components/schemas/GuardOperation'
          - type: 'null'
          title: Prompt Guard Config
        llama_guard:
          anyOf:
          - $ref: '#/components/schemas/GuardOperation'
          - type: 'null'
          title: Llama Guard Config
      type: object
      title: Operation
      description: 'XXX: Hey developer! If you modify this message, update the `OperationType``
        enum above'
    PalmKey:
      properties:
        credentials:
          type: string
          title: Credentials
        location:
          type: string
          title: Location
          default: ''
      type: object
      required:
      - credentials
      title: PalmKey
    PublicTask:
      properties:
        name:
          type: string
          title: Name
        data_augmentation:
          type: boolean
          title: Data Augmentation
          default: false
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        can_cleanup:
          type: boolean
          title: Can Cleanup
          description: Whether the task supports the cleanup mode at task deletion
            time
          default: false
      type: object
      required:
      - name
      title: PublicTask
    PublicTaskConfig:
      properties:
        task:
          $ref: '#/components/schemas/PublicTask'
        kbid:
          anyOf:
          - type: string
          - type: 'null'
          title: Kbid
        account_id:
          type: string
          title: Account Id
        account_type:
          type: string
          title: Account Type
        nua_client_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Nua Client Id
        user_id:
          type: string
          title: User Id
        parameters:
          anyOf:
          - $ref: '#/components/schemas/DataAugmentation-Output'
          - $ref: '#/components/schemas/SemanticModelMigrationParams'
          - type: 'null'
          title: Parameters
        id:
          type: string
          title: Id
        timestamp:
          type: string
          format: date-time
          title: Timestamp
        defined_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Defined At
        enabled:
          type: boolean
          title: Enabled
      type: object
      required:
      - task
      - account_id
      - account_type
      - user_id
      - id
      - timestamp
      - enabled
      title: PublicTaskConfig
    PublicTaskRequest:
      properties:
        task:
          $ref: '#/components/schemas/PublicTask'
        source:
          $ref: '#/components/schemas/TrainingTaskDatasetSource'
        kbid:
          anyOf:
          - type: string
          - type: 'null'
          title: Kbid
        dataset_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Dataset Id
        account_id:
          type: string
          title: Account Id
        nua_client_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Nua Client Id
        user_id:
          type: string
          title: User Id
        id:
          type: string
          title: Id
        task_config_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Task Config Id
        timestamp:
          type: string
          format: date-time
          title: Timestamp
        scheduled:
          type: boolean
          title: Scheduled
          default: false
        completed:
          type: boolean
          title: Completed
          default: false
        stopped:
          type: boolean
          title: Stopped
          default: false
        scheduled_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Scheduled At
        completed_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Completed At
        stopped_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Stopped At
        failed:
          type: boolean
          title: Failed
          default: false
        retries:
          type: integer
          title: Retries
          default: 0
        parameters:
          anyOf:
          - $ref: '#/components/schemas/DataAugmentation-Output'
          - $ref: '#/components/schemas/SemanticModelMigrationParams'
          - type: 'null'
          title: Parameters
        log:
          anyOf:
          - type: string
          - type: 'null'
          title: Log
        cleanup_parent_task_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Cleanup Parent Task Id
          description: The ID of the task that this cleanup task is cleaning up after.
            This is only set to cleanup tasks.
      type: object
      required:
      - task
      - source
      - account_id
      - user_id
      - id
      - task_config_id
      - timestamp
      title: PublicTaskRequest
    PublicTaskSet:
      properties:
        request:
          anyOf:
          - $ref: '#/components/schemas/PublicTaskRequest'
          - type: 'null'
        config:
          anyOf:
          - $ref: '#/components/schemas/PublicTaskConfig'
          - type: 'null'
      type: object
      title: PublicTaskSet
    QAOperation:
      properties:
        question_generator_prompt:
          type: string
          title: Question Generator Prompt
          default: ''
        system_question_generator_prompt:
          type: string
          title: System Question Generator Prompt
          default: ''
        summary_prompt:
          type: string
          title: Summary Prompt
          default: ''
        generate_answers_prompt:
          type: string
          title: Generate Answers Prompt
          default: ''
        triggers:
          items:
            $ref: '#/components/schemas/Trigger'
          type: array
          title: Triggers to execute when the operation is executed
      type: object
      title: QAOperation
    RelationExample:
      properties:
        source:
          type: string
          title: Source
          description: Entity name from which the relation starts
        target:
          type: string
          title: Target
          description: Entity name to which the relation ends
        label:
          type: string
          title: Label
          description: Type of relation
      type: object
      required:
      - source
      - target
      - label
      title: RelationExample
    SemanticModelMigrationParams:
      properties:
        semantic_model_id:
          type: string
          title: Semantic Model Id
          description: The id of the semantic model to migrate to. This must be a
            valid semantic model id available for the account
        hf_embedding_key:
          anyOf:
          - $ref: '#/components/schemas/workers_api__models__HFEmbeddingKey'
          - type: 'null'
          description: The HuggingFace embedding key to use. This is only required
            if the semantic model is `hf_embedding`
      type: object
      required:
      - semantic_model_id
      title: SemanticModelMigrationParams
    Task-Input:
      type: string
      enum:
      - PARAGRAPH_CLASSIFICATION
      - FIELD_CLASSIFICATION
      - SENTENCE_CLASSIFICATION
      - TOKEN_CLASSIFICATION
      - IMAGE_CLASSIFICATION
      - PARAGRAPH_STREAMING
      - QUESTION_ANSWER_STREAMING
      - FIELD_STREAMING
      title: Task
    Task-Output:
      properties:
        name:
          type: string
          title: Name
        image_repository:
          type: string
          title: Image Repository
          default: europe-west4-docker.pkg.dev/nuclia-internal/nuclia
        image_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Image Name
        image_version:
          type: string
          title: Image Version
          default: latest
        entrypoint:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Entrypoint
        sentry_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Sentry Id
        memory:
          type: string
          title: Memory
          default: 1Gi
        cpu:
          type: string
          title: Cpu
          default: 1000m
        imagePullPolicy:
          type: string
          title: Imagepullpolicy
          default: Always
        use_gpu:
          type: boolean
          title: Use Gpu
          default: false
        trainset_type:
          anyOf:
          - type: integer
          - type: 'null'
          title: Trainset Type
        command:
          items:
            type: string
          type: array
          title: Command
        disallowed_account_types:
          items:
            type: string
          type: array
          title: Disallowed Account Types
          default: []
        model_type:
          title: Model Type
        listing:
          type: boolean
          title: Listing
          default: true
        data_augmentation:
          type: boolean
          title: Data Augmentation
          default: false
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        feedback:
          type: boolean
          title: Feedback
          default: false
        cleanup_command:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Cleanup Command
      type: object
      required:
      - name
      - command
      title: Task
    TaskDefinition:
      properties:
        name:
          $ref: '#/components/schemas/TaskName'
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        validation:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Validation
      type: object
      required:
      - name
      title: TaskDefinition
    TaskEnable:
      properties:
        enabled:
          type: boolean
          title: Enabled
      type: object
      required:
      - enabled
      title: TaskEnable
    TaskList:
      properties:
        tasks:
          items:
            $ref: '#/components/schemas/TaskDefinition'
          type: array
          title: Tasks
        running:
          items:
            $ref: '#/components/schemas/PublicTaskRequest'
          type: array
          title: Running
        configs:
          items:
            $ref: '#/components/schemas/PublicTaskConfig'
          type: array
          title: Configs
        done:
          items:
            $ref: '#/components/schemas/PublicTaskRequest'
          type: array
          title: Done
      type: object
      required:
      - tasks
      - running
      - configs
      - done
      title: TaskList
    TaskName:
      type: string
      enum:
      - dummy
      - env
      - demo-dataset
      - labeler
      - llm-graph
      - synthetic-questions
      - ask
      - llm-align
      - semantic-model-migrator
      - llama-guard
      - prompt-guard
      title: TaskName
    TaskPatch:
      properties:
        parameters:
          anyOf:
          - $ref: '#/components/schemas/DataAugmentation-Input'
          - $ref: '#/components/schemas/SemanticModelMigrationParams'
          - type: 'null'
          title: Parameters
          description: Parameters to be passed to the task. These must match the `validation`
            field for the Task definition class
      additionalProperties: false
      type: object
      required:
      - parameters
      title: TaskPatch
    TaskRequest:
      properties:
        task:
          $ref: '#/components/schemas/Task-Output'
        source:
          $ref: '#/components/schemas/TrainingTaskDatasetSource'
        kbid:
          anyOf:
          - type: string
          - type: 'null'
          title: Kbid
        dataset_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Dataset Id
        dataset_path:
          anyOf:
          - type: string
          - type: 'null'
          title: Dataset Path
        account_id:
          type: string
          title: Account Id
        account_type:
          type: string
          title: Account Type
        nua_client_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Nua Client Id
        user_id:
          type: string
          title: User Id
        parameters:
          anyOf:
          - $ref: '#/components/schemas/DataAugmentation-Output'
          - $ref: '#/components/schemas/SemanticModelMigrationParams'
          - type: 'null'
          title: Parameters
        id:
          type: string
          title: Id
        task_config_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Task Config Id
        timestamp:
          type: string
          format: date-time
          title: Timestamp
        scheduled:
          type: boolean
          title: Scheduled
          default: false
        completed:
          type: boolean
          title: Completed
          default: false
        stopped:
          type: boolean
          title: Stopped
          default: false
        scheduled_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Scheduled At
        completed_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Completed At
        stopped_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Stopped At
        failed:
          type: boolean
          title: Failed
          default: false
        retries:
          type: integer
          title: Retries
          default: 0
        token:
          anyOf:
          - type: string
          - type: 'null'
          title: Token
        key_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Key Id
        ndb_token:
          anyOf:
          - type: string
          - type: 'null'
          title: Ndb Token
        log:
          anyOf:
          - type: string
          - type: 'null'
          title: Log
        cleanup_parent_task_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Cleanup Parent Task Id
          description: The ID of the task that this cleanup task is cleaning up after.
            This is only set to cleanup tasks.
      type: object
      required:
      - task
      - source
      - account_id
      - account_type
      - user_id
      - id
      - timestamp
      title: TaskRequest
    TaskResponse:
      properties:
        name:
          $ref: '#/components/schemas/TaskName'
        status:
          $ref: '#/components/schemas/JobStatus'
        id:
          type: string
          title: Id
      type: object
      required:
      - name
      - status
      - id
      title: TaskResponse
    TaskStart:
      properties:
        name:
          $ref: '#/components/schemas/TaskName'
        parameters:
          anyOf:
          - $ref: '#/components/schemas/DataAugmentation-Input'
          - $ref: '#/components/schemas/SemanticModelMigrationParams'
          - type: 'null'
          title: Parameters
          description: Parameters to be passed to the task. These must match the `validation`
            field for the Task definition class
        uuid_task:
          anyOf:
          - type: string
          - type: 'null'
          title: Uuid Task
          description: UUID of an already configured task. This is used to start a
            task that was already configured
      additionalProperties: false
      type: object
      required:
      - name
      title: TaskStart
    TaskStartKB:
      properties:
        name:
          $ref: '#/components/schemas/TaskName'
        parameters:
          anyOf:
          - $ref: '#/components/schemas/DataAugmentation-Input'
          - $ref: '#/components/schemas/SemanticModelMigrationParams'
          - type: 'null'
          title: Parameters
          description: Parameters to be passed to the task. These must match the `validation`
            field for the Task definition class
        uuid_task:
          anyOf:
          - type: string
          - type: 'null'
          title: Uuid Task
          description: UUID of an already configured task. This is used to start a
            task that was already configured
        apply:
          $ref: '#/components/schemas/ApplyOptions'
          description: "\n    Defines how the tasks should be applied to the existing\
            \ data.\n    - EXSITING: Only apply to existing data (starts a worker\
            \ that executes the task)\n    - NEW: Only apply to new data (enables\
            \ the task at processing time)\n    - ALL: Apply to all data (both of\
            \ the above)\n    "
          default: ALL
        enabled:
          type: boolean
          title: Enabled
          description: Whether the task should be enabled at the time of creation.
            This only applies to tasks involving 'NEW' apply options, as 'EXISTING'
            tasks start immediately
          default: true
      additionalProperties: false
      type: object
      required:
      - name
      title: TaskStartKB
    TrainingTaskDatasetSource:
      type: string
      enum:
      - nucliadb
      - dataset
      title: TrainingTaskDatasetSource
    Trigger:
      properties:
        url:
          type: string
          title: Url
          default: ''
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
        params:
          additionalProperties:
            type: string
          type: object
          title: Params
      type: object
      title: Trigger
    UserLearningKeys-Input:
      properties:
        openai:
          anyOf:
          - $ref: '#/components/schemas/OpenAIKey'
          - type: 'null'
        azure_openai:
          anyOf:
          - $ref: '#/components/schemas/AzureOpenAIKey'
          - type: 'null'
        palm:
          anyOf:
          - $ref: '#/components/schemas/PalmKey'
          - type: 'null'
        anthropic:
          anyOf:
          - $ref: '#/components/schemas/AnthropicKey'
          - type: 'null'
        claude3:
          anyOf:
          - $ref: '#/components/schemas/AnthropicKey'
          - type: 'null'
        text_generation:
          anyOf:
          - $ref: '#/components/schemas/TextGenerationKey'
          - type: 'null'
        mistral:
          anyOf:
          - $ref: '#/components/schemas/MistralKey'
          - type: 'null'
        azure_mistral:
          anyOf:
          - $ref: '#/components/schemas/AzureMistralKey'
          - type: 'null'
        hf_llm:
          anyOf:
          - $ref: '#/components/schemas/HFLLMKey'
          - type: 'null'
        hf_embedding:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__HFEmbeddingKey'
          - type: 'null'
        azure_aii:
          anyOf:
          - $ref: '#/components/schemas/AzureAIIKey'
          - type: 'null'
        openai_compat:
          anyOf:
          - $ref: '#/components/schemas/OpenAICompatModel-Input'
          - type: 'null'
      type: object
      title: UserLearningKeys
    UserLearningKeys-Output:
      properties:
        openai:
          anyOf:
          - $ref: '#/components/schemas/OpenAIKey'
          - type: 'null'
        azure_openai:
          anyOf:
          - $ref: '#/components/schemas/AzureOpenAIKey'
          - type: 'null'
        palm:
          anyOf:
          - $ref: '#/components/schemas/PalmKey'
          - type: 'null'
        anthropic:
          anyOf:
          - $ref: '#/components/schemas/AnthropicKey'
          - type: 'null'
        claude3:
          anyOf:
          - $ref: '#/components/schemas/AnthropicKey'
          - type: 'null'
        text_generation:
          anyOf:
          - $ref: '#/components/schemas/TextGenerationKey'
          - type: 'null'
        mistral:
          anyOf:
          - $ref: '#/components/schemas/MistralKey'
          - type: 'null'
        azure_mistral:
          anyOf:
          - $ref: '#/components/schemas/AzureMistralKey'
          - type: 'null'
        hf_llm:
          anyOf:
          - $ref: '#/components/schemas/HFLLMKey'
          - type: 'null'
        hf_embedding:
          anyOf:
          - $ref: '#/components/schemas/learning_protos__config_p2p__HFEmbeddingKey'
          - type: 'null'
        azure_aii:
          anyOf:
          - $ref: '#/components/schemas/AzureAIIKey'
          - type: 'null'
        openai_compat:
          anyOf:
          - $ref: '#/components/schemas/OpenAICompatModel-Output'
          - type: 'null'
      type: object
      title: UserLearningKeys
    workers_api__models__HFEmbeddingKey:
      properties:
        url:
          type: string
          title: Url
        key:
          type: string
          title: Key
        matryoshka:
          items:
            type: integer
          type: array
          title: Matryoshka
          default: []
        similarity:
          type: string
          title: Similarity
        size:
          type: integer
          title: Size
        threshold:
          type: number
          title: Threshold
        passage_prompt:
          type: string
          title: Passage Prompt
        query_prompt:
          type: string
          title: Query Prompt
      type: object
      required:
      - url
      - key
      - similarity
      - size
      - threshold
      - passage_prompt
      - query_prompt
      title: HFEmbeddingKey
    ClassificationLabel:
      properties:
        label:
          type: string
          title: Label
        labelset:
          type: string
          title: Labelset
      type: object
      required:
      - label
      - labelset
      title: ClassificationLabel
    Format:
      type: integer
      enum:
      - 0
      - 1
      - 2
      - 3
      - 4
      - 5
      - 6
      - 7
      title: Format
    LayoutFormat:
      type: integer
      enum:
      - 0
      title: LayoutFormat
    LearningConfig:
      properties:
        semantic_models:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Semantic Models
        generative_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Generative Model
        ner_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Ner Model
        anonymization_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Anonymization Model
        visual_labeling:
          anyOf:
          - type: string
          - type: 'null'
          title: Visual Labeling
      type: object
      title: LearningConfig
    LinkUpload:
      properties:
        link:
          type: string
          title: Link
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
        cookies:
          additionalProperties:
            type: string
          type: object
          title: Cookies
        localstorage:
          additionalProperties:
            type: string
          type: object
          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
        split_strategy:
          anyOf:
          - type: string
          - type: 'null'
          title: Split Strategy
        classification_labels:
          anyOf:
          - items:
              $ref: '#/components/schemas/ClassificationLabel'
            type: array
          - type: 'null'
          title: Classification Labels
      type: object
      required:
      - link
      - headers
      - cookies
      - localstorage
      title: LinkUpload
    ProcessRequestStatus:
      properties:
        processing_id:
          type: string
          title: Processing Id
        resource_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Resource Id
        kbid:
          anyOf:
          - type: string
          - type: 'null'
          title: Kbid
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        labels:
          items:
            type: string
          type: array
          title: Labels
        completed:
          type: boolean
          title: Completed
        scheduled:
          type: boolean
          title: Scheduled
        timestamp:
          type: string
          format: date-time
          title: Timestamp
        completed_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Completed At
        scheduled_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Scheduled At
        failed:
          type: boolean
          title: Failed
          default: false
        retries:
          type: integer
          title: Retries
          default: 0
        schedule_eta:
          type: number
          title: Schedule Eta
          default: 0.0
        schedule_order:
          type: integer
          title: Schedule Order
          default: 0
        request:
          anyOf:
          - type: string
          - type: 'null'
          title: Request
        response:
          anyOf:
          - type: string
          - type: 'null'
          title: Response
      type: object
      required:
      - processing_id
      - resource_id
      - kbid
      - title
      - labels
      - completed
      - scheduled
      - timestamp
      - completed_at
      - scheduled_at
      title: ProcessRequestStatus
    ProcessRequestStatusResults:
      properties:
        results:
          items:
            $ref: '#/components/schemas/ProcessRequestStatus'
          type: array
          title: Results
        cursor:
          anyOf:
          - type: string
          - type: 'null'
          title: Cursor
      type: object
      required:
      - results
      - cursor
      title: ProcessRequestStatusResults
    ProcessingBlock:
      properties:
        x:
          type: integer
          title: X
        y:
          type: integer
          title: Y
        cols:
          type: integer
          title: Cols
        rows:
          type: integer
          title: Rows
        type:
          $ref: '#/components/schemas/TypeBlock'
        ident:
          type: string
          title: Ident
        payload:
          type: string
          title: Payload
      type: object
      required:
      - x
      - y
      - cols
      - rows
      - type
      - ident
      - payload
      title: ProcessingBlock
    ProcessingConversation:
      properties:
        messages:
          items:
            $ref: '#/components/schemas/ProcessingMessage'
          type: array
          title: Messages
        extract_strategy:
          anyOf:
          - type: string
          - type: 'null'
          title: Extract Strategy
        split_strategy:
          anyOf:
          - type: string
          - type: 'null'
          title: Split Strategy
        classification_labels:
          anyOf:
          - items:
              $ref: '#/components/schemas/ClassificationLabel'
            type: array
          - type: 'null'
          title: Classification Labels
      type: object
      required:
      - messages
      title: ProcessingConversation
    ProcessingLayoutDiff:
      properties:
        format:
          $ref: '#/components/schemas/LayoutFormat'
        blocks:
          additionalProperties:
            $ref: '#/components/schemas/ProcessingBlock'
          type: object
          title: Blocks
      type: object
      required:
      - format
      - blocks
      title: ProcessingLayoutDiff
    ProcessingMessage:
      properties:
        timestamp:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Timestamp
        who:
          anyOf:
          - type: string
          - type: 'null'
          title: Who
        to:
          items:
            type: string
          type: array
          title: To
          default: []
        content:
          $ref: '#/components/schemas/ProcessingMessageContent'
        ident:
          type: string
          title: Ident
      type: object
      required:
      - content
      - ident
      title: ProcessingMessage
    ProcessingMessageContent:
      properties:
        text:
          anyOf:
          - type: string
          - type: 'null'
          title: Text
        format:
          $ref: '#/components/schemas/Format'
      type: object
      required:
      - format
      title: ProcessingMessageContent
    ProcessingQueueType:
      type: string
      enum:
      - shared
      - private
      title: ProcessingQueueType
    PushPayload:
      properties:
        kbid:
          anyOf:
          - type: string
          - type: 'null'
          title: Kbid
        uuid:
          anyOf:
          - type: string
          - type: 'null'
          title: Uuid
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        labels:
          items:
            type: string
          type: array
          title: Labels
          default: []
        slug:
          anyOf:
          - type: string
          - type: 'null'
          title: Slug
        source:
          anyOf:
          - $ref: '#/components/schemas/Source'
          - type: 'null'
        userid:
          anyOf:
          - type: string
          - type: 'null'
          title: Userid
        genericfield:
          additionalProperties:
            $ref: '#/components/schemas/Text'
          type: object
          title: Genericfield
          default: {}
        filefield:
          additionalProperties:
            type: string
          type: object
          title: Filefield
          default: {}
        linkfield:
          additionalProperties:
            $ref: '#/components/schemas/LinkUpload'
          type: object
          title: Linkfield
          default: {}
        textfield:
          additionalProperties:
            $ref: '#/components/schemas/Text'
          type: object
          title: Textfield
          default: {}
        layoutfield:
          additionalProperties:
            $ref: '#/components/schemas/ProcessingLayoutDiff'
          type: object
          title: Layoutfield
          default: {}
        conversationfield:
          additionalProperties:
            $ref: '#/components/schemas/ProcessingConversation'
          type: object
          title: Conversationfield
          default: {}
        processing_options:
          anyOf:
          - $ref: '#/components/schemas/PushProcessingOptions'
          - type: 'null'
        learning_config:
          anyOf:
          - $ref: '#/components/schemas/LearningConfig'
          - type: 'null'
        webhook_config:
          anyOf:
          - $ref: '#/components/schemas/WebhookConfig'
          - type: 'null'
      type: object
      title: PushPayload
    PushProcessingOptions:
      properties:
        ml_text:
          type: boolean
          title: Ml Text
          default: true
        extract_strategy:
          anyOf:
          - type: string
          - type: 'null'
          title: Extract Strategy
        split_strategy:
          anyOf:
          - type: string
          - type: 'null'
          title: Split Strategy
      type: object
      title: PushProcessingOptions
    PushResponse:
      properties:
        seqid:
          anyOf:
          - type: integer
          - type: 'null'
          title: Seqid
        account_seq:
          anyOf:
          - type: integer
          - type: 'null'
          title: Account Seq
        queue:
          anyOf:
          - $ref: '#/components/schemas/ProcessingQueueType'
          - type: 'null'
        uuid:
          anyOf:
          - type: string
          - type: 'null'
          title: Uuid
        processing_id:
          type: string
          title: Processing Id
      type: object
      required:
      - processing_id
      title: PushResponse
    SortFields:
      type: string
      enum:
      - timestamp
      - scheduled_at
      - completed_at
      title: SortFields
    SortOrder:
      type: string
      enum:
      - asc
      - desc
      title: SortOrder
    Source:
      type: integer
      enum:
      - 0
      - 1
      title: Source
    Text:
      properties:
        body:
          type: string
          title: Body
        format:
          $ref: '#/components/schemas/Format'
        extract_strategy:
          anyOf:
          - type: string
          - type: 'null'
          title: Extract Strategy
        split_strategy:
          anyOf:
          - type: string
          - type: 'null'
          title: Split Strategy
        classification_labels:
          anyOf:
          - items:
              $ref: '#/components/schemas/ClassificationLabel'
            type: array
          - type: 'null'
          title: Classification Labels
      type: object
      required:
      - body
      - format
      title: Text
    TypeBlock:
      type: integer
      enum:
      - 0
      - 1
      - 2
      - 3
      - 4
      - 5
      - 6
      title: TypeBlock
    WebhookConfig:
      properties:
        uri:
          anyOf:
          - type: string
          - type: 'null'
          title: Uri
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
          default: {}
      type: object
      title: WebhookConfig
    AdviceConfig:
      properties:
        investment_advice:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Investment Advice
        legal_advice:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Legal Advice
        medical_advice:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Medical Advice
        tax_advice:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Tax Advice
      type: object
      title: AdviceConfig
    AgentID:
      properties:
        id:
          type: string
          title: Id
      type: object
      required:
      - id
      title: AgentID
    AliniaDriverConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: alinia
          title: Provider
        config:
          $ref: '#/components/schemas/AliniaInnerConfig'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: AliniaDriverConfig
    AliniaDriverConfigResponse:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: alinia
          title: Provider
        config:
          $ref: '#/components/schemas/AliniaInnerConfigResponse'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: AliniaDriverConfigResponse
    AliniaInnerConfig:
      properties:
        key:
          type: string
          title: Key
      type: object
      required:
      - key
      title: AliniaInnerConfig
    AliniaInnerConfigResponse:
      properties: {}
      type: object
      title: AliniaInnerConfigResponse
    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
    AskAgentConfig-Input:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: ask
          title: Module
          default: ask
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        fallback:
          anyOf:
          - oneOf:
            - $ref: '#/components/schemas/SQLAgentConfig'
            - $ref: '#/components/schemas/TavilyAgentConfig'
            - $ref: '#/components/schemas/PythonAgentConfig'
            - $ref: '#/components/schemas/PerplexityAgentConfig'
            - $ref: '#/components/schemas/GoogleAgentConfig'
            - $ref: '#/components/schemas/BraveAgentConfig'
            - $ref: '#/components/schemas/CypherAgentConfig'
            - $ref: '#/components/schemas/AskAgentConfig-Input'
            - $ref: '#/components/schemas/BasicAskAgentConfig-Input'
            - $ref: '#/components/schemas/ContextConditionalAgentConfig-Input'
            - $ref: '#/components/schemas/SPARQLAgentConfig'
            - $ref: '#/components/schemas/MCPAgentConfig-Input'
            discriminator:
              propertyName: module
              mapping:
                ask: '#/components/schemas/AskAgentConfig-Input'
                basic_ask: '#/components/schemas/BasicAskAgentConfig-Input'
                brave: '#/components/schemas/BraveAgentConfig'
                context_conditional: '#/components/schemas/ContextConditionalAgentConfig-Input'
                cypher: '#/components/schemas/CypherAgentConfig'
                google: '#/components/schemas/GoogleAgentConfig'
                mcp: '#/components/schemas/MCPAgentConfig-Input'
                perplexity: '#/components/schemas/PerplexityAgentConfig'
                restricted: '#/components/schemas/PythonAgentConfig'
                sparql: '#/components/schemas/SPARQLAgentConfig'
                sql: '#/components/schemas/SQLAgentConfig'
                tavily: '#/components/schemas/TavilyAgentConfig'
          - type: 'null'
          title: Fallback
        pre_queries:
          items:
            type: string
          type: array
          title: Pre Queries
        filters:
          items:
            type: string
          type: array
          title: Filters
        security_groups:
          items:
            type: string
          type: array
          title: Security Groups
        rephrase_semantic_custom_prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Rephrase Semantic Custom Prompt
        rephrase_lexical_custom_prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Rephrase Lexical Custom Prompt
        keywords_custom_prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Keywords Custom Prompt
        visual_enable_prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Visual Enable Prompt
        date_range_enabled:
          type: boolean
          title: Date Range Enabled
          default: false
        before:
          type: integer
          title: Before
          default: 2
        after:
          type: integer
          title: After
          default: 2
        top_k:
          type: integer
          title: Top K
          default: 20
        extra_fields:
          items:
            type: string
          type: array
          title: Extra Fields
          default: []
        full_resource:
          type: boolean
          title: Full Resource
          default: false
        vllm:
          type: boolean
          title: Vllm
          default: true
        query_entities:
          items:
            $ref: '#/components/schemas/KnowledgeGraphEntity'
          type: array
          title: Query Entities
        retrieve_related:
          anyOf:
          - type: string
          - type: 'null'
          title: Retrieve Related
        sources:
          items:
            type: string
          type: array
          title: Sources
        configuration_model:
          type: string
          title: Configuration Model
          default: gemini-2.5-flash
        summarize_model:
          type: string
          title: Summarize Model
          default: chatgpt-o3-mini
        fast_answer:
          type: boolean
          title: Fast Answer
          default: true
        ai_parameter_search:
          type: boolean
          title: Ai Parameter Search
          default: true
      type: object
      title: AskAgentConfig
    AskAgentConfig-Output:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: ask
          title: Module
          default: ask
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        fallback:
          anyOf:
          - oneOf:
            - $ref: '#/components/schemas/SQLAgentConfig'
            - $ref: '#/components/schemas/TavilyAgentConfig'
            - $ref: '#/components/schemas/PythonAgentConfig'
            - $ref: '#/components/schemas/PerplexityAgentConfig'
            - $ref: '#/components/schemas/GoogleAgentConfig'
            - $ref: '#/components/schemas/BraveAgentConfig'
            - $ref: '#/components/schemas/CypherAgentConfig'
            - $ref: '#/components/schemas/AskAgentConfig-Output'
            - $ref: '#/components/schemas/BasicAskAgentConfig-Output'
            - $ref: '#/components/schemas/ContextConditionalAgentConfig-Output'
            - $ref: '#/components/schemas/SPARQLAgentConfig'
            - $ref: '#/components/schemas/MCPAgentConfig-Output'
            discriminator:
              propertyName: module
              mapping:
                ask: '#/components/schemas/AskAgentConfig-Output'
                basic_ask: '#/components/schemas/BasicAskAgentConfig-Output'
                brave: '#/components/schemas/BraveAgentConfig'
                context_conditional: '#/components/schemas/ContextConditionalAgentConfig-Output'
                cypher: '#/components/schemas/CypherAgentConfig'
                google: '#/components/schemas/GoogleAgentConfig'
                mcp: '#/components/schemas/MCPAgentConfig-Output'
                perplexity: '#/components/schemas/PerplexityAgentConfig'
                restricted: '#/components/schemas/PythonAgentConfig'
                sparql: '#/components/schemas/SPARQLAgentConfig'
                sql: '#/components/schemas/SQLAgentConfig'
                tavily: '#/components/schemas/TavilyAgentConfig'
          - type: 'null'
          title: Fallback
        pre_queries:
          items:
            type: string
          type: array
          title: Pre Queries
        filters:
          items:
            type: string
          type: array
          title: Filters
        security_groups:
          items:
            type: string
          type: array
          title: Security Groups
        rephrase_semantic_custom_prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Rephrase Semantic Custom Prompt
        rephrase_lexical_custom_prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Rephrase Lexical Custom Prompt
        keywords_custom_prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Keywords Custom Prompt
        visual_enable_prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Visual Enable Prompt
        date_range_enabled:
          type: boolean
          title: Date Range Enabled
          default: false
        before:
          type: integer
          title: Before
          default: 2
        after:
          type: integer
          title: After
          default: 2
        top_k:
          type: integer
          title: Top K
          default: 20
        extra_fields:
          items:
            type: string
          type: array
          title: Extra Fields
          default: []
        full_resource:
          type: boolean
          title: Full Resource
          default: false
        vllm:
          type: boolean
          title: Vllm
          default: true
        query_entities:
          items:
            $ref: '#/components/schemas/KnowledgeGraphEntity'
          type: array
          title: Query Entities
        retrieve_related:
          anyOf:
          - type: string
          - type: 'null'
          title: Retrieve Related
        sources:
          items:
            type: string
          type: array
          title: Sources
        configuration_model:
          type: string
          title: Configuration Model
          default: gemini-2.5-flash
        summarize_model:
          type: string
          title: Summarize Model
          default: chatgpt-o3-mini
        fast_answer:
          type: boolean
          title: Fast Answer
          default: true
        ai_parameter_search:
          type: boolean
          title: Ai Parameter Search
          default: true
      type: object
      title: AskAgentConfig
    BasicAskAgentConfig-Input:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: basic_ask
          title: Module
          default: basic_ask
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        fallback:
          anyOf:
          - oneOf:
            - $ref: '#/components/schemas/SQLAgentConfig'
            - $ref: '#/components/schemas/TavilyAgentConfig'
            - $ref: '#/components/schemas/PythonAgentConfig'
            - $ref: '#/components/schemas/PerplexityAgentConfig'
            - $ref: '#/components/schemas/GoogleAgentConfig'
            - $ref: '#/components/schemas/BraveAgentConfig'
            - $ref: '#/components/schemas/CypherAgentConfig'
            - $ref: '#/components/schemas/AskAgentConfig-Input'
            - $ref: '#/components/schemas/BasicAskAgentConfig-Input'
            - $ref: '#/components/schemas/ContextConditionalAgentConfig-Input'
            - $ref: '#/components/schemas/SPARQLAgentConfig'
            - $ref: '#/components/schemas/MCPAgentConfig-Input'
            discriminator:
              propertyName: module
              mapping:
                ask: '#/components/schemas/AskAgentConfig-Input'
                basic_ask: '#/components/schemas/BasicAskAgentConfig-Input'
                brave: '#/components/schemas/BraveAgentConfig'
                context_conditional: '#/components/schemas/ContextConditionalAgentConfig-Input'
                cypher: '#/components/schemas/CypherAgentConfig'
                google: '#/components/schemas/GoogleAgentConfig'
                mcp: '#/components/schemas/MCPAgentConfig-Input'
                perplexity: '#/components/schemas/PerplexityAgentConfig'
                restricted: '#/components/schemas/PythonAgentConfig'
                sparql: '#/components/schemas/SPARQLAgentConfig'
                sql: '#/components/schemas/SQLAgentConfig'
                tavily: '#/components/schemas/TavilyAgentConfig'
          - type: 'null'
          title: Fallback
        sources:
          items:
            type: string
          type: array
          title: Sources
        summarize_model:
          type: string
          title: Summarize Model
          default: chatgpt-azure-4o-mini
        generative_model:
          type: string
          title: Generative Model
          default: chatgpt-azure-4o-mini
      type: object
      title: BasicAskAgentConfig
    BasicAskAgentConfig-Output:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: basic_ask
          title: Module
          default: basic_ask
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        fallback:
          anyOf:
          - oneOf:
            - $ref: '#/components/schemas/SQLAgentConfig'
            - $ref: '#/components/schemas/TavilyAgentConfig'
            - $ref: '#/components/schemas/PythonAgentConfig'
            - $ref: '#/components/schemas/PerplexityAgentConfig'
            - $ref: '#/components/schemas/GoogleAgentConfig'
            - $ref: '#/components/schemas/BraveAgentConfig'
            - $ref: '#/components/schemas/CypherAgentConfig'
            - $ref: '#/components/schemas/AskAgentConfig-Output'
            - $ref: '#/components/schemas/BasicAskAgentConfig-Output'
            - $ref: '#/components/schemas/ContextConditionalAgentConfig-Output'
            - $ref: '#/components/schemas/SPARQLAgentConfig'
            - $ref: '#/components/schemas/MCPAgentConfig-Output'
            discriminator:
              propertyName: module
              mapping:
                ask: '#/components/schemas/AskAgentConfig-Output'
                basic_ask: '#/components/schemas/BasicAskAgentConfig-Output'
                brave: '#/components/schemas/BraveAgentConfig'
                context_conditional: '#/components/schemas/ContextConditionalAgentConfig-Output'
                cypher: '#/components/schemas/CypherAgentConfig'
                google: '#/components/schemas/GoogleAgentConfig'
                mcp: '#/components/schemas/MCPAgentConfig-Output'
                perplexity: '#/components/schemas/PerplexityAgentConfig'
                restricted: '#/components/schemas/PythonAgentConfig'
                sparql: '#/components/schemas/SPARQLAgentConfig'
                sql: '#/components/schemas/SQLAgentConfig'
                tavily: '#/components/schemas/TavilyAgentConfig'
          - type: 'null'
          title: Fallback
        sources:
          items:
            type: string
          type: array
          title: Sources
        summarize_model:
          type: string
          title: Summarize Model
          default: chatgpt-azure-4o-mini
        generative_model:
          type: string
          title: Generative Model
          default: chatgpt-azure-4o-mini
      type: object
      title: BasicAskAgentConfig
    BraveAgentConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: brave
          title: Module
          default: brave
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        domain:
          anyOf:
          - type: string
          - type: 'null'
          title: Domain
        country:
          anyOf:
          - type: string
          - type: 'null'
          title: Country
        source:
          type: string
          title: Source
          default: brave
      type: object
      title: BraveAgentConfig
    BraveDriverConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: brave
          title: Provider
        config:
          $ref: '#/components/schemas/BraveInnerConfig'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: BraveDriverConfig
    BraveDriverConfigResponse:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: brave
          title: Provider
        config:
          $ref: '#/components/schemas/BraveInnerConfigResponse'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: BraveDriverConfigResponse
    BraveInnerConfig:
      properties:
        endpoint:
          type: string
          title: Endpoint
          default: web
        key:
          type: string
          title: Key
      type: object
      required:
      - key
      title: BraveInnerConfig
    BraveInnerConfigResponse:
      properties:
        endpoint:
          type: string
          title: Endpoint
          default: web
      type: object
      title: BraveInnerConfigResponse
    Classification:
      properties:
        labelset:
          type: string
          title: Labelset
        label:
          type: string
          title: Label
      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.'
    ContextConditionalAgentConfig-Input:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: context_conditional
          title: Module
          default: context_conditional
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        then:
          items:
            oneOf:
            - $ref: '#/components/schemas/SQLAgentConfig'
            - $ref: '#/components/schemas/TavilyAgentConfig'
            - $ref: '#/components/schemas/PythonAgentConfig'
            - $ref: '#/components/schemas/PerplexityAgentConfig'
            - $ref: '#/components/schemas/GoogleAgentConfig'
            - $ref: '#/components/schemas/BraveAgentConfig'
            - $ref: '#/components/schemas/CypherAgentConfig'
            - $ref: '#/components/schemas/AskAgentConfig-Input'
            - $ref: '#/components/schemas/BasicAskAgentConfig-Input'
            - $ref: '#/components/schemas/ContextConditionalAgentConfig-Input'
            - $ref: '#/components/schemas/SPARQLAgentConfig'
            - $ref: '#/components/schemas/MCPAgentConfig-Input'
            discriminator:
              propertyName: module
              mapping:
                ask: '#/components/schemas/AskAgentConfig-Input'
                basic_ask: '#/components/schemas/BasicAskAgentConfig-Input'
                brave: '#/components/schemas/BraveAgentConfig'
                context_conditional: '#/components/schemas/ContextConditionalAgentConfig-Input'
                cypher: '#/components/schemas/CypherAgentConfig'
                google: '#/components/schemas/GoogleAgentConfig'
                mcp: '#/components/schemas/MCPAgentConfig-Input'
                perplexity: '#/components/schemas/PerplexityAgentConfig'
                restricted: '#/components/schemas/PythonAgentConfig'
                sparql: '#/components/schemas/SPARQLAgentConfig'
                sql: '#/components/schemas/SQLAgentConfig'
                tavily: '#/components/schemas/TavilyAgentConfig'
          type: array
          title: IF agents
          description: List of agents to run in case the condition is  valid
        else_:
          items:
            oneOf:
            - $ref: '#/components/schemas/SQLAgentConfig'
            - $ref: '#/components/schemas/TavilyAgentConfig'
            - $ref: '#/components/schemas/PythonAgentConfig'
            - $ref: '#/components/schemas/PerplexityAgentConfig'
            - $ref: '#/components/schemas/GoogleAgentConfig'
            - $ref: '#/components/schemas/BraveAgentConfig'
            - $ref: '#/components/schemas/CypherAgentConfig'
            - $ref: '#/components/schemas/AskAgentConfig-Input'
            - $ref: '#/components/schemas/BasicAskAgentConfig-Input'
            - $ref: '#/components/schemas/ContextConditionalAgentConfig-Input'
            - $ref: '#/components/schemas/SPARQLAgentConfig'
            - $ref: '#/components/schemas/MCPAgentConfig-Input'
            discriminator:
              propertyName: module
              mapping:
                ask: '#/components/schemas/AskAgentConfig-Input'
                basic_ask: '#/components/schemas/BasicAskAgentConfig-Input'
                brave: '#/components/schemas/BraveAgentConfig'
                context_conditional: '#/components/schemas/ContextConditionalAgentConfig-Input'
                cypher: '#/components/schemas/CypherAgentConfig'
                google: '#/components/schemas/GoogleAgentConfig'
                mcp: '#/components/schemas/MCPAgentConfig-Input'
                perplexity: '#/components/schemas/PerplexityAgentConfig'
                restricted: '#/components/schemas/PythonAgentConfig'
                sparql: '#/components/schemas/SPARQLAgentConfig'
                sql: '#/components/schemas/SQLAgentConfig'
                tavily: '#/components/schemas/TavilyAgentConfig'
          type: array
          title: Else agents
          description: List of agents to run in case the condition is not valid
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Prompt
        has_keywords:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Has Keywords
        similarity:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Similarity
        'on':
          $ref: '#/components/schemas/Source-Input'
          default: QUESTION
        model:
          type: string
          title: Model
          default: chatgpt-o3-mini
      type: object
      title: ContextConditionalAgentConfig
    ContextConditionalAgentConfig-Output:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: context_conditional
          title: Module
          default: context_conditional
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        then:
          items:
            oneOf:
            - $ref: '#/components/schemas/SQLAgentConfig'
            - $ref: '#/components/schemas/TavilyAgentConfig'
            - $ref: '#/components/schemas/PythonAgentConfig'
            - $ref: '#/components/schemas/PerplexityAgentConfig'
            - $ref: '#/components/schemas/GoogleAgentConfig'
            - $ref: '#/components/schemas/BraveAgentConfig'
            - $ref: '#/components/schemas/CypherAgentConfig'
            - $ref: '#/components/schemas/AskAgentConfig-Output'
            - $ref: '#/components/schemas/BasicAskAgentConfig-Output'
            - $ref: '#/components/schemas/ContextConditionalAgentConfig-Output'
            - $ref: '#/components/schemas/SPARQLAgentConfig'
            - $ref: '#/components/schemas/MCPAgentConfig-Output'
            discriminator:
              propertyName: module
              mapping:
                ask: '#/components/schemas/AskAgentConfig-Output'
                basic_ask: '#/components/schemas/BasicAskAgentConfig-Output'
                brave: '#/components/schemas/BraveAgentConfig'
                context_conditional: '#/components/schemas/ContextConditionalAgentConfig-Output'
                cypher: '#/components/schemas/CypherAgentConfig'
                google: '#/components/schemas/GoogleAgentConfig'
                mcp: '#/components/schemas/MCPAgentConfig-Output'
                perplexity: '#/components/schemas/PerplexityAgentConfig'
                restricted: '#/components/schemas/PythonAgentConfig'
                sparql: '#/components/schemas/SPARQLAgentConfig'
                sql: '#/components/schemas/SQLAgentConfig'
                tavily: '#/components/schemas/TavilyAgentConfig'
          type: array
          title: IF agents
          description: List of agents to run in case the condition is  valid
        else_:
          items:
            oneOf:
            - $ref: '#/components/schemas/SQLAgentConfig'
            - $ref: '#/components/schemas/TavilyAgentConfig'
            - $ref: '#/components/schemas/PythonAgentConfig'
            - $ref: '#/components/schemas/PerplexityAgentConfig'
            - $ref: '#/components/schemas/GoogleAgentConfig'
            - $ref: '#/components/schemas/BraveAgentConfig'
            - $ref: '#/components/schemas/CypherAgentConfig'
            - $ref: '#/components/schemas/AskAgentConfig-Output'
            - $ref: '#/components/schemas/BasicAskAgentConfig-Output'
            - $ref: '#/components/schemas/ContextConditionalAgentConfig-Output'
            - $ref: '#/components/schemas/SPARQLAgentConfig'
            - $ref: '#/components/schemas/MCPAgentConfig-Output'
            discriminator:
              propertyName: module
              mapping:
                ask: '#/components/schemas/AskAgentConfig-Output'
                basic_ask: '#/components/schemas/BasicAskAgentConfig-Output'
                brave: '#/components/schemas/BraveAgentConfig'
                context_conditional: '#/components/schemas/ContextConditionalAgentConfig-Output'
                cypher: '#/components/schemas/CypherAgentConfig'
                google: '#/components/schemas/GoogleAgentConfig'
                mcp: '#/components/schemas/MCPAgentConfig-Output'
                perplexity: '#/components/schemas/PerplexityAgentConfig'
                restricted: '#/components/schemas/PythonAgentConfig'
                sparql: '#/components/schemas/SPARQLAgentConfig'
                sql: '#/components/schemas/SQLAgentConfig'
                tavily: '#/components/schemas/TavilyAgentConfig'
          type: array
          title: Else agents
          description: List of agents to run in case the condition is not valid
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Prompt
        has_keywords:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Has Keywords
        similarity:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Similarity
        'on':
          $ref: '#/components/schemas/nuclia_arag_models__agents__conditional__Source'
          default: QUESTION
        model:
          type: string
          title: Model
          default: chatgpt-o3-mini
      type: object
      title: ContextConditionalAgentConfig
    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'
      type: object
      title: ConversationFieldExtractedData
    CustomConfig:
      properties:
        black_list:
          items:
            type: string
          type: array
          title: Black List
        patterns:
          items:
            type: string
          type: array
          title: Patterns
        topics:
          items:
            type: string
          type: array
          title: Topics
      type: object
      title: CustomConfig
    CypherAgentConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: cypher
          title: Module
          default: cypher
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        source:
          type: string
          title: Source
        exclude_types:
          items:
            type: string
          type: array
          title: Exclude Types
        include_types:
          items:
            type: string
          type: array
          title: Include Types
        allow_dangerous_requests:
          type: boolean
          title: Allow Dangerous Requests
          default: true
        top_k:
          type: integer
          title: Top K
          default: 10
        model:
          type: string
          title: Model
          default: gemini-2.5-flash-lite
      type: object
      required:
      - source
      title: CypherAgentConfig
    CypherDriverConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: cypher
          title: Provider
        config:
          $ref: '#/components/schemas/CypherInnerConfig'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: CypherDriverConfig
    CypherDriverConfigResponse:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: cypher
          title: Provider
        config:
          $ref: '#/components/schemas/CypherInnerConfigResponse'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: CypherDriverConfigResponse
    CypherInnerConfig:
      properties:
        username:
          type: string
          title: Username
        url:
          type: string
          title: Url
        timeout:
          anyOf:
          - type: integer
          - type: 'null'
          title: Timeout
        enhanced_schema:
          type: boolean
          title: Enhanced Schema
          default: true
        database:
          anyOf:
          - type: string
          - type: 'null'
          title: Database
        config:
          additionalProperties:
            anyOf:
            - type: string
            - type: number
            - type: 'null'
          type: object
          title: Config
          default: {}
        password:
          type: string
          title: Password
      type: object
      required:
      - username
      - url
      - password
      title: CypherInnerConfig
    CypherInnerConfigResponse:
      properties:
        username:
          type: string
          title: Username
        url:
          type: string
          title: Url
        timeout:
          anyOf:
          - type: integer
          - type: 'null'
          title: Timeout
        enhanced_schema:
          type: boolean
          title: Enhanced Schema
          default: true
        database:
          anyOf:
          - type: string
          - type: 'null'
          title: Database
        config:
          additionalProperties:
            anyOf:
            - type: string
            - type: number
            - type: 'null'
          type: object
          title: Config
          default: {}
      type: object
      required:
      - username
      - url
      title: CypherInnerConfigResponse
    DetectionConfig:
      properties:
        compliance:
          anyOf:
          - $ref: '#/components/schemas/AdviceConfig'
          - type: 'null'
        custom:
          anyOf:
          - $ref: '#/components/schemas/CustomConfig'
          - type: 'null'
        safety:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Safety
        security:
          anyOf:
          - $ref: '#/components/schemas/SecurityConfig'
          - type: 'null'
        sensitive_information:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Sensitive Information
      type: object
      title: DetectionConfig
    DriverConfigResponse:
      properties:
        config:
          oneOf:
          - $ref: '#/components/schemas/BraveDriverConfigResponse'
          - $ref: '#/components/schemas/CypherDriverConfigResponse'
          - $ref: '#/components/schemas/NucliaDBConfigResponse'
          - $ref: '#/components/schemas/PerplexityDriverConfigResponse'
          - $ref: '#/components/schemas/TavilyDriverConfigResponse'
          - $ref: '#/components/schemas/SQLDriverConfigResponse'
          - $ref: '#/components/schemas/GoogleDriverConfigResponse'
          - $ref: '#/components/schemas/MCPStdioDriverConfigResponse'
          - $ref: '#/components/schemas/MCPSSEDriverConfigResponse'
          - $ref: '#/components/schemas/AliniaDriverConfigResponse'
          title: Config
          discriminator:
            propertyName: provider
            mapping:
              alinia: '#/components/schemas/AliniaDriverConfigResponse'
              brave: '#/components/schemas/BraveDriverConfigResponse'
              cypher: '#/components/schemas/CypherDriverConfigResponse'
              google: '#/components/schemas/GoogleDriverConfigResponse'
              mcpsse: '#/components/schemas/MCPSSEDriverConfigResponse'
              mcpstdio: '#/components/schemas/MCPStdioDriverConfigResponse'
              nucliadb: '#/components/schemas/NucliaDBConfigResponse'
              perplexity: '#/components/schemas/PerplexityDriverConfigResponse'
              sql: '#/components/schemas/SQLDriverConfigResponse'
              tavily: '#/components/schemas/TavilyDriverConfigResponse'
      type: object
      required:
      - config
      title: DriverConfigResponse
    DriverID:
      properties:
        id:
          type: string
          title: Id
      type: object
      required:
      - id
      title: DriverID
    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
    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
      type: object
      required:
      - body
      - code
      - code_str
      - created
      title: Error
    ExternalCallAgentConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: external
          title: Module
          default: external
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Extra Prompt
          description: Extra prompt to provide more clues to extract parameters
        method:
          $ref: '#/components/schemas/Method'
          title: Request method
          description: POST, GET and PATCH are supported
          default: POST
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: 'Description of the operation '
          description: Description to help the LLM to extract the parameters
        call_schema:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: 'JSON Schema to compute parameters '
          description: Valid JSON Schema to define the parameters to call the URL
            Its incompatible with call_obj and context
        call_obj:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: 'Object to call the endpoint '
          description: Object that will be used to call the endpoint adding the answer
            and the question to it. Its incompatible with call_schema and context
        headers:
          additionalProperties:
            type: string
          type: object
          title: 'Headers to use on the API call '
          default: {}
        model:
          type: string
          title: Model
          default: chatgpt-azure-4o-mini
        context:
          type: boolean
          title: Use context as payload
          description: Use the context as payload. Its incompatible with call_schema
            and call_obj
          default: false
        url:
          type: string
          title: URL to call
          description: ''
      type: object
      required:
      - url
      title: ExternalCallAgentConfig
    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
    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
    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
      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
    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.
      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/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.
      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'
            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
    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.
      type: object
      title: FieldText
    FieldType:
      type: string
      enum:
      - file
      - link
      - text
      - generic
      - conversation
      title: FieldType
    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'
        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
    GenerateAgentConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: generate
          title: Module
          default: generate
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Prompt
        model:
          type: string
          title: Model
          default: chatgpt-azure-4o-mini
        images:
          type: boolean
          title: Images
          default: false
        generate_image:
          type: boolean
          title: Generate Image
          default: false
      type: object
      title: GenerateAgentConfig
    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
    GoogleAgentConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: google
          title: Module
          default: google
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        gen_model_id:
          type: string
          title: Gen Model Id
          default: gemini-2.5-flash
        source:
          type: string
          title: Source
          default: google
      type: object
      title: GoogleAgentConfig
    GoogleDriverConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: google
          title: Provider
        config:
          $ref: '#/components/schemas/GoogleInnerConfig'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: GoogleDriverConfig
    GoogleDriverConfigResponse:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: google
          title: Provider
        config:
          $ref: '#/components/schemas/GoogleInnerConfigResponse'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: GoogleDriverConfigResponse
    GoogleInnerConfig:
      properties:
        vertexai:
          type: boolean
          title: Vertexai
        project:
          anyOf:
          - type: string
          - type: 'null'
          title: Project
        location:
          anyOf:
          - type: string
          - type: 'null'
          title: Location
        api_key:
          anyOf:
          - type: string
          - type: 'null'
          title: Api Key
        credentials:
          anyOf:
          - type: string
          - type: 'null'
          title: Credentials
      type: object
      required:
      - vertexai
      title: GoogleInnerConfig
    GoogleInnerConfigResponse:
      properties:
        vertexai:
          type: boolean
          title: Vertexai
        project:
          anyOf:
          - type: string
          - type: 'null'
          title: Project
        location:
          anyOf:
          - type: string
          - type: 'null'
          title: Location
      type: object
      required:
      - vertexai
      title: GoogleInnerConfigResponse
    HistoricalAgentConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: historical
          title: Module
          default: historical
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        all:
          type: boolean
          title: All
      type: object
      required:
      - all
      title: HistoricalAgentConfig
    InteractionOperation:
      type: integer
      enum:
      - 0
      - 1
      title: InteractionOperation
    InteractionRequest:
      properties:
        question:
          type: string
          title: Question
        operation:
          $ref: '#/components/schemas/InteractionOperation'
          default: 0
      type: object
      required:
      - question
      title: InteractionRequest
    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
    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: 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'
        link:
          anyOf:
          - $ref: '#/components/schemas/LinkExtractedData'
          - type: 'null'
      type: object
      title: LinkFieldExtractedData
    MCPAgentConfig-Input:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: mcp
          title: Module
          default: mcp
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        transport:
          $ref: '#/components/schemas/Transport'
          title: Proper transport mechanism
          default: SSE
        source:
          type: string
          title: Source
        summarize_model:
          type: string
          title: Summarize Model
          default: gemini-2.5-flash
        tool_choice_model:
          type: string
          title: Tool Choice Model
          default: chatgpt-o3-mini
        fallback:
          anyOf:
          - oneOf:
            - $ref: '#/components/schemas/SQLAgentConfig'
            - $ref: '#/components/schemas/TavilyAgentConfig'
            - $ref: '#/components/schemas/PythonAgentConfig'
            - $ref: '#/components/schemas/PerplexityAgentConfig'
            - $ref: '#/components/schemas/GoogleAgentConfig'
            - $ref: '#/components/schemas/BraveAgentConfig'
            - $ref: '#/components/schemas/CypherAgentConfig'
            - $ref: '#/components/schemas/AskAgentConfig-Input'
            - $ref: '#/components/schemas/BasicAskAgentConfig-Input'
            - $ref: '#/components/schemas/ContextConditionalAgentConfig-Input'
            - $ref: '#/components/schemas/SPARQLAgentConfig'
            - $ref: '#/components/schemas/MCPAgentConfig-Input'
            discriminator:
              propertyName: module
              mapping:
                ask: '#/components/schemas/AskAgentConfig-Input'
                basic_ask: '#/components/schemas/BasicAskAgentConfig-Input'
                brave: '#/components/schemas/BraveAgentConfig'
                context_conditional: '#/components/schemas/ContextConditionalAgentConfig-Input'
                cypher: '#/components/schemas/CypherAgentConfig'
                google: '#/components/schemas/GoogleAgentConfig'
                mcp: '#/components/schemas/MCPAgentConfig-Input'
                perplexity: '#/components/schemas/PerplexityAgentConfig'
                restricted: '#/components/schemas/PythonAgentConfig'
                sparql: '#/components/schemas/SPARQLAgentConfig'
                sql: '#/components/schemas/SQLAgentConfig'
                tavily: '#/components/schemas/TavilyAgentConfig'
          - type: 'null'
          title: Fallback
      type: object
      required:
      - source
      title: MCPAgentConfig
    MCPAgentConfig-Output:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: mcp
          title: Module
          default: mcp
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        transport:
          $ref: '#/components/schemas/Transport'
          title: Proper transport mechanism
          default: SSE
        source:
          type: string
          title: Source
        summarize_model:
          type: string
          title: Summarize Model
          default: gemini-2.5-flash
        tool_choice_model:
          type: string
          title: Tool Choice Model
          default: chatgpt-o3-mini
        fallback:
          anyOf:
          - oneOf:
            - $ref: '#/components/schemas/SQLAgentConfig'
            - $ref: '#/components/schemas/TavilyAgentConfig'
            - $ref: '#/components/schemas/PythonAgentConfig'
            - $ref: '#/components/schemas/PerplexityAgentConfig'
            - $ref: '#/components/schemas/GoogleAgentConfig'
            - $ref: '#/components/schemas/BraveAgentConfig'
            - $ref: '#/components/schemas/CypherAgentConfig'
            - $ref: '#/components/schemas/AskAgentConfig-Output'
            - $ref: '#/components/schemas/BasicAskAgentConfig-Output'
            - $ref: '#/components/schemas/ContextConditionalAgentConfig-Output'
            - $ref: '#/components/schemas/SPARQLAgentConfig'
            - $ref: '#/components/schemas/MCPAgentConfig-Output'
            discriminator:
              propertyName: module
              mapping:
                ask: '#/components/schemas/AskAgentConfig-Output'
                basic_ask: '#/components/schemas/BasicAskAgentConfig-Output'
                brave: '#/components/schemas/BraveAgentConfig'
                context_conditional: '#/components/schemas/ContextConditionalAgentConfig-Output'
                cypher: '#/components/schemas/CypherAgentConfig'
                google: '#/components/schemas/GoogleAgentConfig'
                mcp: '#/components/schemas/MCPAgentConfig-Output'
                perplexity: '#/components/schemas/PerplexityAgentConfig'
                restricted: '#/components/schemas/PythonAgentConfig'
                sparql: '#/components/schemas/SPARQLAgentConfig'
                sql: '#/components/schemas/SQLAgentConfig'
                tavily: '#/components/schemas/TavilyAgentConfig'
          - type: 'null'
          title: Fallback
      type: object
      required:
      - source
      title: MCPAgentConfig
    MCPSSEDriverConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: mcpsse
          title: Provider
        config:
          $ref: '#/components/schemas/MCPSSEInnerConfig'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: MCPSSEDriverConfig
    MCPSSEDriverConfigResponse:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: mcpsse
          title: Provider
        config:
          $ref: '#/components/schemas/MCPSSEInnerConfigResponse'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: MCPSSEDriverConfigResponse
    MCPSSEInnerConfig:
      properties:
        uri:
          type: string
          title: Uri
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
          default: {}
        timeout:
          type: number
          title: Timeout
          default: 5
        sse_read_timeout:
          type: number
          title: Sse Read Timeout
          default: 300
        key:
          anyOf:
          - type: string
          - type: 'null'
          title: Key
      type: object
      required:
      - uri
      title: MCPSSEInnerConfig
    MCPSSEInnerConfigResponse:
      properties:
        uri:
          type: string
          title: Uri
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
          default: {}
        timeout:
          type: number
          title: Timeout
          default: 5
        sse_read_timeout:
          type: number
          title: Sse Read Timeout
          default: 300
      type: object
      required:
      - uri
      title: MCPSSEInnerConfigResponse
    MCPStdioDriverConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        provider:
          type: string
          const: mcpstdio
          title: Provider
        identifier:
          type: string
          title: Identifier
          default: mcpstdio
        name:
          type: string
          title: Name
        config:
          $ref: '#/components/schemas/MCPStdioInnerConfig'
      type: object
      required:
      - provider
      - name
      - config
      title: MCPStdioDriverConfig
    MCPStdioDriverConfigResponse:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        provider:
          type: string
          const: mcpstdio
          title: Provider
        identifier:
          type: string
          title: Identifier
          default: mcpstdio
        name:
          type: string
          title: Name
        config:
          $ref: '#/components/schemas/MCPStdioInnerConfig'
      type: object
      required:
      - provider
      - name
      - config
      title: MCPStdioDriverConfigResponse
    MCPStdioInnerConfig:
      properties:
        server:
          $ref: '#/components/schemas/MCPStdioServer'
        env:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          title: Env
      type: object
      required:
      - server
      title: MCPStdioInnerConfig
    MCPStdioServer:
      type: string
      enum:
      - github
      title: MCPStdioServer
    Metadata-Input:
      properties:
        user_id:
          anyOf:
          - type: string
          - type: integer
          - type: 'null'
          title: User Id
        environment:
          anyOf:
          - type: string
          - type: 'null'
          title: Environment
      type: object
      title: Metadata
    Method:
      type: string
      enum:
      - POST
      - GET
      - PATCH
      title: Method
    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: Page
      type: object
      title: NestedPosition
    NucliaDBConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: nucliadb
          title: Provider
        config:
          $ref: '#/components/schemas/NucliaDBConnection'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: NucliaDBConfig
    NucliaDBConfigResponse:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: nucliadb
          title: Provider
        config:
          $ref: '#/components/schemas/NucliaDBConnectionResponse'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: NucliaDBConfigResponse
    NucliaDBConnection:
      properties:
        url:
          type: string
          title: Url
        manager:
          type: string
          title: Manager
        filters:
          items:
            type: string
          type: array
          title: Filters
          default: []
        description:
          type: string
          title: Description
        kbid:
          type: string
          title: Kbid
        key:
          anyOf:
          - type: string
          - type: 'null'
          title: Key
      type: object
      required:
      - url
      - manager
      - description
      - kbid
      title: NucliaDBConnection
    NucliaDBConnectionResponse:
      properties:
        url:
          type: string
          title: Url
        manager:
          type: string
          title: Manager
        filters:
          items:
            type: string
          type: array
          title: Filters
          default: []
        description:
          type: string
          title: Description
        kbid:
          type: string
          title: Kbid
      type: object
      required:
      - url
      - manager
      - description
      - kbid
      title: NucliaDBConnectionResponse
    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
          title: Collaborators
          default: []
        filename:
          anyOf:
          - type: string
          - type: 'null'
          title: Filename
        related:
          items:
            type: string
          type: array
          title: Related
          default: []
        path:
          anyOf:
          - type: string
          - 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}'
        source:
          anyOf:
          - $ref: '#/components/schemas/nucliadb_models__metadata__Origin__Source'
          - type: 'null'
          default: API
      type: object
      title: Origin
    PageInformation:
      properties:
        page:
          anyOf:
          - type: integer
          - type: 'null'
          title: 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
    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
    PerplexityAgentConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: perplexity
          title: Module
          default: perplexity
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        domain:
          items:
            type: string
          type: array
          title: Domain
          default: []
        top_k:
          type: integer
          title: Top K
          default: 0
        related_questions:
          type: boolean
          title: Related Questions
          default: false
        images:
          type: boolean
          title: Images
          default: false
        source:
          type: string
          title: Source
          default: perplexity
      type: object
      title: PerplexityAgentConfig
    PerplexityDriverConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: perplexity
          title: Provider
        config:
          $ref: '#/components/schemas/PerplexityInnerConfig'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: PerplexityDriverConfig
    PerplexityDriverConfigResponse:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: perplexity
          title: Provider
        config:
          $ref: '#/components/schemas/PerplexityInnerConfigResponse'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: PerplexityDriverConfigResponse
    PerplexityInnerConfig:
      properties:
        key:
          type: string
          title: Key
      type: object
      required:
      - key
      title: PerplexityInnerConfig
    PerplexityInnerConfigResponse:
      properties: {}
      type: object
      title: PerplexityInnerConfigResponse
    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
    PostprocessAliniaAgentConfig-Input:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: postprocess_alinia
          title: Module
          default: postprocess_alinia
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        preconfig:
          $ref: '#/components/schemas/PostprocessGuardrail'
          default: CUSTOM
        detection_config:
          anyOf:
          - $ref: '#/components/schemas/DetectionConfig'
          - type: 'null'
        metadata:
          anyOf:
          - $ref: '#/components/schemas/Metadata-Input'
          - type: 'null'
      type: object
      title: PostprocessAliniaAgentConfig
    PostprocessAliniaAgentConfig-Output:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: postprocess_alinia
          title: Module
          default: postprocess_alinia
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        preconfig:
          $ref: '#/components/schemas/PostprocessGuardrail'
          default: CUSTOM
        detection_config:
          anyOf:
          - $ref: '#/components/schemas/DetectionConfig'
          - type: 'null'
        metadata:
          anyOf:
          - $ref: '#/components/schemas/nuclia_arag_models__drivers__alinia__Metadata'
          - type: 'null'
      type: object
      title: PostprocessAliniaAgentConfig
    PostprocessConditionalAgentConfig-Input:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: post_conditional
          title: Module
          default: post_conditional
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        then:
          items:
            oneOf:
            - $ref: '#/components/schemas/RestartAgentConfig'
            - $ref: '#/components/schemas/RemiAgentConfig-Input'
            - $ref: '#/components/schemas/ExternalCallAgentConfig'
            - $ref: '#/components/schemas/PostprocessConditionalAgentConfig-Input'
            - $ref: '#/components/schemas/PostprocessAliniaAgentConfig-Input'
            discriminator:
              propertyName: module
              mapping:
                external: '#/components/schemas/ExternalCallAgentConfig'
                post_conditional: '#/components/schemas/PostprocessConditionalAgentConfig-Input'
                postprocess_alinia: '#/components/schemas/PostprocessAliniaAgentConfig-Input'
                remi: '#/components/schemas/RemiAgentConfig-Input'
                restart: '#/components/schemas/RestartAgentConfig'
          type: array
          title: IF agents
          description: List of agents to run in case the condition is  valid
        else_:
          items:
            oneOf:
            - $ref: '#/components/schemas/RestartAgentConfig'
            - $ref: '#/components/schemas/RemiAgentConfig-Input'
            - $ref: '#/components/schemas/ExternalCallAgentConfig'
            - $ref: '#/components/schemas/PostprocessConditionalAgentConfig-Input'
            - $ref: '#/components/schemas/PostprocessAliniaAgentConfig-Input'
            discriminator:
              propertyName: module
              mapping:
                external: '#/components/schemas/ExternalCallAgentConfig'
                post_conditional: '#/components/schemas/PostprocessConditionalAgentConfig-Input'
                postprocess_alinia: '#/components/schemas/PostprocessAliniaAgentConfig-Input'
                remi: '#/components/schemas/RemiAgentConfig-Input'
                restart: '#/components/schemas/RestartAgentConfig'
          type: array
          title: Else agents
          description: List of agents to run in case the condition is not valid
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Prompt
        has_keywords:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Has Keywords
        similarity:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Similarity
        'on':
          $ref: '#/components/schemas/Source-Input'
          default: QUESTION
        model:
          type: string
          title: Model
          default: chatgpt-o3-mini
      type: object
      title: PostprocessConditionalAgentConfig
    PostprocessConditionalAgentConfig-Output:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: post_conditional
          title: Module
          default: post_conditional
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        then:
          items:
            oneOf:
            - $ref: '#/components/schemas/RestartAgentConfig'
            - $ref: '#/components/schemas/RemiAgentConfig-Output'
            - $ref: '#/components/schemas/ExternalCallAgentConfig'
            - $ref: '#/components/schemas/PostprocessConditionalAgentConfig-Output'
            - $ref: '#/components/schemas/PostprocessAliniaAgentConfig-Output'
            discriminator:
              propertyName: module
              mapping:
                external: '#/components/schemas/ExternalCallAgentConfig'
                post_conditional: '#/components/schemas/PostprocessConditionalAgentConfig-Output'
                postprocess_alinia: '#/components/schemas/PostprocessAliniaAgentConfig-Output'
                remi: '#/components/schemas/RemiAgentConfig-Output'
                restart: '#/components/schemas/RestartAgentConfig'
          type: array
          title: IF agents
          description: List of agents to run in case the condition is  valid
        else_:
          items:
            oneOf:
            - $ref: '#/components/schemas/RestartAgentConfig'
            - $ref: '#/components/schemas/RemiAgentConfig-Output'
            - $ref: '#/components/schemas/ExternalCallAgentConfig'
            - $ref: '#/components/schemas/PostprocessConditionalAgentConfig-Output'
            - $ref: '#/components/schemas/PostprocessAliniaAgentConfig-Output'
            discriminator:
              propertyName: module
              mapping:
                external: '#/components/schemas/ExternalCallAgentConfig'
                post_conditional: '#/components/schemas/PostprocessConditionalAgentConfig-Output'
                postprocess_alinia: '#/components/schemas/PostprocessAliniaAgentConfig-Output'
                remi: '#/components/schemas/RemiAgentConfig-Output'
                restart: '#/components/schemas/RestartAgentConfig'
          type: array
          title: Else agents
          description: List of agents to run in case the condition is not valid
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Prompt
        has_keywords:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Has Keywords
        similarity:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Similarity
        'on':
          $ref: '#/components/schemas/nuclia_arag_models__agents__conditional__Source'
          default: QUESTION
        model:
          type: string
          title: Model
          default: chatgpt-o3-mini
      type: object
      title: PostprocessConditionalAgentConfig
    PostprocessGuardrail:
      type: string
      enum:
      - INAPPROPRIATE
      - COMPLIANCE
      - FINANCIAL_COMPLIANT
      - CUSTOM
      title: PostprocessGuardrail
    PreprocessAliniaAgentConfig-Input:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: preprocess_alinia
          title: Module
          default: preprocess_alinia
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        preconfig:
          $ref: '#/components/schemas/PreprocessGuardrail'
          default: CUSTOM
        detection_config:
          anyOf:
          - $ref: '#/components/schemas/DetectionConfig'
          - type: 'null'
        metadata:
          anyOf:
          - $ref: '#/components/schemas/Metadata-Input'
          - type: 'null'
      type: object
      title: PreprocessAliniaAgentConfig
    PreprocessAliniaAgentConfig-Output:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: preprocess_alinia
          title: Module
          default: preprocess_alinia
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        preconfig:
          $ref: '#/components/schemas/PreprocessGuardrail'
          default: CUSTOM
        detection_config:
          anyOf:
          - $ref: '#/components/schemas/DetectionConfig'
          - type: 'null'
        metadata:
          anyOf:
          - $ref: '#/components/schemas/nuclia_arag_models__drivers__alinia__Metadata'
          - type: 'null'
      type: object
      title: PreprocessAliniaAgentConfig
    PreprocessConditionalAgentConfig-Input:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: pre_conditional
          title: Module
          default: pre_conditional
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        then:
          items:
            oneOf:
            - $ref: '#/components/schemas/HistoricalAgentConfig'
            - $ref: '#/components/schemas/RephraseAgentConfig'
            - $ref: '#/components/schemas/PreprocessConditionalAgentConfig-Input'
            - $ref: '#/components/schemas/PreprocessAliniaAgentConfig-Input'
            discriminator:
              propertyName: module
              mapping:
                historical: '#/components/schemas/HistoricalAgentConfig'
                pre_conditional: '#/components/schemas/PreprocessConditionalAgentConfig-Input'
                preprocess_alinia: '#/components/schemas/PreprocessAliniaAgentConfig-Input'
                rephrase: '#/components/schemas/RephraseAgentConfig'
          type: array
          title: IF agents
          description: List of agents to run in case the condition is  valid
        else_:
          items:
            oneOf:
            - $ref: '#/components/schemas/HistoricalAgentConfig'
            - $ref: '#/components/schemas/RephraseAgentConfig'
            - $ref: '#/components/schemas/PreprocessConditionalAgentConfig-Input'
            - $ref: '#/components/schemas/PreprocessAliniaAgentConfig-Input'
            discriminator:
              propertyName: module
              mapping:
                historical: '#/components/schemas/HistoricalAgentConfig'
                pre_conditional: '#/components/schemas/PreprocessConditionalAgentConfig-Input'
                preprocess_alinia: '#/components/schemas/PreprocessAliniaAgentConfig-Input'
                rephrase: '#/components/schemas/RephraseAgentConfig'
          type: array
          title: Else agents
          description: List of agents to run in case the condition is not valid
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Prompt
        has_keywords:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Has Keywords
        similarity:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Similarity
        'on':
          $ref: '#/components/schemas/Source-Input'
          default: QUESTION
        model:
          type: string
          title: Model
          default: chatgpt-o3-mini
      type: object
      title: PreprocessConditionalAgentConfig
    PreprocessConditionalAgentConfig-Output:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: pre_conditional
          title: Module
          default: pre_conditional
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        then:
          items:
            oneOf:
            - $ref: '#/components/schemas/HistoricalAgentConfig'
            - $ref: '#/components/schemas/RephraseAgentConfig'
            - $ref: '#/components/schemas/PreprocessConditionalAgentConfig-Output'
            - $ref: '#/components/schemas/PreprocessAliniaAgentConfig-Output'
            discriminator:
              propertyName: module
              mapping:
                historical: '#/components/schemas/HistoricalAgentConfig'
                pre_conditional: '#/components/schemas/PreprocessConditionalAgentConfig-Output'
                preprocess_alinia: '#/components/schemas/PreprocessAliniaAgentConfig-Output'
                rephrase: '#/components/schemas/RephraseAgentConfig'
          type: array
          title: IF agents
          description: List of agents to run in case the condition is  valid
        else_:
          items:
            oneOf:
            - $ref: '#/components/schemas/HistoricalAgentConfig'
            - $ref: '#/components/schemas/RephraseAgentConfig'
            - $ref: '#/components/schemas/PreprocessConditionalAgentConfig-Output'
            - $ref: '#/components/schemas/PreprocessAliniaAgentConfig-Output'
            discriminator:
              propertyName: module
              mapping:
                historical: '#/components/schemas/HistoricalAgentConfig'
                pre_conditional: '#/components/schemas/PreprocessConditionalAgentConfig-Output'
                preprocess_alinia: '#/components/schemas/PreprocessAliniaAgentConfig-Output'
                rephrase: '#/components/schemas/RephraseAgentConfig'
          type: array
          title: Else agents
          description: List of agents to run in case the condition is not valid
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Prompt
        has_keywords:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Has Keywords
        similarity:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Similarity
        'on':
          $ref: '#/components/schemas/nuclia_arag_models__agents__conditional__Source'
          default: QUESTION
        model:
          type: string
          title: Model
          default: chatgpt-o3-mini
      type: object
      title: PreprocessConditionalAgentConfig
    PreprocessGuardrail:
      type: string
      enum:
      - INAPPROPRIATE
      - CUSTOM
      title: PreprocessGuardrail
    PythonAgentConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: restricted
          title: Module
          default: restricted
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        code:
          type: string
          title: Code
      type: object
      required:
      - code
      title: PythonAgentConfig
    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
    Relation:
      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
    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
    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
    RelationType:
      type: string
      enum:
      - ABOUT
      - CHILD
      - COLAB
      - ENTITY
      - OTHER
      - SYNONYM
      title: RelationType
    RemiAgentConfig-Input:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: remi
          title: Module
          default: remi
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        then:
          items:
            oneOf:
            - $ref: '#/components/schemas/RestartAgentConfig'
            - $ref: '#/components/schemas/RemiAgentConfig-Input'
            - $ref: '#/components/schemas/ExternalCallAgentConfig'
            - $ref: '#/components/schemas/PostprocessConditionalAgentConfig-Input'
            - $ref: '#/components/schemas/PostprocessAliniaAgentConfig-Input'
            discriminator:
              propertyName: module
              mapping:
                external: '#/components/schemas/ExternalCallAgentConfig'
                post_conditional: '#/components/schemas/PostprocessConditionalAgentConfig-Input'
                postprocess_alinia: '#/components/schemas/PostprocessAliniaAgentConfig-Input'
                remi: '#/components/schemas/RemiAgentConfig-Input'
                restart: '#/components/schemas/RestartAgentConfig'
          type: array
          title: If validation is ok
          description: List of post process agents to run if its a good validation
        else_:
          items:
            oneOf:
            - $ref: '#/components/schemas/RestartAgentConfig'
            - $ref: '#/components/schemas/RemiAgentConfig-Input'
            - $ref: '#/components/schemas/ExternalCallAgentConfig'
            - $ref: '#/components/schemas/PostprocessConditionalAgentConfig-Input'
            - $ref: '#/components/schemas/PostprocessAliniaAgentConfig-Input'
            discriminator:
              propertyName: module
              mapping:
                external: '#/components/schemas/ExternalCallAgentConfig'
                post_conditional: '#/components/schemas/PostprocessConditionalAgentConfig-Input'
                postprocess_alinia: '#/components/schemas/PostprocessAliniaAgentConfig-Input'
                remi: '#/components/schemas/RemiAgentConfig-Input'
                restart: '#/components/schemas/RestartAgentConfig'
          type: array
          title: If validation is not ok
          description: List of post process agents to run if its a bad validation
      type: object
      title: RemiAgentConfig
    RemiAgentConfig-Output:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: remi
          title: Module
          default: remi
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        then:
          items:
            oneOf:
            - $ref: '#/components/schemas/RestartAgentConfig'
            - $ref: '#/components/schemas/RemiAgentConfig-Output'
            - $ref: '#/components/schemas/ExternalCallAgentConfig'
            - $ref: '#/components/schemas/PostprocessConditionalAgentConfig-Output'
            - $ref: '#/components/schemas/PostprocessAliniaAgentConfig-Output'
            discriminator:
              propertyName: module
              mapping:
                external: '#/components/schemas/ExternalCallAgentConfig'
                post_conditional: '#/components/schemas/PostprocessConditionalAgentConfig-Output'
                postprocess_alinia: '#/components/schemas/PostprocessAliniaAgentConfig-Output'
                remi: '#/components/schemas/RemiAgentConfig-Output'
                restart: '#/components/schemas/RestartAgentConfig'
          type: array
          title: If validation is ok
          description: List of post process agents to run if its a good validation
        else_:
          items:
            oneOf:
            - $ref: '#/components/schemas/RestartAgentConfig'
            - $ref: '#/components/schemas/RemiAgentConfig-Output'
            - $ref: '#/components/schemas/ExternalCallAgentConfig'
            - $ref: '#/components/schemas/PostprocessConditionalAgentConfig-Output'
            - $ref: '#/components/schemas/PostprocessAliniaAgentConfig-Output'
            discriminator:
              propertyName: module
              mapping:
                external: '#/components/schemas/ExternalCallAgentConfig'
                post_conditional: '#/components/schemas/PostprocessConditionalAgentConfig-Output'
                postprocess_alinia: '#/components/schemas/PostprocessAliniaAgentConfig-Output'
                remi: '#/components/schemas/RemiAgentConfig-Output'
                restart: '#/components/schemas/RestartAgentConfig'
          type: array
          title: If validation is not ok
          description: List of post process agents to run if its a bad validation
      type: object
      title: RemiAgentConfig
    RephraseAgentConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: rephrase
          title: Module
          default: rephrase
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        kb:
          anyOf:
          - type: string
          - type: 'null'
          title: Kb
        rids:
          items:
            type: string
          type: array
          title: Rids
        labels:
          items:
            type: string
          type: array
          title: Labels
        synonyms:
          type: boolean
          title: Synonyms
          default: true
        extend:
          type: boolean
          title: Extend
          default: true
        session_info:
          type: boolean
          title: Session Info
          default: false
        history:
          type: boolean
          title: History
          default: false
        model:
          type: string
          title: Model
          default: gemini-2.5-flash-lite
        split_question:
          type: boolean
          title: Split Question
          default: false
      type: object
      title: RephraseAgentConfig
    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
    Resource:
      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/nucliadb_models__metadata__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'
            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
      type: object
      required:
      - id
      title: Resource
    ResourceCreated:
      properties:
        uuid:
          type: string
          title: Uuid
        elapsed:
          anyOf:
          - type: number
          - type: 'null'
          title: Elapsed
        seqid:
          anyOf:
          - type: integer
          - type: 'null'
          title: Seqid
      type: object
      required:
      - uuid
      title: ResourceCreated
    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
      type: object
      title: ResourceData
    ResourceList:
      properties:
        resources:
          items:
            $ref: '#/components/schemas/Resource'
          type: array
          title: Resources
        pagination:
          $ref: '#/components/schemas/ResourcePagination'
      type: object
      required:
      - resources
      - pagination
      title: ResourceList
    ResourcePagination:
      properties:
        page:
          type: integer
          title: Page
        size:
          type: integer
          title: Size
        last:
          type: boolean
          title: Last
      type: object
      required:
      - page
      - size
      - last
      title: ResourcePagination
    ResourceProcessingStatus:
      type: string
      enum:
      - PENDING
      - PROCESSED
      - ERROR
      - EMPTY
      - BLOCKED
      - EXPIRED
      title: ResourceProcessingStatus
    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
    RestartAgentConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: restart
          title: Module
          default: restart
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        prompt:
          type: string
          title: Prompt
        model:
          type: string
          title: Model
        retries:
          type: integer
          title: Retries
          default: 2
      type: object
      required:
      - prompt
      - model
      title: RestartAgentConfig
    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
    Rule:
      properties:
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Prompt
      type: object
      title: Rule
    Rules:
      properties:
        rules:
          items:
            anyOf:
            - $ref: '#/components/schemas/Rule'
            - type: string
          type: array
          title: Rules
      type: object
      required:
      - rules
      title: Rules
    SPARQLAgentConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: sparql
          title: Module
          default: sparql
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
      type: object
      title: SPARQLAgentConfig
    SQLAgentConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: sql
          title: Module
          default: sql
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        source:
          type: string
          title: Source
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        sqlschema:
          anyOf:
          - type: string
          - type: 'null'
          title: Sqlschema
        retries:
          type: integer
          title: Retries
          default: 3
        ignore_tables:
          items:
            type: string
          type: array
          title: Ignore Tables
          default: []
        include_tables:
          items:
            type: string
          type: array
          title: Include Tables
          default: []
        sample_rows_in_table_info:
          type: integer
          title: Sample Rows In Table Info
          default: 3
        indexes_in_table_info:
          type: boolean
          title: Indexes In Table Info
          default: false
        custom_table_info:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Custom Table Info
        view_support:
          type: boolean
          title: View Support
          default: false
        max_string_length:
          type: integer
          title: Max String Length
          default: 300
        lazy_table_reflection:
          type: boolean
          title: Lazy Table Reflection
          default: false
        conversion_model:
          type: string
          title: Conversion Model
          default: chatgpt4o
        summarize_model:
          type: string
          title: Summarize Model
          default: chatgpt-o3-mini
      type: object
      required:
      - source
      title: SQLAgentConfig
    SQLDriverConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: sql
          title: Provider
        config:
          $ref: '#/components/schemas/SQLInnerConfig'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: SQLDriverConfig
    SQLDriverConfigResponse:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: sql
          title: Provider
        config:
          $ref: '#/components/schemas/SQLInnerConfigResponse'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: SQLDriverConfigResponse
    SQLInnerConfig:
      properties:
        sql_schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Sql Schema
        dsn:
          type: string
          title: Dsn
      type: object
      required:
      - dsn
      title: SQLInnerConfig
    SQLInnerConfigResponse:
      properties:
        sql_schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Sql Schema
      type: object
      title: SQLInnerConfigResponse
    SecurityConfig:
      properties:
        adversarial:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Adversarial
        gibberish:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Gibberish
        under_trained_tokens:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Under Trained Tokens
      type: object
      title: SecurityConfig
    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
    SessionData:
      properties:
        slug:
          type: string
          title: Slug
        name:
          type: string
          title: Name
        summary:
          type: string
          title: Summary
        data:
          type: string
          title: Data
        format:
          $ref: '#/components/schemas/TextFormat'
      type: object
      required:
      - slug
      - name
      - summary
      - data
      - format
      title: SessionData
    Sheet:
      properties:
        rows:
          anyOf:
          - items:
              $ref: '#/components/schemas/Row'
            type: array
          - type: 'null'
          title: Rows
      type: object
      title: Sheet
    Source-Input:
      type: string
      enum:
      - QUESTION
      - ANSWER
      - CONTEXT
      title: Source
    SummarizeAgentConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: summarize
          title: Module
          default: summarize
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Prompt
        model:
          type: string
          title: Model
          default: chatgpt-azure-4o-mini
        images:
          type: boolean
          title: Images
          default: false
        conversational:
          type: boolean
          title: Conversational
          default: false
      type: object
      title: SummarizeAgentConfig
    TavilyAgentConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        module:
          type: string
          const: tavily
          title: Module
          default: tavily
        title:
          type: string
          title: Title
          default: agent
        rules:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Rules
        domains:
          items:
            type: string
          type: array
          title: Domains
        source:
          type: string
          title: Source
          default: tavily
      type: object
      title: TavilyAgentConfig
    TavilyDriverConfig:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: tavily
          title: Provider
        config:
          $ref: '#/components/schemas/TavilyInnerConfig'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: TavilyDriverConfig
    TavilyDriverConfigResponse:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        identifier:
          type: string
          title: Identifier
        name:
          type: string
          title: Name
        provider:
          type: string
          const: tavily
          title: Provider
        config:
          $ref: '#/components/schemas/TavilyInnerConfigResponse'
      type: object
      required:
      - identifier
      - name
      - provider
      - config
      title: TavilyDriverConfigResponse
    TavilyInnerConfig:
      properties:
        key:
          type: string
          title: Key
      type: object
      required:
      - key
      title: TavilyInnerConfig
    TavilyInnerConfigResponse:
      properties: {}
      type: object
      title: TavilyInnerConfigResponse
    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'
      type: object
      title: TextFieldExtractedData
    TextFormat:
      type: string
      enum:
      - PLAIN
      - HTML
      - RST
      - MARKDOWN
      - JSON
      - KEEP_MARKDOWN
      - JSONL
      - PLAIN_BLANKLINE_SPLIT
      title: TextFormat
    Transport:
      type: string
      enum:
      - SSE
      - STDIO
      title: Transport
    TypeParagraph:
      type: string
      enum:
      - TEXT
      - OCR
      - INCEPTION
      - DESCRIPTION
      - TRANSCRIPT
      - TITLE
      - TABLE
      title: TypeParagraph
    UserClassification:
      properties:
        labelset:
          type: string
          title: Labelset
        label:
          type: string
          title: Label
        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'
          type: array
          title: Relations
          default: []
      type: object
      title: UserMetadata
    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
    nuclia_arag_models__agents__conditional__Source:
      type: string
      enum:
      - QUESTION
      - ANSWER
      - CONTEXT
      title: Source
    nuclia_arag_models__drivers__alinia__Metadata:
      properties:
        user_id:
          anyOf:
          - type: string
          - type: integer
          - type: 'null'
          title: User Id
        environment:
          anyOf:
          - type: string
          - type: 'null'
          title: Environment
      type: object
      title: Metadata
    nucliadb_models__metadata__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
    nucliadb_models__metadata__Origin__Source:
      type: string
      enum:
      - WEB
      - DESKTOP
      - API
      - PYSDK
      title: Source
    AccountTypes:
      type: string
      enum:
      - stash-trial
      - stash-starter
      - stash-growth
      - stash-startup
      - stash-enterprise
      - stash-developer
      - stash-business
      - v3starter
      - v3fly
      - v3growth
      - v3enterprise
      title: AccountTypes
    AnswerRelevance:
      properties:
        score:
          type: integer
          title: The score of the answer relevance
        reason:
          type: string
          title: The reasoning for the score
      type: object
      required:
      - score
      - reason
      title: AnswerRelevance
    Author:
      type: string
      enum:
      - NUCLIA
      - USER
      title: Author
    ChatModel:
      properties:
        question:
          type: string
          title: Question
        retrieval:
          type: boolean
          title: Retrieval
          default: true
        user_id:
          type: string
          title: User Id
        system:
          anyOf:
          - type: string
          - type: 'null'
          title: System
        chat_history:
          items:
            $ref: '#/components/schemas/Message'
          type: array
          title: Chat History
          default: []
        context:
          items:
            $ref: '#/components/schemas/Message'
          type: array
          title: Context
          default: []
        query_context:
          anyOf:
          - items:
              type: string
            type: array
          - additionalProperties:
              type: string
            type: object
          title: Query Context
          default: {}
        query_context_order:
          additionalProperties:
            type: integer
          type: object
          title: Query Context Order
          default: {}
        truncate:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Truncate
          default: true
        user_prompt:
          anyOf:
          - $ref: '#/components/schemas/UserPrompt'
          - type: 'null'
        citations:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Citations
          default: false
        citation_threshold:
          anyOf:
          - type: number
            maximum: 1.0
            minimum: 0.0
          - type: 'null'
          title: Citation Threshold
          description: If citations is set to True, 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.
        generative_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Generative Model
        max_tokens:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Tokens
        query_context_images:
          anyOf:
          - items:
              $ref: '#/components/schemas/Image'
            type: array
          - additionalProperties:
              $ref: '#/components/schemas/Image'
            type: object
          title: Query Context Images
          default: {}
        prefer_markdown:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Prefer Markdown
        json_schema:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Json Schema
        format_prompt:
          type: boolean
          title: Format Prompt
          default: true
        rerank_context:
          type: boolean
          title: Rerank Context
          description: Whether to reorder the query context based on a reranker. This
            option will also make it so the first response will contain the scores
            given for each context piece.
          default: false
        tools:
          items:
            $ref: '#/components/schemas/Tool'
          type: array
          title: Tools
          description: List of tools to choose
        seed:
          anyOf:
          - type: integer
          - type: 'null'
          title: Seed
          description: Seed use for the generative model for a deterministic output.
        reasoning:
          anyOf:
          - $ref: '#/components/schemas/Reasoning'
          - type: boolean
          title: Reasoning
          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:
      - question
      - user_id
      title: ChatModel
    ConsumptionResponse:
      properties:
        normalized_tokens:
          $ref: '#/components/schemas/TokensDetail'
        customer_key_tokens:
          $ref: '#/components/schemas/TokensDetail'
      type: object
      required:
      - normalized_tokens
      - customer_key_tokens
      title: ConsumptionResponse
    Image:
      properties:
        content_type:
          type: string
          title: Content Type
        b64encoded:
          type: string
          title: B64Encoded
      type: object
      required:
      - content_type
      - b64encoded
      title: Image
    Message:
      properties:
        author:
          $ref: '#/components/schemas/Author'
        text:
          type: string
          title: Text
      type: object
      required:
      - author
      - text
      title: Message
    Ner:
      properties:
        text:
          type: string
          title: Text
        ner:
          type: string
          title: Ner
        start:
          type: integer
          title: Start
        end:
          type: integer
          title: End
      type: object
      required:
      - text
      - ner
      - start
      - end
      title: Ner
    QueryInfo:
      properties:
        language:
          type: string
          title: Language
        stop_words:
          items:
            type: string
          type: array
          title: Stop Words
        semantic_threshold:
          type: number
          title: Semantic Threshold
          deprecated: true
        semantic_thresholds:
          additionalProperties:
            type: number
          type: object
          title: Semantic Thresholds
          description: Semantic threshold for each semantic model
        visual_llm:
          type: boolean
          title: Visual Llm
        max_context:
          type: integer
          title: Max Context
        entities:
          anyOf:
          - $ref: '#/components/schemas/TokenSearch'
          - type: 'null'
        sentence:
          anyOf:
          - $ref: '#/components/schemas/SentenceSearch'
          - type: 'null'
        query:
          anyOf:
          - type: string
          - type: 'null'
          title: Query
        rephrased_query:
          anyOf:
          - type: string
          - type: 'null'
          title: Rephrased Query
          default: ''
      type: object
      required:
      - language
      - stop_words
      - semantic_threshold
      - semantic_thresholds
      - visual_llm
      - max_context
      - entities
      - sentence
      - query
      title: QueryInfo
    QueryModel:
      properties:
        text:
          anyOf:
          - type: string
          - type: 'null'
          title: Text
          description: The query text to be processed
        query_image:
          anyOf:
          - $ref: '#/components/schemas/Image'
          - type: 'null'
          description: Image to be considered as part of the query.  Even if the `rephrase`
            parameter is set to `false`, the rephrasing process will occur, combining
            the provided text with the image's visual features in the rephrased query.
        rephrase:
          type: boolean
          title: Rephrase
          description: If true, the model will rephrase the input text before processing
          default: false
        rephrase_prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Rephrase Prompt
          description: Custom prompt for rephrasing the input text
          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, if in the image there
            are any machinery components with numeric identifiers, append them to
            the end of the question separated by a commas.

            QUESTION: {question}

            Please return ONLY the question without any explanation.'
        generative_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Generative Model
          description: The generative model to use for rephrasing
        semantic_models:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Semantic Models
          description: Semantic models to compute the sentence vector for, if not
            provided, it will only compute the sentence vector for default semantic
            model in the Knowledge box's configuration.
        agentic_entities:
          type: boolean
          title: Agentic Entities
          description: If true, the model will return the entities detected in the
            sentence guided by an already defined Graph Extraction Agent in the Knowledge
            Box.
          default: false
      type: object
      title: QueryModel
      description: Model to represent a query request
    QueryModelAccount:
      properties:
        text:
          anyOf:
          - type: string
          - type: 'null'
          title: Text
          description: The query text to be processed
        query_image:
          anyOf:
          - $ref: '#/components/schemas/Image'
          - type: 'null'
          description: Image to be considered as part of the query.  Even if the `rephrase`
            parameter is set to `false`, the rephrasing process will occur, combining
            the provided text with the image's visual features in the rephrased query.
        rephrase:
          type: boolean
          title: Rephrase
          description: If true, the model will rephrase the input text before processing
          default: false
        rephrase_prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Rephrase Prompt
          description: Custom prompt for rephrasing the input text
          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, if in the image there
            are any machinery components with numeric identifiers, append them to
            the end of the question separated by a commas.

            QUESTION: {question}

            Please return ONLY the question without any explanation.'
        generative_model:
          type: string
          title: Generative Model
          description: The generative model to use for rephrasing.
          default: chatgpt-azure-4o
        semantic_models:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Semantic Models
          description: Semantic models to compute the sentence vector for, if not
            provided, it will only compute the sentence vector for default semantic
            model in the Knowledge box's configuration.
        agentic_entities:
          type: boolean
          title: Agentic Entities
          description: If true, the model will return the entities detected in the
            sentence guided by an already defined Graph Extraction Agent in the Knowledge
            Box.
          default: false
        token_model:
          type: string
          title: Token Model
          description: The NER model to use for extracting entities from the input
            text.
          default: multilingual
        semantic_model:
          type: string
          title: Semantic Model
          description: Semantic model to compute the sentence vector for.
          default: multilingual-2024-05-06
      type: object
      title: QueryModelAccount
      description: Model to represent a query request without a defined KB
    Reasoning:
      properties:
        display:
          type: boolean
          title: Display
          description: Whether to display the reasoning steps in the response.
          default: true
        effort:
          type: string
          enum:
          - low
          - medium
          - high
          title: Effort
          description: Level of reasoning effort. Used by OpenAI models to control
            the depth of reasoning. This parameter will be automatically mapped to
            budget_tokens if the chosen model does not support effort.
          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. This parameter will
            be automatically mapped to effort if the chosen model does not support
            budget_tokens.
          default: 15000
      type: object
      title: Reasoning
    RemiRequest:
      properties:
        user_id:
          type: string
          title: The user ID of the user making the request
        question:
          anyOf:
          - type: string
          - type: 'null'
          title: The question or query that the user asked
        answer:
          anyOf:
          - type: string
          - type: 'null'
          title: The answer that the model provided
        contexts:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: The contexts that the model used to generate the answer
      type: object
      required:
      - user_id
      title: RemiRequest
      description: 'Model to represent a request for the REMi model


        Metrics will be computed accordingly to the inputs given


        - Answer relevance will be computed if `answer` and `question` are provided

        - Context relevance will be computed if `question` and `contexts` are provided

        - Groundedness will be computed if `answer` and `contexts` are provided'
    RemiResponse:
      properties:
        time:
          type: number
          title: The time taken to compute the response
        answer_relevance:
          anyOf:
          - $ref: '#/components/schemas/AnswerRelevance'
          - type: 'null'
          title: The relevance score of the answer to the question.
          description: Answer Relevance measures the relevance of the generated answer
            to the user query,             in a scale of 0 to 5.
        context_relevance:
          anyOf:
          - items:
              anyOf:
              - type: integer
              - type: 'null'
            type: array
          - type: 'null'
          title: The relevance score of each context to the question.
          description: Context Relevance measures the relevance of the retrieved context
            to the user query,         in a scale of 0 to 5. The score will be None
            if there was an error computing the score for a specific         context.
        groundedness:
          anyOf:
          - items:
              anyOf:
              - type: integer
              - type: 'null'
            type: array
          - type: 'null'
          title: The groundedness score of the answer on each context.
          description: Groundedness measures the degree to which the generated answer
            is grounded in the         retrieved context, in a scale of 0 to 5.         The
            score will be None if there was an error computing the score for a specific
            context.
        consumption:
          anyOf:
          - $ref: '#/components/schemas/ConsumptionResponse'
          - type: 'null'
          title: The consumption details for the REMi model run
      type: object
      required:
      - time
      title: RemiResponse
    RephraseModel:
      properties:
        question:
          type: string
          title: Question
        chat_history:
          items:
            $ref: '#/components/schemas/Message'
          type: array
          title: Chat History
        context:
          items:
            $ref: '#/components/schemas/Message'
          type: array
          title: Context
        user_context:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Context
        user_id:
          type: string
          title: User Id
        generative_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Generative model
          description: The generative model to use for the rephrase endpoint. If not
            provided, the model configured for the Knowledge Box is used.
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Prompt
          description: Prompt to send the model to rephrase the sentence, if not provided,
            the default prompt will be used. It must include the {question} placeholder.
            The placeholder will be replaced with the original question. It will only
            be used if no user_context is provided.
          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 commas.

            QUESTION: {question}

            Please return ONLY the question without any explanation.'
          - 'Keeping the following context in mind,

            <context>

            {context}

            </context>

            Rephrase my question taking into account our previous conversation to
            transform it into standalone question that is suited for retrieval.

            QUESTION: "{question}"

            Return only the rephrased question without any explanation or formatting.'
        chat_history_relevance_threshold:
          anyOf:
          - type: number
            maximum: 1.0
            minimum: 0.0
            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 \u2013 Always treat previous messages\
              \ as irrelevant (never rephrase).Values in between adjust the sensitivity."
          - type: 'null'
          title: Chat History Relevance Threshold
      type: object
      required:
      - question
      - user_id
      title: RephraseModel
    RerankModel:
      properties:
        question:
          type: string
          title: Question
        user_id:
          type: string
          title: User Id
        context:
          additionalProperties:
            type: string
          type: object
          title: Context
          default: {}
      type: object
      required:
      - question
      - user_id
      title: RerankModel
    RerankResponse:
      properties:
        context_scores:
          additionalProperties:
            type: number
          type: object
          title: Context Scores
          description: Scores for each context given by the reranker
        consumption:
          anyOf:
          - $ref: '#/components/schemas/ConsumptionResponse'
          - type: 'null'
          description: Consumption details for the rerank operation
      type: object
      required:
      - context_scores
      title: RerankResponse
    SentenceSearch:
      properties:
        data:
          items:
            type: number
          type: array
          title: Data
          deprecated: true
        vectors:
          additionalProperties:
            items:
              type: number
            type: array
          type: object
          title: Vectors
          description: Sentence vectors for each semantic model
        time:
          type: number
          title: Time
          deprecated: true
        timings:
          additionalProperties:
            type: number
          type: object
          title: Timings
          description: Time taken to compute the sentence vector for each semantic
            model
        consumption:
          anyOf:
          - $ref: '#/components/schemas/ConsumptionResponse'
          - type: 'null'
          description: Consumption details for the sentence operation
      type: object
      required:
      - vectors
      - time
      - timings
      title: SentenceSearch
    SummarizeModel:
      properties:
        resources:
          additionalProperties:
            $ref: '#/components/schemas/SummarizeResource'
          type: object
          title: Resources
        summary_kind:
          $ref: '#/components/schemas/SummaryKind'
          default: simple
        user_prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: User Prompt
          default: ''
        generative_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Generative Model
      type: object
      required:
      - resources
      title: SummarizeModel
    SummarizeResource:
      properties:
        fields:
          additionalProperties:
            type: string
          type: object
          title: Fields
      type: object
      required:
      - fields
      title: SummarizeResource
    SummarizedModelWithConsumption:
      properties:
        resources:
          additionalProperties:
            $ref: '#/components/schemas/SummarizedResource'
          type: object
          title: Resources
        summary:
          type: string
          title: Summary
          default: ''
        consumption:
          anyOf:
          - $ref: '#/components/schemas/ConsumptionResponse'
          - type: 'null'
      type: object
      required:
      - resources
      title: SummarizedModelWithConsumption
    SummarizedResource:
      properties:
        summary:
          type: string
          title: Summary
        tokens:
          type: integer
          title: Tokens
        input_tokens:
          type: integer
          title: Input Tokens
        output_tokens:
          type: integer
          title: Output Tokens
      type: object
      required:
      - summary
      - tokens
      - input_tokens
      - output_tokens
      title: SummarizedResource
    SummaryKind:
      type: string
      enum:
      - simple
      - extended
      title: SummaryKind
    TokenSearch:
      properties:
        tokens:
          items:
            $ref: '#/components/schemas/Ner'
          type: array
          title: Tokens
          default: []
        time:
          type: number
          title: Time
        input_tokens:
          type: integer
          title: Input Tokens
          default: 0
          deprecated: true
        consumption:
          anyOf:
          - $ref: '#/components/schemas/ConsumptionResponse'
          - type: 'null'
      type: object
      required:
      - time
      title: TokenSearch
    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
    Tool:
      properties:
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        parameters:
          additionalProperties: true
          type: object
          title: Parameters
          description: Schema of the tool
      type: object
      required:
      - name
      - description
      title: Tool
    UserPrompt:
      properties:
        prompt:
          type: string
          title: Prompt
      type: object
      required:
      - prompt
      title: UserPrompt
