Skip to content

Commit

Permalink
Adapt input type parameter with MiniMax embedding model (#9342)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoice authored Oct 15, 2024
1 parent 6d2c6ca commit 5908fd6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def _invoke(
url = f"{self.api_base}?GroupId={group_id}"
headers = {"Authorization": "Bearer " + api_key, "Content-Type": "application/json"}

data = {"model": "embo-01", "texts": texts, "type": "db"}
embedding_type = "db" if input_type == EmbeddingInputType.DOCUMENT else "query"
data = {"model": "embo-01", "texts": texts, "type": embedding_type}

try:
response = post(url, headers=headers, data=dumps(data))
Expand Down

0 comments on commit 5908fd6

Please sign in to comment.