Collections

Updates collection settings.

Recreates entire settings on the collection.

put/collections/{collection_id}/settings

Request

Path parameters

collection_idstring required

Id of the collection

Request body

max_tokens_per_chunkinteger

Approximate max. number of tokens per chunk for text-dominated document pages. For images, chunks can be larger.

chunk_overlap_tokensinteger

Approximate number of tokens that are overlapping between successive chunks.

gen_doc_summariesboolean

Whether to auto-generate document summaries (uses LLM)

gen_doc_questionsboolean

Whether to auto-generate sample questions for each document (uses LLM)

audio_input_languagestring

Language of audio files. Defaults to "auto" language detection. Pass empty string to see choices.

ocr_modelstring

Which method to use to extract text from images using AI-enabled optical character recognition (OCR) models. Pass empty string to see choices. docTR is best for Latin text, PaddleOCR is best for certain non-Latin languages, Tesseract covers a wide range of languages. Mississippi works well on handwriting. auto - Automatic will auto-select the best OCR model for every page. off - Disable OCR for speed, but all images will then be skipped (also no image captions will be made).

tesseract_langstring

Which language to use when using ocr_model="tesseract". Pass empty string to see choices.

keep_tables_as_one_chunkboolean

When tables are identified by the table parser the table tokens will be kept in a single chunk.

chunk_by_pageboolean

Each page will be a chunk. keep_tables_as_one_chunk will be ignored if this is true.

handwriting_checkboolean

Check pages for handwriting. Will use specialized models if handwriting is found.

ingest_mode'standard' | 'lite' | 'agent_only'

Default document ingestion mode for uploads.

follow_linksboolean

Whether to import all web pages linked from this URL will be imported. External links will be ignored. Links to other pages on the same domain will be followed as long as they are at the same level or below the URL you specify. Each page will be transformed into a PDF document.

max_depthinteger

Max depth of recursion when following links, only when follow_links is true. Max_depth of 0 means don't follow any links, max_depth of 1 means follow only top-level links, etc. Use -1 for automatic (system settings).

max_documentsinteger

Max number of documents when following links, only when follow_links is true. Use None for automatic (system defaults). Use -1 for max (system limit).

root_dirstring

Root directory for document storage

copy_documentboolean

Whether to copy the document when importing an existing document

expiry_timezonestring

IANA timezone (e.g. "America/New_York") used to render the collection's expiry date/time. The stored expiry is an absolute instant (UTC); this only controls how that instant is displayed when the expiry is set or reopened.

Example request

{
  "max_tokens_per_chunk": 320,
  "guardrails_settings": {
    "disallowed_regex_patterns": [
      "secret_disallowed_word",
      "(?!0{3})(?!6{3})[0-8]\\d{2}-(?!0{2})\\d{2}-(?!0{4})\\d{4}"
    ],
    "presidio_labels_to_flag": [
      "IBAN_CODE",
      "US_SSN"
    ],
    "pii_labels_to_flag": [
      "IBAN",
      "SSN"
    ],
    "prompt_guard_labels_to_flag": [
      "JAILBREAK"
    ],
    "guardrails_labels_to_flag": [
      "Violent Crimes",
      "Non-Violent Crimes",
      "Intellectual Property",
      "Code Interpreter Abuse"
    ],
    "guardrails_llm": "h2oai/h2o-danube3-4b-chat",
    "guardrails_safe_category": "Safe",
    "column_redaction_custom_entities_to_flag": [
      "Mother's Maiden Name"
    ],
    "column_redaction_custom_entities": {
      "Mother's Maiden Name": "Mother's maiden name"
    },
    "custom_pii_entities_to_flag": [
      "Mother's Maiden Name"
    ],
    "custom_pii_entities": {
      "Mother's Maiden Name": "Mother's maiden name"
    }
  }
}

Response

Successful operation

Changes

No recorded changes to this operation across all 1 revision of this API.