Indexing is asynchronous. Poll documents until their status is indexed or failed. Document responses include chunk_count, char_count, and error_message.
await client.knowledgeBases.addUrl( knowledgeBase.id, "https://docs.example.com",);const result = await client.knowledgeBases.search( knowledgeBase.id, "How do I reset my password?", 5,);console.log(result.context, result.has_context);