# CollectionsApi Method | HTTP request | Description ------------- | ------------- | ------------- [**archive_collection**](CollectionsApi.md#archive-collection) | **POST** /collections/{collection-id}/archive | Archives a collection along with its associated data.| **POST** /collections/{collection_id}/archive | Archives a collection along with its associated data. [**create_collection**](CollectionsApi.md#create-collection) | **POST** /collections | Create a Collection| **POST** /collections | Create a Collection [**create_delete_collection_job**](CollectionsApi.md#create-delete-collection-job) | **POST** /collections/delete-job | Creates a job to delete collections.| **POST** /collections/delete_job | Creates a job to delete collections. [**create_delete_collection_thumbnail_job**](CollectionsApi.md#create-delete-collection-thumbnail-job) | **DELETE** /collections/{collection-id}/thumbnail/job | Creates a job to delete collection thumbnail.| **DELETE** /collections/{collection_id}/thumbnail/job | Creates a job to delete collection thumbnail. [**create_delete_document_from_collection_job**](CollectionsApi.md#create-delete-document-from-collection-job) | **POST** /collections/{collection-id}/documents/delete-job | Creates job to remove documents from the collection.| **POST** /collections/{collection_id}/documents/delete_job | Creates job to remove documents from the collection. [**create_import_collection_to_collection_job**](CollectionsApi.md#create-import-collection-to-collection-job) | **POST** /collections/{collection-id}/import-collection-job | Creates job to import collection to the collection.| **POST** /collections/{collection_id}/import_collection_job | Creates job to import collection to the collection. [**create_insert_document_to_collection_job**](CollectionsApi.md#create-insert-document-to-collection-job) | **POST** /collections/{collection-id}/documents/insert-job | Creates job to insert document to the collection.| **POST** /collections/{collection_id}/documents/insert_job | Creates job to insert document to the collection. [**create_update_collection_thumbnail_job**](CollectionsApi.md#create-update-collection-thumbnail-job) | **PUT** /collections/{collection-id}/thumbnail/job | Creates a job to update collection thumbnail.| **PUT** /collections/{collection_id}/thumbnail/job | Creates a job to update collection thumbnail. [**delete_collection**](CollectionsApi.md#delete-collection) | **DELETE** /collections/{collection-id} | Deletes collection.| **DELETE** /collections/{collection_id} | Deletes collection. [**delete_collection_expiry_date**](CollectionsApi.md#delete-collection-expiry-date) | **DELETE** /collections/{collection-id}/expiry-date | Removes an expiry date from a collection.| **DELETE** /collections/{collection_id}/expiry_date | Removes an expiry date from a collection. [**delete_collection_inactivity_interval**](CollectionsApi.md#delete-collection-inactivity-interval) | **DELETE** /collections/{collection-id}/inactivity-interval | Removes an inactivity interval from the collection.| **DELETE** /collections/{collection_id}/inactivity_interval | Removes an inactivity interval from the collection. [**delete_collection_prompt_template**](CollectionsApi.md#delete-collection-prompt-template) | **DELETE** /collections/{collection-id}/prompt-template | Removes a prompt template reference from the collection.| **DELETE** /collections/{collection_id}/prompt_template | Removes a prompt template reference from the collection. [**delete_collection_thumbnail**](CollectionsApi.md#delete-collection-thumbnail) | **DELETE** /collections/{collection-id}/thumbnail | Deletes collection thumbnail.| **DELETE** /collections/{collection_id}/thumbnail | Deletes collection thumbnail. [**delete_document_from_collection**](CollectionsApi.md#delete-document-from-collection) | **DELETE** /collections/{collection-id}/documents/{document-id} | Removes the document from the collection.| **DELETE** /collections/{collection_id}/documents/{document_id} | Removes the document from the collection. [**get_chat_session_count_for_collection**](CollectionsApi.md#get-chat-session-count-for-collection) | **GET** /collections/{collection-id}/chats/count | Counts a number of chat sessions with the collection.| **GET** /collections/{collection_id}/chats/count | Counts a number of chat sessions with the collection. [**get_collection**](CollectionsApi.md#get-collection) | **GET** /collections/{collection-id} | Get a Collection| **GET** /collections/{collection_id} | Get a Collection [**get_collection_chat_settings**](CollectionsApi.md#get-collection-chat-settings) | **GET** /collections/{collection-id}/chat-settings | Fetches collection chat settings.| **GET** /collections/{collection_id}/chat_settings | Fetches collection chat settings. [**get_collection_chunks**](CollectionsApi.md#get-collection-chunks) | **GET** /collections/{collection-id}/chunks/{chunk-ids} | Returns specific chunks in a collection.| **GET** /collections/{collection_id}/chunks/{chunk_ids} | Returns specific chunks in a collection. [**get_collection_count**](CollectionsApi.md#get-collection-count) | **GET** /collections/count | Counts a number of collections.| **GET** /collections/count | Counts a number of collections. [**get_collection_metadata**](CollectionsApi.md#get-collection-metadata) | **GET** /collections/{collection-id}/metadata | Fetches collection metadata.| **GET** /collections/{collection_id}/metadata | Fetches collection metadata. [**get_collection_permissions**](CollectionsApi.md#get-collection-permissions) | **GET** /collections/{collection-id}/permissions | Returns a list of access permissions for a given collection.| **GET** /collections/{collection_id}/permissions | Returns a list of access permissions for a given collection. [**get_collection_settings**](CollectionsApi.md#get-collection-settings) | **GET** /collections/{collection-id}/settings | Fetches collection settings.| **GET** /collections/{collection_id}/settings | Fetches collection settings. [**get_document_count_for_collection**](CollectionsApi.md#get-document-count-for-collection) | **GET** /collections/{collection-id}/documents/count | Counts a number of documents in the collection.| **GET** /collections/{collection_id}/documents/count | Counts a number of documents in the collection. [**insert_document_into_collection**](CollectionsApi.md#insert-document-into-collection) | **PUT** /collections/{collection-id}/documents/{document-id} | Import an already stored document to an existing collection.| **PUT** /collections/{collection_id}/documents/{document_id} | Import an already stored document to an existing collection. [**list_all_collections**](CollectionsApi.md#list-all-collections) | **GET** /collections/all | Fetches all users&| **GET** /collections/all | Fetches all users' collection metadata sorted by last update time by default. [**list_chat_sessions_for_collection**](CollectionsApi.md#list-chat-sessions-for-collection) | **GET** /collections/{collection-id}/chats | List chat sessions for a given collection.| **GET** /collections/{collection_id}/chats | List chat sessions for a given collection. [**list_collections**](CollectionsApi.md#list-collections) | **GET** /collections | List collections.| **GET** /collections | List collections. [**list_documents_for_collection**](CollectionsApi.md#list-documents-for-collection) | **GET** /collections/{collection-id}/documents | List a Collection&| **GET** /collections/{collection_id}/documents | List a Collection's documents [**list_questions_for_collection**](CollectionsApi.md#list-questions-for-collection) | **GET** /collections/{collection-id}/questions | List suggested questions for a given collection.| **GET** /collections/{collection_id}/questions | List suggested questions for a given collection. [**match_collection_chunks**](CollectionsApi.md#match-collection-chunks) | **POST** /collections/{collection-id}/chunks/match | Finds chunks related to a message using semantic search.| **POST** /collections/{collection_id}/chunks/match | Finds chunks related to a message using semantic search. [**remove_collection_size_limit**](CollectionsApi.md#remove-collection-size-limit) | **DELETE** /collections/{collection-id}/size-limit | Removes a size limit for a collection.| **DELETE** /collections/{collection_id}/size_limit | Removes a size limit for a collection. [**reset_collection_prompt_settings**](CollectionsApi.md#reset-collection-prompt-settings) | **DELETE** /collections/{collection-id}/prompt-settings | Resets the prompt settings for a given collection.| **DELETE** /collections/{collection_id}/prompt_settings | Resets the prompt settings for a given collection. [**search_collection_chunks**](CollectionsApi.md#search-collection-chunks) | **POST** /collections/{collection-id}/chunks/search | Finds chunks related to a message using lexical search.| **POST** /collections/{collection_id}/chunks/search | Finds chunks related to a message using lexical search. [**set_collection_size_limit**](CollectionsApi.md#set-collection-size-limit) | **PUT** /collections/{collection-id}/size-limit | Sets a maximum limit on the total size of documents (sum) added to a collection.| **PUT** /collections/{collection_id}/size_limit | Sets a maximum limit on the total size of documents (sum) added to a collection. [**share_collection**](CollectionsApi.md#share-collection) | **PUT** /collections/{collection-id}/permissions/{username} | Shares a collection to a user.| **PUT** /collections/{collection_id}/permissions/{username} | Shares a collection to a user. [**share_collection_with_group**](CollectionsApi.md#share-collection-with-group) | **PUT** /collections/{collection-id}/group-permissions/{group-id} | Shares a collection to a group.| **PUT** /collections/{collection_id}/group_permissions/{group_id} | Shares a collection to a group. [**unarchive_collection**](CollectionsApi.md#unarchive-collection) | **POST** /collections/{collection-id}/unarchive | Restores an archived collection to an active status.| **POST** /collections/{collection_id}/unarchive | Restores an archived collection to an active status. [**unshare_collection**](CollectionsApi.md#unshare-collection) | **DELETE** /collections/{collection-id}/permissions/{username} | Removes sharing of a collection to a user.| **DELETE** /collections/{collection_id}/permissions/{username} | Removes sharing of a collection to a user. [**unshare_collection_for_all**](CollectionsApi.md#unshare-collection-for-all) | **DELETE** /collections/{collection-id}/permissions | Removes sharing of a collection to all other users except the original owner.| **DELETE** /collections/{collection_id}/permissions | Removes sharing of a collection to all other users except the original owner. [**unshare_collection_from_group**](CollectionsApi.md#unshare-collection-from-group) | **DELETE** /collections/{collection-id}/group-permissions/{group-id} | Removes sharing of a collection to a user.| **DELETE** /collections/{collection_id}/group_permissions/{group_id} | Removes sharing of a collection to a user. [**update_collection**](CollectionsApi.md#update-collection) | **PATCH** /collections/{collection-id} | Updates attributes of an existing collection.| **PATCH** /collections/{collection_id} | Updates attributes of an existing collection. [**update_collection_chat_settings**](CollectionsApi.md#update-collection-chat-settings) | **PUT** /collections/{collection-id}/chat-settings | Updates collection chat settings.| **PUT** /collections/{collection_id}/chat_settings | Updates collection chat settings. [**update_collection_expiry_date**](CollectionsApi.md#update-collection-expiry-date) | **PUT** /collections/{collection-id}/expiry-date | Updates an expiry date of a collection.| **PUT** /collections/{collection_id}/expiry_date | Updates an expiry date of a collection. [**update_collection_inactivity_interval**](CollectionsApi.md#update-collection-inactivity-interval) | **PUT** /collections/{collection-id}/inactivity-interval | Updates an inactivity interval of a collection.| **PUT** /collections/{collection_id}/inactivity_interval | Updates an inactivity interval of a collection. [**update_collection_metadata**](CollectionsApi.md#update-collection-metadata) | **PUT** /collections/{collection-id}/metadata | Updates collection metadata.| **PUT** /collections/{collection_id}/metadata | Updates collection metadata. [**update_collection_privacy**](CollectionsApi.md#update-collection-privacy) | **POST** /collections/{collection-id}/is-public | Updates a flag specifying whether a collection is private or public.| **POST** /collections/{collection_id}/is_public | Updates a flag specifying whether a collection is private or public. [**update_collection_prompt_template**](CollectionsApi.md#update-collection-prompt-template) | **PUT** /collections/{collection-id}/prompt-template | Updates a prompt template reference of a collection.| **PUT** /collections/{collection_id}/prompt_template | Updates a prompt template reference of a collection. [**update_collection_settings**](CollectionsApi.md#update-collection-settings) | **PUT** /collections/{collection-id}/settings | Updates collection settings.| **PUT** /collections/{collection_id}/settings | Updates collection settings. [**update_collection_thumbnail**](CollectionsApi.md#update-collection-thumbnail) | **PUT** /collections/{collection-id}/thumbnail | Updates collection thumbnail.| **PUT** /collections/{collection_id}/thumbnail | Updates collection thumbnail. # **archive_collection** > archive_collection(collection_id) Archives a collection along with its associated data. Archives a collection along with its associated data. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection. try: # Archives a collection along with its associated data. api_instance.archive_collection(collection_id) except Exception as e: print("Exception when calling CollectionsApi->archive_collection: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection. | ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **create_collection** > Collection create_collection(collection_create_request) 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). ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.collection import Collection from h2ogpte.rest_sync.models.collection_create_request import CollectionCreateRequest from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_create_request = h2ogpte.rest_sync.CollectionCreateRequest() # CollectionCreateRequest | try: # Create a Collection api_response = api_instance.create_collection(collection_create_request) print("The response of CollectionsApi->create_collection:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->create_collection: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_create_request** | [**CollectionCreateRequest**](CollectionCreateRequest.md)| | ### Return type [**Collection**](Collection.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | **403** | Forbidden | - | # **create_delete_collection_job** > JobDetails create_delete_collection_job(delete_collections_job_request) Creates a job to delete collections. Creates a job to delete collections with a given unique identifier. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.delete_collections_job_request import DeleteCollectionsJobRequest from h2ogpte.rest_sync.models.job_details import JobDetails from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) delete_collections_job_request = h2ogpte.rest_sync.DeleteCollectionsJobRequest() # DeleteCollectionsJobRequest | try: # Creates a job to delete collections. api_response = api_instance.create_delete_collection_job(delete_collections_job_request) print("The response of CollectionsApi->create_delete_collection_job:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->create_delete_collection_job: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **delete_collections_job_request** | [**DeleteCollectionsJobRequest**](DeleteCollectionsJobRequest.md)| | ### Return type [**JobDetails**](JobDetails.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **create_delete_collection_thumbnail_job** > JobDetails create_delete_collection_thumbnail_job(collection_id) Creates a job to delete collection thumbnail. Creates a job to delete collection thumbnail image. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.job_details import JobDetails from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection try: # Creates a job to delete collection thumbnail. api_response = api_instance.create_delete_collection_thumbnail_job(collection_id) print("The response of CollectionsApi->create_delete_collection_thumbnail_job:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->create_delete_collection_thumbnail_job: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection | ### Return type [**JobDetails**](JobDetails.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **create_delete_document_from_collection_job** > JobDetails create_delete_document_from_collection_job(collection_id, delete_documents_job_request) Creates job to remove documents from the collection. Creates job to remove documents from the collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.delete_documents_job_request import DeleteDocumentsJobRequest from h2ogpte.rest_sync.models.job_details import JobDetails from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection to remove the document from. delete_documents_job_request = h2ogpte.rest_sync.DeleteDocumentsJobRequest() # DeleteDocumentsJobRequest | try: # Creates job to remove documents from the collection. api_response = api_instance.create_delete_document_from_collection_job(collection_id, delete_documents_job_request) print("The response of CollectionsApi->create_delete_document_from_collection_job:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->create_delete_document_from_collection_job: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection to remove the document from. | **delete_documents_job_request** | [**DeleteDocumentsJobRequest**](DeleteDocumentsJobRequest.md)| | ### Return type [**JobDetails**](JobDetails.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **create_import_collection_to_collection_job** > JobDetails create_import_collection_to_collection_job(collection_id, create_import_collection_to_collection_job_request, copy_document=copy_document, gen_doc_summaries=gen_doc_summaries, gen_doc_questions=gen_doc_questions, ocr_model=ocr_model, tesseract_lang=tesseract_lang, keep_tables_as_one_chunk=keep_tables_as_one_chunk, chunk_by_page=chunk_by_page, handwriting_check=handwriting_check, ingest_mode=ingest_mode, timeout=timeout) Creates job to import collection to the collection. Creates job to import collection to the collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.create_import_collection_to_collection_job_request import CreateImportCollectionToCollectionJobRequest from h2ogpte.rest_sync.models.job_details import JobDetails from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the destination collection. create_import_collection_to_collection_job_request = h2ogpte.rest_sync.CreateImportCollectionToCollectionJobRequest() # CreateImportCollectionToCollectionJobRequest | copy_document = True # bool | Whether to save a new copy of the document (optional) gen_doc_summaries = False # bool | Whether to auto-generate document summaries (uses LLM). (optional) (default to False) gen_doc_questions = False # bool | Whether to auto-generate sample questions for each document (uses LLM). (optional) (default to False) ocr_model = 'auto' # str | Which method to use to extract text from images using AI-enabled optical character recognition (OCR) models. 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). (optional) (default to 'auto') tesseract_lang = 'tesseract_lang_example' # str | Which language to use when using ocr_model=\"tesseract\". (optional) keep_tables_as_one_chunk = True # bool | When tables are identified by the table parser the table tokens will be kept in a single chunk. (optional) chunk_by_page = True # bool | Each page will be a chunk. `keep_tables_as_one_chunk` will be ignored if this is `true`. (optional) handwriting_check = True # bool | Check pages for handwriting. Will use specialized models if handwriting is found. (optional) ingest_mode = 'ingest_mode_example' # str | Ingest mode to use. - `standard` - Files will be ingested for use with RAG - `agent_only` - Bypasses standard ingestion. Files can only be used with agents. (optional) timeout = 3.4 # float | Timeout in seconds (optional) try: # Creates job to import collection to the collection. api_response = api_instance.create_import_collection_to_collection_job(collection_id, create_import_collection_to_collection_job_request, copy_document=copy_document, gen_doc_summaries=gen_doc_summaries, gen_doc_questions=gen_doc_questions, ocr_model=ocr_model, tesseract_lang=tesseract_lang, keep_tables_as_one_chunk=keep_tables_as_one_chunk, chunk_by_page=chunk_by_page, handwriting_check=handwriting_check, ingest_mode=ingest_mode, timeout=timeout) print("The response of CollectionsApi->create_import_collection_to_collection_job:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->create_import_collection_to_collection_job: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the destination collection. | **create_import_collection_to_collection_job_request** | [**CreateImportCollectionToCollectionJobRequest**](CreateImportCollectionToCollectionJobRequest.md)| | **copy_document** | **bool**| Whether to save a new copy of the document | [optional] **gen_doc_summaries** | **bool**| Whether to auto-generate document summaries (uses LLM). | [optional] [default to False] **gen_doc_questions** | **bool**| Whether to auto-generate sample questions for each document (uses LLM). | [optional] [default to False] **ocr_model** | **str**| Which method to use to extract text from images using AI-enabled optical character recognition (OCR) models. 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). | [optional] [default to 'auto'] **tesseract_lang** | **str**| Which language to use when using ocr_model=\"tesseract\". | [optional] **keep_tables_as_one_chunk** | **bool**| When tables are identified by the table parser the table tokens will be kept in a single chunk. | [optional] **chunk_by_page** | **bool**| Each page will be a chunk. `keep_tables_as_one_chunk` will be ignored if this is `true`. | [optional] **handwriting_check** | **bool**| Check pages for handwriting. Will use specialized models if handwriting is found. | [optional] **ingest_mode** | **str**| Ingest mode to use. - `standard` - Files will be ingested for use with RAG - `agent_only` - Bypasses standard ingestion. Files can only be used with agents. | [optional] **timeout** | **float**| Timeout in seconds | [optional] ### Return type [**JobDetails**](JobDetails.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **create_insert_document_to_collection_job** > JobDetails create_insert_document_to_collection_job(collection_id, create_insert_document_to_collection_job_request, copy_document=copy_document, gen_doc_summaries=gen_doc_summaries, gen_doc_questions=gen_doc_questions, ocr_model=ocr_model, tesseract_lang=tesseract_lang, keep_tables_as_one_chunk=keep_tables_as_one_chunk, chunk_by_page=chunk_by_page, handwriting_check=handwriting_check, ingest_mode=ingest_mode, timeout=timeout) Creates job to insert document to the collection. Creates job to insert document to the collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.create_insert_document_to_collection_job_request import CreateInsertDocumentToCollectionJobRequest from h2ogpte.rest_sync.models.job_details import JobDetails from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection where the document will be inserted into. create_insert_document_to_collection_job_request = h2ogpte.rest_sync.CreateInsertDocumentToCollectionJobRequest() # CreateInsertDocumentToCollectionJobRequest | copy_document = True # bool | Whether to save a new copy of the document (optional) gen_doc_summaries = False # bool | Whether to auto-generate document summaries (uses LLM). (optional) (default to False) gen_doc_questions = False # bool | Whether to auto-generate sample questions for each document (uses LLM). (optional) (default to False) ocr_model = 'auto' # str | Which method to use to extract text from images using AI-enabled optical character recognition (OCR) models. 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). (optional) (default to 'auto') tesseract_lang = 'tesseract_lang_example' # str | Which language to use when using ocr_model=\"tesseract\". (optional) keep_tables_as_one_chunk = True # bool | When tables are identified by the table parser the table tokens will be kept in a single chunk. (optional) chunk_by_page = True # bool | Each page will be a chunk. `keep_tables_as_one_chunk` will be ignored if this is `true`. (optional) handwriting_check = True # bool | Check pages for handwriting. Will use specialized models if handwriting is found. (optional) ingest_mode = 'ingest_mode_example' # str | Ingest mode to use. - `standard` - Files will be ingested for use with RAG - `agent_only` - Bypasses standard ingestion. Files can only be used with agents. (optional) timeout = 3.4 # float | Timeout in seconds (optional) try: # Creates job to insert document to the collection. api_response = api_instance.create_insert_document_to_collection_job(collection_id, create_insert_document_to_collection_job_request, copy_document=copy_document, gen_doc_summaries=gen_doc_summaries, gen_doc_questions=gen_doc_questions, ocr_model=ocr_model, tesseract_lang=tesseract_lang, keep_tables_as_one_chunk=keep_tables_as_one_chunk, chunk_by_page=chunk_by_page, handwriting_check=handwriting_check, ingest_mode=ingest_mode, timeout=timeout) print("The response of CollectionsApi->create_insert_document_to_collection_job:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->create_insert_document_to_collection_job: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection where the document will be inserted into. | **create_insert_document_to_collection_job_request** | [**CreateInsertDocumentToCollectionJobRequest**](CreateInsertDocumentToCollectionJobRequest.md)| | **copy_document** | **bool**| Whether to save a new copy of the document | [optional] **gen_doc_summaries** | **bool**| Whether to auto-generate document summaries (uses LLM). | [optional] [default to False] **gen_doc_questions** | **bool**| Whether to auto-generate sample questions for each document (uses LLM). | [optional] [default to False] **ocr_model** | **str**| Which method to use to extract text from images using AI-enabled optical character recognition (OCR) models. 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). | [optional] [default to 'auto'] **tesseract_lang** | **str**| Which language to use when using ocr_model=\"tesseract\". | [optional] **keep_tables_as_one_chunk** | **bool**| When tables are identified by the table parser the table tokens will be kept in a single chunk. | [optional] **chunk_by_page** | **bool**| Each page will be a chunk. `keep_tables_as_one_chunk` will be ignored if this is `true`. | [optional] **handwriting_check** | **bool**| Check pages for handwriting. Will use specialized models if handwriting is found. | [optional] **ingest_mode** | **str**| Ingest mode to use. - `standard` - Files will be ingested for use with RAG - `agent_only` - Bypasses standard ingestion. Files can only be used with agents. | [optional] **timeout** | **float**| Timeout in seconds | [optional] ### Return type [**JobDetails**](JobDetails.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **create_update_collection_thumbnail_job** > JobDetails create_update_collection_thumbnail_job(collection_id, timeout=timeout, file=file) Creates a job to update collection thumbnail. Creates a job to update a new thumbnail image for the collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.job_details import JobDetails from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection timeout = 3.4 # float | Timeout in seconds (optional) file = None # bytearray | (optional) try: # Creates a job to update collection thumbnail. api_response = api_instance.create_update_collection_thumbnail_job(collection_id, timeout=timeout, file=file) print("The response of CollectionsApi->create_update_collection_thumbnail_job:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->create_update_collection_thumbnail_job: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection | **timeout** | **float**| Timeout in seconds | [optional] **file** | **bytearray**| | [optional] ### Return type [**JobDetails**](JobDetails.md) ### HTTP request headers - **Content-Type**: multipart/form-data - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | **413** | Request entity is too large | - | **415** | Unsupported media type | - | # **delete_collection** > delete_collection(collection_id, timeout=timeout) Deletes collection. Deletes collection with a given unique identifier. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of collection to delete timeout = 300 # float | Timeout in seconds (optional) (default to 300) try: # Deletes collection. api_instance.delete_collection(collection_id, timeout=timeout) except Exception as e: print("Exception when calling CollectionsApi->delete_collection: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of collection to delete | **timeout** | **float**| Timeout in seconds | [optional] [default to 300] ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **delete_collection_expiry_date** > delete_collection_expiry_date(collection_id) Removes an expiry date from a collection. Removes an expiry date from a collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection try: # Removes an expiry date from a collection. api_instance.delete_collection_expiry_date(collection_id) except Exception as e: print("Exception when calling CollectionsApi->delete_collection_expiry_date: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection | ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **delete_collection_inactivity_interval** > delete_collection_inactivity_interval(collection_id) Removes an inactivity interval from the collection. Removes an inactivity interval from the collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection try: # Removes an inactivity interval from the collection. api_instance.delete_collection_inactivity_interval(collection_id) except Exception as e: print("Exception when calling CollectionsApi->delete_collection_inactivity_interval: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection | ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **delete_collection_prompt_template** > Collection delete_collection_prompt_template(collection_id) Removes a prompt template reference from the collection. Removes a prompt template reference from the collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.collection import Collection from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection try: # Removes a prompt template reference from the collection. api_response = api_instance.delete_collection_prompt_template(collection_id) print("The response of CollectionsApi->delete_collection_prompt_template:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->delete_collection_prompt_template: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection | ### Return type [**Collection**](Collection.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **delete_collection_thumbnail** > delete_collection_thumbnail(collection_id, timeout=timeout) Deletes collection thumbnail. Deletes collection thumbnail image. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection timeout = 300 # float | Timeout in seconds (optional) (default to 300) try: # Deletes collection thumbnail. api_instance.delete_collection_thumbnail(collection_id, timeout=timeout) except Exception as e: print("Exception when calling CollectionsApi->delete_collection_thumbnail: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection | **timeout** | **float**| Timeout in seconds | [optional] [default to 300] ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **delete_document_from_collection** > delete_document_from_collection(collection_id, document_id, timeout=timeout) Removes the document from the collection. Removes the document from the collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection to remove the document from. document_id = 'document_id_example' # str | Id of the document to be removed. timeout = 300 # float | Timeout in seconds (optional) (default to 300) try: # Removes the document from the collection. api_instance.delete_document_from_collection(collection_id, document_id, timeout=timeout) except Exception as e: print("Exception when calling CollectionsApi->delete_document_from_collection: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection to remove the document from. | **document_id** | **str**| Id of the document to be removed. | **timeout** | **float**| Timeout in seconds | [optional] [default to 300] ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **get_chat_session_count_for_collection** > Count get_chat_session_count_for_collection(collection_id) Counts a number of chat sessions with the collection. Counts a number of chat sessions with the collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.count import Count from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection to filter by. try: # Counts a number of chat sessions with the collection. api_response = api_instance.get_chat_session_count_for_collection(collection_id) print("The response of CollectionsApi->get_chat_session_count_for_collection:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->get_chat_session_count_for_collection: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection to filter by. | ### Return type [**Count**](Count.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **get_collection** > Collection get_collection(collection_id) Get a Collection A user can obtain a Collection by specifying its ID. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.collection import Collection from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of collection to return try: # Get a Collection api_response = api_instance.get_collection(collection_id) print("The response of CollectionsApi->get_collection:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->get_collection: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of collection to return | ### Return type [**Collection**](Collection.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **get_collection_chat_settings** > ChatSettings get_collection_chat_settings(collection_id) Fetches collection chat settings. Returns details of collection chat settings ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.chat_settings import ChatSettings from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection associated with the chat settings try: # Fetches collection chat settings. api_response = api_instance.get_collection_chat_settings(collection_id) print("The response of CollectionsApi->get_collection_chat_settings:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->get_collection_chat_settings: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection associated with the chat settings | ### Return type [**ChatSettings**](ChatSettings.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **get_collection_chunks** > List[Chunk] get_collection_chunks(collection_id, chunk_ids) Returns specific chunks in a collection. Returns specific chunks in a collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.chunk import Chunk from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection to search in chunk_ids = [56] # List[int] | List of ids for the chunks to return. Chunks are indexed starting at 1. try: # Returns specific chunks in a collection. api_response = api_instance.get_collection_chunks(collection_id, chunk_ids) print("The response of CollectionsApi->get_collection_chunks:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->get_collection_chunks: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection to search in | **chunk_ids** | [**List[int]**](int.md)| List of ids for the chunks to return. Chunks are indexed starting at 1. | ### Return type [**List[Chunk]**](Chunk.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **get_collection_count** > Count get_collection_count() Counts a number of collections. Counts a number of collections. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.count import Count from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) try: # Counts a number of collections. api_response = api_instance.get_collection_count() print("The response of CollectionsApi->get_collection_count:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->get_collection_count: %s\n" % e) ``` ### Parameters This endpoint does not need any parameter. ### Return type [**Count**](Count.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **get_collection_metadata** > Dict[str, object] get_collection_metadata(collection_id) Fetches collection metadata. Returns details of collection metadata. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection associated with metadata. try: # Fetches collection metadata. api_response = api_instance.get_collection_metadata(collection_id) print("The response of CollectionsApi->get_collection_metadata:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->get_collection_metadata: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection associated with metadata. | ### Return type **Dict[str, object]** ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **get_collection_permissions** > List[SharePermission] get_collection_permissions(collection_id) Returns a list of access permissions for a given collection. The returned list of permissions denotes who has access to the collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.share_permission import SharePermission from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection. try: # Returns a list of access permissions for a given collection. api_response = api_instance.get_collection_permissions(collection_id) print("The response of CollectionsApi->get_collection_permissions:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->get_collection_permissions: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection. | ### Return type [**List[SharePermission]**](SharePermission.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **get_collection_settings** > CollectionSettings get_collection_settings(collection_id) Fetches collection settings. Returns details of collection settings ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.collection_settings import CollectionSettings from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection associated with the settings try: # Fetches collection settings. api_response = api_instance.get_collection_settings(collection_id) print("The response of CollectionsApi->get_collection_settings:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->get_collection_settings: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection associated with the settings | ### Return type [**CollectionSettings**](CollectionSettings.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **get_document_count_for_collection** > Count get_document_count_for_collection(collection_id) Counts a number of documents in the collection. Counts a number of documents in the collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.count import Count from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection to filter by. try: # Counts a number of documents in the collection. api_response = api_instance.get_document_count_for_collection(collection_id) print("The response of CollectionsApi->get_document_count_for_collection:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->get_document_count_for_collection: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection to filter by. | ### Return type [**Count**](Count.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **insert_document_into_collection** > insert_document_into_collection(collection_id, document_id, copy_document=copy_document, gen_doc_summaries=gen_doc_summaries, gen_doc_questions=gen_doc_questions, ocr_model=ocr_model, tesseract_lang=tesseract_lang, keep_tables_as_one_chunk=keep_tables_as_one_chunk, chunk_by_page=chunk_by_page, handwriting_check=handwriting_check, ingest_mode=ingest_mode, timeout=timeout) Import an already stored document to an existing collection. Import an already stored document to an existing collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection to remove the document from. document_id = 'document_id_example' # str | Id of the document to be inserted. copy_document = True # bool | Whether to save a new copy of the document (optional) gen_doc_summaries = False # bool | Whether to auto-generate document summaries (uses LLM). (optional) (default to False) gen_doc_questions = False # bool | Whether to auto-generate sample questions for each document (uses LLM). (optional) (default to False) ocr_model = 'auto' # str | Which method to use to extract text from images using AI-enabled optical character recognition (OCR) models. 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). (optional) (default to 'auto') tesseract_lang = 'tesseract_lang_example' # str | Which language to use when using ocr_model=\"tesseract\". (optional) keep_tables_as_one_chunk = True # bool | When tables are identified by the table parser the table tokens will be kept in a single chunk. (optional) chunk_by_page = True # bool | Each page will be a chunk. `keep_tables_as_one_chunk` will be ignored if this is `true`. (optional) handwriting_check = True # bool | Check pages for handwriting. Will use specialized models if handwriting is found. (optional) ingest_mode = 'ingest_mode_example' # str | Ingest mode to use. - `standard` - Files will be ingested for use with RAG - `agent_only` - Bypasses standard ingestion. Files can only be used with agents. (optional) timeout = 3.4 # float | Timeout in seconds (optional) try: # Import an already stored document to an existing collection. api_instance.insert_document_into_collection(collection_id, document_id, copy_document=copy_document, gen_doc_summaries=gen_doc_summaries, gen_doc_questions=gen_doc_questions, ocr_model=ocr_model, tesseract_lang=tesseract_lang, keep_tables_as_one_chunk=keep_tables_as_one_chunk, chunk_by_page=chunk_by_page, handwriting_check=handwriting_check, ingest_mode=ingest_mode, timeout=timeout) except Exception as e: print("Exception when calling CollectionsApi->insert_document_into_collection: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection to remove the document from. | **document_id** | **str**| Id of the document to be inserted. | **copy_document** | **bool**| Whether to save a new copy of the document | [optional] **gen_doc_summaries** | **bool**| Whether to auto-generate document summaries (uses LLM). | [optional] [default to False] **gen_doc_questions** | **bool**| Whether to auto-generate sample questions for each document (uses LLM). | [optional] [default to False] **ocr_model** | **str**| Which method to use to extract text from images using AI-enabled optical character recognition (OCR) models. 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). | [optional] [default to 'auto'] **tesseract_lang** | **str**| Which language to use when using ocr_model=\"tesseract\". | [optional] **keep_tables_as_one_chunk** | **bool**| When tables are identified by the table parser the table tokens will be kept in a single chunk. | [optional] **chunk_by_page** | **bool**| Each page will be a chunk. `keep_tables_as_one_chunk` will be ignored if this is `true`. | [optional] **handwriting_check** | **bool**| Check pages for handwriting. Will use specialized models if handwriting is found. | [optional] **ingest_mode** | **str**| Ingest mode to use. - `standard` - Files will be ingested for use with RAG - `agent_only` - Bypasses standard ingestion. Files can only be used with agents. | [optional] **timeout** | **float**| Timeout in seconds | [optional] ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **list_all_collections** > List[Collection] list_all_collections(offset=offset, limit=limit, sort_column=sort_column, ascending=ascending) Fetches all users' collection metadata sorted by last update time by default. Fetches all users' collection metadata sorted by last update time by default. This is for admin use only and includes private, public, and shared collections in the result. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.collection import Collection from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) offset = 0 # int | How many collections to skip before returning. (optional) (default to 0) limit = 100 # int | How many collections to return. (optional) (default to 100) sort_column = updated_at # str | Sort column. (optional) (default to updated_at) ascending = False # bool | When true, returns sorted by sort_column in ascending order. (optional) (default to False) try: # Fetches all users' collection metadata sorted by last update time by default. api_response = api_instance.list_all_collections(offset=offset, limit=limit, sort_column=sort_column, ascending=ascending) print("The response of CollectionsApi->list_all_collections:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->list_all_collections: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **offset** | **int**| How many collections to skip before returning. | [optional] [default to 0] **limit** | **int**| How many collections to return. | [optional] [default to 100] **sort_column** | **str**| Sort column. | [optional] [default to updated_at] **ascending** | **bool**| When true, returns sorted by sort_column in ascending order. | [optional] [default to False] ### Return type [**List[Collection]**](Collection.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **list_chat_sessions_for_collection** > List[ChatSession] list_chat_sessions_for_collection(collection_id, offset=offset, limit=limit) List chat sessions for a given collection. List chat sessions for a given collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.chat_session import ChatSession from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection to filter by. offset = 0 # int | How many chat sessions to skip before returning. (optional) (default to 0) limit = 100 # int | How many chat sessions to return. (optional) (default to 100) try: # List chat sessions for a given collection. api_response = api_instance.list_chat_sessions_for_collection(collection_id, offset=offset, limit=limit) print("The response of CollectionsApi->list_chat_sessions_for_collection:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->list_chat_sessions_for_collection: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection to filter by. | **offset** | **int**| How many chat sessions to skip before returning. | [optional] [default to 0] **limit** | **int**| How many chat sessions to return. | [optional] [default to 100] ### Return type [**List[ChatSession]**](ChatSession.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **list_collections** > List[Collection] list_collections(offset=offset, limit=limit, sort_column=sort_column, ascending=ascending, metadata_filter=metadata_filter, name_filter=name_filter, current_user_only=current_user_only) List collections. List collections for a given user. If sort_column is not specified, the output is sorted by by last update time in descending order. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.collection import Collection from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) offset = 0 # int | How many collections to skip before returning. (optional) (default to 0) limit = 100 # int | How many collections to return. (optional) (default to 100) sort_column = updated_at # str | Sort column. (optional) (default to updated_at) ascending = False # bool | When true, returns sorted by sort_column in ascending order. (optional) (default to False) metadata_filter = 'metadata_filter_example' # str | Only returns collections with metadata matching this filter. (optional) name_filter = 'name_filter_example' # str | Only returns collections with names matching this filter. (optional) current_user_only = False # bool | When true, will only return the user owned collections. (optional) (default to False) try: # List collections. api_response = api_instance.list_collections(offset=offset, limit=limit, sort_column=sort_column, ascending=ascending, metadata_filter=metadata_filter, name_filter=name_filter, current_user_only=current_user_only) print("The response of CollectionsApi->list_collections:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->list_collections: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **offset** | **int**| How many collections to skip before returning. | [optional] [default to 0] **limit** | **int**| How many collections to return. | [optional] [default to 100] **sort_column** | **str**| Sort column. | [optional] [default to updated_at] **ascending** | **bool**| When true, returns sorted by sort_column in ascending order. | [optional] [default to False] **metadata_filter** | **str**| Only returns collections with metadata matching this filter. | [optional] **name_filter** | **str**| Only returns collections with names matching this filter. | [optional] **current_user_only** | **bool**| When true, will only return the user owned collections. | [optional] [default to False] ### Return type [**List[Collection]**](Collection.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **list_documents_for_collection** > List[Document] list_documents_for_collection(collection_id, offset=offset, limit=limit, metadata_filter=metadata_filter) List a Collection's documents A user can list a Collection's documents. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.document import Document from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | This parameter refers to the unique identifier ( ID) of the Collection to filter results. offset = 0 # int | This parameter refers to the number of documents to skip before retrieving results. (optional) (default to 0) limit = 100 # int | This parameter refers to the maximum number of documents to return in the result set. (optional) (default to 100) metadata_filter = 'metadata_filter_example' # str | String containing metadata json dict to filter documents by metadata. (optional) try: # List a Collection's documents api_response = api_instance.list_documents_for_collection(collection_id, offset=offset, limit=limit, metadata_filter=metadata_filter) print("The response of CollectionsApi->list_documents_for_collection:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->list_documents_for_collection: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| This parameter refers to the unique identifier ( ID) of the Collection to filter results. | **offset** | **int**| This parameter refers to the number of documents to skip before retrieving results. | [optional] [default to 0] **limit** | **int**| This parameter refers to the maximum number of documents to return in the result set. | [optional] [default to 100] **metadata_filter** | **str**| String containing metadata json dict to filter documents by metadata. | [optional] ### Return type [**List[Document]**](Document.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **list_questions_for_collection** > List[SuggestedQuestion] list_questions_for_collection(collection_id, limit=limit) List suggested questions for a given collection. List suggested questions for a given collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.suggested_question import SuggestedQuestion from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection to filter by. limit = 100 # int | How many questions to return. (optional) (default to 100) try: # List suggested questions for a given collection. api_response = api_instance.list_questions_for_collection(collection_id, limit=limit) print("The response of CollectionsApi->list_questions_for_collection:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->list_questions_for_collection: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection to filter by. | **limit** | **int**| How many questions to return. | [optional] [default to 100] ### Return type [**List[SuggestedQuestion]**](SuggestedQuestion.md) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **match_collection_chunks** > List[ChunkSearchResult] match_collection_chunks(collection_id, match_collection_chunks_request) Finds chunks related to a message using semantic search. Finds chunks related to a message using semantic search. Chunks are sorted by relevance and similarity score to the message. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.chunk_search_result import ChunkSearchResult from h2ogpte.rest_sync.models.match_collection_chunks_request import MatchCollectionChunksRequest from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of collection to search within. match_collection_chunks_request = h2ogpte.rest_sync.MatchCollectionChunksRequest() # MatchCollectionChunksRequest | try: # Finds chunks related to a message using semantic search. api_response = api_instance.match_collection_chunks(collection_id, match_collection_chunks_request) print("The response of CollectionsApi->match_collection_chunks:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->match_collection_chunks: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of collection to search within. | **match_collection_chunks_request** | [**MatchCollectionChunksRequest**](MatchCollectionChunksRequest.md)| | ### Return type [**List[ChunkSearchResult]**](ChunkSearchResult.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **remove_collection_size_limit** > remove_collection_size_limit(collection_id) Removes a size limit for a collection. Removes a size limit for a collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection. try: # Removes a size limit for a collection. api_instance.remove_collection_size_limit(collection_id) except Exception as e: print("Exception when calling CollectionsApi->remove_collection_size_limit: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection. | ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **reset_collection_prompt_settings** > reset_collection_prompt_settings(collection_id) Resets the prompt settings for a given collection. Resets the prompt settings for a given collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection try: # Resets the prompt settings for a given collection. api_instance.reset_collection_prompt_settings(collection_id) except Exception as e: print("Exception when calling CollectionsApi->reset_collection_prompt_settings: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection | ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | **409** | Conflict | - | # **search_collection_chunks** > List[ChunkSearchResult] search_collection_chunks(collection_id, search_collection_chunks_request) Finds chunks related to a message using lexical search. Finds chunks related to a message using lexical search. Chunks are sorted by relevance and similarity score to the message. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.chunk_search_result import ChunkSearchResult from h2ogpte.rest_sync.models.search_collection_chunks_request import SearchCollectionChunksRequest from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection to search within. search_collection_chunks_request = h2ogpte.rest_sync.SearchCollectionChunksRequest() # SearchCollectionChunksRequest | try: # Finds chunks related to a message using lexical search. api_response = api_instance.search_collection_chunks(collection_id, search_collection_chunks_request) print("The response of CollectionsApi->search_collection_chunks:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->search_collection_chunks: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection to search within. | **search_collection_chunks_request** | [**SearchCollectionChunksRequest**](SearchCollectionChunksRequest.md)| | ### Return type [**List[ChunkSearchResult]**](ChunkSearchResult.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **set_collection_size_limit** > set_collection_size_limit(collection_id, set_collection_size_limit_request) Sets a maximum limit on the total size of documents (sum) added to a collection. Sets a maximum limit on the total size of documents (sum) added to a collection. The limit is measured in bytes. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.set_collection_size_limit_request import SetCollectionSizeLimitRequest from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection. set_collection_size_limit_request = h2ogpte.rest_sync.SetCollectionSizeLimitRequest() # SetCollectionSizeLimitRequest | try: # Sets a maximum limit on the total size of documents (sum) added to a collection. api_instance.set_collection_size_limit(collection_id, set_collection_size_limit_request) except Exception as e: print("Exception when calling CollectionsApi->set_collection_size_limit: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection. | **set_collection_size_limit_request** | [**SetCollectionSizeLimitRequest**](SetCollectionSizeLimitRequest.md)| | ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **share_collection** > share_collection(collection_id, username, share_collection_request=share_collection_request) Shares a collection to a user. Shares a collection template to a user. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.share_collection_request import ShareCollectionRequest from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection. username = 'username_example' # str | User name that will obtain access to the collection share_collection_request = h2ogpte.rest_sync.ShareCollectionRequest() # ShareCollectionRequest | (optional) try: # Shares a collection to a user. api_instance.share_collection(collection_id, username, share_collection_request=share_collection_request) except Exception as e: print("Exception when calling CollectionsApi->share_collection: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection. | **username** | **str**| User name that will obtain access to the collection | **share_collection_request** | [**ShareCollectionRequest**](ShareCollectionRequest.md)| | [optional] ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | **409** | Conflict | - | # **share_collection_with_group** > share_collection_with_group(collection_id, group_id, share_collection_request=share_collection_request) Shares a collection to a group. Shares a collection to a group. The permission attribute defines the level of access, and which group can access the collection, the collection_id attribute denotes the collection to be shared. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.share_collection_request import ShareCollectionRequest from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection. group_id = 'group_id_example' # str | Id of a group that will obtain access to the collection. share_collection_request = h2ogpte.rest_sync.ShareCollectionRequest() # ShareCollectionRequest | (optional) try: # Shares a collection to a group. api_instance.share_collection_with_group(collection_id, group_id, share_collection_request=share_collection_request) except Exception as e: print("Exception when calling CollectionsApi->share_collection_with_group: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection. | **group_id** | **str**| Id of a group that will obtain access to the collection. | **share_collection_request** | [**ShareCollectionRequest**](ShareCollectionRequest.md)| | [optional] ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | **409** | Conflict | - | # **unarchive_collection** > unarchive_collection(collection_id) Restores an archived collection to an active status. Restores an archived collection to an active status. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection. try: # Restores an archived collection to an active status. api_instance.unarchive_collection(collection_id) except Exception as e: print("Exception when calling CollectionsApi->unarchive_collection: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection. | ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **unshare_collection** > unshare_collection(collection_id, username) Removes sharing of a collection to a user. Removes sharing of a collection to a user. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection. username = 'username_example' # str | User name that will lose access to the collection try: # Removes sharing of a collection to a user. api_instance.unshare_collection(collection_id, username) except Exception as e: print("Exception when calling CollectionsApi->unshare_collection: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection. | **username** | **str**| User name that will lose access to the collection | ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | **409** | Conflict | - | # **unshare_collection_for_all** > unshare_collection_for_all(collection_id) Removes sharing of a collection to all other users except the original owner. Removes sharing of a collection to all other users except the original owner. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection. try: # Removes sharing of a collection to all other users except the original owner. api_instance.unshare_collection_for_all(collection_id) except Exception as e: print("Exception when calling CollectionsApi->unshare_collection_for_all: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection. | ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | **409** | Conflict | - | # **unshare_collection_from_group** > unshare_collection_from_group(collection_id, group_id) Removes sharing of a collection to a user. Removes sharing of a collection to a user. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection. group_id = 'group_id_example' # str | Id of a group that will obtain access to the collection. try: # Removes sharing of a collection to a user. api_instance.unshare_collection_from_group(collection_id, group_id) except Exception as e: print("Exception when calling CollectionsApi->unshare_collection_from_group: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection. | **group_id** | **str**| Id of a group that will obtain access to the collection. | ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | **409** | Conflict | - | # **update_collection** > Collection update_collection(collection_id, collection_update_request) Updates attributes of an existing collection. Updates of an existing collection, particularly name and description. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.collection import Collection from h2ogpte.rest_sync.models.collection_update_request import CollectionUpdateRequest from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of collection to to be updated collection_update_request = h2ogpte.rest_sync.CollectionUpdateRequest() # CollectionUpdateRequest | try: # Updates attributes of an existing collection. api_response = api_instance.update_collection(collection_id, collection_update_request) print("The response of CollectionsApi->update_collection:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->update_collection: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of collection to to be updated | **collection_update_request** | [**CollectionUpdateRequest**](CollectionUpdateRequest.md)| | ### Return type [**Collection**](Collection.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **update_collection_chat_settings** > update_collection_chat_settings(collection_id, chat_settings=chat_settings) Updates collection chat settings. Recreates entire chat settings on the collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.chat_settings import ChatSettings from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection chat_settings = h2ogpte.rest_sync.ChatSettings() # ChatSettings | (optional) try: # Updates collection chat settings. api_instance.update_collection_chat_settings(collection_id, chat_settings=chat_settings) except Exception as e: print("Exception when calling CollectionsApi->update_collection_chat_settings: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection | **chat_settings** | [**ChatSettings**](ChatSettings.md)| | [optional] ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **update_collection_expiry_date** > update_collection_expiry_date(collection_id, update_collection_expiry_date_request) Updates an expiry date of a collection. Updates an expiry date of a collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.update_collection_expiry_date_request import UpdateCollectionExpiryDateRequest from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection update_collection_expiry_date_request = h2ogpte.rest_sync.UpdateCollectionExpiryDateRequest() # UpdateCollectionExpiryDateRequest | try: # Updates an expiry date of a collection. api_instance.update_collection_expiry_date(collection_id, update_collection_expiry_date_request) except Exception as e: print("Exception when calling CollectionsApi->update_collection_expiry_date: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection | **update_collection_expiry_date_request** | [**UpdateCollectionExpiryDateRequest**](UpdateCollectionExpiryDateRequest.md)| | ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **update_collection_inactivity_interval** > update_collection_inactivity_interval(collection_id, update_collection_inactivity_interval_request) Updates an inactivity interval of a collection. Updates an inactivity interval of a collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.update_collection_inactivity_interval_request import UpdateCollectionInactivityIntervalRequest from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection update_collection_inactivity_interval_request = h2ogpte.rest_sync.UpdateCollectionInactivityIntervalRequest() # UpdateCollectionInactivityIntervalRequest | try: # Updates an inactivity interval of a collection. api_instance.update_collection_inactivity_interval(collection_id, update_collection_inactivity_interval_request) except Exception as e: print("Exception when calling CollectionsApi->update_collection_inactivity_interval: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection | **update_collection_inactivity_interval_request** | [**UpdateCollectionInactivityIntervalRequest**](UpdateCollectionInactivityIntervalRequest.md)| | ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **update_collection_metadata** > update_collection_metadata(collection_id, request_body=request_body) Updates collection metadata. Recreates entire metadata of the collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection request_body = None # Dict[str, object] | (optional) try: # Updates collection metadata. api_instance.update_collection_metadata(collection_id, request_body=request_body) except Exception as e: print("Exception when calling CollectionsApi->update_collection_metadata: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection | **request_body** | [**Dict[str, object]**](object.md)| | [optional] ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **update_collection_privacy** > update_collection_privacy(collection_id, update_collection_privacy_request) Updates a flag specifying whether a collection is private or public. Updates a flag specifying whether a collection is private or public. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.update_collection_privacy_request import UpdateCollectionPrivacyRequest from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection. update_collection_privacy_request = h2ogpte.rest_sync.UpdateCollectionPrivacyRequest() # UpdateCollectionPrivacyRequest | try: # Updates a flag specifying whether a collection is private or public. api_instance.update_collection_privacy(collection_id, update_collection_privacy_request) except Exception as e: print("Exception when calling CollectionsApi->update_collection_privacy: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection. | **update_collection_privacy_request** | [**UpdateCollectionPrivacyRequest**](UpdateCollectionPrivacyRequest.md)| | ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **update_collection_prompt_template** > Collection update_collection_prompt_template(collection_id, prompt_template_change_request) Updates a prompt template reference of a collection. Updates a prompt template reference of a collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.collection import Collection from h2ogpte.rest_sync.models.prompt_template_change_request import PromptTemplateChangeRequest from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection prompt_template_change_request = h2ogpte.rest_sync.PromptTemplateChangeRequest() # PromptTemplateChangeRequest | try: # Updates a prompt template reference of a collection. api_response = api_instance.update_collection_prompt_template(collection_id, prompt_template_change_request) print("The response of CollectionsApi->update_collection_prompt_template:\n") pprint(api_response) except Exception as e: print("Exception when calling CollectionsApi->update_collection_prompt_template: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection | **prompt_template_change_request** | [**PromptTemplateChangeRequest**](PromptTemplateChangeRequest.md)| | ### Return type [**Collection**](Collection.md) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **update_collection_settings** > update_collection_settings(collection_id, collection_settings=collection_settings) Updates collection settings. Recreates entire settings on the collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.models.collection_settings import CollectionSettings from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection collection_settings = h2ogpte.rest_sync.CollectionSettings() # CollectionSettings | (optional) try: # Updates collection settings. api_instance.update_collection_settings(collection_id, collection_settings=collection_settings) except Exception as e: print("Exception when calling CollectionsApi->update_collection_settings: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection | **collection_settings** | [**CollectionSettings**](CollectionSettings.md)| | [optional] ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | # **update_collection_thumbnail** > update_collection_thumbnail(collection_id, timeout=timeout, file=file) Updates collection thumbnail. Uploads a new thumbnail image for the collection. ### Example * Bearer Authentication (bearerAuth): ```python import h2ogpte.rest_sync from h2ogpte.rest_sync.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1 # See configuration.py for a list of all supported configuration parameters. configuration = h2ogpte.rest_sync.Configuration( host = "https://h2ogpte.genai.h2o.ai/api/v1" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = h2ogpte.rest_sync.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with h2ogpte.rest_sync.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = h2ogpte.rest_sync.CollectionsApi(api_client) collection_id = 'collection_id_example' # str | Id of the collection timeout = 3.4 # float | Timeout in seconds (optional) file = None # bytearray | (optional) try: # Updates collection thumbnail. api_instance.update_collection_thumbnail(collection_id, timeout=timeout, file=file) except Exception as e: print("Exception when calling CollectionsApi->update_collection_thumbnail: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collection_id** | **str**| Id of the collection | **timeout** | **float**| Timeout in seconds | [optional] **file** | **bytearray**| | [optional] ### Return type void (empty response body) ### HTTP request headers - **Content-Type**: multipart/form-data - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful operation | - | **401** | Unauthorized - Invalid or missing API key | - | **413** | Request entity is too large | - | **415** | Unsupported media type | - |