{
  "$defs": {
    "CorpusConfig": {
      "additionalProperties": false,
      "properties": {
        "additional_excluded_link_prefixes": {
          "items": {
            "type": "string"
          },
          "title": "Additional Excluded Link Prefixes",
          "type": "array"
        },
        "article_limit": {
          "anyOf": [
            {
              "exclusiveMinimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Article Limit"
        },
        "cleaning_mode": {
          "default": "structured",
          "enum": [
            "structured",
            "legacy"
          ],
          "title": "Cleaning Mode",
          "type": "string"
        },
        "excluded_paragraph_prefixes": {
          "items": {
            "type": "string"
          },
          "title": "Excluded Paragraph Prefixes",
          "type": "array"
        },
        "excluded_title_suffixes": {
          "items": {
            "type": "string"
          },
          "title": "Excluded Title Suffixes",
          "type": "array"
        },
        "max_pages": {
          "anyOf": [
            {
              "exclusiveMinimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Max Pages"
        },
        "max_paragraph_chars": {
          "default": 900,
          "exclusiveMinimum": 0,
          "title": "Max Paragraph Chars",
          "type": "integer"
        },
        "max_paragraphs": {
          "default": 8,
          "exclusiveMinimum": 0,
          "title": "Max Paragraphs",
          "type": "integer"
        },
        "min_paragraph_chars": {
          "default": 150,
          "exclusiveMinimum": 0,
          "title": "Min Paragraph Chars",
          "type": "integer"
        },
        "min_paragraphs": {
          "default": 4,
          "exclusiveMinimum": 0,
          "title": "Min Paragraphs",
          "type": "integer"
        }
      },
      "title": "CorpusConfig",
      "type": "object"
    },
    "DumpConfig": {
      "additionalProperties": false,
      "properties": {
        "dump_id": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Dump Id"
        },
        "language": {
          "minLength": 2,
          "title": "Language",
          "type": "string"
        },
        "path": {
          "format": "path",
          "title": "Path",
          "type": "string"
        }
      },
      "required": [
        "path",
        "language"
      ],
      "title": "DumpConfig",
      "type": "object"
    },
    "EmbeddingProviderConfig": {
      "additionalProperties": false,
      "properties": {
        "batch_size": {
          "default": 128,
          "exclusiveMinimum": 0,
          "title": "Batch Size",
          "type": "integer"
        },
        "local_files_only": {
          "default": false,
          "title": "Local Files Only",
          "type": "boolean"
        },
        "model": {
          "default": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2",
          "minLength": 1,
          "title": "Model",
          "type": "string"
        },
        "provider": {
          "default": "sentence_transformers",
          "minLength": 1,
          "title": "Provider",
          "type": "string"
        }
      },
      "title": "EmbeddingProviderConfig",
      "type": "object"
    },
    "InspectionConfig": {
      "additionalProperties": false,
      "properties": {
        "pilot_articles": {
          "default": 100,
          "exclusiveMinimum": 0,
          "title": "Pilot Articles",
          "type": "integer"
        },
        "pilot_max_pages": {
          "default": 10000,
          "exclusiveMinimum": 0,
          "title": "Pilot Max Pages",
          "type": "integer"
        },
        "sample_pages": {
          "default": 10000,
          "exclusiveMinimum": 0,
          "title": "Sample Pages",
          "type": "integer"
        }
      },
      "title": "InspectionConfig",
      "type": "object"
    },
    "KnowledgeBaseConfig": {
      "additionalProperties": false,
      "properties": {
        "cache_path": {
          "anyOf": [
            {
              "format": "path",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Cache Path"
        },
        "max_retries": {
          "default": 3,
          "minimum": 0,
          "title": "Max Retries",
          "type": "integer"
        },
        "ner_label_priority": {
          "items": {
            "type": "string"
          },
          "title": "Ner Label Priority",
          "type": "array"
        },
        "ner_labels": {
          "items": {
            "type": "string"
          },
          "title": "Ner Labels",
          "type": "array"
        },
        "ner_ontology_by_label": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "title": "Ner Ontology By Label",
          "type": "object"
        },
        "offline": {
          "default": false,
          "title": "Offline",
          "type": "boolean"
        },
        "ontology_batch_size": {
          "default": 10,
          "exclusiveMinimum": 0,
          "title": "Ontology Batch Size",
          "type": "integer"
        },
        "provider": {
          "default": "wikidata",
          "minLength": 1,
          "title": "Provider",
          "type": "string"
        },
        "request_delay_seconds": {
          "default": 0.25,
          "maximum": 60,
          "minimum": 0,
          "title": "Request Delay Seconds",
          "type": "number"
        },
        "timeout_seconds": {
          "default": 60,
          "exclusiveMinimum": 0,
          "title": "Timeout Seconds",
          "type": "integer"
        },
        "title_batch_size": {
          "default": 50,
          "exclusiveMinimum": 0,
          "maximum": 50,
          "title": "Title Batch Size",
          "type": "integer"
        },
        "user_agent": {
          "default": "hermes-benchmark/0.0.6 (https://github.com/sasalya98/hermes-benchmark)",
          "minLength": 1,
          "title": "User Agent",
          "type": "string"
        }
      },
      "title": "KnowledgeBaseConfig",
      "type": "object"
    },
    "LLMProviderConfig": {
      "additionalProperties": false,
      "properties": {
        "api_key": {
          "anyOf": [
            {
              "format": "password",
              "type": "string",
              "writeOnly": true
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Api Key"
        },
        "api_key_file": {
          "anyOf": [
            {
              "format": "path",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Api Key File"
        },
        "api_version": {
          "default": "v1",
          "minLength": 1,
          "title": "Api Version",
          "type": "string"
        },
        "batch_size": {
          "default": 5,
          "exclusiveMinimum": 0,
          "title": "Batch Size",
          "type": "integer"
        },
        "cache_path": {
          "anyOf": [
            {
              "format": "path",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Cache Path"
        },
        "location": {
          "default": "us-central1",
          "minLength": 1,
          "title": "Location",
          "type": "string"
        },
        "max_output_tokens": {
          "default": 8192,
          "exclusiveMinimum": 0,
          "title": "Max Output Tokens",
          "type": "integer"
        },
        "max_retries": {
          "default": 5,
          "exclusiveMinimum": 0,
          "title": "Max Retries",
          "type": "integer"
        },
        "model": {
          "minLength": 1,
          "title": "Model",
          "type": "string"
        },
        "project": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Project"
        },
        "provider": {
          "minLength": 1,
          "title": "Provider",
          "type": "string"
        },
        "temperature": {
          "default": 0,
          "maximum": 2,
          "minimum": 0,
          "title": "Temperature",
          "type": "number"
        },
        "timeout_seconds": {
          "default": 240,
          "exclusiveMinimum": 0,
          "title": "Timeout Seconds",
          "type": "integer"
        }
      },
      "required": [
        "provider",
        "model"
      ],
      "title": "LLMProviderConfig",
      "type": "object"
    },
    "ServicesConfig": {
      "additionalProperties": false,
      "properties": {
        "embeddings": {
          "anyOf": [
            {
              "$ref": "#/$defs/EmbeddingProviderConfig"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "knowledge_base": {
          "anyOf": [
            {
              "$ref": "#/$defs/KnowledgeBaseConfig"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "llm": {
          "anyOf": [
            {
              "$ref": "#/$defs/LLMProviderConfig"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "title": "ServicesConfig",
      "type": "object"
    },
    "TaskConfig": {
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "default": true,
          "title": "Enabled",
          "type": "boolean"
        },
        "options": {
          "additionalProperties": true,
          "title": "Options",
          "type": "object"
        },
        "target": {
          "default": 100,
          "exclusiveMinimum": 0,
          "title": "Target",
          "type": "integer"
        }
      },
      "title": "TaskConfig",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "corpus": {
      "$ref": "#/$defs/CorpusConfig"
    },
    "dump": {
      "$ref": "#/$defs/DumpConfig"
    },
    "inspection": {
      "$ref": "#/$defs/InspectionConfig"
    },
    "output_dir": {
      "format": "path",
      "title": "Output Dir",
      "type": "string"
    },
    "seed": {
      "default": 42,
      "title": "Seed",
      "type": "integer"
    },
    "services": {
      "$ref": "#/$defs/ServicesConfig"
    },
    "tasks": {
      "additionalProperties": {
        "$ref": "#/$defs/TaskConfig"
      },
      "minProperties": 1,
      "title": "Tasks",
      "type": "object"
    }
  },
  "required": [
    "dump",
    "output_dir",
    "tasks"
  ],
  "title": "GenerationConfig",
  "type": "object"
}
