langchain-ai / langchain

🦜🔗 Build context-aware reasoning applications
https://python.langchain.com
MIT License
84.81k stars 13.1k forks source link

[build] make api_docs_build fails - standard-tests being pulled into api_docs_build and olded version of autodoc_pydantic being used #20972

Open lalanikarim opened 2 weeks ago

lalanikarim commented 2 weeks ago

Checked other resources

Example Code

cd langchain
poetry install --with lint,docs --no-root
make clean
make api_docs_build

Error Message and Stack Trace (if applicable)

Running make api_docs_build as is results in this error

poetry run python docs/api_reference/create_api_rst.py
Starting to build API reference files.
Building package: community
Building package: text-splitters
Building package: core
Building package: experimental
Building package: standard-tests
pyproject.toml not found in /home/karim/Projects/langchain/libs/partners/standard-tests.
You are either attempting to build a directory which is not a package or the package is missing a pyproject.toml file which should be added.Aborting the build.
make: *** [Makefile:37: api_docs_build] Error 1

Excluding standard-tests and running the same command results in this error:

API reference files built.
cd docs/api_reference && poetry run make html
Running Sphinx v4.5.0

Extension error:
Could not import extension sphinxcontrib.autodoc_pydantic (exception: `BaseSettings` has been moved to the `pydantic-settings` package. See https://docs.pydantic.dev/2.6/migration/#basesettings-has-moved-to-pydantic-settings for more details.

For further information visit https://errors.pydantic.dev/2.6/u/import-error)
make[1]: *** [html] Error 2
make: *** [api_docs_build] Error 2

Description

System Info

pip freeze | grep langchain
-e git+ssh://git@github.com/langchain-ai/langchain@f1a0614f3ba896b3168f0faad79ffb97df91ba6e#egg=langchain&subdirectory=libs/langchain
-e git+ssh://git@github.com/langchain-ai/langchain@f1a0614f3ba896b3168f0faad79ffb97df91ba6e#egg=langchain_community&subdirectory=libs/community
-e git+ssh://git@github.com/langchain-ai/langchain@f1a0614f3ba896b3168f0faad79ffb97df91ba6e#egg=langchain_core&subdirectory=libs/core
-e git+ssh://git@github.com/langchain-ai/langchain@f1a0614f3ba896b3168f0faad79ffb97df91ba6e#egg=langchain_experimental&subdirectory=libs/experimental
-e git+ssh://git@github.com/langchain-ai/langchain@f1a0614f3ba896b3168f0faad79ffb97df91ba6e#egg=langchain_openai&subdirectory=libs/partners/openai
-e git+ssh://git@github.com/langchain-ai/langchain@f1a0614f3ba896b3168f0faad79ffb97df91ba6e#egg=langchain_text_splitters&subdirectory=libs/text-splitters

platform mac and wsl

python --version
Python 3.10.12