fix: vector_size convert bytes to MB. (#1684)

This commit is contained in:
Garfield Dai 2023-12-04 10:51:40 +08:00 committed by GitHub
parent 75a6122173
commit 1263b7de75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,8 +14,9 @@ class BillingService:
billing_info = cls._send_request('GET', '/info', params=params)
vector_size = DatasetService.get_tenant_datasets_usage(tenant_id) / 1024
billing_info['vector_space']['size'] = int(vector_size)
vector_size = DatasetService.get_tenant_datasets_usage(tenant_id)
# Convert bytes to MB
billing_info['vector_space']['size'] = int(vector_size / 1024 / 1024)
return billing_info