Compare commits
431 Commits
nc/pandas-
...
v0.0.317
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35c7c1f050 | ||
|
|
122af2effe | ||
|
|
c149954cc5 | ||
|
|
9e24626e87 | ||
|
|
6bd9c1d2b3 | ||
|
|
9bc7e1851a | ||
|
|
653cf56e0e | ||
|
|
debcf053eb | ||
|
|
e4ae690244 | ||
|
|
8e1b1db90d | ||
|
|
b753bf3323 | ||
|
|
202acce0c9 | ||
|
|
392df7b2e3 | ||
|
|
7f17ce3742 | ||
|
|
908c7bf33e | ||
|
|
43dc669332 | ||
|
|
2beb767ae5 | ||
|
|
a27fa9bf10 | ||
|
|
dcd0392423 | ||
|
|
1fd21ed21c | ||
|
|
9373b9c004 | ||
|
|
b647505280 | ||
|
|
67300567d3 | ||
|
|
23c261ba57 | ||
|
|
f4742dce50 | ||
|
|
0a24ac7388 | ||
|
|
3fb5e4d185 | ||
|
|
9ecb7240a4 | ||
|
|
42dcc502c7 | ||
|
|
90e9ec6962 | ||
|
|
ba0d729961 | ||
|
|
83162649bb | ||
|
|
12d7eaa0c2 | ||
|
|
5f4a697ce3 | ||
|
|
8b79cf9566 | ||
|
|
2a8ded6c8c | ||
|
|
57a02929d5 | ||
|
|
42cd2ef329 | ||
|
|
778e7c526e | ||
|
|
19319e1746 | ||
|
|
b0d5882fe1 | ||
|
|
12596b9a9b | ||
|
|
754aca794f | ||
|
|
cf448a6314 | ||
|
|
31f264169d | ||
|
|
eca8a5e5b8 | ||
|
|
e8c1850369 | ||
|
|
c4341463e8 | ||
|
|
c15701eebf | ||
|
|
c1d811c4bc | ||
|
|
0169d45ba8 | ||
|
|
c87b5c209d | ||
|
|
321506fcd1 | ||
|
|
be04695554 | ||
|
|
e69218504b | ||
|
|
7f0145315a | ||
|
|
ab145d85ec | ||
|
|
ff8e6981ff | ||
|
|
634ccb8ccd | ||
|
|
a1120e2685 | ||
|
|
2a6d4acc9d | ||
|
|
7c0f1bf23f | ||
|
|
c2c0814a94 | ||
|
|
cb7e12f6ba | ||
|
|
96e3e06d50 | ||
|
|
40d188948e | ||
|
|
e669f9d731 | ||
|
|
8bb8c56f74 | ||
|
|
9fdf1059a4 | ||
|
|
8b697ff0ee | ||
|
|
d269dd2e2f | ||
|
|
38ed55245f | ||
|
|
5019f59724 | ||
|
|
efa9ef75c0 | ||
|
|
d62369f478 | ||
|
|
52bf03d786 | ||
|
|
3be76ee2fa | ||
|
|
ea0982eede | ||
|
|
18a4fdded6 | ||
|
|
e3664272f0 | ||
|
|
049a0357e7 | ||
|
|
210a48cfb5 | ||
|
|
201b7ce9af | ||
|
|
25b1d65305 | ||
|
|
ece22b6b6a | ||
|
|
ffa1b3a758 | ||
|
|
4321d192ea | ||
|
|
6c5bb1b2e1 | ||
|
|
ccd1400423 | ||
|
|
8bf16d5275 | ||
|
|
a506302772 | ||
|
|
4a2f0c51a1 | ||
|
|
f3ad22e64a | ||
|
|
6e78dacd78 | ||
|
|
0d37b4c27d | ||
|
|
d6e34ca2ee | ||
|
|
233a904f2e | ||
|
|
6876b02c87 | ||
|
|
1559ba4bfc | ||
|
|
9f0a718198 | ||
|
|
9d200e6cbe | ||
|
|
7fb25b4154 | ||
|
|
f06fcde0d7 | ||
|
|
a3330c4258 | ||
|
|
1861cc7100 | ||
|
|
98c8516ef1 | ||
|
|
17c69678ab | ||
|
|
56653c53aa | ||
|
|
694d768174 | ||
|
|
8e6fa5f1d7 | ||
|
|
9e1e0f54d2 | ||
|
|
63e516c2b0 | ||
|
|
a9db2b0b92 | ||
|
|
6c61315067 | ||
|
|
11cdfe44af | ||
|
|
008348ce71 | ||
|
|
d3a5090e12 | ||
|
|
acdbdbddb1 | ||
|
|
48cf978391 | ||
|
|
e42a576cb2 | ||
|
|
9e32120cbb | ||
|
|
01b7b46908 | ||
|
|
35965df20d | ||
|
|
9d1867c77f | ||
|
|
6402c33299 | ||
|
|
3759a34229 | ||
|
|
bd74eba152 | ||
|
|
b54727fbad | ||
|
|
9c0584be74 | ||
|
|
bb2ed4615c | ||
|
|
361f8e1bc6 | ||
|
|
ead9d5b55c | ||
|
|
15687a28d5 | ||
|
|
467b082c34 | ||
|
|
51193309ea | ||
|
|
70a793ca9d | ||
|
|
e61b528c0e | ||
|
|
f386ac3bef | ||
|
|
ac73154005 | ||
|
|
af9ce3c224 | ||
|
|
77fcaa410a | ||
|
|
ca9de26f2b | ||
|
|
7f4734c0dd | ||
|
|
1c0857b53e | ||
|
|
44da27c07b | ||
|
|
0b743f005b | ||
|
|
2aba9ab47e | ||
|
|
629d9b78fa | ||
|
|
a477ddda45 | ||
|
|
9e81ab47be | ||
|
|
e75766b759 | ||
|
|
17b5090c18 | ||
|
|
c14a8df2ee | ||
|
|
17439daa6a | ||
|
|
4ba2c8ba75 | ||
|
|
7ae8b7f065 | ||
|
|
93bb19f69a | ||
|
|
18ebce2032 | ||
|
|
9beb03e771 | ||
|
|
1f7edcd08b | ||
|
|
ef99b06362 | ||
|
|
3c83779661 | ||
|
|
51a3a86022 | ||
|
|
70f7558db2 | ||
|
|
2363c02cf3 | ||
|
|
fbb82608cd | ||
|
|
9f39c23a13 | ||
|
|
d5e762d328 | ||
|
|
3cd0827785 | ||
|
|
dd0cd98861 | ||
|
|
d0603c86b6 | ||
|
|
28ee6a7c12 | ||
|
|
2c1e735403 | ||
|
|
539941281d | ||
|
|
7d0dda7e41 | ||
|
|
cf86447623 | ||
|
|
99adcdb1c9 | ||
|
|
06d5971be9 | ||
|
|
64969bc8ae | ||
|
|
ce0019b646 | ||
|
|
8f06085b24 | ||
|
|
5451b724fc | ||
|
|
0bff399af1 | ||
|
|
c9d4d53545 | ||
|
|
db67ccb0bb | ||
|
|
78b4c7d5a0 | ||
|
|
6dd7362a54 | ||
|
|
3a82bd7bdb | ||
|
|
9a0ed75a95 | ||
|
|
0ca8d4449c | ||
|
|
eedfddac2d | ||
|
|
7232e082de | ||
|
|
58220cda72 | ||
|
|
683f4a93b9 | ||
|
|
fca34eb122 | ||
|
|
49de862076 | ||
|
|
b6a2507794 | ||
|
|
b56ca0c2a4 | ||
|
|
59adeaddb3 | ||
|
|
c9bce5bbfb | ||
|
|
22abeb9f6c | ||
|
|
b642d00f9f | ||
|
|
c7c03d4709 | ||
|
|
e2a9072b80 | ||
|
|
55fef4b64b | ||
|
|
fd7f129f10 | ||
|
|
316dddc7cd | ||
|
|
1acfe86353 | ||
|
|
5de64e6d60 | ||
|
|
447a523662 | ||
|
|
8e45f720a8 | ||
|
|
ca2eed36b7 | ||
|
|
923e9f9596 | ||
|
|
258ae1ba5f | ||
|
|
2aabfafe1e | ||
|
|
d8fa94e6fa | ||
|
|
b42f218cfc | ||
|
|
f64522fbaf | ||
|
|
b14b65d62a | ||
|
|
4d62def9ff | ||
|
|
a992b9670d | ||
|
|
0a754fa286 | ||
|
|
2f2a5fd582 | ||
|
|
8932ed3f07 | ||
|
|
e7a0def1bc | ||
|
|
eec53fa294 | ||
|
|
09c66fe04f | ||
|
|
628cc4cce8 | ||
|
|
6a10e8ef31 | ||
|
|
eb572f41a6 | ||
|
|
484947c492 | ||
|
|
c3d2b01adf | ||
|
|
5470e730d2 | ||
|
|
29f5f70415 | ||
|
|
872836c541 | ||
|
|
8f50b616c5 | ||
|
|
bcd308c368 | ||
|
|
88ab69c288 | ||
|
|
53887242a1 | ||
|
|
1bf8ef1a4f | ||
|
|
a1c7532298 | ||
|
|
57ade13b2b | ||
|
|
d78f418c0d | ||
|
|
fd9da60aea | ||
|
|
35297ca0d3 | ||
|
|
8e3fbc97ca | ||
|
|
f1269830a0 | ||
|
|
656d2303f7 | ||
|
|
a3a2ce623e | ||
|
|
8fafa1af91 | ||
|
|
3b07c0cf3d | ||
|
|
56048b909f | ||
|
|
d17416ec79 | ||
|
|
3c7653bf0f | ||
|
|
d9018ae5f1 | ||
|
|
9f85f7c543 | ||
|
|
5944c1851b | ||
|
|
68901e1e40 | ||
|
|
790010703b | ||
|
|
f9df55f7d2 | ||
|
|
f5ce286932 | ||
|
|
9903a70379 | ||
|
|
1655ff2ded | ||
|
|
e4a46747dc | ||
|
|
2abbdc6ecb | ||
|
|
bfd48925e5 | ||
|
|
2c11302598 | ||
|
|
2aae1102b0 | ||
|
|
203258b4d6 | ||
|
|
4236ae3851 | ||
|
|
d9670a5945 | ||
|
|
fcccde406d | ||
|
|
9f73fec057 | ||
|
|
1d678f805f | ||
|
|
79011f835f | ||
|
|
656480feb6 | ||
|
|
31d5bd84d7 | ||
|
|
8aa545901a | ||
|
|
3e31d6e35f | ||
|
|
8b6b8bf68c | ||
|
|
2ff91a46c0 | ||
|
|
ca346011b7 | ||
|
|
53d4f1554a | ||
|
|
211a74941a | ||
|
|
5a1f614175 | ||
|
|
e2d6c41177 | ||
|
|
71fd6428c5 | ||
|
|
2f490be09b | ||
|
|
1e59c44d36 | ||
|
|
58b7a3ba16 | ||
|
|
c9986bc3a9 | ||
|
|
940b9ae30a | ||
|
|
b9fad28f5e | ||
|
|
22165cb2fc | ||
|
|
70be04a816 | ||
|
|
fde19c8667 | ||
|
|
9cea796671 | ||
|
|
91941d1f19 | ||
|
|
4d66756d93 | ||
|
|
a30f98f534 | ||
|
|
58a88f3911 | ||
|
|
71290315cf | ||
|
|
dd514c2781 | ||
|
|
4f4e0f38fc | ||
|
|
0d80226c64 | ||
|
|
106608bc89 | ||
|
|
88c5349196 | ||
|
|
b0893c7c6a | ||
|
|
b499de2926 | ||
|
|
34a64101cc | ||
|
|
2f83350eac | ||
|
|
37f2f71156 | ||
|
|
cdf5259ca9 | ||
|
|
939bceccb0 | ||
|
|
16a80779b9 | ||
|
|
9e3c1d4463 | ||
|
|
289de601c8 | ||
|
|
b0097f8908 | ||
|
|
06f39be1c2 | ||
|
|
1165767df2 | ||
|
|
1ca62b232b | ||
|
|
4adb2b399d | ||
|
|
c6d7124675 | ||
|
|
92683262f4 | ||
|
|
6e848b879a | ||
|
|
d21dd72d64 | ||
|
|
6a936488db | ||
|
|
0a4baca291 | ||
|
|
b93a08079e | ||
|
|
745e3e29da | ||
|
|
f3e13e7e5a | ||
|
|
39316314fa | ||
|
|
5d6b83d9cf | ||
|
|
42d979efdd | ||
|
|
3bddd708f7 | ||
|
|
feabf2e0d5 | ||
|
|
88bad37ec2 | ||
|
|
49b34e2293 | ||
|
|
bdf865d8e8 | ||
|
|
b3c83fdd33 | ||
|
|
2343302fc6 | ||
|
|
89436de7a7 | ||
|
|
6950b44bfc | ||
|
|
3a299b9680 | ||
|
|
32445de365 | ||
|
|
30d02e3a34 | ||
|
|
42d0d485a9 | ||
|
|
ccea1e9147 | ||
|
|
7185fdc990 | ||
|
|
248db75cd6 | ||
|
|
631289a38d | ||
|
|
a2f29bf595 | ||
|
|
534f1b63c5 | ||
|
|
3d700aa654 | ||
|
|
2dba4046fa | ||
|
|
b78d672a43 | ||
|
|
11f20cded1 | ||
|
|
514857c10e | ||
|
|
15d33a144d | ||
|
|
235dacc74a | ||
|
|
3a4c895280 | ||
|
|
327ea43c67 | ||
|
|
1d4e73b9f8 | ||
|
|
d6320cc2c0 | ||
|
|
7a4387c60d | ||
|
|
e1791225ae | ||
|
|
fdb611cc42 | ||
|
|
8d3a8fbefe | ||
|
|
9c45d5a27e | ||
|
|
f22fcb8bcd | ||
|
|
8dc5365ee2 | ||
|
|
5b6ebbc825 | ||
|
|
5c2069890f | ||
|
|
736e0dd46e | ||
|
|
5b1812f95b | ||
|
|
f1d144cd6c | ||
|
|
62cf108700 | ||
|
|
af4b560b86 | ||
|
|
00d56fb0fc | ||
|
|
b59e2b5afa | ||
|
|
ae5edefdcd | ||
|
|
e10980d445 | ||
|
|
0f7cde023b | ||
|
|
4e9aecda90 | ||
|
|
67dc1a9dd2 | ||
|
|
ca163f0ee6 | ||
|
|
b162f1c8e1 | ||
|
|
a9ba6a8cd1 | ||
|
|
2b90a8afa2 | ||
|
|
2c877a4a34 | ||
|
|
b7d0e4835e | ||
|
|
dfc3295a2c | ||
|
|
256849e02a | ||
|
|
d46ad01ee0 | ||
|
|
5fb781dfde | ||
|
|
48aaa27bf7 | ||
|
|
c4ccaebbbb | ||
|
|
7eaaad51de | ||
|
|
42bdb003ee | ||
|
|
f8b5c2977a | ||
|
|
5727148f2b | ||
|
|
72eab3b37e | ||
|
|
4b930f58e9 | ||
|
|
0a2724d8c7 | ||
|
|
5de212d907 | ||
|
|
f7fb083aba | ||
|
|
4e6e03ef50 | ||
|
|
d50c0f139d | ||
|
|
758225dc17 | ||
|
|
44485c2b26 | ||
|
|
8d10a52525 | ||
|
|
b3c0728de2 | ||
|
|
0b8691c6e5 | ||
|
|
a11ad11d06 | ||
|
|
dd6fff1c62 | ||
|
|
6a1102d4c0 | ||
|
|
7725192a0d | ||
|
|
2bfa73257f | ||
|
|
571ee718ba | ||
|
|
e9423300d9 | ||
|
|
c9e9c0eeae | ||
|
|
44badd0707 | ||
|
|
e276ae2616 | ||
|
|
5aafb3bc46 | ||
|
|
a2f807e055 | ||
|
|
1ae5a9c7a3 | ||
|
|
a6f9dccc35 | ||
|
|
b422dc035f | ||
|
|
c37fd29fd8 | ||
|
|
56b40beb0e | ||
|
|
6de1ca4251 |
13
.github/CONTRIBUTING.md
vendored
@@ -64,7 +64,7 @@ For a [development container](https://containers.dev/), see the [.devcontainer f
|
||||
|
||||
### Dependency Management: Poetry and other env/dependency managers
|
||||
|
||||
This project uses [Poetry](https://python-poetry.org/) v1.5.1+ as a dependency manager.
|
||||
This project uses [Poetry](https://python-poetry.org/) v1.6.1+ as a dependency manager.
|
||||
|
||||
❗Note: *Before installing Poetry*, if you use `Conda`, create and activate a new Conda env (e.g. `conda create -n langchain python=3.9`)
|
||||
|
||||
@@ -105,8 +105,8 @@ make test
|
||||
If the tests don't pass, you may need to pip install additional dependencies, such as `numexpr` and `openapi_schema_pydantic`.
|
||||
|
||||
If during installation you receive a `WheelFileValidationError` for `debugpy`, please make sure you are running
|
||||
Poetry v1.5.1+. This bug was present in older versions of Poetry (e.g. 1.4.1) and has been resolved in newer releases.
|
||||
If you are still seeing this bug on v1.5.1, you may also try disabling "modern installation"
|
||||
Poetry v1.6.1+. This bug was present in older versions of Poetry (e.g. 1.4.1) and has been resolved in newer releases.
|
||||
If you are still seeing this bug on v1.6.1, you may also try disabling "modern installation"
|
||||
(`poetry config installer.modern-installation false`) and re-installing requirements.
|
||||
See [this `debugpy` issue](https://github.com/microsoft/debugpy/issues/1246) for more details.
|
||||
|
||||
@@ -289,6 +289,13 @@ make docs_linkcheck
|
||||
make api_docs_linkcheck
|
||||
```
|
||||
|
||||
### Verify Documentation changes
|
||||
|
||||
After pushing documentation changes to the repository, you can preview and verify that the changes are
|
||||
what you wanted by clicking the `View deployment` or `Visit Preview` buttons on the pull request `Conversation` page.
|
||||
This will take you to a preview of the documentation changes.
|
||||
This preview is created by [Vercel](https://vercel.com/docs/getting-started-with-vercel).
|
||||
|
||||
## 🏭 Release Process
|
||||
|
||||
As of now, LangChain has an ad hoc release process: releases are cut with high frequency by
|
||||
|
||||
2
.github/workflows/_lint.yml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
description: "From which folder this pipeline executes"
|
||||
|
||||
env:
|
||||
POETRY_VERSION: "1.5.1"
|
||||
POETRY_VERSION: "1.6.1"
|
||||
WORKDIR: ${{ inputs.working-directory == '' && '.' || inputs.working-directory }}
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -9,7 +9,7 @@ on:
|
||||
description: "From which folder this pipeline executes"
|
||||
|
||||
env:
|
||||
POETRY_VERSION: "1.5.1"
|
||||
POETRY_VERSION: "1.6.1"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
2
.github/workflows/_release.yml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
description: "From which folder this pipeline executes"
|
||||
|
||||
env:
|
||||
POETRY_VERSION: "1.5.1"
|
||||
POETRY_VERSION: "1.6.1"
|
||||
|
||||
jobs:
|
||||
if_release:
|
||||
|
||||
2
.github/workflows/_test.yml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
description: "From which folder this pipeline executes"
|
||||
|
||||
env:
|
||||
POETRY_VERSION: "1.5.1"
|
||||
POETRY_VERSION: "1.6.1"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
2
.github/workflows/doc_lint.yml
vendored
@@ -19,4 +19,4 @@ jobs:
|
||||
run: |
|
||||
# We should not encourage imports directly from main init file
|
||||
# Expect for hub
|
||||
git grep 'from langchain import' docs/{extras,docs_skeleton,snippets} | grep -vE 'from langchain import (hub)' && exit 1 || exit 0
|
||||
git grep 'from langchain import' docs/{docs,snippets} | grep -vE 'from langchain import (hub)' && exit 1 || exit 0
|
||||
|
||||
2
.github/workflows/langchain_ci.yml
vendored
@@ -26,7 +26,7 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
POETRY_VERSION: "1.5.1"
|
||||
POETRY_VERSION: "1.6.1"
|
||||
WORKDIR: "libs/langchain"
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -26,7 +26,7 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
POETRY_VERSION: "1.5.1"
|
||||
POETRY_VERSION: "1.6.1"
|
||||
WORKDIR: "libs/experimental"
|
||||
|
||||
jobs:
|
||||
|
||||
14
.github/workflows/langchain_release.yml
vendored
@@ -11,3 +11,17 @@ jobs:
|
||||
with:
|
||||
working-directory: libs/langchain
|
||||
secrets: inherit
|
||||
|
||||
# N.B.: It's possible that PyPI doesn't make the new release visible / available
|
||||
# immediately after publishing. If that happens, the docker build might not
|
||||
# create a new docker image for the new release, since it won't see it.
|
||||
#
|
||||
# If this ends up being a problem, add a check to the end of the `_release.yml`
|
||||
# workflow that prevents the workflow from finishing until the new release
|
||||
# is visible and installable on PyPI.
|
||||
release-docker:
|
||||
needs:
|
||||
- release
|
||||
uses:
|
||||
./.github/workflows/langchain_release_docker.yml
|
||||
secrets: inherit
|
||||
|
||||
@@ -3,6 +3,7 @@ name: docker/langchain/langchain Release
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Allows to trigger the workflow manually in GitHub UI
|
||||
workflow_call: # Allows triggering from another workflow
|
||||
|
||||
jobs:
|
||||
release:
|
||||
|
||||
82
.github/workflows/langserve_ci.yml
vendored
@@ -1,82 +0,0 @@
|
||||
---
|
||||
name: libs/langserve CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/actions/poetry_setup/action.yml'
|
||||
- '.github/tools/**'
|
||||
- '.github/workflows/_lint.yml'
|
||||
- '.github/workflows/_test.yml'
|
||||
- '.github/workflows/langserve_ci.yml'
|
||||
- 'libs/langserve/**'
|
||||
workflow_dispatch: # Allows to trigger the workflow manually in GitHub UI
|
||||
|
||||
# If another push to the same PR or branch happens while this workflow is still running,
|
||||
# cancel the earlier run in favor of the next run.
|
||||
#
|
||||
# There's no point in testing an outdated version of the code. GitHub only allows
|
||||
# a limited number of job runners to be active at the same time, so it's better to cancel
|
||||
# pointless jobs early so that more useful jobs can run sooner.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
POETRY_VERSION: "1.5.1"
|
||||
WORKDIR: "libs/langserve"
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
uses:
|
||||
./.github/workflows/_lint.yml
|
||||
with:
|
||||
working-directory: libs/langserve
|
||||
secrets: inherit
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ env.WORKDIR }}
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
name: Python ${{ matrix.python-version }} extended tests
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
|
||||
uses: "./.github/actions/poetry_setup"
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
poetry-version: ${{ env.POETRY_VERSION }}
|
||||
working-directory: libs/langserve
|
||||
cache-key: langserve-all
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Running extended tests, installing dependencies with poetry..."
|
||||
poetry install --with test,lint --extras all
|
||||
|
||||
- name: Run tests
|
||||
run: make test
|
||||
|
||||
- name: Ensure the tests did not create any additional files
|
||||
shell: bash
|
||||
run: |
|
||||
set -eu
|
||||
|
||||
STATUS="$(git status)"
|
||||
echo "$STATUS"
|
||||
|
||||
# grep will exit non-zero if the target message isn't found,
|
||||
# and `set -e` above will cause the step to fail.
|
||||
echo "$STATUS" | grep 'nothing to commit, working tree clean'
|
||||
13
.github/workflows/langserve_release.yml
vendored
@@ -1,13 +0,0 @@
|
||||
---
|
||||
name: libs/langserve Release
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Allows to trigger the workflow manually in GitHub UI
|
||||
|
||||
jobs:
|
||||
release:
|
||||
uses:
|
||||
./.github/workflows/_release.yml
|
||||
with:
|
||||
working-directory: libs/langserve
|
||||
secrets: inherit
|
||||
18
.github/workflows/scheduled_test.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
- cron: '0 13 * * *'
|
||||
|
||||
env:
|
||||
POETRY_VERSION: "1.5.1"
|
||||
POETRY_VERSION: "1.6.1"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -61,5 +61,21 @@ jobs:
|
||||
env:
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
AZURE_OPENAI_API_VERSION: ${{ secrets.AZURE_OPENAI_API_VERSION }}
|
||||
AZURE_OPENAI_API_BASE: ${{ secrets.AZURE_OPENAI_API_BASE }}
|
||||
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
|
||||
AZURE_OPENAI_DEPLOYMENT_NAME: ${{ secrets.AZURE_OPENAI_DEPLOYMENT_NAME }}
|
||||
run: |
|
||||
make scheduled_tests
|
||||
|
||||
- name: Ensure the tests did not create any additional files
|
||||
shell: bash
|
||||
run: |
|
||||
set -eu
|
||||
|
||||
STATUS="$(git status)"
|
||||
echo "$STATUS"
|
||||
|
||||
# grep will exit non-zero if the target message isn't found,
|
||||
# and `set -e` above will cause the step to fail.
|
||||
echo "$STATUS" | grep 'nothing to commit, working tree clean'
|
||||
|
||||
7
.gitignore
vendored
@@ -174,6 +174,7 @@ docs/api_reference/*/
|
||||
!docs/api_reference/_static/
|
||||
!docs/api_reference/templates/
|
||||
!docs/api_reference/themes/
|
||||
docs/docs_skeleton/build
|
||||
docs/docs_skeleton/node_modules
|
||||
docs/docs_skeleton/yarn.lock
|
||||
docs/docs/build
|
||||
docs/docs/node_modules
|
||||
docs/docs/yarn.lock
|
||||
_dist
|
||||
|
||||
4
.gitmodules
vendored
@@ -1,4 +0,0 @@
|
||||
[submodule "docs/_docs_skeleton"]
|
||||
path = docs/_docs_skeleton
|
||||
url = https://github.com/langchain-ai/langchain-shared-docs
|
||||
branch = main
|
||||
@@ -9,9 +9,14 @@ build:
|
||||
os: ubuntu-22.04
|
||||
tools:
|
||||
python: "3.11"
|
||||
jobs:
|
||||
pre_build:
|
||||
commands:
|
||||
- python -mvirtualenv $READTHEDOCS_VIRTUALENV_PATH
|
||||
- python -m pip install --upgrade --no-cache-dir pip setuptools
|
||||
- python -m pip install --upgrade --no-cache-dir sphinx readthedocs-sphinx-ext
|
||||
- python -m pip install --exists-action=w --no-cache-dir -r docs/api_reference/requirements.txt
|
||||
- python docs/api_reference/create_api_rst.py
|
||||
- cat docs/api_reference/conf.py
|
||||
- python -m sphinx -T -E -b html -d _build/doctrees -c docs/api_reference docs/api_reference $READTHEDOCS_OUTPUT/html -j auto
|
||||
|
||||
# Build documentation in the docs/ directory with Sphinx
|
||||
sphinx:
|
||||
@@ -25,5 +30,3 @@ sphinx:
|
||||
python:
|
||||
install:
|
||||
- requirements: docs/api_reference/requirements.txt
|
||||
- method: pip
|
||||
path: .
|
||||
|
||||
6
Makefile
@@ -15,10 +15,10 @@ docs_build:
|
||||
docs/.local_build.sh
|
||||
|
||||
docs_clean:
|
||||
rm -r docs/_dist
|
||||
rm -r _dist
|
||||
|
||||
docs_linkcheck:
|
||||
poetry run linkchecker docs/_dist/docs_skeleton/ --ignore-url node_modules
|
||||
poetry run linkchecker _dist/docs/ --ignore-url node_modules
|
||||
|
||||
api_docs_build:
|
||||
poetry run python docs/api_reference/create_api_rst.py
|
||||
@@ -53,4 +53,4 @@ help:
|
||||
@echo 'api_docs_linkcheck - run linkchecker on the API Reference documentation'
|
||||
@echo 'spell_check - run codespell on the project'
|
||||
@echo 'spell_fix - run codespell on the project and fix the errors'
|
||||
@echo '-- TEST and LINT tasks are within libs/*/ per-package --'
|
||||
@echo '-- TEST and LINT tasks are within libs/*/ per-package --'
|
||||
|
||||
@@ -18,8 +18,9 @@
|
||||
|
||||
Looking for the JS/TS version? Check out [LangChain.js](https://github.com/langchain-ai/langchainjs).
|
||||
|
||||
**Production Support:** As you move your LangChains into production, we'd love to offer more hands-on support.
|
||||
Fill out [this form](https://airtable.com/appwQzlErAS2qiP0L/shrGtGaVBVAz7NcV2) to share more about what you're building, and our team will get in touch.
|
||||
To help you ship LangChain apps to production faster, check out [LangSmith](https://smith.langchain.com).
|
||||
[LangSmith](https://smith.langchain.com) is a unified developer platform for building, testing, and monitoring LLM applications.
|
||||
Fill out [this form](https://airtable.com/appwQzlErAS2qiP0L/shrGtGaVBVAz7NcV2) to get off the waitlist or speak with our sales team
|
||||
|
||||
## 🚨Breaking Changes for select chains (SQLDatabase) on 7/28/23
|
||||
|
||||
|
||||
377
cookbook/LLaMA2_sql_chat.ipynb
Normal file
449
cookbook/Semi_Structured_RAG.ipynb
Normal file
706
cookbook/Semi_structured_and_multi_modal_RAG.ipynb
Normal file
597
cookbook/Semi_structured_multi_modal_RAG_LLaMA2.ipynb
Normal file
@@ -940,7 +940,7 @@
|
||||
"- DocArrayRetriever\n",
|
||||
"- ElasticSearchBM25Retriever\n",
|
||||
"- EnsembleRetriever\n",
|
||||
"- GoogleCloudEnterpriseSearchRetriever\n",
|
||||
"- GoogleVertexAISearchRetriever\n",
|
||||
"- AmazonKendraRetriever\n",
|
||||
"- KNNRetriever\n",
|
||||
"- LlamaIndexGraphRetriever and LlamaIndexRetriever\n",
|
||||
@@ -992,7 +992,7 @@
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"{'question': 'LangChain possesses a variety of retrievers including:\\n\\n1. ArxivRetriever\\n2. AzureCognitiveSearchRetriever\\n3. BM25Retriever\\n4. ChaindeskRetriever\\n5. ChatGPTPluginRetriever\\n6. ContextualCompressionRetriever\\n7. DocArrayRetriever\\n8. ElasticSearchBM25Retriever\\n9. EnsembleRetriever\\n10. GoogleCloudEnterpriseSearchRetriever\\n11. AmazonKendraRetriever\\n12. KNNRetriever\\n13. LlamaIndexGraphRetriever\\n14. LlamaIndexRetriever\\n15. MergerRetriever\\n16. MetalRetriever\\n17. MilvusRetriever\\n18. MultiQueryRetriever\\n19. ParentDocumentRetriever\\n20. PineconeHybridSearchRetriever\\n21. PubMedRetriever\\n22. RePhraseQueryRetriever\\n23. RemoteLangChainRetriever\\n24. SelfQueryRetriever\\n25. SVMRetriever\\n26. TFIDFRetriever\\n27. TimeWeightedVectorStoreRetriever\\n28. VespaRetriever\\n29. WeaviateHybridSearchRetriever\\n30. WebResearchRetriever\\n31. WikipediaRetriever\\n32. ZepRetriever\\n33. ZillizRetriever\\n\\nIt also includes self query translators like:\\n\\n1. ChromaTranslator\\n2. DeepLakeTranslator\\n3. MyScaleTranslator\\n4. PineconeTranslator\\n5. QdrantTranslator\\n6. WeaviateTranslator\\n\\nAnd remote retrievers like:\\n\\n1. RemoteLangChainRetriever'}"
|
||||
"{'question': 'LangChain possesses a variety of retrievers including:\\n\\n1. ArxivRetriever\\n2. AzureCognitiveSearchRetriever\\n3. BM25Retriever\\n4. ChaindeskRetriever\\n5. ChatGPTPluginRetriever\\n6. ContextualCompressionRetriever\\n7. DocArrayRetriever\\n8. ElasticSearchBM25Retriever\\n9. EnsembleRetriever\\n10. GoogleVertexAISearchRetriever\\n11. AmazonKendraRetriever\\n12. KNNRetriever\\n13. LlamaIndexGraphRetriever\\n14. LlamaIndexRetriever\\n15. MergerRetriever\\n16. MetalRetriever\\n17. MilvusRetriever\\n18. MultiQueryRetriever\\n19. ParentDocumentRetriever\\n20. PineconeHybridSearchRetriever\\n21. PubMedRetriever\\n22. RePhraseQueryRetriever\\n23. RemoteLangChainRetriever\\n24. SelfQueryRetriever\\n25. SVMRetriever\\n26. TFIDFRetriever\\n27. TimeWeightedVectorStoreRetriever\\n28. VespaRetriever\\n29. WeaviateHybridSearchRetriever\\n30. WebResearchRetriever\\n31. WikipediaRetriever\\n32. ZepRetriever\\n33. ZillizRetriever\\n\\nIt also includes self query translators like:\\n\\n1. ChromaTranslator\\n2. DeepLakeTranslator\\n3. MyScaleTranslator\\n4. PineconeTranslator\\n5. QdrantTranslator\\n6. WeaviateTranslator\\n\\nAnd remote retrievers like:\\n\\n1. RemoteLangChainRetriever'}"
|
||||
]
|
||||
},
|
||||
"execution_count": 31,
|
||||
@@ -1124,7 +1124,7 @@
|
||||
"- DocArrayRetriever\n",
|
||||
"- ElasticSearchBM25Retriever\n",
|
||||
"- EnsembleRetriever\n",
|
||||
"- GoogleCloudEnterpriseSearchRetriever\n",
|
||||
"- GoogleVertexAISearchRetriever\n",
|
||||
"- AmazonKendraRetriever\n",
|
||||
"- KNNRetriever\n",
|
||||
"- LlamaIndexGraphRetriever and LlamaIndexRetriever\n",
|
||||
@@ -6,7 +6,7 @@
|
||||
"source": [
|
||||
"# Elasticsearch\n",
|
||||
"\n",
|
||||
"[](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/extras/use_cases/qa_structured/integrations/elasticsearch.ipynb)\n",
|
||||
"[](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/use_cases/qa_structured/integrations/elasticsearch.ipynb)\n",
|
||||
"\n",
|
||||
"We can use LLMs to interact with Elasticsearch analytics databases in natural language.\n",
|
||||
"\n",
|
||||
@@ -135,9 +135,9 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# We set this so we can see what exactly is going on\n",
|
||||
"import langchain\n",
|
||||
"from langchain.globals import set_verbose\n",
|
||||
"\n",
|
||||
"langchain.verbose = True"
|
||||
"set_verbose(True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -489,7 +489,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.3"
|
||||
"version": "3.10.1"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
835
cookbook/learned_prompt_optimization.ipynb
Normal file
@@ -10,7 +10,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -37,13 +37,13 @@
|
||||
"'Hello World\\n'"
|
||||
]
|
||||
},
|
||||
"execution_count": 9,
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from langchain.chains import LLMBashChain\n",
|
||||
"from langchain_experimental.llm_bash.base import LLMBashChain\n",
|
||||
"from langchain.llms import OpenAI\n",
|
||||
"\n",
|
||||
"llm = OpenAI(temperature=0)\n",
|
||||
@@ -65,7 +65,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -98,7 +98,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -125,7 +125,7 @@
|
||||
"'Hello World\\n'"
|
||||
]
|
||||
},
|
||||
"execution_count": 11,
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -149,7 +149,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -166,28 +166,24 @@
|
||||
"cd ..\n",
|
||||
"```\u001b[0m\n",
|
||||
"Code: \u001b[33;1m\u001b[1;3m['ls', 'cd ..']\u001b[0m\n",
|
||||
"Answer: \u001b[33;1m\u001b[1;3mapi.html\t\t\tllm_summarization_checker.html\n",
|
||||
"constitutional_chain.html\tmoderation.html\n",
|
||||
"llm_bash.html\t\t\topenai_openapi.yaml\n",
|
||||
"llm_checker.html\t\topenapi.html\n",
|
||||
"llm_math.html\t\t\tpal.html\n",
|
||||
"llm_requests.html\t\tsqlite.html\u001b[0m\n",
|
||||
"Answer: \u001b[33;1m\u001b[1;3mcpal.ipynb llm_bash.ipynb llm_symbolic_math.ipynb\n",
|
||||
"index.mdx llm_math.ipynb pal.ipynb\u001b[0m\n",
|
||||
"\u001b[1m> Finished chain.\u001b[0m\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"'api.html\\t\\t\\tllm_summarization_checker.html\\r\\nconstitutional_chain.html\\tmoderation.html\\r\\nllm_bash.html\\t\\t\\topenai_openapi.yaml\\r\\nllm_checker.html\\t\\topenapi.html\\r\\nllm_math.html\\t\\t\\tpal.html\\r\\nllm_requests.html\\t\\tsqlite.html'"
|
||||
"'cpal.ipynb llm_bash.ipynb llm_symbolic_math.ipynb\\r\\nindex.mdx llm_math.ipynb pal.ipynb'"
|
||||
]
|
||||
},
|
||||
"execution_count": 12,
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from langchain.utilities.bash import BashProcess\n",
|
||||
"from langchain_experimental.llm_bash.bash import BashProcess\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"persistent_process = BashProcess(persistent=True)\n",
|
||||
@@ -200,7 +196,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -217,18 +213,19 @@
|
||||
"cd ..\n",
|
||||
"```\u001b[0m\n",
|
||||
"Code: \u001b[33;1m\u001b[1;3m['ls', 'cd ..']\u001b[0m\n",
|
||||
"Answer: \u001b[33;1m\u001b[1;3mexamples\t\tgetting_started.html\tindex_examples\n",
|
||||
"generic\t\t\thow_to_guides.rst\u001b[0m\n",
|
||||
"Answer: \u001b[33;1m\u001b[1;3m_category_.yml\tdata_generation.ipynb\t\t self_check\n",
|
||||
"agents\t\tgraph\n",
|
||||
"code_writing\tlearned_prompt_optimization.ipynb\u001b[0m\n",
|
||||
"\u001b[1m> Finished chain.\u001b[0m\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"'examples\\t\\tgetting_started.html\\tindex_examples\\r\\ngeneric\\t\\t\\thow_to_guides.rst'"
|
||||
"'_category_.yml\\tdata_generation.ipynb\\t\\t self_check\\r\\nagents\\t\\tgraph\\r\\ncode_writing\\tlearned_prompt_optimization.ipynb'"
|
||||
]
|
||||
},
|
||||
"execution_count": 13,
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -237,13 +234,6 @@
|
||||
"# Run the same command again and see that the state is maintained between calls\n",
|
||||
"bash_chain.run(text)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
@@ -262,7 +252,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.3"
|
||||
"version": "3.11.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
@@ -10,12 +10,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain.llms import OpenAI\n",
|
||||
"from langchain.chains.llm_symbolic_math.base import LLMSymbolicMathChain\n",
|
||||
"from langchain_experimental.llm_symbolic_math.base import LLMSymbolicMathChain\n",
|
||||
"\n",
|
||||
"llm = OpenAI(temperature=0)\n",
|
||||
"llm_symbolic_math = LLMSymbolicMathChain.from_llm(llm)"
|
||||
@@ -30,7 +30,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 23,
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -39,7 +39,7 @@
|
||||
"'Answer: exp(x)*sin(x) + exp(x)*cos(x)'"
|
||||
]
|
||||
},
|
||||
"execution_count": 23,
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -50,7 +50,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 18,
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -59,7 +59,7 @@
|
||||
"'Answer: exp(x)*sin(x)'"
|
||||
]
|
||||
},
|
||||
"execution_count": 18,
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -79,7 +79,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 19,
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -88,7 +88,7 @@
|
||||
"'Answer: Eq(y(t), C2*exp(-t) + (C1 + t/2)*exp(t))'"
|
||||
]
|
||||
},
|
||||
"execution_count": 19,
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -99,7 +99,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 21,
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -108,7 +108,7 @@
|
||||
"'Answer: {0, -sqrt(3)*I/3, sqrt(3)*I/3}'"
|
||||
]
|
||||
},
|
||||
"execution_count": 21,
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -119,7 +119,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 22,
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -128,7 +128,7 @@
|
||||
"'Answer: (3 - sqrt(7), -sqrt(7) - 2, 1 - sqrt(7)), (sqrt(7) + 3, -2 + sqrt(7), 1 + sqrt(7))'"
|
||||
]
|
||||
},
|
||||
"execution_count": 22,
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -140,9 +140,9 @@
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "venv",
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "venv"
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
@@ -154,9 +154,9 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.3"
|
||||
"version": "3.11.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
"nbformat_minor": 4
|
||||
}
|
||||
252
cookbook/plan_and_execute_agent.ipynb
Normal file
@@ -0,0 +1,252 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "0ddfef23-3c74-444c-81dd-6753722997fa",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Plan-and-execute\n",
|
||||
"\n",
|
||||
"Plan-and-execute agents accomplish an objective by first planning what to do, then executing the sub tasks. This idea is largely inspired by [BabyAGI](https://github.com/yoheinakajima/babyagi) and then the [\"Plan-and-Solve\" paper](https://arxiv.org/abs/2305.04091).\n",
|
||||
"\n",
|
||||
"The planning is almost always done by an LLM.\n",
|
||||
"\n",
|
||||
"The execution is usually done by a separate agent (equipped with tools)."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "a7ecb22a-7009-48ec-b14e-f0fa5aac1cd0",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Imports"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"id": "5fbbd4ee-bfe8-4a25-afe4-8d1a552a3d2e",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain.agents.tools import Tool\n",
|
||||
"from langchain.chains import LLMMathChain\n",
|
||||
"from langchain.chat_models import ChatOpenAI\n",
|
||||
"from langchain.llms import OpenAI\n",
|
||||
"from langchain.utilities import DuckDuckGoSearchAPIWrapper\n",
|
||||
"from langchain_experimental.plan_and_execute import PlanAndExecute, load_agent_executor, load_chat_planner"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e0e995e5-af9d-4988-bcd0-467a2a2e18cd",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Tools"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"id": "1d789f4e-54e3-4602-891a-f076e0ab9594",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"search = DuckDuckGoSearchAPIWrapper()\n",
|
||||
"llm = OpenAI(temperature=0)\n",
|
||||
"llm_math_chain = LLMMathChain.from_llm(llm=llm, verbose=True)\n",
|
||||
"tools = [\n",
|
||||
" Tool(\n",
|
||||
" name=\"Search\",\n",
|
||||
" func=search.run,\n",
|
||||
" description=\"useful for when you need to answer questions about current events\"\n",
|
||||
" ),\n",
|
||||
" Tool(\n",
|
||||
" name=\"Calculator\",\n",
|
||||
" func=llm_math_chain.run,\n",
|
||||
" description=\"useful for when you need to answer questions about math\"\n",
|
||||
" ),\n",
|
||||
"]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "04dc6452-a07f-49f9-be12-95be1e2afccc",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Planner, Executor, and Agent\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "d8f49c03-c804-458b-8122-c92b26c7b7dd",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"model = ChatOpenAI(temperature=0)\n",
|
||||
"planner = load_chat_planner(model)\n",
|
||||
"executor = load_agent_executor(model, tools, verbose=True)\n",
|
||||
"agent = PlanAndExecute(planner=planner, executor=executor)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "78ba03dd-0322-4927-b58d-a7e2027fdbb3",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Run example"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"id": "a57f7efe-7866-47a7-bce5-9c7b1047964e",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
"\n",
|
||||
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
|
||||
"\u001b[32;1m\u001b[1;3mAction:\n",
|
||||
"{\n",
|
||||
" \"action\": \"Search\",\n",
|
||||
" \"action_input\": \"current prime minister of the UK\"\n",
|
||||
"}\u001b[0m\n",
|
||||
"\n",
|
||||
"\u001b[1m> Finished chain.\u001b[0m\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
|
||||
"\u001b[32;1m\u001b[1;3mAction:\n",
|
||||
"```\n",
|
||||
"{\n",
|
||||
" \"action\": \"Search\",\n",
|
||||
" \"action_input\": \"current prime minister of the UK\"\n",
|
||||
"}\n",
|
||||
"```\u001b[0m\n",
|
||||
"Observation: \u001b[36;1m\u001b[1;3mBottom right: Rishi Sunak is the current prime minister and the first non-white prime minister. The prime minister of the United Kingdom is the principal minister of the crown of His Majesty's Government, and the head of the British Cabinet. 3 min. British Prime Minister Rishi Sunak asserted his stance on gender identity in a speech Wednesday, stating it was \"common sense\" that \"a man is a man and a woman is a woman\" — a ... The former chancellor Rishi Sunak is the UK's new prime minister. Here's what you need to know about him. He won after running for the second time this year He lost to Liz Truss in September,... Isaeli Prime Minister Benjamin Netanyahu spoke with US President Joe Biden on Wednesday, the prime minister's office said in a statement. Netanyahu \"thanked the President for the powerful words of ... By Yasmeen Serhan/London Updated: October 25, 2022 12:56 PM EDT | Originally published: October 24, 2022 9:17 AM EDT S top me if you've heard this one before: After a tumultuous period of political...\u001b[0m\n",
|
||||
"Thought:\u001b[32;1m\u001b[1;3mThe search results indicate that Rishi Sunak is the current prime minister of the UK. However, it's important to note that this information may not be accurate or up to date.\u001b[0m\n",
|
||||
"\n",
|
||||
"\u001b[1m> Finished chain.\u001b[0m\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
|
||||
"\u001b[32;1m\u001b[1;3mAction:\n",
|
||||
"```\n",
|
||||
"{\n",
|
||||
" \"action\": \"Search\",\n",
|
||||
" \"action_input\": \"current age of the prime minister of the UK\"\n",
|
||||
"}\n",
|
||||
"```\u001b[0m\n",
|
||||
"Observation: \u001b[36;1m\u001b[1;3mHow old is Rishi Sunak? Mr Sunak was born on 12 May, 1980, making him 42 years old. He first became an MP in 2015, aged 34, and has served the constituency of Richmond in Yorkshire ever since. He... Prime Ministers' ages when they took office From oldest to youngest, the ages of the PMs were as follows: Winston Churchill - 65 years old James Callaghan - 64 years old Clement Attlee - 62 years... Anna Kaufman USA TODAY Just a few days after Liz Truss resigned as prime minister, the UK has a new prime minister. Truss, who lasted a mere 45 days in office, will be replaced by Rishi... Advertisement Rishi Sunak is the youngest British prime minister of modern times. Mr. Sunak is 42 and started out in Parliament in 2015. Rishi Sunak was appointed as chancellor of the Exchequer... The first prime minister of the current United Kingdom of Great Britain and Northern Ireland upon its effective creation in 1922 (when 26 Irish counties seceded and created the Irish Free State) was Bonar Law, [10] although the country was not renamed officially until 1927, when Stanley Baldwin was the serving prime minister. [11]\u001b[0m\n",
|
||||
"Thought:\u001b[32;1m\u001b[1;3mBased on the search results, it seems that Rishi Sunak is the current prime minister of the UK. However, I couldn't find any specific information about his age. Would you like me to search again for the current age of the prime minister?\n",
|
||||
"\n",
|
||||
"Action:\n",
|
||||
"```\n",
|
||||
"{\n",
|
||||
" \"action\": \"Search\",\n",
|
||||
" \"action_input\": \"age of Rishi Sunak\"\n",
|
||||
"}\n",
|
||||
"```\u001b[0m\n",
|
||||
"Observation: \u001b[36;1m\u001b[1;3mRishi Sunak is 42 years old, making him the youngest person to hold the office of prime minister in modern times. How tall is Rishi Sunak? How Old Is Rishi Sunak? Rishi Sunak was born on May 12, 1980, in Southampton, England. Parents and Nationality Sunak's parents were born to Indian-origin families in East Africa before... Born on May 12, 1980, Rishi is currently 42 years old. He has been a member of parliament since 2015 where he was an MP for Richmond and has served in roles including Chief Secretary to the Treasury and the Chancellor of Exchequer while Boris Johnson was PM. Family Murty, 42, is the daughter of the Indian billionaire NR Narayana Murthy, often described as the Bill Gates of India, who founded the software company Infosys. According to reports, his... Sunak became the first non-White person to lead the country and, at age 42, the youngest to take on the role in more than a century. Like most politicians, Sunak is revered by some and...\u001b[0m\n",
|
||||
"Thought:\u001b[32;1m\u001b[1;3mBased on the search results, Rishi Sunak is currently 42 years old. He was born on May 12, 1980.\u001b[0m\n",
|
||||
"\n",
|
||||
"\u001b[1m> Finished chain.\u001b[0m\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
|
||||
"\u001b[32;1m\u001b[1;3mThought: To calculate the age raised to the power of 0.43, I can use the calculator tool.\n",
|
||||
"\n",
|
||||
"Action:\n",
|
||||
"```json\n",
|
||||
"{\n",
|
||||
" \"action\": \"Calculator\",\n",
|
||||
" \"action_input\": \"42^0.43\"\n",
|
||||
"}\n",
|
||||
"```\u001b[0m\n",
|
||||
"\n",
|
||||
"\u001b[1m> Entering new LLMMathChain chain...\u001b[0m\n",
|
||||
"42^0.43\u001b[32;1m\u001b[1;3m```text\n",
|
||||
"42**0.43\n",
|
||||
"```\n",
|
||||
"...numexpr.evaluate(\"42**0.43\")...\n",
|
||||
"\u001b[0m\n",
|
||||
"Answer: \u001b[33;1m\u001b[1;3m4.9888126515157\u001b[0m\n",
|
||||
"\u001b[1m> Finished chain.\u001b[0m\n",
|
||||
"\n",
|
||||
"Observation: \u001b[33;1m\u001b[1;3mAnswer: 4.9888126515157\u001b[0m\n",
|
||||
"Thought:\u001b[32;1m\u001b[1;3mThe age raised to the power of 0.43 is approximately 4.9888126515157.\n",
|
||||
"\n",
|
||||
"Final Answer:\n",
|
||||
"```json\n",
|
||||
"{\n",
|
||||
" \"action\": \"Final Answer\",\n",
|
||||
" \"action_input\": \"The age raised to the power of 0.43 is approximately 4.9888126515157.\"\n",
|
||||
"}\n",
|
||||
"```\u001b[0m\n",
|
||||
"\n",
|
||||
"\u001b[1m> Finished chain.\u001b[0m\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
|
||||
"\u001b[32;1m\u001b[1;3mAction:\n",
|
||||
"```\n",
|
||||
"{\n",
|
||||
" \"action\": \"Final Answer\",\n",
|
||||
" \"action_input\": \"The current prime minister of the UK is Rishi Sunak. His age raised to the power of 0.43 is approximately 4.9888126515157.\"\n",
|
||||
"}\n",
|
||||
"```\u001b[0m\n",
|
||||
"\n",
|
||||
"\u001b[1m> Finished chain.\u001b[0m\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"'The current prime minister of the UK is Rishi Sunak. His age raised to the power of 0.43 is approximately 4.9888126515157.'"
|
||||
]
|
||||
},
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"agent.run(\"Who is the current prime minister of the UK? What is their current age raised to the 0.43 power?\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "0ef78a07-1a2a-46f8-9bc9-ae45f9bd706c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "poetry-venv",
|
||||
"language": "python",
|
||||
"name": "poetry-venv"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.1"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
"\n",
|
||||
"SalesGPT is context-aware, which means it can understand what section of a sales conversation it is in and act accordingly.\n",
|
||||
" \n",
|
||||
"As such, this agent can have a natural sales conversation with a prospect and behaves based on the conversation stage. Hence, this notebook demonstrates how we can use AI to automate sales development representatives activites, such as outbound sales calls. \n",
|
||||
"As such, this agent can have a natural sales conversation with a prospect and behaves based on the conversation stage. Hence, this notebook demonstrates how we can use AI to automate sales development representatives activities, such as outbound sales calls. \n",
|
||||
"\n",
|
||||
"Additionally, the AI Sales agent has access to tools, which allow it to interact with other systems.\n",
|
||||
"\n",
|
||||
@@ -66,7 +66,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# install aditional dependencies\n",
|
||||
"# install additional dependencies\n",
|
||||
"# ! pip install chromadb openai tiktoken"
|
||||
]
|
||||
},
|
||||
@@ -150,7 +150,7 @@
|
||||
" {conversation_history}\n",
|
||||
" ===\n",
|
||||
"\n",
|
||||
" Now determine what should be the next immediate conversation stage for the agent in the sales conversation by selecting ony from the following options:\n",
|
||||
" Now determine what should be the next immediate conversation stage for the agent in the sales conversation by selecting only from the following options:\n",
|
||||
" 1. Introduction: Start the conversation by introducing yourself and your company. Be polite and respectful while keeping the tone of the conversation professional.\n",
|
||||
" 2. Qualification: Qualify the prospect by confirming if they are the right person to talk to regarding your product/service. Ensure that they have the authority to make purchasing decisions.\n",
|
||||
" 3. Value proposition: Briefly explain how your product/service can benefit the prospect. Focus on the unique selling points and value proposition of your product/service that sets it apart from competitors.\n",
|
||||
@@ -277,7 +277,7 @@
|
||||
" \n",
|
||||
" ===\n",
|
||||
"\n",
|
||||
" Now determine what should be the next immediate conversation stage for the agent in the sales conversation by selecting ony from the following options:\n",
|
||||
" Now determine what should be the next immediate conversation stage for the agent in the sales conversation by selecting only from the following options:\n",
|
||||
" 1. Introduction: Start the conversation by introducing yourself and your company. Be polite and respectful while keeping the tone of the conversation professional.\n",
|
||||
" 2. Qualification: Qualify the prospect by confirming if they are the right person to talk to regarding your product/service. Ensure that they have the authority to make purchasing decisions.\n",
|
||||
" 3. Value proposition: Briefly explain how your product/service can benefit the prospect. Focus on the unique selling points and value proposition of your product/service that sets it apart from competitors.\n",
|
||||
1181
cookbook/self_query_hotel_search.ipynb
Normal file
@@ -17,7 +17,7 @@
|
||||
"\n",
|
||||
"Note that SmartLLMChains\n",
|
||||
"- use more LLM passes (ie n+2 instead of just 1)\n",
|
||||
"- only work then the underlying LLM has the capability for reflection, whicher smaller models often don't\n",
|
||||
"- only work then the underlying LLM has the capability for reflection, which smaller models often don't\n",
|
||||
"- only work with underlying models that return exactly 1 output, not multiple\n",
|
||||
"\n",
|
||||
"This notebook demonstrates how to use a SmartLLMChain."
|
||||
@@ -241,7 +241,7 @@
|
||||
" ideation_llm=ChatOpenAI(temperature=0.9, model_name=\"gpt-4\"),\n",
|
||||
" llm=ChatOpenAI(\n",
|
||||
" temperature=0, model_name=\"gpt-4\"\n",
|
||||
" ), # will be used for critqiue and resolution as no specific llms are given\n",
|
||||
" ), # will be used for critique and resolution as no specific llms are given\n",
|
||||
" prompt=prompt,\n",
|
||||
" n_ideas=3,\n",
|
||||
" verbose=True,\n",
|
||||
@@ -1,3 +1,7 @@
|
||||
# SQL Database Chain
|
||||
|
||||
This example demonstrates the use of the `SQLDatabaseChain` for answering questions over a SQL database.
|
||||
|
||||
Under the hood, LangChain uses SQLAlchemy to connect to SQL databases. The `SQLDatabaseChain` can therefore be used with any SQL dialect supported by SQLAlchemy, such as MS SQL, MySQL, MariaDB, PostgreSQL, Oracle SQL, [Databricks](/docs/ecosystem/integrations/databricks.html) and SQLite. Please refer to the SQLAlchemy documentation for more information about requirements for connecting to your database. For example, a connection to MySQL requires an appropriate connector such as PyMySQL. A URI for a MySQL connection might look like: `mysql+pymysql://user:pass@some_mysql_db_address/db_name`.
|
||||
|
||||
This demonstration uses SQLite and the example Chinook database.
|
||||
@@ -31,8 +35,8 @@ db_chain.run("How many employees are there?")
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
> Entering new SQLDatabaseChain chain...
|
||||
How many employees are there?
|
||||
SQLQuery:
|
||||
@@ -71,8 +75,8 @@ db_chain.run("How many albums by Aerosmith?")
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
> Entering new SQLDatabaseChain chain...
|
||||
How many albums by Aerosmith?
|
||||
SQLQuery:SELECT COUNT(*) FROM Album WHERE ArtistId = 3;
|
||||
@@ -129,8 +133,8 @@ db_chain.run("How many employees are there in the foobar table?")
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
> Entering new SQLDatabaseChain chain...
|
||||
How many employees are there in the foobar table?
|
||||
SQLQuery:SELECT COUNT(*) FROM Employee;
|
||||
@@ -165,8 +169,8 @@ result["intermediate_steps"]
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
> Entering new SQLDatabaseChain chain...
|
||||
How many employees are there in the foobar table?
|
||||
SQLQuery:SELECT COUNT(*) FROM Employee;
|
||||
@@ -191,6 +195,112 @@ result["intermediate_steps"]
|
||||
|
||||
</CodeOutputBlock>
|
||||
|
||||
## Adding Memory
|
||||
|
||||
How to add memory to a SQLDatabaseChain:
|
||||
|
||||
```python
|
||||
from langchain.llms import OpenAI
|
||||
from langchain.utilities import SQLDatabase
|
||||
from langchain_experimental.sql import SQLDatabaseChain
|
||||
```
|
||||
|
||||
Set up the SQLDatabase and LLM
|
||||
|
||||
```python
|
||||
db = SQLDatabase.from_uri("sqlite:///../../../../notebooks/Chinook.db")
|
||||
llm = OpenAI(temperature=0, verbose=True)
|
||||
```
|
||||
|
||||
Set up the memory
|
||||
|
||||
```python
|
||||
from langchain.memory import ConversationBufferMemory
|
||||
memory = ConversationBufferMemory()
|
||||
```
|
||||
|
||||
Now we need to add a place for memory in the prompt template
|
||||
|
||||
```python
|
||||
from langchain.prompts import PromptTemplate
|
||||
PROMPT_SUFFIX = """Only use the following tables:
|
||||
{table_info}
|
||||
|
||||
Previous Conversation:
|
||||
{history}
|
||||
|
||||
Question: {input}"""
|
||||
|
||||
_DEFAULT_TEMPLATE = """Given an input question, first create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer. Unless the user specifies in his question a specific number of examples he wishes to obtain, always limit your query to at most {top_k} results. You can order the results by a relevant column to return the most interesting examples in the database.
|
||||
|
||||
Never query for all the columns from a specific table, only ask for a the few relevant columns given the question.
|
||||
|
||||
Pay attention to use only the column names that you can see in the schema description. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.
|
||||
|
||||
Use the following format:
|
||||
|
||||
Question: Question here
|
||||
SQLQuery: SQL Query to run
|
||||
SQLResult: Result of the SQLQuery
|
||||
Answer: Final answer here
|
||||
|
||||
"""
|
||||
|
||||
PROMPT = PromptTemplate.from_template(
|
||||
_DEFAULT_TEMPLATE + PROMPT_SUFFIX,
|
||||
)
|
||||
```
|
||||
|
||||
Now let's create and run out chain
|
||||
|
||||
```python
|
||||
db_chain = SQLDatabaseChain.from_llm(llm, db, prompt=PROMPT, verbose=True, memory=memory)
|
||||
db_chain.run("name one employee")
|
||||
```
|
||||
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
> Entering new SQLDatabaseChain chain...
|
||||
name one employee
|
||||
SQLQuery:SELECT FirstName, LastName FROM Employee LIMIT 1
|
||||
SQLResult: [('Andrew', 'Adams')]
|
||||
Answer:Andrew Adams
|
||||
> Finished chain.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'Andrew Adams'
|
||||
```
|
||||
|
||||
</CodeOutputBlock>
|
||||
|
||||
```python
|
||||
db_chain.run("how many letters in their name?")
|
||||
```
|
||||
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
> Entering new SQLDatabaseChain chain...
|
||||
how many letters in their name?
|
||||
SQLQuery:SELECT LENGTH(FirstName) + LENGTH(LastName) AS 'NameLength' FROM Employee WHERE FirstName = 'Andrew' AND LastName = 'Adams'
|
||||
SQLResult: [(11,)]
|
||||
Answer:Andrew Adams has 11 letters in their name.
|
||||
> Finished chain.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'Andrew Adams has 11 letters in their name.'
|
||||
```
|
||||
|
||||
</CodeOutputBlock>
|
||||
|
||||
|
||||
## Choosing how to limit the number of rows returned
|
||||
If you are querying for several rows of a table you can select the maximum number of results you want to get by using the 'top_k' parameter (default is 10). This is useful for avoiding query results that exceed the prompt max length or consume tokens unnecessarily.
|
||||
|
||||
@@ -207,8 +317,8 @@ db_chain.run("What are some example tracks by composer Johann Sebastian Bach?")
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
> Entering new SQLDatabaseChain chain...
|
||||
What are some example tracks by composer Johann Sebastian Bach?
|
||||
SQLQuery:SELECT Name FROM Track WHERE Composer = 'Johann Sebastian Bach' LIMIT 3
|
||||
@@ -246,23 +356,23 @@ print(db.table_info)
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
|
||||
|
||||
CREATE TABLE "Track" (
|
||||
"TrackId" INTEGER NOT NULL,
|
||||
"Name" NVARCHAR(200) NOT NULL,
|
||||
"AlbumId" INTEGER,
|
||||
"MediaTypeId" INTEGER NOT NULL,
|
||||
"GenreId" INTEGER,
|
||||
"Composer" NVARCHAR(220),
|
||||
"Milliseconds" INTEGER NOT NULL,
|
||||
"Bytes" INTEGER,
|
||||
"UnitPrice" NUMERIC(10, 2) NOT NULL,
|
||||
PRIMARY KEY ("TrackId"),
|
||||
FOREIGN KEY("MediaTypeId") REFERENCES "MediaType" ("MediaTypeId"),
|
||||
FOREIGN KEY("GenreId") REFERENCES "Genre" ("GenreId"),
|
||||
"TrackId" INTEGER NOT NULL,
|
||||
"Name" NVARCHAR(200) NOT NULL,
|
||||
"AlbumId" INTEGER,
|
||||
"MediaTypeId" INTEGER NOT NULL,
|
||||
"GenreId" INTEGER,
|
||||
"Composer" NVARCHAR(220),
|
||||
"Milliseconds" INTEGER NOT NULL,
|
||||
"Bytes" INTEGER,
|
||||
"UnitPrice" NUMERIC(10, 2) NOT NULL,
|
||||
PRIMARY KEY ("TrackId"),
|
||||
FOREIGN KEY("MediaTypeId") REFERENCES "MediaType" ("MediaTypeId"),
|
||||
FOREIGN KEY("GenreId") REFERENCES "Genre" ("GenreId"),
|
||||
FOREIGN KEY("AlbumId") REFERENCES "Album" ("AlbumId")
|
||||
)
|
||||
|
||||
|
||||
/*
|
||||
2 rows from Track table:
|
||||
TrackId Name AlbumId MediaTypeId GenreId Composer Milliseconds Bytes UnitPrice
|
||||
@@ -286,8 +396,8 @@ db_chain.run("What are some example tracks by Bach?")
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
> Entering new SQLDatabaseChain chain...
|
||||
What are some example tracks by Bach?
|
||||
SQLQuery:SELECT "Name", "Composer" FROM "Track" WHERE "Composer" LIKE '%Bach%' LIMIT 5
|
||||
@@ -305,7 +415,7 @@ db_chain.run("What are some example tracks by Bach?")
|
||||
</CodeOutputBlock>
|
||||
|
||||
### Custom Table Info
|
||||
In some cases, it can be useful to provide custom table information instead of using the automatically generated table definitions and the first `sample_rows_in_table_info` sample rows. For example, if you know that the first few rows of a table are uninformative, it could help to manually provide example rows that are more diverse or provide more information to the model. It is also possible to limit the columns that will be visible to the model if there are unnecessary columns.
|
||||
In some cases, it can be useful to provide custom table information instead of using the automatically generated table definitions and the first `sample_rows_in_table_info` sample rows. For example, if you know that the first few rows of a table are uninformative, it could help to manually provide example rows that are more diverse or provide more information to the model. It is also possible to limit the columns that will be visible to the model if there are unnecessary columns.
|
||||
|
||||
This information can be provided as a dictionary with table names as the keys and table information as the values. For example, let's provide a custom definition and sample rows for the Track table with only a few columns:
|
||||
|
||||
@@ -313,7 +423,7 @@ This information can be provided as a dictionary with table names as the keys an
|
||||
```python
|
||||
custom_table_info = {
|
||||
"Track": """CREATE TABLE Track (
|
||||
"TrackId" INTEGER NOT NULL,
|
||||
"TrackId" INTEGER NOT NULL,
|
||||
"Name" NVARCHAR(200) NOT NULL,
|
||||
"Composer" NVARCHAR(220),
|
||||
PRIMARY KEY ("TrackId")
|
||||
@@ -342,22 +452,22 @@ print(db.table_info)
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
|
||||
|
||||
CREATE TABLE "Playlist" (
|
||||
"PlaylistId" INTEGER NOT NULL,
|
||||
"Name" NVARCHAR(120),
|
||||
"PlaylistId" INTEGER NOT NULL,
|
||||
"Name" NVARCHAR(120),
|
||||
PRIMARY KEY ("PlaylistId")
|
||||
)
|
||||
|
||||
|
||||
/*
|
||||
2 rows from Playlist table:
|
||||
PlaylistId Name
|
||||
1 Music
|
||||
2 Movies
|
||||
*/
|
||||
|
||||
|
||||
CREATE TABLE Track (
|
||||
"TrackId" INTEGER NOT NULL,
|
||||
"TrackId" INTEGER NOT NULL,
|
||||
"Name" NVARCHAR(200) NOT NULL,
|
||||
"Composer" NVARCHAR(220),
|
||||
PRIMARY KEY ("TrackId")
|
||||
@@ -384,8 +494,8 @@ db_chain.run("What are some example tracks by Bach?")
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
> Entering new SQLDatabaseChain chain...
|
||||
What are some example tracks by Bach?
|
||||
SQLQuery:SELECT "Name" FROM Track WHERE "Composer" LIKE '%Bach%' LIMIT 5;
|
||||
@@ -395,31 +505,31 @@ db_chain.run("What are some example tracks by Bach?")
|
||||
Unless the user specifies in the question a specific number of examples to obtain, query for at most 5 results using the LIMIT clause as per SQLite. You can order the results to return the most informative data in the database.
|
||||
Never query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in double quotes (") to denote them as delimited identifiers.
|
||||
Pay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.
|
||||
|
||||
|
||||
Use the following format:
|
||||
|
||||
|
||||
Question: "Question here"
|
||||
SQLQuery: "SQL Query to run"
|
||||
SQLResult: "Result of the SQLQuery"
|
||||
Answer: "Final answer here"
|
||||
|
||||
|
||||
Only use the following tables:
|
||||
|
||||
|
||||
CREATE TABLE "Playlist" (
|
||||
"PlaylistId" INTEGER NOT NULL,
|
||||
"Name" NVARCHAR(120),
|
||||
"PlaylistId" INTEGER NOT NULL,
|
||||
"Name" NVARCHAR(120),
|
||||
PRIMARY KEY ("PlaylistId")
|
||||
)
|
||||
|
||||
|
||||
/*
|
||||
2 rows from Playlist table:
|
||||
PlaylistId Name
|
||||
1 Music
|
||||
2 Movies
|
||||
*/
|
||||
|
||||
|
||||
CREATE TABLE Track (
|
||||
"TrackId" INTEGER NOT NULL,
|
||||
"TrackId" INTEGER NOT NULL,
|
||||
"Name" NVARCHAR(200) NOT NULL,
|
||||
"Composer" NVARCHAR(220),
|
||||
PRIMARY KEY ("TrackId")
|
||||
@@ -431,7 +541,7 @@ db_chain.run("What are some example tracks by Bach?")
|
||||
2 Balls to the Wall None
|
||||
3 My favorite song ever The coolest composer of all time
|
||||
*/
|
||||
|
||||
|
||||
Question: What are some example tracks by Bach?
|
||||
SQLQuery:SELECT "Name" FROM Track WHERE "Composer" LIKE '%Bach%' LIMIT 5;
|
||||
SQLResult: [('American Woman',), ('Concerto for 2 Violins in D Minor, BWV 1043: I. Vivace',), ('Aria Mit 30 Veränderungen, BWV 988 "Goldberg Variations": Aria',), ('Suite for Solo Cello No. 1 in G Major, BWV 1007: I. Prélude',), ('Toccata and Fugue in D Minor, BWV 565: I. Toccata',)]
|
||||
@@ -451,7 +561,7 @@ db_chain.run("What are some example tracks by Bach?")
|
||||
|
||||
### SQL Views
|
||||
|
||||
In some case, the table schema can be hidden behind a JSON or JSONB column. Adding row samples into the prompt might help won't always describe the data perfectly.
|
||||
In some case, the table schema can be hidden behind a JSON or JSONB column. Adding row samples into the prompt might help won't always describe the data perfectly.
|
||||
|
||||
For this reason, a custom SQL views can help.
|
||||
|
||||
@@ -503,19 +613,19 @@ chain.run("How many employees are also customers?")
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
> Entering new SQLDatabaseSequentialChain chain...
|
||||
Table names to use:
|
||||
['Employee', 'Customer']
|
||||
|
||||
|
||||
> Entering new SQLDatabaseChain chain...
|
||||
How many employees are also customers?
|
||||
SQLQuery:SELECT COUNT(*) FROM Employee e INNER JOIN Customer c ON e.EmployeeId = c.SupportRepId;
|
||||
SQLResult: [(59,)]
|
||||
Answer:59 employees are also customers.
|
||||
> Finished chain.
|
||||
|
||||
|
||||
> Finished chain.
|
||||
|
||||
|
||||
@@ -586,8 +696,8 @@ local_chain("How many customers are there?")
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
> Entering new SQLDatabaseChain chain...
|
||||
How many customers are there?
|
||||
SQLQuery:
|
||||
@@ -773,8 +883,8 @@ print("\n" + yaml_example)
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
> Entering new SQLDatabaseChain chain...
|
||||
List all the customer first names that start with 'a'
|
||||
SQLQuery:
|
||||
@@ -794,7 +904,7 @@ print("\n" + yaml_example)
|
||||
[('François', 'Frantiek', 'Helena', 'Astrid', 'Daan', 'Kara', 'Eduardo', 'Alexandre', 'Fernanda', 'Mark', 'Frank', 'Jack', 'Dan', 'Kathy', 'Heather', 'Frank', 'Richard', 'Patrick', 'Julia', 'Edward', 'Martha', 'Aaron', 'Madalena', 'Hannah', 'Niklas', 'Camille', 'Marc', 'Wyatt', 'Isabelle', 'Ladislav', 'Lucas', 'Johannes', 'Stanisaw', 'Joakim', 'Emma', 'Mark', 'Manoj', 'Puja']
|
||||
> Finished chain.
|
||||
*** Query succeeded
|
||||
|
||||
|
||||
answer: '[(''François'', ''Frantiek'', ''Helena'', ''Astrid'', ''Daan'', ''Kara'',
|
||||
''Eduardo'', ''Alexandre'', ''Fernanda'', ''Mark'', ''Frank'', ''Jack'', ''Dan'',
|
||||
''Kathy'', ''Heather'', ''Frank'', ''Richard'', ''Patrick'', ''Julia'', ''Edward'',
|
||||
@@ -825,7 +935,7 @@ print("\n" + yaml_example)
|
||||
None\tGermany\t70174\t+49 0711 2842222\tNone\tleonekohler@surfeu.de\t5\n3\tFrançois\t\
|
||||
Tremblay\tNone\t1498 rue Bélanger\tMontréal\tQC\tCanada\tH2G 1A7\t+1 (514) 721-4711\t\
|
||||
None\tftremblay@gmail.com\t3\n*/"
|
||||
|
||||
|
||||
```
|
||||
|
||||
</CodeOutputBlock>
|
||||
@@ -838,20 +948,20 @@ YAML_EXAMPLES = """
|
||||
- input: How many customers are not from Brazil?
|
||||
table_info: |
|
||||
CREATE TABLE "Customer" (
|
||||
"CustomerId" INTEGER NOT NULL,
|
||||
"FirstName" NVARCHAR(40) NOT NULL,
|
||||
"LastName" NVARCHAR(20) NOT NULL,
|
||||
"Company" NVARCHAR(80),
|
||||
"Address" NVARCHAR(70),
|
||||
"City" NVARCHAR(40),
|
||||
"State" NVARCHAR(40),
|
||||
"Country" NVARCHAR(40),
|
||||
"PostalCode" NVARCHAR(10),
|
||||
"Phone" NVARCHAR(24),
|
||||
"Fax" NVARCHAR(24),
|
||||
"Email" NVARCHAR(60) NOT NULL,
|
||||
"SupportRepId" INTEGER,
|
||||
PRIMARY KEY ("CustomerId"),
|
||||
"CustomerId" INTEGER NOT NULL,
|
||||
"FirstName" NVARCHAR(40) NOT NULL,
|
||||
"LastName" NVARCHAR(20) NOT NULL,
|
||||
"Company" NVARCHAR(80),
|
||||
"Address" NVARCHAR(70),
|
||||
"City" NVARCHAR(40),
|
||||
"State" NVARCHAR(40),
|
||||
"Country" NVARCHAR(40),
|
||||
"PostalCode" NVARCHAR(10),
|
||||
"Phone" NVARCHAR(24),
|
||||
"Fax" NVARCHAR(24),
|
||||
"Email" NVARCHAR(60) NOT NULL,
|
||||
"SupportRepId" INTEGER,
|
||||
PRIMARY KEY ("CustomerId"),
|
||||
FOREIGN KEY("SupportRepId") REFERENCES "Employee" ("EmployeeId")
|
||||
)
|
||||
sql_cmd: SELECT COUNT(*) FROM "Customer" WHERE NOT "Country" = "Brazil";
|
||||
@@ -860,8 +970,8 @@ YAML_EXAMPLES = """
|
||||
- input: list all the genres that start with 'r'
|
||||
table_info: |
|
||||
CREATE TABLE "Genre" (
|
||||
"GenreId" INTEGER NOT NULL,
|
||||
"Name" NVARCHAR(120),
|
||||
"GenreId" INTEGER NOT NULL,
|
||||
"Name" NVARCHAR(120),
|
||||
PRIMARY KEY ("GenreId")
|
||||
)
|
||||
|
||||
@@ -874,7 +984,7 @@ YAML_EXAMPLES = """
|
||||
*/
|
||||
sql_cmd: SELECT "Name" FROM "Genre" WHERE "Name" LIKE 'r%';
|
||||
sql_result: "[('Rock',), ('Rock and Roll',), ('Reggae',), ('R&B/Soul',)]"
|
||||
answer: The genres that start with 'r' are Rock, Rock and Roll, Reggae and R&B/Soul.
|
||||
answer: The genres that start with 'r' are Rock, Rock and Roll, Reggae and R&B/Soul.
|
||||
"""
|
||||
```
|
||||
|
||||
@@ -940,8 +1050,8 @@ result = local_chain("How many customers are from Brazil?")
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
> Entering new SQLDatabaseChain chain...
|
||||
How many customers are from Brazil?
|
||||
SQLQuery:SELECT count(*) FROM Customer WHERE Country = "Brazil";
|
||||
@@ -960,8 +1070,8 @@ result = local_chain("How many customers are not from Brazil?")
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
> Entering new SQLDatabaseChain chain...
|
||||
How many customers are not from Brazil?
|
||||
SQLQuery:SELECT count(*) FROM customer WHERE country NOT IN (SELECT country FROM customer WHERE country = 'Brazil')
|
||||
@@ -980,8 +1090,8 @@ result = local_chain("How many customers are there in total?")
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
> Entering new SQLDatabaseChain chain...
|
||||
How many customers are there in total?
|
||||
SQLQuery:SELECT count(*) FROM Customer;
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM python:latest
|
||||
FROM python:3.11
|
||||
|
||||
RUN pip install langchain
|
||||
|
||||
@@ -8,11 +8,11 @@ set -o xtrace
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")"; pwd)"
|
||||
cd "${SCRIPT_DIR}"
|
||||
|
||||
mkdir -p _dist/docs_skeleton
|
||||
cp -r {docs_skeleton,snippets} _dist
|
||||
cp -r extras/* _dist/docs_skeleton/docs
|
||||
cd _dist/docs_skeleton
|
||||
poetry run nbdoc_build
|
||||
poetry run python generate_api_reference_links.py
|
||||
mkdir -p ../_dist
|
||||
cp -r . ../_dist
|
||||
cd ../_dist
|
||||
poetry run python scripts/model_feat_table.py
|
||||
poetry run nbdoc_build --srcdir docs
|
||||
poetry run python scripts/generate_api_reference_links.py
|
||||
yarn install
|
||||
yarn start
|
||||
|
||||
@@ -42,7 +42,7 @@ If you are using GitHub pages for hosting, this command is a convenient way to b
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
Some common defaults for linting/formatting have been set for you. If you integrate your project with an open source Continuous Integration system (e.g. Travis CI, CircleCI), you may check for issues using the following command.
|
||||
Some common defaults for linting/formatting have been set for you. If you integrate your project with an open-source Continuous Integration system (e.g. Travis CI, CircleCI), you may check for issues using the following command.
|
||||
|
||||
```
|
||||
$ yarn ci
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
# You can set these variables from the command line, and also
|
||||
# from the environment for the first two.
|
||||
SPHINXOPTS ?=
|
||||
SPHINXOPTS ?= -j auto
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
SPHINXAUTOBUILD ?= sphinx-autobuild
|
||||
SOURCEDIR = .
|
||||
|
||||
@@ -122,8 +122,7 @@ def _merge_module_members(
|
||||
|
||||
|
||||
def _load_package_modules(
|
||||
package_directory: Union[str, Path],
|
||||
submodule: Optional[str] = None
|
||||
package_directory: Union[str, Path], submodule: Optional[str] = None
|
||||
) -> Dict[str, ModuleMembers]:
|
||||
"""Recursively load modules of a package based on the file system.
|
||||
|
||||
@@ -171,7 +170,8 @@ def _load_package_modules(
|
||||
# different way
|
||||
if submodule is not None:
|
||||
module_members = _load_module_members(
|
||||
f"{package_name}.{submodule}.{namespace}", f"{submodule}.{namespace}"
|
||||
f"{package_name}.{submodule}.{namespace}",
|
||||
f"{submodule}.{namespace}",
|
||||
)
|
||||
else:
|
||||
module_members = _load_module_members(
|
||||
@@ -280,18 +280,9 @@ Functions
|
||||
return full_doc
|
||||
|
||||
|
||||
def main() -> None:
|
||||
"""Generate the reference.rst file for each package."""
|
||||
lc_members = _load_package_modules(PKG_DIR)
|
||||
# Put some packages at top level
|
||||
tools = _load_package_modules(PKG_DIR, "tools")
|
||||
lc_members['tools.render'] = tools['render']
|
||||
agents = _load_package_modules(PKG_DIR, "agents")
|
||||
lc_members['agents.output_parsers'] = agents['output_parsers']
|
||||
lc_members['agents.format_scratchpad'] = agents['format_scratchpad']
|
||||
lc_doc = ".. _api_reference:\n\n" + _construct_doc("langchain", lc_members)
|
||||
with open(WRITE_FILE, "w") as f:
|
||||
f.write(lc_doc)
|
||||
def _document_langchain_experimental() -> None:
|
||||
"""Document the langchain_experimental package."""
|
||||
# Generate experimental_api_reference.rst
|
||||
exp_members = _load_package_modules(EXP_DIR)
|
||||
exp_doc = ".. _experimental_api_reference:\n\n" + _construct_doc(
|
||||
"langchain_experimental", exp_members
|
||||
@@ -300,5 +291,36 @@ def main() -> None:
|
||||
f.write(exp_doc)
|
||||
|
||||
|
||||
def _document_langchain_core() -> None:
|
||||
"""Document the main langchain package."""
|
||||
# load top level module members
|
||||
lc_members = _load_package_modules(PKG_DIR)
|
||||
|
||||
# Add additional packages
|
||||
tools = _load_package_modules(PKG_DIR, "tools")
|
||||
agents = _load_package_modules(PKG_DIR, "agents")
|
||||
schema = _load_package_modules(PKG_DIR, "schema")
|
||||
|
||||
lc_members.update(
|
||||
{
|
||||
"agents.output_parsers": agents["output_parsers"],
|
||||
"agents.format_scratchpad": agents["format_scratchpad"],
|
||||
"tools.render": tools["render"],
|
||||
"schema.runnable": schema["runnable"],
|
||||
}
|
||||
)
|
||||
|
||||
lc_doc = ".. _api_reference:\n\n" + _construct_doc("langchain", lc_members)
|
||||
|
||||
with open(WRITE_FILE, "w") as f:
|
||||
f.write(lc_doc)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
"""Generate the reference.rst file for each package."""
|
||||
_document_langchain_core()
|
||||
_document_langchain_experimental()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
Before Width: | Height: | Size: 559 KiB After Width: | Height: | Size: 559 KiB |
|
Before Width: | Height: | Size: 157 KiB After Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 235 KiB After Width: | Height: | Size: 235 KiB |
|
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 3.5 MiB After Width: | Height: | Size: 3.5 MiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 542 B After Width: | Height: | Size: 542 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
465
docs/docs/additional_resources/dependents.mdx
Normal file
@@ -0,0 +1,465 @@
|
||||
# Dependents
|
||||
|
||||
Dependents stats for `langchain-ai/langchain`
|
||||
|
||||
[](https://github.com/langchain-ai/langchain/network/dependents)
|
||||
[&message=451&color=informational&logo=slickpic)](https://github.com/langchain-ai/langchain/network/dependents)
|
||||
[&message=30083&color=informational&logo=slickpic)](https://github.com/langchain-ai/langchain/network/dependents)
|
||||
[&message=37822&color=informational&logo=slickpic)](https://github.com/langchain-ai/langchain/network/dependents)
|
||||
|
||||
|
||||
[update: `2023-10-06`; only dependent repositories with Stars > 100]
|
||||
|
||||
|
||||
| Repository | Stars |
|
||||
| :-------- | -----: |
|
||||
|[openai/openai-cookbook](https://github.com/openai/openai-cookbook) | 49006 |
|
||||
|[AntonOsika/gpt-engineer](https://github.com/AntonOsika/gpt-engineer) | 44368 |
|
||||
|[imartinez/privateGPT](https://github.com/imartinez/privateGPT) | 38300 |
|
||||
|[LAION-AI/Open-Assistant](https://github.com/LAION-AI/Open-Assistant) | 35327 |
|
||||
|[hpcaitech/ColossalAI](https://github.com/hpcaitech/ColossalAI) | 34799 |
|
||||
|[microsoft/TaskMatrix](https://github.com/microsoft/TaskMatrix) | 34161 |
|
||||
|[streamlit/streamlit](https://github.com/streamlit/streamlit) | 27697 |
|
||||
|[geekan/MetaGPT](https://github.com/geekan/MetaGPT) | 27302 |
|
||||
|[reworkd/AgentGPT](https://github.com/reworkd/AgentGPT) | 26805 |
|
||||
|[OpenBB-finance/OpenBBTerminal](https://github.com/OpenBB-finance/OpenBBTerminal) | 24473 |
|
||||
|[StanGirard/quivr](https://github.com/StanGirard/quivr) | 23323 |
|
||||
|[run-llama/llama_index](https://github.com/run-llama/llama_index) | 22151 |
|
||||
|[openai/chatgpt-retrieval-plugin](https://github.com/openai/chatgpt-retrieval-plugin) | 19741 |
|
||||
|[mindsdb/mindsdb](https://github.com/mindsdb/mindsdb) | 18062 |
|
||||
|[PromtEngineer/localGPT](https://github.com/PromtEngineer/localGPT) | 16413 |
|
||||
|[chatchat-space/Langchain-Chatchat](https://github.com/chatchat-space/Langchain-Chatchat) | 16300 |
|
||||
|[cube-js/cube](https://github.com/cube-js/cube) | 16261 |
|
||||
|[mlflow/mlflow](https://github.com/mlflow/mlflow) | 15487 |
|
||||
|[logspace-ai/langflow](https://github.com/logspace-ai/langflow) | 12599 |
|
||||
|[GaiZhenbiao/ChuanhuChatGPT](https://github.com/GaiZhenbiao/ChuanhuChatGPT) | 12501 |
|
||||
|[openai/evals](https://github.com/openai/evals) | 12056 |
|
||||
|[airbytehq/airbyte](https://github.com/airbytehq/airbyte) | 11919 |
|
||||
|[go-skynet/LocalAI](https://github.com/go-skynet/LocalAI) | 11767 |
|
||||
|[databrickslabs/dolly](https://github.com/databrickslabs/dolly) | 10609 |
|
||||
|[AIGC-Audio/AudioGPT](https://github.com/AIGC-Audio/AudioGPT) | 9240 |
|
||||
|[aws/amazon-sagemaker-examples](https://github.com/aws/amazon-sagemaker-examples) | 8892 |
|
||||
|[langgenius/dify](https://github.com/langgenius/dify) | 8764 |
|
||||
|[gventuri/pandas-ai](https://github.com/gventuri/pandas-ai) | 8687 |
|
||||
|[jmorganca/ollama](https://github.com/jmorganca/ollama) | 8628 |
|
||||
|[langchain-ai/langchainjs](https://github.com/langchain-ai/langchainjs) | 8392 |
|
||||
|[h2oai/h2ogpt](https://github.com/h2oai/h2ogpt) | 7953 |
|
||||
|[arc53/DocsGPT](https://github.com/arc53/DocsGPT) | 7730 |
|
||||
|[PipedreamHQ/pipedream](https://github.com/PipedreamHQ/pipedream) | 7261 |
|
||||
|[joshpxyne/gpt-migrate](https://github.com/joshpxyne/gpt-migrate) | 6349 |
|
||||
|[bentoml/OpenLLM](https://github.com/bentoml/OpenLLM) | 6213 |
|
||||
|[mage-ai/mage-ai](https://github.com/mage-ai/mage-ai) | 5600 |
|
||||
|[zauberzeug/nicegui](https://github.com/zauberzeug/nicegui) | 5499 |
|
||||
|[wenda-LLM/wenda](https://github.com/wenda-LLM/wenda) | 5497 |
|
||||
|[sweepai/sweep](https://github.com/sweepai/sweep) | 5489 |
|
||||
|[embedchain/embedchain](https://github.com/embedchain/embedchain) | 5428 |
|
||||
|[zilliztech/GPTCache](https://github.com/zilliztech/GPTCache) | 5311 |
|
||||
|[Shaunwei/RealChar](https://github.com/Shaunwei/RealChar) | 5264 |
|
||||
|[GreyDGL/PentestGPT](https://github.com/GreyDGL/PentestGPT) | 5146 |
|
||||
|[gkamradt/langchain-tutorials](https://github.com/gkamradt/langchain-tutorials) | 5134 |
|
||||
|[serge-chat/serge](https://github.com/serge-chat/serge) | 5009 |
|
||||
|[assafelovic/gpt-researcher](https://github.com/assafelovic/gpt-researcher) | 4836 |
|
||||
|[openchatai/OpenChat](https://github.com/openchatai/OpenChat) | 4697 |
|
||||
|[intel-analytics/BigDL](https://github.com/intel-analytics/BigDL) | 4412 |
|
||||
|[continuedev/continue](https://github.com/continuedev/continue) | 4324 |
|
||||
|[postgresml/postgresml](https://github.com/postgresml/postgresml) | 4267 |
|
||||
|[madawei2699/myGPTReader](https://github.com/madawei2699/myGPTReader) | 4214 |
|
||||
|[MineDojo/Voyager](https://github.com/MineDojo/Voyager) | 4204 |
|
||||
|[danswer-ai/danswer](https://github.com/danswer-ai/danswer) | 3973 |
|
||||
|[RayVentura/ShortGPT](https://github.com/RayVentura/ShortGPT) | 3922 |
|
||||
|[Azure/azure-sdk-for-python](https://github.com/Azure/azure-sdk-for-python) | 3849 |
|
||||
|[khoj-ai/khoj](https://github.com/khoj-ai/khoj) | 3817 |
|
||||
|[langchain-ai/chat-langchain](https://github.com/langchain-ai/chat-langchain) | 3742 |
|
||||
|[Azure-Samples/azure-search-openai-demo](https://github.com/Azure-Samples/azure-search-openai-demo) | 3731 |
|
||||
|[marqo-ai/marqo](https://github.com/marqo-ai/marqo) | 3627 |
|
||||
|[kyegomez/tree-of-thoughts](https://github.com/kyegomez/tree-of-thoughts) | 3553 |
|
||||
|[llm-workflow-engine/llm-workflow-engine](https://github.com/llm-workflow-engine/llm-workflow-engine) | 3483 |
|
||||
|[PrefectHQ/marvin](https://github.com/PrefectHQ/marvin) | 3460 |
|
||||
|[aiwaves-cn/agents](https://github.com/aiwaves-cn/agents) | 3413 |
|
||||
|[OpenBMB/ToolBench](https://github.com/OpenBMB/ToolBench) | 3388 |
|
||||
|[shroominic/codeinterpreter-api](https://github.com/shroominic/codeinterpreter-api) | 3218 |
|
||||
|[whitead/paper-qa](https://github.com/whitead/paper-qa) | 3085 |
|
||||
|[project-baize/baize-chatbot](https://github.com/project-baize/baize-chatbot) | 3039 |
|
||||
|[OpenGVLab/InternGPT](https://github.com/OpenGVLab/InternGPT) | 2911 |
|
||||
|[ParisNeo/lollms-webui](https://github.com/ParisNeo/lollms-webui) | 2907 |
|
||||
|[Unstructured-IO/unstructured](https://github.com/Unstructured-IO/unstructured) | 2874 |
|
||||
|[openchatai/OpenCopilot](https://github.com/openchatai/OpenCopilot) | 2759 |
|
||||
|[OpenBMB/BMTools](https://github.com/OpenBMB/BMTools) | 2657 |
|
||||
|[homanp/superagent](https://github.com/homanp/superagent) | 2624 |
|
||||
|[SamurAIGPT/EmbedAI](https://github.com/SamurAIGPT/EmbedAI) | 2575 |
|
||||
|[GerevAI/gerev](https://github.com/GerevAI/gerev) | 2488 |
|
||||
|[microsoft/promptflow](https://github.com/microsoft/promptflow) | 2475 |
|
||||
|[OpenBMB/AgentVerse](https://github.com/OpenBMB/AgentVerse) | 2445 |
|
||||
|[Mintplex-Labs/anything-llm](https://github.com/Mintplex-Labs/anything-llm) | 2434 |
|
||||
|[emptycrown/llama-hub](https://github.com/emptycrown/llama-hub) | 2432 |
|
||||
|[NVIDIA/NeMo-Guardrails](https://github.com/NVIDIA/NeMo-Guardrails) | 2327 |
|
||||
|[ShreyaR/guardrails](https://github.com/ShreyaR/guardrails) | 2307 |
|
||||
|[thomas-yanxin/LangChain-ChatGLM-Webui](https://github.com/thomas-yanxin/LangChain-ChatGLM-Webui) | 2305 |
|
||||
|[yanqiangmiffy/Chinese-LangChain](https://github.com/yanqiangmiffy/Chinese-LangChain) | 2291 |
|
||||
|[keephq/keep](https://github.com/keephq/keep) | 2252 |
|
||||
|[OpenGVLab/Ask-Anything](https://github.com/OpenGVLab/Ask-Anything) | 2194 |
|
||||
|[IntelligenzaArtificiale/Free-Auto-GPT](https://github.com/IntelligenzaArtificiale/Free-Auto-GPT) | 2169 |
|
||||
|[Farama-Foundation/PettingZoo](https://github.com/Farama-Foundation/PettingZoo) | 2031 |
|
||||
|[YiVal/YiVal](https://github.com/YiVal/YiVal) | 2014 |
|
||||
|[hwchase17/notion-qa](https://github.com/hwchase17/notion-qa) | 2014 |
|
||||
|[jupyterlab/jupyter-ai](https://github.com/jupyterlab/jupyter-ai) | 1977 |
|
||||
|[paulpierre/RasaGPT](https://github.com/paulpierre/RasaGPT) | 1887 |
|
||||
|[dot-agent/dotagent-WIP](https://github.com/dot-agent/dotagent-WIP) | 1812 |
|
||||
|[hegelai/prompttools](https://github.com/hegelai/prompttools) | 1775 |
|
||||
|[vocodedev/vocode-python](https://github.com/vocodedev/vocode-python) | 1734 |
|
||||
|[Vonng/pigsty](https://github.com/Vonng/pigsty) | 1693 |
|
||||
|[psychic-api/psychic](https://github.com/psychic-api/psychic) | 1597 |
|
||||
|[avinashkranjan/Amazing-Python-Scripts](https://github.com/avinashkranjan/Amazing-Python-Scripts) | 1546 |
|
||||
|[pinterest/querybook](https://github.com/pinterest/querybook) | 1539 |
|
||||
|[Forethought-Technologies/AutoChain](https://github.com/Forethought-Technologies/AutoChain) | 1531 |
|
||||
|[Kav-K/GPTDiscord](https://github.com/Kav-K/GPTDiscord) | 1503 |
|
||||
|[jina-ai/langchain-serve](https://github.com/jina-ai/langchain-serve) | 1487 |
|
||||
|[noahshinn024/reflexion](https://github.com/noahshinn024/reflexion) | 1481 |
|
||||
|[jina-ai/dev-gpt](https://github.com/jina-ai/dev-gpt) | 1436 |
|
||||
|[ttengwang/Caption-Anything](https://github.com/ttengwang/Caption-Anything) | 1425 |
|
||||
|[milvus-io/bootcamp](https://github.com/milvus-io/bootcamp) | 1420 |
|
||||
|[agiresearch/OpenAGI](https://github.com/agiresearch/OpenAGI) | 1401 |
|
||||
|[greshake/llm-security](https://github.com/greshake/llm-security) | 1381 |
|
||||
|[jina-ai/thinkgpt](https://github.com/jina-ai/thinkgpt) | 1366 |
|
||||
|[lunasec-io/lunasec](https://github.com/lunasec-io/lunasec) | 1352 |
|
||||
|[101dotxyz/GPTeam](https://github.com/101dotxyz/GPTeam) | 1339 |
|
||||
|[refuel-ai/autolabel](https://github.com/refuel-ai/autolabel) | 1320 |
|
||||
|[melih-unsal/DemoGPT](https://github.com/melih-unsal/DemoGPT) | 1320 |
|
||||
|[mmz-001/knowledge_gpt](https://github.com/mmz-001/knowledge_gpt) | 1320 |
|
||||
|[richardyc/Chrome-GPT](https://github.com/richardyc/Chrome-GPT) | 1315 |
|
||||
|[run-llama/sec-insights](https://github.com/run-llama/sec-insights) | 1312 |
|
||||
|[Azure/azureml-examples](https://github.com/Azure/azureml-examples) | 1305 |
|
||||
|[cofactoryai/textbase](https://github.com/cofactoryai/textbase) | 1286 |
|
||||
|[dataelement/bisheng](https://github.com/dataelement/bisheng) | 1273 |
|
||||
|[eyurtsev/kor](https://github.com/eyurtsev/kor) | 1263 |
|
||||
|[pluralsh/plural](https://github.com/pluralsh/plural) | 1188 |
|
||||
|[FlagOpen/FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding) | 1184 |
|
||||
|[juncongmoo/chatllama](https://github.com/juncongmoo/chatllama) | 1144 |
|
||||
|[poe-platform/server-bot-quick-start](https://github.com/poe-platform/server-bot-quick-start) | 1139 |
|
||||
|[visual-openllm/visual-openllm](https://github.com/visual-openllm/visual-openllm) | 1137 |
|
||||
|[griptape-ai/griptape](https://github.com/griptape-ai/griptape) | 1124 |
|
||||
|[microsoft/X-Decoder](https://github.com/microsoft/X-Decoder) | 1119 |
|
||||
|[ThousandBirdsInc/chidori](https://github.com/ThousandBirdsInc/chidori) | 1116 |
|
||||
|[filip-michalsky/SalesGPT](https://github.com/filip-michalsky/SalesGPT) | 1112 |
|
||||
|[psychic-api/rag-stack](https://github.com/psychic-api/rag-stack) | 1110 |
|
||||
|[irgolic/AutoPR](https://github.com/irgolic/AutoPR) | 1100 |
|
||||
|[promptfoo/promptfoo](https://github.com/promptfoo/promptfoo) | 1099 |
|
||||
|[nod-ai/SHARK](https://github.com/nod-ai/SHARK) | 1062 |
|
||||
|[SamurAIGPT/Camel-AutoGPT](https://github.com/SamurAIGPT/Camel-AutoGPT) | 1036 |
|
||||
|[Farama-Foundation/chatarena](https://github.com/Farama-Foundation/chatarena) | 1020 |
|
||||
|[peterw/Chat-with-Github-Repo](https://github.com/peterw/Chat-with-Github-Repo) | 993 |
|
||||
|[jiran214/GPT-vup](https://github.com/jiran214/GPT-vup) | 967 |
|
||||
|[alejandro-ao/ask-multiple-pdfs](https://github.com/alejandro-ao/ask-multiple-pdfs) | 958 |
|
||||
|[run-llama/llama-lab](https://github.com/run-llama/llama-lab) | 953 |
|
||||
|[LC1332/Chat-Haruhi-Suzumiya](https://github.com/LC1332/Chat-Haruhi-Suzumiya) | 950 |
|
||||
|[rlancemartin/auto-evaluator](https://github.com/rlancemartin/auto-evaluator) | 927 |
|
||||
|[cheshire-cat-ai/core](https://github.com/cheshire-cat-ai/core) | 902 |
|
||||
|[Anil-matcha/ChatPDF](https://github.com/Anil-matcha/ChatPDF) | 894 |
|
||||
|[cirediatpl/FigmaChain](https://github.com/cirediatpl/FigmaChain) | 881 |
|
||||
|[seanpixel/Teenage-AGI](https://github.com/seanpixel/Teenage-AGI) | 876 |
|
||||
|[xusenlinzy/api-for-open-llm](https://github.com/xusenlinzy/api-for-open-llm) | 865 |
|
||||
|[ricklamers/shell-ai](https://github.com/ricklamers/shell-ai) | 864 |
|
||||
|[codeacme17/examor](https://github.com/codeacme17/examor) | 856 |
|
||||
|[corca-ai/EVAL](https://github.com/corca-ai/EVAL) | 836 |
|
||||
|[microsoft/Llama-2-Onnx](https://github.com/microsoft/Llama-2-Onnx) | 835 |
|
||||
|[explodinggradients/ragas](https://github.com/explodinggradients/ragas) | 833 |
|
||||
|[ajndkr/lanarky](https://github.com/ajndkr/lanarky) | 817 |
|
||||
|[kennethleungty/Llama-2-Open-Source-LLM-CPU-Inference](https://github.com/kennethleungty/Llama-2-Open-Source-LLM-CPU-Inference) | 814 |
|
||||
|[ray-project/llm-applications](https://github.com/ray-project/llm-applications) | 804 |
|
||||
|[hwchase17/chat-your-data](https://github.com/hwchase17/chat-your-data) | 801 |
|
||||
|[LambdaLabsML/examples](https://github.com/LambdaLabsML/examples) | 759 |
|
||||
|[kreneskyp/ix](https://github.com/kreneskyp/ix) | 758 |
|
||||
|[pyspark-ai/pyspark-ai](https://github.com/pyspark-ai/pyspark-ai) | 750 |
|
||||
|[billxbf/ReWOO](https://github.com/billxbf/ReWOO) | 746 |
|
||||
|[e-johnstonn/BriefGPT](https://github.com/e-johnstonn/BriefGPT) | 738 |
|
||||
|[akshata29/entaoai](https://github.com/akshata29/entaoai) | 733 |
|
||||
|[getmetal/motorhead](https://github.com/getmetal/motorhead) | 717 |
|
||||
|[ruoccofabrizio/azure-open-ai-embeddings-qna](https://github.com/ruoccofabrizio/azure-open-ai-embeddings-qna) | 712 |
|
||||
|[msoedov/langcorn](https://github.com/msoedov/langcorn) | 698 |
|
||||
|[Dataherald/dataherald](https://github.com/Dataherald/dataherald) | 684 |
|
||||
|[jondurbin/airoboros](https://github.com/jondurbin/airoboros) | 657 |
|
||||
|[Ikaros-521/AI-Vtuber](https://github.com/Ikaros-521/AI-Vtuber) | 651 |
|
||||
|[whyiyhw/chatgpt-wechat](https://github.com/whyiyhw/chatgpt-wechat) | 644 |
|
||||
|[langchain-ai/streamlit-agent](https://github.com/langchain-ai/streamlit-agent) | 637 |
|
||||
|[SamurAIGPT/ChatGPT-Developer-Plugins](https://github.com/SamurAIGPT/ChatGPT-Developer-Plugins) | 637 |
|
||||
|[OpenGenerativeAI/GenossGPT](https://github.com/OpenGenerativeAI/GenossGPT) | 632 |
|
||||
|[AILab-CVC/GPT4Tools](https://github.com/AILab-CVC/GPT4Tools) | 629 |
|
||||
|[langchain-ai/auto-evaluator](https://github.com/langchain-ai/auto-evaluator) | 614 |
|
||||
|[explosion/spacy-llm](https://github.com/explosion/spacy-llm) | 613 |
|
||||
|[alexanderatallah/window.ai](https://github.com/alexanderatallah/window.ai) | 607 |
|
||||
|[MiuLab/Taiwan-LLaMa](https://github.com/MiuLab/Taiwan-LLaMa) | 601 |
|
||||
|[microsoft/PodcastCopilot](https://github.com/microsoft/PodcastCopilot) | 600 |
|
||||
|[Dicklesworthstone/swiss_army_llama](https://github.com/Dicklesworthstone/swiss_army_llama) | 596 |
|
||||
|[NoDataFound/hackGPT](https://github.com/NoDataFound/hackGPT) | 596 |
|
||||
|[namuan/dr-doc-search](https://github.com/namuan/dr-doc-search) | 593 |
|
||||
|[amosjyng/langchain-visualizer](https://github.com/amosjyng/langchain-visualizer) | 582 |
|
||||
|[microsoft/sample-app-aoai-chatGPT](https://github.com/microsoft/sample-app-aoai-chatGPT) | 581 |
|
||||
|[yvann-hub/Robby-chatbot](https://github.com/yvann-hub/Robby-chatbot) | 581 |
|
||||
|[yeagerai/yeagerai-agent](https://github.com/yeagerai/yeagerai-agent) | 547 |
|
||||
|[tgscan-dev/tgscan](https://github.com/tgscan-dev/tgscan) | 533 |
|
||||
|[Azure-Samples/openai](https://github.com/Azure-Samples/openai) | 531 |
|
||||
|[plastic-labs/tutor-gpt](https://github.com/plastic-labs/tutor-gpt) | 531 |
|
||||
|[xuwenhao/geektime-ai-course](https://github.com/xuwenhao/geektime-ai-course) | 526 |
|
||||
|[michaelthwan/searchGPT](https://github.com/michaelthwan/searchGPT) | 526 |
|
||||
|[jonra1993/fastapi-alembic-sqlmodel-async](https://github.com/jonra1993/fastapi-alembic-sqlmodel-async) | 522 |
|
||||
|[jina-ai/agentchain](https://github.com/jina-ai/agentchain) | 519 |
|
||||
|[mckaywrigley/repo-chat](https://github.com/mckaywrigley/repo-chat) | 518 |
|
||||
|[modelscope/modelscope-agent](https://github.com/modelscope/modelscope-agent) | 512 |
|
||||
|[daveebbelaar/langchain-experiments](https://github.com/daveebbelaar/langchain-experiments) | 504 |
|
||||
|[freddyaboulton/gradio-tools](https://github.com/freddyaboulton/gradio-tools) | 497 |
|
||||
|[sidhq/Multi-GPT](https://github.com/sidhq/Multi-GPT) | 494 |
|
||||
|[continuum-llms/chatgpt-memory](https://github.com/continuum-llms/chatgpt-memory) | 489 |
|
||||
|[langchain-ai/langchain-aiplugin](https://github.com/langchain-ai/langchain-aiplugin) | 487 |
|
||||
|[mpaepper/content-chatbot](https://github.com/mpaepper/content-chatbot) | 483 |
|
||||
|[steamship-core/steamship-langchain](https://github.com/steamship-core/steamship-langchain) | 481 |
|
||||
|[alejandro-ao/langchain-ask-pdf](https://github.com/alejandro-ao/langchain-ask-pdf) | 474 |
|
||||
|[truera/trulens](https://github.com/truera/trulens) | 464 |
|
||||
|[marella/chatdocs](https://github.com/marella/chatdocs) | 459 |
|
||||
|[opencopilotdev/opencopilot](https://github.com/opencopilotdev/opencopilot) | 453 |
|
||||
|[poe-platform/poe-protocol](https://github.com/poe-platform/poe-protocol) | 444 |
|
||||
|[DataDog/dd-trace-py](https://github.com/DataDog/dd-trace-py) | 441 |
|
||||
|[logan-markewich/llama_index_starter_pack](https://github.com/logan-markewich/llama_index_starter_pack) | 441 |
|
||||
|[opentensor/bittensor](https://github.com/opentensor/bittensor) | 433 |
|
||||
|[DjangoPeng/openai-quickstart](https://github.com/DjangoPeng/openai-quickstart) | 425 |
|
||||
|[CarperAI/OpenELM](https://github.com/CarperAI/OpenELM) | 424 |
|
||||
|[daodao97/chatdoc](https://github.com/daodao97/chatdoc) | 423 |
|
||||
|[showlab/VLog](https://github.com/showlab/VLog) | 411 |
|
||||
|[Anil-matcha/Chatbase](https://github.com/Anil-matcha/Chatbase) | 402 |
|
||||
|[yakami129/VirtualWife](https://github.com/yakami129/VirtualWife) | 399 |
|
||||
|[wandb/weave](https://github.com/wandb/weave) | 399 |
|
||||
|[mtenenholtz/chat-twitter](https://github.com/mtenenholtz/chat-twitter) | 398 |
|
||||
|[LinkSoul-AI/AutoAgents](https://github.com/LinkSoul-AI/AutoAgents) | 397 |
|
||||
|[Agenta-AI/agenta](https://github.com/Agenta-AI/agenta) | 389 |
|
||||
|[huchenxucs/ChatDB](https://github.com/huchenxucs/ChatDB) | 386 |
|
||||
|[mallorbc/Finetune_LLMs](https://github.com/mallorbc/Finetune_LLMs) | 379 |
|
||||
|[junruxiong/IncarnaMind](https://github.com/junruxiong/IncarnaMind) | 372 |
|
||||
|[MagnivOrg/prompt-layer-library](https://github.com/MagnivOrg/prompt-layer-library) | 368 |
|
||||
|[mosaicml/examples](https://github.com/mosaicml/examples) | 366 |
|
||||
|[rsaryev/talk-codebase](https://github.com/rsaryev/talk-codebase) | 364 |
|
||||
|[morpheuslord/GPT_Vuln-analyzer](https://github.com/morpheuslord/GPT_Vuln-analyzer) | 362 |
|
||||
|[monarch-initiative/ontogpt](https://github.com/monarch-initiative/ontogpt) | 362 |
|
||||
|[JayZeeDesign/researcher-gpt](https://github.com/JayZeeDesign/researcher-gpt) | 361 |
|
||||
|[personoids/personoids-lite](https://github.com/personoids/personoids-lite) | 361 |
|
||||
|[intel/intel-extension-for-transformers](https://github.com/intel/intel-extension-for-transformers) | 357 |
|
||||
|[jerlendds/osintbuddy](https://github.com/jerlendds/osintbuddy) | 357 |
|
||||
|[steamship-packages/langchain-production-starter](https://github.com/steamship-packages/langchain-production-starter) | 356 |
|
||||
|[onlyphantom/llm-python](https://github.com/onlyphantom/llm-python) | 354 |
|
||||
|[Azure-Samples/miyagi](https://github.com/Azure-Samples/miyagi) | 340 |
|
||||
|[mrwadams/attackgen](https://github.com/mrwadams/attackgen) | 338 |
|
||||
|[rgomezcasas/dotfiles](https://github.com/rgomezcasas/dotfiles) | 337 |
|
||||
|[eosphoros-ai/DB-GPT-Hub](https://github.com/eosphoros-ai/DB-GPT-Hub) | 336 |
|
||||
|[andylokandy/gpt-4-search](https://github.com/andylokandy/gpt-4-search) | 335 |
|
||||
|[NimbleBoxAI/ChainFury](https://github.com/NimbleBoxAI/ChainFury) | 330 |
|
||||
|[momegas/megabots](https://github.com/momegas/megabots) | 329 |
|
||||
|[Nuggt-dev/Nuggt](https://github.com/Nuggt-dev/Nuggt) | 315 |
|
||||
|[itamargol/openai](https://github.com/itamargol/openai) | 315 |
|
||||
|[BlackHC/llm-strategy](https://github.com/BlackHC/llm-strategy) | 315 |
|
||||
|[aws-samples/aws-genai-llm-chatbot](https://github.com/aws-samples/aws-genai-llm-chatbot) | 312 |
|
||||
|[Cheems-Seminar/grounded-segment-any-parts](https://github.com/Cheems-Seminar/grounded-segment-any-parts) | 312 |
|
||||
|[preset-io/promptimize](https://github.com/preset-io/promptimize) | 311 |
|
||||
|[dgarnitz/vectorflow](https://github.com/dgarnitz/vectorflow) | 309 |
|
||||
|[langchain-ai/langsmith-cookbook](https://github.com/langchain-ai/langsmith-cookbook) | 309 |
|
||||
|[CambioML/pykoi](https://github.com/CambioML/pykoi) | 309 |
|
||||
|[wandb/edu](https://github.com/wandb/edu) | 301 |
|
||||
|[XzaiCloud/luna-ai](https://github.com/XzaiCloud/luna-ai) | 300 |
|
||||
|[liangwq/Chatglm_lora_multi-gpu](https://github.com/liangwq/Chatglm_lora_multi-gpu) | 294 |
|
||||
|[Haste171/langchain-chatbot](https://github.com/Haste171/langchain-chatbot) | 291 |
|
||||
|[sullivan-sean/chat-langchainjs](https://github.com/sullivan-sean/chat-langchainjs) | 286 |
|
||||
|[sugarforever/LangChain-Tutorials](https://github.com/sugarforever/LangChain-Tutorials) | 285 |
|
||||
|[facebookresearch/personal-timeline](https://github.com/facebookresearch/personal-timeline) | 283 |
|
||||
|[hnawaz007/pythondataanalysis](https://github.com/hnawaz007/pythondataanalysis) | 282 |
|
||||
|[yuanjie-ai/ChatLLM](https://github.com/yuanjie-ai/ChatLLM) | 280 |
|
||||
|[MetaGLM/FinGLM](https://github.com/MetaGLM/FinGLM) | 279 |
|
||||
|[JohnSnowLabs/langtest](https://github.com/JohnSnowLabs/langtest) | 277 |
|
||||
|[Em1tSan/NeuroGPT](https://github.com/Em1tSan/NeuroGPT) | 274 |
|
||||
|[Safiullah-Rahu/CSV-AI](https://github.com/Safiullah-Rahu/CSV-AI) | 274 |
|
||||
|[conceptofmind/toolformer](https://github.com/conceptofmind/toolformer) | 274 |
|
||||
|[airobotlab/KoChatGPT](https://github.com/airobotlab/KoChatGPT) | 266 |
|
||||
|[gia-guar/JARVIS-ChatGPT](https://github.com/gia-guar/JARVIS-ChatGPT) | 263 |
|
||||
|[Mintplex-Labs/vector-admin](https://github.com/Mintplex-Labs/vector-admin) | 262 |
|
||||
|[artitw/text2text](https://github.com/artitw/text2text) | 262 |
|
||||
|[kaarthik108/snowChat](https://github.com/kaarthik108/snowChat) | 261 |
|
||||
|[paolorechia/learn-langchain](https://github.com/paolorechia/learn-langchain) | 260 |
|
||||
|[shamspias/customizable-gpt-chatbot](https://github.com/shamspias/customizable-gpt-chatbot) | 260 |
|
||||
|[ur-whitelab/exmol](https://github.com/ur-whitelab/exmol) | 258 |
|
||||
|[hwchase17/chroma-langchain](https://github.com/hwchase17/chroma-langchain) | 257 |
|
||||
|[bborn/howdoi.ai](https://github.com/bborn/howdoi.ai) | 255 |
|
||||
|[ur-whitelab/chemcrow-public](https://github.com/ur-whitelab/chemcrow-public) | 253 |
|
||||
|[pablomarin/GPT-Azure-Search-Engine](https://github.com/pablomarin/GPT-Azure-Search-Engine) | 251 |
|
||||
|[gustavz/DataChad](https://github.com/gustavz/DataChad) | 249 |
|
||||
|[radi-cho/datasetGPT](https://github.com/radi-cho/datasetGPT) | 249 |
|
||||
|[ennucore/clippinator](https://github.com/ennucore/clippinator) | 247 |
|
||||
|[recalign/RecAlign](https://github.com/recalign/RecAlign) | 244 |
|
||||
|[lilacai/lilac](https://github.com/lilacai/lilac) | 243 |
|
||||
|[kaleido-lab/dolphin](https://github.com/kaleido-lab/dolphin) | 236 |
|
||||
|[iusztinpaul/hands-on-llms](https://github.com/iusztinpaul/hands-on-llms) | 233 |
|
||||
|[PradipNichite/Youtube-Tutorials](https://github.com/PradipNichite/Youtube-Tutorials) | 231 |
|
||||
|[shaman-ai/agent-actors](https://github.com/shaman-ai/agent-actors) | 231 |
|
||||
|[hwchase17/langchain-streamlit-template](https://github.com/hwchase17/langchain-streamlit-template) | 231 |
|
||||
|[yym68686/ChatGPT-Telegram-Bot](https://github.com/yym68686/ChatGPT-Telegram-Bot) | 226 |
|
||||
|[grumpyp/aixplora](https://github.com/grumpyp/aixplora) | 222 |
|
||||
|[su77ungr/CASALIOY](https://github.com/su77ungr/CASALIOY) | 222 |
|
||||
|[alvarosevilla95/autolang](https://github.com/alvarosevilla95/autolang) | 222 |
|
||||
|[arthur-ai/bench](https://github.com/arthur-ai/bench) | 220 |
|
||||
|[miaoshouai/miaoshouai-assistant](https://github.com/miaoshouai/miaoshouai-assistant) | 219 |
|
||||
|[AutoPackAI/beebot](https://github.com/AutoPackAI/beebot) | 217 |
|
||||
|[edreisMD/plugnplai](https://github.com/edreisMD/plugnplai) | 216 |
|
||||
|[nicknochnack/LangchainDocuments](https://github.com/nicknochnack/LangchainDocuments) | 214 |
|
||||
|[AkshitIreddy/Interactive-LLM-Powered-NPCs](https://github.com/AkshitIreddy/Interactive-LLM-Powered-NPCs) | 213 |
|
||||
|[SpecterOps/Nemesis](https://github.com/SpecterOps/Nemesis) | 210 |
|
||||
|[kyegomez/swarms](https://github.com/kyegomez/swarms) | 210 |
|
||||
|[wpydcr/LLM-Kit](https://github.com/wpydcr/LLM-Kit) | 208 |
|
||||
|[orgexyz/BlockAGI](https://github.com/orgexyz/BlockAGI) | 204 |
|
||||
|[Chainlit/cookbook](https://github.com/Chainlit/cookbook) | 202 |
|
||||
|[WongSaang/chatgpt-ui-server](https://github.com/WongSaang/chatgpt-ui-server) | 202 |
|
||||
|[jbrukh/gpt-jargon](https://github.com/jbrukh/gpt-jargon) | 202 |
|
||||
|[handrew/browserpilot](https://github.com/handrew/browserpilot) | 202 |
|
||||
|[langchain-ai/web-explorer](https://github.com/langchain-ai/web-explorer) | 200 |
|
||||
|[plchld/InsightFlow](https://github.com/plchld/InsightFlow) | 200 |
|
||||
|[alphasecio/langchain-examples](https://github.com/alphasecio/langchain-examples) | 199 |
|
||||
|[Gentopia-AI/Gentopia](https://github.com/Gentopia-AI/Gentopia) | 198 |
|
||||
|[SamPink/dev-gpt](https://github.com/SamPink/dev-gpt) | 196 |
|
||||
|[yasyf/compress-gpt](https://github.com/yasyf/compress-gpt) | 196 |
|
||||
|[benthecoder/ClassGPT](https://github.com/benthecoder/ClassGPT) | 195 |
|
||||
|[voxel51/voxelgpt](https://github.com/voxel51/voxelgpt) | 193 |
|
||||
|[CL-lau/SQL-GPT](https://github.com/CL-lau/SQL-GPT) | 192 |
|
||||
|[blob42/Instrukt](https://github.com/blob42/Instrukt) | 191 |
|
||||
|[streamlit/llm-examples](https://github.com/streamlit/llm-examples) | 191 |
|
||||
|[stepanogil/autonomous-hr-chatbot](https://github.com/stepanogil/autonomous-hr-chatbot) | 190 |
|
||||
|[TsinghuaDatabaseGroup/DB-GPT](https://github.com/TsinghuaDatabaseGroup/DB-GPT) | 189 |
|
||||
|[PJLab-ADG/DriveLikeAHuman](https://github.com/PJLab-ADG/DriveLikeAHuman) | 187 |
|
||||
|[Azure-Samples/azure-search-power-skills](https://github.com/Azure-Samples/azure-search-power-skills) | 187 |
|
||||
|[microsoft/azure-openai-in-a-day-workshop](https://github.com/microsoft/azure-openai-in-a-day-workshop) | 187 |
|
||||
|[ju-bezdek/langchain-decorators](https://github.com/ju-bezdek/langchain-decorators) | 182 |
|
||||
|[hardbyte/qabot](https://github.com/hardbyte/qabot) | 181 |
|
||||
|[hongbo-miao/hongbomiao.com](https://github.com/hongbo-miao/hongbomiao.com) | 180 |
|
||||
|[QwenLM/Qwen-Agent](https://github.com/QwenLM/Qwen-Agent) | 179 |
|
||||
|[showlab/UniVTG](https://github.com/showlab/UniVTG) | 179 |
|
||||
|[Azure-Samples/jp-azureopenai-samples](https://github.com/Azure-Samples/jp-azureopenai-samples) | 176 |
|
||||
|[afaqueumer/DocQA](https://github.com/afaqueumer/DocQA) | 174 |
|
||||
|[ethanyanjiali/minChatGPT](https://github.com/ethanyanjiali/minChatGPT) | 174 |
|
||||
|[shauryr/S2QA](https://github.com/shauryr/S2QA) | 174 |
|
||||
|[RoboCoachTechnologies/GPT-Synthesizer](https://github.com/RoboCoachTechnologies/GPT-Synthesizer) | 173 |
|
||||
|[chakkaradeep/pyCodeAGI](https://github.com/chakkaradeep/pyCodeAGI) | 172 |
|
||||
|[vaibkumr/prompt-optimizer](https://github.com/vaibkumr/prompt-optimizer) | 171 |
|
||||
|[ccurme/yolopandas](https://github.com/ccurme/yolopandas) | 170 |
|
||||
|[anarchy-ai/LLM-VM](https://github.com/anarchy-ai/LLM-VM) | 169 |
|
||||
|[ray-project/langchain-ray](https://github.com/ray-project/langchain-ray) | 169 |
|
||||
|[fengyuli-dev/multimedia-gpt](https://github.com/fengyuli-dev/multimedia-gpt) | 169 |
|
||||
|[ibiscp/LLM-IMDB](https://github.com/ibiscp/LLM-IMDB) | 168 |
|
||||
|[mayooear/private-chatbot-mpt30b-langchain](https://github.com/mayooear/private-chatbot-mpt30b-langchain) | 167 |
|
||||
|[OpenPluginACI/openplugin](https://github.com/OpenPluginACI/openplugin) | 165 |
|
||||
|[jmpaz/promptlib](https://github.com/jmpaz/promptlib) | 165 |
|
||||
|[kjappelbaum/gptchem](https://github.com/kjappelbaum/gptchem) | 162 |
|
||||
|[JorisdeJong123/7-Days-of-LangChain](https://github.com/JorisdeJong123/7-Days-of-LangChain) | 161 |
|
||||
|[retr0reg/Ret2GPT](https://github.com/retr0reg/Ret2GPT) | 161 |
|
||||
|[menloparklab/falcon-langchain](https://github.com/menloparklab/falcon-langchain) | 159 |
|
||||
|[summarizepaper/summarizepaper](https://github.com/summarizepaper/summarizepaper) | 158 |
|
||||
|[emarco177/ice_breaker](https://github.com/emarco177/ice_breaker) | 157 |
|
||||
|[AmineDiro/cria](https://github.com/AmineDiro/cria) | 156 |
|
||||
|[morpheuslord/HackBot](https://github.com/morpheuslord/HackBot) | 156 |
|
||||
|[homanp/vercel-langchain](https://github.com/homanp/vercel-langchain) | 156 |
|
||||
|[mlops-for-all/mlops-for-all.github.io](https://github.com/mlops-for-all/mlops-for-all.github.io) | 155 |
|
||||
|[positive666/Prompt-Can-Anything](https://github.com/positive666/Prompt-Can-Anything) | 154 |
|
||||
|[deeppavlov/dream](https://github.com/deeppavlov/dream) | 153 |
|
||||
|[flurb18/AgentOoba](https://github.com/flurb18/AgentOoba) | 151 |
|
||||
|[Open-Swarm-Net/GPT-Swarm](https://github.com/Open-Swarm-Net/GPT-Swarm) | 151 |
|
||||
|[v7labs/benchllm](https://github.com/v7labs/benchllm) | 150 |
|
||||
|[Klingefjord/chatgpt-telegram](https://github.com/Klingefjord/chatgpt-telegram) | 150 |
|
||||
|[Aggregate-Intellect/sherpa](https://github.com/Aggregate-Intellect/sherpa) | 148 |
|
||||
|[Coding-Crashkurse/Langchain-Full-Course](https://github.com/Coding-Crashkurse/Langchain-Full-Course) | 148 |
|
||||
|[SuperDuperDB/superduperdb](https://github.com/SuperDuperDB/superduperdb) | 147 |
|
||||
|[defenseunicorns/leapfrogai](https://github.com/defenseunicorns/leapfrogai) | 147 |
|
||||
|[menloparklab/langchain-cohere-qdrant-doc-retrieval](https://github.com/menloparklab/langchain-cohere-qdrant-doc-retrieval) | 147 |
|
||||
|[Jaseci-Labs/jaseci](https://github.com/Jaseci-Labs/jaseci) | 146 |
|
||||
|[realminchoi/babyagi-ui](https://github.com/realminchoi/babyagi-ui) | 146 |
|
||||
|[iMagist486/ElasticSearch-Langchain-Chatglm2](https://github.com/iMagist486/ElasticSearch-Langchain-Chatglm2) | 144 |
|
||||
|[peterw/StoryStorm](https://github.com/peterw/StoryStorm) | 143 |
|
||||
|[kulltc/chatgpt-sql](https://github.com/kulltc/chatgpt-sql) | 142 |
|
||||
|[Teahouse-Studios/akari-bot](https://github.com/Teahouse-Studios/akari-bot) | 142 |
|
||||
|[hirokidaichi/wanna](https://github.com/hirokidaichi/wanna) | 141 |
|
||||
|[yasyf/summ](https://github.com/yasyf/summ) | 141 |
|
||||
|[solana-labs/chatgpt-plugin](https://github.com/solana-labs/chatgpt-plugin) | 140 |
|
||||
|[ssheng/BentoChain](https://github.com/ssheng/BentoChain) | 139 |
|
||||
|[mallahyari/drqa](https://github.com/mallahyari/drqa) | 139 |
|
||||
|[petehunt/langchain-github-bot](https://github.com/petehunt/langchain-github-bot) | 139 |
|
||||
|[dbpunk-labs/octogen](https://github.com/dbpunk-labs/octogen) | 138 |
|
||||
|[RedisVentures/redis-openai-qna](https://github.com/RedisVentures/redis-openai-qna) | 138 |
|
||||
|[eunomia-bpf/GPTtrace](https://github.com/eunomia-bpf/GPTtrace) | 138 |
|
||||
|[langchain-ai/langsmith-sdk](https://github.com/langchain-ai/langsmith-sdk) | 137 |
|
||||
|[jina-ai/fastapi-serve](https://github.com/jina-ai/fastapi-serve) | 137 |
|
||||
|[yeagerai/genworlds](https://github.com/yeagerai/genworlds) | 137 |
|
||||
|[aurelio-labs/arxiv-bot](https://github.com/aurelio-labs/arxiv-bot) | 137 |
|
||||
|[luisroque/large_laguage_models](https://github.com/luisroque/large_laguage_models) | 136 |
|
||||
|[ChuloAI/BrainChulo](https://github.com/ChuloAI/BrainChulo) | 136 |
|
||||
|[3Alan/DocsMind](https://github.com/3Alan/DocsMind) | 136 |
|
||||
|[KylinC/ChatFinance](https://github.com/KylinC/ChatFinance) | 133 |
|
||||
|[langchain-ai/text-split-explorer](https://github.com/langchain-ai/text-split-explorer) | 133 |
|
||||
|[davila7/file-gpt](https://github.com/davila7/file-gpt) | 133 |
|
||||
|[tencentmusic/supersonic](https://github.com/tencentmusic/supersonic) | 132 |
|
||||
|[kimtth/azure-openai-llm-vector-langchain](https://github.com/kimtth/azure-openai-llm-vector-langchain) | 131 |
|
||||
|[ciare-robotics/world-creator](https://github.com/ciare-robotics/world-creator) | 129 |
|
||||
|[zenml-io/zenml-projects](https://github.com/zenml-io/zenml-projects) | 129 |
|
||||
|[log1stics/voice-generator-webui](https://github.com/log1stics/voice-generator-webui) | 129 |
|
||||
|[snexus/llm-search](https://github.com/snexus/llm-search) | 129 |
|
||||
|[fixie-ai/fixie-examples](https://github.com/fixie-ai/fixie-examples) | 128 |
|
||||
|[MedalCollector/Orator](https://github.com/MedalCollector/Orator) | 127 |
|
||||
|[grumpyp/chroma-langchain-tutorial](https://github.com/grumpyp/chroma-langchain-tutorial) | 127 |
|
||||
|[langchain-ai/langchain-aws-template](https://github.com/langchain-ai/langchain-aws-template) | 127 |
|
||||
|[prof-frink-lab/slangchain](https://github.com/prof-frink-lab/slangchain) | 126 |
|
||||
|[KMnO4-zx/huanhuan-chat](https://github.com/KMnO4-zx/huanhuan-chat) | 124 |
|
||||
|[RCGAI/SimplyRetrieve](https://github.com/RCGAI/SimplyRetrieve) | 124 |
|
||||
|[Dicklesworthstone/llama2_aided_tesseract](https://github.com/Dicklesworthstone/llama2_aided_tesseract) | 123 |
|
||||
|[sdaaron/QueryGPT](https://github.com/sdaaron/QueryGPT) | 122 |
|
||||
|[athina-ai/athina-sdk](https://github.com/athina-ai/athina-sdk) | 121 |
|
||||
|[AIAnytime/Llama2-Medical-Chatbot](https://github.com/AIAnytime/Llama2-Medical-Chatbot) | 121 |
|
||||
|[MuhammadMoinFaisal/LargeLanguageModelsProjects](https://github.com/MuhammadMoinFaisal/LargeLanguageModelsProjects) | 121 |
|
||||
|[Azure/business-process-automation](https://github.com/Azure/business-process-automation) | 121 |
|
||||
|[definitive-io/code-indexer-loop](https://github.com/definitive-io/code-indexer-loop) | 119 |
|
||||
|[nrl-ai/pautobot](https://github.com/nrl-ai/pautobot) | 119 |
|
||||
|[Azure/app-service-linux-docs](https://github.com/Azure/app-service-linux-docs) | 118 |
|
||||
|[zilliztech/akcio](https://github.com/zilliztech/akcio) | 118 |
|
||||
|[CodeAlchemyAI/ViLT-GPT](https://github.com/CodeAlchemyAI/ViLT-GPT) | 117 |
|
||||
|[georgesung/llm_qlora](https://github.com/georgesung/llm_qlora) | 117 |
|
||||
|[nicknochnack/Nopenai](https://github.com/nicknochnack/Nopenai) | 115 |
|
||||
|[nftblackmagic/flask-langchain](https://github.com/nftblackmagic/flask-langchain) | 115 |
|
||||
|[mortium91/langchain-assistant](https://github.com/mortium91/langchain-assistant) | 115 |
|
||||
|[Ngonie-x/langchain_csv](https://github.com/Ngonie-x/langchain_csv) | 114 |
|
||||
|[wombyz/HormoziGPT](https://github.com/wombyz/HormoziGPT) | 114 |
|
||||
|[langchain-ai/langchain-teacher](https://github.com/langchain-ai/langchain-teacher) | 113 |
|
||||
|[mluogh/eastworld](https://github.com/mluogh/eastworld) | 112 |
|
||||
|[mudler/LocalAGI](https://github.com/mudler/LocalAGI) | 112 |
|
||||
|[marimo-team/marimo](https://github.com/marimo-team/marimo) | 111 |
|
||||
|[trancethehuman/entities-extraction-web-scraper](https://github.com/trancethehuman/entities-extraction-web-scraper) | 111 |
|
||||
|[xuwenhao/mactalk-ai-course](https://github.com/xuwenhao/mactalk-ai-course) | 111 |
|
||||
|[dcaribou/transfermarkt-datasets](https://github.com/dcaribou/transfermarkt-datasets) | 111 |
|
||||
|[rabbitmetrics/langchain-13-min](https://github.com/rabbitmetrics/langchain-13-min) | 111 |
|
||||
|[dotvignesh/PDFChat](https://github.com/dotvignesh/PDFChat) | 111 |
|
||||
|[aws-samples/cdk-eks-blueprints-patterns](https://github.com/aws-samples/cdk-eks-blueprints-patterns) | 110 |
|
||||
|[topoteretes/PromethAI-Backend](https://github.com/topoteretes/PromethAI-Backend) | 110 |
|
||||
|[jlonge4/local_llama](https://github.com/jlonge4/local_llama) | 110 |
|
||||
|[RUC-GSAI/YuLan-Rec](https://github.com/RUC-GSAI/YuLan-Rec) | 108 |
|
||||
|[gh18l/CrawlGPT](https://github.com/gh18l/CrawlGPT) | 107 |
|
||||
|[c0sogi/LLMChat](https://github.com/c0sogi/LLMChat) | 107 |
|
||||
|[hwchase17/langchain-gradio-template](https://github.com/hwchase17/langchain-gradio-template) | 107 |
|
||||
|[ArjanCodes/examples](https://github.com/ArjanCodes/examples) | 106 |
|
||||
|[genia-dev/GeniA](https://github.com/genia-dev/GeniA) | 105 |
|
||||
|[nexus-stc/stc](https://github.com/nexus-stc/stc) | 105 |
|
||||
|[mbchang/data-driven-characters](https://github.com/mbchang/data-driven-characters) | 105 |
|
||||
|[ademakdogan/ChatSQL](https://github.com/ademakdogan/ChatSQL) | 104 |
|
||||
|[crosleythomas/MirrorGPT](https://github.com/crosleythomas/MirrorGPT) | 104 |
|
||||
|[IvanIsCoding/ResuLLMe](https://github.com/IvanIsCoding/ResuLLMe) | 104 |
|
||||
|[avrabyt/MemoryBot](https://github.com/avrabyt/MemoryBot) | 104 |
|
||||
|[Azure/azure-sdk-tools](https://github.com/Azure/azure-sdk-tools) | 103 |
|
||||
|[aniketmaurya/llm-inference](https://github.com/aniketmaurya/llm-inference) | 103 |
|
||||
|[Anil-matcha/Youtube-to-chatbot](https://github.com/Anil-matcha/Youtube-to-chatbot) | 103 |
|
||||
|[nyanp/chat2plot](https://github.com/nyanp/chat2plot) | 102 |
|
||||
|[aws-samples/amazon-kendra-langchain-extensions](https://github.com/aws-samples/amazon-kendra-langchain-extensions) | 101 |
|
||||
|[atisharma/llama_farm](https://github.com/atisharma/llama_farm) | 100 |
|
||||
|[Xueheng-Li/SynologyChatbotGPT](https://github.com/Xueheng-Li/SynologyChatbotGPT) | 100 |
|
||||
|
||||
|
||||
|
||||
_Generated by [github-dependents-info](https://github.com/nvuillam/github-dependents-info)_
|
||||
|
||||
`github-dependents-info --repo langchain-ai/langchain --markdownfile dependents.md --minstars 100 --sort stars`
|
||||
@@ -91,7 +91,7 @@
|
||||
- [Chat with a `CSV` | `LangChain Agents` Tutorial (Beginners)](https://youtu.be/tjeti5vXWOU) by [Alejandro AO - Software & Ai](https://www.youtube.com/@alejandro_ao)
|
||||
- [Create Your Own ChatGPT with `PDF` Data in 5 Minutes (LangChain Tutorial)](https://youtu.be/au2WVVGUvc8) by [Liam Ottley](https://www.youtube.com/@LiamOttley)
|
||||
- [Build a Custom Chatbot with OpenAI: `GPT-Index` & LangChain | Step-by-Step Tutorial](https://youtu.be/FIDv6nc4CgU) by [Fabrikod](https://www.youtube.com/@fabrikod)
|
||||
- [`Flowise` is an open source no-code UI visual tool to build 🦜🔗LangChain applications](https://youtu.be/CovAPtQPU0k) by [Cobus Greyling](https://www.youtube.com/@CobusGreylingZA)
|
||||
- [`Flowise` is an open-source no-code UI visual tool to build 🦜🔗LangChain applications](https://youtu.be/CovAPtQPU0k) by [Cobus Greyling](https://www.youtube.com/@CobusGreylingZA)
|
||||
- [LangChain & GPT 4 For Data Analysis: The `Pandas` Dataframe Agent](https://youtu.be/rFQ5Kmkd4jc) by [Rabbitmetrics](https://www.youtube.com/@rabbitmetrics)
|
||||
- [`GirlfriendGPT` - AI girlfriend with LangChain](https://youtu.be/LiN3D1QZGQw) by [Toolfinder AI](https://www.youtube.com/@toolfinderai)
|
||||
- [How to build with Langchain 10x easier | ⛓️ LangFlow & `Flowise`](https://youtu.be/Ya1oGL7ZTvU) by [AI Jason](https://www.youtube.com/@AIJasonZ)
|
||||
@@ -48,7 +48,6 @@ If you’re working on something you’re proud of, and think the LangChain comm
|
||||
Here’s where our team hangs out, talks shop, spotlights cool work, and shares what we’re up to. We’d love to see you there too.
|
||||
|
||||
- **[Twitter](https://twitter.com/LangChainAI):** We post about what we’re working on and what cool things we’re seeing in the space. If you tag @langchainai in your post, we’ll almost certainly see it, and can show you some love!
|
||||
- **[Discord](https://discord.gg/6adMQxSpJS):** connect with >30k developers who are building with LangChain
|
||||
- **[Discord](https://discord.gg/6adMQxSpJS):** connect with over 30,000 developers who are building with LangChain.
|
||||
- **[GitHub](https://github.com/langchain-ai/langchain):** Open pull requests, contribute to a discussion, and/or contribute
|
||||
- **[Subscribe to our bi-weekly Release Notes](https://6w1pwbss0py.typeform.com/to/KjZB1auB):** a twice/month email roundup of the coolest things going on in our orbit
|
||||
- **Slack:** If you’re building an application in production at your company, we’d love to get into a Slack channel together. Fill out [this form](https://airtable.com/appwQzlErAS2qiP0L/shrGtGaVBVAz7NcV2) and we’ll get in touch about setting one up.
|
||||
@@ -17,9 +17,10 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from operator import itemgetter\n",
|
||||
"from langchain.chat_models import ChatOpenAI\n",
|
||||
"from langchain.memory import ConversationBufferMemory\n",
|
||||
"from langchain.schema.runnable import RunnableMap\n",
|
||||
"from langchain.schema.runnable import RunnablePassthrough, RunnableLambda\n",
|
||||
"from langchain.prompts import ChatPromptTemplate, MessagesPlaceholder\n",
|
||||
"\n",
|
||||
"model = ChatOpenAI()\n",
|
||||
@@ -27,7 +28,7 @@
|
||||
" (\"system\", \"You are a helpful chatbot\"),\n",
|
||||
" MessagesPlaceholder(variable_name=\"history\"),\n",
|
||||
" (\"human\", \"{input}\")\n",
|
||||
"])"
|
||||
"])\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -37,7 +38,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"memory = ConversationBufferMemory(return_messages=True)"
|
||||
"memory = ConversationBufferMemory(return_messages=True)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -58,7 +59,7 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"memory.load_memory_variables({})"
|
||||
"memory.load_memory_variables({})\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -68,13 +69,9 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"chain = RunnableMap({\n",
|
||||
" \"input\": lambda x: x[\"input\"],\n",
|
||||
" \"memory\": memory.load_memory_variables\n",
|
||||
"}) | {\n",
|
||||
" \"input\": lambda x: x[\"input\"],\n",
|
||||
" \"history\": lambda x: x[\"memory\"][\"history\"]\n",
|
||||
"} | prompt | model"
|
||||
"chain = RunnablePassthrough.assign(\n",
|
||||
" memory=RunnableLambda(memory.load_memory_variables) | itemgetter(\"history\")\n",
|
||||
") | prompt | model\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -97,7 +94,7 @@
|
||||
"source": [
|
||||
"inputs = {\"input\": \"hi im bob\"}\n",
|
||||
"response = chain.invoke(inputs)\n",
|
||||
"response"
|
||||
"response\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -107,7 +104,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"memory.save_context(inputs, {\"output\": response.content})"
|
||||
"memory.save_context(inputs, {\"output\": response.content})\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -129,7 +126,7 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"memory.load_memory_variables({})"
|
||||
"memory.load_memory_variables({})\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -152,7 +149,7 @@
|
||||
"source": [
|
||||
"inputs = {\"input\": \"whats my name\"}\n",
|
||||
"response = chain.invoke(inputs)\n",
|
||||
"response"
|
||||
"response\n"
|
||||
]
|
||||
}
|
||||
],
|
||||