Bläddra i källkod

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

tags/0.3.33
Garfield Dai 1 år sedan
förälder
incheckning
1263b7de75
Inget konto är kopplat till bidragsgivarens mejladress
1 ändrade filer med 3 tillägg och 2 borttagningar
  1. 3
    2
      api/services/billing_service.py

+ 3
- 2
api/services/billing_service.py Visa fil

@@ -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


Laddar…
Avbryt
Spara