fix tongyi embedding endpoint return None output (#10857)

This commit is contained in:
Jyong 2024-11-19 21:04:17 +08:00 committed by GitHub
parent ee1f14621a
commit bd05df5cc5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -65,6 +65,8 @@ class GTERerankModel(RerankModel):
)
rerank_documents = []
if not response.output:
return RerankResult(model=model, docs=rerank_documents)
for _, result in enumerate(response.output.results):
# format document
rerank_document = RerankDocument(