infiniflow / ragflow

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding.
https://ragflow.io
Apache License 2.0
16.98k stars 1.73k forks source link

[Question]: Can't update token usage for cc28c3f250ae11ef9584acde48001122/EMBEDDING #1803

Open fuhao009 opened 1 month ago

fuhao009 commented 1 month ago

Describe your problem

def encode_queries(self, query: str):
    emd, used_tokens = self.mdl.encode_queries(query)
    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))
    return emd, used_tokens
hangters commented 1 month ago

hi @fuhao009 thanks for mention that. This seems to be because there are no records of the local embedding model in the data table. This will not affect the usage, and we will fix it.