Skip to content

Commit 2e00829

Browse files
authored
fix: drop useless and wrong code for zhipu embedding (#11069)
Signed-off-by: yihong0618 <[email protected]>
1 parent 625aace commit 2e00829

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

api/core/model_runtime/model_providers/zhipuai/text_embedding/text_embedding.py

-11
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,6 @@ def embed_documents(self, model: str, client: ZhipuAI, texts: list[str]) -> tupl
105105

106106
return [list(map(float, e)) for e in embeddings], embedding_used_tokens
107107

108-
def embed_query(self, text: str) -> list[float]:
109-
"""Call out to ZhipuAI's embedding endpoint.
110-
111-
Args:
112-
text: The text to embed.
113-
114-
Returns:
115-
Embeddings for the text.
116-
"""
117-
return self.embed_documents([text])[0]
118-
119108
def _calc_response_usage(self, model: str, credentials: dict, tokens: int) -> EmbeddingUsage:
120109
"""
121110
Calculate response usage

0 commit comments

Comments
 (0)