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.
import Gradient from '@digitalocean/gradient';
const client = new Gradient();
while (true) {
const kb = await client.knowledgeBases.retrieve('123e4567-e89b-12d3-a456-426614174000');
if (kb.databaseStatus !== "ONLINE") {
continue;
}
}
This should of course handle failed states for errors and such