Skip to main content
Version: v1.6.1 🚧

Share a Collection

Overview​

A user can share a Collection with another user.

Example​

from h2ogpte import H2OGPTE
from h2ogpte.types import Permission

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

collection_id = client.create_collection(
name="Chat with website",
description="Chat with the H2O Label Genie documentation website",
)

website = client.ingest_website(
collection_id=collection_id,
url="https://docs.h2o.ai/wave-apps/h2o-label-genie/"
)

status = client.share_collection(
collection_id=collection_id,
permission=Permission(username="USERNAME_OF_RECIPIENT_TO_SHARE_COLLECTION")
)

print(status.status)
completed
note

To identify the correct username to use, see the following page: List all registered users in the system.


Feedback