Skip to content
This repository was archived by the owner on Aug 17, 2026. It is now read-only.
This repository was archived by the owner on Aug 17, 2026. It is now read-only.

Create a helper function to poll for knowledge base database creation #42

Description

@bbatha

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions