mirror of
https://github.com/hwchase17/langchain.git
synced 2026-01-23 21:31:02 +00:00
Compare commits
2427 Commits
harrison/a
...
harrison/m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08eaf914d6 | ||
|
|
b01cf0dd54 | ||
|
|
a9b97aa6f4 | ||
|
|
50d9c7d5a4 | ||
|
|
e67b26eee9 | ||
|
|
6aafb46807 | ||
|
|
bc9b8c8239 | ||
|
|
0013256e81 | ||
|
|
1913320cbe | ||
|
|
ae76e473e1 | ||
|
|
8e1a7a8646 | ||
|
|
e82687ddf4 | ||
|
|
7d2b946d0b | ||
|
|
c7db9febb0 | ||
|
|
7ad13cdbdb | ||
|
|
c5a46e7435 | ||
|
|
17c4ec4812 | ||
|
|
4a649e3b14 | ||
|
|
8a44c879c6 | ||
|
|
e0e3ef1c57 | ||
|
|
4555ad5d1f | ||
|
|
6ac120f299 | ||
|
|
e41f0b341c | ||
|
|
b3b155d488 | ||
|
|
e74733ab9e | ||
|
|
11ab0be11a | ||
|
|
1281fdf0f2 | ||
|
|
34ebb29726 | ||
|
|
f9edf76e7c | ||
|
|
970b2f9d38 | ||
|
|
292accde2b | ||
|
|
ee3d0513ad | ||
|
|
8fdf88b8e3 | ||
|
|
0c52275bdb | ||
|
|
cde1e8739a | ||
|
|
a9b3b2e327 | ||
|
|
6ac5d80286 | ||
|
|
ec1a2adf9c | ||
|
|
5b6bbf4ab2 | ||
|
|
2f0088039d | ||
|
|
b023f0c0f2 | ||
|
|
2c91f0d750 | ||
|
|
5922742d56 | ||
|
|
681ba6d520 | ||
|
|
7a5e36f3f5 | ||
|
|
289e9aeb9d | ||
|
|
d1561b74eb | ||
|
|
bb7ac9edb5 | ||
|
|
010d0bfeea | ||
|
|
e05997c25e | ||
|
|
c5bce4a465 | ||
|
|
2c9619bc1d | ||
|
|
18f5c985d9 | ||
|
|
a197acfcd3 | ||
|
|
18af149e91 | ||
|
|
614cff89bc | ||
|
|
a7227ee01b | ||
|
|
232faba796 | ||
|
|
d7d629911b | ||
|
|
6e90406e0f | ||
|
|
c868a3eef3 | ||
|
|
20e9ce8a62 | ||
|
|
704d56e241 | ||
|
|
b934677a81 | ||
|
|
2d038b57b2 | ||
|
|
0b740c9baa | ||
|
|
ac3e6e3944 | ||
|
|
d2270a2261 | ||
|
|
1250cd4630 | ||
|
|
f8cf09a230 | ||
|
|
e4224a396b | ||
|
|
21bd16bb59 | ||
|
|
9218684759 | ||
|
|
d5819a7ca7 | ||
|
|
0ca37e613c | ||
|
|
ca1afa7213 | ||
|
|
5f356b9993 | ||
|
|
d6f5d0c6b1 | ||
|
|
62ec10a7f5 | ||
|
|
736a1819aa | ||
|
|
f3e7ac0a2c | ||
|
|
3678cba0be | ||
|
|
7af186fddf | ||
|
|
7cc200766e | ||
|
|
db7ef635c0 | ||
|
|
0eb1bc1a02 | ||
|
|
63fcf41bea | ||
|
|
2791a753bf | ||
|
|
a09a0e3511 | ||
|
|
0ce8745928 | ||
|
|
d8ae925425 | ||
|
|
fe8bbc2da7 | ||
|
|
77c286cf02 | ||
|
|
3ec6400d70 | ||
|
|
a6ebffb695 | ||
|
|
767fa91eae | ||
|
|
5f74db4500 | ||
|
|
511c12dd39 | ||
|
|
893d20f735 | ||
|
|
35cfd25db3 | ||
|
|
658f8bdee7 | ||
|
|
5518f24ec3 | ||
|
|
b93638ef1e | ||
|
|
a1549901ce | ||
|
|
78aa59c68b | ||
|
|
ec0dd6e34a | ||
|
|
3294774148 | ||
|
|
cef79ca579 | ||
|
|
106364a45c | ||
|
|
9355e3f5f5 | ||
|
|
f15763518a | ||
|
|
137da7e4b6 | ||
|
|
9f4b720a63 | ||
|
|
76fcd96dae | ||
|
|
11fec7d4d1 | ||
|
|
0b4a51930c | ||
|
|
c66755b661 | ||
|
|
4d8cda1c3b | ||
|
|
3af36943e8 | ||
|
|
8ef7274ee6 | ||
|
|
d9fcc45d05 | ||
|
|
ce7c11625f | ||
|
|
5a207cce8f | ||
|
|
b3ae6bcd3f | ||
|
|
5468528748 | ||
|
|
69f4ffb851 | ||
|
|
2be4fbb835 | ||
|
|
062c3c00a2 | ||
|
|
92b87c2fec | ||
|
|
3954bcf396 | ||
|
|
b7999a9bc1 | ||
|
|
a0d847f636 | ||
|
|
217b5cc72d | ||
|
|
4092fd21dc | ||
|
|
2a4b32dee2 | ||
|
|
daf3e99b96 | ||
|
|
b177a29d3f | ||
|
|
65111eb2b3 | ||
|
|
0cfaa76e45 | ||
|
|
2ae2d6cd1d | ||
|
|
204a73c1d9 | ||
|
|
08e2352f7b | ||
|
|
f907b62526 | ||
|
|
233b52735e | ||
|
|
38dabdbb3a | ||
|
|
84a46753ab | ||
|
|
d5b1608216 | ||
|
|
25487fa5ee | ||
|
|
2dcda8a8ac | ||
|
|
98dd6d068a | ||
|
|
5124c1e0d9 | ||
|
|
a47c8618ec | ||
|
|
87ad4fc4b2 | ||
|
|
92a5f00ffb | ||
|
|
aea090045b | ||
|
|
a4c9053d40 | ||
|
|
2f2d27fd82 | ||
|
|
019eb13681 | ||
|
|
450eb91fe2 | ||
|
|
0551bc90a5 | ||
|
|
a0ea6f6b6b | ||
|
|
1a9ac3b1f9 | ||
|
|
625717daa8 | ||
|
|
74f8e603d9 | ||
|
|
d0d89d39ef | ||
|
|
b64c39dfe7 | ||
|
|
3fb0e4872a | ||
|
|
8d9e9e013c | ||
|
|
26ec845921 | ||
|
|
c112d7334d | ||
|
|
6c11f94013 | ||
|
|
6e25e65085 | ||
|
|
8f98592ac9 | ||
|
|
b9040669a0 | ||
|
|
647210a4b9 | ||
|
|
8fea0529c1 | ||
|
|
6a3ceaa377 | ||
|
|
3e45b83065 | ||
|
|
33ea606f45 | ||
|
|
5af2c51e78 | ||
|
|
d3bdb8ea6d | ||
|
|
1c51d3db0f | ||
|
|
475007d63a | ||
|
|
92f218207b | ||
|
|
ad09367a92 | ||
|
|
9921f8cc3a | ||
|
|
4e71a1702b | ||
|
|
b201cfaa0f | ||
|
|
ae3611730a | ||
|
|
934319fc28 | ||
|
|
44ad9628c9 | ||
|
|
1f4abb265a | ||
|
|
ae2cf1f598 | ||
|
|
b81f98b8a6 | ||
|
|
b72401b47b | ||
|
|
ce6dbe41a9 | ||
|
|
95c6ed0568 | ||
|
|
bc875a9df1 | ||
|
|
a97e4252e3 | ||
|
|
9a7488a5ce | ||
|
|
20ec1173f4 | ||
|
|
949729ff5c | ||
|
|
c5a7a85a4e | ||
|
|
3c6fa9126a | ||
|
|
d784401215 | ||
|
|
71a7c16ee0 | ||
|
|
d1f65d8dc1 | ||
|
|
8b3df18bcc | ||
|
|
6655f43282 | ||
|
|
28d6277396 | ||
|
|
db45970a66 | ||
|
|
4c572ffe95 | ||
|
|
001b147450 | ||
|
|
8441cff1d7 | ||
|
|
6258f72a00 | ||
|
|
14a611775c | ||
|
|
80b3fdf2f7 | ||
|
|
6632188606 | ||
|
|
6afb463e9b | ||
|
|
47c2ec2d0b | ||
|
|
342b671d05 | ||
|
|
983a213bdc | ||
|
|
22603d19e0 | ||
|
|
373ad49157 | ||
|
|
bc66b3fb8d | ||
|
|
3bae595182 | ||
|
|
8d07ba0d51 | ||
|
|
b61f50665e | ||
|
|
0ad76c3380 | ||
|
|
bd9e0f3934 | ||
|
|
359fb8fa3a | ||
|
|
4c8aad0d1b | ||
|
|
d765d77e9b | ||
|
|
af41cdfc8b | ||
|
|
226a7521ed | ||
|
|
5ffa924488 | ||
|
|
6b47aaab82 | ||
|
|
f39340ff6b | ||
|
|
ea09c0846f | ||
|
|
46b7181f13 | ||
|
|
f0ea77b230 | ||
|
|
562fdfc8f9 | ||
|
|
5ce74b5958 | ||
|
|
470b2822a3 | ||
|
|
8bcaca435a | ||
|
|
f72bb966f8 | ||
|
|
1671c2afb2 | ||
|
|
ce8b7a2a69 | ||
|
|
46e181aa8b | ||
|
|
0a44bfdca3 | ||
|
|
8121e04200 | ||
|
|
e31705b5ab | ||
|
|
199cc700a3 | ||
|
|
eab4b4ccd7 | ||
|
|
1111f18eb4 | ||
|
|
8181f9e362 | ||
|
|
f93d256190 | ||
|
|
80e133f16d | ||
|
|
1f11f80641 | ||
|
|
1d861dc37a | ||
|
|
c1807d8408 | ||
|
|
e09afb4b44 | ||
|
|
0d3a9d481f | ||
|
|
4379bd4cbb | ||
|
|
2649b638dd | ||
|
|
64b4165c8d | ||
|
|
9d658aaa5a | ||
|
|
a61b7f7e7c | ||
|
|
c4b502a470 | ||
|
|
ee57054d05 | ||
|
|
26ff18575c | ||
|
|
760632b292 | ||
|
|
8259f9b7fa | ||
|
|
0b3e0dd1d2 | ||
|
|
72f99ff953 | ||
|
|
cf5803e44c | ||
|
|
cce731c3c2 | ||
|
|
2da8c48be1 | ||
|
|
1837caa70d | ||
|
|
a3598193a0 | ||
|
|
ccb6238de1 | ||
|
|
d6fb25c439 | ||
|
|
416c8b1da3 | ||
|
|
100d6655df | ||
|
|
c09f8e4ddc | ||
|
|
3e16468423 | ||
|
|
642ae83d86 | ||
|
|
f6615cac41 | ||
|
|
44b48d9518 | ||
|
|
e455ba4ed5 | ||
|
|
8b7721ebbb | ||
|
|
f77f27163d | ||
|
|
14099f1b93 | ||
|
|
6df90ad9fd | ||
|
|
99a1e3f3a3 | ||
|
|
1366d070fc | ||
|
|
ad7f4c0317 | ||
|
|
b6927970f1 | ||
|
|
9a5c9df809 | ||
|
|
b705f260f4 | ||
|
|
5f4552391f | ||
|
|
e2742953a6 | ||
|
|
1daa7068b2 | ||
|
|
881dfe8179 | ||
|
|
f079cdf479 | ||
|
|
c6e5d90eff | ||
|
|
c49c6ac97a | ||
|
|
5292e855c0 | ||
|
|
179ddbe88b | ||
|
|
465a970724 | ||
|
|
6e974b5f04 | ||
|
|
f75f0dbad6 | ||
|
|
0a8d6bc402 | ||
|
|
58e95cd11e | ||
|
|
641303a361 | ||
|
|
aa3c7b3271 | ||
|
|
a669abf16b | ||
|
|
d481d887bc | ||
|
|
aec642febb | ||
|
|
1cb6498fdb | ||
|
|
a0281f5acb | ||
|
|
7047a2c1af | ||
|
|
56ad56c812 | ||
|
|
2ef5579eae | ||
|
|
f01dfe858d | ||
|
|
7652d2abb0 | ||
|
|
3223a97dc6 | ||
|
|
b3988621c5 | ||
|
|
ca88b25da6 | ||
|
|
5525602df0 | ||
|
|
d3cd21ccf8 | ||
|
|
3be9ba14f3 | ||
|
|
88ed8e1cd6 | ||
|
|
9c0cb90997 | ||
|
|
c7e2151a4b | ||
|
|
15b17f9334 | ||
|
|
9e57be4b5c | ||
|
|
09e246f306 | ||
|
|
5cdd9ab7e1 | ||
|
|
5cfa72a130 | ||
|
|
40b086d6e8 | ||
|
|
f0ea093de8 | ||
|
|
eff31a3361 | ||
|
|
95c9aa1ccb | ||
|
|
2ad29f410d | ||
|
|
a775aa6389 | ||
|
|
e6c4571191 | ||
|
|
e76e68b211 | ||
|
|
66113c2a62 | ||
|
|
b7fcb35a39 | ||
|
|
dcee8936c1 | ||
|
|
44abe925df | ||
|
|
f10be072ff | ||
|
|
f0730c6489 | ||
|
|
d8eed6018f | ||
|
|
c173bf1c62 | ||
|
|
52714cedd4 | ||
|
|
94cf391ef1 | ||
|
|
2b2176a3c1 | ||
|
|
b00c77dc62 | ||
|
|
fd866d1801 | ||
|
|
aa14e223ee | ||
|
|
11c26ebb55 | ||
|
|
2d5588c5f0 | ||
|
|
47e4ee4370 | ||
|
|
cf19a2a59f | ||
|
|
fff21a0b35 | ||
|
|
faa26650c9 | ||
|
|
c81fb88035 | ||
|
|
9c4b43b494 | ||
|
|
33929489b9 | ||
|
|
c111134a55 | ||
|
|
de4ef24f75 | ||
|
|
b1b7f3541c | ||
|
|
925dd3e59e | ||
|
|
9242998db1 | ||
|
|
de6e6c764e | ||
|
|
68f0d45485 | ||
|
|
0b542a9706 | ||
|
|
754b5133e9 | ||
|
|
5002f3ae35 | ||
|
|
7a75bb2121 | ||
|
|
753f4cfc26 | ||
|
|
5c87dbf5a8 | ||
|
|
d7f807b71f | ||
|
|
d4fd589638 | ||
|
|
d56313acba | ||
|
|
b950022894 | ||
|
|
87bba2e8d3 | ||
|
|
de6a401a22 | ||
|
|
69de33e024 | ||
|
|
e173e032bc | ||
|
|
c28cc0f1ac | ||
|
|
5e47c648ed | ||
|
|
5b2b436fab | ||
|
|
467ca6f025 | ||
|
|
9e649462ce | ||
|
|
1cb04f2b26 | ||
|
|
e57ebf3922 | ||
|
|
039f8f1abb | ||
|
|
44dc959584 | ||
|
|
5cd12102be | ||
|
|
6eacd88ae7 | ||
|
|
fcd88bccb3 | ||
|
|
10ba201d05 | ||
|
|
49ca02711e | ||
|
|
785502edb3 | ||
|
|
ef7d015be5 | ||
|
|
443ebe22f4 | ||
|
|
a395ff7c90 | ||
|
|
bf3f554357 | ||
|
|
0c3de0a0b3 | ||
|
|
224f73e978 | ||
|
|
6c25f860fd | ||
|
|
b0431c672b | ||
|
|
8c661baefb | ||
|
|
424a573266 | ||
|
|
f9f08c4b69 | ||
|
|
a6ef20d7fe | ||
|
|
9d1280d451 | ||
|
|
7388248b3e | ||
|
|
3bc0bf0079 | ||
|
|
27e63b977a | ||
|
|
2aa3754024 | ||
|
|
6c60251f52 | ||
|
|
9928fb2193 | ||
|
|
f07b9fde74 | ||
|
|
ddc2d4c21e | ||
|
|
02632d52b3 | ||
|
|
2ab0e1d526 | ||
|
|
080eb1b3fc | ||
|
|
ddd595fe81 | ||
|
|
729e935ea4 | ||
|
|
62d0a01a0f | ||
|
|
0ff59569dc | ||
|
|
56cb77a828 | ||
|
|
22d844dc07 | ||
|
|
616e9a93e0 | ||
|
|
a87a2524c7 | ||
|
|
2abf6b9f17 | ||
|
|
06e524416c | ||
|
|
e68dfa7062 | ||
|
|
e80585bab0 | ||
|
|
13c376345e | ||
|
|
bf5a3c6dec | ||
|
|
88a3a56c1a | ||
|
|
5feb60f426 | ||
|
|
c06973261a | ||
|
|
db6f7ed0ba | ||
|
|
e027a38f33 | ||
|
|
3df2d831f9 | ||
|
|
c8c2276ccb | ||
|
|
5525b704cc | ||
|
|
a9bb3147d7 | ||
|
|
8f8593aac5 | ||
|
|
c9f963e295 | ||
|
|
3002c1d508 | ||
|
|
7e8e21c914 | ||
|
|
c75c0775e1 | ||
|
|
55baa0d153 | ||
|
|
440b8761f4 | ||
|
|
a8ded21b69 | ||
|
|
c9e2a01875 | ||
|
|
e2d7677526 | ||
|
|
d5a0704544 | ||
|
|
c9a362e482 | ||
|
|
7642f2159c | ||
|
|
1ed4228822 | ||
|
|
e46202829f | ||
|
|
8c28ad6dac | ||
|
|
c06a47a691 | ||
|
|
dfbf45f028 | ||
|
|
b8d48939a2 | ||
|
|
9165267f8a | ||
|
|
ba023d53ca | ||
|
|
9e2227ba11 | ||
|
|
c998569c8f | ||
|
|
613bf9b514 | ||
|
|
41e2394c9c | ||
|
|
a4ac006658 | ||
|
|
8966f61ca5 | ||
|
|
e28bdf4453 | ||
|
|
0dc304ca80 | ||
|
|
8e41143bf5 | ||
|
|
df0c33a005 | ||
|
|
5c9205d5f4 | ||
|
|
1ff7c958b0 | ||
|
|
4c3ab55e94 | ||
|
|
ef8b5f64bc | ||
|
|
d6e0b9a43d | ||
|
|
b96ab4b763 | ||
|
|
0147f845f1 | ||
|
|
3e12f0957a | ||
|
|
c5ab9782c6 | ||
|
|
6a9cdc43f5 | ||
|
|
2d20a1196e | ||
|
|
a63ab7ded1 | ||
|
|
2f8eb95a91 | ||
|
|
e257380deb | ||
|
|
8dcad0f272 | ||
|
|
a47c62fcba | ||
|
|
720ac49f42 | ||
|
|
aa73a888fa | ||
|
|
0a591da6db | ||
|
|
d1b6839d97 | ||
|
|
49e4aaf673 | ||
|
|
08df80bed6 | ||
|
|
d5d4c0a172 | ||
|
|
bcffc704c1 | ||
|
|
4e56d3119c | ||
|
|
5372a06a8c | ||
|
|
e90654f39b | ||
|
|
6fbd5e837f | ||
|
|
432421ffa5 | ||
|
|
be405ac139 | ||
|
|
3af448d72e | ||
|
|
e28f4a5f39 | ||
|
|
75fe9d3555 | ||
|
|
e8d46bdd9b | ||
|
|
11341fcecb | ||
|
|
08876ad066 | ||
|
|
8fd4d5d117 | ||
|
|
5bc7082e82 | ||
|
|
bcce9a3a92 | ||
|
|
61f9c52fc7 | ||
|
|
6561efebb7 | ||
|
|
e78c9be312 | ||
|
|
d126276693 | ||
|
|
00c6ec8a2d | ||
|
|
206c87d525 | ||
|
|
255690d78e | ||
|
|
c3b6129beb | ||
|
|
f7e3d97b19 | ||
|
|
f47ec5b4b6 | ||
|
|
d403f659ea | ||
|
|
3ecd7c9641 | ||
|
|
f5a476fdd4 | ||
|
|
14bedf1cc5 | ||
|
|
7ce43372c3 | ||
|
|
bee136efa4 | ||
|
|
fc0a3c8500 | ||
|
|
a7af32c274 | ||
|
|
c4c7936caa | ||
|
|
c632f7fc4e | ||
|
|
2e43954bc3 | ||
|
|
bf0904b676 | ||
|
|
03ac39368f | ||
|
|
8bb32d77d0 | ||
|
|
a9dbe90447 | ||
|
|
a6f3ec94bc | ||
|
|
a128d95aeb | ||
|
|
3f0357f94a | ||
|
|
580861e7f2 | ||
|
|
21b9397342 | ||
|
|
7d15669b41 | ||
|
|
36c9fd1af7 | ||
|
|
1e467d9fc4 | ||
|
|
6060505a9d | ||
|
|
47657fe01a | ||
|
|
e363e709cb | ||
|
|
5111bec540 | ||
|
|
cb802edf75 | ||
|
|
49ce5ce1ca | ||
|
|
99cfe71cd0 | ||
|
|
09587a3201 | ||
|
|
70fd7cda14 | ||
|
|
8de81d34a1 | ||
|
|
dd95f0892d | ||
|
|
0551594722 | ||
|
|
97434a64c5 | ||
|
|
d3300bd799 | ||
|
|
c70ae562b4 | ||
|
|
435b70da47 | ||
|
|
3c490b5ba3 | ||
|
|
c2761aa8f4 | ||
|
|
8b42e8a510 | ||
|
|
cd3f9865f3 | ||
|
|
b6e3ac17c4 | ||
|
|
12b4ee1fc7 | ||
|
|
2b181e5a6c | ||
|
|
3b6206af49 | ||
|
|
372a5113ff | ||
|
|
66828ad231 | ||
|
|
6f47ab17a4 | ||
|
|
5d63fc65e1 | ||
|
|
a48810fb21 | ||
|
|
cdc20d1203 | ||
|
|
ed8207b2fb | ||
|
|
c48f1301ee | ||
|
|
57b2f3ffe6 | ||
|
|
d85b04be7f | ||
|
|
54f5523197 | ||
|
|
243886be93 | ||
|
|
f2f2aced6d | ||
|
|
fbfa49f2c1 | ||
|
|
ef49c659f6 | ||
|
|
5020094e3b | ||
|
|
f5e2f70115 | ||
|
|
87d8d221fb | ||
|
|
c09bb00959 | ||
|
|
44ae673388 | ||
|
|
b0c733e327 | ||
|
|
873b0c7eb6 | ||
|
|
9ba3a798c4 | ||
|
|
e781ff9256 | ||
|
|
279605b4d3 | ||
|
|
9aa9fe7021 | ||
|
|
2747ccbcf1 | ||
|
|
e2bc836571 | ||
|
|
3ce78ef6c4 | ||
|
|
928cdd57a4 | ||
|
|
1e322ffc1c | ||
|
|
86c1f090fd | ||
|
|
9ab7101182 | ||
|
|
daa3e6dedb | ||
|
|
6265cbfb11 | ||
|
|
485ecc3580 | ||
|
|
7d425cbf38 | ||
|
|
01531cb16d | ||
|
|
0c6ed657ef | ||
|
|
ed0d557ede | ||
|
|
36f9e9a0ba | ||
|
|
08ed927c32 | ||
|
|
d96f6a106b | ||
|
|
739c297c94 | ||
|
|
a4a9d1f403 | ||
|
|
72f18fd08b | ||
|
|
3a2855945b | ||
|
|
1e5d25b93c | ||
|
|
570d057db4 | ||
|
|
a5371a0fa2 | ||
|
|
5ad151ed44 | ||
|
|
cf4c1394a2 | ||
|
|
258c319855 | ||
|
|
e17d0319d5 | ||
|
|
25cd6e060a | ||
|
|
e942db3e78 | ||
|
|
7bcf238a1a | ||
|
|
f4d3cf2dfb | ||
|
|
59853fc876 | ||
|
|
1c0ec26e40 | ||
|
|
4ee47926ca | ||
|
|
bbf76dbb52 | ||
|
|
97e7dc1502 | ||
|
|
446b60d803 | ||
|
|
0f93de0a59 | ||
|
|
812e5f43f5 | ||
|
|
b21d7c138c | ||
|
|
0d51a1f12b | ||
|
|
99b2400048 | ||
|
|
f668251948 | ||
|
|
f46710d408 | ||
|
|
d969f43ed8 | ||
|
|
cd01de49cf | ||
|
|
146616aa5d | ||
|
|
f373883c1a | ||
|
|
b77e103ca6 | ||
|
|
3ce29cb4a6 | ||
|
|
545ae8b756 | ||
|
|
ae8d6d5a89 | ||
|
|
9ec60ad832 | ||
|
|
46b100ea63 | ||
|
|
f2a536b445 | ||
|
|
b2f920e891 | ||
|
|
9231143f91 | ||
|
|
6fbdb9ce51 | ||
|
|
04475bea7d | ||
|
|
1ad180f6de | ||
|
|
274dc4bc53 | ||
|
|
05e749d9fe | ||
|
|
80558b5b27 | ||
|
|
3637d6da6e | ||
|
|
65f85af242 | ||
|
|
f6c97e6af4 | ||
|
|
f0cfed636f | ||
|
|
6b8d144ccc | ||
|
|
d383c0cb43 | ||
|
|
28091c2101 | ||
|
|
5c8e12558d | ||
|
|
2b14036126 | ||
|
|
f2150285a4 | ||
|
|
e4ca511ec8 | ||
|
|
9fafe7b2b9 | ||
|
|
6335cb5b3a | ||
|
|
872605a5c5 | ||
|
|
ce15ffae6a | ||
|
|
ea83eed9ba | ||
|
|
2b4ba203f7 | ||
|
|
2ceb807da2 | ||
|
|
ae0c3382dd | ||
|
|
c485e7ab59 | ||
|
|
0d568daacb | ||
|
|
04f765b838 | ||
|
|
c73cec5ac1 | ||
|
|
f1401a6dff | ||
|
|
deffc65693 | ||
|
|
ba0057c077 | ||
|
|
02ebb15c4a | ||
|
|
782df1db10 | ||
|
|
b3ecce0545 | ||
|
|
b04d84f6b3 | ||
|
|
aa11f7c89b | ||
|
|
f4c8502e61 | ||
|
|
d84df25466 | ||
|
|
42df78d396 | ||
|
|
8b284f9ad0 | ||
|
|
35c9e6ab40 | ||
|
|
0870a45a69 | ||
|
|
8a338412fa | ||
|
|
f510940bde | ||
|
|
c8b0b6e6c1 | ||
|
|
1d1166ded6 | ||
|
|
637c61cffb | ||
|
|
65c95f9fb2 | ||
|
|
edcd171535 | ||
|
|
6f386628c2 | ||
|
|
a1001b29eb | ||
|
|
f70e18a5b3 | ||
|
|
0c646bb703 | ||
|
|
04b74d0446 | ||
|
|
075d9631f5 | ||
|
|
64940e9d0f | ||
|
|
747b5f87c2 | ||
|
|
6cd51ef3d0 | ||
|
|
43a7a89e93 | ||
|
|
9544b30821 | ||
|
|
423f497168 | ||
|
|
5ca13cc1f0 | ||
|
|
59204a5033 | ||
|
|
eeb7c96e0c | ||
|
|
f1fc4dfebc | ||
|
|
2324f19c85 | ||
|
|
76ed41f48a | ||
|
|
1017e5cee2 | ||
|
|
a30f42da4e | ||
|
|
c3044b1bf0 | ||
|
|
6567b73e1a | ||
|
|
bb6d97c18c | ||
|
|
19e28d8784 | ||
|
|
2a3c5f8353 | ||
|
|
a57259ec83 | ||
|
|
7dcc698ebf | ||
|
|
26534457f5 | ||
|
|
3095546851 | ||
|
|
b1e2e29222 | ||
|
|
84cfa76e00 | ||
|
|
d84bb02881 | ||
|
|
905a2114d7 | ||
|
|
8de1b4c4c2 | ||
|
|
878d0c8155 | ||
|
|
6032a051e9 | ||
|
|
fea639c1fc | ||
|
|
2f087d63af | ||
|
|
cc068f1b77 | ||
|
|
ac0a9d02bd | ||
|
|
d86ed15d88 | ||
|
|
624554a43a | ||
|
|
6d84541ff9 | ||
|
|
a9c2450330 | ||
|
|
d4cf1eb60a | ||
|
|
fba6921b50 | ||
|
|
bd277b5327 | ||
|
|
bf726f9d8a | ||
|
|
67db495fcf | ||
|
|
8af25867cb | ||
|
|
087a4bd2b8 | ||
|
|
b1446bea5f | ||
|
|
cdea47491d | ||
|
|
657f5f259f | ||
|
|
7f8727bbcd | ||
|
|
bbbca10704 | ||
|
|
6caba8e759 | ||
|
|
d18e788ee3 | ||
|
|
5f30cc8713 | ||
|
|
65c3b146c9 | ||
|
|
5a269d3175 | ||
|
|
c186f18aab | ||
|
|
349ba88aee | ||
|
|
1608f5dcae | ||
|
|
3b556eae44 | ||
|
|
9b830f437c | ||
|
|
374725a715 | ||
|
|
ea64b1716d | ||
|
|
525db1b6cb | ||
|
|
afa9d1292b | ||
|
|
7e967aa4d5 | ||
|
|
f3ec6d2449 | ||
|
|
f291fd7eed | ||
|
|
b67be55ab8 | ||
|
|
a5dd73c1a6 | ||
|
|
df3bc707fc | ||
|
|
f08a76250f | ||
|
|
aa38355999 | ||
|
|
1c68cbdb28 | ||
|
|
36ee60c96c | ||
|
|
e23391965b | ||
|
|
013208cce6 | ||
|
|
18f9d7b4f6 | ||
|
|
c26cf04110 | ||
|
|
71a337dac6 | ||
|
|
3bd5a99b83 | ||
|
|
8fcb56e74a | ||
|
|
ca08a34a98 | ||
|
|
3993166b5e | ||
|
|
2366e71bed | ||
|
|
48ea27ba60 | ||
|
|
483fe257d9 | ||
|
|
fc3c2c4406 | ||
|
|
2cecc572f9 | ||
|
|
6396a4ad8d | ||
|
|
109927cdb2 | ||
|
|
8bbdde8f9e | ||
|
|
188a7bd653 | ||
|
|
9acf80fd69 | ||
|
|
c5c33786a7 | ||
|
|
f04faf8496 | ||
|
|
cd3f8582cb | ||
|
|
c4cb55a0c5 | ||
|
|
f0a4bbb8e2 | ||
|
|
68a18cc621 | ||
|
|
c51dec5101 | ||
|
|
13269fb583 | ||
|
|
c582f2e9e3 | ||
|
|
ec21b7126c | ||
|
|
c5cc09d4e3 | ||
|
|
05170b6764 | ||
|
|
e7e29f9937 | ||
|
|
5db6b796cf | ||
|
|
ffc87233a1 | ||
|
|
81601d886c | ||
|
|
f7a828685d | ||
|
|
43a0cb4b92 | ||
|
|
c38cafd6c2 | ||
|
|
bc7e4d5cd4 | ||
|
|
a5a4999fb7 | ||
|
|
6bd367916c | ||
|
|
9b9b231e10 | ||
|
|
84ea17b786 | ||
|
|
7cce68a051 | ||
|
|
487d4aeebd | ||
|
|
900ad106d3 | ||
|
|
145ff23fb1 | ||
|
|
21335d43b2 | ||
|
|
039b672f46 | ||
|
|
22a1896c30 | ||
|
|
e28c6403aa | ||
|
|
647bbf61c1 | ||
|
|
921894960b | ||
|
|
d15f481352 | ||
|
|
9c89ff8bd9 | ||
|
|
2451310975 | ||
|
|
3e1cb31f63 | ||
|
|
484707ad29 | ||
|
|
52e4fba897 | ||
|
|
47a685adcf | ||
|
|
c4d3d74148 | ||
|
|
f7cb2af5f4 | ||
|
|
e87f81b3ec | ||
|
|
19912d755e | ||
|
|
e17858470c | ||
|
|
c896657d28 | ||
|
|
d7e17fc8fe | ||
|
|
b1d69d3e7a | ||
|
|
fbbdf161cd | ||
|
|
d3ec00b566 | ||
|
|
18ec22fe56 | ||
|
|
adcad98bee | ||
|
|
20aad0bed1 | ||
|
|
378f0889eb | ||
|
|
399065e858 | ||
|
|
bd7e0a534c | ||
|
|
c494ca3ad2 | ||
|
|
ce4fea983b | ||
|
|
0c0f14407c | ||
|
|
502ba6a0be | ||
|
|
0a7a2b99b5 | ||
|
|
57e028549a | ||
|
|
512c24fc9c | ||
|
|
b7ae9f715d | ||
|
|
fa4c35e9e5 | ||
|
|
be7a8e0824 | ||
|
|
b588446bf9 | ||
|
|
15b92d361d | ||
|
|
5998b53596 | ||
|
|
f37a932b24 | ||
|
|
22770f5202 | ||
|
|
64ba24292d | ||
|
|
f8d69e4e52 | ||
|
|
220a7076ac | ||
|
|
37ed6f2177 | ||
|
|
40f6e60e68 | ||
|
|
8cf2ff0be0 | ||
|
|
7a129ac043 | ||
|
|
4eefea0fe8 | ||
|
|
6ce34bb4fe | ||
|
|
160bfae93f | ||
|
|
c55ba43093 | ||
|
|
ee20b3e0d0 | ||
|
|
e510732ad2 | ||
|
|
ad4eae7ef0 | ||
|
|
a46f1d830e | ||
|
|
6c2b16e465 | ||
|
|
72c5c15f7f | ||
|
|
e3b7a20454 | ||
|
|
5042bd40d3 | ||
|
|
334c162f16 | ||
|
|
491c27f861 | ||
|
|
da7b51455c | ||
|
|
1bf1c37c0c | ||
|
|
32793f94fd | ||
|
|
1da3ee1386 | ||
|
|
4654c58f72 | ||
|
|
212aadd4af | ||
|
|
b807a114e4 | ||
|
|
03c05b15f6 | ||
|
|
1b5721c999 | ||
|
|
708787dddb | ||
|
|
c5a4b4fea1 | ||
|
|
2052e70664 | ||
|
|
8a54217e7b | ||
|
|
e6c8cce050 | ||
|
|
055f58960a | ||
|
|
0cf890eed4 | ||
|
|
3b609642ae | ||
|
|
6d6fd1b9e1 | ||
|
|
a35bbbfa9e | ||
|
|
52b5290810 | ||
|
|
5d02010763 | ||
|
|
8e10ac422e | ||
|
|
a3e3f26090 | ||
|
|
ab749fa1bb | ||
|
|
cf384dcb7f | ||
|
|
4a246e2fd6 | ||
|
|
83e871f1ff | ||
|
|
f5aa767ef1 | ||
|
|
fac4f36a87 | ||
|
|
440c98e24b | ||
|
|
615812581e | ||
|
|
3b7d27d39e | ||
|
|
36c59e0c25 | ||
|
|
539142f8d5 | ||
|
|
443a893ffd | ||
|
|
aa345a4bb7 | ||
|
|
568c4f0d81 | ||
|
|
860fa59cd3 | ||
|
|
ee670c448e | ||
|
|
c5451f4298 | ||
|
|
e1a4fc55e6 | ||
|
|
08478deec5 | ||
|
|
246710def9 | ||
|
|
7536912125 | ||
|
|
f174aa7712 | ||
|
|
d880775e5d | ||
|
|
85dae78548 | ||
|
|
64501329ab | ||
|
|
d6d697a41b | ||
|
|
603ea75bcd | ||
|
|
cfd34e268e | ||
|
|
4bc209c6f7 | ||
|
|
5fdaa95e06 | ||
|
|
f4829025fe | ||
|
|
47da5f0e58 | ||
|
|
49593a3e41 | ||
|
|
52d95ec47d | ||
|
|
628e93a9a0 | ||
|
|
af7906f100 | ||
|
|
4d53cefbe9 | ||
|
|
5680fb6894 | ||
|
|
9e36d7b82c | ||
|
|
d18b0caf0e | ||
|
|
b49ee372f1 | ||
|
|
cf71b5d396 | ||
|
|
64bbbf2cc2 | ||
|
|
2b4e9a3efa | ||
|
|
61da2bb742 | ||
|
|
a08e9a3109 | ||
|
|
dc2188b36d | ||
|
|
831ca61481 | ||
|
|
f338d6251c | ||
|
|
6b28cbe058 | ||
|
|
29f321046e | ||
|
|
0fc0aa62f2 | ||
|
|
bee59b4689 | ||
|
|
707741de58 | ||
|
|
7257f9e015 | ||
|
|
eda69b13f3 | ||
|
|
d3ce47414d | ||
|
|
c8b70e1c6a | ||
|
|
7084d69ea7 | ||
|
|
36a039d017 | ||
|
|
408a0183cd | ||
|
|
ba7a5ac9d7 | ||
|
|
e6c1c32aff | ||
|
|
a4d85f7fd5 | ||
|
|
696f840426 | ||
|
|
06f6c49e61 | ||
|
|
b89c258bc5 | ||
|
|
6b49be9951 | ||
|
|
980cc41709 | ||
|
|
344e3508b1 | ||
|
|
b765805964 | ||
|
|
7c2c73af5f | ||
|
|
a14d1c02f8 | ||
|
|
b2564a6391 | ||
|
|
53b14de636 | ||
|
|
2b9f1cea4e | ||
|
|
5d0674fb46 | ||
|
|
8c56e92566 | ||
|
|
239dc10852 | ||
|
|
416f3bdf11 | ||
|
|
26035dfa59 | ||
|
|
675d86aa11 | ||
|
|
d5086d4760 | ||
|
|
2cbd41145c | ||
|
|
3033c6b964 | ||
|
|
434d8c4c0e | ||
|
|
bdb5f2f9fb | ||
|
|
d06d47bc92 | ||
|
|
b64c86a25f | ||
|
|
82845e3821 | ||
|
|
77235bbe43 | ||
|
|
46c9636012 | ||
|
|
49122a96e7 | ||
|
|
f22b9d0e57 | ||
|
|
0cf934ce7d | ||
|
|
2c0023393b | ||
|
|
93d53e417a | ||
|
|
487a57ffe6 | ||
|
|
3d8243ec95 | ||
|
|
738ee56b86 | ||
|
|
20f530e9c5 | ||
|
|
73bc70b4fa | ||
|
|
b4de839ed8 | ||
|
|
651cb62556 | ||
|
|
199cb855ea | ||
|
|
e5ffbee5eb | ||
|
|
acfd11c8e4 | ||
|
|
b21fe0a18f | ||
|
|
77bb6c99f7 | ||
|
|
3a1bdce3f5 | ||
|
|
a6664be79c | ||
|
|
6200a2a00e | ||
|
|
a5ad1c270f | ||
|
|
61d40ba042 | ||
|
|
7e79f8c136 | ||
|
|
215dcc2d26 | ||
|
|
8191c6b81a | ||
|
|
88a8f59aa7 | ||
|
|
cc6fe18152 | ||
|
|
61e09229c8 | ||
|
|
05a8aa5447 | ||
|
|
d2f922f525 | ||
|
|
e933be9605 | ||
|
|
aa9d5707e0 | ||
|
|
1ecbeec24e | ||
|
|
2fd24d31a4 | ||
|
|
3bc703b0d6 | ||
|
|
1e91266a8a | ||
|
|
04e1d6c699 | ||
|
|
a71a2c0eb2 | ||
|
|
bf78200f55 | ||
|
|
87544d2378 | ||
|
|
bb6c459f7a | ||
|
|
36720cb57f | ||
|
|
d7942a9f19 | ||
|
|
46542dc774 | ||
|
|
3943759a90 | ||
|
|
5ef2d1e2a1 | ||
|
|
4aedbeaffb | ||
|
|
2dbb5261b5 | ||
|
|
0684aa081a | ||
|
|
0e797a3ff9 | ||
|
|
ae528fd06e | ||
|
|
7d3e6389f2 | ||
|
|
daee0b2b97 | ||
|
|
8f22949dc4 | ||
|
|
130e4b9fcb | ||
|
|
d54b977d4e | ||
|
|
b7dea80cba | ||
|
|
b7f2061736 | ||
|
|
34fb56b633 | ||
|
|
d2520a5f1e | ||
|
|
36c10f8a52 | ||
|
|
27cdf8d675 | ||
|
|
9a0356d276 | ||
|
|
a66cab8b71 | ||
|
|
96809b5794 | ||
|
|
8faef1a91a | ||
|
|
c03a65c6dc | ||
|
|
f19b3890c9 | ||
|
|
e55db5841a | ||
|
|
d6b2f2b9bd | ||
|
|
c757c3cde4 | ||
|
|
6adf2d1c39 | ||
|
|
9181cd9b22 | ||
|
|
68cd37175e | ||
|
|
6e48107734 | ||
|
|
4adfd790f0 | ||
|
|
a63bfb6c9f | ||
|
|
dbbc340f25 | ||
|
|
3e0c44bae8 | ||
|
|
7b1f0656b8 | ||
|
|
10e4b32ecb | ||
|
|
74342ab209 | ||
|
|
a78f55b851 | ||
|
|
26c8cd1ea2 | ||
|
|
5e66d05928 | ||
|
|
99b1983461 | ||
|
|
89c63cf8a6 | ||
|
|
0b542661b4 | ||
|
|
126d7f11dd | ||
|
|
599e17cea8 | ||
|
|
575b717d10 | ||
|
|
72b7d76d79 | ||
|
|
b7dc04c086 | ||
|
|
8a050ba4bf | ||
|
|
364257d967 | ||
|
|
f329196cf4 | ||
|
|
8e386613ac | ||
|
|
90ef705ced | ||
|
|
19116010ee | ||
|
|
d54c88aa21 | ||
|
|
9d23cfc7dd | ||
|
|
aad0a498ac | ||
|
|
1c1b77bbfe | ||
|
|
14e4d30659 | ||
|
|
fe68051d34 | ||
|
|
188e9b9beb | ||
|
|
55f6f80a59 | ||
|
|
7dae39b57d | ||
|
|
0257829776 | ||
|
|
064a1db2b2 | ||
|
|
894c272a56 | ||
|
|
1920536d99 | ||
|
|
93c0514105 | ||
|
|
2984ad3964 | ||
|
|
db968284f8 | ||
|
|
7a8c935b90 | ||
|
|
822cdb161b | ||
|
|
b140d366e3 | ||
|
|
ae7ed31386 | ||
|
|
b40f90ea04 | ||
|
|
c33883a40e | ||
|
|
5107fac656 | ||
|
|
eee2f23a79 | ||
|
|
db7106cb79 | ||
|
|
36138f28c8 | ||
|
|
bb619cd535 | ||
|
|
ba9cc230fa | ||
|
|
e25528c4f0 | ||
|
|
19febc77d6 | ||
|
|
dac32c59e5 | ||
|
|
79bb5c4f95 | ||
|
|
e3cf00b88b | ||
|
|
19c85aa990 | ||
|
|
3453b7457c | ||
|
|
5420a0e404 | ||
|
|
471ef84835 | ||
|
|
dcdcd3f636 | ||
|
|
afd3e70ae5 | ||
|
|
95d578d246 | ||
|
|
577ec92f16 | ||
|
|
98c70bc190 | ||
|
|
2356447323 | ||
|
|
f1d15b4a75 | ||
|
|
e54f1b69ca | ||
|
|
99c0382209 | ||
|
|
a9310a3e8b | ||
|
|
e12e00df12 | ||
|
|
8b9e02da9d | ||
|
|
4c02f4bc30 | ||
|
|
7302787a7b | ||
|
|
69698be3e6 | ||
|
|
32db2a2c2f | ||
|
|
1e655d5ffd | ||
|
|
88d3ce12b8 | ||
|
|
5ca7ce77cd | ||
|
|
2a0f65f7af | ||
|
|
aead062a70 | ||
|
|
51894ddd98 | ||
|
|
706ebd8f9c | ||
|
|
9a03f00e6c | ||
|
|
9d8ab28837 | ||
|
|
4ffc58e07b | ||
|
|
b9db20481f | ||
|
|
fea5619ce9 | ||
|
|
f7bf917baf | ||
|
|
b634489b2e | ||
|
|
274b25c010 | ||
|
|
baf350e32b | ||
|
|
36aa7f30e4 | ||
|
|
7c73e9df5d | ||
|
|
b3a5b51728 | ||
|
|
c4ae8c1d24 | ||
|
|
ad3973a3b8 | ||
|
|
cf2789d86d | ||
|
|
0aa828b1dc | ||
|
|
ec59e9d886 | ||
|
|
13a0ed064b | ||
|
|
392f1b3218 | ||
|
|
66bef1d7ed | ||
|
|
7ee87eb0c8 | ||
|
|
634358db5e | ||
|
|
30573b2e30 | ||
|
|
a508afa91c | ||
|
|
7e525a3b91 | ||
|
|
ccacf804a8 | ||
|
|
86189cdcf9 | ||
|
|
8fef69296d | ||
|
|
0a38bbc750 | ||
|
|
203c0eb2ae | ||
|
|
1a44b71ddf | ||
|
|
3c7204d604 | ||
|
|
1e9378d0a8 | ||
|
|
07d7096de6 | ||
|
|
5565f56273 | ||
|
|
9907cb0485 | ||
|
|
1cc7ea333c | ||
|
|
705596b46a | ||
|
|
8a98e5b50b | ||
|
|
dcb17503f2 | ||
|
|
74abeb8c53 | ||
|
|
0226b375d9 | ||
|
|
04c458a270 | ||
|
|
016738e676 | ||
|
|
8cfec2c5fe | ||
|
|
bf0887c486 | ||
|
|
ed2ef5cbe4 | ||
|
|
6be5d7c612 | ||
|
|
c26a259ba6 | ||
|
|
f3180f05f9 | ||
|
|
ecc1a0c051 | ||
|
|
70ffe470aa | ||
|
|
be4fb24b32 | ||
|
|
82d1d5f24e | ||
|
|
53dc157145 | ||
|
|
1609950597 | ||
|
|
7688bf9182 | ||
|
|
2db9b7a45d | ||
|
|
802363eb6a | ||
|
|
2a89dc8c1c | ||
|
|
a6f767ae7a | ||
|
|
4f231b46ee | ||
|
|
414dc803b6 | ||
|
|
61858c5a08 | ||
|
|
9a96691803 | ||
|
|
324e9c83d5 | ||
|
|
ed03e965de | ||
|
|
64596b23b9 | ||
|
|
1bb0706955 | ||
|
|
b2bc5ef56a | ||
|
|
abfca72c0b | ||
|
|
f0be3b0689 | ||
|
|
e081c62aac | ||
|
|
a094b7f807 | ||
|
|
1c7fb31bba | ||
|
|
0e763677e4 | ||
|
|
e49f1e628c | ||
|
|
425c437cd3 | ||
|
|
a2d729e537 | ||
|
|
7adbc4fbb4 | ||
|
|
1bea9ea4be | ||
|
|
819d72614a | ||
|
|
fa0c9390c2 | ||
|
|
59d054308c | ||
|
|
789cc314c5 | ||
|
|
b92a89e29f | ||
|
|
94a92abf24 | ||
|
|
b5bbe601fb | ||
|
|
b38a6ea7df | ||
|
|
dd59193757 | ||
|
|
933dfac583 | ||
|
|
507cee5ee5 | ||
|
|
744c25cd0a | ||
|
|
0ab364404e | ||
|
|
4bdcedab54 | ||
|
|
c1521ddbdb | ||
|
|
0806951c07 | ||
|
|
446c3d586c | ||
|
|
8073bc849f | ||
|
|
1e60e6e15b | ||
|
|
f435f2267c | ||
|
|
186ca9d3e4 | ||
|
|
3623bdb31b | ||
|
|
709f26b69e | ||
|
|
d42deff402 | ||
|
|
263ce40844 | ||
|
|
66786b0f0f | ||
|
|
948b14b52a | ||
|
|
955bd2e1db | ||
|
|
1271c00ff0 | ||
|
|
e0a13e9355 | ||
|
|
bb5118f4c9 | ||
|
|
d3f779d61d | ||
|
|
4364d3316e | ||
|
|
023de9a70b | ||
|
|
1c979e320d | ||
|
|
9d20fd5135 | ||
|
|
28bef6f87d | ||
|
|
ad3c5dd186 | ||
|
|
b286d0e63f | ||
|
|
90d5328eda | ||
|
|
bd9f095ed2 | ||
|
|
e23a596a18 | ||
|
|
8d3b059332 | ||
|
|
1931d4495e | ||
|
|
e63f9a846b | ||
|
|
b82cbd1be0 | ||
|
|
50c511d75f | ||
|
|
61f7bd7a3a | ||
|
|
10ff1fda8e | ||
|
|
c51753250d | ||
|
|
e56673c7f9 | ||
|
|
7c1dd3057f | ||
|
|
412397ad55 | ||
|
|
7aba18ea77 | ||
|
|
e57f0e38c1 | ||
|
|
63175eb696 | ||
|
|
54b1645d13 | ||
|
|
aaac7071a3 | ||
|
|
5c0c5fafb2 | ||
|
|
d2f8ddab10 | ||
|
|
9a49f5763d | ||
|
|
166624d005 | ||
|
|
9aed565f13 | ||
|
|
0f5d3b3390 | ||
|
|
5376799a23 | ||
|
|
6f39e88a2c | ||
|
|
6e4e7d2637 | ||
|
|
5e57496225 | ||
|
|
b9e5b27a99 | ||
|
|
79a44c8225 | ||
|
|
2f49c96532 | ||
|
|
40469eef7f | ||
|
|
125afb51d7 | ||
|
|
7bf5b0ccd3 | ||
|
|
7a4e1b72a8 | ||
|
|
f5afb60116 | ||
|
|
f7f118e021 | ||
|
|
544cc7f395 | ||
|
|
cd9336469e | ||
|
|
d8967e28d0 | ||
|
|
b4d6a425a2 | ||
|
|
fc1d48814c | ||
|
|
9b78bb7393 | ||
|
|
a32c85951e | ||
|
|
95e780d6f9 | ||
|
|
247a88f2f9 | ||
|
|
6dc86ad48f | ||
|
|
c9f93f5f74 | ||
|
|
8cded3fdad | ||
|
|
dca21078ad | ||
|
|
6dbd29e440 | ||
|
|
481de8df7f | ||
|
|
a31c9511e8 | ||
|
|
ec489599fd | ||
|
|
3d0449bb45 | ||
|
|
632c65d64b | ||
|
|
15cdfa9e7f | ||
|
|
704b0feb38 | ||
|
|
aecd1c8ee3 | ||
|
|
58a93f88da | ||
|
|
aa439ac2ff | ||
|
|
e131156805 | ||
|
|
0316900d2f | ||
|
|
5c64b86ba3 | ||
|
|
c2f21a519f | ||
|
|
629fda3957 | ||
|
|
f8e4048cd8 | ||
|
|
bd780a8223 | ||
|
|
7149d33c71 | ||
|
|
f240651bd8 | ||
|
|
13d1df2140 | ||
|
|
5b34931948 | ||
|
|
f0926bad9f | ||
|
|
b4914888a7 | ||
|
|
2ffb90b161 | ||
|
|
ad87584c35 | ||
|
|
fd69cc7e42 | ||
|
|
b6a101d121 | ||
|
|
6f47133d8a | ||
|
|
1dfb6a2a44 | ||
|
|
270384fb44 | ||
|
|
c913acdb4c | ||
|
|
1e19e004af | ||
|
|
60c837c58a | ||
|
|
3acf423de0 | ||
|
|
26314d7004 | ||
|
|
a9e637b8f5 | ||
|
|
1140bd79a0 | ||
|
|
007babb363 | ||
|
|
c9ae0c5808 | ||
|
|
3d871853df | ||
|
|
00bc8df640 | ||
|
|
a63cfad558 | ||
|
|
f0d4f36219 | ||
|
|
b410dc76aa | ||
|
|
4d730a9bbc | ||
|
|
af7f20fa42 | ||
|
|
659c67e896 | ||
|
|
e519a81a05 | ||
|
|
b026a62bc4 | ||
|
|
d6d6f322a9 | ||
|
|
41832042cc | ||
|
|
2b975de94d | ||
|
|
1f88b11c99 | ||
|
|
f5da9a5161 | ||
|
|
8a4709582f | ||
|
|
de7afc52a9 | ||
|
|
c7b083ab56 | ||
|
|
dc3ac8082b | ||
|
|
0a9f04bad9 | ||
|
|
d17dea30ce | ||
|
|
e90d007db3 | ||
|
|
585f60a5aa | ||
|
|
90973c10b1 | ||
|
|
fe1eb8ca5f | ||
|
|
10dab053b4 | ||
|
|
c969a779c9 | ||
|
|
7ed8d00bba | ||
|
|
9cceb4a02a | ||
|
|
c841b2cc51 | ||
|
|
28cedab1a4 | ||
|
|
cb5c5d1a4d | ||
|
|
fd0d631f39 | ||
|
|
3fb4997ad8 | ||
|
|
cc50a4579e | ||
|
|
00c39ea409 | ||
|
|
870cd33701 | ||
|
|
393cd3c796 | ||
|
|
347ea24524 | ||
|
|
6c13003dd3 | ||
|
|
b21c485ad5 | ||
|
|
d85f57ef9c | ||
|
|
595ebe1796 | ||
|
|
3b75b004fc | ||
|
|
3a2782053b | ||
|
|
e4cfaa5680 | ||
|
|
00d3ec5ed8 | ||
|
|
fe572a5a0d | ||
|
|
94b2f536f3 | ||
|
|
715bd06f04 | ||
|
|
337d1e78ff | ||
|
|
b4b7e8a54d | ||
|
|
8f608f4e75 | ||
|
|
134fc87e48 | ||
|
|
035aed8dc9 | ||
|
|
9a5268dc5f | ||
|
|
acfda4d1d8 | ||
|
|
a9dddd8a32 | ||
|
|
579ad85785 | ||
|
|
609b14a570 | ||
|
|
1ddd6dbf0b | ||
|
|
2d0ff1a06d | ||
|
|
09f9464254 | ||
|
|
582950291c | ||
|
|
5a0844bae1 | ||
|
|
e49284acde | ||
|
|
67dde7d893 | ||
|
|
90e388b9f8 | ||
|
|
64f44c6483 | ||
|
|
4b59bb55c7 | ||
|
|
7a8f1d2854 | ||
|
|
632c2b49da | ||
|
|
e57b045402 | ||
|
|
0ce4767076 | ||
|
|
6c66f51fb8 | ||
|
|
2eeaccf01c | ||
|
|
e6a9ee64b3 | ||
|
|
4e9ee566ef | ||
|
|
fc009f61c8 | ||
|
|
3dfe1cf60e | ||
|
|
a4a1ee6b5d | ||
|
|
2d3918c152 | ||
|
|
1c03205cc2 | ||
|
|
feec4c61f4 | ||
|
|
097684e5f2 | ||
|
|
fd1fcb5a7d | ||
|
|
3207a74829 | ||
|
|
597378d1f6 | ||
|
|
64b9843b5b | ||
|
|
5d86a6acf1 | ||
|
|
35a3218e84 | ||
|
|
65c0c73597 | ||
|
|
33a001933a | ||
|
|
fe804d2a01 | ||
|
|
68f039704c | ||
|
|
bcfd071784 | ||
|
|
7d90691adb | ||
|
|
f83c36d8fd | ||
|
|
6be67279fb | ||
|
|
3dc49a04a3 | ||
|
|
5c907d9998 | ||
|
|
1b7cfd7222 | ||
|
|
7859245fc5 | ||
|
|
529a1f39b9 | ||
|
|
f5a4bf0ce4 | ||
|
|
a0453ebcf5 | ||
|
|
ffb7de34ca | ||
|
|
09085c32e3 | ||
|
|
8b91a21e37 | ||
|
|
55b52bad21 | ||
|
|
b35260ed47 | ||
|
|
7bea3b302c | ||
|
|
b5449a866d | ||
|
|
8441cbfc03 | ||
|
|
4ab66c4f52 | ||
|
|
27f80784d0 | ||
|
|
031e32f331 | ||
|
|
ccee1aedd2 | ||
|
|
e2c26909f2 | ||
|
|
3e879b47c1 | ||
|
|
859502b16c | ||
|
|
c33e055f17 | ||
|
|
a5bf8c9b9d | ||
|
|
0874872dee | ||
|
|
ef25904ecb | ||
|
|
9d6f649ba5 | ||
|
|
c58932e8fd | ||
|
|
6e85cbcce3 | ||
|
|
b25dbcb5b3 | ||
|
|
a554e94a1a | ||
|
|
5f34dffedc | ||
|
|
aff33d52c5 | ||
|
|
f16c1fb6df | ||
|
|
a9e1043673 | ||
|
|
f281033362 | ||
|
|
410bf37fb8 | ||
|
|
eff5eed719 | ||
|
|
d0a56f47ee | ||
|
|
9e74df2404 | ||
|
|
0bee219cb3 | ||
|
|
923a7dde5a | ||
|
|
4cd5cf2e95 | ||
|
|
33ebb05251 | ||
|
|
e0331b55bb | ||
|
|
d5825bd3e8 | ||
|
|
e8d9cbca3f | ||
|
|
b5020c7d9c | ||
|
|
5bea731fb4 | ||
|
|
0e3b0c827e | ||
|
|
365669a7fd | ||
|
|
b7f392fdd6 | ||
|
|
4be2f9d75a | ||
|
|
f74a1bebf5 | ||
|
|
76ecca4d53 | ||
|
|
b7ebb8fe30 | ||
|
|
41c8a42e22 | ||
|
|
1cc9e90041 | ||
|
|
30e3b31b04 | ||
|
|
a0cd6672aa | ||
|
|
8b5a43d720 | ||
|
|
725b668aef | ||
|
|
024efb09f8 | ||
|
|
953e58d004 | ||
|
|
f257b08406 | ||
|
|
5e91928607 | ||
|
|
880a6a3db5 | ||
|
|
71e8eaff2b | ||
|
|
6598beacdb | ||
|
|
e4f15e4eac | ||
|
|
e50c1ea7fb | ||
|
|
62e08f80de | ||
|
|
c50fafb35d | ||
|
|
3d3e523520 | ||
|
|
c1a9d83b34 | ||
|
|
42d725223e | ||
|
|
0bbcc7815b | ||
|
|
b26fa1935d | ||
|
|
bc2ed93b77 | ||
|
|
c71f2a7b26 | ||
|
|
51681f653f | ||
|
|
705431aecc | ||
|
|
b83e826510 | ||
|
|
e7d6de6b1c | ||
|
|
6e0d3880df | ||
|
|
6ec5780547 | ||
|
|
47d37db2d2 | ||
|
|
4f364db9a9 | ||
|
|
030ce9f506 | ||
|
|
8990122d5d | ||
|
|
52d6bf04d0 | ||
|
|
910da8518f | ||
|
|
2f27ef92fe | ||
|
|
75149d6d38 | ||
|
|
fab7994b74 | ||
|
|
eb80d6e0e4 | ||
|
|
b5667bed9e | ||
|
|
b3be83c750 | ||
|
|
50626a10ee | ||
|
|
6e1b5b8f7e | ||
|
|
eec9b1b306 | ||
|
|
ea142f6a32 | ||
|
|
12f868b292 | ||
|
|
31f9ecfc19 | ||
|
|
273e9bf296 | ||
|
|
f155d9d3ec | ||
|
|
d3d4503ce2 | ||
|
|
1f93c5cf69 | ||
|
|
15b5a08f4b | ||
|
|
ff4a25b841 | ||
|
|
2212520a6c | ||
|
|
d08f940336 | ||
|
|
2280a2cb2f | ||
|
|
ce5d97bcb3 | ||
|
|
8fa1764c60 | ||
|
|
f299bd1416 | ||
|
|
064be93edf | ||
|
|
86822d1cc2 | ||
|
|
a581bce379 | ||
|
|
2ffc643086 | ||
|
|
2136dc94bb | ||
|
|
a92344f476 | ||
|
|
b706966ebc | ||
|
|
1c22657256 | ||
|
|
6f02286805 | ||
|
|
3674074eb0 | ||
|
|
a7e09d46c5 | ||
|
|
fa2e546b76 | ||
|
|
c592b12043 | ||
|
|
9555bbd5bb | ||
|
|
0ca1641b14 | ||
|
|
d5b4393bb2 | ||
|
|
7b6ff7fe00 | ||
|
|
76c7b1f677 | ||
|
|
5aa8ece211 | ||
|
|
f6d24d5740 | ||
|
|
b1c4480d7c | ||
|
|
b6ba989f2f | ||
|
|
04acda55ec | ||
|
|
8e5c4ac867 | ||
|
|
df8702fead | ||
|
|
d5d50c39e6 | ||
|
|
1f18698b2a | ||
|
|
ef4945af6b | ||
|
|
7de2ada3ea | ||
|
|
262d4cb9a8 | ||
|
|
951c158106 | ||
|
|
85e4dd7fc3 | ||
|
|
b1b4a4065a | ||
|
|
08f23c95d9 | ||
|
|
3cf493b089 | ||
|
|
e635c86145 | ||
|
|
779790167e | ||
|
|
3161ced4bc | ||
|
|
3d6fcb85dc | ||
|
|
3701b2901e | ||
|
|
280cb4160d | ||
|
|
80d8db5f60 | ||
|
|
1a8790d808 | ||
|
|
34840f3aee | ||
|
|
8685d53adc | ||
|
|
2f6833d433 | ||
|
|
dd90fd02d5 | ||
|
|
07766a69f3 | ||
|
|
aa854988bf | ||
|
|
96ebe98dc2 | ||
|
|
45f05fc939 | ||
|
|
cf9c3f54f7 | ||
|
|
fbc0c85b90 | ||
|
|
276940fd9b | ||
|
|
cdff6c8181 | ||
|
|
cd45adbea2 | ||
|
|
aff44d0a98 | ||
|
|
8a95fdaee1 | ||
|
|
5d8dc83ede | ||
|
|
b157e0c1c3 | ||
|
|
40e9488055 | ||
|
|
55efbb8a7e | ||
|
|
d6bbf395af | ||
|
|
606605925d | ||
|
|
f93c011456 | ||
|
|
3c24684522 | ||
|
|
b84d190fd0 | ||
|
|
aad4bff098 | ||
|
|
3ea6d9c4d2 | ||
|
|
ced412e1c1 | ||
|
|
1279c8de39 | ||
|
|
c7779c800a | ||
|
|
6f4f771897 | ||
|
|
4a327dd1d6 | ||
|
|
d4edd3c312 | ||
|
|
e72074f78a | ||
|
|
0b29e68c17 | ||
|
|
4d7fdb8957 | ||
|
|
656efe6ef3 | ||
|
|
362586fe8b | ||
|
|
63aa28e2a6 | ||
|
|
c3dfbdf0da | ||
|
|
a2280f321f | ||
|
|
4e13cef05a | ||
|
|
e5c1659864 | ||
|
|
2d098e8869 | ||
|
|
8965a2f0af | ||
|
|
e222ea4ee8 | ||
|
|
e326939759 | ||
|
|
7cf46b3fee | ||
|
|
84cd825a0e | ||
|
|
0a1b1806e9 | ||
|
|
9ee2713272 | ||
|
|
b3234bf3b0 | ||
|
|
562d9891ea | ||
|
|
56aff797c0 | ||
|
|
d53ff270e0 | ||
|
|
df6c33d4b3 | ||
|
|
039d05c808 | ||
|
|
aed9f9febe | ||
|
|
72b461e257 | ||
|
|
cb646082ba | ||
|
|
bd4a2a670b | ||
|
|
6e98ab01e1 | ||
|
|
c0ad5d13b8 | ||
|
|
acd86d33bc | ||
|
|
9707eda83c | ||
|
|
7e550df6d4 | ||
|
|
c9b5a30b37 | ||
|
|
cb04ba0136 | ||
|
|
5903a93f3d | ||
|
|
15de3e8137 | ||
|
|
f95d551f7a | ||
|
|
c6bfa00178 | ||
|
|
01a57198b8 | ||
|
|
8dba30f31e | ||
|
|
9f78717b3c | ||
|
|
90846dcc28 | ||
|
|
6ed16e13b1 | ||
|
|
c1dc784a3d | ||
|
|
5b0e747f9a | ||
|
|
624c72c266 | ||
|
|
a950287206 | ||
|
|
30383abb12 | ||
|
|
cdb97f3dfb | ||
|
|
b44c8bd969 | ||
|
|
c9189d354a | ||
|
|
622578a022 | ||
|
|
7018806a92 | ||
|
|
bd335ffd64 | ||
|
|
a094c49153 | ||
|
|
99fe023496 | ||
|
|
3ee32a01ea | ||
|
|
c844d1fd46 | ||
|
|
9405af6919 | ||
|
|
357d808484 | ||
|
|
cc423f40f1 | ||
|
|
b053f831cd | ||
|
|
523ad8d2e2 | ||
|
|
31303d0b11 | ||
|
|
494c9d341a | ||
|
|
519f0187b6 | ||
|
|
64c6435545 | ||
|
|
7eba828e1b | ||
|
|
2a7215bc3b | ||
|
|
784d24a1d5 | ||
|
|
aba58e9e2e | ||
|
|
c4a557bdd4 | ||
|
|
97e3666e0d | ||
|
|
7ade419a0e | ||
|
|
a4a2d79087 | ||
|
|
8f21605d71 | ||
|
|
064741db58 | ||
|
|
e3354404ad | ||
|
|
3610ef2830 | ||
|
|
27104d4921 | ||
|
|
4f41e20f09 | ||
|
|
d0062c7a9a | ||
|
|
8e6f599822 | ||
|
|
f276bfad8e | ||
|
|
7bec461782 | ||
|
|
df6865cd52 | ||
|
|
312c319d8b | ||
|
|
0e21463f07 | ||
|
|
dec3750875 | ||
|
|
763f879536 | ||
|
|
56b850648f | ||
|
|
63a5614d23 | ||
|
|
a1b9dfc099 | ||
|
|
68ce68f290 | ||
|
|
b8a7828d1f | ||
|
|
6a4ee07e4f | ||
|
|
23231d65a9 | ||
|
|
3d54b05863 | ||
|
|
bca0935d90 | ||
|
|
882f7964fb | ||
|
|
443992c4d5 | ||
|
|
a83a371069 | ||
|
|
499e76b199 | ||
|
|
8947797250 | ||
|
|
1989e7d4c2 | ||
|
|
dda5259f68 | ||
|
|
f032609f8d | ||
|
|
9ac442624c | ||
|
|
34abcd31b9 | ||
|
|
fe30be6fba | ||
|
|
cfed0497ac | ||
|
|
59157b6891 | ||
|
|
e178008b75 | ||
|
|
1cd8996074 | ||
|
|
cfae03042d | ||
|
|
4b5e850361 | ||
|
|
4d4b43cf5a | ||
|
|
c01f9100e4 | ||
|
|
edb3915ee7 | ||
|
|
fe7dbecfe6 | ||
|
|
02ec72df87 | ||
|
|
92ab27e4b8 | ||
|
|
82baecc892 | ||
|
|
35f1e8f569 | ||
|
|
6c629b54e6 | ||
|
|
3574418a40 | ||
|
|
5bf8772f26 | ||
|
|
924bba5ce9 | ||
|
|
786852e9e6 | ||
|
|
72ef69d1ba | ||
|
|
1aa41b5741 | ||
|
|
c14cff60d0 | ||
|
|
f61858163d | ||
|
|
0824d65a5c | ||
|
|
a0bf856c70 | ||
|
|
166cda2cc6 | ||
|
|
aaad6cc954 | ||
|
|
3989c793fd | ||
|
|
42b892c21b | ||
|
|
81abcae91a | ||
|
|
648b3b3909 | ||
|
|
fd9975dad7 | ||
|
|
d29f74114e | ||
|
|
ce441edd9c | ||
|
|
6f30d68581 | ||
|
|
002da6edc0 | ||
|
|
0963096491 | ||
|
|
c5dd491a21 | ||
|
|
2f15c11b87 | ||
|
|
96db6ed073 | ||
|
|
7e8f832cd6 | ||
|
|
a8e88e1874 | ||
|
|
42167a1e24 | ||
|
|
bb53d9722d | ||
|
|
8a0751dadd | ||
|
|
4b5d427421 | ||
|
|
9becdeaadf | ||
|
|
5457d48416 | ||
|
|
9381005098 | ||
|
|
10e73a3723 | ||
|
|
5bc6dc076e | ||
|
|
6d37d089e9 | ||
|
|
8e3cd3e0dd | ||
|
|
b7765a95a0 | ||
|
|
d480330fae | ||
|
|
6085fe18d4 | ||
|
|
8a35811556 | ||
|
|
71709ad5d5 | ||
|
|
53c67e04d4 | ||
|
|
c6ab1bb3cb | ||
|
|
334b553260 | ||
|
|
ac1320aae8 | ||
|
|
4e28982d2b | ||
|
|
cc7d2e5621 | ||
|
|
424e71705d | ||
|
|
4e43b0efe9 | ||
|
|
3d5f56a8a1 | ||
|
|
047231840d | ||
|
|
5bdb8dd6fe | ||
|
|
d90a287d8f | ||
|
|
b7708bbec6 | ||
|
|
fb83cd4ff4 | ||
|
|
44c8d8a9ac | ||
|
|
af94f1dd97 | ||
|
|
0c84ce1082 | ||
|
|
0b6a650cb4 | ||
|
|
d2ef5d6167 | ||
|
|
23243ae69c | ||
|
|
13ba0177d0 | ||
|
|
0118706fd6 | ||
|
|
c5015d77e2 | ||
|
|
159c560c95 | ||
|
|
926c121b98 | ||
|
|
91446a5e9b | ||
|
|
a5a14405ad | ||
|
|
5a954efdd7 | ||
|
|
4766b20223 | ||
|
|
9962bda70b | ||
|
|
4f3fbd7267 | ||
|
|
28781a6213 | ||
|
|
37dd34bea5 | ||
|
|
e8f224fd3a | ||
|
|
afe884fb96 | ||
|
|
ed37fbaeff | ||
|
|
955c89fccb | ||
|
|
65cc81c479 | ||
|
|
05a05bcb04 | ||
|
|
9d6d8f85da | ||
|
|
af8f5c1a49 | ||
|
|
a83ba44efa | ||
|
|
7b5e160d28 | ||
|
|
45b5640fe5 | ||
|
|
85c1449a96 | ||
|
|
9111f4ca8a | ||
|
|
fb3c73d194 | ||
|
|
3f29742adc | ||
|
|
483821ea3b | ||
|
|
ee3590cb61 | ||
|
|
8c5fbab72d | ||
|
|
d5f3dfa1e1 | ||
|
|
47c3221fda | ||
|
|
511d41114f | ||
|
|
c39ef70aa4 | ||
|
|
1ed708391e | ||
|
|
2bee8d4941 | ||
|
|
b956070f08 | ||
|
|
383c67c1b2 | ||
|
|
3f50feb280 | ||
|
|
6fafcd0a70 | ||
|
|
ab1a3cccac | ||
|
|
6322b6f657 | ||
|
|
3462130e2d | ||
|
|
5d11e5da40 | ||
|
|
7745505482 | ||
|
|
badeeb37b0 | ||
|
|
971458c5de | ||
|
|
5e10e19bfe | ||
|
|
c60954d0f8 | ||
|
|
a1c296bc3c | ||
|
|
c96ac3e591 | ||
|
|
19c2797bed | ||
|
|
3ecdea8be4 | ||
|
|
e08961ab25 | ||
|
|
f0a258555b | ||
|
|
05ad399abe | ||
|
|
98186ef180 | ||
|
|
e46cd3b7db | ||
|
|
52753066ef | ||
|
|
d8ed286200 | ||
|
|
34cba2da32 | ||
|
|
05df480376 | ||
|
|
3ea1e5af1e | ||
|
|
bac676c8e7 | ||
|
|
d8ac274fc2 | ||
|
|
caa8e4742e | ||
|
|
f05f025e41 | ||
|
|
c67c5383fd | ||
|
|
88bebb4caa | ||
|
|
ec727bf166 | ||
|
|
8c45f06d58 | ||
|
|
f30dcc6359 | ||
|
|
d43d430d86 | ||
|
|
012a6dfb16 | ||
|
|
6a31a59400 | ||
|
|
20889205e8 | ||
|
|
fc2502cd81 | ||
|
|
0f0e69adce | ||
|
|
7fb33fca47 | ||
|
|
0c553d2064 | ||
|
|
78abd277ff | ||
|
|
05d8969c79 | ||
|
|
03e5794978 | ||
|
|
6d44a2285c | ||
|
|
0998577dfe | ||
|
|
bbb06ca4cf | ||
|
|
0b6aa6a024 | ||
|
|
10e7297306 | ||
|
|
e51fad1488 | ||
|
|
b7747017d7 | ||
|
|
2e96704d59 | ||
|
|
e9799d6821 | ||
|
|
c2d1d903fa | ||
|
|
055a53c27f | ||
|
|
231da14771 | ||
|
|
6ab432d62e | ||
|
|
07a407d89a | ||
|
|
c64f98e2bb | ||
|
|
5469d898a9 | ||
|
|
3d639d1539 | ||
|
|
91c6cea227 | ||
|
|
ba54d36787 | ||
|
|
5f8082bdd7 | ||
|
|
512c523368 | ||
|
|
e323d0cfb1 | ||
|
|
01fa2d8117 | ||
|
|
8e126bc9bd | ||
|
|
c71027e725 | ||
|
|
e85c53ce68 | ||
|
|
3e1901e1aa | ||
|
|
6a4f602156 | ||
|
|
6023d5be09 | ||
|
|
a306baacd1 | ||
|
|
44ecec3896 | ||
|
|
bc7e56e8df | ||
|
|
afc7f1b892 | ||
|
|
d43250bfa5 | ||
|
|
bc53c928fc | ||
|
|
637c0d6508 | ||
|
|
1e56879d38 | ||
|
|
6bd1529cb7 | ||
|
|
2584663e44 | ||
|
|
cc20b9425e | ||
|
|
cea380174f | ||
|
|
87fad8fc00 | ||
|
|
e2b834e427 | ||
|
|
f95cedc443 | ||
|
|
ba5a2f06b9 | ||
|
|
2ec25ddd4c | ||
|
|
31b054f69d | ||
|
|
93a091cfb8 | ||
|
|
3aa53b44dd | ||
|
|
82c080c6e6 | ||
|
|
71e662e88d | ||
|
|
53d56d7650 | ||
|
|
2a68be3e8d | ||
|
|
8217a2f26c | ||
|
|
7658263bfb | ||
|
|
32b11101d3 | ||
|
|
1614c5f5fd | ||
|
|
a2b699dcd2 | ||
|
|
7cc44b3bdb | ||
|
|
0b9f086d36 | ||
|
|
bcfbc7a818 | ||
|
|
1dd0733515 | ||
|
|
4c79100b15 | ||
|
|
777aaff841 | ||
|
|
e9ef08862d | ||
|
|
364b771743 | ||
|
|
483441d305 | ||
|
|
8df6b68093 | ||
|
|
3f48eed5bd | ||
|
|
933441cc52 | ||
|
|
4a8f5cdf4b | ||
|
|
523ad2e6bd | ||
|
|
fc0cfd7d1f | ||
|
|
4d32441b86 | ||
|
|
23d5f64bda | ||
|
|
0de55048b7 | ||
|
|
d564308e0f | ||
|
|
576609e665 | ||
|
|
3f952eb597 | ||
|
|
ba26a879e0 | ||
|
|
bfabd1d5c0 | ||
|
|
f3508228df | ||
|
|
b4eb043b81 | ||
|
|
06438794e1 | ||
|
|
9f8e05ffd4 | ||
|
|
b0d560be56 | ||
|
|
ebea40ce86 | ||
|
|
b9045f7e0d | ||
|
|
7b4882a2f4 | ||
|
|
5d4b6e4d4e | ||
|
|
94ae126747 | ||
|
|
ae5695ad32 | ||
|
|
cacf4091c0 | ||
|
|
54f9e4287f | ||
|
|
c331009440 | ||
|
|
6086292252 | ||
|
|
b3916f74a7 | ||
|
|
f46f1d28af | ||
|
|
7728a848d0 | ||
|
|
f3da4dc6ba | ||
|
|
ae1b589f60 | ||
|
|
6a20f07f0d | ||
|
|
fb2d7afe71 | ||
|
|
1ad7973cc6 | ||
|
|
5f73d06502 | ||
|
|
248c297f1b | ||
|
|
213c2e33e5 | ||
|
|
2e0219cac0 | ||
|
|
966611bbfa | ||
|
|
7198a1cb22 | ||
|
|
5bb2952860 | ||
|
|
c658f0aed3 | ||
|
|
309d86e339 | ||
|
|
6ad360bdef | ||
|
|
5198d6f541 | ||
|
|
a5d003f0c9 | ||
|
|
924b7ecf89 | ||
|
|
fc19d14a65 | ||
|
|
b9ad214801 | ||
|
|
be7de427ca | ||
|
|
e2a7fed890 | ||
|
|
12dc7f26cc | ||
|
|
7129f23511 | ||
|
|
f273c50d62 | ||
|
|
1b89a438cf | ||
|
|
cc70565886 | ||
|
|
374e510f94 | ||
|
|
28efbb05bf | ||
|
|
d2f882158f | ||
|
|
a80897478e | ||
|
|
57609845df | ||
|
|
7f76a1189c | ||
|
|
2ba1128095 | ||
|
|
f9ddcb5705 | ||
|
|
fa6826e417 | ||
|
|
bd0bf4e0a9 | ||
|
|
9194a8be89 | ||
|
|
e3df8ab6dc | ||
|
|
0ffeabd14f | ||
|
|
499e54edda | ||
|
|
f62dbb018b | ||
|
|
18b1466893 | ||
|
|
2824f36401 | ||
|
|
d4f719c34b | ||
|
|
97c3544a1e | ||
|
|
b69b551c8b | ||
|
|
1e4927a1d2 | ||
|
|
3a38604f07 | ||
|
|
66fd57878a | ||
|
|
fc4ad2db0f | ||
|
|
34932dd211 | ||
|
|
75edd85fed | ||
|
|
4aba0abeaa | ||
|
|
36b6b3cdf6 | ||
|
|
3a30e6daa8 | ||
|
|
aef82f5d59 | ||
|
|
8baf6fb920 | ||
|
|
86dbdb118b | ||
|
|
b4fcdeb56c | ||
|
|
4ddfa82bb7 | ||
|
|
34cb8850e9 | ||
|
|
cbc146720b | ||
|
|
27cef0870d | ||
|
|
77e3d58922 | ||
|
|
64580259d0 | ||
|
|
e04b063ff4 | ||
|
|
e45f7e40e8 | ||
|
|
a2eeaf3d43 | ||
|
|
2f57d18b25 | ||
|
|
3d41af0aba | ||
|
|
90e4b6b040 | ||
|
|
236ae93610 | ||
|
|
0b204d8c21 | ||
|
|
983b73f47c | ||
|
|
65f3a341b0 | ||
|
|
69998b5fad | ||
|
|
54d7f1c933 | ||
|
|
d0fdc6da11 | ||
|
|
207e319a70 | ||
|
|
bfb23f4608 | ||
|
|
3adc5227cd | ||
|
|
052c361031 | ||
|
|
d54fd20ba4 | ||
|
|
30abfc41c2 | ||
|
|
95720adff5 | ||
|
|
6be5f4e4c4 | ||
|
|
b550f57912 | ||
|
|
4d4cff0530 | ||
|
|
5c97f70bf1 | ||
|
|
b374d481c8 | ||
|
|
b929fd9f59 | ||
|
|
08400f5542 | ||
|
|
a5999351cf | ||
|
|
3d43906572 | ||
|
|
1c71fadfdc | ||
|
|
49b3d6c78c | ||
|
|
1ac3319e45 | ||
|
|
2a54e73fec | ||
|
|
57bbc5d6da | ||
|
|
91d7fd20ae | ||
|
|
1787c473b8 | ||
|
|
67808bad0e | ||
|
|
b7225fd010 | ||
|
|
e9301bf833 | ||
|
|
9f9afbb6a8 | ||
|
|
a87a2aacaa | ||
|
|
3e55f1474e | ||
|
|
b5eb91536a | ||
|
|
c4c6bf6e6e | ||
|
|
0f544a8811 | ||
|
|
60dfe58325 | ||
|
|
950a81399a | ||
|
|
d574bf0a27 | ||
|
|
956416c150 | ||
|
|
8ab09c18a1 | ||
|
|
4c6c5f0391 | ||
|
|
a5ee7de650 | ||
|
|
7b6e7f6e12 | ||
|
|
3f2ea5c35e | ||
|
|
f74ce7a104 | ||
|
|
2aa08631cb | ||
|
|
5ba46f6d0c | ||
|
|
ffc7e04d44 | ||
|
|
94765e7487 | ||
|
|
50a49eff15 | ||
|
|
6966863d7d | ||
|
|
7de5139750 | ||
|
|
94c06c55e8 | ||
|
|
e1f3871a78 | ||
|
|
6374df5a31 | ||
|
|
b06a2a6191 | ||
|
|
1511606799 | ||
|
|
1192cc0767 | ||
|
|
8dfad874a2 | ||
|
|
948eee9fe1 | ||
|
|
823a44ef80 | ||
|
|
42d5d988fa | ||
|
|
9833fcfe32 | ||
|
|
74932f2516 | ||
|
|
330a5b42d4 | ||
|
|
ba0cbb4a41 | ||
|
|
e64ed7b975 | ||
|
|
4974f49bb7 | ||
|
|
1f248c47f3 | ||
|
|
0c2f7d8da1 | ||
|
|
5b4c972fc5 | ||
|
|
9753bccc71 | ||
|
|
5aefc2b7ce | ||
|
|
1631981f84 | ||
|
|
73f7ebd9d1 | ||
|
|
870cccb877 | ||
|
|
f48ab642be | ||
|
|
4b7b8229de | ||
|
|
020e73017b | ||
|
|
ca9aaac36e | ||
|
|
680f267179 | ||
|
|
9e04c34e20 | ||
|
|
6d78be0c83 | ||
|
|
447683de6f | ||
|
|
0db05b6725 | ||
|
|
03f185bcd5 | ||
|
|
40326c698c | ||
|
|
12108104c9 | ||
|
|
3efec55f93 | ||
|
|
8f6c08863a | ||
|
|
7253fada0d | ||
|
|
985496f4be | ||
|
|
c5f0af9398 | ||
|
|
d95b39d37f | ||
|
|
0072686aab | ||
|
|
3e41ab7bff | ||
|
|
12aa43469f | ||
|
|
0f1df0dc2c | ||
|
|
e88e66f982 | ||
|
|
d0f194de73 | ||
|
|
c65efd2986 | ||
|
|
95157d0aad | ||
|
|
451665cfdf | ||
|
|
2b84e5cda3 | ||
|
|
d98607408b | ||
|
|
55007e71be | ||
|
|
5208bb8c36 | ||
|
|
5cc6bf1a9c | ||
|
|
90e8ccc898 | ||
|
|
f3c3288761 | ||
|
|
9ec01dfc16 | ||
|
|
c994ce6b7f | ||
|
|
ffe35c396c | ||
|
|
0c5d3fd894 | ||
|
|
f8b605293f | ||
|
|
150b67de10 | ||
|
|
b7566b5ec3 | ||
|
|
7fc4b4b3e1 | ||
|
|
b50a56830d | ||
|
|
97f4000d3a | ||
|
|
9ae1d75318 | ||
|
|
f9562d7f1c | ||
|
|
ee3b8e89b3 | ||
|
|
0d7aa1ee99 | ||
|
|
48ae981d69 | ||
|
|
4416dc9d5d | ||
|
|
22dd743eba | ||
|
|
01d06c1f9f | ||
|
|
20959d8c36 | ||
|
|
f990395211 | ||
|
|
2ad285aab2 | ||
|
|
f40b3ce347 | ||
|
|
ea3da9a469 | ||
|
|
77e1743341 | ||
|
|
5528265142 | ||
|
|
6bc8ae63ef | ||
|
|
ff03242fa0 | ||
|
|
136f759492 | ||
|
|
6b60c509ac | ||
|
|
543db9c2df | ||
|
|
bb76440bfa | ||
|
|
c104d507bf | ||
|
|
ad4414b59f | ||
|
|
c8b4b54479 | ||
|
|
47ba34c83a | ||
|
|
467aa0cee0 | ||
|
|
6be5747466 | ||
|
|
46c428234f | ||
|
|
ffed5e0056 | ||
|
|
fc66a32c6f | ||
|
|
a01d3e6955 | ||
|
|
766b84a9d9 | ||
|
|
cf98f219f9 | ||
|
|
e7b625fe03 | ||
|
|
3474f39e21 | ||
|
|
8d0869c6d3 | ||
|
|
a7084ad6e4 | ||
|
|
50257fce59 | ||
|
|
fe6695b9e7 | ||
|
|
2eef76ed3f | ||
|
|
85c1bd2cd0 | ||
|
|
809a9f485f | ||
|
|
750edfb440 | ||
|
|
2dd895d98c | ||
|
|
c1b50b7b13 | ||
|
|
ed143b598f | ||
|
|
428508bd75 | ||
|
|
78b31e5966 | ||
|
|
8cf62ce06e | ||
|
|
5161ae7e08 | ||
|
|
8c167627ed | ||
|
|
e26b6f9c89 | ||
|
|
3c6796b72e | ||
|
|
996b5a3dfb | ||
|
|
9bb7195085 | ||
|
|
595cc1ae1a | ||
|
|
482611f426 | ||
|
|
8861770bd0 | ||
|
|
8fdcdf4c2f | ||
|
|
137356dbec | ||
|
|
2fbb152386 | ||
|
|
d946be2f3d | ||
|
|
292f1cfa96 | ||
|
|
948e999eff | ||
|
|
a7c8e37e77 | ||
|
|
19a9fa16a9 | ||
|
|
e02d6b2288 | ||
|
|
36b4c58acf | ||
|
|
7827f0a844 | ||
|
|
9ee6115deb | ||
|
|
9d08384d5f | ||
|
|
853894dd47 | ||
|
|
5267ebce2d | ||
|
|
43c9bd869f | ||
|
|
0f399350f1 | ||
|
|
85c66dc6a4 | ||
|
|
b10be842f6 | ||
|
|
e2e501aa06 | ||
|
|
e9b1c8cdfa | ||
|
|
c27a6fa8a4 | ||
|
|
1690292b09 | ||
|
|
834b391792 | ||
|
|
3c1c7ba672 | ||
|
|
48b093823e | ||
|
|
b7bef36ee1 | ||
|
|
28be37f470 | ||
|
|
68666d6a22 | ||
|
|
2180a91196 | ||
|
|
2163d064f3 | ||
|
|
8cba5b791a | ||
|
|
5cd6956d58 | ||
|
|
f5c665a544 | ||
|
|
98fb19b535 | ||
|
|
988cb51a7c | ||
|
|
9481a23314 | ||
|
|
b5d8434a50 | ||
|
|
ac2c2f6f28 | ||
|
|
db58032973 | ||
|
|
b4762dfff0 | ||
|
|
a9ce04201f | ||
|
|
c897bd6cbd | ||
|
|
024c3e1dbe | ||
|
|
8145c79fd8 | ||
|
|
78a29f1060 | ||
|
|
bb4bf9d6d0 | ||
|
|
473943643e | ||
|
|
3ca2c8d6c5 | ||
|
|
347fc49d4d | ||
|
|
ab9abf53b7 | ||
|
|
3bda0019ae | ||
|
|
ca2394028f | ||
|
|
b19a73be26 | ||
|
|
ea67c049f0 | ||
|
|
d368c43648 | ||
|
|
1db7b18341 | ||
|
|
1b9b8efbc9 | ||
|
|
de4b255c1f | ||
|
|
0568998166 | ||
|
|
03c7140228 | ||
|
|
cf3569fb1b | ||
|
|
a39c998342 | ||
|
|
261029cef3 | ||
|
|
b94244eb12 | ||
|
|
ae72cf84b8 | ||
|
|
b90e25f786 | ||
|
|
d0415952f7 | ||
|
|
287f1857ee | ||
|
|
eae358810b | ||
|
|
3eddbd11e4 | ||
|
|
d4e6b7a692 | ||
|
|
05c5d0b8ee | ||
|
|
fcb9b2ffe5 | ||
|
|
6eab5254e5 | ||
|
|
08deed9002 | ||
|
|
f18a08f58d | ||
|
|
199794086d | ||
|
|
c3ad99a34f | ||
|
|
b0feb3608b | ||
|
|
b913df3774 | ||
|
|
ae9c6257fe | ||
|
|
a408ed3ea3 | ||
|
|
4334ffa6f9 | ||
|
|
736b6ee65c | ||
|
|
09f301cd38 | ||
|
|
780ef84cf0 | ||
|
|
1b81f3b125 | ||
|
|
5d887970f6 | ||
|
|
d70b5a2cbe | ||
|
|
d3a7429f61 | ||
|
|
22bd12a097 | ||
|
|
4a4dfbfbed | ||
|
|
15c19fcc60 | ||
|
|
315b0c09c6 | ||
|
|
e9baf9c134 | ||
|
|
e49fc51492 | ||
|
|
243211a5ae | ||
|
|
a19ad935b3 | ||
|
|
c02eb199b6 | ||
|
|
8869b0ab0e | ||
|
|
b15c84e19d | ||
|
|
0ac08bbca6 | ||
|
|
0c3ae78ec1 | ||
|
|
ca4b10bb74 | ||
|
|
d2f9288be6 | ||
|
|
d775ddd749 | ||
|
|
47e35d7d0e | ||
|
|
4f1bf159f4 | ||
|
|
b504cd739f | ||
|
|
a4b502d92f | ||
|
|
1835e8a681 | ||
|
|
bbb405a492 | ||
|
|
1a95252f00 | ||
|
|
9f223e6ccc | ||
|
|
76cecf8165 | ||
|
|
ced29b816b | ||
|
|
11d37d556e | ||
|
|
b1b6b27c5f |
42
.devcontainer/Dockerfile
Normal file
42
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,42 @@
|
||||
# This is a Dockerfile for Developer Container
|
||||
|
||||
# Use the Python base image
|
||||
ARG VARIANT="3.11-bullseye"
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} AS langchain-dev-base
|
||||
|
||||
USER vscode
|
||||
|
||||
# Define the version of Poetry to install (default is 1.4.2)
|
||||
# Define the directory of python virtual environment
|
||||
ARG PYTHON_VIRTUALENV_HOME=/home/vscode/langchain-py-env \
|
||||
POETRY_VERSION=1.4.2
|
||||
|
||||
ENV POETRY_VIRTUALENVS_IN_PROJECT=false \
|
||||
POETRY_NO_INTERACTION=true
|
||||
|
||||
# Create a Python virtual environment for Poetry and install it
|
||||
RUN python3 -m venv ${PYTHON_VIRTUALENV_HOME} && \
|
||||
$PYTHON_VIRTUALENV_HOME/bin/pip install --upgrade pip && \
|
||||
$PYTHON_VIRTUALENV_HOME/bin/pip install poetry==${POETRY_VERSION}
|
||||
|
||||
ENV PATH="$PYTHON_VIRTUALENV_HOME/bin:$PATH" \
|
||||
VIRTUAL_ENV=$PYTHON_VIRTUALENV_HOME
|
||||
|
||||
# Setup for bash
|
||||
RUN poetry completions bash >> /home/vscode/.bash_completion && \
|
||||
echo "export PATH=$PYTHON_VIRTUALENV_HOME/bin:$PATH" >> ~/.bashrc
|
||||
|
||||
# Set the working directory for the app
|
||||
WORKDIR /workspaces/langchain
|
||||
|
||||
# Use a multi-stage build to install dependencies
|
||||
FROM langchain-dev-base AS langchain-dev-dependencies
|
||||
|
||||
ARG PYTHON_VIRTUALENV_HOME
|
||||
|
||||
# Copy only the dependency files for installation
|
||||
COPY pyproject.toml poetry.lock poetry.toml ./
|
||||
|
||||
# Install the Poetry dependencies (this layer will be cached as long as the dependencies don't change)
|
||||
RUN poetry install --no-interaction --no-ansi --with dev,test,docs
|
||||
|
||||
33
.devcontainer/devcontainer.json
Normal file
33
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,33 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
|
||||
{
|
||||
"dockerComposeFile": "./docker-compose.yaml",
|
||||
"service": "langchain",
|
||||
"workspaceFolder": "/workspaces/langchain",
|
||||
"name": "langchain",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-python.python"
|
||||
],
|
||||
"settings": {
|
||||
"python.defaultInterpreterPath": "/home/vscode/langchain-py-env/bin/python3.11"
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
"features": {},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Uncomment the next line to run commands after the container is created.
|
||||
// "postCreateCommand": "cat /etc/os-release",
|
||||
|
||||
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "devcontainer"
|
||||
"remoteUser": "vscode",
|
||||
"overrideCommand": true
|
||||
}
|
||||
31
.devcontainer/docker-compose.yaml
Normal file
31
.devcontainer/docker-compose.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
version: '3'
|
||||
services:
|
||||
langchain:
|
||||
build:
|
||||
dockerfile: .devcontainer/Dockerfile
|
||||
context: ../
|
||||
volumes:
|
||||
- ../:/workspaces/langchain
|
||||
networks:
|
||||
- langchain-network
|
||||
# environment:
|
||||
# MONGO_ROOT_USERNAME: root
|
||||
# MONGO_ROOT_PASSWORD: example123
|
||||
# depends_on:
|
||||
# - mongo
|
||||
# mongo:
|
||||
# image: mongo
|
||||
# restart: unless-stopped
|
||||
# environment:
|
||||
# MONGO_INITDB_ROOT_USERNAME: root
|
||||
# MONGO_INITDB_ROOT_PASSWORD: example123
|
||||
# ports:
|
||||
# - "27017:27017"
|
||||
# networks:
|
||||
# - langchain-network
|
||||
|
||||
networks:
|
||||
langchain-network:
|
||||
driver: bridge
|
||||
|
||||
|
||||
6
.dockerignore
Normal file
6
.dockerignore
Normal file
@@ -0,0 +1,6 @@
|
||||
.venv
|
||||
.github
|
||||
.git
|
||||
.mypy_cache
|
||||
.pytest_cache
|
||||
Dockerfile
|
||||
247
.github/CONTRIBUTING.md
vendored
Normal file
247
.github/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,247 @@
|
||||
# Contributing to LangChain
|
||||
|
||||
Hi there! Thank you for even being interested in contributing to LangChain.
|
||||
As an open source project in a rapidly developing field, we are extremely open
|
||||
to contributions, whether they be in the form of new features, improved infra, better documentation, or bug fixes.
|
||||
|
||||
## 🗺️ Guidelines
|
||||
|
||||
### 👩💻 Contributing Code
|
||||
|
||||
To contribute to this project, please follow a ["fork and pull request"](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow.
|
||||
Please do not try to push directly to this repo unless you are maintainer.
|
||||
|
||||
Please follow the checked-in pull request template when opening pull requests. Note related issues and tag relevant
|
||||
maintainers.
|
||||
|
||||
Pull requests cannot land without passing the formatting, linting and testing checks first. See
|
||||
[Common Tasks](#-common-tasks) for how to run these checks locally.
|
||||
|
||||
It's essential that we maintain great documentation and testing. If you:
|
||||
- Fix a bug
|
||||
- Add a relevant unit or integration test when possible. These live in `tests/unit_tests` and `tests/integration_tests`.
|
||||
- Make an improvement
|
||||
- Update any affected example notebooks and documentation. These lives in `docs`.
|
||||
- Update unit and integration tests when relevant.
|
||||
- Add a feature
|
||||
- Add a demo notebook in `docs/modules`.
|
||||
- Add unit and integration tests.
|
||||
|
||||
We're a small, building-oriented team. If there's something you'd like to add or change, opening a pull request is the
|
||||
best way to get our attention.
|
||||
|
||||
### 🚩GitHub Issues
|
||||
|
||||
Our [issues](https://github.com/hwchase17/langchain/issues) page is kept up to date
|
||||
with bugs, improvements, and feature requests.
|
||||
|
||||
There is a taxonomy of labels to help with sorting and discovery of issues of interest. Please use these to help
|
||||
organize issues.
|
||||
|
||||
If you start working on an issue, please assign it to yourself.
|
||||
|
||||
If you are adding an issue, please try to keep it focused on a single, modular bug/improvement/feature.
|
||||
If two issues are related, or blocking, please link them rather than combining them.
|
||||
|
||||
We will try to keep these issues as up to date as possible, though
|
||||
with the rapid rate of develop in this field some may get out of date.
|
||||
If you notice this happening, please let us know.
|
||||
|
||||
### 🙋Getting Help
|
||||
|
||||
Our goal is to have the simplest developer setup possible. Should you experience any difficulty getting setup, please
|
||||
contact a maintainer! Not only do we want to help get you unblocked, but we also want to make sure that the process is
|
||||
smooth for future contributors.
|
||||
|
||||
In a similar vein, we do enforce certain linting, formatting, and documentation standards in the codebase.
|
||||
If you are finding these difficult (or even just annoying) to work with, feel free to contact a maintainer for help -
|
||||
we do not want these to get in the way of getting good code into the codebase.
|
||||
|
||||
## 🚀 Quick Start
|
||||
|
||||
This project uses [Poetry](https://python-poetry.org/) as a dependency manager. Check out Poetry's [documentation on how to install it](https://python-poetry.org/docs/#installation) on your system before proceeding.
|
||||
|
||||
❗Note: If you use `Conda` or `Pyenv` as your environment / package manager, avoid dependency conflicts by doing the following first:
|
||||
1. *Before installing Poetry*, create and activate a new Conda env (e.g. `conda create -n langchain python=3.9`)
|
||||
2. Install Poetry (see above)
|
||||
3. Tell Poetry to use the virtualenv python environment (`poetry config virtualenvs.prefer-active-python true`)
|
||||
4. Continue with the following steps.
|
||||
|
||||
To install requirements:
|
||||
|
||||
```bash
|
||||
poetry install -E all
|
||||
```
|
||||
|
||||
This will install all requirements for running the package, examples, linting, formatting, tests, and coverage. Note the `-E all` flag will install all optional dependencies necessary for integration testing.
|
||||
|
||||
❗Note: If you're running Poetry 1.4.1 and receive a `WheelFileValidationError` for `debugpy` during installation, you can try either downgrading to Poetry 1.4.0 or disabling "modern installation" (`poetry config installer.modern-installation false`) and re-install requirements. See [this `debugpy` issue](https://github.com/microsoft/debugpy/issues/1246) for more details.
|
||||
|
||||
Now, you should be able to run the common tasks in the following section. To double check, run `make test`, all tests should pass. If they don't you may need to pip install additional dependencies, such as `numexpr` and `openapi_schema_pydantic`.
|
||||
|
||||
## ✅ Common Tasks
|
||||
|
||||
Type `make` for a list of common tasks.
|
||||
|
||||
### Code Formatting
|
||||
|
||||
Formatting for this project is done via a combination of [Black](https://black.readthedocs.io/en/stable/) and [isort](https://pycqa.github.io/isort/).
|
||||
|
||||
To run formatting for this project:
|
||||
|
||||
```bash
|
||||
make format
|
||||
```
|
||||
|
||||
### Linting
|
||||
|
||||
Linting for this project is done via a combination of [Black](https://black.readthedocs.io/en/stable/), [isort](https://pycqa.github.io/isort/), [flake8](https://flake8.pycqa.org/en/latest/), and [mypy](http://mypy-lang.org/).
|
||||
|
||||
To run linting for this project:
|
||||
|
||||
```bash
|
||||
make lint
|
||||
```
|
||||
|
||||
We recognize linting can be annoying - if you do not want to do it, please contact a project maintainer, and they can help you with it. We do not want this to be a blocker for good code getting contributed.
|
||||
|
||||
### Coverage
|
||||
|
||||
Code coverage (i.e. the amount of code that is covered by unit tests) helps identify areas of the code that are potentially more or less brittle.
|
||||
|
||||
To get a report of current coverage, run the following:
|
||||
|
||||
```bash
|
||||
make coverage
|
||||
```
|
||||
|
||||
### Working with Optional Dependencies
|
||||
|
||||
Langchain relies heavily on optional dependencies to keep the Langchain package lightweight.
|
||||
|
||||
If you're adding a new dependency to Langchain, assume that it will be an optional dependency, and
|
||||
that most users won't have it installed.
|
||||
|
||||
Users that do not have the dependency installed should be able to **import** your code without
|
||||
any side effects (no warnings, no errors, no exceptions).
|
||||
|
||||
To introduce the dependency to the pyproject.toml file correctly, please do the following:
|
||||
|
||||
1. Add the dependency to the main group as an optional dependency
|
||||
```bash
|
||||
poetry add --optional [package_name]
|
||||
```
|
||||
2. Open pyproject.toml and add the dependency to the `extended_testing` extra
|
||||
3. Relock the poetry file to update the extra.
|
||||
```bash
|
||||
poetry lock --no-update
|
||||
```
|
||||
4. Add a unit test that the very least attempts to import the new code. Ideally the unit
|
||||
test makes use of lightweight fixtures to test the logic of the code.
|
||||
5. Please use the `@pytest.mark.requires(package_name)` decorator for any tests that require the dependency.
|
||||
|
||||
### Testing
|
||||
|
||||
See section about optional dependencies.
|
||||
|
||||
#### Unit Tests
|
||||
|
||||
Unit tests cover modular logic that does not require calls to outside APIs.
|
||||
|
||||
To run unit tests:
|
||||
|
||||
```bash
|
||||
make test
|
||||
```
|
||||
|
||||
To run unit tests in Docker:
|
||||
|
||||
```bash
|
||||
make docker_tests
|
||||
```
|
||||
|
||||
If you add new logic, please add a unit test.
|
||||
|
||||
|
||||
|
||||
#### Integration Tests
|
||||
|
||||
Integration tests cover logic that requires making calls to outside APIs (often integration with other services).
|
||||
|
||||
**warning** Almost no tests should be integration tests.
|
||||
|
||||
Tests that require making network connections make it difficult for other
|
||||
developers to test the code.
|
||||
|
||||
Instead favor relying on `responses` library and/or mock.patch to mock
|
||||
requests using small fixtures.
|
||||
|
||||
To run integration tests:
|
||||
|
||||
```bash
|
||||
make integration_tests
|
||||
```
|
||||
|
||||
If you add support for a new external API, please add a new integration test.
|
||||
|
||||
### Adding a Jupyter Notebook
|
||||
|
||||
If you are adding a Jupyter notebook example, you'll want to install the optional `dev` dependencies.
|
||||
|
||||
To install dev dependencies:
|
||||
|
||||
```bash
|
||||
poetry install --with dev
|
||||
```
|
||||
|
||||
Launch a notebook:
|
||||
|
||||
```bash
|
||||
poetry run jupyter notebook
|
||||
```
|
||||
|
||||
When you run `poetry install`, the `langchain` package is installed as editable in the virtualenv, so your new logic can be imported into the notebook.
|
||||
|
||||
## Documentation
|
||||
|
||||
### Contribute Documentation
|
||||
|
||||
Docs are largely autogenerated by [sphinx](https://www.sphinx-doc.org/en/master/) from the code.
|
||||
|
||||
For that reason, we ask that you add good documentation to all classes and methods.
|
||||
|
||||
Similar to linting, we recognize documentation can be annoying. If you do not want to do it, please contact a project maintainer, and they can help you with it. We do not want this to be a blocker for good code getting contributed.
|
||||
|
||||
### Build Documentation Locally
|
||||
|
||||
Before building the documentation, it is always a good idea to clean the build directory:
|
||||
|
||||
```bash
|
||||
make docs_clean
|
||||
```
|
||||
|
||||
Next, you can run the linkchecker to make sure all links are valid:
|
||||
|
||||
```bash
|
||||
make docs_linkcheck
|
||||
```
|
||||
|
||||
Finally, you can build the documentation as outlined below:
|
||||
|
||||
```bash
|
||||
make docs_build
|
||||
```
|
||||
|
||||
## 🏭 Release Process
|
||||
|
||||
As of now, LangChain has an ad hoc release process: releases are cut with high frequency by
|
||||
a developer and published to [PyPI](https://pypi.org/project/langchain/).
|
||||
|
||||
LangChain follows the [semver](https://semver.org/) versioning standard. However, as pre-1.0 software,
|
||||
even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4).
|
||||
|
||||
### 🌟 Recognition
|
||||
|
||||
If your contribution has made its way into a release, we will want to give you credit on Twitter (only if you want though)!
|
||||
If you have a Twitter account you would like us to mention, please let us know in the PR or in another manner.
|
||||
|
||||
106
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
106
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
name: "\U0001F41B Bug Report"
|
||||
description: Submit a bug report to help us improve LangChain
|
||||
labels: ["02 Bug Report"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: >
|
||||
Thank you for taking the time to file a bug report. Before creating a new
|
||||
issue, please make sure to take a few moments to check the issue tracker
|
||||
for existing issues about the bug.
|
||||
|
||||
- type: textarea
|
||||
id: system-info
|
||||
attributes:
|
||||
label: System Info
|
||||
description: Please share your system info with us.
|
||||
placeholder: LangChain version, platform, python version, ...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: who-can-help
|
||||
attributes:
|
||||
label: Who can help?
|
||||
description: |
|
||||
Your issue will be replied to more quickly if you can figure out the right person to tag with @
|
||||
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
|
||||
|
||||
The core maintainers strive to read all issues, but tagging them will help them prioritize.
|
||||
|
||||
Please tag fewer than 3 people.
|
||||
|
||||
@hwchase17 - project lead
|
||||
|
||||
Tracing / Callbacks
|
||||
- @agola11
|
||||
|
||||
Async
|
||||
- @agola11
|
||||
|
||||
DataLoader Abstractions
|
||||
- @eyurtsev
|
||||
|
||||
LLM/Chat Wrappers
|
||||
- @hwchase17
|
||||
- @agola11
|
||||
|
||||
Tools / Toolkits
|
||||
- ...
|
||||
|
||||
placeholder: "@Username ..."
|
||||
|
||||
- type: checkboxes
|
||||
id: information-scripts-examples
|
||||
attributes:
|
||||
label: Information
|
||||
description: "The problem arises when using:"
|
||||
options:
|
||||
- label: "The official example notebooks/scripts"
|
||||
- label: "My own modified scripts"
|
||||
|
||||
- type: checkboxes
|
||||
id: related-components
|
||||
attributes:
|
||||
label: Related Components
|
||||
description: "Select the components related to the issue (if applicable):"
|
||||
options:
|
||||
- label: "LLMs/Chat Models"
|
||||
- label: "Embedding Models"
|
||||
- label: "Prompts / Prompt Templates / Prompt Selectors"
|
||||
- label: "Output Parsers"
|
||||
- label: "Document Loaders"
|
||||
- label: "Vector Stores / Retrievers"
|
||||
- label: "Memory"
|
||||
- label: "Agents / Agent Executors"
|
||||
- label: "Tools / Toolkits"
|
||||
- label: "Chains"
|
||||
- label: "Callbacks/Tracing"
|
||||
- label: "Async"
|
||||
|
||||
- type: textarea
|
||||
id: reproduction
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Reproduction
|
||||
description: |
|
||||
Please provide a [code sample](https://stackoverflow.com/help/minimal-reproducible-example) that reproduces the problem you ran into. It can be a Colab link or just a code snippet.
|
||||
If you have code snippets, error messages, stack traces please provide them here as well.
|
||||
Important! Use code tags to correctly format your code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting
|
||||
Avoid screenshots when possible, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.
|
||||
|
||||
placeholder: |
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
- type: textarea
|
||||
id: expected-behavior
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: "A clear and concise description of what you would expect to happen."
|
||||
6
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
6
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
blank_issues_enabled: true
|
||||
version: 2.1
|
||||
contact_links:
|
||||
- name: Discord
|
||||
url: https://discord.gg/6adMQxSpJS
|
||||
about: General community discussions
|
||||
19
.github/ISSUE_TEMPLATE/documentation.yml
vendored
Normal file
19
.github/ISSUE_TEMPLATE/documentation.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: Documentation
|
||||
description: Report an issue related to the LangChain documentation.
|
||||
title: "DOC: <Please write a comprehensive title after the 'DOC: ' prefix>"
|
||||
labels: [03 - Documentation]
|
||||
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Issue with current documentation:"
|
||||
description: >
|
||||
Please make sure to leave a reference to the document/code you're
|
||||
referring to.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Idea or request for content:"
|
||||
description: >
|
||||
Please describe as clearly as possible what topics you think are missing
|
||||
from the current documentation.
|
||||
30
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
Normal file
30
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: "\U0001F680 Feature request"
|
||||
description: Submit a proposal/request for a new LangChain feature
|
||||
labels: ["02 Feature Request"]
|
||||
body:
|
||||
- type: textarea
|
||||
id: feature-request
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Feature request
|
||||
description: |
|
||||
A clear and concise description of the feature proposal. Please provide links to any relevant GitHub repos, papers, or other resources if relevant.
|
||||
|
||||
- type: textarea
|
||||
id: motivation
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Motivation
|
||||
description: |
|
||||
Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too.
|
||||
|
||||
- type: textarea
|
||||
id: contribution
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Your contribution
|
||||
description: |
|
||||
Is there any way that you could help, e.g. by submitting a PR? Make sure to read the CONTRIBUTING.MD [readme](https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md)
|
||||
18
.github/ISSUE_TEMPLATE/other.yml
vendored
Normal file
18
.github/ISSUE_TEMPLATE/other.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
name: Other Issue
|
||||
description: Raise an issue that wouldn't be covered by the other templates.
|
||||
title: "Issue: <Please write a comprehensive title after the 'Issue: ' prefix>"
|
||||
labels: [04 - Other]
|
||||
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Issue you'd like to raise."
|
||||
description: >
|
||||
Please describe the issue you'd like to raise as clearly as possible.
|
||||
Make sure to include any relevant links or references.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Suggestion:"
|
||||
description: >
|
||||
Please outline a suggestion to improve the issue here.
|
||||
56
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
56
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
<!--
|
||||
Thank you for contributing to LangChain! Your PR will appear in our release under the title you set. Please make sure it highlights your valuable contribution.
|
||||
|
||||
Replace this with a description of the change, the issue it fixes (if applicable), and relevant context. List any dependencies required for this change.
|
||||
|
||||
After you're done, someone will review your PR. They may suggest improvements. If no one reviews your PR within a few days, feel free to @-mention the same people again, as notifications can get lost.
|
||||
|
||||
Finally, we'd love to show appreciation for your contribution - if you'd like us to shout you out on Twitter, please also include your handle!
|
||||
-->
|
||||
|
||||
<!-- Remove if not applicable -->
|
||||
|
||||
Fixes # (issue)
|
||||
|
||||
#### Before submitting
|
||||
|
||||
<!-- If you're adding a new integration, please include:
|
||||
|
||||
1. a test for the integration - favor unit tests that does not rely on network access.
|
||||
2. an example notebook showing its use
|
||||
|
||||
|
||||
See contribution guidelines for more information on how to write tests, lint
|
||||
etc:
|
||||
|
||||
https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md
|
||||
-->
|
||||
|
||||
#### Who can review?
|
||||
|
||||
Tag maintainers/contributors who might be interested:
|
||||
|
||||
<!-- For a quicker response, figure out the right person to tag with @
|
||||
|
||||
@hwchase17 - project lead
|
||||
|
||||
Tracing / Callbacks
|
||||
- @agola11
|
||||
|
||||
Async
|
||||
- @agola11
|
||||
|
||||
DataLoaders
|
||||
- @eyurtsev
|
||||
|
||||
Models
|
||||
- @hwchase17
|
||||
- @agola11
|
||||
|
||||
Agents / Tools / Toolkits
|
||||
- @hwchase17
|
||||
|
||||
VectorStores / Retrievers / Memory
|
||||
- @dev2049
|
||||
|
||||
-->
|
||||
76
.github/actions/poetry_setup/action.yml
vendored
Normal file
76
.github/actions/poetry_setup/action.yml
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
# An action for setting up poetry install with caching.
|
||||
# Using a custom action since the default action does not
|
||||
# take poetry install groups into account.
|
||||
# Action code from:
|
||||
# https://github.com/actions/setup-python/issues/505#issuecomment-1273013236
|
||||
name: poetry-install-with-caching
|
||||
description: Poetry install with support for caching of dependency groups.
|
||||
|
||||
inputs:
|
||||
python-version:
|
||||
description: Python version, supporting MAJOR.MINOR only
|
||||
required: true
|
||||
|
||||
poetry-version:
|
||||
description: Poetry version
|
||||
required: true
|
||||
|
||||
install-command:
|
||||
description: Command run for installing dependencies
|
||||
required: false
|
||||
default: poetry install
|
||||
|
||||
cache-key:
|
||||
description: Cache key to use for manual handling of caching
|
||||
required: true
|
||||
|
||||
working-directory:
|
||||
description: Directory to run install-command in
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- uses: actions/setup-python@v4
|
||||
name: Setup python $${ inputs.python-version }}
|
||||
with:
|
||||
python-version: ${{ inputs.python-version }}
|
||||
|
||||
- uses: actions/cache@v3
|
||||
id: cache-pip
|
||||
name: Cache Pip ${{ inputs.python-version }}
|
||||
env:
|
||||
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "15"
|
||||
with:
|
||||
path: |
|
||||
~/.cache/pip
|
||||
key: pip-${{ runner.os }}-${{ runner.arch }}-py-${{ inputs.python-version }}
|
||||
|
||||
- run: pipx install poetry==${{ inputs.poetry-version }} --python python${{ inputs.python-version }}
|
||||
shell: bash
|
||||
|
||||
- name: Check Poetry File
|
||||
shell: bash
|
||||
run: |
|
||||
poetry check
|
||||
|
||||
- name: Check lock file
|
||||
shell: bash
|
||||
run: |
|
||||
poetry lock --check
|
||||
|
||||
- uses: actions/cache@v3
|
||||
id: cache-poetry
|
||||
env:
|
||||
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "15"
|
||||
with:
|
||||
path: |
|
||||
~/.cache/pypoetry/virtualenvs
|
||||
~/.cache/pypoetry/cache
|
||||
~/.cache/pypoetry/artifacts
|
||||
key: poetry-${{ runner.os }}-${{ runner.arch }}-py-${{ inputs.python-version }}-poetry-${{ inputs.poetry-version }}-${{ inputs.cache-key }}-${{ hashFiles('poetry.lock') }}
|
||||
|
||||
- run: ${{ inputs.install-command }}
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
shell: bash
|
||||
38
.github/workflows/linkcheck.yml
vendored
Normal file
38
.github/workflows/linkcheck.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: linkcheck
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
paths:
|
||||
- 'docs/**'
|
||||
|
||||
env:
|
||||
POETRY_VERSION: "1.4.2"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
- "3.11"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install poetry
|
||||
run: |
|
||||
pipx install poetry==$POETRY_VERSION
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: poetry
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
poetry install --with docs
|
||||
- name: Build the docs
|
||||
run: |
|
||||
make docs_build
|
||||
- name: Analyzing the docs with linkcheck
|
||||
run: |
|
||||
make docs_linkcheck
|
||||
41
.github/workflows/lint.yml
vendored
41
.github/workflows/lint.yml
vendored
@@ -1,23 +1,36 @@
|
||||
name: lint
|
||||
|
||||
on: [push, pull_request_target]
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
POETRY_VERSION: "1.4.2"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.7"]
|
||||
python-version:
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r test_requirements.txt
|
||||
- name: Analysing the code with our lint
|
||||
run: |
|
||||
make lint
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install poetry
|
||||
run: |
|
||||
pipx install poetry==$POETRY_VERSION
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: poetry
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
poetry install
|
||||
- name: Analysing the code with our lint
|
||||
run: |
|
||||
make lint
|
||||
|
||||
49
.github/workflows/release.yml
vendored
Normal file
49
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
name: release
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'pyproject.toml'
|
||||
|
||||
env:
|
||||
POETRY_VERSION: "1.4.2"
|
||||
|
||||
jobs:
|
||||
if_release:
|
||||
if: |
|
||||
${{ github.event.pull_request.merged == true }}
|
||||
&& ${{ contains(github.event.pull_request.labels.*.name, 'release') }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install poetry
|
||||
run: pipx install poetry==$POETRY_VERSION
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
cache: "poetry"
|
||||
- name: Build project for distribution
|
||||
run: poetry build
|
||||
- name: Check Version
|
||||
id: check-version
|
||||
run: |
|
||||
echo version=$(poetry version --short) >> $GITHUB_OUTPUT
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: "dist/*"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
draft: false
|
||||
generateReleaseNotes: true
|
||||
tag: v${{ steps.check-version.outputs.version }}
|
||||
commit: master
|
||||
- name: Publish to PyPI
|
||||
env:
|
||||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
|
||||
run: |
|
||||
poetry publish
|
||||
54
.github/workflows/test.yml
vendored
54
.github/workflows/test.yml
vendored
@@ -1,23 +1,49 @@
|
||||
name: test
|
||||
|
||||
on: [push, pull_request_target]
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
POETRY_VERSION: "1.4.2"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.7"]
|
||||
python-version:
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
test_type:
|
||||
- "core"
|
||||
- "extended"
|
||||
name: Python ${{ matrix.python-version }} ${{ matrix.test_type }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r test_requirements.txt
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
make tests
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: "./.github/actions/poetry_setup"
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
poetry-version: "1.4.2"
|
||||
cache-key: ${{ matrix.test_type }}
|
||||
install-command: |
|
||||
if [ "${{ matrix.test_type }}" == "core" ]; then
|
||||
echo "Running core tests, installing dependencies with poetry..."
|
||||
poetry install
|
||||
else
|
||||
echo "Running extended tests, installing dependencies with poetry..."
|
||||
poetry install -E extended_testing
|
||||
fi
|
||||
- name: Run ${{matrix.test_type}} tests
|
||||
run: |
|
||||
if [ "${{ matrix.test_type }}" == "core" ]; then
|
||||
make test
|
||||
else
|
||||
make extended_tests
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
24
.gitignore
vendored
24
.gitignore
vendored
@@ -1,4 +1,6 @@
|
||||
.vs/
|
||||
.vscode/
|
||||
.idea/
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
@@ -105,7 +107,9 @@ celerybeat.pid
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.envrc
|
||||
.venv
|
||||
.venvs
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
@@ -129,3 +133,23 @@ dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# macOS display setting files
|
||||
.DS_Store
|
||||
|
||||
# Wandb directory
|
||||
wandb/
|
||||
|
||||
# asdf tool versions
|
||||
.tool-versions
|
||||
/.ruff_cache/
|
||||
|
||||
*.pkl
|
||||
*.bin
|
||||
|
||||
# integration test artifacts
|
||||
data_map*
|
||||
\[('_type', 'fake'), ('stop', None)]
|
||||
|
||||
# Replit files
|
||||
*replit*
|
||||
26
.readthedocs.yaml
Normal file
26
.readthedocs.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
# Read the Docs configuration file
|
||||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||
|
||||
# Required
|
||||
version: 2
|
||||
|
||||
# Set the version of Python and other tools you might need
|
||||
build:
|
||||
os: ubuntu-22.04
|
||||
tools:
|
||||
python: "3.11"
|
||||
|
||||
# Build documentation in the docs/ directory with Sphinx
|
||||
sphinx:
|
||||
configuration: docs/conf.py
|
||||
|
||||
# If using Sphinx, optionally build your docs in additional formats such as PDF
|
||||
# formats:
|
||||
# - pdf
|
||||
|
||||
# Optionally declare the Python requirements required to build your docs
|
||||
python:
|
||||
install:
|
||||
- requirements: docs/requirements.txt
|
||||
- method: pip
|
||||
path: .
|
||||
8
CITATION.cff
Normal file
8
CITATION.cff
Normal file
@@ -0,0 +1,8 @@
|
||||
cff-version: 1.2.0
|
||||
message: "If you use this software, please cite it as below."
|
||||
authors:
|
||||
- family-names: "Chase"
|
||||
given-names: "Harrison"
|
||||
title: "LangChain"
|
||||
date-released: 2022-10-17
|
||||
url: "https://github.com/hwchase17/langchain"
|
||||
48
Dockerfile
Normal file
48
Dockerfile
Normal file
@@ -0,0 +1,48 @@
|
||||
# This is a Dockerfile for running unit tests
|
||||
|
||||
ARG POETRY_HOME=/opt/poetry
|
||||
|
||||
# Use the Python base image
|
||||
FROM python:3.11.2-bullseye AS builder
|
||||
|
||||
# Define the version of Poetry to install (default is 1.4.2)
|
||||
ARG POETRY_VERSION=1.4.2
|
||||
|
||||
# Define the directory to install Poetry to (default is /opt/poetry)
|
||||
ARG POETRY_HOME
|
||||
|
||||
# Create a Python virtual environment for Poetry and install it
|
||||
RUN python3 -m venv ${POETRY_HOME} && \
|
||||
$POETRY_HOME/bin/pip install --upgrade pip && \
|
||||
$POETRY_HOME/bin/pip install poetry==${POETRY_VERSION}
|
||||
|
||||
# Test if Poetry is installed in the expected path
|
||||
RUN echo "Poetry version:" && $POETRY_HOME/bin/poetry --version
|
||||
|
||||
# Set the working directory for the app
|
||||
WORKDIR /app
|
||||
|
||||
# Use a multi-stage build to install dependencies
|
||||
FROM builder AS dependencies
|
||||
|
||||
ARG POETRY_HOME
|
||||
|
||||
# Copy only the dependency files for installation
|
||||
COPY pyproject.toml poetry.lock poetry.toml ./
|
||||
|
||||
# Install the Poetry dependencies (this layer will be cached as long as the dependencies don't change)
|
||||
RUN $POETRY_HOME/bin/poetry install --no-interaction --no-ansi --with test
|
||||
|
||||
# Use a multi-stage build to run tests
|
||||
FROM dependencies AS tests
|
||||
|
||||
# Copy the rest of the app source code (this layer will be invalidated and rebuilt whenever the source code changes)
|
||||
COPY . .
|
||||
|
||||
RUN /opt/poetry/bin/poetry install --no-interaction --no-ansi --with test
|
||||
|
||||
# Set the entrypoint to run tests using Poetry
|
||||
ENTRYPOINT ["/opt/poetry/bin/poetry", "run", "pytest"]
|
||||
|
||||
# Set the default command to run all unit tests
|
||||
CMD ["tests/unit_tests"]
|
||||
@@ -1,3 +0,0 @@
|
||||
include langchain/py.typed
|
||||
include langchain/VERSION
|
||||
include LICENSE
|
||||
75
Makefile
75
Makefile
@@ -1,17 +1,70 @@
|
||||
.PHONY: format lint tests integration_tests
|
||||
.PHONY: all clean format lint test tests test_watch integration_tests docker_tests help extended_tests
|
||||
|
||||
all: help
|
||||
|
||||
coverage:
|
||||
poetry run pytest --cov \
|
||||
--cov-config=.coveragerc \
|
||||
--cov-report xml \
|
||||
--cov-report term-missing:skip-covered
|
||||
|
||||
clean: docs_clean
|
||||
|
||||
docs_build:
|
||||
cd docs && poetry run make html
|
||||
|
||||
docs_clean:
|
||||
cd docs && poetry run make clean
|
||||
|
||||
docs_linkcheck:
|
||||
poetry run linkchecker docs/_build/html/index.html
|
||||
|
||||
format:
|
||||
black .
|
||||
isort .
|
||||
poetry run black .
|
||||
poetry run ruff --select I --fix .
|
||||
|
||||
lint:
|
||||
mypy .
|
||||
black . --check
|
||||
isort . --check
|
||||
flake8 .
|
||||
PYTHON_FILES=.
|
||||
lint: PYTHON_FILES=.
|
||||
lint_diff: PYTHON_FILES=$(shell git diff --name-only --diff-filter=d master | grep -E '\.py$$')
|
||||
|
||||
tests:
|
||||
pytest tests/unit_tests
|
||||
lint lint_diff:
|
||||
poetry run mypy $(PYTHON_FILES)
|
||||
poetry run black $(PYTHON_FILES) --check
|
||||
poetry run ruff .
|
||||
|
||||
TEST_FILE ?= tests/unit_tests/
|
||||
|
||||
test:
|
||||
poetry run pytest --disable-socket --allow-unix-socket $(TEST_FILE)
|
||||
|
||||
tests:
|
||||
poetry run pytest --disable-socket --allow-unix-socket $(TEST_FILE)
|
||||
|
||||
extended_tests:
|
||||
poetry run pytest --disable-socket --allow-unix-socket --only-extended tests/unit_tests
|
||||
|
||||
test_watch:
|
||||
poetry run ptw --now . -- tests/unit_tests
|
||||
|
||||
integration_tests:
|
||||
pytest tests/integration_tests
|
||||
poetry run pytest tests/integration_tests
|
||||
|
||||
docker_tests:
|
||||
docker build -t my-langchain-image:test .
|
||||
docker run --rm my-langchain-image:test
|
||||
|
||||
help:
|
||||
@echo '----'
|
||||
@echo 'coverage - run unit tests and generate coverage report'
|
||||
@echo 'docs_build - build the documentation'
|
||||
@echo 'docs_clean - clean the documentation build artifacts'
|
||||
@echo 'docs_linkcheck - run linkchecker on the documentation'
|
||||
@echo 'format - run code formatters'
|
||||
@echo 'lint - run linters'
|
||||
@echo 'test - run unit tests'
|
||||
@echo 'tests - run unit tests'
|
||||
@echo 'test TEST_FILE=<test_file> - run all tests in file'
|
||||
@echo 'extended_tests - run only extended unit tests'
|
||||
@echo 'test_watch - run unit tests in watch mode'
|
||||
@echo 'integration_tests - run integration tests'
|
||||
@echo 'docker_tests - run unit tests in docker'
|
||||
|
||||
201
README.md
201
README.md
@@ -2,162 +2,95 @@
|
||||
|
||||
⚡ Building applications with LLMs through composability ⚡
|
||||
|
||||
[](https://github.com/hwchase17/langchain/actions/workflows/lint.yml) [](https://github.com/hwchase17/langchain/actions/workflows/test.yml) [](https://opensource.org/licenses/MIT) [](https://twitter.com/langchainai) [](https://discord.gg/6adMQxSpJS)
|
||||
[](https://github.com/hwchase17/langchain/releases)
|
||||
[](https://github.com/hwchase17/langchain/actions/workflows/lint.yml)
|
||||
[](https://github.com/hwchase17/langchain/actions/workflows/test.yml)
|
||||
[](https://github.com/hwchase17/langchain/actions/workflows/linkcheck.yml)
|
||||
[](https://pepy.tech/project/langchain)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
[](https://twitter.com/langchainai)
|
||||
[](https://discord.gg/6adMQxSpJS)
|
||||
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/hwchase17/langchain)
|
||||
[](https://codespaces.new/hwchase17/langchain)
|
||||
[](https://star-history.com/#hwchase17/langchain)
|
||||
[](https://libraries.io/github/hwchase17/langchain)
|
||||
[](https://github.com/hwchase17/langchain/issues)
|
||||
|
||||
|
||||
Looking for the JS/TS version? Check out [LangChain.js](https://github.com/hwchase17/langchainjs).
|
||||
|
||||
**Production Support:** As you move your LangChains into production, we'd love to offer more comprehensive support.
|
||||
Please fill out [this form](https://forms.gle/57d8AmXBYp8PP8tZA) and we'll set up a dedicated support Slack channel.
|
||||
|
||||
## Quick Install
|
||||
|
||||
`pip install langchain`
|
||||
or
|
||||
`conda install langchain -c conda-forge`
|
||||
|
||||
## 🤔 What is this?
|
||||
|
||||
Large language models (LLMs) are emerging as a transformative technology, enabling
|
||||
developers to build applications that they previously could not.
|
||||
But using these LLMs in isolation is often not enough to
|
||||
create a truly powerful app - the real power comes when you are able to
|
||||
combine them with other sources of computation or knowledge.
|
||||
Large language models (LLMs) are emerging as a transformative technology, enabling developers to build applications that they previously could not. However, using these LLMs in isolation is often insufficient for creating a truly powerful app - the real power comes when you can combine them with other sources of computation or knowledge.
|
||||
|
||||
This library is aimed at assisting in the development of those types of applications.
|
||||
It aims to create:
|
||||
This library aims to assist in the development of those types of applications. Common examples of these applications include:
|
||||
|
||||
1. a comprehensive collection of pieces you would ever want to combine
|
||||
2. a flexible interface for combining pieces into a single comprehensive "chain"
|
||||
3. a schema for easily saving and sharing those chains
|
||||
**❓ Question Answering over specific documents**
|
||||
|
||||
## 🔧 Setting up your environment
|
||||
- [Documentation](https://langchain.readthedocs.io/en/latest/use_cases/question_answering.html)
|
||||
- End-to-end Example: [Question Answering over Notion Database](https://github.com/hwchase17/notion-qa)
|
||||
|
||||
Besides the installation of this python package, you will also need to install packages and set environment variables depending on which chains you want to use.
|
||||
**💬 Chatbots**
|
||||
|
||||
Note: the reason these packages are not included in the dependencies by default is that as we imagine scaling this package, we do not want to force dependencies that are not needed.
|
||||
- [Documentation](https://langchain.readthedocs.io/en/latest/use_cases/chatbots.html)
|
||||
- End-to-end Example: [Chat-LangChain](https://github.com/hwchase17/chat-langchain)
|
||||
|
||||
The following use cases require specific installs and api keys:
|
||||
**🤖 Agents**
|
||||
|
||||
- _OpenAI_:
|
||||
- Install requirements with `pip install openai`
|
||||
- Get an OpenAI api key and either set it as an environment variable (`OPENAI_API_KEY`) or pass it to the LLM constructor as `openai_api_key`.
|
||||
- _Cohere_:
|
||||
- Install requirements with `pip install cohere`
|
||||
- Get a Cohere api key and either set it as an environment variable (`COHERE_API_KEY`) or pass it to the LLM constructor as `cohere_api_key`.
|
||||
- _HuggingFace Hub_
|
||||
- Install requirements with `pip install huggingface_hub`
|
||||
- Get a HuggingFace Hub api token and either set it as an environment variable (`HUGGINGFACEHUB_API_TOKEN`) or pass it to the LLM constructor as `huggingfacehub_api_token`.
|
||||
- _SerpAPI_:
|
||||
- Install requirements with `pip install google-search-results`
|
||||
- Get a SerpAPI api key and either set it as an environment variable (`SERPAPI_API_KEY`) or pass it to the LLM constructor as `serpapi_api_key`.
|
||||
- _NatBot_:
|
||||
- Install requirements with `pip install playwright`
|
||||
- _Wikipedia_:
|
||||
- Install requirements with `pip install wikipedia`
|
||||
- _Elasticsearch_:
|
||||
- Install requirements with `pip install elasticsearch`
|
||||
- Set up Elasticsearch backend. If you want to do locally, [this](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/getting-started.html) is a good guide.
|
||||
- _FAISS_:
|
||||
- Install requirements with `pip install faiss` for Python 3.7 and `pip install faiss-cpu` for Python 3.10+.
|
||||
- _Manifest_:
|
||||
- Install requirements with `pip install manifest-ml` (Note: this is only available in Python 3.8+ currently).
|
||||
|
||||
If you are using the `NLTKTextSplitter` or the `SpacyTextSplitter`, you will also need to install the appropriate models. For example, if you want to use the `SpacyTextSplitter`, you will need to install the `en_core_web_sm` model with `python -m spacy download en_core_web_sm`. Similarly, if you want to use the `NLTKTextSplitter`, you will need to install the `punkt` model with `python -m nltk.downloader punkt`.
|
||||
|
||||
## 🚀 What can I do with this
|
||||
|
||||
This project was largely inspired by a few projects seen on Twitter for which we thought it would make sense to have more explicit tooling. A lot of the initial functionality was done in an attempt to recreate those. Those are:
|
||||
|
||||
**[Self-ask-with-search](https://ofir.io/self-ask.pdf)**
|
||||
|
||||
To recreate this paper, use the following code snippet or checkout the [example notebook](https://github.com/hwchase17/langchain/blob/master/examples/self_ask_with_search.ipynb).
|
||||
|
||||
```python
|
||||
from langchain import SelfAskWithSearchChain, OpenAI, SerpAPIChain
|
||||
|
||||
llm = OpenAI(temperature=0)
|
||||
search = SerpAPIChain()
|
||||
|
||||
self_ask_with_search = SelfAskWithSearchChain(llm=llm, search_chain=search)
|
||||
|
||||
self_ask_with_search.run("What is the hometown of the reigning men's U.S. Open champion?")
|
||||
```
|
||||
|
||||
**[LLM Math](https://twitter.com/amasad/status/1568824744367259648?s=20&t=-7wxpXBJinPgDuyHLouP1w)**
|
||||
|
||||
To recreate this example, use the following code snippet or check out the [example notebook](https://github.com/hwchase17/langchain/blob/master/examples/llm_math.ipynb).
|
||||
|
||||
```python
|
||||
from langchain import OpenAI, LLMMathChain
|
||||
|
||||
llm = OpenAI(temperature=0)
|
||||
llm_math = LLMMathChain(llm=llm)
|
||||
|
||||
llm_math.run("How many of the integers between 0 and 99 inclusive are divisible by 8?")
|
||||
```
|
||||
|
||||
**Generic Prompting**
|
||||
|
||||
You can also use this for simple prompting pipelines, as in the below example and this [example notebook](https://github.com/hwchase17/langchain/blob/master/examples/simple_prompts.ipynb).
|
||||
|
||||
```python
|
||||
from langchain import Prompt, OpenAI, LLMChain
|
||||
|
||||
template = """Question: {question}
|
||||
|
||||
Answer: Let's think step by step."""
|
||||
prompt = Prompt(template=template, input_variables=["question"])
|
||||
llm = OpenAI(temperature=0)
|
||||
llm_chain = LLMChain(prompt=prompt, llm=llm)
|
||||
|
||||
question = "What NFL team won the Super Bowl in the year Justin Bieber was born?"
|
||||
|
||||
llm_chain.predict(question=question)
|
||||
```
|
||||
|
||||
**Embed & Search Documents**
|
||||
|
||||
We support two vector databases to store and search embeddings -- FAISS and Elasticsearch. Here's a code snippet showing how to use FAISS to store embeddings and search for text similar to a query. Both database backends are featured in this [example notebook](https://github.com/hwchase17/langchain/blob/master/examples/embeddings.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.embeddings.openai import OpenAIEmbeddings
|
||||
from langchain.faiss import FAISS
|
||||
from langchain.text_splitter import CharacterTextSplitter
|
||||
|
||||
with open('state_of_the_union.txt') as f:
|
||||
state_of_the_union = f.read()
|
||||
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
|
||||
texts = text_splitter.split_text(state_of_the_union)
|
||||
|
||||
embeddings = OpenAIEmbeddings()
|
||||
|
||||
docsearch = FAISS.from_texts(texts, embeddings)
|
||||
|
||||
query = "What did the president say about Ketanji Brown Jackson"
|
||||
docs = docsearch.similarity_search(query)
|
||||
```
|
||||
- [Documentation](https://langchain.readthedocs.io/en/latest/modules/agents.html)
|
||||
- End-to-end Example: [GPT+WolframAlpha](https://huggingface.co/spaces/JavaFXpert/Chat-GPT-LangChain)
|
||||
|
||||
## 📖 Documentation
|
||||
|
||||
The above examples are probably the most user friendly documentation that exists,
|
||||
but full API docs can be found [here](https://langchain.readthedocs.io/en/latest/?).
|
||||
Please see [here](https://langchain.readthedocs.io/en/latest/?) for full documentation on:
|
||||
|
||||
## 🤖 Developer Guide
|
||||
- Getting started (installation, setting up the environment, simple examples)
|
||||
- How-To examples (demos, integrations, helper functions)
|
||||
- Reference (full API docs)
|
||||
- Resources (high-level explanation of core concepts)
|
||||
|
||||
To begin developing on this project, first clone to the repo locally.
|
||||
To install requirements, run `pip install -r requirements.txt`.
|
||||
This will install all requirements for running the package, examples, linting, formatting, and tests.
|
||||
## 🚀 What can this help with?
|
||||
|
||||
Formatting for this project is a combination of [Black](https://black.readthedocs.io/en/stable/) and [isort](https://pycqa.github.io/isort/).
|
||||
To run formatting for this project, run `make format`.
|
||||
There are six main areas that LangChain is designed to help with.
|
||||
These are, in increasing order of complexity:
|
||||
|
||||
Linting for this project is a combination of [Black](https://black.readthedocs.io/en/stable/), [isort](https://pycqa.github.io/isort/), [flake8](https://flake8.pycqa.org/en/latest/), and [mypy](http://mypy-lang.org/).
|
||||
To run linting for this project, run `make lint`.
|
||||
We recognize linting can be annoying - if you do not want to do it, please contact a project maintainer and they can help you with it. We do not want this to be a blocker for good code getting contributed.
|
||||
**📃 LLMs and Prompts:**
|
||||
|
||||
Unit tests cover modular logic that does not require calls to outside apis.
|
||||
To run unit tests, run `make tests`.
|
||||
If you add new logic, please add a unit test.
|
||||
This includes prompt management, prompt optimization, a generic interface for all LLMs, and common utilities for working with LLMs.
|
||||
|
||||
Integration tests cover logic that requires making calls to outside APIs (often integration with other services).
|
||||
To run integration tests, run `make integration_tests`.
|
||||
If you add support for a new external API, please add a new integration test.
|
||||
**🔗 Chains:**
|
||||
|
||||
If you are adding a Jupyter notebook example, you can run `pip install -e .` to build the langchain package from your local changes, so your new logic can be imported into the notebook.
|
||||
Chains go beyond a single LLM call and involve sequences of calls (whether to an LLM or a different utility). LangChain provides a standard interface for chains, lots of integrations with other tools, and end-to-end chains for common applications.
|
||||
|
||||
Docs are largely autogenerated by [sphinx](https://www.sphinx-doc.org/en/master/) from the code.
|
||||
For that reason, we ask that you add good documentation to all classes and methods.
|
||||
Similar to linting, we recognize documentation can be annoying - if you do not want to do it, please contact a project maintainer and they can help you with it. We do not want this to be a blocker for good code getting contributed.
|
||||
**📚 Data Augmented Generation:**
|
||||
|
||||
Data Augmented Generation involves specific types of chains that first interact with an external data source to fetch data for use in the generation step. Examples include summarization of long pieces of text and question/answering over specific data sources.
|
||||
|
||||
**🤖 Agents:**
|
||||
|
||||
Agents involve an LLM making decisions about which Actions to take, taking that Action, seeing an Observation, and repeating that until done. LangChain provides a standard interface for agents, a selection of agents to choose from, and examples of end-to-end agents.
|
||||
|
||||
**🧠 Memory:**
|
||||
|
||||
Memory refers to persisting state between calls of a chain/agent. LangChain provides a standard interface for memory, a collection of memory implementations, and examples of chains/agents that use memory.
|
||||
|
||||
**🧐 Evaluation:**
|
||||
|
||||
[BETA] Generative models are notoriously hard to evaluate with traditional metrics. One new way of evaluating them is using language models themselves to do the evaluation. LangChain provides some prompts/chains for assisting in this.
|
||||
|
||||
For more information on these concepts, please see our [full documentation](https://langchain.readthedocs.io/en/latest/).
|
||||
|
||||
## 💁 Contributing
|
||||
|
||||
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
|
||||
|
||||
For detailed information on how to contribute, see [here](.github/CONTRIBUTING.md).
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
# You can set these variables from the command line, and also
|
||||
# from the environment for the first two.
|
||||
SPHINXOPTS ?=
|
||||
SPHINXOPTS ?=
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
SPHINXAUTOBUILD ?= sphinx-autobuild
|
||||
SOURCEDIR = .
|
||||
|
||||
BIN
docs/_static/ApifyActors.png
vendored
Normal file
BIN
docs/_static/ApifyActors.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 559 KiB |
BIN
docs/_static/DataberryDashboard.png
vendored
Normal file
BIN
docs/_static/DataberryDashboard.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 157 KiB |
BIN
docs/_static/HeliconeDashboard.png
vendored
Normal file
BIN
docs/_static/HeliconeDashboard.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 235 KiB |
BIN
docs/_static/HeliconeKeys.png
vendored
Normal file
BIN
docs/_static/HeliconeKeys.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 148 KiB |
BIN
docs/_static/MetalDash.png
vendored
Normal file
BIN
docs/_static/MetalDash.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 MiB |
17
docs/_static/css/custom.css
vendored
Normal file
17
docs/_static/css/custom.css
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
pre {
|
||||
white-space: break-spaces;
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.container,
|
||||
.container-lg,
|
||||
.container-md,
|
||||
.container-sm,
|
||||
.container-xl {
|
||||
max-width: 2560px !important;
|
||||
}
|
||||
}
|
||||
|
||||
#my-component-root *, #headlessui-portal-root * {
|
||||
z-index: 10000;
|
||||
}
|
||||
57
docs/_static/js/mendablesearch.js
vendored
Normal file
57
docs/_static/js/mendablesearch.js
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// Load the external dependencies
|
||||
function loadScript(src, onLoadCallback) {
|
||||
const script = document.createElement('script');
|
||||
script.src = src;
|
||||
script.onload = onLoadCallback;
|
||||
document.head.appendChild(script);
|
||||
}
|
||||
|
||||
function createRootElement() {
|
||||
const rootElement = document.createElement('div');
|
||||
rootElement.id = 'my-component-root';
|
||||
document.body.appendChild(rootElement);
|
||||
return rootElement;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function initializeMendable() {
|
||||
const rootElement = createRootElement();
|
||||
const { MendableFloatingButton } = Mendable;
|
||||
|
||||
|
||||
const iconSpan1 = React.createElement('span', {
|
||||
}, '🦜');
|
||||
|
||||
const iconSpan2 = React.createElement('span', {
|
||||
}, '🔗');
|
||||
|
||||
const icon = React.createElement('p', {
|
||||
style: { color: '#ffffff', fontSize: '22px',width: '48px', height: '48px', margin: '0px', padding: '0px', display: 'flex', alignItems: 'center', justifyContent: 'center', textAlign: 'center' },
|
||||
}, [iconSpan1, iconSpan2]);
|
||||
|
||||
const mendableFloatingButton = React.createElement(
|
||||
MendableFloatingButton,
|
||||
{
|
||||
style: { darkMode: false, accentColor: '#010810' },
|
||||
floatingButtonStyle: { color: '#ffffff', backgroundColor: '#010810' },
|
||||
anon_key: '82842b36-3ea6-49b2-9fb8-52cfc4bde6bf', // Mendable Search Public ANON key, ok to be public
|
||||
cmdShortcutKey:'j',
|
||||
messageSettings: {
|
||||
openSourcesInNewTab: false,
|
||||
prettySources: true // Prettify the sources displayed now
|
||||
},
|
||||
icon: icon,
|
||||
}
|
||||
);
|
||||
|
||||
ReactDOM.render(mendableFloatingButton, rootElement);
|
||||
}
|
||||
|
||||
loadScript('https://unpkg.com/react@17/umd/react.production.min.js', () => {
|
||||
loadScript('https://unpkg.com/react-dom@17/umd/react-dom.production.min.js', () => {
|
||||
loadScript('https://unpkg.com/@mendable/search@0.0.102/dist/umd/mendable.min.js', initializeMendable);
|
||||
});
|
||||
});
|
||||
});
|
||||
137
docs/additional_resources/deploy_llms.rst
Normal file
137
docs/additional_resources/deploy_llms.rst
Normal file
@@ -0,0 +1,137 @@
|
||||
|
||||
===========================
|
||||
Deploying LLMs in Production
|
||||
===========================
|
||||
|
||||
In today's fast-paced technological landscape, the use of Large Language Models (LLMs) is rapidly expanding. As a result, it's crucial for developers to understand how to effectively deploy these models in production environments. LLM interfaces typically fall into two categories:
|
||||
|
||||
- **Case 1: Utilizing External LLM Providers (OpenAI, Anthropic, etc.)**
|
||||
In this scenario, most of the computational burden is handled by the LLM providers, while LangChain simplifies the implementation of business logic around these services. This approach includes features such as prompt templating, chat message generation, caching, vector embedding database creation, preprocessing, etc.
|
||||
|
||||
- **Case 2: Self-hosted Open-Source Models**
|
||||
Alternatively, developers can opt to use smaller, yet comparably capable, self-hosted open-source LLM models. This approach can significantly decrease costs, latency, and privacy concerns associated with transferring data to external LLM providers.
|
||||
|
||||
Regardless of the framework that forms the backbone of your product, deploying LLM applications comes with its own set of challenges. It's vital to understand the trade-offs and key considerations when evaluating serving frameworks.
|
||||
|
||||
Outline
|
||||
=======
|
||||
|
||||
This guide aims to provide a comprehensive overview of the requirements for deploying LLMs in a production setting, focusing on:
|
||||
|
||||
- `Designing a Robust LLM Application Service <#robust>`_
|
||||
- `Maintaining Cost-Efficiency <#cost>`_
|
||||
- `Ensuring Rapid Iteration <#iteration>`_
|
||||
|
||||
Understanding these components is crucial when assessing serving systems. LangChain integrates with several open-source projects designed to tackle these issues, providing a robust framework for productionizing your LLM applications. Some notable frameworks include:
|
||||
|
||||
- `Ray Serve <../integrations/ray_serve.html>`_
|
||||
- `BentoML <https://github.com/ssheng/BentoChain>`_
|
||||
- `Modal <../integrations/modal.html>`_
|
||||
|
||||
These links will provide further information on each ecosystem, assisting you in finding the best fit for your LLM deployment needs.
|
||||
|
||||
Designing a Robust LLM Application Service
|
||||
===========================================
|
||||
.. _robust:
|
||||
|
||||
When deploying an LLM service in production, it's imperative to provide a seamless user experience free from outages. Achieving 24/7 service availability involves creating and maintaining several sub-systems surrounding your application.
|
||||
|
||||
Monitoring
|
||||
----------
|
||||
|
||||
Monitoring forms an integral part of any system running in a production environment. In the context of LLMs, it is essential to monitor both performance and quality metrics.
|
||||
|
||||
**Performance Metrics:** These metrics provide insights into the efficiency and capacity of your model. Here are some key examples:
|
||||
|
||||
- Query per second (QPS): This measures the number of queries your model processes in a second, offering insights into its utilization.
|
||||
- Latency: This metric quantifies the delay from when your client sends a request to when they receive a response.
|
||||
- Tokens Per Second (TPS): This represents the number of tokens your model can generate in a second.
|
||||
|
||||
**Quality Metrics:** These metrics are typically customized according to the business use-case. For instance, how does the output of your system compare to a baseline, such as a previous version? Although these metrics can be calculated offline, you need to log the necessary data to use them later.
|
||||
|
||||
Fault tolerance
|
||||
---------------
|
||||
|
||||
Your application may encounter errors such as exceptions in your model inference or business logic code, causing failures and disrupting traffic. Other potential issues could arise from the machine running your application, such as unexpected hardware breakdowns or loss of spot-instances during high-demand periods. One way to mitigate these risks is by increasing redundancy through replica scaling and implementing recovery mechanisms for failed replicas. However, model replicas aren't the only potential points of failure. It's essential to build resilience against various failures that could occur at any point in your stack.
|
||||
|
||||
|
||||
Zero down time upgrade
|
||||
----------------------
|
||||
|
||||
System upgrades are often necessary but can result in service disruptions if not handled correctly. One way to prevent downtime during upgrades is by implementing a smooth transition process from the old version to the new one. Ideally, the new version of your LLM service is deployed, and traffic gradually shifts from the old to the new version, maintaining a constant QPS throughout the process.
|
||||
|
||||
|
||||
Load balancing
|
||||
--------------
|
||||
|
||||
Load balancing, in simple terms, is a technique to distribute work evenly across multiple computers, servers, or other resources to optimize the utilization of the system, maximize throughput, minimize response time, and avoid overload of any single resource. Think of it as a traffic officer directing cars (requests) to different roads (servers) so that no single road becomes too congested.
|
||||
|
||||
There are several strategies for load balancing. For example, one common method is the *Round Robin* strategy, where each request is sent to the next server in line, cycling back to the first when all servers have received a request. This works well when all servers are equally capable. However, if some servers are more powerful than others, you might use a *Weighted Round Robin* or *Least Connections* strategy, where more requests are sent to the more powerful servers, or to those currently handling the fewest active requests. Let's imagine you're running a LLM chain. If your application becomes popular, you could have hundreds or even thousands of users asking questions at the same time. If one server gets too busy (high load), the load balancer would direct new requests to another server that is less busy. This way, all your users get a timely response and the system remains stable.
|
||||
|
||||
|
||||
|
||||
Maintaining Cost-Efficiency and Scalability
|
||||
============================================
|
||||
.. _cost:
|
||||
|
||||
Deploying LLM services can be costly, especially when you're handling a large volume of user interactions. Charges by LLM providers are usually based on tokens used, making a chat system inference on these models potentially expensive. However, several strategies can help manage these costs without compromising the quality of the service.
|
||||
|
||||
|
||||
Self-hosting models
|
||||
-------------------
|
||||
|
||||
Several smaller and open-source LLMs are emerging to tackle the issue of reliance on LLM providers. Self-hosting allows you to maintain similar quality to LLM provider models while managing costs. The challenge lies in building a reliable, high-performing LLM serving system on your own machines.
|
||||
|
||||
Resource Management and Auto-Scaling
|
||||
------------------------------------
|
||||
|
||||
Computational logic within your application requires precise resource allocation. For instance, if part of your traffic is served by an OpenAI endpoint and another part by a self-hosted model, it's crucial to allocate suitable resources for each. Auto-scaling—adjusting resource allocation based on traffic—can significantly impact the cost of running your application. This strategy requires a balance between cost and responsiveness, ensuring neither resource over-provisioning nor compromised application responsiveness.
|
||||
|
||||
Utilizing Spot Instances
|
||||
------------------------
|
||||
|
||||
On platforms like AWS, spot instances offer substantial cost savings, typically priced at about a third of on-demand instances. The trade-off is a higher crash rate, necessitating a robust fault-tolerance mechanism for effective use.
|
||||
|
||||
Independent Scaling
|
||||
-------------------
|
||||
|
||||
When self-hosting your models, you should consider independent scaling. For example, if you have two translation models, one fine-tuned for French and another for Spanish, incoming requests might necessitate different scaling requirements for each.
|
||||
|
||||
Batching requests
|
||||
-----------------
|
||||
|
||||
In the context of Large Language Models, batching requests can enhance efficiency by better utilizing your GPU resources. GPUs are inherently parallel processors, designed to handle multiple tasks simultaneously. If you send individual requests to the model, the GPU might not be fully utilized as it's only working on a single task at a time. On the other hand, by batching requests together, you're allowing the GPU to work on multiple tasks at once, maximizing its utilization and improving inference speed. This not only leads to cost savings but can also improve the overall latency of your LLM service.
|
||||
|
||||
|
||||
In summary, managing costs while scaling your LLM services requires a strategic approach. Utilizing self-hosting models, managing resources effectively, employing auto-scaling, using spot instances, independently scaling models, and batching requests are key strategies to consider. Open-source libraries such as Ray Serve and BentoML are designed to deal with these complexities.
|
||||
|
||||
|
||||
|
||||
Ensuring Rapid Iteration
|
||||
========================
|
||||
|
||||
.. _iteration:
|
||||
|
||||
The LLM landscape is evolving at an unprecedented pace, with new libraries and model architectures being introduced constantly. Consequently, it's crucial to avoid tying yourself to a solution specific to one particular framework. This is especially relevant in serving, where changes to your infrastructure can be time-consuming, expensive, and risky. Strive for infrastructure that is not locked into any specific machine learning library or framework, but instead offers a general-purpose, scalable serving layer. Here are some aspects where flexibility plays a key role:
|
||||
|
||||
Model composition
|
||||
-----------------
|
||||
|
||||
Deploying systems like LangChain demands the ability to piece together different models and connect them via logic. Take the example of building a natural language input SQL query engine. Querying an LLM and obtaining the SQL command is only part of the system. You need to extract metadata from the connected database, construct a prompt for the LLM, run the SQL query on an engine, collect and feed back the response to the LLM as the query runs, and present the results to the user. This demonstrates the need to seamlessly integrate various complex components built in Python into a dynamic chain of logical blocks that can be served together.
|
||||
|
||||
Cloud providers
|
||||
---------------
|
||||
|
||||
Many hosted solutions are restricted to a single cloud provider, which can limit your options in today's multi-cloud world. Depending on where your other infrastructure components are built, you might prefer to stick with your chosen cloud provider.
|
||||
|
||||
|
||||
Infrastructure as Code (IaC)
|
||||
---------------------------
|
||||
|
||||
Rapid iteration also involves the ability to recreate your infrastructure quickly and reliably. This is where Infrastructure as Code (IaC) tools like Terraform, CloudFormation, or Kubernetes YAML files come into play. They allow you to define your infrastructure in code files, which can be version controlled and quickly deployed, enabling faster and more reliable iterations.
|
||||
|
||||
|
||||
CI/CD
|
||||
-----
|
||||
|
||||
In a fast-paced environment, implementing CI/CD pipelines can significantly speed up the iteration process. They help automate the testing and deployment of your LLM applications, reducing the risk of errors and enabling faster feedback and iteration.
|
||||
256
docs/additional_resources/model_laboratory.ipynb
Normal file
256
docs/additional_resources/model_laboratory.ipynb
Normal file
@@ -0,0 +1,256 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "920a3c1a",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Model Comparison\n",
|
||||
"\n",
|
||||
"Constructing your language model application will likely involved choosing between many different options of prompts, models, and even chains to use. When doing so, you will want to compare these different options on different inputs in an easy, flexible, and intuitive way. \n",
|
||||
"\n",
|
||||
"LangChain provides the concept of a ModelLaboratory to test out and try different models."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "ab9e95ad",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain import LLMChain, OpenAI, Cohere, HuggingFaceHub, PromptTemplate\n",
|
||||
"from langchain.model_laboratory import ModelLaboratory"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "32cb94e6",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"llms = [\n",
|
||||
" OpenAI(temperature=0), \n",
|
||||
" Cohere(model=\"command-xlarge-20221108\", max_tokens=20, temperature=0), \n",
|
||||
" HuggingFaceHub(repo_id=\"google/flan-t5-xl\", model_kwargs={\"temperature\":1})\n",
|
||||
"]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"id": "14cde09d",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"model_lab = ModelLaboratory.from_llms(llms)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"id": "f186c741",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[1mInput:\u001b[0m\n",
|
||||
"What color is a flamingo?\n",
|
||||
"\n",
|
||||
"\u001b[1mOpenAI\u001b[0m\n",
|
||||
"Params: {'model': 'text-davinci-002', 'temperature': 0.0, 'max_tokens': 256, 'top_p': 1, 'frequency_penalty': 0, 'presence_penalty': 0, 'n': 1, 'best_of': 1}\n",
|
||||
"\u001b[36;1m\u001b[1;3m\n",
|
||||
"\n",
|
||||
"Flamingos are pink.\u001b[0m\n",
|
||||
"\n",
|
||||
"\u001b[1mCohere\u001b[0m\n",
|
||||
"Params: {'model': 'command-xlarge-20221108', 'max_tokens': 20, 'temperature': 0.0, 'k': 0, 'p': 1, 'frequency_penalty': 0, 'presence_penalty': 0}\n",
|
||||
"\u001b[33;1m\u001b[1;3m\n",
|
||||
"\n",
|
||||
"Pink\u001b[0m\n",
|
||||
"\n",
|
||||
"\u001b[1mHuggingFaceHub\u001b[0m\n",
|
||||
"Params: {'repo_id': 'google/flan-t5-xl', 'temperature': 1}\n",
|
||||
"\u001b[38;5;200m\u001b[1;3mpink\u001b[0m\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"model_lab.compare(\"What color is a flamingo?\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "248b652a",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"prompt = PromptTemplate(template=\"What is the capital of {state}?\", input_variables=[\"state\"])\n",
|
||||
"model_lab_with_prompt = ModelLaboratory.from_llms(llms, prompt=prompt)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"id": "f64377ac",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[1mInput:\u001b[0m\n",
|
||||
"New York\n",
|
||||
"\n",
|
||||
"\u001b[1mOpenAI\u001b[0m\n",
|
||||
"Params: {'model': 'text-davinci-002', 'temperature': 0.0, 'max_tokens': 256, 'top_p': 1, 'frequency_penalty': 0, 'presence_penalty': 0, 'n': 1, 'best_of': 1}\n",
|
||||
"\u001b[36;1m\u001b[1;3m\n",
|
||||
"\n",
|
||||
"The capital of New York is Albany.\u001b[0m\n",
|
||||
"\n",
|
||||
"\u001b[1mCohere\u001b[0m\n",
|
||||
"Params: {'model': 'command-xlarge-20221108', 'max_tokens': 20, 'temperature': 0.0, 'k': 0, 'p': 1, 'frequency_penalty': 0, 'presence_penalty': 0}\n",
|
||||
"\u001b[33;1m\u001b[1;3m\n",
|
||||
"\n",
|
||||
"The capital of New York is Albany.\u001b[0m\n",
|
||||
"\n",
|
||||
"\u001b[1mHuggingFaceHub\u001b[0m\n",
|
||||
"Params: {'repo_id': 'google/flan-t5-xl', 'temperature': 1}\n",
|
||||
"\u001b[38;5;200m\u001b[1;3mst john s\u001b[0m\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"model_lab_with_prompt.compare(\"New York\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"id": "54336dbf",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain import SelfAskWithSearchChain, SerpAPIWrapper\n",
|
||||
"\n",
|
||||
"open_ai_llm = OpenAI(temperature=0)\n",
|
||||
"search = SerpAPIWrapper()\n",
|
||||
"self_ask_with_search_openai = SelfAskWithSearchChain(llm=open_ai_llm, search_chain=search, verbose=True)\n",
|
||||
"\n",
|
||||
"cohere_llm = Cohere(temperature=0, model=\"command-xlarge-20221108\")\n",
|
||||
"search = SerpAPIWrapper()\n",
|
||||
"self_ask_with_search_cohere = SelfAskWithSearchChain(llm=cohere_llm, search_chain=search, verbose=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"id": "6a50a9f1",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"chains = [self_ask_with_search_openai, self_ask_with_search_cohere]\n",
|
||||
"names = [str(open_ai_llm), str(cohere_llm)]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"id": "d3549e99",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"model_lab = ModelLaboratory(chains, names=names)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"id": "362f7f57",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[1mInput:\u001b[0m\n",
|
||||
"What is the hometown of the reigning men's U.S. Open champion?\n",
|
||||
"\n",
|
||||
"\u001b[1mOpenAI\u001b[0m\n",
|
||||
"Params: {'model': 'text-davinci-002', 'temperature': 0.0, 'max_tokens': 256, 'top_p': 1, 'frequency_penalty': 0, 'presence_penalty': 0, 'n': 1, 'best_of': 1}\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\u001b[1m> Entering new chain...\u001b[0m\n",
|
||||
"What is the hometown of the reigning men's U.S. Open champion?\n",
|
||||
"Are follow up questions needed here:\u001b[32;1m\u001b[1;3m Yes.\n",
|
||||
"Follow up: Who is the reigning men's U.S. Open champion?\u001b[0m\n",
|
||||
"Intermediate answer: \u001b[33;1m\u001b[1;3mCarlos Alcaraz.\u001b[0m\u001b[32;1m\u001b[1;3m\n",
|
||||
"Follow up: Where is Carlos Alcaraz from?\u001b[0m\n",
|
||||
"Intermediate answer: \u001b[33;1m\u001b[1;3mEl Palmar, Spain.\u001b[0m\u001b[32;1m\u001b[1;3m\n",
|
||||
"So the final answer is: El Palmar, Spain\u001b[0m\n",
|
||||
"\u001b[1m> Finished chain.\u001b[0m\n",
|
||||
"\u001b[36;1m\u001b[1;3m\n",
|
||||
"So the final answer is: El Palmar, Spain\u001b[0m\n",
|
||||
"\n",
|
||||
"\u001b[1mCohere\u001b[0m\n",
|
||||
"Params: {'model': 'command-xlarge-20221108', 'max_tokens': 256, 'temperature': 0.0, 'k': 0, 'p': 1, 'frequency_penalty': 0, 'presence_penalty': 0}\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\u001b[1m> Entering new chain...\u001b[0m\n",
|
||||
"What is the hometown of the reigning men's U.S. Open champion?\n",
|
||||
"Are follow up questions needed here:\u001b[32;1m\u001b[1;3m Yes.\n",
|
||||
"Follow up: Who is the reigning men's U.S. Open champion?\u001b[0m\n",
|
||||
"Intermediate answer: \u001b[33;1m\u001b[1;3mCarlos Alcaraz.\u001b[0m\u001b[32;1m\u001b[1;3m\n",
|
||||
"So the final answer is:\n",
|
||||
"\n",
|
||||
"Carlos Alcaraz\u001b[0m\n",
|
||||
"\u001b[1m> Finished chain.\u001b[0m\n",
|
||||
"\u001b[33;1m\u001b[1;3m\n",
|
||||
"So the final answer is:\n",
|
||||
"\n",
|
||||
"Carlos Alcaraz\u001b[0m\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"model_lab.compare(\"What is the hometown of the reigning men's U.S. Open champion?\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "94159131",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"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.10.9"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
57
docs/additional_resources/tracing.md
Normal file
57
docs/additional_resources/tracing.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# Tracing
|
||||
|
||||
By enabling tracing in your LangChain runs, you’ll be able to more effectively visualize, step through, and debug your chains and agents.
|
||||
|
||||
First, you should install tracing and set up your environment properly.
|
||||
You can use either a locally hosted version of this (uses Docker) or a cloud hosted version (in closed alpha).
|
||||
If you're interested in using the hosted platform, please fill out the form [here](https://forms.gle/tRCEMSeopZf6TE3b6).
|
||||
|
||||
- [Locally Hosted Setup](../tracing/local_installation.md)
|
||||
- [Cloud Hosted Setup](../tracing/hosted_installation.md)
|
||||
|
||||
## Tracing Walkthrough
|
||||
|
||||
When you first access the UI, you should see a page with your tracing sessions.
|
||||
An initial one "default" should already be created for you.
|
||||
A session is just a way to group traces together.
|
||||
If you click on a session, it will take you to a page with no recorded traces that says "No Runs."
|
||||
You can create a new session with the new session form.
|
||||
|
||||

|
||||
|
||||
If we click on the `default` session, we can see that to start we have no traces stored.
|
||||
|
||||

|
||||
|
||||
If we now start running chains and agents with tracing enabled, we will see data show up here.
|
||||
To do so, we can run [this notebook](../tracing/agent_with_tracing.ipynb) as an example.
|
||||
After running it, we will see an initial trace show up.
|
||||
|
||||

|
||||
|
||||
From here we can explore the trace at a high level by clicking on the arrow to show nested runs.
|
||||
We can keep on clicking further and further down to explore deeper and deeper.
|
||||
|
||||

|
||||
|
||||
We can also click on the "Explore" button of the top level run to dive even deeper.
|
||||
Here, we can see the inputs and outputs in full, as well as all the nested traces.
|
||||
|
||||

|
||||
|
||||
We can keep on exploring each of these nested traces in more detail.
|
||||
For example, here is the lowest level trace with the exact inputs/outputs to the LLM.
|
||||
|
||||

|
||||
|
||||
## Changing Sessions
|
||||
|
||||
1. To initially record traces to a session other than `"default"`, you can set the `LANGCHAIN_SESSION` environment variable to the name of the session you want to record to:
|
||||
|
||||
```python
|
||||
import os
|
||||
os.environ["LANGCHAIN_TRACING"] = "true"
|
||||
os.environ["LANGCHAIN_SESSION"] = "my_session" # Make sure this session actually exists. You can create a new session in the UI.
|
||||
```
|
||||
|
||||
2. To switch sessions mid-script or mid-notebook, do NOT set the `LANGCHAIN_SESSION` environment variable. Instead: `langchain.set_tracing_callback_manager(session_name="my_session")`
|
||||
90
docs/additional_resources/youtube.md
Normal file
90
docs/additional_resources/youtube.md
Normal file
@@ -0,0 +1,90 @@
|
||||
# YouTube
|
||||
|
||||
This is a collection of `LangChain` videos on `YouTube`.
|
||||
|
||||
### ⛓️[Official LangChain YouTube channel](https://www.youtube.com/@LangChain)⛓️
|
||||
|
||||
### Introduction to LangChain with Harrison Chase, creator of LangChain
|
||||
- [Building the Future with LLMs, `LangChain`, & `Pinecone`](https://youtu.be/nMniwlGyX-c) by [Pinecone](https://www.youtube.com/@pinecone-io)
|
||||
- [LangChain and Weaviate with Harrison Chase and Bob van Luijt - Weaviate Podcast #36](https://youtu.be/lhby7Ql7hbk) by [Weaviate • Vector Database](https://www.youtube.com/@Weaviate)
|
||||
- [LangChain Demo + Q&A with Harrison Chase](https://youtu.be/zaYTXQFR0_s?t=788) by [Full Stack Deep Learning](https://www.youtube.com/@FullStackDeepLearning)
|
||||
- [LangChain Agents: Build Personal Assistants For Your Data (Q&A with Harrison Chase and Mayo Oshin)](https://youtu.be/gVkF8cwfBLI) by [Chat with data](https://www.youtube.com/@chatwithdata)
|
||||
- ⛓️ [LangChain "Agents in Production" Webinar](https://youtu.be/k8GNCCs16F4) by [LangChain](https://www.youtube.com/@LangChain)
|
||||
|
||||
## Videos (sorted by views)
|
||||
|
||||
- [Building AI LLM Apps with LangChain (and more?) - LIVE STREAM](https://www.youtube.com/live/M-2Cj_2fzWI?feature=share) by [Nicholas Renotte](https://www.youtube.com/@NicholasRenotte)
|
||||
- [First look - `ChatGPT` + `WolframAlpha` (`GPT-3.5` and Wolfram|Alpha via LangChain by James Weaver)](https://youtu.be/wYGbY811oMo) by [Dr Alan D. Thompson](https://www.youtube.com/@DrAlanDThompson)
|
||||
- [LangChain explained - The hottest new Python framework](https://youtu.be/RoR4XJw8wIc) by [AssemblyAI](https://www.youtube.com/@AssemblyAI)
|
||||
- [Chatbot with INFINITE MEMORY using `OpenAI` & `Pinecone` - `GPT-3`, `Embeddings`, `ADA`, `Vector DB`, `Semantic`](https://youtu.be/2xNzB7xq8nk) by [David Shapiro ~ AI](https://www.youtube.com/@DavidShapiroAutomator)
|
||||
- [LangChain for LLMs is... basically just an Ansible playbook](https://youtu.be/X51N9C-OhlE) by [David Shapiro ~ AI](https://www.youtube.com/@DavidShapiroAutomator)
|
||||
- [Build your own LLM Apps with LangChain & `GPT-Index`](https://youtu.be/-75p09zFUJY) by [1littlecoder](https://www.youtube.com/@1littlecoder)
|
||||
- [`BabyAGI` - New System of Autonomous AI Agents with LangChain](https://youtu.be/lg3kJvf1kXo) by [1littlecoder](https://www.youtube.com/@1littlecoder)
|
||||
- [Run `BabyAGI` with Langchain Agents (with Python Code)](https://youtu.be/WosPGHPObx8) by [1littlecoder](https://www.youtube.com/@1littlecoder)
|
||||
- [How to Use Langchain With `Zapier` | Write and Send Email with GPT-3 | OpenAI API Tutorial](https://youtu.be/p9v2-xEa9A0) by [StarMorph AI](https://www.youtube.com/@starmorph)
|
||||
- [Use Your Locally Stored Files To Get Response From GPT - `OpenAI` | Langchain | Python](https://youtu.be/NC1Ni9KS-rk) by [Shweta Lodha](https://www.youtube.com/@shweta-lodha)
|
||||
- [`Langchain JS` | How to Use GPT-3, GPT-4 to Reference your own Data | `OpenAI Embeddings` Intro](https://youtu.be/veV2I-NEjaM) by [StarMorph AI](https://www.youtube.com/@starmorph)
|
||||
- [The easiest way to work with large language models | Learn LangChain in 10min](https://youtu.be/kmbS6FDQh7c) by [Sophia Yang](https://www.youtube.com/@SophiaYangDS)
|
||||
- [4 Autonomous AI Agents: “Westworld” simulation `BabyAGI`, `AutoGPT`, `Camel`, `LangChain`](https://youtu.be/yWbnH6inT_U) by [Sophia Yang](https://www.youtube.com/@SophiaYangDS)
|
||||
- [AI CAN SEARCH THE INTERNET? Langchain Agents + OpenAI ChatGPT](https://youtu.be/J-GL0htqda8) by [tylerwhatsgood](https://www.youtube.com/@tylerwhatsgood)
|
||||
- [Query Your Data with GPT-4 | Embeddings, Vector Databases | Langchain JS Knowledgebase](https://youtu.be/jRnUPUTkZmU) by [StarMorph AI](https://www.youtube.com/@starmorph)
|
||||
- [`Weaviate` + LangChain for LLM apps presented by Erika Cardenas](https://youtu.be/7AGj4Td5Lgw) by [`Weaviate` • Vector Database](https://www.youtube.com/@Weaviate)
|
||||
- [Langchain Overview — How to Use Langchain & `ChatGPT`](https://youtu.be/oYVYIq0lOtI) by [Python In Office](https://www.youtube.com/@pythoninoffice6568)
|
||||
- [Langchain Overview - How to Use Langchain & `ChatGPT`](https://youtu.be/oYVYIq0lOtI) by [Python In Office](https://www.youtube.com/@pythoninoffice6568)
|
||||
- [Custom langchain Agent & Tools with memory. Turn any `Python function` into langchain tool with Gpt 3](https://youtu.be/NIG8lXk0ULg) by [echohive](https://www.youtube.com/@echohive)
|
||||
- [LangChain: Run Language Models Locally - `Hugging Face Models`](https://youtu.be/Xxxuw4_iCzw) by [Prompt Engineering](https://www.youtube.com/@engineerprompt)
|
||||
- [`ChatGPT` with any `YouTube` video using langchain and `chromadb`](https://youtu.be/TQZfB2bzVwU) by [echohive](https://www.youtube.com/@echohive)
|
||||
- [How to Talk to a `PDF` using LangChain and `ChatGPT`](https://youtu.be/v2i1YDtrIwk) by [Automata Learning Lab](https://www.youtube.com/@automatalearninglab)
|
||||
- [Langchain Document Loaders Part 1: Unstructured Files](https://youtu.be/O5C0wfsen98) by [Merk](https://www.youtube.com/@merksworld)
|
||||
- [LangChain - Prompt Templates (what all the best prompt engineers use)](https://youtu.be/1aRu8b0XNOQ) by [Nick Daigler](https://www.youtube.com/@nick_daigs)
|
||||
- [LangChain. Crear aplicaciones Python impulsadas por GPT](https://youtu.be/DkW_rDndts8) by [Jesús Conde](https://www.youtube.com/@0utKast)
|
||||
- [Easiest Way to Use GPT In Your Products | LangChain Basics Tutorial](https://youtu.be/fLy0VenZyGc) by [Rachel Woods](https://www.youtube.com/@therachelwoods)
|
||||
- [`BabyAGI` + `GPT-4` Langchain Agent with Internet Access](https://youtu.be/wx1z_hs5P6E) by [tylerwhatsgood](https://www.youtube.com/@tylerwhatsgood)
|
||||
- [Learning LLM Agents. How does it actually work? LangChain, AutoGPT & OpenAI](https://youtu.be/mb_YAABSplk) by [Arnoldas Kemeklis](https://www.youtube.com/@processusAI)
|
||||
- [Get Started with LangChain in `Node.js`](https://youtu.be/Wxx1KUWJFv4) by [Developers Digest](https://www.youtube.com/@DevelopersDigest)
|
||||
- [LangChain + `OpenAI` tutorial: Building a Q&A system w/ own text data](https://youtu.be/DYOU_Z0hAwo) by [Samuel Chan](https://www.youtube.com/@SamuelChan)
|
||||
- [Langchain + `Zapier` Agent](https://youtu.be/yribLAb-pxA) by [Merk](https://www.youtube.com/@merksworld)
|
||||
- [Connecting the Internet with `ChatGPT` (LLMs) using Langchain And Answers Your Questions](https://youtu.be/9Y0TBC63yZg) by [Kamalraj M M](https://www.youtube.com/@insightbuilder)
|
||||
- [Build More Powerful LLM Applications for Business’s with LangChain (Beginners Guide)](https://youtu.be/sp3-WLKEcBg) by[ No Code Blackbox](https://www.youtube.com/@nocodeblackbox)
|
||||
- ⛓️ [LangFlow LLM Agent Demo for 🦜🔗LangChain](https://youtu.be/zJxDHaWt-6o) by [Cobus Greyling](https://www.youtube.com/@CobusGreylingZA)
|
||||
- ⛓️ [Chatbot Factory: Streamline Python Chatbot Creation with LLMs and Langchain](https://youtu.be/eYer3uzrcuM) by [Finxter](https://www.youtube.com/@CobusGreylingZA)
|
||||
- ⛓️ [LangChain Tutorial - ChatGPT mit eigenen Daten](https://youtu.be/0XDLyY90E2c) by [Coding Crashkurse](https://www.youtube.com/@codingcrashkurse6429)
|
||||
- ⛓️ [Chat with a `CSV` | LangChain Agents Tutorial (Beginners)](https://youtu.be/tjeti5vXWOU) by [GoDataProf](https://www.youtube.com/@godataprof)
|
||||
- ⛓️ [Introdução ao Langchain - #Cortes - Live DataHackers](https://youtu.be/fw8y5VRei5Y) by [Prof. João Gabriel Lima](https://www.youtube.com/@profjoaogabriellima)
|
||||
- ⛓️ [LangChain: Level up `ChatGPT` !? | LangChain Tutorial Part 1](https://youtu.be/vxUGx8aZpDE) by [Code Affinity](https://www.youtube.com/@codeaffinitydev)
|
||||
- ⛓️ [KI schreibt krasses Youtube Skript 😲😳 | LangChain Tutorial Deutsch](https://youtu.be/QpTiXyK1jus) by [SimpleKI](https://www.youtube.com/@simpleki)
|
||||
- ⛓️ [Chat with Audio: Langchain, `Chroma DB`, OpenAI, and `Assembly AI`](https://youtu.be/Kjy7cx1r75g) by [AI Anytime](https://www.youtube.com/@AIAnytime)
|
||||
- ⛓️ [QA over documents with Auto vector index selection with Langchain router chains](https://youtu.be/9G05qybShv8) by [echohive](https://www.youtube.com/@echohive)
|
||||
- ⛓️ [Build your own custom LLM application with `Bubble.io` & Langchain (No Code & Beginner friendly)](https://youtu.be/O7NhQGu1m6c) by [No Code Blackbox](https://www.youtube.com/@nocodeblackbox)
|
||||
- ⛓️ [Simple App to Question Your Docs: Leveraging `Streamlit`, `Hugging Face Spaces`, LangChain, and `Claude`!](https://youtu.be/X4YbNECRr7o) by [Chris Alexiuk](https://www.youtube.com/@chrisalexiuk)
|
||||
- ⛓️ [LANGCHAIN AI- `ConstitutionalChainAI` + Databutton AI ASSISTANT Web App](https://youtu.be/5zIU6_rdJCU) by [Avra](https://www.youtube.com/@Avra_b)
|
||||
- ⛓️ [LANGCHAIN AI AUTONOMOUS AGENT WEB APP - 👶 `BABY AGI` 🤖 with EMAIL AUTOMATION using `DATABUTTON`](https://youtu.be/cvAwOGfeHgw) by [Avra](https://www.youtube.com/@Avra_b)
|
||||
- ⛓️ [The Future of Data Analysis: Using A.I. Models in Data Analysis (LangChain)](https://youtu.be/v_LIcVyg5dk) by [Absent Data](https://www.youtube.com/@absentdata)
|
||||
- ⛓️ [Memory in LangChain | Deep dive (python)](https://youtu.be/70lqvTFh_Yg) by [Eden Marco](https://www.youtube.com/@EdenMarco)
|
||||
- ⛓️ [9 LangChain UseCases | Beginner's Guide | 2023](https://youtu.be/zS8_qosHNMw) by [Data Science Basics](https://www.youtube.com/@datasciencebasics)
|
||||
- ⛓️ [Use Large Language Models in Jupyter Notebook | LangChain | Agents & Indexes](https://youtu.be/JSe11L1a_QQ) by [Abhinaw Tiwari](https://www.youtube.com/@AbhinawTiwariAT)
|
||||
- ⛓️ [How to Talk to Your Langchain Agent | `11 Labs` + `Whisper`](https://youtu.be/N4k459Zw2PU) by [VRSEN](https://www.youtube.com/@vrsen)
|
||||
- ⛓️ [LangChain Deep Dive: 5 FUN AI App Ideas To Build Quickly and Easily](https://youtu.be/mPYEPzLkeks) by [James NoCode](https://www.youtube.com/@jamesnocode)
|
||||
- ⛓️ [BEST OPEN Alternative to OPENAI's EMBEDDINGs for Retrieval QA: LangChain](https://youtu.be/ogEalPMUCSY) by [Prompt Engineering](https://www.youtube.com/@engineerprompt)
|
||||
- ⛓️ [LangChain 101: Models](https://youtu.be/T6c_XsyaNSQ) by [Mckay Wrigley](https://www.youtube.com/@realmckaywrigley)
|
||||
- ⛓️ [LangChain with JavaScript Tutorial #1 | Setup & Using LLMs](https://youtu.be/W3AoeMrg27o) by [Leon van Zyl](https://www.youtube.com/@leonvanzyl)
|
||||
- ⛓️ [LangChain Overview & Tutorial for Beginners: Build Powerful AI Apps Quickly & Easily (ZERO CODE)](https://youtu.be/iI84yym473Q) by [James NoCode](https://www.youtube.com/@jamesnocode)
|
||||
- ⛓️ [LangChain In Action: Real-World Use Case With Step-by-Step Tutorial](https://youtu.be/UO699Szp82M) by [Rabbitmetrics](https://www.youtube.com/@rabbitmetrics)
|
||||
- ⛓️ [Summarizing and Querying Multiple Papers with LangChain](https://youtu.be/p_MQRWH5Y6k) by [Automata Learning Lab](https://www.youtube.com/@automatalearninglab)
|
||||
- ⛓️ [Using Langchain (and `Replit`) through `Tana`, ask `Google`/`Wikipedia`/`Wolfram Alpha` to fill out a table](https://youtu.be/Webau9lEzoI) by [Stian Håklev](https://www.youtube.com/@StianHaklev)
|
||||
- ⛓️ [Langchain PDF App (GUI) | Create a ChatGPT For Your `PDF` in Python](https://youtu.be/wUAUdEw5oxM) by [Alejandro AO - Software & Ai](https://www.youtube.com/@alejandro_ao)
|
||||
- ⛓️ [Auto-GPT with LangChain 🔥 | Create Your Own Personal AI Assistant](https://youtu.be/imDfPmMKEjM) by [Data Science Basics](https://www.youtube.com/@datasciencebasics)
|
||||
- ⛓️ [Create Your OWN Slack AI Assistant with Python & LangChain](https://youtu.be/3jFXRNn2Bu8) by [Dave Ebbelaar](https://www.youtube.com/@daveebbelaar)
|
||||
- ⛓️ [How to Create LOCAL Chatbots with GPT4All and LangChain [Full Guide]](https://youtu.be/4p1Fojur8Zw) by [Liam Ottley](https://www.youtube.com/@LiamOttley)
|
||||
- ⛓️ [Build a `Multilingual PDF` Search App with LangChain, `Cohere` and `Bubble`](https://youtu.be/hOrtuumOrv8) by [Menlo Park Lab](https://www.youtube.com/@menloparklab)
|
||||
- ⛓️ [Building a LangChain Agent (code-free!) Using `Bubble` and `Flowise`](https://youtu.be/jDJIIVWTZDE) by [Menlo Park Lab](https://www.youtube.com/@menloparklab)
|
||||
- ⛓️ [Build a LangChain-based Semantic PDF Search App with No-Code Tools Bubble and Flowise](https://youtu.be/s33v5cIeqA4) by [Menlo Park Lab](https://www.youtube.com/@menloparklab)
|
||||
- ⛓️ [LangChain Memory Tutorial | Building a ChatGPT Clone in Python](https://youtu.be/Cwq91cj2Pnc) by [Alejandro AO - Software & Ai](https://www.youtube.com/@alejandro_ao)
|
||||
- ⛓️ [ChatGPT For Your DATA | Chat with Multiple Documents Using LangChain](https://youtu.be/TeDgIDqQmzs) by [Data Science Basics](https://www.youtube.com/@datasciencebasics)
|
||||
- ⛓️ [`Llama Index`: Chat with Documentation using URL Loader](https://youtu.be/XJRoDEctAwA) by [Merk](https://www.youtube.com/@merksworld)
|
||||
- ⛓️ [Using OpenAI, LangChain, and `Gradio` to Build Custom GenAI Applications](https://youtu.be/1MsmqMg3yUc) by [David Hundley](https://www.youtube.com/@dkhundley)
|
||||
|
||||
|
||||
|
||||
---------------------
|
||||
⛓ icon marks a new video [last update 2023-05-15]
|
||||
47
docs/conf.py
47
docs/conf.py
@@ -15,16 +15,22 @@
|
||||
# import sys
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
import langchain
|
||||
import toml
|
||||
|
||||
with open("../pyproject.toml") as f:
|
||||
data = toml.load(f)
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = "LangChain"
|
||||
copyright = "2022, Harrison Chase"
|
||||
project = "🦜🔗 LangChain"
|
||||
copyright = "2023, Harrison Chase"
|
||||
author = "Harrison Chase"
|
||||
|
||||
version = langchain.__version__
|
||||
release = langchain.__version__
|
||||
version = data["tool"]["poetry"]["version"]
|
||||
release = version
|
||||
|
||||
html_title = project + " " + version
|
||||
html_last_updated_fmt = "%b %d, %Y"
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
@@ -37,9 +43,14 @@ extensions = [
|
||||
"sphinx.ext.autodoc.typehints",
|
||||
"sphinx.ext.autosummary",
|
||||
"sphinx.ext.napoleon",
|
||||
"sphinx.ext.viewcode",
|
||||
"sphinxcontrib.autodoc_pydantic",
|
||||
"myst_parser",
|
||||
"myst_nb",
|
||||
"sphinx_copybutton",
|
||||
"sphinx_panels",
|
||||
"IPython.sphinxext.ipython_console_highlighting",
|
||||
]
|
||||
source_suffix = [".ipynb", ".html", ".md", ".rst"]
|
||||
|
||||
autodoc_pydantic_model_show_json = False
|
||||
autodoc_pydantic_field_list_validators = False
|
||||
@@ -66,8 +77,13 @@ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
# html_theme = "sphinx_typlog_theme"
|
||||
html_theme = "sphinx_book_theme"
|
||||
|
||||
html_theme_options = {
|
||||
"path_to_docs": "docs",
|
||||
"repository_url": "https://github.com/hwchase17/langchain",
|
||||
"use_repository_button": True,
|
||||
}
|
||||
|
||||
html_context = {
|
||||
"display_github": True, # Integrate GitHub
|
||||
@@ -80,4 +96,17 @@ html_context = {
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path: list = []
|
||||
html_static_path = ["_static"]
|
||||
|
||||
# These paths are either relative to html_static_path
|
||||
# or fully qualified paths (eg. https://...)
|
||||
html_css_files = [
|
||||
"css/custom.css",
|
||||
]
|
||||
|
||||
html_js_files = [
|
||||
"js/mendablesearch.js",
|
||||
]
|
||||
|
||||
nb_execution_mode = "off"
|
||||
myst_enable_extensions = ["colon_fence"]
|
||||
|
||||
231
docs/dependents.md
Normal file
231
docs/dependents.md
Normal file
@@ -0,0 +1,231 @@
|
||||
# Dependents
|
||||
|
||||
Dependents stats for `hwchase17/langchain`
|
||||
|
||||
[](https://github.com/hwchase17/langchain/network/dependents)
|
||||
[&message=212&color=informational&logo=slickpic)](https://github.com/hwchase17/langchain/network/dependents)
|
||||
[&message=7272&color=informational&logo=slickpic)](https://github.com/hwchase17/langchain/network/dependents)
|
||||
[&message=19095&color=informational&logo=slickpic)](https://github.com/hwchase17/langchain/network/dependents)
|
||||
|
||||
[update: 2023-06-05; only dependent repositories with Stars > 100]
|
||||
|
||||
|
||||
| Repository | Stars |
|
||||
| :-------- | -----: |
|
||||
|[openai/openai-cookbook](https://github.com/openai/openai-cookbook) | 38024 |
|
||||
|[LAION-AI/Open-Assistant](https://github.com/LAION-AI/Open-Assistant) | 33609 |
|
||||
|[microsoft/TaskMatrix](https://github.com/microsoft/TaskMatrix) | 33136 |
|
||||
|[hpcaitech/ColossalAI](https://github.com/hpcaitech/ColossalAI) | 30032 |
|
||||
|[imartinez/privateGPT](https://github.com/imartinez/privateGPT) | 28094 |
|
||||
|[reworkd/AgentGPT](https://github.com/reworkd/AgentGPT) | 23430 |
|
||||
|[openai/chatgpt-retrieval-plugin](https://github.com/openai/chatgpt-retrieval-plugin) | 17942 |
|
||||
|[jerryjliu/llama_index](https://github.com/jerryjliu/llama_index) | 16697 |
|
||||
|[mindsdb/mindsdb](https://github.com/mindsdb/mindsdb) | 16410 |
|
||||
|[mlflow/mlflow](https://github.com/mlflow/mlflow) | 14517 |
|
||||
|[GaiZhenbiao/ChuanhuChatGPT](https://github.com/GaiZhenbiao/ChuanhuChatGPT) | 10793 |
|
||||
|[databrickslabs/dolly](https://github.com/databrickslabs/dolly) | 10155 |
|
||||
|[openai/evals](https://github.com/openai/evals) | 10076 |
|
||||
|[AIGC-Audio/AudioGPT](https://github.com/AIGC-Audio/AudioGPT) | 8619 |
|
||||
|[logspace-ai/langflow](https://github.com/logspace-ai/langflow) | 8211 |
|
||||
|[imClumsyPanda/langchain-ChatGLM](https://github.com/imClumsyPanda/langchain-ChatGLM) | 8154 |
|
||||
|[PromtEngineer/localGPT](https://github.com/PromtEngineer/localGPT) | 6853 |
|
||||
|[StanGirard/quivr](https://github.com/StanGirard/quivr) | 6830 |
|
||||
|[PipedreamHQ/pipedream](https://github.com/PipedreamHQ/pipedream) | 6520 |
|
||||
|[go-skynet/LocalAI](https://github.com/go-skynet/LocalAI) | 6018 |
|
||||
|[arc53/DocsGPT](https://github.com/arc53/DocsGPT) | 5643 |
|
||||
|[e2b-dev/e2b](https://github.com/e2b-dev/e2b) | 5075 |
|
||||
|[langgenius/dify](https://github.com/langgenius/dify) | 4281 |
|
||||
|[nsarrazin/serge](https://github.com/nsarrazin/serge) | 4228 |
|
||||
|[zauberzeug/nicegui](https://github.com/zauberzeug/nicegui) | 4084 |
|
||||
|[madawei2699/myGPTReader](https://github.com/madawei2699/myGPTReader) | 4039 |
|
||||
|[wenda-LLM/wenda](https://github.com/wenda-LLM/wenda) | 3871 |
|
||||
|[GreyDGL/PentestGPT](https://github.com/GreyDGL/PentestGPT) | 3837 |
|
||||
|[zilliztech/GPTCache](https://github.com/zilliztech/GPTCache) | 3625 |
|
||||
|[csunny/DB-GPT](https://github.com/csunny/DB-GPT) | 3545 |
|
||||
|[gkamradt/langchain-tutorials](https://github.com/gkamradt/langchain-tutorials) | 3404 |
|
||||
|[mmabrouk/chatgpt-wrapper](https://github.com/mmabrouk/chatgpt-wrapper) | 3303 |
|
||||
|[postgresml/postgresml](https://github.com/postgresml/postgresml) | 3052 |
|
||||
|[marqo-ai/marqo](https://github.com/marqo-ai/marqo) | 3014 |
|
||||
|[MineDojo/Voyager](https://github.com/MineDojo/Voyager) | 2945 |
|
||||
|[PrefectHQ/marvin](https://github.com/PrefectHQ/marvin) | 2761 |
|
||||
|[project-baize/baize-chatbot](https://github.com/project-baize/baize-chatbot) | 2673 |
|
||||
|[hwchase17/chat-langchain](https://github.com/hwchase17/chat-langchain) | 2589 |
|
||||
|[whitead/paper-qa](https://github.com/whitead/paper-qa) | 2572 |
|
||||
|[Azure-Samples/azure-search-openai-demo](https://github.com/Azure-Samples/azure-search-openai-demo) | 2366 |
|
||||
|[GerevAI/gerev](https://github.com/GerevAI/gerev) | 2330 |
|
||||
|[OpenGVLab/InternGPT](https://github.com/OpenGVLab/InternGPT) | 2289 |
|
||||
|[ParisNeo/gpt4all-ui](https://github.com/ParisNeo/gpt4all-ui) | 2159 |
|
||||
|[OpenBMB/BMTools](https://github.com/OpenBMB/BMTools) | 2158 |
|
||||
|[guangzhengli/ChatFiles](https://github.com/guangzhengli/ChatFiles) | 2005 |
|
||||
|[h2oai/h2ogpt](https://github.com/h2oai/h2ogpt) | 1939 |
|
||||
|[Farama-Foundation/PettingZoo](https://github.com/Farama-Foundation/PettingZoo) | 1845 |
|
||||
|[OpenGVLab/Ask-Anything](https://github.com/OpenGVLab/Ask-Anything) | 1749 |
|
||||
|[IntelligenzaArtificiale/Free-Auto-GPT](https://github.com/IntelligenzaArtificiale/Free-Auto-GPT) | 1740 |
|
||||
|[Unstructured-IO/unstructured](https://github.com/Unstructured-IO/unstructured) | 1628 |
|
||||
|[hwchase17/notion-qa](https://github.com/hwchase17/notion-qa) | 1607 |
|
||||
|[NVIDIA/NeMo-Guardrails](https://github.com/NVIDIA/NeMo-Guardrails) | 1544 |
|
||||
|[SamurAIGPT/privateGPT](https://github.com/SamurAIGPT/privateGPT) | 1543 |
|
||||
|[paulpierre/RasaGPT](https://github.com/paulpierre/RasaGPT) | 1526 |
|
||||
|[yanqiangmiffy/Chinese-LangChain](https://github.com/yanqiangmiffy/Chinese-LangChain) | 1485 |
|
||||
|[Kav-K/GPTDiscord](https://github.com/Kav-K/GPTDiscord) | 1402 |
|
||||
|[vocodedev/vocode-python](https://github.com/vocodedev/vocode-python) | 1387 |
|
||||
|[Chainlit/chainlit](https://github.com/Chainlit/chainlit) | 1336 |
|
||||
|[lunasec-io/lunasec](https://github.com/lunasec-io/lunasec) | 1323 |
|
||||
|[psychic-api/psychic](https://github.com/psychic-api/psychic) | 1248 |
|
||||
|[agiresearch/OpenAGI](https://github.com/agiresearch/OpenAGI) | 1208 |
|
||||
|[jina-ai/thinkgpt](https://github.com/jina-ai/thinkgpt) | 1193 |
|
||||
|[thomas-yanxin/LangChain-ChatGLM-Webui](https://github.com/thomas-yanxin/LangChain-ChatGLM-Webui) | 1182 |
|
||||
|[ttengwang/Caption-Anything](https://github.com/ttengwang/Caption-Anything) | 1137 |
|
||||
|[jina-ai/dev-gpt](https://github.com/jina-ai/dev-gpt) | 1135 |
|
||||
|[greshake/llm-security](https://github.com/greshake/llm-security) | 1086 |
|
||||
|[keephq/keep](https://github.com/keephq/keep) | 1063 |
|
||||
|[juncongmoo/chatllama](https://github.com/juncongmoo/chatllama) | 1037 |
|
||||
|[richardyc/Chrome-GPT](https://github.com/richardyc/Chrome-GPT) | 1035 |
|
||||
|[visual-openllm/visual-openllm](https://github.com/visual-openllm/visual-openllm) | 997 |
|
||||
|[mmz-001/knowledge_gpt](https://github.com/mmz-001/knowledge_gpt) | 995 |
|
||||
|[jina-ai/langchain-serve](https://github.com/jina-ai/langchain-serve) | 949 |
|
||||
|[irgolic/AutoPR](https://github.com/irgolic/AutoPR) | 936 |
|
||||
|[microsoft/X-Decoder](https://github.com/microsoft/X-Decoder) | 908 |
|
||||
|[poe-platform/api-bot-tutorial](https://github.com/poe-platform/api-bot-tutorial) | 902 |
|
||||
|[peterw/Chat-with-Github-Repo](https://github.com/peterw/Chat-with-Github-Repo) | 875 |
|
||||
|[cirediatpl/FigmaChain](https://github.com/cirediatpl/FigmaChain) | 822 |
|
||||
|[homanp/superagent](https://github.com/homanp/superagent) | 806 |
|
||||
|[seanpixel/Teenage-AGI](https://github.com/seanpixel/Teenage-AGI) | 800 |
|
||||
|[chatarena/chatarena](https://github.com/chatarena/chatarena) | 796 |
|
||||
|[hashintel/hash](https://github.com/hashintel/hash) | 795 |
|
||||
|[SamurAIGPT/Camel-AutoGPT](https://github.com/SamurAIGPT/Camel-AutoGPT) | 786 |
|
||||
|[rlancemartin/auto-evaluator](https://github.com/rlancemartin/auto-evaluator) | 770 |
|
||||
|[corca-ai/EVAL](https://github.com/corca-ai/EVAL) | 769 |
|
||||
|[101dotxyz/GPTeam](https://github.com/101dotxyz/GPTeam) | 755 |
|
||||
|[noahshinn024/reflexion](https://github.com/noahshinn024/reflexion) | 706 |
|
||||
|[eyurtsev/kor](https://github.com/eyurtsev/kor) | 695 |
|
||||
|[cheshire-cat-ai/core](https://github.com/cheshire-cat-ai/core) | 681 |
|
||||
|[e-johnstonn/BriefGPT](https://github.com/e-johnstonn/BriefGPT) | 656 |
|
||||
|[run-llama/llama-lab](https://github.com/run-llama/llama-lab) | 635 |
|
||||
|[griptape-ai/griptape](https://github.com/griptape-ai/griptape) | 583 |
|
||||
|[namuan/dr-doc-search](https://github.com/namuan/dr-doc-search) | 555 |
|
||||
|[getmetal/motorhead](https://github.com/getmetal/motorhead) | 550 |
|
||||
|[kreneskyp/ix](https://github.com/kreneskyp/ix) | 543 |
|
||||
|[hwchase17/chat-your-data](https://github.com/hwchase17/chat-your-data) | 510 |
|
||||
|[Anil-matcha/ChatPDF](https://github.com/Anil-matcha/ChatPDF) | 501 |
|
||||
|[whyiyhw/chatgpt-wechat](https://github.com/whyiyhw/chatgpt-wechat) | 497 |
|
||||
|[SamurAIGPT/ChatGPT-Developer-Plugins](https://github.com/SamurAIGPT/ChatGPT-Developer-Plugins) | 496 |
|
||||
|[microsoft/PodcastCopilot](https://github.com/microsoft/PodcastCopilot) | 492 |
|
||||
|[debanjum/khoj](https://github.com/debanjum/khoj) | 485 |
|
||||
|[akshata29/chatpdf](https://github.com/akshata29/chatpdf) | 485 |
|
||||
|[langchain-ai/langchain-aiplugin](https://github.com/langchain-ai/langchain-aiplugin) | 462 |
|
||||
|[jina-ai/agentchain](https://github.com/jina-ai/agentchain) | 460 |
|
||||
|[alexanderatallah/window.ai](https://github.com/alexanderatallah/window.ai) | 457 |
|
||||
|[yeagerai/yeagerai-agent](https://github.com/yeagerai/yeagerai-agent) | 451 |
|
||||
|[mckaywrigley/repo-chat](https://github.com/mckaywrigley/repo-chat) | 446 |
|
||||
|[michaelthwan/searchGPT](https://github.com/michaelthwan/searchGPT) | 446 |
|
||||
|[mpaepper/content-chatbot](https://github.com/mpaepper/content-chatbot) | 441 |
|
||||
|[freddyaboulton/gradio-tools](https://github.com/freddyaboulton/gradio-tools) | 439 |
|
||||
|[ruoccofabrizio/azure-open-ai-embeddings-qna](https://github.com/ruoccofabrizio/azure-open-ai-embeddings-qna) | 429 |
|
||||
|[StevenGrove/GPT4Tools](https://github.com/StevenGrove/GPT4Tools) | 422 |
|
||||
|[jonra1993/fastapi-alembic-sqlmodel-async](https://github.com/jonra1993/fastapi-alembic-sqlmodel-async) | 407 |
|
||||
|[msoedov/langcorn](https://github.com/msoedov/langcorn) | 405 |
|
||||
|[amosjyng/langchain-visualizer](https://github.com/amosjyng/langchain-visualizer) | 395 |
|
||||
|[ajndkr/lanarky](https://github.com/ajndkr/lanarky) | 384 |
|
||||
|[mtenenholtz/chat-twitter](https://github.com/mtenenholtz/chat-twitter) | 376 |
|
||||
|[steamship-core/steamship-langchain](https://github.com/steamship-core/steamship-langchain) | 371 |
|
||||
|[langchain-ai/auto-evaluator](https://github.com/langchain-ai/auto-evaluator) | 365 |
|
||||
|[xuwenhao/geektime-ai-course](https://github.com/xuwenhao/geektime-ai-course) | 358 |
|
||||
|[continuum-llms/chatgpt-memory](https://github.com/continuum-llms/chatgpt-memory) | 357 |
|
||||
|[opentensor/bittensor](https://github.com/opentensor/bittensor) | 347 |
|
||||
|[showlab/VLog](https://github.com/showlab/VLog) | 345 |
|
||||
|[daodao97/chatdoc](https://github.com/daodao97/chatdoc) | 345 |
|
||||
|[logan-markewich/llama_index_starter_pack](https://github.com/logan-markewich/llama_index_starter_pack) | 332 |
|
||||
|[poe-platform/poe-protocol](https://github.com/poe-platform/poe-protocol) | 320 |
|
||||
|[explosion/spacy-llm](https://github.com/explosion/spacy-llm) | 312 |
|
||||
|[andylokandy/gpt-4-search](https://github.com/andylokandy/gpt-4-search) | 311 |
|
||||
|[alejandro-ao/langchain-ask-pdf](https://github.com/alejandro-ao/langchain-ask-pdf) | 310 |
|
||||
|[jupyterlab/jupyter-ai](https://github.com/jupyterlab/jupyter-ai) | 294 |
|
||||
|[BlackHC/llm-strategy](https://github.com/BlackHC/llm-strategy) | 283 |
|
||||
|[itamargol/openai](https://github.com/itamargol/openai) | 281 |
|
||||
|[momegas/megabots](https://github.com/momegas/megabots) | 279 |
|
||||
|[personoids/personoids-lite](https://github.com/personoids/personoids-lite) | 277 |
|
||||
|[yvann-hub/Robby-chatbot](https://github.com/yvann-hub/Robby-chatbot) | 267 |
|
||||
|[Anil-matcha/Website-to-Chatbot](https://github.com/Anil-matcha/Website-to-Chatbot) | 266 |
|
||||
|[Cheems-Seminar/grounded-segment-any-parts](https://github.com/Cheems-Seminar/grounded-segment-any-parts) | 260 |
|
||||
|[sullivan-sean/chat-langchainjs](https://github.com/sullivan-sean/chat-langchainjs) | 248 |
|
||||
|[bborn/howdoi.ai](https://github.com/bborn/howdoi.ai) | 245 |
|
||||
|[daveebbelaar/langchain-experiments](https://github.com/daveebbelaar/langchain-experiments) | 240 |
|
||||
|[MagnivOrg/prompt-layer-library](https://github.com/MagnivOrg/prompt-layer-library) | 237 |
|
||||
|[ur-whitelab/exmol](https://github.com/ur-whitelab/exmol) | 234 |
|
||||
|[conceptofmind/toolformer](https://github.com/conceptofmind/toolformer) | 234 |
|
||||
|[recalign/RecAlign](https://github.com/recalign/RecAlign) | 226 |
|
||||
|[OpenBMB/AgentVerse](https://github.com/OpenBMB/AgentVerse) | 220 |
|
||||
|[alvarosevilla95/autolang](https://github.com/alvarosevilla95/autolang) | 219 |
|
||||
|[JohnSnowLabs/nlptest](https://github.com/JohnSnowLabs/nlptest) | 216 |
|
||||
|[kaleido-lab/dolphin](https://github.com/kaleido-lab/dolphin) | 215 |
|
||||
|[truera/trulens](https://github.com/truera/trulens) | 208 |
|
||||
|[NimbleBoxAI/ChainFury](https://github.com/NimbleBoxAI/ChainFury) | 208 |
|
||||
|[airobotlab/KoChatGPT](https://github.com/airobotlab/KoChatGPT) | 207 |
|
||||
|[monarch-initiative/ontogpt](https://github.com/monarch-initiative/ontogpt) | 200 |
|
||||
|[paolorechia/learn-langchain](https://github.com/paolorechia/learn-langchain) | 195 |
|
||||
|[shaman-ai/agent-actors](https://github.com/shaman-ai/agent-actors) | 185 |
|
||||
|[Haste171/langchain-chatbot](https://github.com/Haste171/langchain-chatbot) | 184 |
|
||||
|[plchld/InsightFlow](https://github.com/plchld/InsightFlow) | 182 |
|
||||
|[su77ungr/CASALIOY](https://github.com/su77ungr/CASALIOY) | 180 |
|
||||
|[jbrukh/gpt-jargon](https://github.com/jbrukh/gpt-jargon) | 177 |
|
||||
|[benthecoder/ClassGPT](https://github.com/benthecoder/ClassGPT) | 174 |
|
||||
|[billxbf/ReWOO](https://github.com/billxbf/ReWOO) | 170 |
|
||||
|[filip-michalsky/SalesGPT](https://github.com/filip-michalsky/SalesGPT) | 168 |
|
||||
|[hwchase17/langchain-streamlit-template](https://github.com/hwchase17/langchain-streamlit-template) | 168 |
|
||||
|[radi-cho/datasetGPT](https://github.com/radi-cho/datasetGPT) | 164 |
|
||||
|[hardbyte/qabot](https://github.com/hardbyte/qabot) | 164 |
|
||||
|[gia-guar/JARVIS-ChatGPT](https://github.com/gia-guar/JARVIS-ChatGPT) | 158 |
|
||||
|[plastic-labs/tutor-gpt](https://github.com/plastic-labs/tutor-gpt) | 154 |
|
||||
|[yasyf/compress-gpt](https://github.com/yasyf/compress-gpt) | 154 |
|
||||
|[fengyuli-dev/multimedia-gpt](https://github.com/fengyuli-dev/multimedia-gpt) | 154 |
|
||||
|[ethanyanjiali/minChatGPT](https://github.com/ethanyanjiali/minChatGPT) | 153 |
|
||||
|[hwchase17/chroma-langchain](https://github.com/hwchase17/chroma-langchain) | 153 |
|
||||
|[edreisMD/plugnplai](https://github.com/edreisMD/plugnplai) | 148 |
|
||||
|[chakkaradeep/pyCodeAGI](https://github.com/chakkaradeep/pyCodeAGI) | 145 |
|
||||
|[ccurme/yolopandas](https://github.com/ccurme/yolopandas) | 145 |
|
||||
|[shamspias/customizable-gpt-chatbot](https://github.com/shamspias/customizable-gpt-chatbot) | 144 |
|
||||
|[realminchoi/babyagi-ui](https://github.com/realminchoi/babyagi-ui) | 143 |
|
||||
|[PradipNichite/Youtube-Tutorials](https://github.com/PradipNichite/Youtube-Tutorials) | 140 |
|
||||
|[gustavz/DataChad](https://github.com/gustavz/DataChad) | 140 |
|
||||
|[Klingefjord/chatgpt-telegram](https://github.com/Klingefjord/chatgpt-telegram) | 140 |
|
||||
|[Jaseci-Labs/jaseci](https://github.com/Jaseci-Labs/jaseci) | 139 |
|
||||
|[handrew/browserpilot](https://github.com/handrew/browserpilot) | 137 |
|
||||
|[jmpaz/promptlib](https://github.com/jmpaz/promptlib) | 137 |
|
||||
|[SamPink/dev-gpt](https://github.com/SamPink/dev-gpt) | 135 |
|
||||
|[menloparklab/langchain-cohere-qdrant-doc-retrieval](https://github.com/menloparklab/langchain-cohere-qdrant-doc-retrieval) | 135 |
|
||||
|[hirokidaichi/wanna](https://github.com/hirokidaichi/wanna) | 135 |
|
||||
|[steamship-core/vercel-examples](https://github.com/steamship-core/vercel-examples) | 134 |
|
||||
|[pablomarin/GPT-Azure-Search-Engine](https://github.com/pablomarin/GPT-Azure-Search-Engine) | 133 |
|
||||
|[ibiscp/LLM-IMDB](https://github.com/ibiscp/LLM-IMDB) | 133 |
|
||||
|[shauryr/S2QA](https://github.com/shauryr/S2QA) | 133 |
|
||||
|[jerlendds/osintbuddy](https://github.com/jerlendds/osintbuddy) | 132 |
|
||||
|[yuanjie-ai/ChatLLM](https://github.com/yuanjie-ai/ChatLLM) | 132 |
|
||||
|[yasyf/summ](https://github.com/yasyf/summ) | 132 |
|
||||
|[WongSaang/chatgpt-ui-server](https://github.com/WongSaang/chatgpt-ui-server) | 130 |
|
||||
|[peterw/StoryStorm](https://github.com/peterw/StoryStorm) | 127 |
|
||||
|[Teahouse-Studios/akari-bot](https://github.com/Teahouse-Studios/akari-bot) | 126 |
|
||||
|[vaibkumr/prompt-optimizer](https://github.com/vaibkumr/prompt-optimizer) | 125 |
|
||||
|[preset-io/promptimize](https://github.com/preset-io/promptimize) | 124 |
|
||||
|[homanp/vercel-langchain](https://github.com/homanp/vercel-langchain) | 124 |
|
||||
|[petehunt/langchain-github-bot](https://github.com/petehunt/langchain-github-bot) | 123 |
|
||||
|[eunomia-bpf/GPTtrace](https://github.com/eunomia-bpf/GPTtrace) | 118 |
|
||||
|[nicknochnack/LangchainDocuments](https://github.com/nicknochnack/LangchainDocuments) | 116 |
|
||||
|[jiran214/GPT-vup](https://github.com/jiran214/GPT-vup) | 112 |
|
||||
|[rsaryev/talk-codebase](https://github.com/rsaryev/talk-codebase) | 112 |
|
||||
|[zenml-io/zenml-projects](https://github.com/zenml-io/zenml-projects) | 112 |
|
||||
|[microsoft/azure-openai-in-a-day-workshop](https://github.com/microsoft/azure-openai-in-a-day-workshop) | 112 |
|
||||
|[davila7/file-gpt](https://github.com/davila7/file-gpt) | 112 |
|
||||
|[prof-frink-lab/slangchain](https://github.com/prof-frink-lab/slangchain) | 111 |
|
||||
|[aurelio-labs/arxiv-bot](https://github.com/aurelio-labs/arxiv-bot) | 110 |
|
||||
|[fixie-ai/fixie-examples](https://github.com/fixie-ai/fixie-examples) | 108 |
|
||||
|[miaoshouai/miaoshouai-assistant](https://github.com/miaoshouai/miaoshouai-assistant) | 105 |
|
||||
|[flurb18/AgentOoba](https://github.com/flurb18/AgentOoba) | 103 |
|
||||
|[solana-labs/chatgpt-plugin](https://github.com/solana-labs/chatgpt-plugin) | 102 |
|
||||
|[Significant-Gravitas/Auto-GPT-Benchmarks](https://github.com/Significant-Gravitas/Auto-GPT-Benchmarks) | 102 |
|
||||
|[kaarthik108/snowChat](https://github.com/kaarthik108/snowChat) | 100 |
|
||||
|
||||
|
||||
_Generated by [github-dependents-info](https://github.com/nvuillam/github-dependents-info)_
|
||||
|
||||
`github-dependents-info --repo hwchase17/langchain --markdownfile dependents.md --minstars 100 --sort stars`
|
||||
25
docs/ecosystem/baseten.md
Normal file
25
docs/ecosystem/baseten.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Baseten
|
||||
|
||||
Learn how to use LangChain with models deployed on Baseten.
|
||||
|
||||
## Installation and setup
|
||||
|
||||
- Create a [Baseten](https://baseten.co) account and [API key](https://docs.baseten.co/settings/api-keys).
|
||||
- Install the Baseten Python client with `pip install baseten`
|
||||
- Use your API key to authenticate with `baseten login`
|
||||
|
||||
## Invoking a model
|
||||
|
||||
Baseten integrates with LangChain through the LLM module, which provides a standardized and interoperable interface for models that are deployed on your Baseten workspace.
|
||||
|
||||
You can deploy foundation models like WizardLM and Alpaca with one click from the [Baseten model library](https://app.baseten.co/explore/) or if you have your own model, [deploy it with this tutorial](https://docs.baseten.co/deploying-models/deploy).
|
||||
|
||||
In this example, we'll work with WizardLM. [Deploy WizardLM here](https://app.baseten.co/explore/wizardlm) and follow along with the deployed [model's version ID](https://docs.baseten.co/managing-models/manage).
|
||||
|
||||
```python
|
||||
from langchain.llms import Baseten
|
||||
|
||||
wizardlm = Baseten(model="MODEL_VERSION_ID", verbose=True)
|
||||
|
||||
wizardlm("What is the difference between a Wizard and a Sorcerer?")
|
||||
```
|
||||
77
docs/ecosystem/deployments.md
Normal file
77
docs/ecosystem/deployments.md
Normal file
@@ -0,0 +1,77 @@
|
||||
# Deployments
|
||||
|
||||
So, you've created a really cool chain - now what? How do you deploy it and make it easily shareable with the world?
|
||||
|
||||
This section covers several options for that. Note that these options are meant for quick deployment of prototypes and demos, not for production systems. If you need help with the deployment of a production system, please contact us directly.
|
||||
|
||||
What follows is a list of template GitHub repositories designed to be easily forked and modified to use your chain. This list is far from exhaustive, and we are EXTREMELY open to contributions here.
|
||||
|
||||
## [Anyscale](https://www.anyscale.com/model-serving)
|
||||
|
||||
Anyscale is a unified compute platform that makes it easy to develop, deploy, and manage scalable LLM applications in production using Ray.
|
||||
With Anyscale you can scale the most challenging LLM-based workloads and both develop and deploy LLM-based apps on a single compute platform.
|
||||
|
||||
## [Streamlit](https://github.com/hwchase17/langchain-streamlit-template)
|
||||
|
||||
This repo serves as a template for how to deploy a LangChain with Streamlit.
|
||||
It implements a chatbot interface.
|
||||
It also contains instructions for how to deploy this app on the Streamlit platform.
|
||||
|
||||
## [Gradio (on Hugging Face)](https://github.com/hwchase17/langchain-gradio-template)
|
||||
|
||||
This repo serves as a template for how deploy a LangChain with Gradio.
|
||||
It implements a chatbot interface, with a "Bring-Your-Own-Token" approach (nice for not wracking up big bills).
|
||||
It also contains instructions for how to deploy this app on the Hugging Face platform.
|
||||
This is heavily influenced by James Weaver's [excellent examples](https://huggingface.co/JavaFXpert).
|
||||
|
||||
## [Chainlit](https://github.com/Chainlit/cookbook)
|
||||
|
||||
This repo is a cookbook explaining how to visualize and deploy LangChain agents with Chainlit.
|
||||
You create ChatGPT-like UIs with Chainlit. Some of the key features include intermediary steps visualisation, element management & display (images, text, carousel, etc.) as well as cloud deployment.
|
||||
Chainlit [doc](https://docs.chainlit.io/langchain) on the integration with LangChain
|
||||
|
||||
## [Beam](https://github.com/slai-labs/get-beam/tree/main/examples/langchain-question-answering)
|
||||
|
||||
This repo serves as a template for how deploy a LangChain with [Beam](https://beam.cloud).
|
||||
|
||||
It implements a Question Answering app and contains instructions for deploying the app as a serverless REST API.
|
||||
|
||||
## [Vercel](https://github.com/homanp/vercel-langchain)
|
||||
|
||||
A minimal example on how to run LangChain on Vercel using Flask.
|
||||
|
||||
## [FastAPI + Vercel](https://github.com/msoedov/langcorn)
|
||||
|
||||
A minimal example on how to run LangChain on Vercel using FastAPI and LangCorn/Uvicorn.
|
||||
|
||||
## [Kinsta](https://github.com/kinsta/hello-world-langchain)
|
||||
|
||||
A minimal example on how to deploy LangChain to [Kinsta](https://kinsta.com) using Flask.
|
||||
|
||||
## [Fly.io](https://github.com/fly-apps/hello-fly-langchain)
|
||||
|
||||
A minimal example of how to deploy LangChain to [Fly.io](https://fly.io/) using Flask.
|
||||
|
||||
## [Digitalocean App Platform](https://github.com/homanp/digitalocean-langchain)
|
||||
|
||||
A minimal example on how to deploy LangChain to DigitalOcean App Platform.
|
||||
|
||||
## [Google Cloud Run](https://github.com/homanp/gcp-langchain)
|
||||
|
||||
A minimal example on how to deploy LangChain to Google Cloud Run.
|
||||
|
||||
## [SteamShip](https://github.com/steamship-core/steamship-langchain/)
|
||||
|
||||
This repository contains LangChain adapters for Steamship, enabling LangChain developers to rapidly deploy their apps on Steamship. This includes: production-ready endpoints, horizontal scaling across dependencies, persistent storage of app state, multi-tenancy support, etc.
|
||||
|
||||
## [Langchain-serve](https://github.com/jina-ai/langchain-serve)
|
||||
|
||||
This repository allows users to serve local chains and agents as RESTful, gRPC, or WebSocket APIs, thanks to [Jina](https://docs.jina.ai/). Deploy your chains & agents with ease and enjoy independent scaling, serverless and autoscaling APIs, as well as a Streamlit playground on Jina AI Cloud.
|
||||
|
||||
## [BentoML](https://github.com/ssheng/BentoChain)
|
||||
|
||||
This repository provides an example of how to deploy a LangChain application with [BentoML](https://github.com/bentoml/BentoML). BentoML is a framework that enables the containerization of machine learning applications as standard OCI images. BentoML also allows for the automatic generation of OpenAPI and gRPC endpoints. With BentoML, you can integrate models from all popular ML frameworks and deploy them as microservices running on the most optimal hardware and scaling independently.
|
||||
|
||||
## [Databutton](https://databutton.com/home?new-data-app=true)
|
||||
|
||||
These templates serve as examples of how to build, deploy, and share LangChain applications using Databutton. You can create user interfaces with Streamlit, automate tasks by scheduling Python code, and store files and data in the built-in store. Examples include a Chatbot interface with conversational memory, a Personal search engine, and a starter template for LangChain apps. Deploying and sharing is just one click away.
|
||||
20
docs/ecosystem/modelscope.md
Normal file
20
docs/ecosystem/modelscope.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# ModelScope
|
||||
|
||||
This page covers how to use the modelscope ecosystem within LangChain.
|
||||
It is broken into two parts: installation and setup, and then references to specific modelscope wrappers.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
* Install the Python SDK with `pip install modelscope`
|
||||
|
||||
## Wrappers
|
||||
|
||||
### Embeddings
|
||||
|
||||
There exists a modelscope Embeddings wrapper, which you can access with
|
||||
|
||||
```python
|
||||
from langchain.embeddings import ModelScopeEmbeddings
|
||||
```
|
||||
|
||||
For a more detailed walkthrough of this, see [this notebook](../modules/models/text_embedding/examples/modelscope_hub.ipynb)
|
||||
75
docs/getting_started/concepts.md
Normal file
75
docs/getting_started/concepts.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# Concepts
|
||||
|
||||
These are concepts and terminology commonly used when developing LLM applications.
|
||||
It contains reference to external papers or sources where the concept was first introduced,
|
||||
as well as to places in LangChain where the concept is used.
|
||||
|
||||
## Chain of Thought
|
||||
|
||||
`Chain of Thought (CoT)` is a prompting technique used to encourage the model to generate a series of intermediate reasoning steps.
|
||||
A less formal way to induce this behavior is to include “Let’s think step-by-step” in the prompt.
|
||||
|
||||
- [Chain-of-Thought Paper](https://arxiv.org/pdf/2201.11903.pdf)
|
||||
- [Step-by-Step Paper](https://arxiv.org/abs/2112.00114)
|
||||
|
||||
## Action Plan Generation
|
||||
|
||||
`Action Plan Generation` is a prompting technique that uses a language model to generate actions to take.
|
||||
The results of these actions can then be fed back into the language model to generate a subsequent action.
|
||||
|
||||
- [WebGPT Paper](https://arxiv.org/pdf/2112.09332.pdf)
|
||||
- [SayCan Paper](https://say-can.github.io/assets/palm_saycan.pdf)
|
||||
|
||||
## ReAct
|
||||
|
||||
`ReAct` is a prompting technique that combines Chain-of-Thought prompting with action plan generation.
|
||||
This induces the model to think about what action to take, then take it.
|
||||
|
||||
- [Paper](https://arxiv.org/pdf/2210.03629.pdf)
|
||||
- [LangChain Example](../modules/agents/agents/examples/react.ipynb)
|
||||
|
||||
## Self-ask
|
||||
|
||||
`Self-ask` is a prompting method that builds on top of chain-of-thought prompting.
|
||||
In this method, the model explicitly asks itself follow-up questions, which are then answered by an external search engine.
|
||||
|
||||
- [Paper](https://ofir.io/self-ask.pdf)
|
||||
- [LangChain Example](../modules/agents/agents/examples/self_ask_with_search.ipynb)
|
||||
|
||||
## Prompt Chaining
|
||||
|
||||
`Prompt Chaining` is combining multiple LLM calls, with the output of one-step being the input to the next.
|
||||
|
||||
- [PromptChainer Paper](https://arxiv.org/pdf/2203.06566.pdf)
|
||||
- [Language Model Cascades](https://arxiv.org/abs/2207.10342)
|
||||
- [ICE Primer Book](https://primer.ought.org/)
|
||||
- [Socratic Models](https://socraticmodels.github.io/)
|
||||
|
||||
## Memetic Proxy
|
||||
|
||||
`Memetic Proxy` is encouraging the LLM
|
||||
to respond in a certain way framing the discussion in a context that the model knows of and that
|
||||
will result in that type of response.
|
||||
For example, as a conversation between a student and a teacher.
|
||||
|
||||
- [Paper](https://arxiv.org/pdf/2102.07350.pdf)
|
||||
|
||||
## Self Consistency
|
||||
|
||||
`Self Consistency` is a decoding strategy that samples a diverse set of reasoning paths and then selects the most consistent answer.
|
||||
Is most effective when combined with Chain-of-thought prompting.
|
||||
|
||||
- [Paper](https://arxiv.org/pdf/2203.11171.pdf)
|
||||
|
||||
## Inception
|
||||
|
||||
`Inception` is also called `First Person Instruction`.
|
||||
It is encouraging the model to think a certain way by including the start of the model’s response in the prompt.
|
||||
|
||||
- [Example](https://twitter.com/goodside/status/1583262455207460865?s=20&t=8Hz7XBnK1OF8siQrxxCIGQ)
|
||||
|
||||
## MemPrompt
|
||||
|
||||
`MemPrompt` maintains a memory of errors and user feedback, and uses them to prevent repetition of mistakes.
|
||||
|
||||
- [Paper](https://memprompt.com/)
|
||||
500
docs/getting_started/getting_started.md
Normal file
500
docs/getting_started/getting_started.md
Normal file
@@ -0,0 +1,500 @@
|
||||
# Quickstart Guide
|
||||
|
||||
|
||||
This tutorial gives you a quick walkthrough about building an end-to-end language model application with LangChain.
|
||||
|
||||
## Installation
|
||||
|
||||
To get started, install LangChain with the following command:
|
||||
|
||||
```bash
|
||||
pip install langchain
|
||||
# or
|
||||
conda install langchain -c conda-forge
|
||||
```
|
||||
|
||||
|
||||
## Environment Setup
|
||||
|
||||
Using LangChain will usually require integrations with one or more model providers, data stores, apis, etc.
|
||||
|
||||
For this example, we will be using OpenAI's APIs, so we will first need to install their SDK:
|
||||
|
||||
```bash
|
||||
pip install openai
|
||||
```
|
||||
|
||||
We will then need to set the environment variable in the terminal.
|
||||
|
||||
```bash
|
||||
export OPENAI_API_KEY="..."
|
||||
```
|
||||
|
||||
Alternatively, you could do this from inside the Jupyter notebook (or Python script):
|
||||
|
||||
```python
|
||||
import os
|
||||
os.environ["OPENAI_API_KEY"] = "..."
|
||||
```
|
||||
|
||||
If you want to set the API key dynamically, you can use the openai_api_key parameter when initiating OpenAI class—for instance, each user's API key.
|
||||
|
||||
```python
|
||||
from langchain.llms import OpenAI
|
||||
llm = OpenAI(openai_api_key="OPENAI_API_KEY")
|
||||
```
|
||||
|
||||
## Building a Language Model Application: LLMs
|
||||
|
||||
Now that we have installed LangChain and set up our environment, we can start building our language model application.
|
||||
|
||||
LangChain provides many modules that can be used to build language model applications. Modules can be combined to create more complex applications, or be used individually for simple applications.
|
||||
|
||||
|
||||
|
||||
## LLMs: Get predictions from a language model
|
||||
|
||||
The most basic building block of LangChain is calling an LLM on some input.
|
||||
Let's walk through a simple example of how to do this.
|
||||
For this purpose, let's pretend we are building a service that generates a company name based on what the company makes.
|
||||
|
||||
In order to do this, we first need to import the LLM wrapper.
|
||||
|
||||
```python
|
||||
from langchain.llms import OpenAI
|
||||
```
|
||||
|
||||
We can then initialize the wrapper with any arguments.
|
||||
In this example, we probably want the outputs to be MORE random, so we'll initialize it with a HIGH temperature.
|
||||
|
||||
```python
|
||||
llm = OpenAI(temperature=0.9)
|
||||
```
|
||||
|
||||
We can now call it on some input!
|
||||
|
||||
```python
|
||||
text = "What would be a good company name for a company that makes colorful socks?"
|
||||
print(llm(text))
|
||||
```
|
||||
|
||||
```pycon
|
||||
Feetful of Fun
|
||||
```
|
||||
|
||||
For more details on how to use LLMs within LangChain, see the [LLM getting started guide](../modules/models/llms/getting_started.ipynb).
|
||||
|
||||
|
||||
## Prompt Templates: Manage prompts for LLMs
|
||||
|
||||
Calling an LLM is a great first step, but it's just the beginning.
|
||||
Normally when you use an LLM in an application, you are not sending user input directly to the LLM.
|
||||
Instead, you are probably taking user input and constructing a prompt, and then sending that to the LLM.
|
||||
|
||||
For example, in the previous example, the text we passed in was hardcoded to ask for a name for a company that made colorful socks.
|
||||
In this imaginary service, what we would want to do is take only the user input describing what the company does, and then format the prompt with that information.
|
||||
|
||||
This is easy to do with LangChain!
|
||||
|
||||
First lets define the prompt template:
|
||||
|
||||
```python
|
||||
from langchain.prompts import PromptTemplate
|
||||
|
||||
prompt = PromptTemplate(
|
||||
input_variables=["product"],
|
||||
template="What is a good name for a company that makes {product}?",
|
||||
)
|
||||
```
|
||||
|
||||
Let's now see how this works! We can call the `.format` method to format it.
|
||||
|
||||
```python
|
||||
print(prompt.format(product="colorful socks"))
|
||||
```
|
||||
|
||||
```pycon
|
||||
What is a good name for a company that makes colorful socks?
|
||||
```
|
||||
|
||||
|
||||
[For more details, check out the getting started guide for prompts.](../modules/prompts/chat_prompt_template.ipynb)
|
||||
|
||||
|
||||
|
||||
|
||||
## Chains: Combine LLMs and prompts in multi-step workflows
|
||||
|
||||
Up until now, we've worked with the PromptTemplate and LLM primitives by themselves. But of course, a real application is not just one primitive, but rather a combination of them.
|
||||
|
||||
A chain in LangChain is made up of links, which can be either primitives like LLMs or other chains.
|
||||
|
||||
The most core type of chain is an LLMChain, which consists of a PromptTemplate and an LLM.
|
||||
|
||||
Extending the previous example, we can construct an LLMChain which takes user input, formats it with a PromptTemplate, and then passes the formatted response to an LLM.
|
||||
|
||||
```python
|
||||
from langchain.prompts import PromptTemplate
|
||||
from langchain.llms import OpenAI
|
||||
|
||||
llm = OpenAI(temperature=0.9)
|
||||
prompt = PromptTemplate(
|
||||
input_variables=["product"],
|
||||
template="What is a good name for a company that makes {product}?",
|
||||
)
|
||||
```
|
||||
|
||||
We can now create a very simple chain that will take user input, format the prompt with it, and then send it to the LLM:
|
||||
|
||||
```python
|
||||
from langchain.chains import LLMChain
|
||||
chain = LLMChain(llm=llm, prompt=prompt)
|
||||
```
|
||||
|
||||
Now we can run that chain only specifying the product!
|
||||
|
||||
```python
|
||||
chain.run("colorful socks")
|
||||
# -> '\n\nSocktastic!'
|
||||
```
|
||||
|
||||
There we go! There's the first chain - an LLM Chain.
|
||||
This is one of the simpler types of chains, but understanding how it works will set you up well for working with more complex chains.
|
||||
|
||||
[For more details, check out the getting started guide for chains.](../modules/chains/getting_started.ipynb)
|
||||
|
||||
## Agents: Dynamically Call Chains Based on User Input
|
||||
|
||||
So far the chains we've looked at run in a predetermined order.
|
||||
|
||||
Agents no longer do: they use an LLM to determine which actions to take and in what order. An action can either be using a tool and observing its output, or returning to the user.
|
||||
|
||||
When used correctly agents can be extremely powerful. In this tutorial, we show you how to easily use agents through the simplest, highest level API.
|
||||
|
||||
|
||||
In order to load agents, you should understand the following concepts:
|
||||
|
||||
- Tool: A function that performs a specific duty. This can be things like: Google Search, Database lookup, Python REPL, other chains. The interface for a tool is currently a function that is expected to have a string as an input, with a string as an output.
|
||||
- LLM: The language model powering the agent.
|
||||
- Agent: The agent to use. This should be a string that references a support agent class. Because this notebook focuses on the simplest, highest level API, this only covers using the standard supported agents. If you want to implement a custom agent, see the documentation for custom agents (coming soon).
|
||||
|
||||
**Agents**: For a list of supported agents and their specifications, see [here](../modules/agents/getting_started.ipynb).
|
||||
|
||||
**Tools**: For a list of predefined tools and their specifications, see [here](../modules/agents/tools/getting_started.md).
|
||||
|
||||
For this example, you will also need to install the SerpAPI Python package.
|
||||
|
||||
```bash
|
||||
pip install google-search-results
|
||||
```
|
||||
|
||||
And set the appropriate environment variables.
|
||||
|
||||
```python
|
||||
import os
|
||||
os.environ["SERPAPI_API_KEY"] = "..."
|
||||
```
|
||||
|
||||
Now we can get started!
|
||||
|
||||
```python
|
||||
from langchain.agents import load_tools
|
||||
from langchain.agents import initialize_agent
|
||||
from langchain.agents import AgentType
|
||||
from langchain.llms import OpenAI
|
||||
|
||||
# First, let's load the language model we're going to use to control the agent.
|
||||
llm = OpenAI(temperature=0)
|
||||
|
||||
# Next, let's load some tools to use. Note that the `llm-math` tool uses an LLM, so we need to pass that in.
|
||||
tools = load_tools(["serpapi", "llm-math"], llm=llm)
|
||||
|
||||
|
||||
# Finally, let's initialize an agent with the tools, the language model, and the type of agent we want to use.
|
||||
agent = initialize_agent(tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True)
|
||||
|
||||
# Now let's test it out!
|
||||
agent.run("What was the high temperature in SF yesterday in Fahrenheit? What is that number raised to the .023 power?")
|
||||
```
|
||||
|
||||
```pycon
|
||||
> Entering new AgentExecutor chain...
|
||||
I need to find the temperature first, then use the calculator to raise it to the .023 power.
|
||||
Action: Search
|
||||
Action Input: "High temperature in SF yesterday"
|
||||
Observation: San Francisco Temperature Yesterday. Maximum temperature yesterday: 57 °F (at 1:56 pm) Minimum temperature yesterday: 49 °F (at 1:56 am) Average temperature ...
|
||||
Thought: I now have the temperature, so I can use the calculator to raise it to the .023 power.
|
||||
Action: Calculator
|
||||
Action Input: 57^.023
|
||||
Observation: Answer: 1.0974509573251117
|
||||
|
||||
Thought: I now know the final answer
|
||||
Final Answer: The high temperature in SF yesterday in Fahrenheit raised to the .023 power is 1.0974509573251117.
|
||||
|
||||
> Finished chain.
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Memory: Add State to Chains and Agents
|
||||
|
||||
So far, all the chains and agents we've gone through have been stateless. But often, you may want a chain or agent to have some concept of "memory" so that it may remember information about its previous interactions. The clearest and simple example of this is when designing a chatbot - you want it to remember previous messages so it can use context from that to have a better conversation. This would be a type of "short-term memory". On the more complex side, you could imagine a chain/agent remembering key pieces of information over time - this would be a form of "long-term memory". For more concrete ideas on the latter, see this [awesome paper](https://memprompt.com/).
|
||||
|
||||
LangChain provides several specially created chains just for this purpose. This notebook walks through using one of those chains (the `ConversationChain`) with two different types of memory.
|
||||
|
||||
By default, the `ConversationChain` has a simple type of memory that remembers all previous inputs/outputs and adds them to the context that is passed. Let's take a look at using this chain (setting `verbose=True` so we can see the prompt).
|
||||
|
||||
```python
|
||||
from langchain import OpenAI, ConversationChain
|
||||
|
||||
llm = OpenAI(temperature=0)
|
||||
conversation = ConversationChain(llm=llm, verbose=True)
|
||||
|
||||
output = conversation.predict(input="Hi there!")
|
||||
print(output)
|
||||
```
|
||||
|
||||
```pycon
|
||||
> Entering new chain...
|
||||
Prompt after formatting:
|
||||
The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.
|
||||
|
||||
Current conversation:
|
||||
|
||||
Human: Hi there!
|
||||
AI:
|
||||
|
||||
> Finished chain.
|
||||
' Hello! How are you today?'
|
||||
```
|
||||
|
||||
```python
|
||||
output = conversation.predict(input="I'm doing well! Just having a conversation with an AI.")
|
||||
print(output)
|
||||
```
|
||||
|
||||
```pycon
|
||||
> Entering new chain...
|
||||
Prompt after formatting:
|
||||
The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.
|
||||
|
||||
Current conversation:
|
||||
|
||||
Human: Hi there!
|
||||
AI: Hello! How are you today?
|
||||
Human: I'm doing well! Just having a conversation with an AI.
|
||||
AI:
|
||||
|
||||
> Finished chain.
|
||||
" That's great! What would you like to talk about?"
|
||||
```
|
||||
|
||||
## Building a Language Model Application: Chat Models
|
||||
|
||||
Similarly, you can use chat models instead of LLMs. Chat models are a variation on language models. While chat models use language models under the hood, the interface they expose is a bit different: rather than expose a "text in, text out" API, they expose an interface where "chat messages" are the inputs and outputs.
|
||||
|
||||
Chat model APIs are fairly new, so we are still figuring out the correct abstractions.
|
||||
|
||||
## Get Message Completions from a Chat Model
|
||||
|
||||
You can get chat completions by passing one or more messages to the chat model. The response will be a message. The types of messages currently supported in LangChain are `AIMessage`, `HumanMessage`, `SystemMessage`, and `ChatMessage` -- `ChatMessage` takes in an arbitrary role parameter. Most of the time, you'll just be dealing with `HumanMessage`, `AIMessage`, and `SystemMessage`.
|
||||
|
||||
```python
|
||||
from langchain.chat_models import ChatOpenAI
|
||||
from langchain.schema import (
|
||||
AIMessage,
|
||||
HumanMessage,
|
||||
SystemMessage
|
||||
)
|
||||
|
||||
chat = ChatOpenAI(temperature=0)
|
||||
```
|
||||
|
||||
You can get completions by passing in a single message.
|
||||
|
||||
```python
|
||||
chat([HumanMessage(content="Translate this sentence from English to French. I love programming.")])
|
||||
# -> AIMessage(content="J'aime programmer.", additional_kwargs={})
|
||||
```
|
||||
|
||||
You can also pass in multiple messages for OpenAI's gpt-3.5-turbo and gpt-4 models.
|
||||
|
||||
```python
|
||||
messages = [
|
||||
SystemMessage(content="You are a helpful assistant that translates English to French."),
|
||||
HumanMessage(content="I love programming.")
|
||||
]
|
||||
chat(messages)
|
||||
# -> AIMessage(content="J'aime programmer.", additional_kwargs={})
|
||||
```
|
||||
|
||||
You can go one step further and generate completions for multiple sets of messages using `generate`. This returns an `LLMResult` with an additional `message` parameter:
|
||||
```python
|
||||
batch_messages = [
|
||||
[
|
||||
SystemMessage(content="You are a helpful assistant that translates English to French."),
|
||||
HumanMessage(content="I love programming.")
|
||||
],
|
||||
[
|
||||
SystemMessage(content="You are a helpful assistant that translates English to French."),
|
||||
HumanMessage(content="I love artificial intelligence.")
|
||||
],
|
||||
]
|
||||
result = chat.generate(batch_messages)
|
||||
result
|
||||
# -> LLMResult(generations=[[ChatGeneration(text="J'aime programmer.", generation_info=None, message=AIMessage(content="J'aime programmer.", additional_kwargs={}))], [ChatGeneration(text="J'aime l'intelligence artificielle.", generation_info=None, message=AIMessage(content="J'aime l'intelligence artificielle.", additional_kwargs={}))]], llm_output={'token_usage': {'prompt_tokens': 57, 'completion_tokens': 20, 'total_tokens': 77}})
|
||||
```
|
||||
|
||||
You can recover things like token usage from this LLMResult:
|
||||
```
|
||||
result.llm_output['token_usage']
|
||||
# -> {'prompt_tokens': 57, 'completion_tokens': 20, 'total_tokens': 77}
|
||||
```
|
||||
|
||||
|
||||
## Chat Prompt Templates
|
||||
Similar to LLMs, you can make use of templating by using a `MessagePromptTemplate`. You can build a `ChatPromptTemplate` from one or more `MessagePromptTemplate`s. You can use `ChatPromptTemplate`'s `format_prompt` -- this returns a `PromptValue`, which you can convert to a string or `Message` object, depending on whether you want to use the formatted value as input to an llm or chat model.
|
||||
|
||||
For convenience, there is a `from_template` method exposed on the template. If you were to use this template, this is what it would look like:
|
||||
|
||||
```python
|
||||
from langchain.chat_models import ChatOpenAI
|
||||
from langchain.prompts.chat import (
|
||||
ChatPromptTemplate,
|
||||
SystemMessagePromptTemplate,
|
||||
HumanMessagePromptTemplate,
|
||||
)
|
||||
|
||||
chat = ChatOpenAI(temperature=0)
|
||||
|
||||
template = "You are a helpful assistant that translates {input_language} to {output_language}."
|
||||
system_message_prompt = SystemMessagePromptTemplate.from_template(template)
|
||||
human_template = "{text}"
|
||||
human_message_prompt = HumanMessagePromptTemplate.from_template(human_template)
|
||||
|
||||
chat_prompt = ChatPromptTemplate.from_messages([system_message_prompt, human_message_prompt])
|
||||
|
||||
# get a chat completion from the formatted messages
|
||||
chat(chat_prompt.format_prompt(input_language="English", output_language="French", text="I love programming.").to_messages())
|
||||
# -> AIMessage(content="J'aime programmer.", additional_kwargs={})
|
||||
```
|
||||
|
||||
## Chains with Chat Models
|
||||
The `LLMChain` discussed in the above section can be used with chat models as well:
|
||||
|
||||
```python
|
||||
from langchain.chat_models import ChatOpenAI
|
||||
from langchain import LLMChain
|
||||
from langchain.prompts.chat import (
|
||||
ChatPromptTemplate,
|
||||
SystemMessagePromptTemplate,
|
||||
HumanMessagePromptTemplate,
|
||||
)
|
||||
|
||||
chat = ChatOpenAI(temperature=0)
|
||||
|
||||
template = "You are a helpful assistant that translates {input_language} to {output_language}."
|
||||
system_message_prompt = SystemMessagePromptTemplate.from_template(template)
|
||||
human_template = "{text}"
|
||||
human_message_prompt = HumanMessagePromptTemplate.from_template(human_template)
|
||||
chat_prompt = ChatPromptTemplate.from_messages([system_message_prompt, human_message_prompt])
|
||||
|
||||
chain = LLMChain(llm=chat, prompt=chat_prompt)
|
||||
chain.run(input_language="English", output_language="French", text="I love programming.")
|
||||
# -> "J'aime programmer."
|
||||
```
|
||||
|
||||
## Agents with Chat Models
|
||||
Agents can also be used with chat models, you can initialize one using `AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION` as the agent type.
|
||||
|
||||
```python
|
||||
from langchain.agents import load_tools
|
||||
from langchain.agents import initialize_agent
|
||||
from langchain.agents import AgentType
|
||||
from langchain.chat_models import ChatOpenAI
|
||||
from langchain.llms import OpenAI
|
||||
|
||||
# First, let's load the language model we're going to use to control the agent.
|
||||
chat = ChatOpenAI(temperature=0)
|
||||
|
||||
# Next, let's load some tools to use. Note that the `llm-math` tool uses an LLM, so we need to pass that in.
|
||||
llm = OpenAI(temperature=0)
|
||||
tools = load_tools(["serpapi", "llm-math"], llm=llm)
|
||||
|
||||
|
||||
# Finally, let's initialize an agent with the tools, the language model, and the type of agent we want to use.
|
||||
agent = initialize_agent(tools, chat, agent=AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION, verbose=True)
|
||||
|
||||
# Now let's test it out!
|
||||
agent.run("Who is Olivia Wilde's boyfriend? What is his current age raised to the 0.23 power?")
|
||||
```
|
||||
|
||||
```pycon
|
||||
|
||||
> Entering new AgentExecutor chain...
|
||||
Thought: I need to use a search engine to find Olivia Wilde's boyfriend and a calculator to raise his age to the 0.23 power.
|
||||
Action:
|
||||
{
|
||||
"action": "Search",
|
||||
"action_input": "Olivia Wilde boyfriend"
|
||||
}
|
||||
|
||||
Observation: Sudeikis and Wilde's relationship ended in November 2020. Wilde was publicly served with court documents regarding child custody while she was presenting Don't Worry Darling at CinemaCon 2022. In January 2021, Wilde began dating singer Harry Styles after meeting during the filming of Don't Worry Darling.
|
||||
Thought:I need to use a search engine to find Harry Styles' current age.
|
||||
Action:
|
||||
{
|
||||
"action": "Search",
|
||||
"action_input": "Harry Styles age"
|
||||
}
|
||||
|
||||
Observation: 29 years
|
||||
Thought:Now I need to calculate 29 raised to the 0.23 power.
|
||||
Action:
|
||||
{
|
||||
"action": "Calculator",
|
||||
"action_input": "29^0.23"
|
||||
}
|
||||
|
||||
Observation: Answer: 2.169459462491557
|
||||
|
||||
Thought:I now know the final answer.
|
||||
Final Answer: 2.169459462491557
|
||||
|
||||
> Finished chain.
|
||||
'2.169459462491557'
|
||||
```
|
||||
## Memory: Add State to Chains and Agents
|
||||
You can use Memory with chains and agents initialized with chat models. The main difference between this and Memory for LLMs is that rather than trying to condense all previous messages into a string, we can keep them as their own unique memory object.
|
||||
|
||||
```python
|
||||
from langchain.prompts import (
|
||||
ChatPromptTemplate,
|
||||
MessagesPlaceholder,
|
||||
SystemMessagePromptTemplate,
|
||||
HumanMessagePromptTemplate
|
||||
)
|
||||
from langchain.chains import ConversationChain
|
||||
from langchain.chat_models import ChatOpenAI
|
||||
from langchain.memory import ConversationBufferMemory
|
||||
|
||||
prompt = ChatPromptTemplate.from_messages([
|
||||
SystemMessagePromptTemplate.from_template("The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know."),
|
||||
MessagesPlaceholder(variable_name="history"),
|
||||
HumanMessagePromptTemplate.from_template("{input}")
|
||||
])
|
||||
|
||||
llm = ChatOpenAI(temperature=0)
|
||||
memory = ConversationBufferMemory(return_messages=True)
|
||||
conversation = ConversationChain(memory=memory, prompt=prompt, llm=llm)
|
||||
|
||||
conversation.predict(input="Hi there!")
|
||||
# -> 'Hello! How can I assist you today?'
|
||||
|
||||
|
||||
conversation.predict(input="I'm doing well! Just having a conversation with an AI.")
|
||||
# -> "That sounds like fun! I'm happy to chat with you. Is there anything specific you'd like to talk about?"
|
||||
|
||||
conversation.predict(input="Tell me about yourself.")
|
||||
# -> "Sure! I am an AI language model created by OpenAI. I was trained on a large dataset of text from the internet, which allows me to understand and generate human-like language. I can answer questions, provide information, and even have conversations like this one. Is there anything else you'd like to know about me?"
|
||||
```
|
||||
|
||||
113
docs/getting_started/tutorials.md
Normal file
113
docs/getting_started/tutorials.md
Normal file
@@ -0,0 +1,113 @@
|
||||
# Tutorials
|
||||
|
||||
⛓ icon marks a new addition [last update 2023-05-15]
|
||||
|
||||
### DeepLearning.AI course
|
||||
⛓[LangChain for LLM Application Development](https://learn.deeplearning.ai/langchain) by Harrison Chase presented by [Andrew Ng](https://en.wikipedia.org/wiki/Andrew_Ng)
|
||||
|
||||
### Handbook
|
||||
[LangChain AI Handbook](https://www.pinecone.io/learn/langchain/) By **James Briggs** and **Francisco Ingham**
|
||||
|
||||
### Tutorials
|
||||
[LangChain Tutorials](https://www.youtube.com/watch?v=FuqdVNB_8c0&list=PL9V0lbeJ69brU-ojMpU1Y7Ic58Tap0Cw6) by [Edrick](https://www.youtube.com/@edrickdch):
|
||||
- ⛓ [LangChain, Chroma DB, OpenAI Beginner Guide | ChatGPT with your PDF](https://youtu.be/FuqdVNB_8c0)
|
||||
- ⛓ [LangChain 101: The Complete Beginner's Guide](https://youtu.be/P3MAbZ2eMUI)
|
||||
|
||||
[LangChain Crash Course: Build an AutoGPT app in 25 minutes](https://youtu.be/MlK6SIjcjE8) by [Nicholas Renotte](https://www.youtube.com/@NicholasRenotte)
|
||||
|
||||
|
||||
[LangChain Crash Course - Build apps with language models](https://youtu.be/LbT1yp6quS8) by [Patrick Loeber](https://www.youtube.com/@patloeber)
|
||||
|
||||
|
||||
[LangChain Explained in 13 Minutes | QuickStart Tutorial for Beginners](https://youtu.be/aywZrzNaKjs) by [Rabbitmetrics](https://www.youtube.com/@rabbitmetrics)
|
||||
|
||||
|
||||
###
|
||||
[LangChain for Gen AI and LLMs](https://www.youtube.com/playlist?list=PLIUOU7oqGTLieV9uTIFMm6_4PXg-hlN6F) by [James Briggs](https://www.youtube.com/@jamesbriggs):
|
||||
- #1 [Getting Started with `GPT-3` vs. Open Source LLMs](https://youtu.be/nE2skSRWTTs)
|
||||
- #2 [Prompt Templates for `GPT 3.5` and other LLMs](https://youtu.be/RflBcK0oDH0)
|
||||
- #3 [LLM Chains using `GPT 3.5` and other LLMs](https://youtu.be/S8j9Tk0lZHU)
|
||||
- #4 [Chatbot Memory for `Chat-GPT`, `Davinci` + other LLMs](https://youtu.be/X05uK0TZozM)
|
||||
- #5 [Chat with OpenAI in LangChain](https://youtu.be/CnAgB3A5OlU)
|
||||
- ⛓ #6 [Fixing LLM Hallucinations with Retrieval Augmentation in LangChain](https://youtu.be/kvdVduIJsc8)
|
||||
- ⛓ #7 [LangChain Agents Deep Dive with GPT 3.5](https://youtu.be/jSP-gSEyVeI)
|
||||
- ⛓ #8 [Create Custom Tools for Chatbots in LangChain](https://youtu.be/q-HNphrWsDE)
|
||||
- ⛓ #9 [Build Conversational Agents with Vector DBs](https://youtu.be/H6bCqqw9xyI)
|
||||
|
||||
|
||||
###
|
||||
[LangChain 101](https://www.youtube.com/playlist?list=PLqZXAkvF1bPNQER9mLmDbntNfSpzdDIU5) by [Data Independent](https://www.youtube.com/@DataIndependent):
|
||||
- [What Is LangChain? - LangChain + `ChatGPT` Overview](https://youtu.be/_v_fgW2SkkQ)
|
||||
- [Quickstart Guide](https://youtu.be/kYRB-vJFy38)
|
||||
- [Beginner Guide To 7 Essential Concepts](https://youtu.be/2xxziIWmaSA)
|
||||
- [`OpenAI` + `Wolfram Alpha`](https://youtu.be/UijbzCIJ99g)
|
||||
- [Ask Questions On Your Custom (or Private) Files](https://youtu.be/EnT-ZTrcPrg)
|
||||
- [Connect `Google Drive Files` To `OpenAI`](https://youtu.be/IqqHqDcXLww)
|
||||
- [`YouTube Transcripts` + `OpenAI`](https://youtu.be/pNcQ5XXMgH4)
|
||||
- [Question A 300 Page Book (w/ `OpenAI` + `Pinecone`)](https://youtu.be/h0DHDp1FbmQ)
|
||||
- [Workaround `OpenAI's` Token Limit With Chain Types](https://youtu.be/f9_BWhCI4Zo)
|
||||
- [Build Your Own OpenAI + LangChain Web App in 23 Minutes](https://youtu.be/U_eV8wfMkXU)
|
||||
- [Working With The New `ChatGPT API`](https://youtu.be/e9P7FLi5Zy8)
|
||||
- [OpenAI + LangChain Wrote Me 100 Custom Sales Emails](https://youtu.be/y1pyAQM-3Bo)
|
||||
- [Structured Output From `OpenAI` (Clean Dirty Data)](https://youtu.be/KwAXfey-xQk)
|
||||
- [Connect `OpenAI` To +5,000 Tools (LangChain + `Zapier`)](https://youtu.be/7tNm0yiDigU)
|
||||
- [Use LLMs To Extract Data From Text (Expert Mode)](https://youtu.be/xZzvwR9jdPA)
|
||||
- ⛓ [Extract Insights From Interview Transcripts Using LLMs](https://youtu.be/shkMOHwJ4SM)
|
||||
- ⛓ [5 Levels Of LLM Summarizing: Novice to Expert](https://youtu.be/qaPMdcCqtWk)
|
||||
|
||||
|
||||
###
|
||||
[LangChain How to and guides](https://www.youtube.com/playlist?list=PL8motc6AQftk1Bs42EW45kwYbyJ4jOdiZ) by [Sam Witteveen](https://www.youtube.com/@samwitteveenai):
|
||||
- [LangChain Basics - LLMs & PromptTemplates with Colab](https://youtu.be/J_0qvRt4LNk)
|
||||
- [LangChain Basics - Tools and Chains](https://youtu.be/hI2BY7yl_Ac)
|
||||
- [`ChatGPT API` Announcement & Code Walkthrough with LangChain](https://youtu.be/phHqvLHCwH4)
|
||||
- [Conversations with Memory (explanation & code walkthrough)](https://youtu.be/X550Zbz_ROE)
|
||||
- [Chat with `Flan20B`](https://youtu.be/VW5LBavIfY4)
|
||||
- [Using `Hugging Face Models` locally (code walkthrough)](https://youtu.be/Kn7SX2Mx_Jk)
|
||||
- [`PAL` : Program-aided Language Models with LangChain code](https://youtu.be/dy7-LvDu-3s)
|
||||
- [Building a Summarization System with LangChain and `GPT-3` - Part 1](https://youtu.be/LNq_2s_H01Y)
|
||||
- [Building a Summarization System with LangChain and `GPT-3` - Part 2](https://youtu.be/d-yeHDLgKHw)
|
||||
- [Microsoft's `Visual ChatGPT` using LangChain](https://youtu.be/7YEiEyfPF5U)
|
||||
- [LangChain Agents - Joining Tools and Chains with Decisions](https://youtu.be/ziu87EXZVUE)
|
||||
- [Comparing LLMs with LangChain](https://youtu.be/rFNG0MIEuW0)
|
||||
- [Using `Constitutional AI` in LangChain](https://youtu.be/uoVqNFDwpX4)
|
||||
- [Talking to `Alpaca` with LangChain - Creating an Alpaca Chatbot](https://youtu.be/v6sF8Ed3nTE)
|
||||
- [Talk to your `CSV` & `Excel` with LangChain](https://youtu.be/xQ3mZhw69bc)
|
||||
- [`BabyAGI`: Discover the Power of Task-Driven Autonomous Agents!](https://youtu.be/QBcDLSE2ERA)
|
||||
- [Improve your `BabyAGI` with LangChain](https://youtu.be/DRgPyOXZ-oE)
|
||||
- ⛓ [Master `PDF` Chat with LangChain - Your essential guide to queries on documents](https://youtu.be/ZzgUqFtxgXI)
|
||||
- ⛓ [Using LangChain with `DuckDuckGO` `Wikipedia` & `PythonREPL` Tools](https://youtu.be/KerHlb8nuVc)
|
||||
- ⛓ [Building Custom Tools and Agents with LangChain (gpt-3.5-turbo)](https://youtu.be/biS8G8x8DdA)
|
||||
- ⛓ [LangChain Retrieval QA Over Multiple Files with `ChromaDB`](https://youtu.be/3yPBVii7Ct0)
|
||||
- ⛓ [LangChain Retrieval QA with Instructor Embeddings & `ChromaDB` for PDFs](https://youtu.be/cFCGUjc33aU)
|
||||
- ⛓ [LangChain + Retrieval Local LLMs for Retrieval QA - No OpenAI!!!](https://youtu.be/9ISVjh8mdlA)
|
||||
|
||||
|
||||
###
|
||||
[LangChain](https://www.youtube.com/playlist?list=PLVEEucA9MYhOu89CX8H3MBZqayTbcCTMr) by [Prompt Engineering](https://www.youtube.com/@engineerprompt):
|
||||
- [LangChain Crash Course — All You Need to Know to Build Powerful Apps with LLMs](https://youtu.be/5-fc4Tlgmro)
|
||||
- [Working with MULTIPLE `PDF` Files in LangChain: `ChatGPT` for your Data](https://youtu.be/s5LhRdh5fu4)
|
||||
- [`ChatGPT` for YOUR OWN `PDF` files with LangChain](https://youtu.be/TLf90ipMzfE)
|
||||
- [Talk to YOUR DATA without OpenAI APIs: LangChain](https://youtu.be/wrD-fZvT6UI)
|
||||
- ⛓️ [CHATGPT For WEBSITES: Custom ChatBOT](https://youtu.be/RBnuhhmD21U)
|
||||
|
||||
|
||||
###
|
||||
LangChain by [Chat with data](https://www.youtube.com/@chatwithdata)
|
||||
- [LangChain Beginner's Tutorial for `Typescript`/`Javascript`](https://youtu.be/bH722QgRlhQ)
|
||||
- [`GPT-4` Tutorial: How to Chat With Multiple `PDF` Files (~1000 pages of Tesla's 10-K Annual Reports)](https://youtu.be/Ix9WIZpArm0)
|
||||
- [`GPT-4` & LangChain Tutorial: How to Chat With A 56-Page `PDF` Document (w/`Pinecone`)](https://youtu.be/ih9PBGVVOO4)
|
||||
- ⛓ [LangChain & Supabase Tutorial: How to Build a ChatGPT Chatbot For Your Website](https://youtu.be/R2FMzcsmQY8)
|
||||
|
||||
|
||||
###
|
||||
[Get SH\*T Done with Prompt Engineering and LangChain](https://www.youtube.com/watch?v=muXbPpG_ys4&list=PLEJK-H61Xlwzm5FYLDdKt_6yibO33zoMW) by [Venelin Valkov](https://www.youtube.com/@venelin_valkov)
|
||||
- [Getting Started with LangChain: Load Custom Data, Run OpenAI Models, Embeddings and `ChatGPT`](https://www.youtube.com/watch?v=muXbPpG_ys4)
|
||||
- [Loaders, Indexes & Vectorstores in LangChain: Question Answering on `PDF` files with `ChatGPT`](https://www.youtube.com/watch?v=FQnvfR8Dmr0)
|
||||
- [LangChain Models: `ChatGPT`, `Flan Alpaca`, `OpenAI Embeddings`, Prompt Templates & Streaming](https://www.youtube.com/watch?v=zy6LiK5F5-s)
|
||||
- [LangChain Chains: Use `ChatGPT` to Build Conversational Agents, Summaries and Q&A on Text With LLMs](https://www.youtube.com/watch?v=h1tJZQPcimM)
|
||||
- [Analyze Custom CSV Data with `GPT-4` using Langchain](https://www.youtube.com/watch?v=Ew3sGdX8at4)
|
||||
- ⛓ [Build ChatGPT Chatbots with LangChain Memory: Understanding and Implementing Memory in Conversations](https://youtu.be/CyuUlf54wTs)
|
||||
|
||||
---------------------
|
||||
⛓ icon marks a new addition [last update 2023-05-15]
|
||||
@@ -1,74 +0,0 @@
|
||||
# Glossary
|
||||
|
||||
This is a collection of terminology commonly used when developing LLM applications.
|
||||
It contains reference to external papers or sources where the concept was first introduced,
|
||||
as well as to places in LangChain where the concept is used.
|
||||
|
||||
### Chain of Thought Prompting
|
||||
|
||||
A prompting technique used to encourage the model to generate a series of intermediate reasoning steps.
|
||||
A less formal way to induce this behavior is to include “Let’s think step-by-step” in the prompt.
|
||||
|
||||
Resources:
|
||||
- [Chain-of-Thought Paper](https://arxiv.org/pdf/2201.11903.pdf)
|
||||
- [Step-by-Step Paper](https://arxiv.org/abs/2112.00114)
|
||||
|
||||
### Action Plan Generation
|
||||
|
||||
A prompt usage that uses a language model to generate actions to take.
|
||||
The results of these actions can then be fed back into the language model to generate a subsequent action.
|
||||
|
||||
Resources:
|
||||
- [WebGPT Paper](https://arxiv.org/pdf/2112.09332.pdf)
|
||||
- [SayCan Paper](https://say-can.github.io/assets/palm_saycan.pdf)
|
||||
|
||||
### ReAct Prompting
|
||||
|
||||
A prompting technique that combines Chain-of-Thought prompting with action plan generation.
|
||||
This induces the to model to think about what action to take, then take it.
|
||||
|
||||
Resources:
|
||||
- [Paper](https://arxiv.org/pdf/2210.03629.pdf)
|
||||
- [LangChain Example](https://github.com/hwchase17/langchain/blob/master/examples/react.ipynb)
|
||||
|
||||
### Self-ask
|
||||
|
||||
A prompting method that builds on top of chain-of-thought prompting.
|
||||
In this method, the model explicitly asks itself follow-up questions, which are then answered by an external search engine.
|
||||
|
||||
Resources:
|
||||
- [Paper](https://ofir.io/self-ask.pdf)
|
||||
- [LangChain Example](https://github.com/hwchase17/langchain/blob/master/examples/self_ask_with_search.ipynb)
|
||||
|
||||
### Prompt Chaining
|
||||
|
||||
Combining multiple LLM calls together, with the output of one step being the input to the next.
|
||||
|
||||
Resources:
|
||||
- [PromptChainer Paper](https://arxiv.org/pdf/2203.06566.pdf)
|
||||
- [Language Model Cascades](https://arxiv.org/abs/2207.10342)
|
||||
- [ICE Primer Book](https://primer.ought.org/)
|
||||
- [Socratic Models](https://socraticmodels.github.io/)
|
||||
|
||||
### Memetic Proxy
|
||||
|
||||
Encouraging the LLM to respond in a certain way framing the discussion in a context that the model knows of and that will result in that type of response. For example, as a conversation between a student and a teacher.
|
||||
|
||||
Resources:
|
||||
- [Paper](https://arxiv.org/pdf/2102.07350.pdf)
|
||||
|
||||
### Self Consistency
|
||||
|
||||
A decoding strategy that samples a diverse set of reasoning paths and then selects the most consistent answer.
|
||||
Is most effective when combined with Chain-of-thought prompting.
|
||||
|
||||
Resources:
|
||||
- [Paper](https://arxiv.org/pdf/2203.11171.pdf)
|
||||
|
||||
### Inception
|
||||
|
||||
Also called “First Person Instruction”.
|
||||
Encouraging the model to think a certain way by including the start of the model’s response in the prompt.
|
||||
|
||||
Resources:
|
||||
- [Example](https://twitter.com/goodside/status/1583262455207460865?s=20&t=8Hz7XBnK1OF8siQrxxCIGQ)
|
||||
202
docs/index.rst
202
docs/index.rst
@@ -1,18 +1,206 @@
|
||||
Welcome to LangChain
|
||||
==========================
|
||||
|
||||
| **LangChain** is a framework for developing applications powered by language models. We believe that the most powerful and differentiated applications will not only call out to a language model, but will also be:
|
||||
1. *Data-aware*: connect a language model to other sources of data
|
||||
2. *Agentic*: allow a language model to interact with its environment
|
||||
|
||||
| The LangChain framework is designed around these principles.
|
||||
|
||||
| This is the Python specific portion of the documentation. For a purely conceptual guide to LangChain, see `here <https://docs.langchain.com/docs/>`_. For the JavaScript documentation, see `here <https://js.langchain.com/docs/>`_.
|
||||
|
||||
Getting Started
|
||||
----------------
|
||||
|
||||
| How to get started using LangChain to create an Language Model application.
|
||||
|
||||
- `Quickstart Guide <./getting_started/getting_started.html>`_
|
||||
|
||||
| Concepts and terminology.
|
||||
|
||||
- `Concepts and terminology <./getting_started/concepts.html>`_
|
||||
|
||||
| Tutorials created by community experts and presented on YouTube.
|
||||
|
||||
- `Tutorials <./getting_started/tutorials.html>`_
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: User API
|
||||
:caption: Getting Started
|
||||
:name: getting_started
|
||||
:hidden:
|
||||
|
||||
modules/prompt
|
||||
modules/llms
|
||||
modules/embeddings
|
||||
modules/chains
|
||||
getting_started/getting_started.md
|
||||
getting_started/concepts.md
|
||||
getting_started/tutorials.md
|
||||
|
||||
|
||||
Modules
|
||||
-----------
|
||||
|
||||
| These modules are the core abstractions which we view as the building blocks of any LLM-powered application.
|
||||
For each module LangChain provides standard, extendable interfaces. LangChain also provides external integrations and even end-to-end implementations for off-the-shelf use.
|
||||
|
||||
| The docs for each module contain quickstart examples, how-to guides, reference docs, and conceptual guides.
|
||||
|
||||
| The modules are (from least to most complex):
|
||||
|
||||
- `Models <./modules/models.html>`_: Supported model types and integrations.
|
||||
|
||||
- `Prompts <./modules/prompts.html>`_: Prompt management, optimization, and serialization.
|
||||
|
||||
- `Memory <./modules/memory.html>`_: Memory refers to state that is persisted between calls of a chain/agent.
|
||||
|
||||
- `Indexes <./modules/indexes.html>`_: Language models become much more powerful when combined with application-specific data - this module contains interfaces and integrations for loading, querying and updating external data.
|
||||
|
||||
- `Chains <./modules/chains.html>`_: Chains are structured sequences of calls (to an LLM or to a different utility).
|
||||
|
||||
- `Agents <./modules/agents.html>`_: An agent is a Chain in which an LLM, given a high-level directive and a set of tools, repeatedly decides an action, executes the action and observes the outcome until the high-level directive is complete.
|
||||
|
||||
- `Callbacks <./modules/callbacks/getting_started.html>`_: Callbacks let you log and stream the intermediate steps of any chain, making it easy to observe, debug, and evaluate the internals of an application.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:caption: Resources
|
||||
:caption: Modules
|
||||
:name: modules
|
||||
:hidden:
|
||||
|
||||
glossary.md
|
||||
./modules/models.rst
|
||||
./modules/prompts.rst
|
||||
./modules/memory.md
|
||||
./modules/indexes.md
|
||||
./modules/chains.md
|
||||
./modules/agents.md
|
||||
./modules/callbacks/getting_started.ipynb
|
||||
|
||||
Use Cases
|
||||
----------
|
||||
|
||||
| Best practices and built-in implementations for common LangChain use cases:
|
||||
|
||||
- `Autonomous Agents <./use_cases/autonomous_agents.html>`_: Autonomous agents are long-running agents that take many steps in an attempt to accomplish an objective. Examples include AutoGPT and BabyAGI.
|
||||
|
||||
- `Agent Simulations <./use_cases/agent_simulations.html>`_: Putting agents in a sandbox and observing how they interact with each other and react to events can be an effective way to evaluate their long-range reasoning and planning abilities.
|
||||
|
||||
- `Personal Assistants <./use_cases/personal_assistants.html>`_: One of the primary LangChain use cases. Personal assistants need to take actions, remember interactions, and have knowledge about your data.
|
||||
|
||||
- `Question Answering <./use_cases/question_answering.html>`_: Another common LangChain use case. Answering questions over specific documents, only utilizing the information in those documents to construct an answer.
|
||||
|
||||
- `Chatbots <./use_cases/chatbots.html>`_: Language models love to chat, making this a very natural use of them.
|
||||
|
||||
- `Querying Tabular Data <./use_cases/tabular.html>`_: Recommended reading if you want to use language models to query structured data (CSVs, SQL, dataframes, etc).
|
||||
|
||||
- `Code Understanding <./use_cases/code.html>`_: Recommended reading if you want to use language models to analyze code.
|
||||
|
||||
- `Interacting with APIs <./use_cases/apis.html>`_: Enabling language models to interact with APIs is extremely powerful. It gives them access to up-to-date information and allows them to take actions.
|
||||
|
||||
- `Extraction <./use_cases/extraction.html>`_: Extract structured information from text.
|
||||
|
||||
- `Summarization <./use_cases/summarization.html>`_: Compressing longer documents. A type of Data-Augmented Generation.
|
||||
|
||||
- `Evaluation <./use_cases/evaluation.html>`_: Generative models are hard to evaluate with traditional metrics. One promising approach is to use language models themselves to do the evaluation.
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:caption: Use Cases
|
||||
:name: use_cases
|
||||
:hidden:
|
||||
|
||||
./use_cases/autonomous_agents.md
|
||||
./use_cases/agent_simulations.md
|
||||
./use_cases/personal_assistants.md
|
||||
./use_cases/question_answering.md
|
||||
./use_cases/chatbots.md
|
||||
./use_cases/tabular.rst
|
||||
./use_cases/code.md
|
||||
./use_cases/apis.md
|
||||
./use_cases/extraction.md
|
||||
./use_cases/summarization.md
|
||||
./use_cases/evaluation.rst
|
||||
|
||||
|
||||
Reference Docs
|
||||
---------------
|
||||
|
||||
| Full documentation on all methods, classes, installation methods, and integration setups for LangChain.
|
||||
|
||||
|
||||
- `LangChain Installation <./reference/installation.html>`_
|
||||
|
||||
- `Reference Documentation <./reference.html>`_
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:caption: Reference
|
||||
:name: reference
|
||||
:hidden:
|
||||
|
||||
./reference/installation.md
|
||||
./reference.rst
|
||||
|
||||
|
||||
Ecosystem
|
||||
------------
|
||||
|
||||
| LangChain integrates a lot of different LLMs, systems, and products.
|
||||
| From the other side, many systems and products depend on LangChain.
|
||||
| It creates a vibrant and thriving ecosystem.
|
||||
|
||||
|
||||
- `Integrations <./integrations.html>`_: Guides for how other products can be used with LangChain.
|
||||
|
||||
- `Dependents <./dependents.html>`_: List of repositories that use LangChain.
|
||||
|
||||
- `Deployments <./ecosystem/deployments.html>`_: A collection of instructions, code snippets, and template repositories for deploying LangChain apps.
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:glob:
|
||||
:caption: Ecosystem
|
||||
:name: ecosystem
|
||||
:hidden:
|
||||
|
||||
./integrations.rst
|
||||
./dependents.md
|
||||
./ecosystem/deployments.md
|
||||
|
||||
|
||||
Additional Resources
|
||||
---------------------
|
||||
|
||||
| Additional resources we think may be useful as you develop your application!
|
||||
|
||||
- `LangChainHub <https://github.com/hwchase17/langchain-hub>`_: The LangChainHub is a place to share and explore other prompts, chains, and agents.
|
||||
|
||||
- `Gallery <https://github.com/kyrolabs/awesome-langchain>`_: A collection of great projects that use Langchain, compiled by the folks at `Kyrolabs <https://kyrolabs.com>`_. Useful for finding inspiration and example implementations.
|
||||
|
||||
- `Deploying LLMs in Production <./additional_resources/deploy_llms.html>`_: A collection of best practices and tutorials for deploying LLMs in production.
|
||||
|
||||
- `Tracing <./additional_resources/tracing.html>`_: A guide on using tracing in LangChain to visualize the execution of chains and agents.
|
||||
|
||||
- `Model Laboratory <./additional_resources/model_laboratory.html>`_: Experimenting with different prompts, models, and chains is a big part of developing the best possible application. The ModelLaboratory makes it easy to do so.
|
||||
|
||||
- `Discord <https://discord.gg/6adMQxSpJS>`_: Join us on our Discord to discuss all things LangChain!
|
||||
|
||||
- `YouTube <./additional_resources/youtube.html>`_: A collection of the LangChain tutorials and videos.
|
||||
|
||||
- `Production Support <https://forms.gle/57d8AmXBYp8PP8tZA>`_: As you move your LangChains into production, we'd love to offer more comprehensive support. Please fill out this form and we'll set up a dedicated support Slack channel.
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:caption: Additional Resources
|
||||
:name: resources
|
||||
:hidden:
|
||||
|
||||
LangChainHub <https://github.com/hwchase17/langchain-hub>
|
||||
./additional_resources/deployments.md
|
||||
./additional_resources/deploy_llms.rst
|
||||
Gallery <https://github.com/kyrolabs/awesome-langchain>
|
||||
./additional_resources/tracing.md
|
||||
./additional_resources/model_laboratory.ipynb
|
||||
Discord <https://discord.gg/6adMQxSpJS>
|
||||
./additional_resources/youtube.md
|
||||
Production Support <https://forms.gle/57d8AmXBYp8PP8tZA>
|
||||
|
||||
39
docs/integrations.rst
Normal file
39
docs/integrations.rst
Normal file
@@ -0,0 +1,39 @@
|
||||
Integrations
|
||||
===================
|
||||
|
||||
LangChain integrates with many LLMs, systems, and products.
|
||||
|
||||
Integrations by Module
|
||||
--------------------------------
|
||||
|
||||
| Integrations grouped by the core LangChain module they map to:
|
||||
|
||||
|
||||
- `LLM Providers <./modules/models/llms/integrations.html>`_
|
||||
- `Chat Model Providers <./modules/models/chat/integrations.html>`_
|
||||
- `Text Embedding Model Providers <./modules/models/text_embedding.html>`_
|
||||
- `Document Loader Integrations <./modules/indexes/document_loaders.html>`_
|
||||
- `Text Splitter Integrations <./modules/indexes/text_splitters.html>`_
|
||||
- `Vectorstore Providers <./modules/indexes/vectorstores.html>`_
|
||||
- `Retriever Providers <./modules/indexes/retrievers.html>`_
|
||||
- `Tool Providers <./modules/agents/tools.html>`_
|
||||
- `Toolkit Integrations <./modules/agents/toolkits.html>`_
|
||||
|
||||
|
||||
Dependencies
|
||||
----------------
|
||||
|
||||
| LangChain depends on `several hungered Python packages <https://github.com/hwchase17/langchain/network/dependencies>`_.
|
||||
|
||||
|
||||
All Integrations
|
||||
-------------------------------------------
|
||||
|
||||
| A comprehensive list of LLMs, systems, and products integrated with LangChain:
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
integrations/*
|
||||
184
docs/integrations/agent_with_wandb_tracing.ipynb
Normal file
184
docs/integrations/agent_with_wandb_tracing.ipynb
Normal file
File diff suppressed because one or more lines are too long
16
docs/integrations/ai21.md
Normal file
16
docs/integrations/ai21.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# AI21 Labs
|
||||
|
||||
This page covers how to use the AI21 ecosystem within LangChain.
|
||||
It is broken into two parts: installation and setup, and then references to specific AI21 wrappers.
|
||||
|
||||
## Installation and Setup
|
||||
- Get an AI21 api key and set it as an environment variable (`AI21_API_KEY`)
|
||||
|
||||
## Wrappers
|
||||
|
||||
### LLM
|
||||
|
||||
There exists an AI21 LLM wrapper, which you can access with
|
||||
```python
|
||||
from langchain.llms import AI21
|
||||
```
|
||||
291
docs/integrations/aim_tracking.ipynb
Normal file
291
docs/integrations/aim_tracking.ipynb
Normal file
@@ -0,0 +1,291 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Aim\n",
|
||||
"\n",
|
||||
"Aim makes it super easy to visualize and debug LangChain executions. Aim tracks inputs and outputs of LLMs and tools, as well as actions of agents. \n",
|
||||
"\n",
|
||||
"With Aim, you can easily debug and examine an individual execution:\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"Additionally, you have the option to compare multiple executions side by side:\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"Aim is fully open source, [learn more](https://github.com/aimhubio/aim) about Aim on GitHub.\n",
|
||||
"\n",
|
||||
"Let's move forward and see how to enable and configure Aim callback."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"<h3>Tracking LangChain Executions with Aim</h3>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"In this notebook we will explore three usage scenarios. To start off, we will install the necessary packages and import certain modules. Subsequently, we will configure two environment variables that can be established either within the Python script or through the terminal."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "mf88kuCJhbVu"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install aim\n",
|
||||
"!pip install langchain\n",
|
||||
"!pip install openai\n",
|
||||
"!pip install google-search-results"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "g4eTuajwfl6L"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os\n",
|
||||
"from datetime import datetime\n",
|
||||
"\n",
|
||||
"from langchain.llms import OpenAI\n",
|
||||
"from langchain.callbacks import AimCallbackHandler, StdOutCallbackHandler"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Our examples use a GPT model as the LLM, and OpenAI offers an API for this purpose. You can obtain the key from the following link: https://platform.openai.com/account/api-keys .\n",
|
||||
"\n",
|
||||
"We will use the SerpApi to retrieve search results from Google. To acquire the SerpApi key, please go to https://serpapi.com/manage-api-key ."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "T1bSmKd6V2If"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"os.environ[\"OPENAI_API_KEY\"] = \"...\"\n",
|
||||
"os.environ[\"SERPAPI_API_KEY\"] = \"...\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "QenUYuBZjIzc"
|
||||
},
|
||||
"source": [
|
||||
"The event methods of `AimCallbackHandler` accept the LangChain module or agent as input and log at least the prompts and generated results, as well as the serialized version of the LangChain module, to the designated Aim run."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "KAz8weWuUeXF"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"session_group = datetime.now().strftime(\"%m.%d.%Y_%H.%M.%S\")\n",
|
||||
"aim_callback = AimCallbackHandler(\n",
|
||||
" repo=\".\",\n",
|
||||
" experiment_name=\"scenario 1: OpenAI LLM\",\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"callbacks = [StdOutCallbackHandler(), aim_callback]\n",
|
||||
"llm = OpenAI(temperature=0, callbacks=callbacks)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"id": "b8WfByB4fl6N"
|
||||
},
|
||||
"source": [
|
||||
"The `flush_tracker` function is used to record LangChain assets on Aim. By default, the session is reset rather than being terminated outright."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"<h3>Scenario 1</h3> In the first scenario, we will use OpenAI LLM."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "o_VmneyIUyx8"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# scenario 1 - LLM\n",
|
||||
"llm_result = llm.generate([\"Tell me a joke\", \"Tell me a poem\"] * 3)\n",
|
||||
"aim_callback.flush_tracker(\n",
|
||||
" langchain_asset=llm,\n",
|
||||
" experiment_name=\"scenario 2: Chain with multiple SubChains on multiple generations\",\n",
|
||||
")\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"<h3>Scenario 2</h3> Scenario two involves chaining with multiple SubChains across multiple generations."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "trxslyb1U28Y"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain.prompts import PromptTemplate\n",
|
||||
"from langchain.chains import LLMChain"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "uauQk10SUzF6"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# scenario 2 - Chain\n",
|
||||
"template = \"\"\"You are a playwright. Given the title of play, it is your job to write a synopsis for that title.\n",
|
||||
"Title: {title}\n",
|
||||
"Playwright: This is a synopsis for the above play:\"\"\"\n",
|
||||
"prompt_template = PromptTemplate(input_variables=[\"title\"], template=template)\n",
|
||||
"synopsis_chain = LLMChain(llm=llm, prompt=prompt_template, callbacks=callbacks)\n",
|
||||
"\n",
|
||||
"test_prompts = [\n",
|
||||
" {\"title\": \"documentary about good video games that push the boundary of game design\"},\n",
|
||||
" {\"title\": \"the phenomenon behind the remarkable speed of cheetahs\"},\n",
|
||||
" {\"title\": \"the best in class mlops tooling\"},\n",
|
||||
"]\n",
|
||||
"synopsis_chain.apply(test_prompts)\n",
|
||||
"aim_callback.flush_tracker(\n",
|
||||
" langchain_asset=synopsis_chain, experiment_name=\"scenario 3: Agent with Tools\"\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"<h3>Scenario 3</h3> The third scenario involves an agent with tools."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "_jN73xcPVEpI"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain.agents import initialize_agent, load_tools\n",
|
||||
"from langchain.agents import AgentType"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"colab": {
|
||||
"base_uri": "https://localhost:8080/"
|
||||
},
|
||||
"id": "Gpq4rk6VT9cu",
|
||||
"outputId": "68ae261e-d0a2-4229-83c4-762562263b66"
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
"\n",
|
||||
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
|
||||
"\u001b[32;1m\u001b[1;3m I need to find out who Leo DiCaprio's girlfriend is and then calculate her age raised to the 0.43 power.\n",
|
||||
"Action: Search\n",
|
||||
"Action Input: \"Leo DiCaprio girlfriend\"\u001b[0m\n",
|
||||
"Observation: \u001b[36;1m\u001b[1;3mLeonardo DiCaprio seemed to prove a long-held theory about his love life right after splitting from girlfriend Camila Morrone just months ...\u001b[0m\n",
|
||||
"Thought:\u001b[32;1m\u001b[1;3m I need to find out Camila Morrone's age\n",
|
||||
"Action: Search\n",
|
||||
"Action Input: \"Camila Morrone age\"\u001b[0m\n",
|
||||
"Observation: \u001b[36;1m\u001b[1;3m25 years\u001b[0m\n",
|
||||
"Thought:\u001b[32;1m\u001b[1;3m I need to calculate 25 raised to the 0.43 power\n",
|
||||
"Action: Calculator\n",
|
||||
"Action Input: 25^0.43\u001b[0m\n",
|
||||
"Observation: \u001b[33;1m\u001b[1;3mAnswer: 3.991298452658078\n",
|
||||
"\u001b[0m\n",
|
||||
"Thought:\u001b[32;1m\u001b[1;3m I now know the final answer\n",
|
||||
"Final Answer: Camila Morrone is Leo DiCaprio's girlfriend and her current age raised to the 0.43 power is 3.991298452658078.\u001b[0m\n",
|
||||
"\n",
|
||||
"\u001b[1m> Finished chain.\u001b[0m\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# scenario 3 - Agent with Tools\n",
|
||||
"tools = load_tools([\"serpapi\", \"llm-math\"], llm=llm, callbacks=callbacks)\n",
|
||||
"agent = initialize_agent(\n",
|
||||
" tools,\n",
|
||||
" llm,\n",
|
||||
" agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,\n",
|
||||
" callbacks=callbacks,\n",
|
||||
")\n",
|
||||
"agent.run(\n",
|
||||
" \"Who is Leo DiCaprio's girlfriend? What is her current age raised to the 0.43 power?\"\n",
|
||||
")\n",
|
||||
"aim_callback.flush_tracker(langchain_asset=agent, reset=False, finish=True)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"accelerator": "GPU",
|
||||
"colab": {
|
||||
"provenance": []
|
||||
},
|
||||
"gpuClass": "standard",
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"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": 1
|
||||
}
|
||||
29
docs/integrations/airbyte.md
Normal file
29
docs/integrations/airbyte.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Airbyte
|
||||
|
||||
>[Airbyte](https://github.com/airbytehq/airbyte) is a data integration platform for ELT pipelines from APIs,
|
||||
> databases & files to warehouses & lakes. It has the largest catalog of ELT connectors to data warehouses and databases.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
This instruction shows how to load any source from `Airbyte` into a local `JSON` file that can be read in as a document.
|
||||
|
||||
**Prerequisites:**
|
||||
Have `docker desktop` installed.
|
||||
|
||||
**Steps:**
|
||||
1. Clone Airbyte from GitHub - `git clone https://github.com/airbytehq/airbyte.git`.
|
||||
2. Switch into Airbyte directory - `cd airbyte`.
|
||||
3. Start Airbyte - `docker compose up`.
|
||||
4. In your browser, just visit http://localhost:8000. You will be asked for a username and password. By default, that's username `airbyte` and password `password`.
|
||||
5. Setup any source you wish.
|
||||
6. Set destination as Local JSON, with specified destination path - lets say `/json_data`. Set up a manual sync.
|
||||
7. Run the connection.
|
||||
8. To see what files are created, navigate to: `file:///tmp/airbyte_local/`.
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/airbyte_json.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import AirbyteJSONLoader
|
||||
```
|
||||
36
docs/integrations/aleph_alpha.md
Normal file
36
docs/integrations/aleph_alpha.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Aleph Alpha
|
||||
|
||||
>[Aleph Alpha](https://docs.aleph-alpha.com/) was founded in 2019 with the mission to research and build the foundational technology for an era of strong AI. The team of international scientists, engineers, and innovators researches, develops, and deploys transformative AI like large language and multimodal models and runs the fastest European commercial AI cluster.
|
||||
|
||||
>[The Luminous series](https://docs.aleph-alpha.com/docs/introduction/luminous/) is a family of large language models.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
```bash
|
||||
pip install aleph-alpha-client
|
||||
```
|
||||
|
||||
You have to create a new token. Please, see [instructions](https://docs.aleph-alpha.com/docs/account/#create-a-new-token).
|
||||
|
||||
```python
|
||||
from getpass import getpass
|
||||
|
||||
ALEPH_ALPHA_API_KEY = getpass()
|
||||
```
|
||||
|
||||
|
||||
## LLM
|
||||
|
||||
See a [usage example](../modules/models/llms/integrations/aleph_alpha.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.llms import AlephAlpha
|
||||
```
|
||||
|
||||
## Text Embedding Models
|
||||
|
||||
See a [usage example](../modules/models/text_embedding/examples/aleph_alpha.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.embeddings import AlephAlphaSymmetricSemanticEmbedding, AlephAlphaAsymmetricSemanticEmbedding
|
||||
```
|
||||
24
docs/integrations/amazon_bedrock.md
Normal file
24
docs/integrations/amazon_bedrock.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Amazon Bedrock
|
||||
|
||||
>[Amazon Bedrock](https://aws.amazon.com/bedrock/) is a fully managed service that makes FMs from leading AI startups and Amazon available via an API, so you can choose from a wide range of FMs to find the model that is best suited for your use case.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
```bash
|
||||
pip install boto3
|
||||
```
|
||||
|
||||
## LLM
|
||||
|
||||
See a [usage example](../modules/models/llms/integrations/bedrock.ipynb).
|
||||
|
||||
```python
|
||||
from langchain import Bedrock
|
||||
```
|
||||
|
||||
## Text Embedding Models
|
||||
|
||||
See a [usage example](../modules/models/text_embedding/examples/amazon_bedrock.ipynb).
|
||||
```python
|
||||
from langchain.embeddings import BedrockEmbeddings
|
||||
```
|
||||
15
docs/integrations/analyticdb.md
Normal file
15
docs/integrations/analyticdb.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# AnalyticDB
|
||||
|
||||
This page covers how to use the AnalyticDB ecosystem within LangChain.
|
||||
|
||||
### VectorStore
|
||||
|
||||
There exists a wrapper around AnalyticDB, allowing you to use it as a vectorstore,
|
||||
whether for semantic search or example selection.
|
||||
|
||||
To import this vectorstore:
|
||||
```python
|
||||
from langchain.vectorstores import AnalyticDB
|
||||
```
|
||||
|
||||
For a more detailed walkthrough of the AnalyticDB wrapper, see [this notebook](../modules/indexes/vectorstores/examples/analyticdb.ipynb)
|
||||
18
docs/integrations/annoy.md
Normal file
18
docs/integrations/annoy.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Annoy
|
||||
|
||||
> [Annoy](https://github.com/spotify/annoy) (`Approximate Nearest Neighbors Oh Yeah`) is a C++ library with Python bindings to search for points in space that are close to a given query point. It also creates large read-only file-based data structures that are mmapped into memory so that many processes may share the same data.
|
||||
## Installation and Setup
|
||||
|
||||
|
||||
```bash
|
||||
pip install annoy
|
||||
```
|
||||
|
||||
|
||||
## Vectorstore
|
||||
|
||||
See a [usage example](../modules/indexes/vectorstores/examples/annoy.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.vectorstores import Annoy
|
||||
```
|
||||
26
docs/integrations/anthropic.md
Normal file
26
docs/integrations/anthropic.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Anthropic
|
||||
|
||||
>[Anthropic](https://en.wikipedia.org/wiki/Anthropic) is an American artificial intelligence (AI) startup and
|
||||
> public-benefit corporation, founded by former members of OpenAI. `Anthropic` specializes in developing general AI
|
||||
> systems and language models, with a company ethos of responsible AI usage.
|
||||
> `Anthropic` develops a chatbot, named `Claude`. Similar to `ChatGPT`, `Claude` uses a messaging
|
||||
> interface where users can submit questions or requests and receive highly detailed and relevant responses.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
|
||||
```bash
|
||||
pip install anthropic
|
||||
```
|
||||
|
||||
See the [setup documentation](https://console.anthropic.com/docs/access).
|
||||
|
||||
|
||||
|
||||
## Chat Models
|
||||
|
||||
See a [usage example](../modules/models/chat/integrations/anthropic.ipynb)
|
||||
|
||||
```python
|
||||
from langchain.chat_models import ChatAnthropic
|
||||
```
|
||||
17
docs/integrations/anyscale.md
Normal file
17
docs/integrations/anyscale.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Anyscale
|
||||
|
||||
This page covers how to use the Anyscale ecosystem within LangChain.
|
||||
It is broken into two parts: installation and setup, and then references to specific Anyscale wrappers.
|
||||
|
||||
## Installation and Setup
|
||||
- Get an Anyscale Service URL, route and API key and set them as environment variables (`ANYSCALE_SERVICE_URL`,`ANYSCALE_SERVICE_ROUTE`, `ANYSCALE_SERVICE_TOKEN`).
|
||||
- Please see [the Anyscale docs](https://docs.anyscale.com/productionize/services-v2/get-started) for more details.
|
||||
|
||||
## Wrappers
|
||||
|
||||
### LLM
|
||||
|
||||
There exists an Anyscale LLM wrapper, which you can access with
|
||||
```python
|
||||
from langchain.llms import Anyscale
|
||||
```
|
||||
46
docs/integrations/apify.md
Normal file
46
docs/integrations/apify.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Apify
|
||||
|
||||
This page covers how to use [Apify](https://apify.com) within LangChain.
|
||||
|
||||
## Overview
|
||||
|
||||
Apify is a cloud platform for web scraping and data extraction,
|
||||
which provides an [ecosystem](https://apify.com/store) of more than a thousand
|
||||
ready-made apps called *Actors* for various scraping, crawling, and extraction use cases.
|
||||
|
||||
[](https://apify.com/store)
|
||||
|
||||
This integration enables you run Actors on the Apify platform and load their results into LangChain to feed your vector
|
||||
indexes with documents and data from the web, e.g. to generate answers from websites with documentation,
|
||||
blogs, or knowledge bases.
|
||||
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
- Install the Apify API client for Python with `pip install apify-client`
|
||||
- Get your [Apify API token](https://console.apify.com/account/integrations) and either set it as
|
||||
an environment variable (`APIFY_API_TOKEN`) or pass it to the `ApifyWrapper` as `apify_api_token` in the constructor.
|
||||
|
||||
|
||||
## Wrappers
|
||||
|
||||
### Utility
|
||||
|
||||
You can use the `ApifyWrapper` to run Actors on the Apify platform.
|
||||
|
||||
```python
|
||||
from langchain.utilities import ApifyWrapper
|
||||
```
|
||||
|
||||
For a more detailed walkthrough of this wrapper, see [this notebook](../modules/agents/tools/examples/apify.ipynb).
|
||||
|
||||
|
||||
### Loader
|
||||
|
||||
You can also use our `ApifyDatasetLoader` to get data from Apify dataset.
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import ApifyDatasetLoader
|
||||
```
|
||||
|
||||
For a more detailed walkthrough of this loader, see [this notebook](../modules/indexes/document_loaders/examples/apify_dataset.ipynb).
|
||||
29
docs/integrations/argilla.md
Normal file
29
docs/integrations/argilla.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Argilla
|
||||
|
||||

|
||||
|
||||
>[Argilla](https://argilla.io/) is an open-source data curation platform for LLMs.
|
||||
> Using Argilla, everyone can build robust language models through faster data curation
|
||||
> using both human and machine feedback. We provide support for each step in the MLOps cycle,
|
||||
> from data labeling to model monitoring.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
First, you'll need to install the `argilla` Python package as follows:
|
||||
|
||||
```bash
|
||||
pip install argilla --upgrade
|
||||
```
|
||||
|
||||
If you already have an Argilla Server running, then you're good to go; but if
|
||||
you don't, follow the next steps to install it.
|
||||
|
||||
If you don't you can refer to [Argilla - 🚀 Quickstart](https://docs.argilla.io/en/latest/getting_started/quickstart.html#Running-Argilla-Quickstart) to deploy Argilla either on HuggingFace Spaces, locally, or on a server.
|
||||
|
||||
## Tracking
|
||||
|
||||
See a [usage example of `ArgillaCallbackHandler`](../modules/callbacks/examples/examples/argilla.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.callbacks import ArgillaCallbackHandler
|
||||
```
|
||||
36
docs/integrations/arxiv.md
Normal file
36
docs/integrations/arxiv.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Arxiv
|
||||
|
||||
>[arXiv](https://arxiv.org/) is an open-access archive for 2 million scholarly articles in the fields of physics,
|
||||
> mathematics, computer science, quantitative biology, quantitative finance, statistics, electrical engineering and
|
||||
> systems science, and economics.
|
||||
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
First, you need to install `arxiv` python package.
|
||||
|
||||
```bash
|
||||
pip install arxiv
|
||||
```
|
||||
|
||||
Second, you need to install `PyMuPDF` python package which transforms PDF files downloaded from the `arxiv.org` site into the text format.
|
||||
|
||||
```bash
|
||||
pip install pymupdf
|
||||
```
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/arxiv.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import ArxivLoader
|
||||
```
|
||||
|
||||
## Retriever
|
||||
|
||||
See a [usage example](../modules/indexes/retrievers/examples/arxiv.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.retrievers import ArxivRetriever
|
||||
```
|
||||
27
docs/integrations/atlas.md
Normal file
27
docs/integrations/atlas.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# AtlasDB
|
||||
|
||||
This page covers how to use Nomic's Atlas ecosystem within LangChain.
|
||||
It is broken into two parts: installation and setup, and then references to specific Atlas wrappers.
|
||||
|
||||
## Installation and Setup
|
||||
- Install the Python package with `pip install nomic`
|
||||
- Nomic is also included in langchains poetry extras `poetry install -E all`
|
||||
|
||||
## Wrappers
|
||||
|
||||
### VectorStore
|
||||
|
||||
There exists a wrapper around the Atlas neural database, allowing you to use it as a vectorstore.
|
||||
This vectorstore also gives you full access to the underlying AtlasProject object, which will allow you to use the full range of Atlas map interactions, such as bulk tagging and automatic topic modeling.
|
||||
Please see [the Atlas docs](https://docs.nomic.ai/atlas_api.html) for more detailed information.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
To import this vectorstore:
|
||||
```python
|
||||
from langchain.vectorstores import AtlasDB
|
||||
```
|
||||
|
||||
For a more detailed walkthrough of the AtlasDB wrapper, see [this notebook](../modules/indexes/vectorstores/examples/atlas.ipynb)
|
||||
21
docs/integrations/awadb.md
Normal file
21
docs/integrations/awadb.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# AwaDB
|
||||
|
||||
>[AwaDB](https://github.com/awa-ai/awadb) is an AI Native database for the search and storage of embedding vectors used by LLM Applications.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
```bash
|
||||
pip install awadb
|
||||
```
|
||||
|
||||
|
||||
## VectorStore
|
||||
|
||||
There exists a wrapper around AwaDB vector databases, allowing you to use it as a vectorstore,
|
||||
whether for semantic search or example selection.
|
||||
|
||||
```python
|
||||
from langchain.vectorstores import AwaDB
|
||||
```
|
||||
|
||||
For a more detailed walkthrough of the AwaDB wrapper, see [this notebook](../modules/indexes/vectorstores/examples/awadb.ipynb)
|
||||
25
docs/integrations/aws_s3.md
Normal file
25
docs/integrations/aws_s3.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# AWS S3 Directory
|
||||
|
||||
>[Amazon Simple Storage Service (Amazon S3)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-folders.html) is an object storage service.
|
||||
|
||||
>[AWS S3 Directory](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-folders.html)
|
||||
|
||||
>[AWS S3 Buckets](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingBucket.html)
|
||||
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
```bash
|
||||
pip install boto3
|
||||
```
|
||||
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example for S3DirectoryLoader](../modules/indexes/document_loaders/examples/aws_s3_directory.ipynb).
|
||||
|
||||
See a [usage example for S3FileLoader](../modules/indexes/document_loaders/examples/aws_s3_file.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import S3DirectoryLoader, S3FileLoader
|
||||
```
|
||||
16
docs/integrations/azlyrics.md
Normal file
16
docs/integrations/azlyrics.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# AZLyrics
|
||||
|
||||
>[AZLyrics](https://www.azlyrics.com/) is a large, legal, every day growing collection of lyrics.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
There isn't any special setup for it.
|
||||
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/azlyrics.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import AZLyricsLoader
|
||||
```
|
||||
36
docs/integrations/azure_blob_storage.md
Normal file
36
docs/integrations/azure_blob_storage.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Azure Blob Storage
|
||||
|
||||
>[Azure Blob Storage](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction) is Microsoft's object storage solution for the cloud. Blob Storage is optimized for storing massive amounts of unstructured data. Unstructured data is data that doesn't adhere to a particular data model or definition, such as text or binary data.
|
||||
|
||||
>[Azure Files](https://learn.microsoft.com/en-us/azure/storage/files/storage-files-introduction) offers fully managed
|
||||
> file shares in the cloud that are accessible via the industry standard Server Message Block (`SMB`) protocol,
|
||||
> Network File System (`NFS`) protocol, and `Azure Files REST API`. `Azure Files` are based on the `Azure Blob Storage`.
|
||||
|
||||
`Azure Blob Storage` is designed for:
|
||||
- Serving images or documents directly to a browser.
|
||||
- Storing files for distributed access.
|
||||
- Streaming video and audio.
|
||||
- Writing to log files.
|
||||
- Storing data for backup and restore, disaster recovery, and archiving.
|
||||
- Storing data for analysis by an on-premises or Azure-hosted service.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
```bash
|
||||
pip install azure-storage-blob
|
||||
```
|
||||
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example for the Azure Blob Storage](../modules/indexes/document_loaders/examples/azure_blob_storage_container.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import AzureBlobStorageContainerLoader
|
||||
```
|
||||
|
||||
See a [usage example for the Azure Files](../modules/indexes/document_loaders/examples/azure_blob_storage_file.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import AzureBlobStorageFileLoader
|
||||
```
|
||||
24
docs/integrations/azure_cognitive_search_.md
Normal file
24
docs/integrations/azure_cognitive_search_.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Azure Cognitive Search
|
||||
|
||||
>[Azure Cognitive Search](https://learn.microsoft.com/en-us/azure/search/search-what-is-azure-search) (formerly known as `Azure Search`) is a cloud search service that gives developers infrastructure, APIs, and tools for building a rich search experience over private, heterogeneous content in web, mobile, and enterprise applications.
|
||||
|
||||
>Search is foundational to any app that surfaces text to users, where common scenarios include catalog or document search, online retail apps, or data exploration over proprietary content. When you create a search service, you'll work with the following capabilities:
|
||||
>- A search engine for full text search over a search index containing user-owned content
|
||||
>- Rich indexing, with lexical analysis and optional AI enrichment for content extraction and transformation
|
||||
>- Rich query syntax for text search, fuzzy search, autocomplete, geo-search and more
|
||||
>- Programmability through REST APIs and client libraries in Azure SDKs
|
||||
>- Azure integration at the data layer, machine learning layer, and AI (Cognitive Services)
|
||||
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
See [set up instructions](https://learn.microsoft.com/en-us/azure/search/search-create-service-portal).
|
||||
|
||||
|
||||
## Retriever
|
||||
|
||||
See a [usage example](../modules/indexes/retrievers/examples/azure_cognitive_search.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.retrievers import AzureCognitiveSearchRetriever
|
||||
```
|
||||
50
docs/integrations/azure_openai.md
Normal file
50
docs/integrations/azure_openai.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Azure OpenAI
|
||||
|
||||
>[Microsoft Azure](https://en.wikipedia.org/wiki/Microsoft_Azure), often referred to as `Azure` is a cloud computing platform run by `Microsoft`, which offers access, management, and development of applications and services through global data centers. It provides a range of capabilities, including software as a service (SaaS), platform as a service (PaaS), and infrastructure as a service (IaaS). `Microsoft Azure` supports many programming languages, tools, and frameworks, including Microsoft-specific and third-party software and systems.
|
||||
|
||||
|
||||
>[Azure OpenAI](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/) is an `Azure` service with powerful language models from `OpenAI` including the `GPT-3`, `Codex` and `Embeddings model` series for content generation, summarization, semantic search, and natural language to code translation.
|
||||
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
```bash
|
||||
pip install openai
|
||||
pip install tiktoken
|
||||
```
|
||||
|
||||
|
||||
Set the environment variables to get access to the `Azure OpenAI` service.
|
||||
|
||||
```python
|
||||
import os
|
||||
|
||||
os.environ["OPENAI_API_TYPE"] = "azure"
|
||||
os.environ["OPENAI_API_BASE"] = "https://<your-endpoint.openai.azure.com/"
|
||||
os.environ["OPENAI_API_KEY"] = "your AzureOpenAI key"
|
||||
os.environ["OPENAI_API_VERSION"] = "2023-03-15-preview"
|
||||
```
|
||||
|
||||
## LLM
|
||||
|
||||
See a [usage example](../modules/models/llms/integrations/azure_openai_example.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.llms import AzureOpenAI
|
||||
```
|
||||
|
||||
## Text Embedding Models
|
||||
|
||||
See a [usage example](../modules/models/text_embedding/examples/azureopenai.ipynb)
|
||||
|
||||
```python
|
||||
from langchain.embeddings import OpenAIEmbeddings
|
||||
```
|
||||
|
||||
## Chat Models
|
||||
|
||||
See a [usage example](../modules/models/chat/integrations/azure_chat_openai.ipynb)
|
||||
|
||||
```python
|
||||
from langchain.chat_models import AzureChatOpenAI
|
||||
```
|
||||
79
docs/integrations/bananadev.md
Normal file
79
docs/integrations/bananadev.md
Normal file
@@ -0,0 +1,79 @@
|
||||
# Banana
|
||||
|
||||
This page covers how to use the Banana ecosystem within LangChain.
|
||||
It is broken into two parts: installation and setup, and then references to specific Banana wrappers.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
- Install with `pip install banana-dev`
|
||||
- Get an Banana api key and set it as an environment variable (`BANANA_API_KEY`)
|
||||
|
||||
## Define your Banana Template
|
||||
|
||||
If you want to use an available language model template you can find one [here](https://app.banana.dev/templates/conceptofmind/serverless-template-palmyra-base).
|
||||
This template uses the Palmyra-Base model by [Writer](https://writer.com/product/api/).
|
||||
You can check out an example Banana repository [here](https://github.com/conceptofmind/serverless-template-palmyra-base).
|
||||
|
||||
## Build the Banana app
|
||||
|
||||
Banana Apps must include the "output" key in the return json.
|
||||
There is a rigid response structure.
|
||||
|
||||
```python
|
||||
# Return the results as a dictionary
|
||||
result = {'output': result}
|
||||
```
|
||||
|
||||
An example inference function would be:
|
||||
|
||||
```python
|
||||
def inference(model_inputs:dict) -> dict:
|
||||
global model
|
||||
global tokenizer
|
||||
|
||||
# Parse out your arguments
|
||||
prompt = model_inputs.get('prompt', None)
|
||||
if prompt == None:
|
||||
return {'message': "No prompt provided"}
|
||||
|
||||
# Run the model
|
||||
input_ids = tokenizer.encode(prompt, return_tensors='pt').cuda()
|
||||
output = model.generate(
|
||||
input_ids,
|
||||
max_length=100,
|
||||
do_sample=True,
|
||||
top_k=50,
|
||||
top_p=0.95,
|
||||
num_return_sequences=1,
|
||||
temperature=0.9,
|
||||
early_stopping=True,
|
||||
no_repeat_ngram_size=3,
|
||||
num_beams=5,
|
||||
length_penalty=1.5,
|
||||
repetition_penalty=1.5,
|
||||
bad_words_ids=[[tokenizer.encode(' ', add_prefix_space=True)[0]]]
|
||||
)
|
||||
|
||||
result = tokenizer.decode(output[0], skip_special_tokens=True)
|
||||
# Return the results as a dictionary
|
||||
result = {'output': result}
|
||||
return result
|
||||
```
|
||||
|
||||
You can find a full example of a Banana app [here](https://github.com/conceptofmind/serverless-template-palmyra-base/blob/main/app.py).
|
||||
|
||||
## Wrappers
|
||||
|
||||
### LLM
|
||||
|
||||
There exists an Banana LLM wrapper, which you can access with
|
||||
|
||||
```python
|
||||
from langchain.llms import Banana
|
||||
```
|
||||
|
||||
You need to provide a model key located in the dashboard:
|
||||
|
||||
```python
|
||||
llm = Banana(model_key="YOUR_MODEL_KEY")
|
||||
```
|
||||
93
docs/integrations/beam.md
Normal file
93
docs/integrations/beam.md
Normal file
@@ -0,0 +1,93 @@
|
||||
# Beam
|
||||
|
||||
>[Beam](https://docs.beam.cloud/introduction) makes it easy to run code on GPUs, deploy scalable web APIs,
|
||||
> schedule cron jobs, and run massively parallel workloads — without managing any infrastructure.
|
||||
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
- [Create an account](https://www.beam.cloud/)
|
||||
- Install the Beam CLI with `curl https://raw.githubusercontent.com/slai-labs/get-beam/main/get-beam.sh -sSfL | sh`
|
||||
- Register API keys with `beam configure`
|
||||
- Set environment variables (`BEAM_CLIENT_ID`) and (`BEAM_CLIENT_SECRET`)
|
||||
- Install the Beam SDK:
|
||||
```bash
|
||||
pip install beam-sdk
|
||||
```
|
||||
|
||||
## LLM
|
||||
|
||||
|
||||
```python
|
||||
from langchain.llms.beam import Beam
|
||||
```
|
||||
|
||||
### Example of the Beam app
|
||||
|
||||
This is the environment you’ll be developing against once you start the app.
|
||||
It's also used to define the maximum response length from the model.
|
||||
```python
|
||||
llm = Beam(model_name="gpt2",
|
||||
name="langchain-gpt2-test",
|
||||
cpu=8,
|
||||
memory="32Gi",
|
||||
gpu="A10G",
|
||||
python_version="python3.8",
|
||||
python_packages=[
|
||||
"diffusers[torch]>=0.10",
|
||||
"transformers",
|
||||
"torch",
|
||||
"pillow",
|
||||
"accelerate",
|
||||
"safetensors",
|
||||
"xformers",],
|
||||
max_length="50",
|
||||
verbose=False)
|
||||
```
|
||||
|
||||
### Deploy the Beam app
|
||||
|
||||
Once defined, you can deploy your Beam app by calling your model's `_deploy()` method.
|
||||
|
||||
```python
|
||||
llm._deploy()
|
||||
```
|
||||
|
||||
### Call the Beam app
|
||||
|
||||
Once a beam model is deployed, it can be called by calling your model's `_call()` method.
|
||||
This returns the GPT2 text response to your prompt.
|
||||
|
||||
```python
|
||||
response = llm._call("Running machine learning on a remote GPU")
|
||||
```
|
||||
|
||||
An example script which deploys the model and calls it would be:
|
||||
|
||||
```python
|
||||
from langchain.llms.beam import Beam
|
||||
import time
|
||||
|
||||
llm = Beam(model_name="gpt2",
|
||||
name="langchain-gpt2-test",
|
||||
cpu=8,
|
||||
memory="32Gi",
|
||||
gpu="A10G",
|
||||
python_version="python3.8",
|
||||
python_packages=[
|
||||
"diffusers[torch]>=0.10",
|
||||
"transformers",
|
||||
"torch",
|
||||
"pillow",
|
||||
"accelerate",
|
||||
"safetensors",
|
||||
"xformers",],
|
||||
max_length="50",
|
||||
verbose=False)
|
||||
|
||||
llm._deploy()
|
||||
|
||||
response = llm._call("Running machine learning on a remote GPU")
|
||||
|
||||
print(response)
|
||||
```
|
||||
17
docs/integrations/bilibili.md
Normal file
17
docs/integrations/bilibili.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# BiliBili
|
||||
|
||||
>[Bilibili](https://www.bilibili.tv/) is one of the most beloved long-form video sites in China.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
```bash
|
||||
pip install bilibili-api-python
|
||||
```
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/bilibili.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import BiliBiliLoader
|
||||
```
|
||||
22
docs/integrations/blackboard.md
Normal file
22
docs/integrations/blackboard.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Blackboard
|
||||
|
||||
>[Blackboard Learn](https://en.wikipedia.org/wiki/Blackboard_Learn) (previously the `Blackboard Learning Management System`)
|
||||
> is a web-based virtual learning environment and learning management system developed by Blackboard Inc.
|
||||
> The software features course management, customizable open architecture, and scalable design that allows
|
||||
> integration with student information systems and authentication protocols. It may be installed on local servers,
|
||||
> hosted by `Blackboard ASP Solutions`, or provided as Software as a Service hosted on Amazon Web Services.
|
||||
> Its main purposes are stated to include the addition of online elements to courses traditionally delivered
|
||||
> face-to-face and development of completely online courses with few or no face-to-face meetings.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
There isn't any special setup for it.
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/blackboard.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import BlackboardLoader
|
||||
|
||||
```
|
||||
23
docs/integrations/cassandra.md
Normal file
23
docs/integrations/cassandra.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Cassandra
|
||||
|
||||
>[Cassandra](https://en.wikipedia.org/wiki/Apache_Cassandra) is a free and open-source, distributed, wide-column
|
||||
> store, NoSQL database management system designed to handle large amounts of data across many commodity servers,
|
||||
> providing high availability with no single point of failure. `Cassandra` offers support for clusters spanning
|
||||
> multiple datacenters, with asynchronous masterless replication allowing low latency operations for all clients.
|
||||
> `Cassandra` was designed to implement a combination of `Amazon's Dynamo` distributed storage and replication
|
||||
> techniques combined with `Google's Bigtable` data and storage engine model.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
```bash
|
||||
pip install cassandra-drive
|
||||
```
|
||||
|
||||
|
||||
## Memory
|
||||
|
||||
See a [usage example](../modules/memory/examples/cassandra_chat_message_history.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.memory import CassandraChatMessageHistory
|
||||
```
|
||||
17
docs/integrations/cerebriumai.md
Normal file
17
docs/integrations/cerebriumai.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# CerebriumAI
|
||||
|
||||
This page covers how to use the CerebriumAI ecosystem within LangChain.
|
||||
It is broken into two parts: installation and setup, and then references to specific CerebriumAI wrappers.
|
||||
|
||||
## Installation and Setup
|
||||
- Install with `pip install cerebrium`
|
||||
- Get an CerebriumAI api key and set it as an environment variable (`CEREBRIUMAI_API_KEY`)
|
||||
|
||||
## Wrappers
|
||||
|
||||
### LLM
|
||||
|
||||
There exists an CerebriumAI LLM wrapper, which you can access with
|
||||
```python
|
||||
from langchain.llms import CerebriumAI
|
||||
```
|
||||
29
docs/integrations/chroma.md
Normal file
29
docs/integrations/chroma.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Chroma
|
||||
|
||||
>[Chroma](https://docs.trychroma.com/getting-started) is a database for building AI applications with embeddings.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
```bash
|
||||
pip install chromadb
|
||||
```
|
||||
|
||||
|
||||
## VectorStore
|
||||
|
||||
There exists a wrapper around Chroma vector databases, allowing you to use it as a vectorstore,
|
||||
whether for semantic search or example selection.
|
||||
|
||||
```python
|
||||
from langchain.vectorstores import Chroma
|
||||
```
|
||||
|
||||
For a more detailed walkthrough of the Chroma wrapper, see [this notebook](../modules/indexes/vectorstores/getting_started.ipynb)
|
||||
|
||||
## Retriever
|
||||
|
||||
See a [usage example](../modules/indexes/retrievers/examples/chroma_self_query.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.retrievers import SelfQueryRetriever
|
||||
```
|
||||
609
docs/integrations/clearml_tracking.ipynb
Normal file
609
docs/integrations/clearml_tracking.ipynb
Normal file
@@ -0,0 +1,609 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# ClearML\n",
|
||||
"\n",
|
||||
"> [ClearML](https://github.com/allegroai/clearml) is a ML/DL development and production suite, it contains 5 main modules:\n",
|
||||
"> - `Experiment Manager` - Automagical experiment tracking, environments and results\n",
|
||||
"> - `MLOps` - Orchestration, Automation & Pipelines solution for ML/DL jobs (K8s / Cloud / bare-metal)\n",
|
||||
"> - `Data-Management` - Fully differentiable data management & version control solution on top of object-storage (S3 / GS / Azure / NAS)\n",
|
||||
"> - `Model-Serving` - cloud-ready Scalable model serving solution!\n",
|
||||
" Deploy new model endpoints in under 5 minutes\n",
|
||||
" Includes optimized GPU serving support backed by Nvidia-Triton\n",
|
||||
" with out-of-the-box Model Monitoring\n",
|
||||
"> - `Fire Reports` - Create and share rich MarkDown documents supporting embeddable online content\n",
|
||||
"\n",
|
||||
"In order to properly keep track of your langchain experiments and their results, you can enable the `ClearML` integration. We use the `ClearML Experiment Manager` that neatly tracks and organizes all your experiment runs.\n",
|
||||
"\n",
|
||||
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/hwchase17/langchain/blob/master/docs/ecosystem/clearml_tracking.ipynb\">\n",
|
||||
" <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
|
||||
"</a>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"tags": []
|
||||
},
|
||||
"source": [
|
||||
"## Installation and Setup"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install clearml\n",
|
||||
"!pip install pandas\n",
|
||||
"!pip install textstat\n",
|
||||
"!pip install spacy\n",
|
||||
"!python -m spacy download en_core_web_sm"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Getting API Credentials\n",
|
||||
"\n",
|
||||
"We'll be using quite some APIs in this notebook, here is a list and where to get them:\n",
|
||||
"\n",
|
||||
"- ClearML: https://app.clear.ml/settings/workspace-configuration\n",
|
||||
"- OpenAI: https://platform.openai.com/account/api-keys\n",
|
||||
"- SerpAPI (google search): https://serpapi.com/dashboard"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os\n",
|
||||
"os.environ[\"CLEARML_API_ACCESS_KEY\"] = \"\"\n",
|
||||
"os.environ[\"CLEARML_API_SECRET_KEY\"] = \"\"\n",
|
||||
"\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = \"\"\n",
|
||||
"os.environ[\"SERPAPI_API_KEY\"] = \"\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Callbacks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain.callbacks import ClearMLCallbackHandler"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"The clearml callback is currently in beta and is subject to change based on updates to `langchain`. Please report any issues to https://github.com/allegroai/clearml/issues with the tag `langchain`.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from datetime import datetime\n",
|
||||
"from langchain.callbacks import StdOutCallbackHandler\n",
|
||||
"from langchain.llms import OpenAI\n",
|
||||
"\n",
|
||||
"# Setup and use the ClearML Callback\n",
|
||||
"clearml_callback = ClearMLCallbackHandler(\n",
|
||||
" task_type=\"inference\",\n",
|
||||
" project_name=\"langchain_callback_demo\",\n",
|
||||
" task_name=\"llm\",\n",
|
||||
" tags=[\"test\"],\n",
|
||||
" # Change the following parameters based on the amount of detail you want tracked\n",
|
||||
" visualize=True,\n",
|
||||
" complexity_metrics=True,\n",
|
||||
" stream_logs=True\n",
|
||||
")\n",
|
||||
"callbacks = [StdOutCallbackHandler(), clearml_callback]\n",
|
||||
"# Get the OpenAI model ready to go\n",
|
||||
"llm = OpenAI(temperature=0, callbacks=callbacks)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Scenario 1: Just an LLM\n",
|
||||
"\n",
|
||||
"First, let's just run a single LLM a few times and capture the resulting prompt-answer conversation in ClearML"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"{'action': 'on_llm_start', 'name': 'OpenAI', 'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Tell me a joke'}\n",
|
||||
"{'action': 'on_llm_start', 'name': 'OpenAI', 'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Tell me a poem'}\n",
|
||||
"{'action': 'on_llm_start', 'name': 'OpenAI', 'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Tell me a joke'}\n",
|
||||
"{'action': 'on_llm_start', 'name': 'OpenAI', 'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Tell me a poem'}\n",
|
||||
"{'action': 'on_llm_start', 'name': 'OpenAI', 'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Tell me a joke'}\n",
|
||||
"{'action': 'on_llm_start', 'name': 'OpenAI', 'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Tell me a poem'}\n",
|
||||
"{'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'text': '\\n\\nQ: What did the fish say when it hit the wall?\\nA: Dam!', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 109.04, 'flesch_kincaid_grade': 1.3, 'smog_index': 0.0, 'coleman_liau_index': -1.24, 'automated_readability_index': 0.3, 'dale_chall_readability_score': 5.5, 'difficult_words': 0, 'linsear_write_formula': 5.5, 'gunning_fog': 5.2, 'text_standard': '5th and 6th grade', 'fernandez_huerta': 133.58, 'szigriszt_pazos': 131.54, 'gutierrez_polini': 62.3, 'crawford': -0.2, 'gulpease_index': 79.8, 'osman': 116.91}\n",
|
||||
"{'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'text': '\\n\\nRoses are red,\\nViolets are blue,\\nSugar is sweet,\\nAnd so are you.', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 83.66, 'flesch_kincaid_grade': 4.8, 'smog_index': 0.0, 'coleman_liau_index': 3.23, 'automated_readability_index': 3.9, 'dale_chall_readability_score': 6.71, 'difficult_words': 2, 'linsear_write_formula': 6.5, 'gunning_fog': 8.28, 'text_standard': '6th and 7th grade', 'fernandez_huerta': 115.58, 'szigriszt_pazos': 112.37, 'gutierrez_polini': 54.83, 'crawford': 1.4, 'gulpease_index': 72.1, 'osman': 100.17}\n",
|
||||
"{'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'text': '\\n\\nQ: What did the fish say when it hit the wall?\\nA: Dam!', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 109.04, 'flesch_kincaid_grade': 1.3, 'smog_index': 0.0, 'coleman_liau_index': -1.24, 'automated_readability_index': 0.3, 'dale_chall_readability_score': 5.5, 'difficult_words': 0, 'linsear_write_formula': 5.5, 'gunning_fog': 5.2, 'text_standard': '5th and 6th grade', 'fernandez_huerta': 133.58, 'szigriszt_pazos': 131.54, 'gutierrez_polini': 62.3, 'crawford': -0.2, 'gulpease_index': 79.8, 'osman': 116.91}\n",
|
||||
"{'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'text': '\\n\\nRoses are red,\\nViolets are blue,\\nSugar is sweet,\\nAnd so are you.', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 83.66, 'flesch_kincaid_grade': 4.8, 'smog_index': 0.0, 'coleman_liau_index': 3.23, 'automated_readability_index': 3.9, 'dale_chall_readability_score': 6.71, 'difficult_words': 2, 'linsear_write_formula': 6.5, 'gunning_fog': 8.28, 'text_standard': '6th and 7th grade', 'fernandez_huerta': 115.58, 'szigriszt_pazos': 112.37, 'gutierrez_polini': 54.83, 'crawford': 1.4, 'gulpease_index': 72.1, 'osman': 100.17}\n",
|
||||
"{'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'text': '\\n\\nQ: What did the fish say when it hit the wall?\\nA: Dam!', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 109.04, 'flesch_kincaid_grade': 1.3, 'smog_index': 0.0, 'coleman_liau_index': -1.24, 'automated_readability_index': 0.3, 'dale_chall_readability_score': 5.5, 'difficult_words': 0, 'linsear_write_formula': 5.5, 'gunning_fog': 5.2, 'text_standard': '5th and 6th grade', 'fernandez_huerta': 133.58, 'szigriszt_pazos': 131.54, 'gutierrez_polini': 62.3, 'crawford': -0.2, 'gulpease_index': 79.8, 'osman': 116.91}\n",
|
||||
"{'action': 'on_llm_end', 'token_usage_prompt_tokens': 24, 'token_usage_completion_tokens': 138, 'token_usage_total_tokens': 162, 'model_name': 'text-davinci-003', 'step': 4, 'starts': 2, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 0, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'text': '\\n\\nRoses are red,\\nViolets are blue,\\nSugar is sweet,\\nAnd so are you.', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 83.66, 'flesch_kincaid_grade': 4.8, 'smog_index': 0.0, 'coleman_liau_index': 3.23, 'automated_readability_index': 3.9, 'dale_chall_readability_score': 6.71, 'difficult_words': 2, 'linsear_write_formula': 6.5, 'gunning_fog': 8.28, 'text_standard': '6th and 7th grade', 'fernandez_huerta': 115.58, 'szigriszt_pazos': 112.37, 'gutierrez_polini': 54.83, 'crawford': 1.4, 'gulpease_index': 72.1, 'osman': 100.17}\n",
|
||||
"{'action_records': action name step starts ends errors text_ctr chain_starts \\\n",
|
||||
"0 on_llm_start OpenAI 1 1 0 0 0 0 \n",
|
||||
"1 on_llm_start OpenAI 1 1 0 0 0 0 \n",
|
||||
"2 on_llm_start OpenAI 1 1 0 0 0 0 \n",
|
||||
"3 on_llm_start OpenAI 1 1 0 0 0 0 \n",
|
||||
"4 on_llm_start OpenAI 1 1 0 0 0 0 \n",
|
||||
"5 on_llm_start OpenAI 1 1 0 0 0 0 \n",
|
||||
"6 on_llm_end NaN 2 1 1 0 0 0 \n",
|
||||
"7 on_llm_end NaN 2 1 1 0 0 0 \n",
|
||||
"8 on_llm_end NaN 2 1 1 0 0 0 \n",
|
||||
"9 on_llm_end NaN 2 1 1 0 0 0 \n",
|
||||
"10 on_llm_end NaN 2 1 1 0 0 0 \n",
|
||||
"11 on_llm_end NaN 2 1 1 0 0 0 \n",
|
||||
"12 on_llm_start OpenAI 3 2 1 0 0 0 \n",
|
||||
"13 on_llm_start OpenAI 3 2 1 0 0 0 \n",
|
||||
"14 on_llm_start OpenAI 3 2 1 0 0 0 \n",
|
||||
"15 on_llm_start OpenAI 3 2 1 0 0 0 \n",
|
||||
"16 on_llm_start OpenAI 3 2 1 0 0 0 \n",
|
||||
"17 on_llm_start OpenAI 3 2 1 0 0 0 \n",
|
||||
"18 on_llm_end NaN 4 2 2 0 0 0 \n",
|
||||
"19 on_llm_end NaN 4 2 2 0 0 0 \n",
|
||||
"20 on_llm_end NaN 4 2 2 0 0 0 \n",
|
||||
"21 on_llm_end NaN 4 2 2 0 0 0 \n",
|
||||
"22 on_llm_end NaN 4 2 2 0 0 0 \n",
|
||||
"23 on_llm_end NaN 4 2 2 0 0 0 \n",
|
||||
"\n",
|
||||
" chain_ends llm_starts ... difficult_words linsear_write_formula \\\n",
|
||||
"0 0 1 ... NaN NaN \n",
|
||||
"1 0 1 ... NaN NaN \n",
|
||||
"2 0 1 ... NaN NaN \n",
|
||||
"3 0 1 ... NaN NaN \n",
|
||||
"4 0 1 ... NaN NaN \n",
|
||||
"5 0 1 ... NaN NaN \n",
|
||||
"6 0 1 ... 0.0 5.5 \n",
|
||||
"7 0 1 ... 2.0 6.5 \n",
|
||||
"8 0 1 ... 0.0 5.5 \n",
|
||||
"9 0 1 ... 2.0 6.5 \n",
|
||||
"10 0 1 ... 0.0 5.5 \n",
|
||||
"11 0 1 ... 2.0 6.5 \n",
|
||||
"12 0 2 ... NaN NaN \n",
|
||||
"13 0 2 ... NaN NaN \n",
|
||||
"14 0 2 ... NaN NaN \n",
|
||||
"15 0 2 ... NaN NaN \n",
|
||||
"16 0 2 ... NaN NaN \n",
|
||||
"17 0 2 ... NaN NaN \n",
|
||||
"18 0 2 ... 0.0 5.5 \n",
|
||||
"19 0 2 ... 2.0 6.5 \n",
|
||||
"20 0 2 ... 0.0 5.5 \n",
|
||||
"21 0 2 ... 2.0 6.5 \n",
|
||||
"22 0 2 ... 0.0 5.5 \n",
|
||||
"23 0 2 ... 2.0 6.5 \n",
|
||||
"\n",
|
||||
" gunning_fog text_standard fernandez_huerta szigriszt_pazos \\\n",
|
||||
"0 NaN NaN NaN NaN \n",
|
||||
"1 NaN NaN NaN NaN \n",
|
||||
"2 NaN NaN NaN NaN \n",
|
||||
"3 NaN NaN NaN NaN \n",
|
||||
"4 NaN NaN NaN NaN \n",
|
||||
"5 NaN NaN NaN NaN \n",
|
||||
"6 5.20 5th and 6th grade 133.58 131.54 \n",
|
||||
"7 8.28 6th and 7th grade 115.58 112.37 \n",
|
||||
"8 5.20 5th and 6th grade 133.58 131.54 \n",
|
||||
"9 8.28 6th and 7th grade 115.58 112.37 \n",
|
||||
"10 5.20 5th and 6th grade 133.58 131.54 \n",
|
||||
"11 8.28 6th and 7th grade 115.58 112.37 \n",
|
||||
"12 NaN NaN NaN NaN \n",
|
||||
"13 NaN NaN NaN NaN \n",
|
||||
"14 NaN NaN NaN NaN \n",
|
||||
"15 NaN NaN NaN NaN \n",
|
||||
"16 NaN NaN NaN NaN \n",
|
||||
"17 NaN NaN NaN NaN \n",
|
||||
"18 5.20 5th and 6th grade 133.58 131.54 \n",
|
||||
"19 8.28 6th and 7th grade 115.58 112.37 \n",
|
||||
"20 5.20 5th and 6th grade 133.58 131.54 \n",
|
||||
"21 8.28 6th and 7th grade 115.58 112.37 \n",
|
||||
"22 5.20 5th and 6th grade 133.58 131.54 \n",
|
||||
"23 8.28 6th and 7th grade 115.58 112.37 \n",
|
||||
"\n",
|
||||
" gutierrez_polini crawford gulpease_index osman \n",
|
||||
"0 NaN NaN NaN NaN \n",
|
||||
"1 NaN NaN NaN NaN \n",
|
||||
"2 NaN NaN NaN NaN \n",
|
||||
"3 NaN NaN NaN NaN \n",
|
||||
"4 NaN NaN NaN NaN \n",
|
||||
"5 NaN NaN NaN NaN \n",
|
||||
"6 62.30 -0.2 79.8 116.91 \n",
|
||||
"7 54.83 1.4 72.1 100.17 \n",
|
||||
"8 62.30 -0.2 79.8 116.91 \n",
|
||||
"9 54.83 1.4 72.1 100.17 \n",
|
||||
"10 62.30 -0.2 79.8 116.91 \n",
|
||||
"11 54.83 1.4 72.1 100.17 \n",
|
||||
"12 NaN NaN NaN NaN \n",
|
||||
"13 NaN NaN NaN NaN \n",
|
||||
"14 NaN NaN NaN NaN \n",
|
||||
"15 NaN NaN NaN NaN \n",
|
||||
"16 NaN NaN NaN NaN \n",
|
||||
"17 NaN NaN NaN NaN \n",
|
||||
"18 62.30 -0.2 79.8 116.91 \n",
|
||||
"19 54.83 1.4 72.1 100.17 \n",
|
||||
"20 62.30 -0.2 79.8 116.91 \n",
|
||||
"21 54.83 1.4 72.1 100.17 \n",
|
||||
"22 62.30 -0.2 79.8 116.91 \n",
|
||||
"23 54.83 1.4 72.1 100.17 \n",
|
||||
"\n",
|
||||
"[24 rows x 39 columns], 'session_analysis': prompt_step prompts name output_step \\\n",
|
||||
"0 1 Tell me a joke OpenAI 2 \n",
|
||||
"1 1 Tell me a poem OpenAI 2 \n",
|
||||
"2 1 Tell me a joke OpenAI 2 \n",
|
||||
"3 1 Tell me a poem OpenAI 2 \n",
|
||||
"4 1 Tell me a joke OpenAI 2 \n",
|
||||
"5 1 Tell me a poem OpenAI 2 \n",
|
||||
"6 3 Tell me a joke OpenAI 4 \n",
|
||||
"7 3 Tell me a poem OpenAI 4 \n",
|
||||
"8 3 Tell me a joke OpenAI 4 \n",
|
||||
"9 3 Tell me a poem OpenAI 4 \n",
|
||||
"10 3 Tell me a joke OpenAI 4 \n",
|
||||
"11 3 Tell me a poem OpenAI 4 \n",
|
||||
"\n",
|
||||
" output \\\n",
|
||||
"0 \\n\\nQ: What did the fish say when it hit the w... \n",
|
||||
"1 \\n\\nRoses are red,\\nViolets are blue,\\nSugar i... \n",
|
||||
"2 \\n\\nQ: What did the fish say when it hit the w... \n",
|
||||
"3 \\n\\nRoses are red,\\nViolets are blue,\\nSugar i... \n",
|
||||
"4 \\n\\nQ: What did the fish say when it hit the w... \n",
|
||||
"5 \\n\\nRoses are red,\\nViolets are blue,\\nSugar i... \n",
|
||||
"6 \\n\\nQ: What did the fish say when it hit the w... \n",
|
||||
"7 \\n\\nRoses are red,\\nViolets are blue,\\nSugar i... \n",
|
||||
"8 \\n\\nQ: What did the fish say when it hit the w... \n",
|
||||
"9 \\n\\nRoses are red,\\nViolets are blue,\\nSugar i... \n",
|
||||
"10 \\n\\nQ: What did the fish say when it hit the w... \n",
|
||||
"11 \\n\\nRoses are red,\\nViolets are blue,\\nSugar i... \n",
|
||||
"\n",
|
||||
" token_usage_total_tokens token_usage_prompt_tokens \\\n",
|
||||
"0 162 24 \n",
|
||||
"1 162 24 \n",
|
||||
"2 162 24 \n",
|
||||
"3 162 24 \n",
|
||||
"4 162 24 \n",
|
||||
"5 162 24 \n",
|
||||
"6 162 24 \n",
|
||||
"7 162 24 \n",
|
||||
"8 162 24 \n",
|
||||
"9 162 24 \n",
|
||||
"10 162 24 \n",
|
||||
"11 162 24 \n",
|
||||
"\n",
|
||||
" token_usage_completion_tokens flesch_reading_ease flesch_kincaid_grade \\\n",
|
||||
"0 138 109.04 1.3 \n",
|
||||
"1 138 83.66 4.8 \n",
|
||||
"2 138 109.04 1.3 \n",
|
||||
"3 138 83.66 4.8 \n",
|
||||
"4 138 109.04 1.3 \n",
|
||||
"5 138 83.66 4.8 \n",
|
||||
"6 138 109.04 1.3 \n",
|
||||
"7 138 83.66 4.8 \n",
|
||||
"8 138 109.04 1.3 \n",
|
||||
"9 138 83.66 4.8 \n",
|
||||
"10 138 109.04 1.3 \n",
|
||||
"11 138 83.66 4.8 \n",
|
||||
"\n",
|
||||
" ... difficult_words linsear_write_formula gunning_fog \\\n",
|
||||
"0 ... 0 5.5 5.20 \n",
|
||||
"1 ... 2 6.5 8.28 \n",
|
||||
"2 ... 0 5.5 5.20 \n",
|
||||
"3 ... 2 6.5 8.28 \n",
|
||||
"4 ... 0 5.5 5.20 \n",
|
||||
"5 ... 2 6.5 8.28 \n",
|
||||
"6 ... 0 5.5 5.20 \n",
|
||||
"7 ... 2 6.5 8.28 \n",
|
||||
"8 ... 0 5.5 5.20 \n",
|
||||
"9 ... 2 6.5 8.28 \n",
|
||||
"10 ... 0 5.5 5.20 \n",
|
||||
"11 ... 2 6.5 8.28 \n",
|
||||
"\n",
|
||||
" text_standard fernandez_huerta szigriszt_pazos gutierrez_polini \\\n",
|
||||
"0 5th and 6th grade 133.58 131.54 62.30 \n",
|
||||
"1 6th and 7th grade 115.58 112.37 54.83 \n",
|
||||
"2 5th and 6th grade 133.58 131.54 62.30 \n",
|
||||
"3 6th and 7th grade 115.58 112.37 54.83 \n",
|
||||
"4 5th and 6th grade 133.58 131.54 62.30 \n",
|
||||
"5 6th and 7th grade 115.58 112.37 54.83 \n",
|
||||
"6 5th and 6th grade 133.58 131.54 62.30 \n",
|
||||
"7 6th and 7th grade 115.58 112.37 54.83 \n",
|
||||
"8 5th and 6th grade 133.58 131.54 62.30 \n",
|
||||
"9 6th and 7th grade 115.58 112.37 54.83 \n",
|
||||
"10 5th and 6th grade 133.58 131.54 62.30 \n",
|
||||
"11 6th and 7th grade 115.58 112.37 54.83 \n",
|
||||
"\n",
|
||||
" crawford gulpease_index osman \n",
|
||||
"0 -0.2 79.8 116.91 \n",
|
||||
"1 1.4 72.1 100.17 \n",
|
||||
"2 -0.2 79.8 116.91 \n",
|
||||
"3 1.4 72.1 100.17 \n",
|
||||
"4 -0.2 79.8 116.91 \n",
|
||||
"5 1.4 72.1 100.17 \n",
|
||||
"6 -0.2 79.8 116.91 \n",
|
||||
"7 1.4 72.1 100.17 \n",
|
||||
"8 -0.2 79.8 116.91 \n",
|
||||
"9 1.4 72.1 100.17 \n",
|
||||
"10 -0.2 79.8 116.91 \n",
|
||||
"11 1.4 72.1 100.17 \n",
|
||||
"\n",
|
||||
"[12 rows x 24 columns]}\n",
|
||||
"2023-03-29 14:00:25,948 - clearml.Task - INFO - Completed model upload to https://files.clear.ml/langchain_callback_demo/llm.988bd727b0e94a29a3ac0ee526813545/models/simple_sequential\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# SCENARIO 1 - LLM\n",
|
||||
"llm_result = llm.generate([\"Tell me a joke\", \"Tell me a poem\"] * 3)\n",
|
||||
"# After every generation run, use flush to make sure all the metrics\n",
|
||||
"# prompts and other output are properly saved separately\n",
|
||||
"clearml_callback.flush_tracker(langchain_asset=llm, name=\"simple_sequential\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"At this point you can already go to https://app.clear.ml and take a look at the resulting ClearML Task that was created.\n",
|
||||
"\n",
|
||||
"Among others, you should see that this notebook is saved along with any git information. The model JSON that contains the used parameters is saved as an artifact, there are also console logs and under the plots section, you'll find tables that represent the flow of the chain.\n",
|
||||
"\n",
|
||||
"Finally, if you enabled visualizations, these are stored as HTML files under debug samples."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Scenario 2: Creating an agent with tools\n",
|
||||
"\n",
|
||||
"To show a more advanced workflow, let's create an agent with access to tools. The way ClearML tracks the results is not different though, only the table will look slightly different as there are other types of actions taken when compared to the earlier, simpler example.\n",
|
||||
"\n",
|
||||
"You can now also see the use of the `finish=True` keyword, which will fully close the ClearML Task, instead of just resetting the parameters and prompts for a new conversation."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
"\n",
|
||||
"\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
|
||||
"{'action': 'on_chain_start', 'name': 'AgentExecutor', 'step': 1, 'starts': 1, 'ends': 0, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 0, 'llm_ends': 0, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'input': 'Who is the wife of the person who sang summer of 69?'}\n",
|
||||
"{'action': 'on_llm_start', 'name': 'OpenAI', 'step': 2, 'starts': 2, 'ends': 0, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 1, 'llm_ends': 0, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'prompts': 'Answer the following questions as best you can. You have access to the following tools:\\n\\nSearch: A search engine. Useful for when you need to answer questions about current events. Input should be a search query.\\nCalculator: Useful for when you need to answer questions about math.\\n\\nUse the following format:\\n\\nQuestion: the input question you must answer\\nThought: you should always think about what to do\\nAction: the action to take, should be one of [Search, Calculator]\\nAction Input: the input to the action\\nObservation: the result of the action\\n... (this Thought/Action/Action Input/Observation can repeat N times)\\nThought: I now know the final answer\\nFinal Answer: the final answer to the original input question\\n\\nBegin!\\n\\nQuestion: Who is the wife of the person who sang summer of 69?\\nThought:'}\n",
|
||||
"{'action': 'on_llm_end', 'token_usage_prompt_tokens': 189, 'token_usage_completion_tokens': 34, 'token_usage_total_tokens': 223, 'model_name': 'text-davinci-003', 'step': 3, 'starts': 2, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 1, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 0, 'tool_ends': 0, 'agent_ends': 0, 'text': ' I need to find out who sang summer of 69 and then find out who their wife is.\\nAction: Search\\nAction Input: \"Who sang summer of 69\"', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 91.61, 'flesch_kincaid_grade': 3.8, 'smog_index': 0.0, 'coleman_liau_index': 3.41, 'automated_readability_index': 3.5, 'dale_chall_readability_score': 6.06, 'difficult_words': 2, 'linsear_write_formula': 5.75, 'gunning_fog': 5.4, 'text_standard': '3rd and 4th grade', 'fernandez_huerta': 121.07, 'szigriszt_pazos': 119.5, 'gutierrez_polini': 54.91, 'crawford': 0.9, 'gulpease_index': 72.7, 'osman': 92.16}\n",
|
||||
"\u001b[32;1m\u001b[1;3m I need to find out who sang summer of 69 and then find out who their wife is.\n",
|
||||
"Action: Search\n",
|
||||
"Action Input: \"Who sang summer of 69\"\u001b[0m{'action': 'on_agent_action', 'tool': 'Search', 'tool_input': 'Who sang summer of 69', 'log': ' I need to find out who sang summer of 69 and then find out who their wife is.\\nAction: Search\\nAction Input: \"Who sang summer of 69\"', 'step': 4, 'starts': 3, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 1, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 1, 'tool_ends': 0, 'agent_ends': 0}\n",
|
||||
"{'action': 'on_tool_start', 'input_str': 'Who sang summer of 69', 'name': 'Search', 'description': 'A search engine. Useful for when you need to answer questions about current events. Input should be a search query.', 'step': 5, 'starts': 4, 'ends': 1, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 1, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 2, 'tool_ends': 0, 'agent_ends': 0}\n",
|
||||
"\n",
|
||||
"Observation: \u001b[36;1m\u001b[1;3mBryan Adams - Summer Of 69 (Official Music Video).\u001b[0m\n",
|
||||
"Thought:{'action': 'on_tool_end', 'output': 'Bryan Adams - Summer Of 69 (Official Music Video).', 'step': 6, 'starts': 4, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 1, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 2, 'tool_ends': 1, 'agent_ends': 0}\n",
|
||||
"{'action': 'on_llm_start', 'name': 'OpenAI', 'step': 7, 'starts': 5, 'ends': 2, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 1, 'llm_streams': 0, 'tool_starts': 2, 'tool_ends': 1, 'agent_ends': 0, 'prompts': 'Answer the following questions as best you can. You have access to the following tools:\\n\\nSearch: A search engine. Useful for when you need to answer questions about current events. Input should be a search query.\\nCalculator: Useful for when you need to answer questions about math.\\n\\nUse the following format:\\n\\nQuestion: the input question you must answer\\nThought: you should always think about what to do\\nAction: the action to take, should be one of [Search, Calculator]\\nAction Input: the input to the action\\nObservation: the result of the action\\n... (this Thought/Action/Action Input/Observation can repeat N times)\\nThought: I now know the final answer\\nFinal Answer: the final answer to the original input question\\n\\nBegin!\\n\\nQuestion: Who is the wife of the person who sang summer of 69?\\nThought: I need to find out who sang summer of 69 and then find out who their wife is.\\nAction: Search\\nAction Input: \"Who sang summer of 69\"\\nObservation: Bryan Adams - Summer Of 69 (Official Music Video).\\nThought:'}\n",
|
||||
"{'action': 'on_llm_end', 'token_usage_prompt_tokens': 242, 'token_usage_completion_tokens': 28, 'token_usage_total_tokens': 270, 'model_name': 'text-davinci-003', 'step': 8, 'starts': 5, 'ends': 3, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 2, 'tool_ends': 1, 'agent_ends': 0, 'text': ' I need to find out who Bryan Adams is married to.\\nAction: Search\\nAction Input: \"Who is Bryan Adams married to\"', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 94.66, 'flesch_kincaid_grade': 2.7, 'smog_index': 0.0, 'coleman_liau_index': 4.73, 'automated_readability_index': 4.0, 'dale_chall_readability_score': 7.16, 'difficult_words': 2, 'linsear_write_formula': 4.25, 'gunning_fog': 4.2, 'text_standard': '4th and 5th grade', 'fernandez_huerta': 124.13, 'szigriszt_pazos': 119.2, 'gutierrez_polini': 52.26, 'crawford': 0.7, 'gulpease_index': 74.7, 'osman': 84.2}\n",
|
||||
"\u001b[32;1m\u001b[1;3m I need to find out who Bryan Adams is married to.\n",
|
||||
"Action: Search\n",
|
||||
"Action Input: \"Who is Bryan Adams married to\"\u001b[0m{'action': 'on_agent_action', 'tool': 'Search', 'tool_input': 'Who is Bryan Adams married to', 'log': ' I need to find out who Bryan Adams is married to.\\nAction: Search\\nAction Input: \"Who is Bryan Adams married to\"', 'step': 9, 'starts': 6, 'ends': 3, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 3, 'tool_ends': 1, 'agent_ends': 0}\n",
|
||||
"{'action': 'on_tool_start', 'input_str': 'Who is Bryan Adams married to', 'name': 'Search', 'description': 'A search engine. Useful for when you need to answer questions about current events. Input should be a search query.', 'step': 10, 'starts': 7, 'ends': 3, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 4, 'tool_ends': 1, 'agent_ends': 0}\n",
|
||||
"\n",
|
||||
"Observation: \u001b[36;1m\u001b[1;3mBryan Adams has never married. In the 1990s, he was in a relationship with Danish model Cecilie Thomsen. In 2011, Bryan and Alicia Grimaldi, his ...\u001b[0m\n",
|
||||
"Thought:{'action': 'on_tool_end', 'output': 'Bryan Adams has never married. In the 1990s, he was in a relationship with Danish model Cecilie Thomsen. In 2011, Bryan and Alicia Grimaldi, his ...', 'step': 11, 'starts': 7, 'ends': 4, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 2, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 4, 'tool_ends': 2, 'agent_ends': 0}\n",
|
||||
"{'action': 'on_llm_start', 'name': 'OpenAI', 'step': 12, 'starts': 8, 'ends': 4, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 3, 'llm_ends': 2, 'llm_streams': 0, 'tool_starts': 4, 'tool_ends': 2, 'agent_ends': 0, 'prompts': 'Answer the following questions as best you can. You have access to the following tools:\\n\\nSearch: A search engine. Useful for when you need to answer questions about current events. Input should be a search query.\\nCalculator: Useful for when you need to answer questions about math.\\n\\nUse the following format:\\n\\nQuestion: the input question you must answer\\nThought: you should always think about what to do\\nAction: the action to take, should be one of [Search, Calculator]\\nAction Input: the input to the action\\nObservation: the result of the action\\n... (this Thought/Action/Action Input/Observation can repeat N times)\\nThought: I now know the final answer\\nFinal Answer: the final answer to the original input question\\n\\nBegin!\\n\\nQuestion: Who is the wife of the person who sang summer of 69?\\nThought: I need to find out who sang summer of 69 and then find out who their wife is.\\nAction: Search\\nAction Input: \"Who sang summer of 69\"\\nObservation: Bryan Adams - Summer Of 69 (Official Music Video).\\nThought: I need to find out who Bryan Adams is married to.\\nAction: Search\\nAction Input: \"Who is Bryan Adams married to\"\\nObservation: Bryan Adams has never married. In the 1990s, he was in a relationship with Danish model Cecilie Thomsen. In 2011, Bryan and Alicia Grimaldi, his ...\\nThought:'}\n",
|
||||
"{'action': 'on_llm_end', 'token_usage_prompt_tokens': 314, 'token_usage_completion_tokens': 18, 'token_usage_total_tokens': 332, 'model_name': 'text-davinci-003', 'step': 13, 'starts': 8, 'ends': 5, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 3, 'llm_ends': 3, 'llm_streams': 0, 'tool_starts': 4, 'tool_ends': 2, 'agent_ends': 0, 'text': ' I now know the final answer.\\nFinal Answer: Bryan Adams has never been married.', 'generation_info_finish_reason': 'stop', 'generation_info_logprobs': None, 'flesch_reading_ease': 81.29, 'flesch_kincaid_grade': 3.7, 'smog_index': 0.0, 'coleman_liau_index': 5.75, 'automated_readability_index': 3.9, 'dale_chall_readability_score': 7.37, 'difficult_words': 1, 'linsear_write_formula': 2.5, 'gunning_fog': 2.8, 'text_standard': '3rd and 4th grade', 'fernandez_huerta': 115.7, 'szigriszt_pazos': 110.84, 'gutierrez_polini': 49.79, 'crawford': 0.7, 'gulpease_index': 85.4, 'osman': 83.14}\n",
|
||||
"\u001b[32;1m\u001b[1;3m I now know the final answer.\n",
|
||||
"Final Answer: Bryan Adams has never been married.\u001b[0m\n",
|
||||
"{'action': 'on_agent_finish', 'output': 'Bryan Adams has never been married.', 'log': ' I now know the final answer.\\nFinal Answer: Bryan Adams has never been married.', 'step': 14, 'starts': 8, 'ends': 6, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 0, 'llm_starts': 3, 'llm_ends': 3, 'llm_streams': 0, 'tool_starts': 4, 'tool_ends': 2, 'agent_ends': 1}\n",
|
||||
"\n",
|
||||
"\u001b[1m> Finished chain.\u001b[0m\n",
|
||||
"{'action': 'on_chain_end', 'outputs': 'Bryan Adams has never been married.', 'step': 15, 'starts': 8, 'ends': 7, 'errors': 0, 'text_ctr': 0, 'chain_starts': 1, 'chain_ends': 1, 'llm_starts': 3, 'llm_ends': 3, 'llm_streams': 0, 'tool_starts': 4, 'tool_ends': 2, 'agent_ends': 1}\n",
|
||||
"{'action_records': action name step starts ends errors text_ctr \\\n",
|
||||
"0 on_llm_start OpenAI 1 1 0 0 0 \n",
|
||||
"1 on_llm_start OpenAI 1 1 0 0 0 \n",
|
||||
"2 on_llm_start OpenAI 1 1 0 0 0 \n",
|
||||
"3 on_llm_start OpenAI 1 1 0 0 0 \n",
|
||||
"4 on_llm_start OpenAI 1 1 0 0 0 \n",
|
||||
".. ... ... ... ... ... ... ... \n",
|
||||
"66 on_tool_end NaN 11 7 4 0 0 \n",
|
||||
"67 on_llm_start OpenAI 12 8 4 0 0 \n",
|
||||
"68 on_llm_end NaN 13 8 5 0 0 \n",
|
||||
"69 on_agent_finish NaN 14 8 6 0 0 \n",
|
||||
"70 on_chain_end NaN 15 8 7 0 0 \n",
|
||||
"\n",
|
||||
" chain_starts chain_ends llm_starts ... gulpease_index osman input \\\n",
|
||||
"0 0 0 1 ... NaN NaN NaN \n",
|
||||
"1 0 0 1 ... NaN NaN NaN \n",
|
||||
"2 0 0 1 ... NaN NaN NaN \n",
|
||||
"3 0 0 1 ... NaN NaN NaN \n",
|
||||
"4 0 0 1 ... NaN NaN NaN \n",
|
||||
".. ... ... ... ... ... ... ... \n",
|
||||
"66 1 0 2 ... NaN NaN NaN \n",
|
||||
"67 1 0 3 ... NaN NaN NaN \n",
|
||||
"68 1 0 3 ... 85.4 83.14 NaN \n",
|
||||
"69 1 0 3 ... NaN NaN NaN \n",
|
||||
"70 1 1 3 ... NaN NaN NaN \n",
|
||||
"\n",
|
||||
" tool tool_input log \\\n",
|
||||
"0 NaN NaN NaN \n",
|
||||
"1 NaN NaN NaN \n",
|
||||
"2 NaN NaN NaN \n",
|
||||
"3 NaN NaN NaN \n",
|
||||
"4 NaN NaN NaN \n",
|
||||
".. ... ... ... \n",
|
||||
"66 NaN NaN NaN \n",
|
||||
"67 NaN NaN NaN \n",
|
||||
"68 NaN NaN NaN \n",
|
||||
"69 NaN NaN I now know the final answer.\\nFinal Answer: B... \n",
|
||||
"70 NaN NaN NaN \n",
|
||||
"\n",
|
||||
" input_str description output \\\n",
|
||||
"0 NaN NaN NaN \n",
|
||||
"1 NaN NaN NaN \n",
|
||||
"2 NaN NaN NaN \n",
|
||||
"3 NaN NaN NaN \n",
|
||||
"4 NaN NaN NaN \n",
|
||||
".. ... ... ... \n",
|
||||
"66 NaN NaN Bryan Adams has never married. In the 1990s, h... \n",
|
||||
"67 NaN NaN NaN \n",
|
||||
"68 NaN NaN NaN \n",
|
||||
"69 NaN NaN Bryan Adams has never been married. \n",
|
||||
"70 NaN NaN NaN \n",
|
||||
"\n",
|
||||
" outputs \n",
|
||||
"0 NaN \n",
|
||||
"1 NaN \n",
|
||||
"2 NaN \n",
|
||||
"3 NaN \n",
|
||||
"4 NaN \n",
|
||||
".. ... \n",
|
||||
"66 NaN \n",
|
||||
"67 NaN \n",
|
||||
"68 NaN \n",
|
||||
"69 NaN \n",
|
||||
"70 Bryan Adams has never been married. \n",
|
||||
"\n",
|
||||
"[71 rows x 47 columns], 'session_analysis': prompt_step prompts name \\\n",
|
||||
"0 2 Answer the following questions as best you can... OpenAI \n",
|
||||
"1 7 Answer the following questions as best you can... OpenAI \n",
|
||||
"2 12 Answer the following questions as best you can... OpenAI \n",
|
||||
"\n",
|
||||
" output_step output \\\n",
|
||||
"0 3 I need to find out who sang summer of 69 and ... \n",
|
||||
"1 8 I need to find out who Bryan Adams is married... \n",
|
||||
"2 13 I now know the final answer.\\nFinal Answer: B... \n",
|
||||
"\n",
|
||||
" token_usage_total_tokens token_usage_prompt_tokens \\\n",
|
||||
"0 223 189 \n",
|
||||
"1 270 242 \n",
|
||||
"2 332 314 \n",
|
||||
"\n",
|
||||
" token_usage_completion_tokens flesch_reading_ease flesch_kincaid_grade \\\n",
|
||||
"0 34 91.61 3.8 \n",
|
||||
"1 28 94.66 2.7 \n",
|
||||
"2 18 81.29 3.7 \n",
|
||||
"\n",
|
||||
" ... difficult_words linsear_write_formula gunning_fog \\\n",
|
||||
"0 ... 2 5.75 5.4 \n",
|
||||
"1 ... 2 4.25 4.2 \n",
|
||||
"2 ... 1 2.50 2.8 \n",
|
||||
"\n",
|
||||
" text_standard fernandez_huerta szigriszt_pazos gutierrez_polini \\\n",
|
||||
"0 3rd and 4th grade 121.07 119.50 54.91 \n",
|
||||
"1 4th and 5th grade 124.13 119.20 52.26 \n",
|
||||
"2 3rd and 4th grade 115.70 110.84 49.79 \n",
|
||||
"\n",
|
||||
" crawford gulpease_index osman \n",
|
||||
"0 0.9 72.7 92.16 \n",
|
||||
"1 0.7 74.7 84.20 \n",
|
||||
"2 0.7 85.4 83.14 \n",
|
||||
"\n",
|
||||
"[3 rows x 24 columns]}\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Could not update last created model in Task 988bd727b0e94a29a3ac0ee526813545, Task status 'completed' cannot be updated\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from langchain.agents import initialize_agent, load_tools\n",
|
||||
"from langchain.agents import AgentType\n",
|
||||
"\n",
|
||||
"# SCENARIO 2 - Agent with Tools\n",
|
||||
"tools = load_tools([\"serpapi\", \"llm-math\"], llm=llm, callbacks=callbacks)\n",
|
||||
"agent = initialize_agent(\n",
|
||||
" tools,\n",
|
||||
" llm,\n",
|
||||
" agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,\n",
|
||||
" callbacks=callbacks,\n",
|
||||
")\n",
|
||||
"agent.run(\n",
|
||||
" \"Who is the wife of the person who sang summer of 69?\"\n",
|
||||
")\n",
|
||||
"clearml_callback.flush_tracker(langchain_asset=agent, name=\"Agent with Tools\", finish=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Tips and Next Steps\n",
|
||||
"\n",
|
||||
"- Make sure you always use a unique `name` argument for the `clearml_callback.flush_tracker` function. If not, the model parameters used for a run will override the previous run!\n",
|
||||
"\n",
|
||||
"- If you close the ClearML Callback using `clearml_callback.flush_tracker(..., finish=True)` the Callback cannot be used anymore. Make a new one if you want to keep logging.\n",
|
||||
"\n",
|
||||
"- Check out the rest of the open source ClearML ecosystem, there is a data version manager, a remote execution agent, automated pipelines and much more!\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"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.10.6"
|
||||
},
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "a53ebf4a859167383b364e7e7521d0add3c2dbbdecce4edf676e8c4634ff3fbb"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 4
|
||||
}
|
||||
52
docs/integrations/clickhouse.md
Normal file
52
docs/integrations/clickhouse.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# ClickHouse
|
||||
|
||||
This page covers how to use ClickHouse Vector Search within LangChain.
|
||||
|
||||
[ClickHouse](https://clickhouse.com) is a open source real-time OLAP database with full SQL support and a wide range of functions to assist users in writing analytical queries. Some of these functions and data structures perform distance operations between vectors, enabling ClickHouse to be used as a vector database.
|
||||
|
||||
Due to the fully parallelized query pipeline, ClickHouse can process vector search operations very quickly, especially when performing exact matching through a linear scan over all rows, delivering processing speed comparable to dedicated vector databases.
|
||||
|
||||
High compression levels, tunable through custom compression codecs, enable very large datasets to be stored and queried. ClickHouse is not memory-bound, allowing multi-TB datasets containing embeddings to be queried.
|
||||
|
||||
The capabilities for computing the distance between two vectors are just another SQL function and can be effectively combined with more traditional SQL filtering and aggregation capabilities. This allows vectors to be stored and queried alongside metadata, and even rich text, enabling a broad array of use cases and applications.
|
||||
|
||||
Finally, experimental ClickHouse capabilities like [Approximate Nearest Neighbour (ANN) indices](https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/annindexes) support faster approximate matching of vectors and provide a promising development aimed to further enhance the vector matching capabilities of ClickHouse.
|
||||
|
||||
## Installation
|
||||
- Install clickhouse server by [binary](https://clickhouse.com/docs/en/install) or [docker image](https://hub.docker.com/r/clickhouse/clickhouse-server/)
|
||||
- Install the Python SDK with `pip install clickhouse-connect`
|
||||
|
||||
### Configure clickhouse vector index
|
||||
|
||||
Customize `ClickhouseSettings` object with parameters
|
||||
|
||||
```python
|
||||
from langchain.vectorstores import ClickHouse, ClickhouseSettings
|
||||
config = ClickhouseSettings(host="<clickhouse-server-host>", port=8123, ...)
|
||||
index = Clickhouse(embedding_function, config)
|
||||
index.add_documents(...)
|
||||
```
|
||||
|
||||
## Wrappers
|
||||
supported functions:
|
||||
- `add_texts`
|
||||
- `add_documents`
|
||||
- `from_texts`
|
||||
- `from_documents`
|
||||
- `similarity_search`
|
||||
- `asimilarity_search`
|
||||
- `similarity_search_by_vector`
|
||||
- `asimilarity_search_by_vector`
|
||||
- `similarity_search_with_relevance_scores`
|
||||
|
||||
### VectorStore
|
||||
|
||||
There exists a wrapper around open source Clickhouse database, allowing you to use it as a vectorstore,
|
||||
whether for semantic search or similar example retrieval.
|
||||
|
||||
To import this vectorstore:
|
||||
```python
|
||||
from langchain.vectorstores import Clickhouse
|
||||
```
|
||||
|
||||
For a more detailed walkthrough of the MyScale wrapper, see [this notebook](../modules/indexes/vectorstores/examples/clickhouse.ipynb)
|
||||
38
docs/integrations/cohere.md
Normal file
38
docs/integrations/cohere.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# Cohere
|
||||
|
||||
>[Cohere](https://cohere.ai/about) is a Canadian startup that provides natural language processing models
|
||||
> that help companies improve human-machine interactions.
|
||||
|
||||
## Installation and Setup
|
||||
- Install the Python SDK :
|
||||
```bash
|
||||
pip install cohere
|
||||
```
|
||||
|
||||
Get a [Cohere api key](https://dashboard.cohere.ai/) and set it as an environment variable (`COHERE_API_KEY`)
|
||||
|
||||
|
||||
## LLM
|
||||
|
||||
There exists an Cohere LLM wrapper, which you can access with
|
||||
See a [usage example](../modules/models/llms/integrations/cohere.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.llms import Cohere
|
||||
```
|
||||
|
||||
## Text Embedding Model
|
||||
|
||||
There exists an Cohere Embedding model, which you can access with
|
||||
```python
|
||||
from langchain.embeddings import CohereEmbeddings
|
||||
```
|
||||
For a more detailed walkthrough of this, see [this notebook](../modules/models/text_embedding/examples/cohere.ipynb)
|
||||
|
||||
## Retriever
|
||||
|
||||
See a [usage example](../modules/indexes/retrievers/examples/cohere-reranker.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.retrievers.document_compressors import CohereRerank
|
||||
```
|
||||
16
docs/integrations/college_confidential.md
Normal file
16
docs/integrations/college_confidential.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# College Confidential
|
||||
|
||||
>[College Confidential](https://www.collegeconfidential.com/) gives information on 3,800+ colleges and universities.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
There isn't any special setup for it.
|
||||
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/college_confidential.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import CollegeConfidentialLoader
|
||||
```
|
||||
347
docs/integrations/comet_tracking.ipynb
Normal file
347
docs/integrations/comet_tracking.ipynb
Normal file
@@ -0,0 +1,347 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Comet"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"In this guide we will demonstrate how to track your Langchain Experiments, Evaluation Metrics, and LLM Sessions with [Comet](https://www.comet.com/site/?utm_source=langchain&utm_medium=referral&utm_campaign=comet_notebook). \n",
|
||||
"\n",
|
||||
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/hwchase17/langchain/blob/master/docs/ecosystem/comet_tracking.ipynb\">\n",
|
||||
" <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
|
||||
"</a>\n",
|
||||
"\n",
|
||||
"**Example Project:** [Comet with LangChain](https://www.comet.com/examples/comet-example-langchain/view/b5ZThK6OFdhKWVSP3fDfRtrNF/panels?utm_source=langchain&utm_medium=referral&utm_campaign=comet_notebook)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"<img width=\"1280\" alt=\"comet-langchain\" src=\"https://user-images.githubusercontent.com/7529846/230326720-a9711435-9c6f-4edb-a707-94b67271ab25.png\">\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Install Comet and Dependencies"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%pip install comet_ml langchain openai google-search-results spacy textstat pandas\n",
|
||||
"\n",
|
||||
"import sys\n",
|
||||
"!{sys.executable} -m spacy download en_core_web_sm"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Initialize Comet and Set your Credentials"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"You can grab your [Comet API Key here](https://www.comet.com/signup?utm_source=langchain&utm_medium=referral&utm_campaign=comet_notebook) or click the link after initializing Comet"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import comet_ml\n",
|
||||
"\n",
|
||||
"comet_ml.init(project_name=\"comet-example-langchain\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Set OpenAI and SerpAPI credentials"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"You will need an [OpenAI API Key](https://platform.openai.com/account/api-keys) and a [SerpAPI API Key](https://serpapi.com/dashboard) to run the following examples"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os\n",
|
||||
"\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = \"...\"\n",
|
||||
"#os.environ[\"OPENAI_ORGANIZATION\"] = \"...\"\n",
|
||||
"os.environ[\"SERPAPI_API_KEY\"] = \"...\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Scenario 1: Using just an LLM"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from datetime import datetime\n",
|
||||
"\n",
|
||||
"from langchain.callbacks import CometCallbackHandler, StdOutCallbackHandler\n",
|
||||
"from langchain.llms import OpenAI\n",
|
||||
"\n",
|
||||
"comet_callback = CometCallbackHandler(\n",
|
||||
" project_name=\"comet-example-langchain\",\n",
|
||||
" complexity_metrics=True,\n",
|
||||
" stream_logs=True,\n",
|
||||
" tags=[\"llm\"],\n",
|
||||
" visualizations=[\"dep\"],\n",
|
||||
")\n",
|
||||
"callbacks = [StdOutCallbackHandler(), comet_callback]\n",
|
||||
"llm = OpenAI(temperature=0.9, callbacks=callbacks, verbose=True)\n",
|
||||
"\n",
|
||||
"llm_result = llm.generate([\"Tell me a joke\", \"Tell me a poem\", \"Tell me a fact\"] * 3)\n",
|
||||
"print(\"LLM result\", llm_result)\n",
|
||||
"comet_callback.flush_tracker(llm, finish=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Scenario 2: Using an LLM in a Chain"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain.callbacks import CometCallbackHandler, StdOutCallbackHandler\n",
|
||||
"from langchain.chains import LLMChain\n",
|
||||
"from langchain.llms import OpenAI\n",
|
||||
"from langchain.prompts import PromptTemplate\n",
|
||||
"\n",
|
||||
"comet_callback = CometCallbackHandler(\n",
|
||||
" complexity_metrics=True,\n",
|
||||
" project_name=\"comet-example-langchain\",\n",
|
||||
" stream_logs=True,\n",
|
||||
" tags=[\"synopsis-chain\"],\n",
|
||||
")\n",
|
||||
"callbacks = [StdOutCallbackHandler(), comet_callback]\n",
|
||||
"llm = OpenAI(temperature=0.9, callbacks=callbacks)\n",
|
||||
"\n",
|
||||
"template = \"\"\"You are a playwright. Given the title of play, it is your job to write a synopsis for that title.\n",
|
||||
"Title: {title}\n",
|
||||
"Playwright: This is a synopsis for the above play:\"\"\"\n",
|
||||
"prompt_template = PromptTemplate(input_variables=[\"title\"], template=template)\n",
|
||||
"synopsis_chain = LLMChain(llm=llm, prompt=prompt_template, callbacks=callbacks)\n",
|
||||
"\n",
|
||||
"test_prompts = [{\"title\": \"Documentary about Bigfoot in Paris\"}]\n",
|
||||
"print(synopsis_chain.apply(test_prompts))\n",
|
||||
"comet_callback.flush_tracker(synopsis_chain, finish=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Scenario 3: Using An Agent with Tools "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain.agents import initialize_agent, load_tools\n",
|
||||
"from langchain.callbacks import CometCallbackHandler, StdOutCallbackHandler\n",
|
||||
"from langchain.llms import OpenAI\n",
|
||||
"\n",
|
||||
"comet_callback = CometCallbackHandler(\n",
|
||||
" project_name=\"comet-example-langchain\",\n",
|
||||
" complexity_metrics=True,\n",
|
||||
" stream_logs=True,\n",
|
||||
" tags=[\"agent\"],\n",
|
||||
")\n",
|
||||
"callbacks = [StdOutCallbackHandler(), comet_callback]\n",
|
||||
"llm = OpenAI(temperature=0.9, callbacks=callbacks)\n",
|
||||
"\n",
|
||||
"tools = load_tools([\"serpapi\", \"llm-math\"], llm=llm, callbacks=callbacks)\n",
|
||||
"agent = initialize_agent(\n",
|
||||
" tools,\n",
|
||||
" llm,\n",
|
||||
" agent=\"zero-shot-react-description\",\n",
|
||||
" callbacks=callbacks,\n",
|
||||
" verbose=True,\n",
|
||||
")\n",
|
||||
"agent.run(\n",
|
||||
" \"Who is Leo DiCaprio's girlfriend? What is her current age raised to the 0.43 power?\"\n",
|
||||
")\n",
|
||||
"comet_callback.flush_tracker(agent, finish=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Scenario 4: Using Custom Evaluation Metrics"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The `CometCallbackManager` also allows you to define and use Custom Evaluation Metrics to assess generated outputs from your model. Let's take a look at how this works. \n",
|
||||
"\n",
|
||||
"\n",
|
||||
"In the snippet below, we will use the [ROUGE](https://huggingface.co/spaces/evaluate-metric/rouge) metric to evaluate the quality of a generated summary of an input prompt. "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%pip install rouge-score"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from rouge_score import rouge_scorer\n",
|
||||
"\n",
|
||||
"from langchain.callbacks import CometCallbackHandler, StdOutCallbackHandler\n",
|
||||
"from langchain.chains import LLMChain\n",
|
||||
"from langchain.llms import OpenAI\n",
|
||||
"from langchain.prompts import PromptTemplate\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"class Rouge:\n",
|
||||
" def __init__(self, reference):\n",
|
||||
" self.reference = reference\n",
|
||||
" self.scorer = rouge_scorer.RougeScorer([\"rougeLsum\"], use_stemmer=True)\n",
|
||||
"\n",
|
||||
" def compute_metric(self, generation, prompt_idx, gen_idx):\n",
|
||||
" prediction = generation.text\n",
|
||||
" results = self.scorer.score(target=self.reference, prediction=prediction)\n",
|
||||
"\n",
|
||||
" return {\n",
|
||||
" \"rougeLsum_score\": results[\"rougeLsum\"].fmeasure,\n",
|
||||
" \"reference\": self.reference,\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"reference = \"\"\"\n",
|
||||
"The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building.\n",
|
||||
"It was the first structure to reach a height of 300 metres.\n",
|
||||
"\n",
|
||||
"It is now taller than the Chrysler Building in New York City by 5.2 metres (17 ft)\n",
|
||||
"Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France .\n",
|
||||
"\"\"\"\n",
|
||||
"rouge_score = Rouge(reference=reference)\n",
|
||||
"\n",
|
||||
"template = \"\"\"Given the following article, it is your job to write a summary.\n",
|
||||
"Article:\n",
|
||||
"{article}\n",
|
||||
"Summary: This is the summary for the above article:\"\"\"\n",
|
||||
"prompt_template = PromptTemplate(input_variables=[\"article\"], template=template)\n",
|
||||
"\n",
|
||||
"comet_callback = CometCallbackHandler(\n",
|
||||
" project_name=\"comet-example-langchain\",\n",
|
||||
" complexity_metrics=False,\n",
|
||||
" stream_logs=True,\n",
|
||||
" tags=[\"custom_metrics\"],\n",
|
||||
" custom_metrics=rouge_score.compute_metric,\n",
|
||||
")\n",
|
||||
"callbacks = [StdOutCallbackHandler(), comet_callback]\n",
|
||||
"llm = OpenAI(temperature=0.9)\n",
|
||||
"\n",
|
||||
"synopsis_chain = LLMChain(llm=llm, prompt=prompt_template)\n",
|
||||
"\n",
|
||||
"test_prompts = [\n",
|
||||
" {\n",
|
||||
" \"article\": \"\"\"\n",
|
||||
" The tower is 324 metres (1,063 ft) tall, about the same height as\n",
|
||||
" an 81-storey building, and the tallest structure in Paris. Its base is square,\n",
|
||||
" measuring 125 metres (410 ft) on each side.\n",
|
||||
" During its construction, the Eiffel Tower surpassed the\n",
|
||||
" Washington Monument to become the tallest man-made structure in the world,\n",
|
||||
" a title it held for 41 years until the Chrysler Building\n",
|
||||
" in New York City was finished in 1930.\n",
|
||||
"\n",
|
||||
" It was the first structure to reach a height of 300 metres.\n",
|
||||
" Due to the addition of a broadcasting aerial at the top of the tower in 1957,\n",
|
||||
" it is now taller than the Chrysler Building by 5.2 metres (17 ft).\n",
|
||||
"\n",
|
||||
" Excluding transmitters, the Eiffel Tower is the second tallest\n",
|
||||
" free-standing structure in France after the Millau Viaduct.\n",
|
||||
" \"\"\"\n",
|
||||
" }\n",
|
||||
"]\n",
|
||||
"print(synopsis_chain.apply(test_prompts, callbacks=callbacks))\n",
|
||||
"comet_callback.flush_tracker(synopsis_chain, finish=True)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"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.15"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
22
docs/integrations/confluence.md
Normal file
22
docs/integrations/confluence.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Confluence
|
||||
|
||||
>[Confluence](https://www.atlassian.com/software/confluence) is a wiki collaboration platform that saves and organizes all of the project-related material. `Confluence` is a knowledge base that primarily handles content management activities.
|
||||
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
```bash
|
||||
pip install atlassian-python-api
|
||||
```
|
||||
|
||||
We need to set up `username/api_key` or `Oauth2 login`.
|
||||
See [instructions](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
|
||||
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/confluence.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import ConfluenceLoader
|
||||
```
|
||||
57
docs/integrations/ctransformers.md
Normal file
57
docs/integrations/ctransformers.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# C Transformers
|
||||
|
||||
This page covers how to use the [C Transformers](https://github.com/marella/ctransformers) library within LangChain.
|
||||
It is broken into two parts: installation and setup, and then references to specific C Transformers wrappers.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
- Install the Python package with `pip install ctransformers`
|
||||
- Download a supported [GGML model](https://huggingface.co/TheBloke) (see [Supported Models](https://github.com/marella/ctransformers#supported-models))
|
||||
|
||||
## Wrappers
|
||||
|
||||
### LLM
|
||||
|
||||
There exists a CTransformers LLM wrapper, which you can access with:
|
||||
|
||||
```python
|
||||
from langchain.llms import CTransformers
|
||||
```
|
||||
|
||||
It provides a unified interface for all models:
|
||||
|
||||
```python
|
||||
llm = CTransformers(model='/path/to/ggml-gpt-2.bin', model_type='gpt2')
|
||||
|
||||
print(llm('AI is going to'))
|
||||
```
|
||||
|
||||
If you are getting `illegal instruction` error, try using `lib='avx'` or `lib='basic'`:
|
||||
|
||||
```py
|
||||
llm = CTransformers(model='/path/to/ggml-gpt-2.bin', model_type='gpt2', lib='avx')
|
||||
```
|
||||
|
||||
It can be used with models hosted on the Hugging Face Hub:
|
||||
|
||||
```py
|
||||
llm = CTransformers(model='marella/gpt-2-ggml')
|
||||
```
|
||||
|
||||
If a model repo has multiple model files (`.bin` files), specify a model file using:
|
||||
|
||||
```py
|
||||
llm = CTransformers(model='marella/gpt-2-ggml', model_file='ggml-model.bin')
|
||||
```
|
||||
|
||||
Additional parameters can be passed using the `config` parameter:
|
||||
|
||||
```py
|
||||
config = {'max_new_tokens': 256, 'repetition_penalty': 1.1}
|
||||
|
||||
llm = CTransformers(model='marella/gpt-2-ggml', config=config)
|
||||
```
|
||||
|
||||
See [Documentation](https://github.com/marella/ctransformers#config) for a list of available parameters.
|
||||
|
||||
For a more detailed walkthrough of this, see [this notebook](../modules/models/llms/integrations/ctransformers.ipynb).
|
||||
17
docs/integrations/databerry.md
Normal file
17
docs/integrations/databerry.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Databerry
|
||||
|
||||
>[Databerry](https://databerry.ai) is an [open source](https://github.com/gmpetrov/databerry) document retrieval platform that helps to connect your personal data with Large Language Models.
|
||||
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
We need to sign up for Databerry, create a datastore, add some data and get your datastore api endpoint url.
|
||||
We need the [API Key](https://docs.databerry.ai/api-reference/authentication).
|
||||
|
||||
## Retriever
|
||||
|
||||
See a [usage example](../modules/indexes/retrievers/examples/databerry.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.retrievers import DataberryRetriever
|
||||
```
|
||||
36
docs/integrations/databricks.md
Normal file
36
docs/integrations/databricks.md
Normal file
@@ -0,0 +1,36 @@
|
||||
Databricks
|
||||
==========
|
||||
|
||||
The [Databricks](https://www.databricks.com/) Lakehouse Platform unifies data, analytics, and AI on one platform.
|
||||
|
||||
Databricks embraces the LangChain ecosystem in various ways:
|
||||
|
||||
1. Databricks connector for the SQLDatabase Chain: SQLDatabase.from_databricks() provides an easy way to query your data on Databricks through LangChain
|
||||
2. Databricks-managed MLflow integrates with LangChain: Tracking and serving LangChain applications with fewer steps
|
||||
3. Databricks as an LLM provider: Deploy your fine-tuned LLMs on Databricks via serving endpoints or cluster driver proxy apps, and query it as langchain.llms.Databricks
|
||||
4. Databricks Dolly: Databricks open-sourced Dolly which allows for commercial use, and can be accessed through the Hugging Face Hub
|
||||
|
||||
Databricks connector for the SQLDatabase Chain
|
||||
----------------------------------------------
|
||||
You can connect to [Databricks runtimes](https://docs.databricks.com/runtime/index.html) and [Databricks SQL](https://www.databricks.com/product/databricks-sql) using the SQLDatabase wrapper of LangChain. See the notebook [Connect to Databricks](./databricks/databricks.html) for details.
|
||||
|
||||
Databricks-managed MLflow integrates with LangChain
|
||||
---------------------------------------------------
|
||||
|
||||
MLflow is an open source platform to manage the ML lifecycle, including experimentation, reproducibility, deployment, and a central model registry. See the notebook [MLflow Callback Handler](./mlflow_tracking.ipynb) for details about MLflow's integration with LangChain.
|
||||
|
||||
Databricks provides a fully managed and hosted version of MLflow integrated with enterprise security features, high availability, and other Databricks workspace features such as experiment and run management and notebook revision capture. MLflow on Databricks offers an integrated experience for tracking and securing machine learning model training runs and running machine learning projects. See [MLflow guide](https://docs.databricks.com/mlflow/index.html) for more details.
|
||||
|
||||
Databricks-managed MLflow makes it more convenient to develop LangChain applications on Databricks. For MLflow tracking, you don't need to set the tracking uri. For MLflow Model Serving, you can save LangChain Chains in the MLflow langchain flavor, and then register and serve the Chain with a few clicks on Databricks, with credentials securely managed by MLflow Model Serving.
|
||||
|
||||
Databricks as an LLM provider
|
||||
-----------------------------
|
||||
|
||||
The notebook [Wrap Databricks endpoints as LLMs](../modules/models/llms/integrations/databricks.html) illustrates the method to wrap Databricks endpoints as LLMs in LangChain. It supports two types of endpoints: the serving endpoint, which is recommended for both production and development, and the cluster driver proxy app, which is recommended for interactive development.
|
||||
|
||||
Databricks endpoints support Dolly, but are also great for hosting models like MPT-7B or any other models from the Hugging Face ecosystem. Databricks endpoints can also be used with proprietary models like OpenAI to provide a governance layer for enterprises.
|
||||
|
||||
Databricks Dolly
|
||||
----------------
|
||||
|
||||
Databricks’ Dolly is an instruction-following large language model trained on the Databricks machine learning platform that is licensed for commercial use. The model is available on Hugging Face Hub as databricks/dolly-v2-12b. See the notebook [Hugging Face Hub](../modules/models/llms/integrations/huggingface_hub.html) for instructions to access it through the Hugging Face Hub integration with LangChain.
|
||||
280
docs/integrations/databricks/databricks.ipynb
Normal file
280
docs/integrations/databricks/databricks.ipynb
Normal file
@@ -0,0 +1,280 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# Databricks\n",
|
||||
"\n",
|
||||
"This notebook covers how to connect to the [Databricks runtimes](https://docs.databricks.com/runtime/index.html) and [Databricks SQL](https://www.databricks.com/product/databricks-sql) using the SQLDatabase wrapper of LangChain.\n",
|
||||
"It is broken into 3 parts: installation and setup, connecting to Databricks, and examples."
|
||||
],
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Installation and Setup"
|
||||
],
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install databricks-sql-connector"
|
||||
],
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Connecting to Databricks\n",
|
||||
"\n",
|
||||
"You can connect to [Databricks runtimes](https://docs.databricks.com/runtime/index.html) and [Databricks SQL](https://www.databricks.com/product/databricks-sql) using the `SQLDatabase.from_databricks()` method.\n",
|
||||
"\n",
|
||||
"### Syntax\n",
|
||||
"```python\n",
|
||||
"SQLDatabase.from_databricks(\n",
|
||||
" catalog: str,\n",
|
||||
" schema: str,\n",
|
||||
" host: Optional[str] = None,\n",
|
||||
" api_token: Optional[str] = None,\n",
|
||||
" warehouse_id: Optional[str] = None,\n",
|
||||
" cluster_id: Optional[str] = None,\n",
|
||||
" engine_args: Optional[dict] = None,\n",
|
||||
" **kwargs: Any)\n",
|
||||
"```\n",
|
||||
"### Required Parameters\n",
|
||||
"* `catalog`: The catalog name in the Databricks database.\n",
|
||||
"* `schema`: The schema name in the catalog.\n",
|
||||
"\n",
|
||||
"### Optional Parameters\n",
|
||||
"There following parameters are optional. When executing the method in a Databricks notebook, you don't need to provide them in most of the cases.\n",
|
||||
"* `host`: The Databricks workspace hostname, excluding 'https://' part. Defaults to 'DATABRICKS_HOST' environment variable or current workspace if in a Databricks notebook.\n",
|
||||
"* `api_token`: The Databricks personal access token for accessing the Databricks SQL warehouse or the cluster. Defaults to 'DATABRICKS_TOKEN' environment variable or a temporary one is generated if in a Databricks notebook.\n",
|
||||
"* `warehouse_id`: The warehouse ID in the Databricks SQL.\n",
|
||||
"* `cluster_id`: The cluster ID in the Databricks Runtime. If running in a Databricks notebook and both 'warehouse_id' and 'cluster_id' are None, it uses the ID of the cluster the notebook is attached to.\n",
|
||||
"* `engine_args`: The arguments to be used when connecting Databricks.\n",
|
||||
"* `**kwargs`: Additional keyword arguments for the `SQLDatabase.from_uri` method."
|
||||
],
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Examples"
|
||||
],
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Connecting to Databricks with SQLDatabase wrapper\n",
|
||||
"from langchain import SQLDatabase\n",
|
||||
"\n",
|
||||
"db = SQLDatabase.from_databricks(catalog='samples', schema='nyctaxi')"
|
||||
],
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Creating a OpenAI Chat LLM wrapper\n",
|
||||
"from langchain.chat_models import ChatOpenAI\n",
|
||||
"\n",
|
||||
"llm = ChatOpenAI(temperature=0, model_name=\"gpt-4\")"
|
||||
],
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### SQL Chain example\n",
|
||||
"\n",
|
||||
"This example demonstrates the use of the [SQL Chain](https://python.langchain.com/en/latest/modules/chains/examples/sqlite.html) for answering a question over a Databricks database."
|
||||
],
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"id": "36f2270b",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain import SQLDatabaseChain\n",
|
||||
"\n",
|
||||
"db_chain = SQLDatabaseChain.from_llm(llm, db, verbose=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "4e2b5f25",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
"\n",
|
||||
"\u001B[1m> Entering new SQLDatabaseChain chain...\u001B[0m\n",
|
||||
"What is the average duration of taxi rides that start between midnight and 6am?\n",
|
||||
"SQLQuery:\u001B[32;1m\u001B[1;3mSELECT AVG(UNIX_TIMESTAMP(tpep_dropoff_datetime) - UNIX_TIMESTAMP(tpep_pickup_datetime)) as avg_duration\n",
|
||||
"FROM trips\n",
|
||||
"WHERE HOUR(tpep_pickup_datetime) >= 0 AND HOUR(tpep_pickup_datetime) < 6\u001B[0m\n",
|
||||
"SQLResult: \u001B[33;1m\u001B[1;3m[(987.8122786304605,)]\u001B[0m\n",
|
||||
"Answer:\u001B[32;1m\u001B[1;3mThe average duration of taxi rides that start between midnight and 6am is 987.81 seconds.\u001B[0m\n",
|
||||
"\u001B[1m> Finished chain.\u001B[0m\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": "'The average duration of taxi rides that start between midnight and 6am is 987.81 seconds.'"
|
||||
},
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"db_chain.run(\"What is the average duration of taxi rides that start between midnight and 6am?\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### SQL Database Agent example\n",
|
||||
"\n",
|
||||
"This example demonstrates the use of the [SQL Database Agent](https://python.langchain.com/en/latest/modules/agents/toolkits/examples/sql_database.html) for answering questions over a Databricks database."
|
||||
],
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"id": "9918e86a",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain.agents import create_sql_agent\n",
|
||||
"from langchain.agents.agent_toolkits import SQLDatabaseToolkit\n",
|
||||
"\n",
|
||||
"toolkit = SQLDatabaseToolkit(db=db, llm=llm)\n",
|
||||
"agent = create_sql_agent(\n",
|
||||
" llm=llm,\n",
|
||||
" toolkit=toolkit,\n",
|
||||
" verbose=True\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"id": "c484a76e",
|
||||
"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: list_tables_sql_db\n",
|
||||
"Action Input: \u001B[0m\n",
|
||||
"Observation: \u001B[38;5;200m\u001B[1;3mtrips\u001B[0m\n",
|
||||
"Thought:\u001B[32;1m\u001B[1;3mI should check the schema of the trips table to see if it has the necessary columns for trip distance and duration.\n",
|
||||
"Action: schema_sql_db\n",
|
||||
"Action Input: trips\u001B[0m\n",
|
||||
"Observation: \u001B[33;1m\u001B[1;3m\n",
|
||||
"CREATE TABLE trips (\n",
|
||||
"\ttpep_pickup_datetime TIMESTAMP, \n",
|
||||
"\ttpep_dropoff_datetime TIMESTAMP, \n",
|
||||
"\ttrip_distance FLOAT, \n",
|
||||
"\tfare_amount FLOAT, \n",
|
||||
"\tpickup_zip INT, \n",
|
||||
"\tdropoff_zip INT\n",
|
||||
") USING DELTA\n",
|
||||
"\n",
|
||||
"/*\n",
|
||||
"3 rows from trips table:\n",
|
||||
"tpep_pickup_datetime\ttpep_dropoff_datetime\ttrip_distance\tfare_amount\tpickup_zip\tdropoff_zip\n",
|
||||
"2016-02-14 16:52:13+00:00\t2016-02-14 17:16:04+00:00\t4.94\t19.0\t10282\t10171\n",
|
||||
"2016-02-04 18:44:19+00:00\t2016-02-04 18:46:00+00:00\t0.28\t3.5\t10110\t10110\n",
|
||||
"2016-02-17 17:13:57+00:00\t2016-02-17 17:17:55+00:00\t0.7\t5.0\t10103\t10023\n",
|
||||
"*/\u001B[0m\n",
|
||||
"Thought:\u001B[32;1m\u001B[1;3mThe trips table has the necessary columns for trip distance and duration. I will write a query to find the longest trip distance and its duration.\n",
|
||||
"Action: query_checker_sql_db\n",
|
||||
"Action Input: SELECT trip_distance, tpep_dropoff_datetime - tpep_pickup_datetime as duration FROM trips ORDER BY trip_distance DESC LIMIT 1\u001B[0m\n",
|
||||
"Observation: \u001B[31;1m\u001B[1;3mSELECT trip_distance, tpep_dropoff_datetime - tpep_pickup_datetime as duration FROM trips ORDER BY trip_distance DESC LIMIT 1\u001B[0m\n",
|
||||
"Thought:\u001B[32;1m\u001B[1;3mThe query is correct. I will now execute it to find the longest trip distance and its duration.\n",
|
||||
"Action: query_sql_db\n",
|
||||
"Action Input: SELECT trip_distance, tpep_dropoff_datetime - tpep_pickup_datetime as duration FROM trips ORDER BY trip_distance DESC LIMIT 1\u001B[0m\n",
|
||||
"Observation: \u001B[36;1m\u001B[1;3m[(30.6, '0 00:43:31.000000000')]\u001B[0m\n",
|
||||
"Thought:\u001B[32;1m\u001B[1;3mI now know the final answer.\n",
|
||||
"Final Answer: The longest trip distance is 30.6 miles and it took 43 minutes and 31 seconds.\u001B[0m\n",
|
||||
"\n",
|
||||
"\u001B[1m> Finished chain.\u001B[0m\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": "'The longest trip distance is 30.6 miles and it took 43 minutes and 31 seconds.'"
|
||||
},
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"agent.run(\"What is the longest trip distance and how long did it take?\")"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"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.11.3"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
25
docs/integrations/deepinfra.md
Normal file
25
docs/integrations/deepinfra.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# DeepInfra
|
||||
|
||||
This page covers how to use the DeepInfra ecosystem within LangChain.
|
||||
It is broken into two parts: installation and setup, and then references to specific DeepInfra wrappers.
|
||||
|
||||
## Installation and Setup
|
||||
- Get your DeepInfra api key from this link [here](https://deepinfra.com/).
|
||||
- Get an DeepInfra api key and set it as an environment variable (`DEEPINFRA_API_TOKEN`)
|
||||
|
||||
## Available Models
|
||||
|
||||
DeepInfra provides a range of Open Source LLMs ready for deployment.
|
||||
You can list supported models [here](https://deepinfra.com/models?type=text-generation).
|
||||
google/flan\* models can be viewed [here](https://deepinfra.com/models?type=text2text-generation).
|
||||
|
||||
You can view a list of request and response parameters [here](https://deepinfra.com/databricks/dolly-v2-12b#API)
|
||||
|
||||
## Wrappers
|
||||
|
||||
### LLM
|
||||
|
||||
There exists an DeepInfra LLM wrapper, which you can access with
|
||||
```python
|
||||
from langchain.llms import DeepInfra
|
||||
```
|
||||
30
docs/integrations/deeplake.md
Normal file
30
docs/integrations/deeplake.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Deep Lake
|
||||
This page covers how to use the Deep Lake ecosystem within LangChain.
|
||||
|
||||
## Why Deep Lake?
|
||||
- More than just a (multi-modal) vector store. You can later use the dataset to fine-tune your own LLM models.
|
||||
- Not only stores embeddings, but also the original data with automatic version control.
|
||||
- Truly serverless. Doesn't require another service and can be used with major cloud providers (AWS S3, GCS, etc.)
|
||||
|
||||
## More Resources
|
||||
1. [Ultimate Guide to LangChain & Deep Lake: Build ChatGPT to Answer Questions on Your Financial Data](https://www.activeloop.ai/resources/ultimate-guide-to-lang-chain-deep-lake-build-chat-gpt-to-answer-questions-on-your-financial-data/)
|
||||
2. [Twitter the-algorithm codebase analysis with Deep Lake](../use_cases/code/twitter-the-algorithm-analysis-deeplake.ipynb)
|
||||
3. Here is [whitepaper](https://www.deeplake.ai/whitepaper) and [academic paper](https://arxiv.org/pdf/2209.10785.pdf) for Deep Lake
|
||||
4. Here is a set of additional resources available for review: [Deep Lake](https://github.com/activeloopai/deeplake), [Getting Started](https://docs.activeloop.ai/getting-started) and [Tutorials](https://docs.activeloop.ai/hub-tutorials)
|
||||
|
||||
## Installation and Setup
|
||||
- Install the Python package with `pip install deeplake`
|
||||
|
||||
## Wrappers
|
||||
|
||||
### VectorStore
|
||||
|
||||
There exists a wrapper around Deep Lake, a data lake for Deep Learning applications, allowing you to use it as a vector store (for now), whether for semantic search or example selection.
|
||||
|
||||
To import this vectorstore:
|
||||
```python
|
||||
from langchain.vectorstores import DeepLake
|
||||
```
|
||||
|
||||
|
||||
For a more detailed walkthrough of the Deep Lake wrapper, see [this notebook](../modules/indexes/vectorstores/examples/deeplake.ipynb)
|
||||
18
docs/integrations/diffbot.md
Normal file
18
docs/integrations/diffbot.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Diffbot
|
||||
|
||||
>[Diffbot](https://docs.diffbot.com/docs) is a service to read web pages. Unlike traditional web scraping tools,
|
||||
> `Diffbot` doesn't require any rules to read the content on a page.
|
||||
>It starts with computer vision, which classifies a page into one of 20 possible types. Content is then interpreted by a machine learning model trained to identify the key attributes on a page based on its type.
|
||||
>The result is a website transformed into clean-structured data (like JSON or CSV), ready for your application.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
Read [instructions](https://docs.diffbot.com/reference/authentication) how to get the Diffbot API Token.
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/diffbot.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import DiffbotLoader
|
||||
```
|
||||
30
docs/integrations/discord.md
Normal file
30
docs/integrations/discord.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Discord
|
||||
|
||||
>[Discord](https://discord.com/) is a VoIP and instant messaging social platform. Users have the ability to communicate
|
||||
> with voice calls, video calls, text messaging, media and files in private chats or as part of communities called
|
||||
> "servers". A server is a collection of persistent chat rooms and voice channels which can be accessed via invite links.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
|
||||
```bash
|
||||
pip install pandas
|
||||
```
|
||||
|
||||
Follow these steps to download your `Discord` data:
|
||||
|
||||
1. Go to your **User Settings**
|
||||
2. Then go to **Privacy and Safety**
|
||||
3. Head over to the **Request all of my Data** and click on **Request Data** button
|
||||
|
||||
It might take 30 days for you to receive your data. You'll receive an email at the address which is registered
|
||||
with Discord. That email will have a download button using which you would be able to download your personal Discord data.
|
||||
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/discord.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import DiscordChatLoader
|
||||
```
|
||||
20
docs/integrations/docugami.md
Normal file
20
docs/integrations/docugami.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Docugami
|
||||
|
||||
>[Docugami](https://docugami.com) converts business documents into a Document XML Knowledge Graph, generating forests
|
||||
> of XML semantic trees representing entire documents. This is a rich representation that includes the semantic and
|
||||
> structural characteristics of various chunks in the document as an XML tree.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
|
||||
```bash
|
||||
pip install lxml
|
||||
```
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/docugami.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import DocugamiLoader
|
||||
```
|
||||
19
docs/integrations/duckdb.md
Normal file
19
docs/integrations/duckdb.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# DuckDB
|
||||
|
||||
>[DuckDB](https://duckdb.org/) is an in-process SQL OLAP database management system.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
First, you need to install `duckdb` python package.
|
||||
|
||||
```bash
|
||||
pip install duckdb
|
||||
```
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/duckdb.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import DuckDBLoader
|
||||
```
|
||||
24
docs/integrations/elasticsearch.md
Normal file
24
docs/integrations/elasticsearch.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Elasticsearch
|
||||
|
||||
>[Elasticsearch](https://www.elastic.co/elasticsearch/) is a distributed, RESTful search and analytics engine.
|
||||
> It provides a distributed, multi-tenant-capable full-text search engine with an HTTP web interface and schema-free
|
||||
> JSON documents.
|
||||
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
```bash
|
||||
pip install elasticsearch
|
||||
```
|
||||
|
||||
## Retriever
|
||||
|
||||
>In information retrieval, [Okapi BM25](https://en.wikipedia.org/wiki/Okapi_BM25) (BM is an abbreviation of best matching) is a ranking function used by search engines to estimate the relevance of documents to a given search query. It is based on the probabilistic retrieval framework developed in the 1970s and 1980s by Stephen E. Robertson, Karen Spärck Jones, and others.
|
||||
|
||||
>The name of the actual ranking function is BM25. The fuller name, Okapi BM25, includes the name of the first system to use it, which was the Okapi information retrieval system, implemented at London's City University in the 1980s and 1990s. BM25 and its newer variants, e.g. BM25F (a version of BM25 that can take document structure and anchor text into account), represent TF-IDF-like retrieval functions used in document retrieval.
|
||||
|
||||
See a [usage example](../modules/indexes/retrievers/examples/elastic_search_bm25.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.retrievers import ElasticSearchBM25Retriever
|
||||
```
|
||||
20
docs/integrations/evernote.md
Normal file
20
docs/integrations/evernote.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# EverNote
|
||||
|
||||
>[EverNote](https://evernote.com/) is intended for archiving and creating notes in which photos, audio and saved web content can be embedded. Notes are stored in virtual "notebooks" and can be tagged, annotated, edited, searched, and exported.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
First, you need to install `lxml` and `html2text` python packages.
|
||||
|
||||
```bash
|
||||
pip install lxml
|
||||
pip install html2text
|
||||
```
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/evernote.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import EverNoteLoader
|
||||
```
|
||||
21
docs/integrations/facebook_chat.md
Normal file
21
docs/integrations/facebook_chat.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Facebook Chat
|
||||
|
||||
>[Messenger](https://en.wikipedia.org/wiki/Messenger_(software)) is an American proprietary instant messaging app and
|
||||
> platform developed by `Meta Platforms`. Originally developed as `Facebook Chat` in 2008, the company revamped its
|
||||
> messaging service in 2010.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
First, you need to install `pandas` python package.
|
||||
|
||||
```bash
|
||||
pip install pandas
|
||||
```
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/facebook_chat.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import FacebookChatLoader
|
||||
```
|
||||
21
docs/integrations/figma.md
Normal file
21
docs/integrations/figma.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Figma
|
||||
|
||||
>[Figma](https://www.figma.com/) is a collaborative web application for interface design.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
The Figma API requires an `access token`, `node_ids`, and a `file key`.
|
||||
|
||||
The `file key` can be pulled from the URL. https://www.figma.com/file/{filekey}/sampleFilename
|
||||
|
||||
`Node IDs` are also available in the URL. Click on anything and look for the '?node-id={node_id}' param.
|
||||
|
||||
`Access token` [instructions](https://help.figma.com/hc/en-us/articles/8085703771159-Manage-personal-access-tokens).
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/figma.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import FigmaFileLoader
|
||||
```
|
||||
16
docs/integrations/forefrontai.md
Normal file
16
docs/integrations/forefrontai.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# ForefrontAI
|
||||
|
||||
This page covers how to use the ForefrontAI ecosystem within LangChain.
|
||||
It is broken into two parts: installation and setup, and then references to specific ForefrontAI wrappers.
|
||||
|
||||
## Installation and Setup
|
||||
- Get an ForefrontAI api key and set it as an environment variable (`FOREFRONTAI_API_KEY`)
|
||||
|
||||
## Wrappers
|
||||
|
||||
### LLM
|
||||
|
||||
There exists an ForefrontAI LLM wrapper, which you can access with
|
||||
```python
|
||||
from langchain.llms import ForefrontAI
|
||||
```
|
||||
19
docs/integrations/git.md
Normal file
19
docs/integrations/git.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Git
|
||||
|
||||
>[Git](https://en.wikipedia.org/wiki/Git) is a distributed version control system that tracks changes in any set of computer files, usually used for coordinating work among programmers collaboratively developing source code during software development.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
First, you need to install `GitPython` python package.
|
||||
|
||||
```bash
|
||||
pip install GitPython
|
||||
```
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/git.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import GitLoader
|
||||
```
|
||||
15
docs/integrations/gitbook.md
Normal file
15
docs/integrations/gitbook.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# GitBook
|
||||
|
||||
>[GitBook](https://docs.gitbook.com/) is a modern documentation platform where teams can document everything from products to internal knowledge bases and APIs.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
There isn't any special setup for it.
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/gitbook.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import GitbookLoader
|
||||
```
|
||||
20
docs/integrations/google_bigquery.md
Normal file
20
docs/integrations/google_bigquery.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Google BigQuery
|
||||
|
||||
>[Google BigQuery](https://cloud.google.com/bigquery) is a serverless and cost-effective enterprise data warehouse that works across clouds and scales with your data.
|
||||
`BigQuery` is a part of the `Google Cloud Platform`.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
First, you need to install `google-cloud-bigquery` python package.
|
||||
|
||||
```bash
|
||||
pip install google-cloud-bigquery
|
||||
```
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/google_bigquery.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import BigQueryLoader
|
||||
```
|
||||
26
docs/integrations/google_cloud_storage.md
Normal file
26
docs/integrations/google_cloud_storage.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Google Cloud Storage
|
||||
|
||||
>[Google Cloud Storage](https://en.wikipedia.org/wiki/Google_Cloud_Storage) is a managed service for storing unstructured data.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
First, you need to install `google-cloud-bigquery` python package.
|
||||
|
||||
```bash
|
||||
pip install google-cloud-storage
|
||||
```
|
||||
|
||||
## Document Loader
|
||||
|
||||
There are two loaders for the `Google Cloud Storage`: the `Directory` and the `File` loaders.
|
||||
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/google_cloud_storage_directory.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import GCSDirectoryLoader
|
||||
```
|
||||
See a [usage example](../modules/indexes/document_loaders/examples/google_cloud_storage_file.ipynb).
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import GCSFileLoader
|
||||
```
|
||||
22
docs/integrations/google_drive.md
Normal file
22
docs/integrations/google_drive.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Google Drive
|
||||
|
||||
>[Google Drive](https://en.wikipedia.org/wiki/Google_Drive) is a file storage and synchronization service developed by Google.
|
||||
|
||||
Currently, only `Google Docs` are supported.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
First, you need to install several python package.
|
||||
|
||||
```bash
|
||||
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib
|
||||
```
|
||||
|
||||
## Document Loader
|
||||
|
||||
See a [usage example and authorizing instructions](../modules/indexes/document_loaders/examples/google_drive.ipynb).
|
||||
|
||||
|
||||
```python
|
||||
from langchain.document_loaders import GoogleDriveLoader
|
||||
```
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user