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
Maximum time to wait in seconds. If not provided, waits indefinitely until all processing completes.
Response
Status of the semantic processing queue (L0/L1 generation)
Status of the vectorization queue
Examples
Basic Usage
With Timeout
Batch Processing Pattern
Integration with Search
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
When to use wait_processed()
When to use wait_processed()
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
Batch processing
Batch processing
For better performance when adding multiple resources:This is more efficient than waiting after each individual resource.
Handling timeouts
Handling timeouts
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
Error handling
Error handling
Check for processing errors:
Response Examples
Related Methods
- add_resource - Add resources (supports
waitparameter) - add_skill - Add skills (supports
waitparameter) - find - Search resources after processing
- abstract - Get L0 abstract (requires processing)
- overview - Get L1 overview (requires processing)
