Skip to main content
Version: v1.6.8 🚧

Import documents from one Collection to another

Overview​

A user can import documents from one Collection to another.

Example​

from h2ogpte import H2OGPTE

client = H2OGPTE(
address="https://h2ogpte.genai.h2o.ai",
api_key='sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
)

list_of_recent_collections = client.list_recent_collections(offset=0, limit=2)

empty_collection = list_of_recent_collections[0]
collection_with_one_document = list_of_recent_collections[1]

client.import_collection_into_collection(
collection_id=empty_collection.id,
src_collection_id=collection_with_one_document.id
)

Feedback