langchain 1.0.0a9__tar.gz → 1.0.0a11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of langchain might be problematic. Click here for more details.
- langchain-1.0.0a11/.gitignore +162 -0
- langchain-1.0.0a11/Makefile +110 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/PKG-INFO +29 -35
- langchain-1.0.0a11/extended_testing_deps.txt +5 -0
- langchain-1.0.0a11/langchain/__init__.py +3 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/_internal/_documents.py +1 -1
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/_internal/_prompts.py +2 -2
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/_internal/_typing.py +1 -1
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/agents/__init__.py +2 -3
- langchain-1.0.0a11/langchain/agents/factory.py +1126 -0
- langchain-1.0.0a11/langchain/agents/middleware/__init__.py +53 -0
- langchain-1.0.0a11/langchain/agents/middleware/context_editing.py +245 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/agents/middleware/human_in_the_loop.py +67 -20
- langchain-1.0.0a11/langchain/agents/middleware/model_call_limit.py +177 -0
- langchain-1.0.0a11/langchain/agents/middleware/model_fallback.py +94 -0
- langchain-1.0.0a11/langchain/agents/middleware/pii.py +753 -0
- langchain-1.0.0a11/langchain/agents/middleware/planning.py +201 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/agents/middleware/prompt_caching.py +7 -4
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/agents/middleware/summarization.py +2 -1
- langchain-1.0.0a11/langchain/agents/middleware/tool_call_limit.py +260 -0
- langchain-1.0.0a11/langchain/agents/middleware/tool_selection.py +306 -0
- langchain-1.0.0a11/langchain/agents/middleware/types.py +1124 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/agents/structured_output.py +15 -1
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/chat_models/base.py +22 -25
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/embeddings/base.py +3 -4
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/embeddings/cache.py +0 -1
- langchain-1.0.0a11/langchain/messages/__init__.py +29 -0
- langchain-1.0.0a11/langchain/rate_limiters/__init__.py +13 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/tools/__init__.py +9 -0
- {langchain-1.0.0a9/langchain/agents → langchain-1.0.0a11/langchain/tools}/tool_node.py +8 -10
- langchain-1.0.0a11/pyproject.toml +201 -0
- langchain-1.0.0a11/scripts/check_imports.py +31 -0
- langchain-1.0.0a11/tests/unit_tests/agents/__snapshots__/test_middleware_decorators.ambr +95 -0
- langchain-1.0.0a11/tests/unit_tests/agents/middleware/test_before_after_agent.py +286 -0
- langchain-1.0.0a11/tests/unit_tests/agents/middleware/test_llm_tool_selection.py +598 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/model.py +1 -1
- langchain-1.0.0a11/tests/unit_tests/agents/test_context_editing_middleware.py +216 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/test_middleware_agent.py +1155 -128
- langchain-1.0.0a11/tests/unit_tests/agents/test_middleware_decorators.py +717 -0
- langchain-1.0.0a11/tests/unit_tests/agents/test_middleware_tools.py +322 -0
- langchain-1.0.0a11/tests/unit_tests/agents/test_pii_middleware.py +641 -0
- langchain-1.0.0a11/tests/unit_tests/agents/test_react_agent.py +987 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/test_response_format.py +94 -1
- langchain-1.0.0a11/tests/unit_tests/agents/test_tool_call_limit.py +434 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/test_tool_node.py +2 -6
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/chat_models/test_chat_models.py +9 -11
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/test_dependencies.py +1 -3
- langchain-1.0.0a11/tests/unit_tests/tools/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/tools/test_imports.py +3 -0
- langchain-1.0.0a11/uv.lock +4738 -0
- langchain-1.0.0a9/langchain/__init__.py +0 -26
- langchain-1.0.0a9/langchain/agents/middleware/__init__.py +0 -16
- langchain-1.0.0a9/langchain/agents/middleware/types.py +0 -543
- langchain-1.0.0a9/langchain/agents/middleware_agent.py +0 -617
- langchain-1.0.0a9/langchain/agents/react_agent.py +0 -1228
- langchain-1.0.0a9/langchain/globals.py +0 -18
- langchain-1.0.0a9/langchain/text_splitter.py +0 -50
- langchain-1.0.0a9/pyproject.toml +0 -247
- langchain-1.0.0a9/tests/unit_tests/agents/__snapshots__/test_react_agent_graph.ambr +0 -83
- langchain-1.0.0a9/tests/unit_tests/agents/test_middleware_decorators.py +0 -152
- langchain-1.0.0a9/tests/unit_tests/agents/test_react_agent.py +0 -1653
- langchain-1.0.0a9/tests/unit_tests/agents/test_react_agent_graph.py +0 -58
- {langchain-1.0.0a9 → langchain-1.0.0a11}/LICENSE +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/README.md +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/_internal/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/_internal/_lazy_import.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/_internal/_utils.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/agents/_internal/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/agents/_internal/_typing.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/chat_models/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/documents/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/embeddings/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/py.typed +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/storage/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/storage/encoder_backed.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/storage/exceptions.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/langchain/storage/in_memory.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/integration_tests/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/integration_tests/agents/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/integration_tests/agents/test_response_format.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/integration_tests/cache/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/integration_tests/cache/fake_embeddings.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/integration_tests/chat_models/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/integration_tests/chat_models/test_base.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/integration_tests/conftest.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/integration_tests/embeddings/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/integration_tests/embeddings/test_base.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/integration_tests/test_compile.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/__snapshots__/test_middleware_agent.ambr +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/any_str.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/compose-postgres.yml +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/compose-redis.yml +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/conftest.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/conftest_checkpointer.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/conftest_store.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/memory_assert.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/messages.py +0 -0
- {langchain-1.0.0a9/tests/unit_tests/chat_models → langchain-1.0.0a11/tests/unit_tests/agents/middleware}/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/specifications/responses.json +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/specifications/return_direct.json +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/test_responses.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/test_responses_spec.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/test_return_direct_spec.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/agents/utils.py +0 -0
- {langchain-1.0.0a9/tests/unit_tests/embeddings → langchain-1.0.0a11/tests/unit_tests/chat_models}/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/conftest.py +0 -0
- {langchain-1.0.0a9/tests/unit_tests/storage → langchain-1.0.0a11/tests/unit_tests/embeddings}/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/embeddings/test_base.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/embeddings/test_caching.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/embeddings/test_imports.py +0 -0
- {langchain-1.0.0a9/tests/unit_tests/tools → langchain-1.0.0a11/tests/unit_tests/storage}/__init__.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/storage/test_imports.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/stubs.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/test_imports.py +0 -0
- {langchain-1.0.0a9 → langchain-1.0.0a11}/tests/unit_tests/test_pytest_config.py +0 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
.vs/
|
|
2
|
+
.idea/
|
|
3
|
+
# Byte-compiled / optimized / DLL files
|
|
4
|
+
__pycache__/
|
|
5
|
+
*.py[cod]
|
|
6
|
+
*$py.class
|
|
7
|
+
|
|
8
|
+
# C extensions
|
|
9
|
+
*.so
|
|
10
|
+
|
|
11
|
+
# Distribution / packaging
|
|
12
|
+
.Python
|
|
13
|
+
build/
|
|
14
|
+
develop-eggs/
|
|
15
|
+
dist/
|
|
16
|
+
downloads/
|
|
17
|
+
eggs/
|
|
18
|
+
.eggs/
|
|
19
|
+
lib/
|
|
20
|
+
lib64/
|
|
21
|
+
parts/
|
|
22
|
+
sdist/
|
|
23
|
+
var/
|
|
24
|
+
wheels/
|
|
25
|
+
pip-wheel-metadata/
|
|
26
|
+
share/python-wheels/
|
|
27
|
+
*.egg-info/
|
|
28
|
+
.installed.cfg
|
|
29
|
+
*.egg
|
|
30
|
+
MANIFEST
|
|
31
|
+
|
|
32
|
+
# Google GitHub Actions credentials files created by:
|
|
33
|
+
# https://github.com/google-github-actions/auth
|
|
34
|
+
#
|
|
35
|
+
# That action recommends adding this gitignore to prevent accidentally committing keys.
|
|
36
|
+
gha-creds-*.json
|
|
37
|
+
|
|
38
|
+
# PyInstaller
|
|
39
|
+
# Usually these files are written by a python script from a template
|
|
40
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
41
|
+
*.manifest
|
|
42
|
+
*.spec
|
|
43
|
+
|
|
44
|
+
# Installer logs
|
|
45
|
+
pip-log.txt
|
|
46
|
+
pip-delete-this-directory.txt
|
|
47
|
+
|
|
48
|
+
# Unit test / coverage reports
|
|
49
|
+
htmlcov/
|
|
50
|
+
.tox/
|
|
51
|
+
.nox/
|
|
52
|
+
.coverage
|
|
53
|
+
.coverage.*
|
|
54
|
+
.cache
|
|
55
|
+
nosetests.xml
|
|
56
|
+
coverage.xml
|
|
57
|
+
*.cover
|
|
58
|
+
*.py,cover
|
|
59
|
+
.hypothesis/
|
|
60
|
+
.pytest_cache/
|
|
61
|
+
.codspeed/
|
|
62
|
+
|
|
63
|
+
# Translations
|
|
64
|
+
*.mo
|
|
65
|
+
*.pot
|
|
66
|
+
|
|
67
|
+
# Django stuff:
|
|
68
|
+
*.log
|
|
69
|
+
local_settings.py
|
|
70
|
+
db.sqlite3
|
|
71
|
+
db.sqlite3-journal
|
|
72
|
+
|
|
73
|
+
# Flask stuff:
|
|
74
|
+
instance/
|
|
75
|
+
.webassets-cache
|
|
76
|
+
|
|
77
|
+
# Scrapy stuff:
|
|
78
|
+
.scrapy
|
|
79
|
+
|
|
80
|
+
# PyBuilder
|
|
81
|
+
target/
|
|
82
|
+
|
|
83
|
+
# Jupyter Notebook
|
|
84
|
+
.ipynb_checkpoints
|
|
85
|
+
notebooks/
|
|
86
|
+
|
|
87
|
+
# IPython
|
|
88
|
+
profile_default/
|
|
89
|
+
ipython_config.py
|
|
90
|
+
|
|
91
|
+
# pyenv
|
|
92
|
+
.python-version
|
|
93
|
+
|
|
94
|
+
# pipenv
|
|
95
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
96
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
97
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
98
|
+
# install all needed dependencies.
|
|
99
|
+
#Pipfile.lock
|
|
100
|
+
|
|
101
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
102
|
+
__pypackages__/
|
|
103
|
+
|
|
104
|
+
# Celery stuff
|
|
105
|
+
celerybeat-schedule
|
|
106
|
+
celerybeat.pid
|
|
107
|
+
|
|
108
|
+
# SageMath parsed files
|
|
109
|
+
*.sage.py
|
|
110
|
+
|
|
111
|
+
# Environments
|
|
112
|
+
.env
|
|
113
|
+
.envrc
|
|
114
|
+
.venv*
|
|
115
|
+
venv*
|
|
116
|
+
env/
|
|
117
|
+
ENV/
|
|
118
|
+
env.bak/
|
|
119
|
+
|
|
120
|
+
# Spyder project settings
|
|
121
|
+
.spyderproject
|
|
122
|
+
.spyproject
|
|
123
|
+
|
|
124
|
+
# Rope project settings
|
|
125
|
+
.ropeproject
|
|
126
|
+
|
|
127
|
+
# mkdocs documentation
|
|
128
|
+
/site
|
|
129
|
+
|
|
130
|
+
# mypy
|
|
131
|
+
.mypy_cache/
|
|
132
|
+
.mypy_cache_test/
|
|
133
|
+
.dmypy.json
|
|
134
|
+
dmypy.json
|
|
135
|
+
|
|
136
|
+
# Pyre type checker
|
|
137
|
+
.pyre/
|
|
138
|
+
|
|
139
|
+
# macOS display setting files
|
|
140
|
+
.DS_Store
|
|
141
|
+
|
|
142
|
+
# Wandb directory
|
|
143
|
+
wandb/
|
|
144
|
+
|
|
145
|
+
# asdf tool versions
|
|
146
|
+
.tool-versions
|
|
147
|
+
/.ruff_cache/
|
|
148
|
+
|
|
149
|
+
*.pkl
|
|
150
|
+
*.bin
|
|
151
|
+
|
|
152
|
+
# integration test artifacts
|
|
153
|
+
data_map*
|
|
154
|
+
\[('_type', 'fake'), ('stop', None)]
|
|
155
|
+
|
|
156
|
+
# Replit files
|
|
157
|
+
*replit*
|
|
158
|
+
|
|
159
|
+
node_modules
|
|
160
|
+
|
|
161
|
+
prof
|
|
162
|
+
virtualenv/
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
.PHONY: all clean docs_build docs_clean docs_linkcheck api_docs_build api_docs_clean api_docs_linkcheck format lint test tests test_watch integration_tests help extended_tests start_services stop_services
|
|
2
|
+
|
|
3
|
+
# Default target executed when no arguments are given to make.
|
|
4
|
+
all: help
|
|
5
|
+
|
|
6
|
+
######################
|
|
7
|
+
# TESTING AND COVERAGE
|
|
8
|
+
######################
|
|
9
|
+
|
|
10
|
+
start_services:
|
|
11
|
+
docker compose -f tests/unit_tests/agents/compose-postgres.yml -f tests/unit_tests/agents/compose-redis.yml up -V --force-recreate --wait --remove-orphans
|
|
12
|
+
|
|
13
|
+
stop_services:
|
|
14
|
+
docker compose -f tests/unit_tests/agents/compose-postgres.yml -f tests/unit_tests/agents/compose-redis.yml down -v
|
|
15
|
+
|
|
16
|
+
# Define a variable for the test file path.
|
|
17
|
+
TEST_FILE ?= tests/unit_tests/
|
|
18
|
+
|
|
19
|
+
.EXPORT_ALL_VARIABLES:
|
|
20
|
+
UV_FROZEN = true
|
|
21
|
+
|
|
22
|
+
# Run unit tests and generate a coverage report.
|
|
23
|
+
coverage:
|
|
24
|
+
uv run --group test pytest --cov \
|
|
25
|
+
--cov-config=.coveragerc \
|
|
26
|
+
--cov-report xml \
|
|
27
|
+
--cov-report term-missing:skip-covered \
|
|
28
|
+
$(TEST_FILE)
|
|
29
|
+
|
|
30
|
+
test:
|
|
31
|
+
make start_services && LANGGRAPH_TEST_FAST=0 uv run --group test pytest -n auto --disable-socket --allow-unix-socket $(TEST_FILE) --cov-report term-missing:skip-covered; \
|
|
32
|
+
EXIT_CODE=$$?; \
|
|
33
|
+
make stop_services; \
|
|
34
|
+
exit $$EXIT_CODE
|
|
35
|
+
|
|
36
|
+
test_fast:
|
|
37
|
+
LANGGRAPH_TEST_FAST=1 uv run --group test pytest -n auto --disable-socket --allow-unix-socket $(TEST_FILE)
|
|
38
|
+
|
|
39
|
+
extended_tests:
|
|
40
|
+
make start_services && LANGGRAPH_TEST_FAST=0 uv run --group test pytest --disable-socket --allow-unix-socket --only-extended tests/unit_tests; \
|
|
41
|
+
EXIT_CODE=$$?; \
|
|
42
|
+
make stop_services; \
|
|
43
|
+
exit $$EXIT_CODE
|
|
44
|
+
|
|
45
|
+
test_watch:
|
|
46
|
+
make start_services && LANGGRAPH_TEST_FAST=0 uv run --group test ptw --snapshot-update --now . -- -x --disable-socket --allow-unix-socket --disable-warnings tests/unit_tests; \
|
|
47
|
+
EXIT_CODE=$$?; \
|
|
48
|
+
make stop_services; \
|
|
49
|
+
exit $$EXIT_CODE
|
|
50
|
+
|
|
51
|
+
test_watch_extended:
|
|
52
|
+
make start_services && LANGGRAPH_TEST_FAST=0 uv run --group test ptw --snapshot-update --now . -- -x --disable-socket --allow-unix-socket --only-extended tests/unit_tests; \
|
|
53
|
+
EXIT_CODE=$$?; \
|
|
54
|
+
make stop_services; \
|
|
55
|
+
exit $$EXIT_CODE
|
|
56
|
+
|
|
57
|
+
integration_tests:
|
|
58
|
+
uv run --group test --group test_integration pytest tests/integration_tests
|
|
59
|
+
|
|
60
|
+
check_imports: $(shell find langchain -name '*.py')
|
|
61
|
+
uv run python ./scripts/check_imports.py $^
|
|
62
|
+
|
|
63
|
+
######################
|
|
64
|
+
# LINTING AND FORMATTING
|
|
65
|
+
######################
|
|
66
|
+
|
|
67
|
+
# Define a variable for Python and notebook files.
|
|
68
|
+
PYTHON_FILES=.
|
|
69
|
+
MYPY_CACHE=.mypy_cache
|
|
70
|
+
lint format: PYTHON_FILES=.
|
|
71
|
+
lint_diff format_diff: PYTHON_FILES=$(shell git diff --relative=libs/langchain --name-only --diff-filter=d master | grep -E '\.py$$|\.ipynb$$')
|
|
72
|
+
lint_package: PYTHON_FILES=langchain
|
|
73
|
+
lint_tests: PYTHON_FILES=tests
|
|
74
|
+
lint_tests: MYPY_CACHE=.mypy_cache_test
|
|
75
|
+
|
|
76
|
+
lint lint_diff lint_package lint_tests:
|
|
77
|
+
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check $(PYTHON_FILES)
|
|
78
|
+
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff format $(PYTHON_FILES) --diff
|
|
79
|
+
[ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && uv run --all-groups mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
|
|
80
|
+
|
|
81
|
+
format format_diff:
|
|
82
|
+
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff format $(PYTHON_FILES)
|
|
83
|
+
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --fix $(PYTHON_FILES)
|
|
84
|
+
|
|
85
|
+
######################
|
|
86
|
+
# HELP
|
|
87
|
+
######################
|
|
88
|
+
|
|
89
|
+
help:
|
|
90
|
+
@echo '===================='
|
|
91
|
+
@echo 'clean - run docs_clean and api_docs_clean'
|
|
92
|
+
@echo 'docs_build - build the documentation'
|
|
93
|
+
@echo 'docs_clean - clean the documentation build artifacts'
|
|
94
|
+
@echo 'docs_linkcheck - run linkchecker on the documentation'
|
|
95
|
+
@echo 'api_docs_build - build the API Reference documentation'
|
|
96
|
+
@echo 'api_docs_clean - clean the API Reference documentation build artifacts'
|
|
97
|
+
@echo 'api_docs_linkcheck - run linkchecker on the API Reference documentation'
|
|
98
|
+
@echo '-- LINTING --'
|
|
99
|
+
@echo 'format - run code formatters'
|
|
100
|
+
@echo 'lint - run linters'
|
|
101
|
+
@echo '-- TESTS --'
|
|
102
|
+
@echo 'coverage - run unit tests and generate coverage report'
|
|
103
|
+
@echo 'test - run unit tests with all services'
|
|
104
|
+
@echo 'test_fast - run unit tests with in-memory services only'
|
|
105
|
+
@echo 'tests - run unit tests (alias for "make test")'
|
|
106
|
+
@echo 'test TEST_FILE=<test_file> - run all tests in file'
|
|
107
|
+
@echo 'extended_tests - run only extended unit tests'
|
|
108
|
+
@echo 'test_watch - run unit tests in watch mode'
|
|
109
|
+
@echo 'integration_tests - run integration tests'
|
|
110
|
+
@echo '-- DOCUMENTATION tasks are from the top-level Makefile --'
|
|
@@ -1,50 +1,44 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: langchain
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0a11
|
|
4
4
|
Summary: Building applications with LLMs through composability
|
|
5
|
-
License: MIT
|
|
6
5
|
Project-URL: Source Code, https://github.com/langchain-ai/langchain/tree/master/libs/langchain
|
|
7
6
|
Project-URL: Release Notes, https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain%3D%3D0%22&expanded=true
|
|
8
7
|
Project-URL: repository, https://github.com/langchain-ai/langchain
|
|
8
|
+
License: MIT
|
|
9
|
+
License-File: LICENSE
|
|
9
10
|
Requires-Python: <4.0.0,>=3.10.0
|
|
10
|
-
Requires-Dist: langchain-core<2.0.0,>=0.
|
|
11
|
-
Requires-Dist:
|
|
12
|
-
Requires-Dist: langgraph<2.0.0,>=0.6.7
|
|
11
|
+
Requires-Dist: langchain-core<2.0.0,>=1.0.0a6
|
|
12
|
+
Requires-Dist: langgraph<2.0.0,>=1.0.0a4
|
|
13
13
|
Requires-Dist: pydantic<3.0.0,>=2.7.4
|
|
14
|
-
Provides-Extra: community
|
|
15
|
-
Requires-Dist: langchain-community; extra == "community"
|
|
16
14
|
Provides-Extra: anthropic
|
|
17
|
-
Requires-Dist: langchain-anthropic; extra ==
|
|
18
|
-
Provides-Extra:
|
|
19
|
-
Requires-Dist: langchain-
|
|
20
|
-
Provides-Extra:
|
|
21
|
-
Requires-Dist: langchain-
|
|
22
|
-
Provides-Extra:
|
|
23
|
-
Requires-Dist: langchain-
|
|
24
|
-
Provides-Extra: google-vertexai
|
|
25
|
-
Requires-Dist: langchain-google-vertexai; extra == "google-vertexai"
|
|
26
|
-
Provides-Extra: google-genai
|
|
27
|
-
Requires-Dist: langchain-google-genai; extra == "google-genai"
|
|
15
|
+
Requires-Dist: langchain-anthropic; extra == 'anthropic'
|
|
16
|
+
Provides-Extra: aws
|
|
17
|
+
Requires-Dist: langchain-aws; extra == 'aws'
|
|
18
|
+
Provides-Extra: community
|
|
19
|
+
Requires-Dist: langchain-community; extra == 'community'
|
|
20
|
+
Provides-Extra: deepseek
|
|
21
|
+
Requires-Dist: langchain-deepseek; extra == 'deepseek'
|
|
28
22
|
Provides-Extra: fireworks
|
|
29
|
-
Requires-Dist: langchain-fireworks; extra ==
|
|
23
|
+
Requires-Dist: langchain-fireworks; extra == 'fireworks'
|
|
24
|
+
Provides-Extra: google-genai
|
|
25
|
+
Requires-Dist: langchain-google-genai; extra == 'google-genai'
|
|
26
|
+
Provides-Extra: google-vertexai
|
|
27
|
+
Requires-Dist: langchain-google-vertexai; extra == 'google-vertexai'
|
|
28
|
+
Provides-Extra: groq
|
|
29
|
+
Requires-Dist: langchain-groq; extra == 'groq'
|
|
30
|
+
Provides-Extra: mistralai
|
|
31
|
+
Requires-Dist: langchain-mistralai; extra == 'mistralai'
|
|
30
32
|
Provides-Extra: ollama
|
|
31
|
-
Requires-Dist: langchain-ollama; extra ==
|
|
33
|
+
Requires-Dist: langchain-ollama; extra == 'ollama'
|
|
34
|
+
Provides-Extra: openai
|
|
35
|
+
Requires-Dist: langchain-openai; extra == 'openai'
|
|
36
|
+
Provides-Extra: perplexity
|
|
37
|
+
Requires-Dist: langchain-perplexity; extra == 'perplexity'
|
|
32
38
|
Provides-Extra: together
|
|
33
|
-
Requires-Dist: langchain-together; extra ==
|
|
34
|
-
Provides-Extra: mistralai
|
|
35
|
-
Requires-Dist: langchain-mistralai; extra == "mistralai"
|
|
36
|
-
Provides-Extra: huggingface
|
|
37
|
-
Requires-Dist: langchain-huggingface; extra == "huggingface"
|
|
38
|
-
Provides-Extra: groq
|
|
39
|
-
Requires-Dist: langchain-groq; extra == "groq"
|
|
40
|
-
Provides-Extra: aws
|
|
41
|
-
Requires-Dist: langchain-aws; extra == "aws"
|
|
42
|
-
Provides-Extra: deepseek
|
|
43
|
-
Requires-Dist: langchain-deepseek; extra == "deepseek"
|
|
39
|
+
Requires-Dist: langchain-together; extra == 'together'
|
|
44
40
|
Provides-Extra: xai
|
|
45
|
-
Requires-Dist: langchain-xai; extra ==
|
|
46
|
-
Provides-Extra: perplexity
|
|
47
|
-
Requires-Dist: langchain-perplexity; extra == "perplexity"
|
|
41
|
+
Requires-Dist: langchain-xai; extra == 'xai'
|
|
48
42
|
Description-Content-Type: text/markdown
|
|
49
43
|
|
|
50
44
|
# 🦜️🔗 LangChain
|
|
@@ -63,7 +63,7 @@ def resolve_prompt(
|
|
|
63
63
|
messages = resolve_prompt(None, state, runtime, "content", "Default")
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
!!! note
|
|
67
67
|
Callable prompts have full control over message structure and content parameter
|
|
68
68
|
is ignored. String/None prompts create standard system + user structure.
|
|
69
69
|
|
|
@@ -133,7 +133,7 @@ async def aresolve_prompt(
|
|
|
133
133
|
messages = await aresolve_prompt("Custom", state, runtime, "content", "default")
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
!!! note
|
|
137
137
|
Callable prompts have full control over message structure and content parameter
|
|
138
138
|
is ignored. Automatically detects and handles async callables.
|
|
139
139
|
|
|
@@ -49,7 +49,7 @@ StateLike: TypeAlias = TypedDictLikeV1 | TypedDictLikeV2 | DataclassLike | BaseM
|
|
|
49
49
|
|
|
50
50
|
It can either be a ``TypedDict``, ``dataclass``, or Pydantic ``BaseModel``.
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
!!! note
|
|
53
53
|
We cannot use either ``TypedDict`` or ``dataclass`` directly due to limitations in
|
|
54
54
|
type checking.
|
|
55
55
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"""langgraph.prebuilt exposes a higher-level API for creating and executing agents and tools."""
|
|
2
2
|
|
|
3
|
-
from langchain.agents.
|
|
4
|
-
from langchain.agents.
|
|
3
|
+
from langchain.agents.factory import create_agent
|
|
4
|
+
from langchain.agents.middleware.types import AgentState
|
|
5
5
|
|
|
6
6
|
__all__ = [
|
|
7
7
|
"AgentState",
|
|
8
|
-
"ToolNode",
|
|
9
8
|
"create_agent",
|
|
10
9
|
]
|