When a Gradient AI Platform Knowledge Base is created the deployment of the database can run for several minutes. Currently users must write loops to poll for the deployment state, roughly.
from gradient import Gradient
client = Gradient()
while True:
knowledge_base = client.knowledge_bases.retrieve(
"uuid",
)
if knowledge_base.database_status != "ONLINE"
continue
This should of course handle failed states for errors and such