Skip to content

Commit

Permalink
fix QWenSeq2txt bug (#2245)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

#2243

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
KevinHuSh authored Sep 4, 2024
1 parent 9b4cceb commit 0fe19f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/apps/llm_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def set_api_key():
chat_passed, embd_passed, rerank_passed = False, False, False
factory = req["llm_factory"]
msg = ""
for llm in LLMService.query(fid=factory):
for llm in LLMService.query(fid=factory)[:3]:
if not embd_passed and llm.model_type == LLMType.EMBEDDING.value:
mdl = EmbeddingModel[factory](
req["api_key"], llm.llm_name, base_url=req.get("base_url"))
Expand Down
2 changes: 1 addition & 1 deletion rag/llm/sequence2txt_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def transcription(self, audio, format):
ans = ""
if result.status_code == HTTPStatus.OK:
for sentence in result.get_sentence():
ans += str(sentence + '\n')
ans += sentence.text.decode('utf-8') + '\n'
return ans, num_tokens_from_string(ans)

return "**ERROR**: " + result.message, 0
Expand Down

0 comments on commit 0fe19f3

Please sign in to comment.