Collections
Create a Collection
A Collection refers to a group of related Documents. A Collection lets a user aggregate documents in one location. A user can utilize Collections to group particular sets of material (documents) to explore individually through Chats utilizing a large language model (LLM).
post/collections
Request
- Base URLhttps://h2ogpte.genai.h2o.ai/api/v1
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"name": "My sci-fi library",
"description": "Collection of my favourite sci-fi books",
"embedding_model": "BAAI/bge-large-en-v1.5",
"collection_settings": {
"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"
}
}
},
"expiry_date": "2024-12-31 23:59:59+00:00",
"vex_encryption": "enabled"
}Response
Successful operation
Example response
{
"id": "123e4567-e89b-12d3-a456-426655440000",
"name": "My sci-fi library",
"description": "Collection of my favourite sci-fi books",
"embedding_model": "BAAI/bge-large-en-v1.5",
"prompt_template_id": "4e400991-c459-455f-995c-dc6f55ffdb90"
}Changes
No recorded changes to this operation across all 1 revision of this API.