mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-07 13:40:46 +00:00
Fixed query/instruction typoes (#10158)
Fixed typoes in embedding parameters.
This commit is contained in:
parent
433c4a721e
commit
c585351bdc
@ -111,7 +111,7 @@ class DeepInfraEmbeddings(BaseModel, Embeddings):
|
||||
Returns:
|
||||
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)
|
||||
return embeddings
|
||||
|
||||
|
@ -87,4 +87,4 @@ class OctoAIEmbeddings(BaseModel, Embeddings):
|
||||
def embed_query(self, text: str) -> List[float]:
|
||||
"""Compute query embedding using an OctoAI instruct model."""
|
||||
text = text.replace("\n", " ")
|
||||
return self._compute_embeddings([text], self.embed_instruction)[0]
|
||||
return self._compute_embeddings([text], self.query_instruction)[0]
|
||||
|
Loading…
Reference in New Issue
Block a user