Skip to content
Snippets Groups Projects
Unverified Commit e2020710 authored by KevinHuSh's avatar KevinHuSh Committed by GitHub
Browse files

fix wrong log printting (#330)

### What problem does this PR solve?

Issue link:#325

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
parent 0e8931bc
No related branches found
No related tags found
No related merge requests found
......@@ -136,7 +136,7 @@ class LLMBundle(object):
def encode(self, texts: list, batch_size=32):
emd, used_tokens = self.mdl.encode(texts, batch_size)
if TenantLLMService.increase_usage(
if not TenantLLMService.increase_usage(
self.tenant_id, self.llm_type, used_tokens):
database_logger.error(
"Can't update token usage for {}/EMBEDDING".format(self.tenant_id))
......@@ -144,7 +144,7 @@ class LLMBundle(object):
def encode_queries(self, query: str):
emd, used_tokens = self.mdl.encode_queries(query)
if TenantLLMService.increase_usage(
if not TenantLLMService.increase_usage(
self.tenant_id, self.llm_type, used_tokens):
database_logger.error(
"Can't update token usage for {}/EMBEDDING".format(self.tenant_id))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment