langchain-serve
langchain-serve copied to clipboard
ImportError: cannot import name 'StructuredTool' from 'langchain.tools'
trying on a MacBook M2
(venv_pdfGPT) ~/pdfGPT/ [main*] lc-serve deploy local api --platform linux/amd64
Traceback (most recent call last):
File "/opt/homebrew/bin/lc-serve", line 5, in
Traceback (most recent call last):
File "/opt/homebrew/bin/lc-serve", line 5, in
What's langchain
version in your venv? Looks like this is a dependency issue.
BTW you don't need --platform linux/amd64
when running in local.
somehow the problem changed:
(venv_pdfGPT) ~/pdfGPT/ [main*] lc-serve deploy local api
Traceback (most recent call last):
File "/opt/homebrew/bin/lc-serve", line 5, in
(venv_pdfGPT) ~/pdfGPT/ [main*] pip show langchain
Name: langchain
Version: 0.0.275
Summary: Building applications with LLMs through composability
Home-page: https://github.com/langchain-ai/langchain
Author:
Author-email:
License: MIT
Location: /Users/andi/pdfGPT/venv_pdfGPT/lib/python3.11/site-packages
Requires: aiohttp, dataclasses-json, langsmith, numexpr, numpy, pydantic, PyYAML, requests, SQLAlchemy, tenacity
Required-by: langchain-serve
(venv_pdfGPT) ~/pdfGPT/ [main*] pip show langchain-serve
Name: langchain-serve
Version: 0.0.61
Summary: Langchain Serve - serve your langchain apps on Jina AI Cloud.
Home-page: https://github.com/jina-ai/langchain-serve/
Author: Jina AI
Author-email: [email protected]
License: Apache 2.0
Location: /Users/andi/pdfGPT/venv_pdfGPT/lib/python3.11/site-packages
Requires: click, jcloud, jina, jina-hubble-sdk, langchain, nest-asyncio, requests, slack-bolt, textual, toml
Required-by:
(venv_pdfGPT) ~/pdfGPT/ [main*] pip show fastapi
pip show pydantic
Name: fastapi
Version: 0.103.0
Summary: FastAPI framework, high performance, easy to learn, fast to code, ready for production
Home-page:
Author:
Author-email: Sebastián Ramírez [email protected]
License:
Location: /Users/andi/pdfGPT/venv_pdfGPT/lib/python3.11/site-packages
Requires: pydantic, starlette, typing-extensions
Required-by: gradio, jina
Name: pydantic
Version: 2.3.0
Summary: Data validation using Python type hints
Home-page:
Author:
Author-email: Samuel Colvin [email protected], Eric Jolibois [email protected], Hasan Ramezani [email protected], Adrian Garcia Badaracco [email protected], Terrence Dorsey [email protected], David Montague [email protected]
License:
Location: /Users/andi/pdfGPT/venv_pdfGPT/lib/python3.11/site-packages
Requires: annotated-types, pydantic-core, typing-extensions
Required-by: fastapi, gradio, jina, langchain, langsmith
hmm I thought the lc-serve
should be from venv_pdfGPT
(/Users/andi/pdfGPT/venv_pdfGPT/bin/lc-serve
), not /opt/homebrew/bin/lc-serve
s?