Dateien in einen Vektor-Speicher hochladen
Dateiinhalt in den Vektor-Speicher mit Batch-Operationen hochladen
post
Upload files to a vector store.
Path parameters
vector-store-idstringRequired
The ID of the vector store.
Header parameters
x-api-keystringRequired
The API key for authentication.
Body
filesstring · binary[]Optional
The files to upload.
Responses
201
Files uploaded successfully.
application/json
207
Some files failed to upload.
post
/vector-stores/{vector-store-id}/documents/uploadBeispielanfragen
curl -X POST \
https://api.rememberizer.ai/api/v1/vector-stores/vs_abc123/documents/upload \
-H "x-api-key: YOUR_API_KEY" \
-F "files=@/path/to/document1.pdf" \
-F "files=@/path/to/document2.docx"const uploadFiles = async (vectorStoreId, files) => {
const formData = new FormData();
// Fügen Sie mehrere Dateien zu den Formulardaten hinzu
for (const file of files) {
formData.append('files', file);
}
const response = await fetch(`https://api.rememberizer.ai/api/v1/vector-stores/${vectorStoreId}/documents/upload`, {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY'
// Hinweis: Setzen Sie den Content-Type-Header nicht, er wird automatisch mit dem richtigen Boundary gesetzt
},
body: formData
});
const data = await response.json();
console.log(data);
};
// Beispielverwendung mit einem Dateieingabeelement
const fileInput = document.getElementById('fileInput');
uploadFiles('vs_abc123', fileInput.files);Erstellen Sie ein neues HTTP-Objekt
Erstellen Sie eine Multipart-Form-Anfrage
Erstellen Sie ein Multipart-Boundary
Erstellen Sie den Anfragekörper
Senden Sie die Anfrage
Analysieren und geben Sie die Antwort zurück
Pfadparameter
Parameter
Typ
Beschreibung
Anfragekörper
Antwortformat
Authentifizierung
Unterstützte Dateiformate
Dateigrößenbeschränkungen
Fehlerantworten
Statuscode
Beschreibung
Verarbeitungsstatus
Batch-Operationen
Batch-Upload-Implementierung
Batch-Upload-Best Practices
Last updated