mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-10 07:21:03 +00:00
Fixed query/instruction typoes (#10158)
Fixed typoes in embedding parameters.
This commit is contained in:
@@ -111,7 +111,7 @@ class DeepInfraEmbeddings(BaseModel, Embeddings):
|
|||||||
Returns:
|
Returns:
|
||||||
List of embeddings, one for each text.
|
List of embeddings, one for each text.
|
||||||
"""
|
"""
|
||||||
instruction_pairs = [f"{self.query_instruction}{text}" for text in texts]
|
instruction_pairs = [f"{self.embed_instruction}{text}" for text in texts]
|
||||||
embeddings = self._embed(instruction_pairs)
|
embeddings = self._embed(instruction_pairs)
|
||||||
return embeddings
|
return embeddings
|
||||||
|
|
||||||
|
@@ -87,4 +87,4 @@ class OctoAIEmbeddings(BaseModel, Embeddings):
|
|||||||
def embed_query(self, text: str) -> List[float]:
|
def embed_query(self, text: str) -> List[float]:
|
||||||
"""Compute query embedding using an OctoAI instruct model."""
|
"""Compute query embedding using an OctoAI instruct model."""
|
||||||
text = text.replace("\n", " ")
|
text = text.replace("\n", " ")
|
||||||
return self._compute_embeddings([text], self.embed_instruction)[0]
|
return self._compute_embeddings([text], self.query_instruction)[0]
|
||||||
|
Reference in New Issue
Block a user