-
-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnprocessableEntityError when embedding using openai and a proxy #464
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
Quick dig through the LangChain PRs indicates that this was fixed last week, first released at v0.0.336. Should be fixable by bumping our LangChain version. Edit: forgot to include link. langchain-ai/langchain#13262 |
@dlqqq I have: when I run /learn command on chatUI, I get an error |
When I change my documents to txt file I am getting error like (looks like expecting string input instead) Exception: UnprocessableEntityError("Error code: 422 - {'detail': [{'type': 'string_type', 'loc': ['body', 'input', 'str'], 'msg': 'Input should be a valid string', 'input': [[2465, 836, 374, 350, 6043, 12336]], 'url': 'https://errors.pydantic.dev/2.4/v/string_type'}, {'type': 'string_type', 'loc': ['body', 'input', 'list[str]', 0], 'msg': 'Input should be a valid string', 'input': [2465, 836, 374, 350, 6043, 12336], 'url': 'https://errors.pydantic.dev/2.4/v/string_type'}]}") |
openai==1.x
(module 'openai' has no attribute 'error')
@sqlreport This is likely a regression after PR #551 was merged in and released in version 1.9.0 and 2.9.0. I can look at it. |
With tip-of- |
@JasonWeill can you provide unit test code that can mimic the openai call so I can troubleshoot my openai proxy? I have ran openai example code with string and it works without issue. It must be the way chatUI generates the openai call where it is passing non-string data. |
@sqlreport I looked at our existing codebase and I don't see unit tests for the
|
openai==1.x
(module 'openai' has no attribute 'error')
@sqlreport Did you find a solution to the Mine is langchain==0.2.1 |
Description
Original issue on OpenAI community forum: https://community.openai.com/t/attributeerror-module-openai-has-no-attribute-error/486676
The new version of the
openai
package is breaking the the Jupyter-ai notebook. Any command to the openai models raises the following error:The Jupyter notebook works with
openai
version 0.28 but fails withopenai
1.2.3
.Reproduce
pip install --upgrade openai
Expected behavior
Jupyter AI should work with the new
openai
python package.Context
Versions:
jupyter_ai
: 2.5.0openai
: 1.2.3The text was updated successfully, but these errors were encountered: