fix bug in api (#1088)

### What problem does this PR solve?

#1075 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
KevinHuSh
2024-06-07 09:56:14 +08:00
committed by GitHub
parent 2ff1b410b9
commit 923c3b8cac
2 changed files with 3 additions and 3 deletions

View File

@ -140,7 +140,7 @@ class QWenEmbed(Base):
token_count += resp["usage"]["total_tokens"]
return np.array(res), token_count
except Exception as e:
raise Exception("Account abnormal. Please ensure it's on good standing.")
raise Exception("Account abnormal. Please ensure it's on good standing to use QWen's "+self.model_name)
return np.array([]), 0
def encode_queries(self, text):
@ -153,7 +153,7 @@ class QWenEmbed(Base):
return np.array(resp["output"]["embeddings"][0]
["embedding"]), resp["usage"]["total_tokens"]
except Exception as e:
raise Exception("Account abnormal. Please ensure it's on good standing.")
raise Exception("Account abnormal. Please ensure it's on good standing to use QWen's "+self.model_name)
return np.array([]), 0