Skip to content
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

langserve version issues #112

Open
moop6535 opened this issue Dec 14, 2023 · 3 comments · May be fixed by #201
Open

langserve version issues #112

moop6535 opened this issue Dec 14, 2023 · 3 comments · May be fixed by #201

Comments

@moop6535
Copy link

Wanted to drop a friendly note here.

Setting up the backend, I was running into this issue:

ImportError: cannot import name '_get_base_run_id_as_str' from 'langserve.server' (/opt/opengpts/backend/.venv/lib/python3.11/site-packages/langserve/server.py)

python: 3.11.7
pip: 23.3.1

I noticed the issue came from the requirements:
langserve>=0.0.23

Which was installing
langserve 0.0.36

I checked the Docker build (which was working) and the langserve version was 0.0.32

Of course, the issue has to do with the new change in langserve, but for other folks out there the quick fix is to change the requirements.txt to hardcode the langserve version:
langserve==0.0.32

@Kaizoku99
Copy link

can You please give more explanation on how to fix this issue? because I keep running into it even after I changed the requirements.txt to hardcode the langserve version:
langserve==0.0.32

@moop6535
Copy link
Author

@Kaizoku99

Here is my requirements.txt that is working for me:

langchain-cli
-e packages/gizmo-agent
-e packages/agent-executor
langchain>=0.0.331
langserve==0.0.32
langsmith==0.0.70
permchain
python-multipart

I also hard set langsmith==0.0.70 (and python version 3.11.7)

Let me know if that works for you

@kevinNejad
Copy link

kevinNejad commented Jan 7, 2024

quick fix
from langserve.api_handler import _get_base_run_id_as_str, _unpack_input
replace server with api_handler

eunhye1kim added a commit to eunhye1kim/opengpts that referenced this issue Feb 27, 2024
- Changed the reference statement of _unpack_input from 'from langserve.server ~' to 'from langserve.api_handler ~'
@eunhye1kim eunhye1kim linked a pull request Feb 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants