forked from Archives/langchain
API update: Engines -> Models (#4915)
# API update: Engines -> Models see: https://community.openai.com/t/api-update-engines-models/18597 Co-authored-by: assert <zhangchengming@kkguan.com>
This commit is contained in:
parent
c06a47a691
commit
8c28ad6dac
@ -216,7 +216,7 @@ class OpenAIEmbeddings(BaseModel, Embeddings):
|
|||||||
response = embed_with_retry(
|
response = embed_with_retry(
|
||||||
self,
|
self,
|
||||||
input=tokens[i : i + _chunk_size],
|
input=tokens[i : i + _chunk_size],
|
||||||
engine=self.deployment,
|
model=self.deployment,
|
||||||
request_timeout=self.request_timeout,
|
request_timeout=self.request_timeout,
|
||||||
headers=self.headers,
|
headers=self.headers,
|
||||||
)
|
)
|
||||||
@ -234,7 +234,7 @@ class OpenAIEmbeddings(BaseModel, Embeddings):
|
|||||||
average = embed_with_retry(
|
average = embed_with_retry(
|
||||||
self,
|
self,
|
||||||
input="",
|
input="",
|
||||||
engine=self.deployment,
|
model=self.deployment,
|
||||||
request_timeout=self.request_timeout,
|
request_timeout=self.request_timeout,
|
||||||
headers=self.headers,
|
headers=self.headers,
|
||||||
)["data"][0]["embedding"]
|
)["data"][0]["embedding"]
|
||||||
@ -266,7 +266,7 @@ class OpenAIEmbeddings(BaseModel, Embeddings):
|
|||||||
return embed_with_retry(
|
return embed_with_retry(
|
||||||
self,
|
self,
|
||||||
input=[text],
|
input=[text],
|
||||||
engine=engine,
|
model=engine,
|
||||||
request_timeout=self.request_timeout,
|
request_timeout=self.request_timeout,
|
||||||
headers=self.headers,
|
headers=self.headers,
|
||||||
)["data"][0]["embedding"]
|
)["data"][0]["embedding"]
|
||||||
|
Loading…
Reference in New Issue
Block a user