Fixed query/instruction typoes (#10158)

Fixed typoes in embedding parameters.
This commit is contained in:
Ackermann Yuriy 2023-09-04 15:31:37 +12:00 committed by GitHub
parent 433c4a721e
commit c585351bdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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]