Skip to content

Commit

Permalink
Revert "API update: Engines -> Models (#4915)" (#5008)
Browse files Browse the repository at this point in the history
This reverts commit 8c28ad6.

Seems to be causing #5001
  • Loading branch information
dev2049 committed May 19, 2023
1 parent f07b9fd commit 9928fb2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions langchain/embeddings/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def _get_len_safe_embeddings(
response = embed_with_retry(
self,
input=tokens[i : i + _chunk_size],
model=self.deployment,
engine=self.deployment,
request_timeout=self.request_timeout,
headers=self.headers,
)
Expand All @@ -234,7 +234,7 @@ def _get_len_safe_embeddings(
average = embed_with_retry(
self,
input="",
model=self.deployment,
engine=self.deployment,
request_timeout=self.request_timeout,
headers=self.headers,
)["data"][0]["embedding"]
Expand Down Expand Up @@ -266,7 +266,7 @@ def _embedding_func(self, text: str, *, engine: str) -> List[float]:
return embed_with_retry(
self,
input=[text],
model=engine,
engine=engine,
request_timeout=self.request_timeout,
headers=self.headers,
)["data"][0]["embedding"]
Expand Down

0 comments on commit 9928fb2

Please sign in to comment.