delete method

Future<DeleteVectorStoreFileResponse> delete(
  1. String vectorStoreId,
  2. String fileId
)

Deletes a vector store file.

Implementation

Future<DeleteVectorStoreFileResponse> delete(
  String vectorStoreId,
  String fileId,
) async {
  ensureNotClosed?.call();
  final url = requestBuilder.buildUrl('${_endpoint(vectorStoreId)}/$fileId');
  final headers = requestBuilder.buildBetaHeaders(betaFeature: _betaFeature);
  final httpRequest = http.Request('DELETE', url)..headers.addAll(headers);
  final response = await interceptorChain.execute(httpRequest);
  return DeleteVectorStoreFileResponse.fromJson(
    jsonDecode(response.body) as Map<String, dynamic>,
  );
}