process_files_batch_api_v1_retrieval_process_files_batch
Batch process files and save their embeddings to a vector database for search and retrieval.
Instructions
Process a batch of files and save them to the vector database.
NOTE: We intentionally do NOT use Depends(get_session) here. The save_docs_to_vector_db() call makes external embedding API calls which can take 5-60+ seconds for batch operations. Database operations after embedding (Files.update_file_by_id) manage their own short-lived sessions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_name | Yes | ||
| files | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| errors | Yes | ||
| results | Yes |