Skip to main content

Overview

Wait for all queued semantic processing and vectorization tasks to complete. This ensures that resources and skills are fully processed and indexed before you query them.
After adding resources or skills, OpenViking processes them asynchronously. Use this method to wait for completion before searching or retrieving content.

Method Signature

Parameters

float
Maximum time to wait in seconds. If not provided, waits indefinitely until all processing completes.

Response

object
Status of the semantic processing queue (L0/L1 generation)
object
Status of the vectorization queue

Examples

Basic Usage

With Timeout

Batch Processing Pattern

Processing Queues

OpenViking uses two asynchronous queues for resource processing:

1. Semantic Queue

Processes resources to generate:
  • L0 (Abstract): High-level summary of the resource
  • L1 (Overview): Detailed overview with key points

2. Vector Queue

Indexes resources for semantic search:
  • Generates embeddings for content chunks
  • Stores vectors in the vector database
  • Enables semantic similarity search
Both queues must complete before resources are fully searchable.

Best Practices

Use wait_processed() when:
  • You need to search resources immediately after adding them
  • You’re adding resources in a script or initialization phase
  • You need to verify processing completed successfully
  • You’re running tests that depend on resource availability
For better performance when adding multiple resources:
This is more efficient than waiting after each individual resource.
Set appropriate timeouts based on resource size:
  • Small files (< 1MB): 10-30 seconds
  • Medium files (1-100MB): 1-5 minutes
  • Large files or directories: 5-30 minutes
Check for processing errors:

Response Examples

  • add_resource - Add resources (supports wait parameter)
  • add_skill - Add skills (supports wait parameter)
  • find - Search resources after processing
  • abstract - Get L0 abstract (requires processing)
  • overview - Get L1 overview (requires processing)