Aller au contenu

RAG collections

Ce contenu n’est pas encore disponible dans votre langue.

RAG collections contain indexed documents and are identified by a stable public API ID such as rag_8K2mP9zQ4xL7.

  1. Create a collection with POST /rag/collections.
  2. Estimate an upload with POST /rag/documents/estimate.
  3. Upload documents with POST /rag/collections/{ragId}/documents.
  4. Read processing progress from GET /rag/uploads/{uploadId}.
  5. Attach the collection through PATCH /assistants/{assistantId}/runtime/rag.

Uploads accept .pdf, .txt, .doc, .docx, .csv, .xls, and .xlsx, with 200 MB of storage. Chunk size can range from 500 to 10,000 characters; the default is 5,000. One collection can be attached to an assistant.

An attached collection cannot be deleted until it is detached; the API returns RAG_COLLECTION_IN_USE.