- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
df_bills['curie_search'] = df_bills["text"].apply(lambda x : get_embedding(x, engine = 'text-search-curie-doc-001'))
Output exceeds the [size limit](command:workbench.action.openSettings?[). Open the full output data [in a text editor](command:workbench.action.openLargeOutput?019d3119-f490-4b95-a671-e8d08d3d0e84)
---------------------------------------------------------------------------
InvalidRequestError Traceback (most recent call last)
File ~/miniconda3/envs/openai/lib/python3.8/site-packages/tenacity/__init__.py:409, in Retrying.__call__(self, fn, *args, **kwargs)
408 try:
--> 409 result = fn(*args, **kwargs)
410 except BaseException: # noqa: B902
File ~/miniconda3/envs/openai/lib/python3.8/site-packages/openai/embeddings_utils.py:23, in get_embedding(text, engine)
21 text = text.replace("\n", " ")
---> 23 return openai.Embedding.create(input=[text], engine=engine)["data"][0]["embedding"]
File ~/miniconda3/envs/openai/lib/python3.8/site-packages/openai/api_resources/embedding.py:33, in Embedding.create(cls, *args, **kwargs)
32 try:
---> 33 response = super().create(*args, **kwargs)
35 # If a user specifies base64, we'll just return the encoded string.
36 # This is only for the default case.
File ~/miniconda3/envs/openai/lib/python3.8/site-packages/openai/api_resources/abstract/engine_api_resource.py:153, in EngineAPIResource.create(cls, api_key, api_base, api_type, request_id, api_version, organization, **params)
138 (
139 deployment_id,
140 engine,
(...)
150 api_key, api_base, api_type, api_version, organization, **params
151 )
--> 153 response, _, api_key = requestor.request(
...
--> 363 raise retry_exc from fut.exception()
365 if self.wait:
366 sleep = self.wait(retry_state=retry_state)
RetryError: RetryError[<Future at 0x7fb1e21f3f70 state=finished raised InvalidRequestError>]
This issue is for a: (mark with an
x)Minimal steps to reproduce
when running this line of code in embedding_billsum.ipynb demo notebook:
you get this error:
Any log messages given by the failure
Expected/desired behavior
no errors
OS and Version?
Versions
python 3.8
Mention any other details that might be useful