From a0df7c604f1c27a242a0e89a7eabf854edfccd57 Mon Sep 17 00:00:00 2001 From: michaelfeil Date: Mon, 18 Dec 2023 16:07:42 +0100 Subject: [PATCH] updating docstring --- .../langchain_community/embeddings/gradient_ai.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/community/langchain_community/embeddings/gradient_ai.py b/libs/community/langchain_community/embeddings/gradient_ai.py index 2255a46cd3a3c..1ac653826fd48 100644 --- a/libs/community/langchain_community/embeddings/gradient_ai.py +++ b/libs/community/langchain_community/embeddings/gradient_ai.py @@ -43,8 +43,8 @@ class GradientEmbeddings(BaseModel, Embeddings): gradient_api_url: Optional[str] = None """Endpoint URL to use.""" - query_for_retrieval: Optional[str] = None - """Endpoint URL to use.""" + query_prompt_for_retrieval: Optional[str] = None + """Query pre-prompt""" client: Any = None #: :meta private: """Gradient client.""" @@ -130,7 +130,7 @@ def embed_query(self, text: str) -> List[float]: Embeddings for the text. """ query = ( - f"{self.query_for_retrieval} {text}" if self.query_for_retrieval else text + f"{self.query_prompt_for_retrieval} {text}" if self.query_prompt_for_retrieval else text ) return self.embed_documents([query])[0] @@ -144,7 +144,7 @@ async def aembed_query(self, text: str) -> List[float]: Embeddings for the text. """ query = ( - f"{self.query_for_retrieval} {text}" if self.query_for_retrieval else text + f"{self.query_prompt_for_retrieval} {text}" if self.query_prompt_for_retrieval else text ) embeddings = await self.aembed_documents([query]) return embeddings[0]