Skip to content

Commit

Permalink
🐛 Bug: Fix the bug where the Jina embedding model cannot be used.
Browse files Browse the repository at this point in the history
  • Loading branch information
yym68686 committed Dec 7, 2024
1 parent 359accc commit a67f66c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion request.py
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,10 @@ async def get_embedding_payload(request, engine, provider):
}

if request.encoding_format:
payload["encoding_format"] = request.encoding_format
if url.startswith("https://api.jina.ai"):
payload["embedding_type"] = request.encoding_format
else:
payload["encoding_format"] = request.encoding_format

return url, headers, payload

Expand Down

0 comments on commit a67f66c

Please sign in to comment.