mirror of
https://github.com/crewAIInc/crewAI.git
synced 2025-12-29 02:38:29 +00:00
Compare commits
1049 Commits
pr-1833
...
bugfix/tes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51c17c763b | ||
|
|
e5ee91fcd1 | ||
|
|
b5ec0ed8b1 | ||
|
|
767aeb5913 | ||
|
|
1d3b4fde04 | ||
|
|
9429253ac2 | ||
|
|
0545294a27 | ||
|
|
a60c66a9af | ||
|
|
217ba655c7 | ||
|
|
8535c0c759 | ||
|
|
0088d6d397 | ||
|
|
98be37c18a | ||
|
|
54316109d5 | ||
|
|
e05cde0b46 | ||
|
|
db61f5dd59 | ||
|
|
8c175b8333 | ||
|
|
11ff8270ea | ||
|
|
6ba36a3485 | ||
|
|
9d4d4d495a | ||
|
|
1237c05aee | ||
|
|
640e68100c | ||
|
|
8569c2d254 | ||
|
|
ab93fdd348 | ||
|
|
5fd01292b8 | ||
|
|
e7696f9b07 | ||
|
|
16d4bc1f56 | ||
|
|
50efccd20b | ||
|
|
fbc7230859 | ||
|
|
d44eb89b7e | ||
|
|
e041103c04 | ||
|
|
6cae5fd34b | ||
|
|
31f595197b | ||
|
|
714134e8d3 | ||
|
|
f53b7f463c | ||
|
|
a7b00cee08 | ||
|
|
cac69e90fa | ||
|
|
3731a8c083 | ||
|
|
d993b5133c | ||
|
|
289b56e122 | ||
|
|
2576037cfb | ||
|
|
755722fa4c | ||
|
|
49ad4bc63e | ||
|
|
1bc914edf4 | ||
|
|
40173c2f53 | ||
|
|
1c90f02984 | ||
|
|
f6f5f3db4f | ||
|
|
0006fdb655 | ||
|
|
1aa6cfdf2d | ||
|
|
a8e0836add | ||
|
|
a8ffb60928 | ||
|
|
764eac12e4 | ||
|
|
8c53880dca | ||
|
|
757bfe07aa | ||
|
|
0487a0e8fb | ||
|
|
7f357d2696 | ||
|
|
08f252c49b | ||
|
|
6ff669e5da | ||
|
|
791d156dce | ||
|
|
1d98a83296 | ||
|
|
9ecc534f8d | ||
|
|
497724f3a4 | ||
|
|
2f4681e110 | ||
|
|
49c02d06c3 | ||
|
|
6738a02b8b | ||
|
|
ec6981d8d3 | ||
|
|
983ca25f5c | ||
|
|
33c0c72194 | ||
|
|
32f2a39693 | ||
|
|
93425db024 | ||
|
|
ec2f0a7c76 | ||
|
|
2a3698d53c | ||
|
|
bc1ebf36e5 | ||
|
|
e2f71464ed | ||
|
|
7d85046eb6 | ||
|
|
6f7c94e88b | ||
|
|
30566a8dfa | ||
|
|
e5ccfbf68d | ||
|
|
7d4d5c6bf7 | ||
|
|
317bcac4c3 | ||
|
|
55d420d1ad | ||
|
|
4a52db6f84 | ||
|
|
f5107d7238 | ||
|
|
eb3076b0f3 | ||
|
|
eae0eb2905 | ||
|
|
f724f30d16 | ||
|
|
6fb6ef6c56 | ||
|
|
b64098bbb6 | ||
|
|
36eb6354c2 | ||
|
|
ade3934e2a | ||
|
|
440513674a | ||
|
|
55456a2e2e | ||
|
|
7a4d0dd8a2 | ||
|
|
db0d0c25f1 | ||
|
|
d77c35a4ba | ||
|
|
03abf53ba9 | ||
|
|
06d02c0f62 | ||
|
|
3820594581 | ||
|
|
5f9de33cc0 | ||
|
|
385c78ec54 | ||
|
|
ec844ed7bf | ||
|
|
c5659663ef | ||
|
|
dea6b14255 | ||
|
|
1f8ee15753 | ||
|
|
04cbf10a78 | ||
|
|
b2a0bec3f6 | ||
|
|
d6fdb9980c | ||
|
|
79cfa87341 | ||
|
|
1ca68aff08 | ||
|
|
e449e535f7 | ||
|
|
ab7a594301 | ||
|
|
4d06708938 | ||
|
|
aa532acdd2 | ||
|
|
404da4066b | ||
|
|
5735496227 | ||
|
|
cd9a17a281 | ||
|
|
3fa44e9a07 | ||
|
|
3d23f09107 | ||
|
|
e357a6b7f3 | ||
|
|
8856ebcd21 | ||
|
|
f754eba6fb | ||
|
|
08f15f8f9d | ||
|
|
b3a49e65e5 | ||
|
|
dbe0c5a176 | ||
|
|
fc653be765 | ||
|
|
6812febf0e | ||
|
|
9f13c8afbf | ||
|
|
f41d9cacee | ||
|
|
e9c999d533 | ||
|
|
749cff8411 | ||
|
|
2238f7fd47 | ||
|
|
8100d3e947 | ||
|
|
208057eaf1 | ||
|
|
5edbb86cf0 | ||
|
|
9b2b44bbf3 | ||
|
|
93471dea08 | ||
|
|
d36c3644a6 | ||
|
|
03029a336d | ||
|
|
e761f330c5 | ||
|
|
704025fe1e | ||
|
|
6c29ad29c9 | ||
|
|
e6305ca11b | ||
|
|
781ac736ce | ||
|
|
fcb8114132 | ||
|
|
5ca23ce757 | ||
|
|
e1b1a9361c | ||
|
|
11bdc7c679 | ||
|
|
80598969ee | ||
|
|
65266658db | ||
|
|
b1a0b85097 | ||
|
|
6cab25aba9 | ||
|
|
1097abff32 | ||
|
|
5c2c41eda9 | ||
|
|
c5471a78e9 | ||
|
|
ccd7723d91 | ||
|
|
d1169ad79d | ||
|
|
12fb3fb0e8 | ||
|
|
cc1087764c | ||
|
|
88ecd6b0c5 | ||
|
|
8eb54cf168 | ||
|
|
e15bb1e95b | ||
|
|
80dcbc7e46 | ||
|
|
5bb1a3b257 | ||
|
|
1267219c3d | ||
|
|
bd3f4042e2 | ||
|
|
9a979f80a0 | ||
|
|
8204de61c3 | ||
|
|
e160fef306 | ||
|
|
9c6344967c | ||
|
|
8065a02f06 | ||
|
|
bd1a53a718 | ||
|
|
e873950e4c | ||
|
|
ad41065b03 | ||
|
|
ae33fdd05f | ||
|
|
bb9e5461d6 | ||
|
|
4eb5cab464 | ||
|
|
54386c0de4 | ||
|
|
f7d7b5fe18 | ||
|
|
f4a8aa5bda | ||
|
|
5d264d8e5a | ||
|
|
e8bade008d | ||
|
|
20a0e4c0dd | ||
|
|
17006e2fe2 | ||
|
|
06ce3e7f85 | ||
|
|
0f37e861aa | ||
|
|
73788e6c5b | ||
|
|
1eb87a59cc | ||
|
|
eac392974f | ||
|
|
26c2812baf | ||
|
|
f131507e90 | ||
|
|
c42c787f36 | ||
|
|
570c255bae | ||
|
|
a1e766afb2 | ||
|
|
da238e02f5 | ||
|
|
bf79353e43 | ||
|
|
083f579290 | ||
|
|
3f8f19a82b | ||
|
|
0b486d562a | ||
|
|
ed3edc5c43 | ||
|
|
38a131d525 | ||
|
|
ab05c2048d | ||
|
|
aa18967629 | ||
|
|
845b764ce9 | ||
|
|
dc16ac4cc3 | ||
|
|
fd1c9ec63a | ||
|
|
06793d1318 | ||
|
|
233fec1ea8 | ||
|
|
9278736718 | ||
|
|
e5a18a6ccf | ||
|
|
b3d16bba5f | ||
|
|
69cd84d78f | ||
|
|
e4f950720c | ||
|
|
7948e62fd5 | ||
|
|
c00e714460 | ||
|
|
02eb7e7f81 | ||
|
|
65c32806ec | ||
|
|
0eb3ba34dd | ||
|
|
175f40024b | ||
|
|
c86d4ef29c | ||
|
|
d4213cecb7 | ||
|
|
8720316e2f | ||
|
|
42f960b2bd | ||
|
|
60a87c7f77 | ||
|
|
99bcc44ce6 | ||
|
|
dda5e0de0f | ||
|
|
bcffbca854 | ||
|
|
a6d3898080 | ||
|
|
2256462b7e | ||
|
|
f1ecbc3f14 | ||
|
|
02a8edf866 | ||
|
|
3a1bb36848 | ||
|
|
7faff4710d | ||
|
|
24139f541d | ||
|
|
d5427fb019 | ||
|
|
063ad2d99d | ||
|
|
8119b7239d | ||
|
|
384288e7b1 | ||
|
|
cdc907a87d | ||
|
|
32395b14d2 | ||
|
|
f5699ddf68 | ||
|
|
4361f4ff75 | ||
|
|
f98c2c00d8 | ||
|
|
b106927a4e | ||
|
|
5dee13e078 | ||
|
|
d063ed3014 | ||
|
|
91f9d56544 | ||
|
|
fd3c8a8f92 | ||
|
|
8742400b67 | ||
|
|
7c1f88cd07 | ||
|
|
02fe5814f7 | ||
|
|
5166e7abd7 | ||
|
|
43d7bbbd03 | ||
|
|
8aba99a67d | ||
|
|
2c74efc8f2 | ||
|
|
94f148e524 | ||
|
|
ec010c37a7 | ||
|
|
8a0afd6250 | ||
|
|
9407f5a7da | ||
|
|
8fb08a0b25 | ||
|
|
f65ecef670 | ||
|
|
3331ea186f | ||
|
|
45704fe16d | ||
|
|
c2124b7c01 | ||
|
|
4abcb7e3b3 | ||
|
|
19bdabf2ee | ||
|
|
5cbe6db486 | ||
|
|
018eadce2b | ||
|
|
86c035c9e1 | ||
|
|
76a826c1f0 | ||
|
|
f82420e7d6 | ||
|
|
f94aee3dc8 | ||
|
|
30979e646d | ||
|
|
39d4773b3a | ||
|
|
22d187c714 | ||
|
|
35ef69d0e8 | ||
|
|
bbfdcb90a7 | ||
|
|
6b3a749cf4 | ||
|
|
3f8b15f34c | ||
|
|
1120ed1f8c | ||
|
|
cfc0645afb | ||
|
|
f311a465be | ||
|
|
d4d1882e72 | ||
|
|
a5f3dd290b | ||
|
|
8b7ff930e7 | ||
|
|
53bb18f9e8 | ||
|
|
2fbd7b09b9 | ||
|
|
2638ed9641 | ||
|
|
cbb858d375 | ||
|
|
a1023739e0 | ||
|
|
ffae3f5a92 | ||
|
|
8d1768fcc3 | ||
|
|
33695aa2fd | ||
|
|
6958c8dd48 | ||
|
|
09eaa76b44 | ||
|
|
44f74fd6f6 | ||
|
|
9eeebd3c65 | ||
|
|
8abe4d98ed | ||
|
|
6f061cc306 | ||
|
|
8ebc89a227 | ||
|
|
9a62aa2977 | ||
|
|
4ad69c573a | ||
|
|
2867cc4482 | ||
|
|
d43135ca45 | ||
|
|
73497596ae | ||
|
|
b440d143ed | ||
|
|
355338767c | ||
|
|
035929814e | ||
|
|
699631fd1d | ||
|
|
2d5af62df2 | ||
|
|
7c0633e5de | ||
|
|
6682fe3d89 | ||
|
|
0f283325e1 | ||
|
|
f7994667e5 | ||
|
|
f8169b74f1 | ||
|
|
cf74f5c9b6 | ||
|
|
f8a48a1389 | ||
|
|
76d0ec9f46 | ||
|
|
08ed84dc21 | ||
|
|
5051e0b55e | ||
|
|
bc85480dd8 | ||
|
|
4f2806f5ba | ||
|
|
2340de3c12 | ||
|
|
51b9e251dd | ||
|
|
25147476f7 | ||
|
|
71f272b2b2 | ||
|
|
213d245f4a | ||
|
|
20a635970f | ||
|
|
ae0c84cea6 | ||
|
|
38189fb555 | ||
|
|
4efc29db63 | ||
|
|
fe7583413f | ||
|
|
ede37bc07e | ||
|
|
8306e49fb7 | ||
|
|
e6aea0304f | ||
|
|
262637c3a4 | ||
|
|
1ac64b8852 | ||
|
|
7cc143624c | ||
|
|
0fd5c7bab0 | ||
|
|
87e4188e91 | ||
|
|
638134fda3 | ||
|
|
284c085cdd | ||
|
|
f2ed29a511 | ||
|
|
14544c8fe9 | ||
|
|
64354ac66d | ||
|
|
a234eb8baa | ||
|
|
01124daf55 | ||
|
|
41a61e6d82 | ||
|
|
3ef9a41f48 | ||
|
|
172557684a | ||
|
|
8b732247cd | ||
|
|
b9b75c7e1d | ||
|
|
0c59f8ea57 | ||
|
|
f7015763d4 | ||
|
|
a65598bc72 | ||
|
|
2527ba9074 | ||
|
|
ca8535a74b | ||
|
|
a1698744d4 | ||
|
|
a092c7f2e6 | ||
|
|
36cb08c062 | ||
|
|
2f4fd36eb1 | ||
|
|
ef2b783be0 | ||
|
|
1dcb9934b7 | ||
|
|
7a828f9ad9 | ||
|
|
d03b89486d | ||
|
|
2f2945169d | ||
|
|
d305c45273 | ||
|
|
b0e410f10e | ||
|
|
a0b8431ac7 | ||
|
|
329027c2b8 | ||
|
|
2230279e05 | ||
|
|
b1ce3d57f0 | ||
|
|
d6034cebaa | ||
|
|
d73fd96ee5 | ||
|
|
e838638bef | ||
|
|
87d88e26ee | ||
|
|
f9be04c311 | ||
|
|
a962896d0e | ||
|
|
c0c1302611 | ||
|
|
e0c1af14bd | ||
|
|
45a5e12ff8 | ||
|
|
afa2847b3f | ||
|
|
122dd945fe | ||
|
|
e684e06809 | ||
|
|
cc9620f7fd | ||
|
|
d4784507d0 | ||
|
|
dbde306639 | ||
|
|
e4f01f4906 | ||
|
|
6ec2070936 | ||
|
|
46e5929622 | ||
|
|
ef2502a14f | ||
|
|
7fd6ef7012 | ||
|
|
dbede37121 | ||
|
|
678dfffb62 | ||
|
|
c511f4d0b5 | ||
|
|
8fdf741b73 | ||
|
|
a5d8ca7b16 | ||
|
|
a6f433597c | ||
|
|
323790384c | ||
|
|
44068c8779 | ||
|
|
dedab16ff1 | ||
|
|
b279b84a55 | ||
|
|
9e16df200c | ||
|
|
ac97aafd78 | ||
|
|
08eaffbb7c | ||
|
|
c1ae3a64ed | ||
|
|
bce7bb793c | ||
|
|
ff3ad45de9 | ||
|
|
fcacebb60f | ||
|
|
3879cbb897 | ||
|
|
61b3d04d0d | ||
|
|
81a16a3e01 | ||
|
|
a579da3b5f | ||
|
|
277a217b31 | ||
|
|
e81f4a1f35 | ||
|
|
11d39b3f23 | ||
|
|
d96f20d0ef | ||
|
|
8eca3dae14 | ||
|
|
00997e5453 | ||
|
|
69df8245c9 | ||
|
|
ac48b7a669 | ||
|
|
b80ea04fe1 | ||
|
|
817a838015 | ||
|
|
c0005e112e | ||
|
|
d1770b3749 | ||
|
|
bf87f3d5d3 | ||
|
|
59faec2404 | ||
|
|
276a7e5acc | ||
|
|
fde60b0973 | ||
|
|
5a8ce2b05c | ||
|
|
5e1a9dd2ba | ||
|
|
70452af9db | ||
|
|
48edf67cad | ||
|
|
17fbc74f34 | ||
|
|
96aba70531 | ||
|
|
b4221ea560 | ||
|
|
4c122321ad | ||
|
|
c808f7bec9 | ||
|
|
34223c6576 | ||
|
|
a38848097f | ||
|
|
8eea22c763 | ||
|
|
033b6f23e3 | ||
|
|
b738f3e265 | ||
|
|
7b62890113 | ||
|
|
6d7e089be6 | ||
|
|
bf691af088 | ||
|
|
95e2e0bb8e | ||
|
|
071122791e | ||
|
|
745ed5c8ae | ||
|
|
38f9c3c500 | ||
|
|
18d867aa47 | ||
|
|
c82f612c07 | ||
|
|
9c3e1a708f | ||
|
|
fa3af7db93 | ||
|
|
7a70e393c4 | ||
|
|
134be4984b | ||
|
|
b8ff35f076 | ||
|
|
f8a09489f1 | ||
|
|
496a4c087c | ||
|
|
93e0de2ed9 | ||
|
|
ca9deaebb7 | ||
|
|
218b17f70f | ||
|
|
5626b72742 | ||
|
|
a1e2ef376b | ||
|
|
9b2a113b58 | ||
|
|
32b1fb237b | ||
|
|
67179bbacb | ||
|
|
2b7a0b3342 | ||
|
|
5627159419 | ||
|
|
7f5c4fded6 | ||
|
|
8054828aac | ||
|
|
67c2428495 | ||
|
|
0c6514024e | ||
|
|
b415e2273a | ||
|
|
56cb344c70 | ||
|
|
b77cf9b279 | ||
|
|
5791325e63 | ||
|
|
15e8593597 | ||
|
|
80c626504d | ||
|
|
21dea21e97 | ||
|
|
0bbafe7e3b | ||
|
|
fa15c9012a | ||
|
|
16a949e7e4 | ||
|
|
56fd603723 | ||
|
|
67c06e5cef | ||
|
|
78518f139d | ||
|
|
4f3ae32eef | ||
|
|
da5faeb451 | ||
|
|
341fcad9a4 | ||
|
|
96ca81b593 | ||
|
|
405d45c3fb | ||
|
|
3f2f832e8d | ||
|
|
4f99ea547f | ||
|
|
716d794092 | ||
|
|
9a1c19cfbd | ||
|
|
868ee4ce87 | ||
|
|
f6cc5d4c92 | ||
|
|
da59bb22e6 | ||
|
|
e58b0a8d70 | ||
|
|
20863079fc | ||
|
|
547729cdd7 | ||
|
|
69867bc77e | ||
|
|
c4164440ca | ||
|
|
9777bf984f | ||
|
|
80d6596247 | ||
|
|
a1b37f073d | ||
|
|
d261d68527 | ||
|
|
d5ae6a6f59 | ||
|
|
36b7d03612 | ||
|
|
39ab81ea83 | ||
|
|
dae39d37e9 | ||
|
|
615cc03b9f | ||
|
|
d4d9d475b0 | ||
|
|
8b5948d307 | ||
|
|
510472db93 | ||
|
|
dcc8a671b8 | ||
|
|
101bbc8954 | ||
|
|
e329e09b58 | ||
|
|
8833dc4451 | ||
|
|
8710e6f545 | ||
|
|
32491a156f | ||
|
|
c373d6136f | ||
|
|
c1be369566 | ||
|
|
02f6da700a | ||
|
|
18fe9fc921 | ||
|
|
387528c3fb | ||
|
|
39587aa3f9 | ||
|
|
4f1bde0cfe | ||
|
|
a118d49bb1 | ||
|
|
fbae4909a0 | ||
|
|
bc8cb4984a | ||
|
|
93d6655228 | ||
|
|
e525b87fd3 | ||
|
|
2fcaf68312 | ||
|
|
ca22a91b8a | ||
|
|
c7e1376c4b | ||
|
|
aa79050a43 | ||
|
|
ea5811735a | ||
|
|
33ece82e08 | ||
|
|
b56d584efc | ||
|
|
51068ce766 | ||
|
|
87e39faa33 | ||
|
|
a5662909cf | ||
|
|
325a582330 | ||
|
|
2aa9904392 | ||
|
|
b65eee45a8 | ||
|
|
42708d60bc | ||
|
|
75feeabc3c | ||
|
|
f36a0b3b9c | ||
|
|
57041af313 | ||
|
|
8dfc40ff98 | ||
|
|
b51cf24f0f | ||
|
|
45a4d15811 | ||
|
|
3d78ad4fff | ||
|
|
cc9e30ac23 | ||
|
|
4cb0d4e572 | ||
|
|
62e662a690 | ||
|
|
58bbff124b | ||
|
|
fae843a243 | ||
|
|
0b277e066d | ||
|
|
01b14ed3a7 | ||
|
|
e5f6374d98 | ||
|
|
c9a639b057 | ||
|
|
75ecdae00e | ||
|
|
6848d813bf | ||
|
|
138bb6169d | ||
|
|
5f0af16616 | ||
|
|
9de4f0d9a4 | ||
|
|
cd77aeebb9 | ||
|
|
5ad3712810 | ||
|
|
8be02d948d | ||
|
|
9dcf96eb4c | ||
|
|
5c78188d22 | ||
|
|
b67b691fb8 | ||
|
|
14f4add4ab | ||
|
|
6386903c91 | ||
|
|
819f5794e3 | ||
|
|
edc46b2163 | ||
|
|
8c63dbd4e1 | ||
|
|
0dd77b5662 | ||
|
|
49ab880623 | ||
|
|
0f596480b0 | ||
|
|
dee7bd6258 | ||
|
|
64ec4eb1e6 | ||
|
|
29e72b6ff5 | ||
|
|
13283639e4 | ||
|
|
f14ddff141 | ||
|
|
1c884f50ed | ||
|
|
647bd794ed | ||
|
|
0807798777 | ||
|
|
1e9c398ca5 | ||
|
|
9678d22724 | ||
|
|
4e1506f68e | ||
|
|
a912ed33aa | ||
|
|
695bb4848e | ||
|
|
b9bf7c19aa | ||
|
|
3573a61568 | ||
|
|
0594a7f9d8 | ||
|
|
41debd1191 | ||
|
|
08745a8632 | ||
|
|
c12fa808ae | ||
|
|
aee991fb7b | ||
|
|
3d5d71f096 | ||
|
|
25528dbee1 | ||
|
|
73c3d26d55 | ||
|
|
72e20a5dbb | ||
|
|
ff80f57816 | ||
|
|
9a71e66a62 | ||
|
|
b992fd26b9 | ||
|
|
2aae7600f4 | ||
|
|
14e7046980 | ||
|
|
9e2eb2700a | ||
|
|
4f093e2626 | ||
|
|
e202592715 | ||
|
|
3a77b418cb | ||
|
|
e0a42eb394 | ||
|
|
eecb6402cf | ||
|
|
0f3e92108f | ||
|
|
824b0e85f0 | ||
|
|
81788d1ad2 | ||
|
|
c317c0ee36 | ||
|
|
59336515b0 | ||
|
|
492d86b701 | ||
|
|
e64512a67e | ||
|
|
bc786cb9ba | ||
|
|
b48beaaf9c | ||
|
|
393a86792c | ||
|
|
77f595e617 | ||
|
|
978653db75 | ||
|
|
99af98b16a | ||
|
|
643c1d6d31 | ||
|
|
a0dcc65dac | ||
|
|
fc510dbc3d | ||
|
|
eaa8aa7d35 | ||
|
|
6e1fe5171e | ||
|
|
526f594d47 | ||
|
|
f8949ba975 | ||
|
|
f175ac32d0 | ||
|
|
c0a7e75f29 | ||
|
|
bc741e9e3b | ||
|
|
6eb0c0666b | ||
|
|
b20853d21d | ||
|
|
dedaafd863 | ||
|
|
f0c9e80d33 | ||
|
|
16907b13db | ||
|
|
1b73933be0 | ||
|
|
cbf6be9df1 | ||
|
|
8063e1d154 | ||
|
|
402c5f477b | ||
|
|
8106f3bbba | ||
|
|
5c52ae731d | ||
|
|
6f17b2d0ff | ||
|
|
d6b08f097f | ||
|
|
54668d252c | ||
|
|
9071f27d9f | ||
|
|
e9cc746851 | ||
|
|
b0e38c2a2d | ||
|
|
9b25b4c5bf | ||
|
|
68e1444ed8 | ||
|
|
3f1fda6a63 | ||
|
|
e14d457905 | ||
|
|
9648254ec7 | ||
|
|
3360cad4cc | ||
|
|
e280e4a62a | ||
|
|
cf9d946969 | ||
|
|
d9124b333b | ||
|
|
cbe53d9daf | ||
|
|
2c17ff3e9f | ||
|
|
7ad0357eaa | ||
|
|
b7d4c4843d | ||
|
|
5daa40b498 | ||
|
|
93dc0874b5 | ||
|
|
cbe9404bb9 | ||
|
|
19fe093ce9 | ||
|
|
f7e856a16d | ||
|
|
75b495c544 | ||
|
|
dfaf0700f1 | ||
|
|
e16b1f4a53 | ||
|
|
3f16686627 | ||
|
|
48ad3d5a5a | ||
|
|
d9043f0a0a | ||
|
|
2ae6fc4bd8 | ||
|
|
84775373a6 | ||
|
|
8360abd1c0 | ||
|
|
9d4dc1a081 | ||
|
|
6840fd8ffc | ||
|
|
83596c1a32 | ||
|
|
55fcda758a | ||
|
|
51fced9913 | ||
|
|
bf436f885e | ||
|
|
f7f9720ce8 | ||
|
|
61c745357d | ||
|
|
a49e3daaba | ||
|
|
9cbc6f4531 | ||
|
|
46f8d6c31e | ||
|
|
038c805c8c | ||
|
|
be5c879697 | ||
|
|
f3bfabb149 | ||
|
|
60995e03d1 | ||
|
|
74f23ada73 | ||
|
|
e307da43c5 | ||
|
|
2bc0de8716 | ||
|
|
972b24eab7 | ||
|
|
81bb91db14 | ||
|
|
52f0d22784 | ||
|
|
19e0e3fcb4 | ||
|
|
69964e005d | ||
|
|
b0dfe95dae | ||
|
|
c2a88018d8 | ||
|
|
21ab621d02 | ||
|
|
e2ad0efbed | ||
|
|
abeb9bdac3 | ||
|
|
ed1581dee5 | ||
|
|
be2afbe990 | ||
|
|
0c717fb24a | ||
|
|
a0c4cea9f9 | ||
|
|
685130c18c | ||
|
|
b5ecb36b50 | ||
|
|
61f3ad0662 | ||
|
|
428f8d2f05 | ||
|
|
8314591523 | ||
|
|
c1049a5d10 | ||
|
|
80c1b6a2ee | ||
|
|
289e12de5a | ||
|
|
459a404563 | ||
|
|
e7fcf5cd54 | ||
|
|
c47c288138 | ||
|
|
9216f1d9b2 | ||
|
|
f7fc61f043 | ||
|
|
4c274dbca7 | ||
|
|
9b37aab61a | ||
|
|
da72f4cfc8 | ||
|
|
a0ba9a81b2 | ||
|
|
52963880ce | ||
|
|
748ab102c2 | ||
|
|
fd12609330 | ||
|
|
86b8b3e9bc | ||
|
|
1ed5881b30 | ||
|
|
a1e1113101 | ||
|
|
c45d1c337c | ||
|
|
1fb9f9c585 | ||
|
|
029b8796f9 | ||
|
|
9abbed2049 | ||
|
|
ce9c343c0a | ||
|
|
2edc824b61 | ||
|
|
0b70c3e8db | ||
|
|
3c64626c67 | ||
|
|
a368e53a02 | ||
|
|
c730d73c10 | ||
|
|
eb17e192c0 | ||
|
|
6532370c30 | ||
|
|
1da288de85 | ||
|
|
17a47224f3 | ||
|
|
6129c908b8 | ||
|
|
35f6156ed4 | ||
|
|
4dcbcfe533 | ||
|
|
80fd67cdea | ||
|
|
0abfcedda8 | ||
|
|
244458a1c9 | ||
|
|
c87d887efc | ||
|
|
bbd4e58b65 | ||
|
|
f85bf00409 | ||
|
|
044fbbdbac | ||
|
|
ecb6a97dc4 | ||
|
|
b791df95d4 | ||
|
|
3ef2df75fd | ||
|
|
703f1378dc | ||
|
|
b7983ccd8f | ||
|
|
66d0f448c4 | ||
|
|
13766e4339 | ||
|
|
5f65b7f7f4 | ||
|
|
d73dd08ef4 | ||
|
|
2c359ca926 | ||
|
|
a78d5156ac | ||
|
|
81d5fe6fc6 | ||
|
|
6d36f66a00 | ||
|
|
45ba8d4bd2 | ||
|
|
6b2f7088a2 | ||
|
|
b240568a9f | ||
|
|
eb98b8efad | ||
|
|
0c7594d3c2 | ||
|
|
cb63c7360b | ||
|
|
4f3144f718 | ||
|
|
eb27a8803a | ||
|
|
de3bc686c1 | ||
|
|
27b3625cd1 | ||
|
|
906c6598d6 | ||
|
|
19eaa62d4e | ||
|
|
6091db1948 | ||
|
|
10b4b09872 | ||
|
|
1295b9d604 | ||
|
|
6b75f460cc | ||
|
|
dd3784e0d0 | ||
|
|
e19993076c | ||
|
|
5aa543f4d2 | ||
|
|
815606f4c2 | ||
|
|
27914bd841 | ||
|
|
711ef0e0f0 | ||
|
|
bbfb8cd8d7 | ||
|
|
6f03d239f3 | ||
|
|
1ed3941e16 | ||
|
|
7ce89b8741 | ||
|
|
7d26bd1063 | ||
|
|
0a9404bb46 | ||
|
|
4503f1b9c1 | ||
|
|
631fce5b7c | ||
|
|
ef9f85f5d2 | ||
|
|
14b800e2e4 | ||
|
|
bbf61fa368 | ||
|
|
fd74f87b92 | ||
|
|
0c77f57fd9 | ||
|
|
dbd3639847 | ||
|
|
9105d963fc | ||
|
|
960ed03730 | ||
|
|
9972a575a3 | ||
|
|
2724662fc5 | ||
|
|
4556accc62 | ||
|
|
14eb3c6e82 | ||
|
|
0e24af9e00 | ||
|
|
e98bce8c03 | ||
|
|
8468445e1d | ||
|
|
c523fcdaab | ||
|
|
475dcdfdbe | ||
|
|
24ab2b8da5 | ||
|
|
42cc4a3d1e | ||
|
|
d2f8a30c96 | ||
|
|
69b43aafbb | ||
|
|
ae5847a845 | ||
|
|
3f75657a42 | ||
|
|
92b995b1bf | ||
|
|
1b63f1a2ab | ||
|
|
ebc611740f | ||
|
|
6d23dc6ad7 | ||
|
|
38ceb9d409 | ||
|
|
45ea5ccef0 | ||
|
|
9435ff437a | ||
|
|
b6badbaf54 | ||
|
|
ed22fdd993 | ||
|
|
5d682a5d6c | ||
|
|
46dbb77c8b | ||
|
|
542f0663cd | ||
|
|
5d56c692ab | ||
|
|
a8aec58460 | ||
|
|
bf957cb5ca | ||
|
|
6aedd2c392 | ||
|
|
5ecdab0ebb | ||
|
|
90d1e6d5ea | ||
|
|
1df621fad0 | ||
|
|
de4e0e4219 | ||
|
|
4ada52153c | ||
|
|
c5500987aa | ||
|
|
78fe769ea6 | ||
|
|
3610f56475 | ||
|
|
8808328e7d | ||
|
|
68b8f0ec66 | ||
|
|
b630b60ed0 | ||
|
|
74d0b70df4 | ||
|
|
a59b397172 | ||
|
|
24fca5536c | ||
|
|
b93b6c56f4 | ||
|
|
81305c3639 | ||
|
|
c099776962 | ||
|
|
18978521c9 | ||
|
|
c11723dc7f | ||
|
|
9bd1dd4d01 | ||
|
|
090d965af3 | ||
|
|
7334bec571 | ||
|
|
79a4bfbbc4 | ||
|
|
72dea5310e | ||
|
|
a649eb8555 | ||
|
|
3cfc8dd4e0 | ||
|
|
6da94c1bba | ||
|
|
a4836c2b03 | ||
|
|
430eb23448 | ||
|
|
0ee7189b82 | ||
|
|
55c0c186d1 | ||
|
|
2410d0c531 | ||
|
|
256a2f1979 | ||
|
|
261c047803 | ||
|
|
974bf0399c | ||
|
|
46f7dc205e | ||
|
|
aef083ee53 | ||
|
|
c2aa873d8f | ||
|
|
830ddb18d9 | ||
|
|
c11b7f0413 | ||
|
|
297cbd52d6 | ||
|
|
4680d86586 | ||
|
|
c99c5be40a | ||
|
|
84a51a3ef4 | ||
|
|
21d1168943 | ||
|
|
bbbd976fe3 | ||
|
|
5a102251cf | ||
|
|
58bb181b48 | ||
|
|
422e36a995 | ||
|
|
a6ff7effc0 | ||
|
|
989c3b66cf | ||
|
|
3f4823257a | ||
|
|
a9da07dc5d | ||
|
|
3613bbc9e8 | ||
|
|
6d8be72aa7 | ||
|
|
43542f226b | ||
|
|
c630857010 | ||
|
|
c5839b215e | ||
|
|
ed0131b46f | ||
|
|
5cf61cac22 | ||
|
|
f727b3f5e2 | ||
|
|
2740196c08 | ||
|
|
f9e2e0b4ac | ||
|
|
5247137ef8 | ||
|
|
e3e5b0b0fc | ||
|
|
d4e33f9953 | ||
|
|
435fc57feb | ||
|
|
2c86f0d07c | ||
|
|
1eed3a0378 | ||
|
|
d7f77b42bf | ||
|
|
cb09f17fc7 | ||
|
|
d9c092552f | ||
|
|
a7c05d2e84 | ||
|
|
789a92bc2c | ||
|
|
47e8a2cef6 | ||
|
|
ef7ce29fe0 | ||
|
|
e2f18e4ee5 | ||
|
|
e23773e5de | ||
|
|
fd53df53cd | ||
|
|
20c729f0d6 | ||
|
|
5724309e78 | ||
|
|
4f38539b41 | ||
|
|
fa8626c5ab | ||
|
|
02f9eb6e71 | ||
|
|
3c52c9ea92 | ||
|
|
7efecd10ea | ||
|
|
a3af73b593 | ||
|
|
c1f42f51eb | ||
|
|
e0d97b9916 | ||
|
|
66d66bddae | ||
|
|
0ddcc07224 | ||
|
|
e0c1dcd4b9 | ||
|
|
01bb7c82ed | ||
|
|
11ecba745f | ||
|
|
5322cff6a9 | ||
|
|
e8a31da05d | ||
|
|
7a93124cdb | ||
|
|
75a4efc8ba | ||
|
|
e27dd53c78 | ||
|
|
b0c5e24507 | ||
|
|
cce9a8aff2 | ||
|
|
c3833e2ebb | ||
|
|
1fc806161f | ||
|
|
3c74fbf9ab | ||
|
|
b487136878 | ||
|
|
70072b4e40 | ||
|
|
0fde1f6258 | ||
|
|
f6b9f85099 | ||
|
|
4c1089d335 | ||
|
|
7b5f2b24b3 | ||
|
|
0c2e348239 | ||
|
|
339da3ee1a | ||
|
|
d122d90df0 | ||
|
|
c601fbdc12 | ||
|
|
e5f3e47ccb | ||
|
|
6721a0bc6d | ||
|
|
2fc1cc333f | ||
|
|
71f53e4c87 | ||
|
|
e525a28398 | ||
|
|
f6de0928c4 | ||
|
|
ae385eca06 | ||
|
|
e2685413ce | ||
|
|
6e7bafd758 | ||
|
|
abca7f06d5 | ||
|
|
e6805833c2 | ||
|
|
4b802a15c3 | ||
|
|
e7a201a2f6 | ||
|
|
2ef682edf3 | ||
|
|
ca8c7266ed | ||
|
|
7dcdde3ccb | ||
|
|
7adaa6b86a | ||
|
|
0197b8d44c | ||
|
|
6636b4cb8d | ||
|
|
018bb18b6a | ||
|
|
dfc965067a | ||
|
|
db7e91248a | ||
|
|
13bb3abf57 | ||
|
|
5602160caf | ||
|
|
35f4169d6a | ||
|
|
c82e29afe0 | ||
|
|
4837f6bbfb | ||
|
|
3f9a0cfd5c | ||
|
|
c91fe15f6f | ||
|
|
d489c85bf9 | ||
|
|
a2cd2d6f48 | ||
|
|
f13d117afc | ||
|
|
77e3af6603 | ||
|
|
8df6cec4e5 | ||
|
|
cb9c31a7b5 | ||
|
|
e41844334e | ||
|
|
1f0001b644 | ||
|
|
469874d858 | ||
|
|
c0853ec37d | ||
|
|
8547d4651b | ||
|
|
2b06dd263f | ||
|
|
ed61f467b1 | ||
|
|
d3ecd1d490 | ||
|
|
d214100f0a | ||
|
|
8638c328b4 | ||
|
|
ddab457422 | ||
|
|
1547986b69 | ||
|
|
73716f35fc | ||
|
|
9f78e45cf6 | ||
|
|
ff46294882 | ||
|
|
d8661afb5f | ||
|
|
517437ec78 | ||
|
|
f00e7e89f4 | ||
|
|
de343f3bd0 | ||
|
|
d8c26f9579 | ||
|
|
6d11766fbf | ||
|
|
fdb94450d6 | ||
|
|
fb511a6488 | ||
|
|
aa45edd913 | ||
|
|
9e03b5d50e | ||
|
|
78f04f5c95 | ||
|
|
571da68fab | ||
|
|
c5a191b5c3 | ||
|
|
1e66315eb7 | ||
|
|
f9754c9f1f | ||
|
|
c01abc9567 | ||
|
|
2bd15411da | ||
|
|
e0270d6a68 | ||
|
|
8c785b2c72 | ||
|
|
37e8e99a48 | ||
|
|
7e47614a93 | ||
|
|
0c92a7bd05 | ||
|
|
80206f55d8 | ||
|
|
c7003f0f49 | ||
|
|
7b6af93f63 | ||
|
|
0e09d38020 | ||
|
|
ef275bf6f1 | ||
|
|
cb2be30949 | ||
|
|
cd30e2a5ba | ||
|
|
7dfbf71c4d | ||
|
|
601b35acc8 | ||
|
|
78e833e626 | ||
|
|
c9b2e898ee | ||
|
|
707bcce402 | ||
|
|
7b66df22b1 | ||
|
|
c7c2c32c8d | ||
|
|
7c4c877681 | ||
|
|
d6202e35fe | ||
|
|
5507c4a366 | ||
|
|
f52b10be26 | ||
|
|
4c9bd18a45 | ||
|
|
ed93059ec3 |
@@ -11,7 +11,7 @@ dependencies = [
|
||||
# Core Dependencies
|
||||
"pydantic>=2.4.2",
|
||||
"openai>=1.13.3",
|
||||
"litellm>=1.56.4",
|
||||
"litellm>=1.44.22",
|
||||
"instructor>=1.3.3",
|
||||
|
||||
# Text Processing
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
@@ -23,9 +21,6 @@ from crewai.tools.base_tool import Tool
|
||||
from crewai.utilities import Converter, Prompts
|
||||
from crewai.utilities.constants import TRAINED_AGENTS_DATA_FILE, TRAINING_DATA_FILE
|
||||
from crewai.utilities.converter import generate_model_description
|
||||
from crewai.utilities.logger import Logger
|
||||
from crewai.utilities.rpm_controller import RPMController
|
||||
from crewai.agents.agent_builder.utilities.base_token_process import TokenProcess
|
||||
from crewai.utilities.token_counter_callback import TokenCalcHandler
|
||||
from crewai.utilities.training_handler import CrewTrainingHandler
|
||||
|
||||
@@ -50,113 +45,24 @@ class Agent(BaseAgent):
|
||||
Each agent has a role, a goal, a backstory, and an optional language model (llm).
|
||||
The agent can also have memory, can operate in verbose mode, and can delegate tasks to other agents.
|
||||
|
||||
Args:
|
||||
role (Optional[str]): The role of the agent
|
||||
goal (Optional[str]): The objective of the agent
|
||||
backstory (Optional[str]): The backstory of the agent
|
||||
allow_delegation (bool): Whether the agent can delegate tasks
|
||||
config (Optional[Dict[str, Any]]): Configuration for the agent
|
||||
verbose (bool): Whether to enable verbose output
|
||||
max_rpm (Optional[int]): Maximum requests per minute
|
||||
tools (Optional[List[Any]]): Tools available to the agent
|
||||
llm (Optional[Union[str, Any]]): Language model to use
|
||||
function_calling_llm (Optional[Any]): Language model for tool calling
|
||||
max_iter (Optional[int]): Maximum iterations for task execution
|
||||
memory (bool): Whether the agent should have memory
|
||||
step_callback (Optional[Any]): Callback after each execution step
|
||||
knowledge_sources (Optional[List[BaseKnowledgeSource]]): Knowledge sources
|
||||
Attributes:
|
||||
agent_executor: An instance of the CrewAgentExecutor class.
|
||||
role: The role of the agent.
|
||||
goal: The objective of the agent.
|
||||
backstory: The backstory of the agent.
|
||||
knowledge: The knowledge base of the agent.
|
||||
config: Dict representation of agent configuration.
|
||||
llm: The language model that will run the agent.
|
||||
function_calling_llm: The language model that will handle the tool calling for this agent, it overrides the crew function_calling_llm.
|
||||
max_iter: Maximum number of iterations for an agent to execute a task.
|
||||
memory: Whether the agent should have memory or not.
|
||||
max_rpm: Maximum number of requests per minute for the agent execution to be respected.
|
||||
verbose: Whether the agent execution should be in verbose mode.
|
||||
allow_delegation: Whether the agent is allowed to delegate tasks to other agents.
|
||||
tools: Tools at agents disposal
|
||||
step_callback: Callback to be executed after each step of the agent execution.
|
||||
knowledge_sources: Knowledge sources for the agent.
|
||||
"""
|
||||
|
||||
model_config = {
|
||||
"arbitrary_types_allowed": True,
|
||||
"extra": "allow",
|
||||
}
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
role: Optional[str] = None,
|
||||
goal: Optional[str] = None,
|
||||
backstory: Optional[str] = None,
|
||||
allow_delegation: bool = False,
|
||||
config: Optional[Dict[str, Any]] = None,
|
||||
verbose: bool = False,
|
||||
max_rpm: Optional[int] = None,
|
||||
tools: Optional[List[Any]] = None,
|
||||
llm: Optional[Union[str, LLM, Any]] = None,
|
||||
function_calling_llm: Optional[Any] = None,
|
||||
max_iter: Optional[int] = None,
|
||||
memory: bool = True,
|
||||
step_callback: Optional[Any] = None,
|
||||
knowledge_sources: Optional[List[BaseKnowledgeSource]] = None,
|
||||
**kwargs
|
||||
) -> None:
|
||||
"""Initialize an Agent with the given parameters."""
|
||||
# Process tools before passing to parent
|
||||
processed_tools = []
|
||||
if tools:
|
||||
from crewai.tools import BaseTool
|
||||
for tool in tools:
|
||||
if isinstance(tool, BaseTool):
|
||||
processed_tools.append(tool)
|
||||
elif callable(tool):
|
||||
# Convert function to BaseTool
|
||||
processed_tools.append(Tool.from_function(tool))
|
||||
else:
|
||||
raise ValueError(f"Tool {tool} must be either a BaseTool instance or a callable")
|
||||
|
||||
# Process LLM before passing to parent
|
||||
processed_llm = None
|
||||
if isinstance(llm, str):
|
||||
processed_llm = LLM(model=llm)
|
||||
elif isinstance(llm, LLM):
|
||||
processed_llm = llm
|
||||
elif llm is not None and hasattr(llm, 'model') and hasattr(llm, 'temperature'):
|
||||
# Handle ChatOpenAI and similar objects
|
||||
model_name = getattr(llm, 'model', None)
|
||||
if model_name is not None:
|
||||
if not isinstance(model_name, str):
|
||||
model_name = str(model_name)
|
||||
processed_llm = LLM(
|
||||
model=model_name,
|
||||
temperature=getattr(llm, 'temperature', None),
|
||||
api_key=getattr(llm, 'api_key', None),
|
||||
base_url=getattr(llm, 'base_url', None)
|
||||
)
|
||||
# If no valid LLM configuration found, leave as None for post_init_setup
|
||||
|
||||
# Initialize all fields in a dict
|
||||
init_dict = {
|
||||
"role": role,
|
||||
"goal": goal,
|
||||
"backstory": backstory,
|
||||
"allow_delegation": allow_delegation,
|
||||
"config": config,
|
||||
"verbose": verbose,
|
||||
"max_rpm": max_rpm,
|
||||
"tools": processed_tools,
|
||||
"max_iter": max_iter if max_iter is not None else 25,
|
||||
"function_calling_llm": function_calling_llm,
|
||||
"step_callback": step_callback,
|
||||
"knowledge_sources": knowledge_sources,
|
||||
**kwargs
|
||||
}
|
||||
|
||||
# Initialize base model with all fields
|
||||
super().__init__(**init_dict)
|
||||
|
||||
# Store original values for interpolation
|
||||
self._original_role = role
|
||||
self._original_goal = goal
|
||||
self._original_backstory = backstory
|
||||
|
||||
# Set LLM after base initialization to ensure proper model handling
|
||||
self.llm = processed_llm
|
||||
|
||||
# Initialize private attributes
|
||||
self._logger = Logger(verbose=self.verbose)
|
||||
if self.max_rpm:
|
||||
self._rpm_controller = RPMController(max_rpm=self.max_rpm, logger=self._logger)
|
||||
self._token_process = TokenProcess()
|
||||
|
||||
_times_executed: int = PrivateAttr(default=0)
|
||||
max_execution_time: Optional[int] = Field(
|
||||
@@ -232,15 +138,21 @@ class Agent(BaseAgent):
|
||||
@model_validator(mode="after")
|
||||
def post_init_setup(self):
|
||||
self._set_knowledge()
|
||||
self.agent_ops_agent_name = self.role or "agent"
|
||||
self.agent_ops_agent_name = self.role
|
||||
unaccepted_attributes = [
|
||||
"AWS_ACCESS_KEY_ID",
|
||||
"AWS_SECRET_ACCESS_KEY",
|
||||
"AWS_REGION_NAME",
|
||||
]
|
||||
|
||||
# Handle LLM initialization if not already done
|
||||
if self.llm is None:
|
||||
# Handle different cases for self.llm
|
||||
if isinstance(self.llm, str):
|
||||
# If it's a string, create an LLM instance
|
||||
self.llm = LLM(model=self.llm)
|
||||
elif isinstance(self.llm, LLM):
|
||||
# If it's already an LLM instance, keep it as is
|
||||
pass
|
||||
elif self.llm is None:
|
||||
# Determine the model name from environment variables or use default
|
||||
model_name = (
|
||||
os.environ.get("OPENAI_MODEL_NAME")
|
||||
@@ -278,71 +190,9 @@ class Agent(BaseAgent):
|
||||
if key not in ["prompt", "key_name", "default"]:
|
||||
# Only add default if the key is already set in os.environ
|
||||
if key in os.environ:
|
||||
try:
|
||||
# Create a new dictionary for properly typed parameters
|
||||
typed_params = {}
|
||||
|
||||
# Convert and validate values based on parameter type
|
||||
if key in ['temperature', 'top_p', 'presence_penalty', 'frequency_penalty']:
|
||||
if value is not None:
|
||||
try:
|
||||
typed_params[key] = float(value)
|
||||
except (ValueError, TypeError):
|
||||
pass
|
||||
elif key in ['n', 'max_tokens', 'max_completion_tokens', 'seed']:
|
||||
if value is not None:
|
||||
try:
|
||||
typed_params[key] = int(value)
|
||||
except (ValueError, TypeError):
|
||||
pass
|
||||
elif key == 'logit_bias' and isinstance(value, str):
|
||||
try:
|
||||
bias_dict = {}
|
||||
for pair in value.split(','):
|
||||
token_id, bias = pair.split(':')
|
||||
bias_dict[int(token_id.strip())] = float(bias.strip())
|
||||
typed_params[key] = bias_dict
|
||||
except (ValueError, AttributeError):
|
||||
pass
|
||||
elif key == 'response_format' and isinstance(value, str):
|
||||
try:
|
||||
import json
|
||||
typed_params[key] = json.loads(value)
|
||||
except json.JSONDecodeError:
|
||||
pass
|
||||
elif key == 'logprobs':
|
||||
if value is not None:
|
||||
typed_params[key] = bool(value.lower() == 'true') if isinstance(value, str) else bool(value)
|
||||
elif key == 'callbacks':
|
||||
typed_params[key] = [] if value is None else [value] if isinstance(value, str) else value
|
||||
elif key == 'stop':
|
||||
typed_params[key] = [value] if isinstance(value, str) else value
|
||||
elif key in ['model', 'base_url', 'api_version', 'api_key']:
|
||||
typed_params[key] = value
|
||||
|
||||
# Update llm_params with properly typed values
|
||||
if typed_params:
|
||||
llm_params.update(typed_params)
|
||||
except (ValueError, AttributeError, json.JSONDecodeError):
|
||||
continue
|
||||
llm_params[key] = value
|
||||
|
||||
# Create LLM instance with properly typed parameters
|
||||
valid_params = {
|
||||
'model', 'timeout', 'temperature', 'top_p', 'n', 'stop',
|
||||
'max_completion_tokens', 'max_tokens', 'presence_penalty',
|
||||
'frequency_penalty', 'logit_bias', 'response_format',
|
||||
'seed', 'logprobs', 'top_logprobs', 'base_url',
|
||||
'api_version', 'api_key', 'callbacks'
|
||||
}
|
||||
|
||||
# Filter out None values and invalid parameters
|
||||
filtered_params = {}
|
||||
for k, v in llm_params.items():
|
||||
if k in valid_params and v is not None:
|
||||
filtered_params[k] = v
|
||||
|
||||
# Create LLM instance with properly typed parameters
|
||||
self.llm = LLM(**filtered_params)
|
||||
self.llm = LLM(**llm_params)
|
||||
else:
|
||||
# For any other type, attempt to extract relevant attributes
|
||||
llm_params = {
|
||||
@@ -389,7 +239,7 @@ class Agent(BaseAgent):
|
||||
def _set_knowledge(self):
|
||||
try:
|
||||
if self.knowledge_sources:
|
||||
knowledge_agent_name = f"{(self.role or 'agent').replace(' ', '_')}"
|
||||
knowledge_agent_name = f"{self.role.replace(' ', '_')}"
|
||||
if isinstance(self.knowledge_sources, list) and all(
|
||||
isinstance(k, BaseKnowledgeSource) for k in self.knowledge_sources
|
||||
):
|
||||
@@ -534,32 +384,6 @@ class Agent(BaseAgent):
|
||||
self.response_template.split("{{ .Response }}")[1].strip()
|
||||
)
|
||||
|
||||
# Ensure LLM is initialized with proper error handling
|
||||
try:
|
||||
if not self.llm:
|
||||
self.llm = LLM(model="gpt-4")
|
||||
if hasattr(self, '_logger'):
|
||||
self._logger.debug("Initialized default LLM with gpt-4 model")
|
||||
except Exception as e:
|
||||
if hasattr(self, '_logger'):
|
||||
self._logger.error(f"Failed to initialize LLM: {str(e)}")
|
||||
raise
|
||||
|
||||
# Create token callback with proper error handling
|
||||
try:
|
||||
token_callback = None
|
||||
if hasattr(self, '_token_process'):
|
||||
token_callback = TokenCalcHandler(self._token_process)
|
||||
except Exception as e:
|
||||
if hasattr(self, '_logger'):
|
||||
self._logger.warning(f"Failed to create token callback: {str(e)}")
|
||||
token_callback = None
|
||||
|
||||
# Initialize callbacks list
|
||||
executor_callbacks = []
|
||||
if token_callback:
|
||||
executor_callbacks.append(token_callback)
|
||||
|
||||
self.agent_executor = CrewAgentExecutor(
|
||||
llm=self.llm,
|
||||
task=task,
|
||||
@@ -577,9 +401,9 @@ class Agent(BaseAgent):
|
||||
function_calling_llm=self.function_calling_llm,
|
||||
respect_context_window=self.respect_context_window,
|
||||
request_within_rpm_limit=(
|
||||
self._rpm_controller.check_or_wait if (hasattr(self, '_rpm_controller') and self._rpm_controller is not None) else None
|
||||
self._rpm_controller.check_or_wait if self._rpm_controller else None
|
||||
),
|
||||
callbacks=executor_callbacks,
|
||||
callbacks=[TokenCalcHandler(self._token_process)],
|
||||
)
|
||||
|
||||
def get_delegation_tools(self, agents: List[BaseAgent]):
|
||||
|
||||
@@ -18,7 +18,6 @@ from pydantic_core import PydanticCustomError
|
||||
from crewai.agents.agent_builder.utilities.base_token_process import TokenProcess
|
||||
from crewai.agents.cache.cache_handler import CacheHandler
|
||||
from crewai.agents.tools_handler import ToolsHandler
|
||||
from crewai.knowledge.source.base_knowledge_source import BaseKnowledgeSource
|
||||
from crewai.tools import BaseTool
|
||||
from crewai.tools.base_tool import Tool
|
||||
from crewai.utilities import I18N, Logger, RPMController
|
||||
@@ -88,9 +87,9 @@ class BaseAgent(ABC, BaseModel):
|
||||
formatting_errors: int = Field(
|
||||
default=0, description="Number of formatting errors."
|
||||
)
|
||||
role: Optional[str] = Field(default=None, description="Role of the agent")
|
||||
goal: Optional[str] = Field(default=None, description="Objective of the agent")
|
||||
backstory: Optional[str] = Field(default=None, description="Backstory of the agent")
|
||||
role: str = Field(description="Role of the agent")
|
||||
goal: str = Field(description="Objective of the agent")
|
||||
backstory: str = Field(description="Backstory of the agent")
|
||||
config: Optional[Dict[str, Any]] = Field(
|
||||
description="Configuration for the agent", default=None, exclude=True
|
||||
)
|
||||
@@ -131,47 +130,26 @@ class BaseAgent(ABC, BaseModel):
|
||||
max_tokens: Optional[int] = Field(
|
||||
default=None, description="Maximum number of tokens for the agent's execution."
|
||||
)
|
||||
function_calling_llm: Optional[Any] = Field(
|
||||
default=None, description="Language model for function calling."
|
||||
)
|
||||
step_callback: Optional[Any] = Field(
|
||||
default=None, description="Callback for execution steps."
|
||||
)
|
||||
knowledge_sources: Optional[List[BaseKnowledgeSource]] = Field(
|
||||
default=None, description="Knowledge sources for the agent."
|
||||
)
|
||||
|
||||
model_config = {
|
||||
"arbitrary_types_allowed": True,
|
||||
"extra": "allow", # Allow extra fields in constructor
|
||||
}
|
||||
|
||||
@model_validator(mode="before")
|
||||
@classmethod
|
||||
def process_model_config(cls, values):
|
||||
"""Process configuration values before model initialization."""
|
||||
return process_config(values, cls)
|
||||
|
||||
@field_validator("tools")
|
||||
@classmethod
|
||||
def validate_tools(cls, tools: Optional[List[Any]]) -> List[BaseTool]:
|
||||
def validate_tools(cls, tools: List[Any]) -> List[BaseTool]:
|
||||
"""Validate and process the tools provided to the agent.
|
||||
|
||||
This method ensures that each tool is either an instance of BaseTool,
|
||||
a function decorated with @tool, or an object with 'name', 'func',
|
||||
and 'description' attributes. If the tool meets these criteria, it is
|
||||
processed and added to the list of tools. Otherwise, a ValueError is raised.
|
||||
This method ensures that each tool is either an instance of BaseTool
|
||||
or an object with 'name', 'func', and 'description' attributes. If the
|
||||
tool meets these criteria, it is processed and added to the list of
|
||||
tools. Otherwise, a ValueError is raised.
|
||||
"""
|
||||
if not tools:
|
||||
return []
|
||||
|
||||
processed_tools = []
|
||||
for tool in tools:
|
||||
if isinstance(tool, BaseTool):
|
||||
processed_tools.append(tool)
|
||||
elif callable(tool) and hasattr(tool, "_is_tool") and tool._is_tool:
|
||||
# Handle @tool decorated functions
|
||||
processed_tools.append(Tool.from_function(tool))
|
||||
elif (
|
||||
hasattr(tool, "name")
|
||||
and hasattr(tool, "func")
|
||||
@@ -179,54 +157,31 @@ class BaseAgent(ABC, BaseModel):
|
||||
):
|
||||
# Tool has the required attributes, create a Tool instance
|
||||
processed_tools.append(Tool.from_langchain(tool))
|
||||
else:
|
||||
else:
|
||||
raise ValueError(
|
||||
f"Invalid tool type: {type(tool)}. "
|
||||
"Tool must be an instance of BaseTool, a @tool decorated function, "
|
||||
"or an object with 'name', 'func', and 'description' attributes."
|
||||
"Tool must be an instance of BaseTool or "
|
||||
"an object with 'name', 'func', and 'description' attributes."
|
||||
)
|
||||
return processed_tools
|
||||
|
||||
@model_validator(mode="after")
|
||||
def validate_and_set_attributes(self):
|
||||
"""Validate and set attributes for the agent.
|
||||
|
||||
This method ensures that attributes are properly set and initialized,
|
||||
either from direct parameters or configuration.
|
||||
"""
|
||||
# Store original values for interpolation
|
||||
self._original_role = self.role
|
||||
self._original_goal = self.goal
|
||||
self._original_backstory = self.backstory
|
||||
# Validate required fields
|
||||
for field in ["role", "goal", "backstory"]:
|
||||
if getattr(self, field) is None:
|
||||
raise ValueError(
|
||||
f"{field} must be provided either directly or through config"
|
||||
)
|
||||
|
||||
# Process config if provided
|
||||
if self.config:
|
||||
config_data = self.config
|
||||
if isinstance(config_data, str):
|
||||
import json
|
||||
try:
|
||||
config_data = json.loads(config_data)
|
||||
except json.JSONDecodeError:
|
||||
raise ValueError("Invalid JSON in config")
|
||||
|
||||
# Update fields from config if they're None
|
||||
for field in ["role", "goal", "backstory"]:
|
||||
if field in config_data and getattr(self, field) is None:
|
||||
setattr(self, field, config_data[field])
|
||||
|
||||
# Set default values for required fields if they're still None
|
||||
self.role = self.role or "Assistant"
|
||||
self.goal = self.goal or "Help the user accomplish their tasks"
|
||||
self.backstory = self.backstory or "I am an AI assistant ready to help"
|
||||
|
||||
# Initialize tools handler if not set
|
||||
if not hasattr(self, 'tools_handler') or self.tools_handler is None:
|
||||
self.tools_handler = ToolsHandler()
|
||||
|
||||
# Initialize logger and rpm controller
|
||||
# Set private attributes
|
||||
self._logger = Logger(verbose=self.verbose)
|
||||
if self.max_rpm:
|
||||
self._rpm_controller = RPMController(max_rpm=self.max_rpm, logger=self._logger)
|
||||
if self.max_rpm and not self._rpm_controller:
|
||||
self._rpm_controller = RPMController(
|
||||
max_rpm=self.max_rpm, logger=self._logger
|
||||
)
|
||||
if not self._token_process:
|
||||
self._token_process = TokenProcess()
|
||||
|
||||
return self
|
||||
|
||||
@@ -253,9 +208,9 @@ class BaseAgent(ABC, BaseModel):
|
||||
@property
|
||||
def key(self):
|
||||
source = [
|
||||
str(self._original_role or self.role or ""),
|
||||
str(self._original_goal or self.goal or ""),
|
||||
str(self._original_backstory or self.backstory or ""),
|
||||
self._original_role or self.role,
|
||||
self._original_goal or self.goal,
|
||||
self._original_backstory or self.backstory,
|
||||
]
|
||||
return md5("|".join(source).encode(), usedforsecurity=False).hexdigest()
|
||||
|
||||
@@ -301,45 +256,29 @@ class BaseAgent(ABC, BaseModel):
|
||||
"tools_handler",
|
||||
"cache_handler",
|
||||
"llm",
|
||||
"function_calling_llm",
|
||||
}
|
||||
|
||||
# Copy LLMs and clear callbacks
|
||||
existing_llm = shallow_copy(self.llm) if self.llm else None
|
||||
existing_function_calling_llm = shallow_copy(self.function_calling_llm) if self.function_calling_llm else None
|
||||
|
||||
# Create base data
|
||||
# Copy llm and clear callbacks
|
||||
existing_llm = shallow_copy(self.llm)
|
||||
copied_data = self.model_dump(exclude=exclude)
|
||||
copied_data = {k: v for k, v in copied_data.items() if v is not None}
|
||||
|
||||
# Create new instance with copied data
|
||||
copied_agent = type(self)(
|
||||
**copied_data,
|
||||
llm=existing_llm,
|
||||
function_calling_llm=existing_function_calling_llm,
|
||||
tools=self.tools
|
||||
)
|
||||
|
||||
# Copy private attributes
|
||||
copied_agent._original_role = self._original_role
|
||||
copied_agent._original_goal = self._original_goal
|
||||
copied_agent._original_backstory = self._original_backstory
|
||||
copied_agent = type(self)(**copied_data, llm=existing_llm, tools=self.tools)
|
||||
|
||||
return copied_agent
|
||||
|
||||
def interpolate_inputs(self, inputs: Dict[str, Any]) -> None:
|
||||
"""Interpolate inputs into the agent description and backstory."""
|
||||
if self._original_role is None:
|
||||
self._original_role = self.role or ""
|
||||
self._original_role = self.role
|
||||
if self._original_goal is None:
|
||||
self._original_goal = self.goal or ""
|
||||
self._original_goal = self.goal
|
||||
if self._original_backstory is None:
|
||||
self._original_backstory = self.backstory or ""
|
||||
self._original_backstory = self.backstory
|
||||
|
||||
if inputs:
|
||||
self.role = self._original_role.format(**inputs) if self._original_role else None
|
||||
self.goal = self._original_goal.format(**inputs) if self._original_goal else None
|
||||
self.backstory = self._original_backstory.format(**inputs) if self._original_backstory else None
|
||||
self.role = self._original_role.format(**inputs)
|
||||
self.goal = self._original_goal.format(**inputs)
|
||||
self.backstory = self._original_backstory.format(**inputs)
|
||||
|
||||
def set_cache_handler(self, cache_handler: CacheHandler) -> None:
|
||||
"""Set the cache handler for the agent.
|
||||
|
||||
@@ -82,17 +82,16 @@ class CrewAgentExecutorMixin:
|
||||
)
|
||||
self.crew._long_term_memory.save(long_term_memory)
|
||||
|
||||
if hasattr(evaluation, 'entities') and evaluation.entities:
|
||||
for entity in evaluation.entities:
|
||||
entity_memory = EntityMemoryItem(
|
||||
name=entity.name,
|
||||
type=entity.type,
|
||||
description=entity.description,
|
||||
relationships="\n".join(
|
||||
[f"- {r}" for r in entity.relationships]
|
||||
),
|
||||
)
|
||||
self.crew._entity_memory.save(entity_memory)
|
||||
for entity in evaluation.entities:
|
||||
entity_memory = EntityMemoryItem(
|
||||
name=entity.name,
|
||||
type=entity.type,
|
||||
description=entity.description,
|
||||
relationships="\n".join(
|
||||
[f"- {r}" for r in entity.relationships]
|
||||
),
|
||||
)
|
||||
self.crew._entity_memory.save(entity_memory)
|
||||
except AttributeError as e:
|
||||
print(f"Missing attributes for long term memory: {e}")
|
||||
pass
|
||||
|
||||
@@ -68,7 +68,7 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
|
||||
self.tools_handler = tools_handler
|
||||
self.original_tools = original_tools
|
||||
self.step_callback = step_callback
|
||||
self.use_stop_words = self.llm.supports_stop_words() if self.llm else False
|
||||
self.use_stop_words = self.llm.supports_stop_words()
|
||||
self.tools_description = tools_description
|
||||
self.function_calling_llm = function_calling_llm
|
||||
self.respect_context_window = respect_context_window
|
||||
@@ -147,8 +147,7 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
|
||||
# Directly append the result to the messages if the
|
||||
# tool is "Add image to content" in case of multimodal
|
||||
# agents
|
||||
add_image_tool_name = self._i18n.tools("add_image")
|
||||
if add_image_tool_name and formatted_answer.tool == add_image_tool_name:
|
||||
if formatted_answer.tool == self._i18n.tools("add_image")["name"]:
|
||||
self.messages.append(tool_result.result)
|
||||
continue
|
||||
|
||||
@@ -215,14 +214,13 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
|
||||
if self.agent.verbose or (
|
||||
hasattr(self, "crew") and getattr(self.crew, "verbose", False)
|
||||
):
|
||||
agent_role = self.agent.role.split("\n")[0] if self.agent and self.agent.role else ""
|
||||
agent_role = self.agent.role.split("\n")[0]
|
||||
self._printer.print(
|
||||
content=f"\033[1m\033[95m# Agent:\033[00m \033[1m\033[92m{agent_role}\033[00m"
|
||||
)
|
||||
if self.task and self.task.description:
|
||||
self._printer.print(
|
||||
content=f"\033[95m## Task:\033[00m \033[92m{self.task.description}\033[00m"
|
||||
)
|
||||
self._printer.print(
|
||||
content=f"\033[95m## Task:\033[00m \033[92m{self.task.description}\033[00m"
|
||||
)
|
||||
|
||||
def _show_logs(self, formatted_answer: Union[AgentAction, AgentFinish]):
|
||||
if self.agent is None:
|
||||
@@ -230,7 +228,7 @@ class CrewAgentExecutor(CrewAgentExecutorMixin):
|
||||
if self.agent.verbose or (
|
||||
hasattr(self, "crew") and getattr(self.crew, "verbose", False)
|
||||
):
|
||||
agent_role = self.agent.role.split("\n")[0] if self.agent and self.agent.role else ""
|
||||
agent_role = self.agent.role.split("\n")[0]
|
||||
if isinstance(formatted_answer, AgentAction):
|
||||
thought = re.sub(r"\n+", "\n", formatted_answer.thought)
|
||||
formatted_json = json.dumps(
|
||||
|
||||
@@ -5,7 +5,6 @@ from pathlib import Path
|
||||
|
||||
import click
|
||||
import requests
|
||||
from typing import Any
|
||||
|
||||
from crewai.cli.constants import JSON_URL, MODELS, PROVIDERS
|
||||
|
||||
@@ -193,7 +192,7 @@ def download_data(response):
|
||||
data_chunks = []
|
||||
with click.progressbar(
|
||||
length=total_size, label="Downloading", show_pos=True
|
||||
) as progress_bar: # type: Any
|
||||
) as progress_bar:
|
||||
for chunk in response.iter_content(block_size):
|
||||
if chunk:
|
||||
data_chunks.append(chunk)
|
||||
|
||||
@@ -6,8 +6,6 @@ from concurrent.futures import Future
|
||||
from hashlib import md5
|
||||
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
|
||||
|
||||
from crewai.tools.base_tool import BaseTool
|
||||
|
||||
from pydantic import (
|
||||
UUID4,
|
||||
BaseModel,
|
||||
@@ -730,7 +728,7 @@ class Crew(BaseModel):
|
||||
tools_for_task = task.tools or agent_to_use.tools or []
|
||||
tools_for_task = self._prepare_tools(agent_to_use, task, tools_for_task)
|
||||
|
||||
self._log_task_start(task, agent_to_use.role if agent_to_use and agent_to_use.role else "")
|
||||
self._log_task_start(task, agent_to_use.role)
|
||||
|
||||
if isinstance(task, ConditionalTask):
|
||||
skipped_task_output = self._handle_conditional_task(
|
||||
@@ -796,8 +794,8 @@ class Crew(BaseModel):
|
||||
return None
|
||||
|
||||
def _prepare_tools(
|
||||
self, agent: BaseAgent, task: Task, tools: List[Union[Tool, BaseTool]]
|
||||
) -> List[Union[Tool, BaseTool]]:
|
||||
self, agent: BaseAgent, task: Task, tools: List[Tool]
|
||||
) -> List[Tool]:
|
||||
# Add delegation tools if agent allows delegation
|
||||
if agent.allow_delegation:
|
||||
if self.process == Process.hierarchical:
|
||||
@@ -826,8 +824,8 @@ class Crew(BaseModel):
|
||||
return task.agent
|
||||
|
||||
def _merge_tools(
|
||||
self, existing_tools: List[Union[Tool, BaseTool]], new_tools: List[Union[Tool, BaseTool]]
|
||||
) -> List[Union[Tool, BaseTool]]:
|
||||
self, existing_tools: List[Tool], new_tools: List[Tool]
|
||||
) -> List[Tool]:
|
||||
"""Merge new tools into existing tools list, avoiding duplicates by tool name."""
|
||||
if not new_tools:
|
||||
return existing_tools
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import json
|
||||
from typing import Any, Callable, Dict, Optional, Union
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
@@ -23,25 +23,14 @@ class CrewOutput(BaseModel):
|
||||
)
|
||||
token_usage: UsageMetrics = Field(description="Processed token summary", default={})
|
||||
|
||||
def json(
|
||||
self,
|
||||
*,
|
||||
include: Union[set[str], None] = None,
|
||||
exclude: Union[set[str], None] = None,
|
||||
by_alias: bool = False,
|
||||
exclude_unset: bool = False,
|
||||
exclude_defaults: bool = False,
|
||||
exclude_none: bool = False,
|
||||
encoder: Optional[Callable[[Any], Any]] = None,
|
||||
models_as_dict: bool = True,
|
||||
**dumps_kwargs: Any,
|
||||
) -> str:
|
||||
@property
|
||||
def json(self) -> Optional[str]:
|
||||
if self.tasks_output[-1].output_format != OutputFormat.JSON:
|
||||
raise ValueError(
|
||||
"No JSON output found in the final task. Please make sure to set the output_json property in the final task in your crew."
|
||||
)
|
||||
|
||||
return json.dumps(self.json_dict, default=encoder, **dumps_kwargs)
|
||||
return json.dumps(self.json_dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Convert json_output and pydantic_output to a dictionary."""
|
||||
|
||||
@@ -106,12 +106,7 @@ class FlowPlot:
|
||||
|
||||
# Add nodes to the network
|
||||
try:
|
||||
add_nodes_to_network(
|
||||
net,
|
||||
flow=self.flow,
|
||||
pos=node_positions,
|
||||
node_styles=self.node_styles
|
||||
)
|
||||
add_nodes_to_network(net, self.flow, node_positions, self.node_styles)
|
||||
except Exception as e:
|
||||
raise RuntimeError(f"Failed to add nodes to network: {str(e)}")
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ import warnings
|
||||
from contextlib import contextmanager
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore", UserWarning)
|
||||
import litellm
|
||||
@@ -95,33 +93,10 @@ def suppress_warnings():
|
||||
sys.stderr = old_stderr
|
||||
|
||||
|
||||
class LLM(BaseModel):
|
||||
model: str = "gpt-4" # Set default model
|
||||
timeout: Optional[Union[float, int]] = None
|
||||
temperature: Optional[float] = None
|
||||
top_p: Optional[float] = None
|
||||
n: Optional[int] = None
|
||||
stop: Optional[Union[str, List[str]]] = None
|
||||
max_completion_tokens: Optional[int] = None
|
||||
max_tokens: Optional[int] = None
|
||||
presence_penalty: Optional[float] = None
|
||||
frequency_penalty: Optional[float] = None
|
||||
logit_bias: Optional[Dict[int, float]] = None
|
||||
response_format: Optional[Dict[str, Any]] = None
|
||||
seed: Optional[int] = None
|
||||
logprobs: Optional[bool] = None
|
||||
top_logprobs: Optional[int] = None
|
||||
base_url: Optional[str] = None
|
||||
api_version: Optional[str] = None
|
||||
api_key: Optional[str] = None
|
||||
callbacks: Optional[List[Any]] = None
|
||||
context_window_size: Optional[int] = None
|
||||
kwargs: Dict[str, Any] = Field(default_factory=dict)
|
||||
logger: Optional[logging.Logger] = Field(default_factory=lambda: logging.getLogger(__name__))
|
||||
|
||||
class LLM:
|
||||
def __init__(
|
||||
self,
|
||||
model: Optional[Union[str, 'LLM']] = "gpt-4",
|
||||
model: str,
|
||||
timeout: Optional[Union[float, int]] = None,
|
||||
temperature: Optional[float] = None,
|
||||
top_p: Optional[float] = None,
|
||||
@@ -139,427 +114,118 @@ class LLM(BaseModel):
|
||||
base_url: Optional[str] = None,
|
||||
api_version: Optional[str] = None,
|
||||
api_key: Optional[str] = None,
|
||||
callbacks: Optional[List[Any]] = None,
|
||||
context_window_size: Optional[int] = None,
|
||||
**kwargs: Any,
|
||||
) -> None:
|
||||
# Initialize with default values
|
||||
init_dict = {
|
||||
"model": model if isinstance(model, str) else "gpt-4",
|
||||
"timeout": timeout,
|
||||
"temperature": temperature,
|
||||
"top_p": top_p,
|
||||
"n": n,
|
||||
"stop": stop,
|
||||
"max_completion_tokens": max_completion_tokens,
|
||||
"max_tokens": max_tokens,
|
||||
"presence_penalty": presence_penalty,
|
||||
"frequency_penalty": frequency_penalty,
|
||||
"logit_bias": logit_bias,
|
||||
"response_format": response_format,
|
||||
"seed": seed,
|
||||
"logprobs": logprobs,
|
||||
"top_logprobs": top_logprobs,
|
||||
"base_url": base_url,
|
||||
"api_version": api_version,
|
||||
"api_key": api_key,
|
||||
"callbacks": callbacks,
|
||||
"context_window_size": context_window_size,
|
||||
"kwargs": kwargs,
|
||||
}
|
||||
super().__init__(**init_dict)
|
||||
|
||||
# Initialize model with default value
|
||||
self.model = "gpt-4" # Default fallback
|
||||
|
||||
# Extract and validate model name
|
||||
if isinstance(model, LLM):
|
||||
# Extract and validate model name from LLM instance
|
||||
if hasattr(model, 'model'):
|
||||
if isinstance(model.model, str):
|
||||
self.model = model.model
|
||||
else:
|
||||
# Try to extract string model name from nested LLM
|
||||
if isinstance(model.model, LLM):
|
||||
self.model = str(model.model.model) if hasattr(model.model, 'model') else "gpt-4"
|
||||
else:
|
||||
self.model = "gpt-4"
|
||||
if self.logger:
|
||||
self.logger.warning("Nested LLM model is not a string, using default: gpt-4")
|
||||
else:
|
||||
self.model = "gpt-4"
|
||||
if self.logger:
|
||||
self.logger.warning("LLM instance has no model attribute, using default: gpt-4")
|
||||
else:
|
||||
# Extract and validate model name for non-LLM instances
|
||||
if not isinstance(model, str):
|
||||
if self.logger:
|
||||
self.logger.debug(f"Model is not a string, attempting to extract name. Type: {type(model)}")
|
||||
if model is not None:
|
||||
if hasattr(model, 'model_name'):
|
||||
model_name = getattr(model, 'model_name', None)
|
||||
self.model = str(model_name) if model_name is not None else "gpt-4"
|
||||
elif hasattr(model, 'model'):
|
||||
model_attr = getattr(model, 'model', None)
|
||||
self.model = str(model_attr) if model_attr is not None else "gpt-4"
|
||||
elif hasattr(model, '_model_name'):
|
||||
model_name = getattr(model, '_model_name', None)
|
||||
self.model = str(model_name) if model_name is not None else "gpt-4"
|
||||
else:
|
||||
self.model = "gpt-4" # Default fallback
|
||||
if self.logger:
|
||||
self.logger.warning(f"Could not extract model name from {type(model)}, using default: {self.model}")
|
||||
else:
|
||||
self.model = "gpt-4" # Default fallback for None
|
||||
if self.logger:
|
||||
self.logger.warning("Model is None, using default: gpt-4")
|
||||
else:
|
||||
self.model = str(model) # Ensure it's a string
|
||||
|
||||
# If model is an LLM instance, copy its configuration
|
||||
if isinstance(model, LLM):
|
||||
# Extract and validate model name first
|
||||
if hasattr(model, 'model'):
|
||||
if isinstance(model.model, str):
|
||||
self.model = model.model
|
||||
else:
|
||||
# Try to extract string model name from nested LLM
|
||||
if isinstance(model.model, LLM):
|
||||
self.model = str(model.model.model) if hasattr(model.model, 'model') else "gpt-4"
|
||||
else:
|
||||
self.model = "gpt-4"
|
||||
if self.logger:
|
||||
self.logger.warning("Nested LLM model is not a string, using default: gpt-4")
|
||||
else:
|
||||
self.model = "gpt-4"
|
||||
if self.logger:
|
||||
self.logger.warning("LLM instance has no model attribute, using default: gpt-4")
|
||||
|
||||
# Copy other configuration
|
||||
self.timeout = model.timeout
|
||||
self.temperature = model.temperature
|
||||
self.top_p = model.top_p
|
||||
self.n = model.n
|
||||
self.stop = model.stop
|
||||
self.max_completion_tokens = model.max_completion_tokens
|
||||
self.max_tokens = model.max_tokens
|
||||
self.presence_penalty = model.presence_penalty
|
||||
self.frequency_penalty = model.frequency_penalty
|
||||
self.logit_bias = model.logit_bias
|
||||
self.response_format = model.response_format
|
||||
self.seed = model.seed
|
||||
self.logprobs = model.logprobs
|
||||
self.top_logprobs = model.top_logprobs
|
||||
self.base_url = model.base_url
|
||||
self.api_version = model.api_version
|
||||
self.api_key = model.api_key
|
||||
self.callbacks = model.callbacks
|
||||
self.context_window_size = model.context_window_size
|
||||
self.kwargs = model.kwargs
|
||||
|
||||
# Final validation of model name
|
||||
if not isinstance(self.model, str):
|
||||
self.model = "gpt-4"
|
||||
if self.logger:
|
||||
self.logger.warning("Model name is still not a string after LLM copy, using default: gpt-4")
|
||||
else:
|
||||
# Extract and validate model name for non-LLM instances
|
||||
if not isinstance(model, str):
|
||||
if self.logger:
|
||||
self.logger.debug(f"Model is not a string, attempting to extract name. Type: {type(model)}")
|
||||
if model is not None:
|
||||
if hasattr(model, 'model_name'):
|
||||
model_name = getattr(model, 'model_name', None)
|
||||
self.model = str(model_name) if model_name is not None else "gpt-4"
|
||||
elif hasattr(model, 'model'):
|
||||
model_attr = getattr(model, 'model', None)
|
||||
self.model = str(model_attr) if model_attr is not None else "gpt-4"
|
||||
elif hasattr(model, '_model_name'):
|
||||
model_name = getattr(model, '_model_name', None)
|
||||
self.model = str(model_name) if model_name is not None else "gpt-4"
|
||||
else:
|
||||
self.model = "gpt-4" # Default fallback
|
||||
if self.logger:
|
||||
self.logger.warning(f"Could not extract model name from {type(model)}, using default: {self.model}")
|
||||
else:
|
||||
self.model = "gpt-4" # Default fallback for None
|
||||
if self.logger:
|
||||
self.logger.warning("Model is None, using default: gpt-4")
|
||||
else:
|
||||
self.model = str(model) # Ensure it's a string
|
||||
|
||||
# Final validation
|
||||
if not isinstance(self.model, str):
|
||||
self.model = "gpt-4"
|
||||
if self.logger:
|
||||
self.logger.warning("Model name is still not a string after extraction, using default: gpt-4")
|
||||
|
||||
self.timeout = timeout
|
||||
self.temperature = temperature
|
||||
self.top_p = top_p
|
||||
self.n = n
|
||||
self.stop = stop
|
||||
self.max_completion_tokens = max_completion_tokens
|
||||
self.max_tokens = max_tokens
|
||||
self.presence_penalty = presence_penalty
|
||||
self.frequency_penalty = frequency_penalty
|
||||
self.logit_bias = logit_bias
|
||||
self.response_format = response_format
|
||||
self.seed = seed
|
||||
self.logprobs = logprobs
|
||||
self.top_logprobs = top_logprobs
|
||||
self.base_url = base_url
|
||||
self.api_version = api_version
|
||||
self.api_key = api_key
|
||||
self.callbacks = callbacks
|
||||
self.context_window_size = 0
|
||||
self.kwargs = kwargs
|
||||
|
||||
# Ensure model is a string after initialization
|
||||
if not isinstance(self.model, str):
|
||||
self.model = "gpt-4"
|
||||
self.logger.warning(f"Model is still not a string after initialization, using default: {self.model}")
|
||||
callbacks: List[Any] = [],
|
||||
**kwargs,
|
||||
):
|
||||
self.model = model
|
||||
self.timeout = timeout
|
||||
self.temperature = temperature
|
||||
self.top_p = top_p
|
||||
self.n = n
|
||||
self.stop = stop
|
||||
self.max_completion_tokens = max_completion_tokens
|
||||
self.max_tokens = max_tokens
|
||||
self.presence_penalty = presence_penalty
|
||||
self.frequency_penalty = frequency_penalty
|
||||
self.logit_bias = logit_bias
|
||||
self.response_format = response_format
|
||||
self.seed = seed
|
||||
self.logprobs = logprobs
|
||||
self.top_logprobs = top_logprobs
|
||||
self.base_url = base_url
|
||||
self.api_version = api_version
|
||||
self.api_key = api_key
|
||||
self.callbacks = callbacks
|
||||
self.context_window_size = 0
|
||||
self.kwargs = kwargs
|
||||
|
||||
litellm.drop_params = True
|
||||
|
||||
self.set_callbacks(callbacks)
|
||||
self.set_env_callbacks()
|
||||
|
||||
def call(
|
||||
self,
|
||||
messages: List[Dict[str, str]],
|
||||
callbacks: Optional[List[Any]] = None
|
||||
) -> str:
|
||||
def call(self, messages: List[Dict[str, str]], callbacks: List[Any] = []) -> str:
|
||||
with suppress_warnings():
|
||||
if callbacks and len(callbacks) > 0:
|
||||
self.set_callbacks(callbacks)
|
||||
|
||||
# Store original model to restore later
|
||||
original_model = self.model
|
||||
|
||||
try:
|
||||
# Ensure model is a string before making the call
|
||||
if not isinstance(self.model, str):
|
||||
if self.logger:
|
||||
self.logger.warning(f"Model is not a string in call method: {type(self.model)}. Attempting to convert...")
|
||||
if isinstance(self.model, LLM):
|
||||
self.model = self.model.model if isinstance(self.model.model, str) else "gpt-4"
|
||||
elif hasattr(self.model, 'model_name'):
|
||||
self.model = str(self.model.model_name)
|
||||
elif hasattr(self.model, 'model'):
|
||||
if isinstance(self.model.model, str):
|
||||
self.model = str(self.model.model)
|
||||
elif hasattr(self.model.model, 'model_name'):
|
||||
self.model = str(self.model.model.model_name)
|
||||
else:
|
||||
self.model = "gpt-4"
|
||||
if self.logger:
|
||||
self.logger.warning("Could not extract model name from nested model object, using default: gpt-4")
|
||||
else:
|
||||
self.model = "gpt-4"
|
||||
if self.logger:
|
||||
self.logger.warning("Could not extract model name, using default: gpt-4")
|
||||
|
||||
if self.logger:
|
||||
self.logger.debug(f"Using model: {self.model} (type: {type(self.model)}) for LiteLLM call")
|
||||
|
||||
# Create base params with validated model name
|
||||
# Extract model name string
|
||||
model_name = None
|
||||
if isinstance(self.model, str):
|
||||
model_name = self.model
|
||||
elif hasattr(self.model, 'model_name'):
|
||||
model_name = str(self.model.model_name)
|
||||
elif hasattr(self.model, 'model'):
|
||||
if isinstance(self.model.model, str):
|
||||
model_name = str(self.model.model)
|
||||
elif hasattr(self.model.model, 'model_name'):
|
||||
model_name = str(self.model.model.model_name)
|
||||
|
||||
if not model_name:
|
||||
model_name = "gpt-4"
|
||||
if self.logger:
|
||||
self.logger.warning("Could not extract model name, using default: gpt-4")
|
||||
|
||||
params = {
|
||||
"model": model_name,
|
||||
"model": self.model,
|
||||
"messages": messages,
|
||||
"stream": False,
|
||||
"api_key": self.api_key or os.getenv("OPENAI_API_KEY"),
|
||||
"timeout": self.timeout,
|
||||
"temperature": self.temperature,
|
||||
"top_p": self.top_p,
|
||||
"n": self.n,
|
||||
"stop": self.stop,
|
||||
"max_tokens": self.max_tokens or self.max_completion_tokens,
|
||||
"presence_penalty": self.presence_penalty,
|
||||
"frequency_penalty": self.frequency_penalty,
|
||||
"logit_bias": self.logit_bias,
|
||||
"response_format": self.response_format,
|
||||
"seed": self.seed,
|
||||
"logprobs": self.logprobs,
|
||||
"top_logprobs": self.top_logprobs,
|
||||
"api_base": self.base_url,
|
||||
"api_version": self.api_version,
|
||||
"api_key": self.api_key,
|
||||
"stream": False,
|
||||
**self.kwargs,
|
||||
}
|
||||
|
||||
if self.logger:
|
||||
self.logger.debug(f"Using model parameters: {params}")
|
||||
|
||||
# Add API configuration if available
|
||||
api_key = self.api_key or os.getenv("OPENAI_API_KEY")
|
||||
if api_key:
|
||||
params["api_key"] = api_key
|
||||
|
||||
# Try to get supported parameters for the model
|
||||
try:
|
||||
supported_params = get_supported_openai_params(self.model)
|
||||
optional_params = {}
|
||||
|
||||
if supported_params:
|
||||
param_mapping = {
|
||||
"timeout": self.timeout,
|
||||
"temperature": self.temperature,
|
||||
"top_p": self.top_p,
|
||||
"n": self.n,
|
||||
"stop": self.stop,
|
||||
"max_tokens": self.max_tokens or self.max_completion_tokens,
|
||||
"presence_penalty": self.presence_penalty,
|
||||
"frequency_penalty": self.frequency_penalty,
|
||||
"logit_bias": self.logit_bias,
|
||||
"response_format": self.response_format,
|
||||
"seed": self.seed,
|
||||
"logprobs": self.logprobs,
|
||||
"top_logprobs": self.top_logprobs
|
||||
}
|
||||
|
||||
# Only add parameters that are supported and not None
|
||||
optional_params = {
|
||||
k: v for k, v in param_mapping.items()
|
||||
if k in supported_params and v is not None
|
||||
}
|
||||
if "logprobs" in supported_params and self.logprobs is not None:
|
||||
optional_params["logprobs"] = self.logprobs
|
||||
if "top_logprobs" in supported_params and self.top_logprobs is not None:
|
||||
optional_params["top_logprobs"] = self.top_logprobs
|
||||
except Exception as e:
|
||||
if self.logger:
|
||||
self.logger.error(f"Failed to get supported params for model {self.model}: {str(e)}")
|
||||
# If we can't get supported params, just add non-None parameters
|
||||
param_mapping = {
|
||||
"timeout": self.timeout,
|
||||
"temperature": self.temperature,
|
||||
"top_p": self.top_p,
|
||||
"n": self.n,
|
||||
"stop": self.stop,
|
||||
"max_tokens": self.max_tokens or self.max_completion_tokens,
|
||||
"presence_penalty": self.presence_penalty,
|
||||
"frequency_penalty": self.frequency_penalty,
|
||||
"logit_bias": self.logit_bias,
|
||||
"response_format": self.response_format,
|
||||
"seed": self.seed,
|
||||
"logprobs": self.logprobs,
|
||||
"top_logprobs": self.top_logprobs
|
||||
}
|
||||
optional_params = {k: v for k, v in param_mapping.items() if v is not None}
|
||||
|
||||
# Update params with optional parameters
|
||||
params.update(optional_params)
|
||||
|
||||
# Add API endpoint configuration if available
|
||||
if self.base_url:
|
||||
params["api_base"] = self.base_url
|
||||
if self.api_version:
|
||||
params["api_version"] = self.api_version
|
||||
|
||||
# Final validation of model parameter
|
||||
if not isinstance(params["model"], str):
|
||||
if self.logger:
|
||||
self.logger.error(f"Model is still not a string after all conversions: {type(params['model'])}")
|
||||
params["model"] = "gpt-4"
|
||||
|
||||
# Update params with non-None optional parameters
|
||||
params.update({k: v for k, v in optional_params.items() if v is not None})
|
||||
|
||||
# Add any additional kwargs
|
||||
if self.kwargs:
|
||||
params.update(self.kwargs)
|
||||
|
||||
# Remove None values to avoid passing unnecessary parameters
|
||||
params = {k: v for k, v in params.items() if v is not None}
|
||||
|
||||
response = litellm.completion(**params)
|
||||
content = response["choices"][0]["message"]["content"]
|
||||
|
||||
# Extract usage metrics
|
||||
usage = response.get("usage", {})
|
||||
if callbacks:
|
||||
for callback in callbacks:
|
||||
if hasattr(callback, "update_token_usage"):
|
||||
callback.update_token_usage(usage)
|
||||
|
||||
return content
|
||||
return response["choices"][0]["message"]["content"]
|
||||
except Exception as e:
|
||||
if not LLMContextLengthExceededException(
|
||||
str(e)
|
||||
)._is_context_limit_error(str(e)):
|
||||
logging.error(f"LiteLLM call failed: {str(e)}")
|
||||
|
||||
raise # Re-raise the exception after logging
|
||||
finally:
|
||||
# Always restore the original model object
|
||||
self.model = original_model
|
||||
|
||||
def supports_function_calling(self) -> bool:
|
||||
"""Check if the LLM supports function calling.
|
||||
|
||||
Returns:
|
||||
bool: True if the model supports function calling, False otherwise
|
||||
"""
|
||||
try:
|
||||
params = get_supported_openai_params(model=self.model)
|
||||
return "response_format" in params
|
||||
except Exception as e:
|
||||
if self.logger:
|
||||
self.logger.error(f"Failed to get supported params: {str(e)}")
|
||||
logging.error(f"Failed to get supported params: {str(e)}")
|
||||
return False
|
||||
|
||||
def supports_stop_words(self) -> bool:
|
||||
"""Check if the LLM supports stop words.
|
||||
Returns False if the LLM is not properly initialized."""
|
||||
if not hasattr(self, 'model') or self.model is None:
|
||||
return False
|
||||
try:
|
||||
params = get_supported_openai_params(model=self.model)
|
||||
return "stop" in params
|
||||
except Exception as e:
|
||||
if self.logger:
|
||||
self.logger.error(f"Failed to get supported params: {str(e)}")
|
||||
logging.error(f"Failed to get supported params: {str(e)}")
|
||||
return False
|
||||
|
||||
def get_context_window_size(self) -> int:
|
||||
"""Get the context window size for the current model.
|
||||
|
||||
Returns:
|
||||
int: The context window size in tokens
|
||||
"""
|
||||
# Only using 75% of the context window size to avoid cutting the message in the middle
|
||||
if self.context_window_size is not None and self.context_window_size != 0:
|
||||
return int(self.context_window_size)
|
||||
if self.context_window_size != 0:
|
||||
return self.context_window_size
|
||||
|
||||
window_size = DEFAULT_CONTEXT_WINDOW_SIZE
|
||||
if isinstance(self.model, str):
|
||||
for key, value in LLM_CONTEXT_WINDOW_SIZES.items():
|
||||
if self.model.startswith(key):
|
||||
window_size = value
|
||||
break
|
||||
|
||||
self.context_window_size = int(window_size * CONTEXT_WINDOW_USAGE_RATIO)
|
||||
self.context_window_size = int(
|
||||
DEFAULT_CONTEXT_WINDOW_SIZE * CONTEXT_WINDOW_USAGE_RATIO
|
||||
)
|
||||
for key, value in LLM_CONTEXT_WINDOW_SIZES.items():
|
||||
if self.model.startswith(key):
|
||||
self.context_window_size = int(value * CONTEXT_WINDOW_USAGE_RATIO)
|
||||
return self.context_window_size
|
||||
|
||||
def set_callbacks(self, callbacks: Optional[List[Any]] = None) -> None:
|
||||
"""Set callbacks for the LLM.
|
||||
|
||||
Args:
|
||||
callbacks: Optional list of callback functions. If None, no callbacks will be set.
|
||||
"""
|
||||
if callbacks is not None:
|
||||
callback_types = [type(callback) for callback in callbacks]
|
||||
for callback in litellm.success_callback[:]:
|
||||
if type(callback) in callback_types:
|
||||
litellm.success_callback.remove(callback)
|
||||
def set_callbacks(self, callbacks: List[Any]):
|
||||
callback_types = [type(callback) for callback in callbacks]
|
||||
for callback in litellm.success_callback[:]:
|
||||
if type(callback) in callback_types:
|
||||
litellm.success_callback.remove(callback)
|
||||
|
||||
for callback in litellm._async_success_callback[:]:
|
||||
if type(callback) in callback_types:
|
||||
litellm._async_success_callback.remove(callback)
|
||||
for callback in litellm._async_success_callback[:]:
|
||||
if type(callback) in callback_types:
|
||||
litellm._async_success_callback.remove(callback)
|
||||
|
||||
litellm.callbacks = callbacks
|
||||
litellm.callbacks = callbacks
|
||||
|
||||
def set_env_callbacks(self):
|
||||
"""
|
||||
|
||||
@@ -269,9 +269,7 @@ class Task(BaseModel):
|
||||
@model_validator(mode="after")
|
||||
def check_tools(self):
|
||||
"""Check if the tools are set."""
|
||||
if self.agent and self.agent.tools:
|
||||
if self.tools is None:
|
||||
self.tools = []
|
||||
if not self.tools and self.agent and self.agent.tools:
|
||||
self.tools.extend(self.agent.tools)
|
||||
return self
|
||||
|
||||
@@ -350,8 +348,7 @@ class Task(BaseModel):
|
||||
self.prompt_context = context
|
||||
tools = tools or self.tools or []
|
||||
|
||||
if agent and agent.role:
|
||||
self.processed_by_agents.add(agent.role)
|
||||
self.processed_by_agents.add(agent.role)
|
||||
|
||||
result = agent.execute_task(
|
||||
task=self,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import json
|
||||
from typing import Any, Callable, Dict, Optional, Union
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
from pydantic import BaseModel, Field, model_validator
|
||||
|
||||
@@ -34,19 +34,8 @@ class TaskOutput(BaseModel):
|
||||
self.summary = f"{excerpt}..."
|
||||
return self
|
||||
|
||||
def json(
|
||||
self,
|
||||
*,
|
||||
include: Union[set[str], None] = None,
|
||||
exclude: Union[set[str], None] = None,
|
||||
by_alias: bool = False,
|
||||
exclude_unset: bool = False,
|
||||
exclude_defaults: bool = False,
|
||||
exclude_none: bool = False,
|
||||
encoder: Optional[Callable[[Any], Any]] = None,
|
||||
models_as_dict: bool = True,
|
||||
**dumps_kwargs: Any,
|
||||
) -> str:
|
||||
@property
|
||||
def json(self) -> Optional[str]:
|
||||
if self.output_format != OutputFormat.JSON:
|
||||
raise ValueError(
|
||||
"""
|
||||
@@ -56,7 +45,7 @@ class TaskOutput(BaseModel):
|
||||
"""
|
||||
)
|
||||
|
||||
return json.dumps(self.json_dict, default=encoder, **dumps_kwargs)
|
||||
return json.dumps(self.json_dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Convert json_output and pydantic_output to a dictionary."""
|
||||
|
||||
@@ -19,13 +19,13 @@ class BaseAgentTool(BaseTool):
|
||||
default_factory=I18N, description="Internationalization settings"
|
||||
)
|
||||
|
||||
def sanitize_agent_name(self, name: Optional[str]) -> str:
|
||||
def sanitize_agent_name(self, name: str) -> str:
|
||||
"""
|
||||
Sanitize agent role name by normalizing whitespace and setting to lowercase.
|
||||
Converts all whitespace (including newlines) to single spaces and removes quotes.
|
||||
|
||||
Args:
|
||||
name (Optional[str]): The agent role name to sanitize
|
||||
name (str): The agent role name to sanitize
|
||||
|
||||
Returns:
|
||||
str: The sanitized agent role name, with whitespace normalized,
|
||||
|
||||
@@ -142,12 +142,7 @@ class CrewStructuredTool:
|
||||
|
||||
# Create model
|
||||
schema_name = f"{name.title()}Schema"
|
||||
return create_model(
|
||||
schema_name,
|
||||
__base__=BaseModel,
|
||||
__config__=None,
|
||||
**{k: v for k, v in fields.items()}
|
||||
)
|
||||
return create_model(schema_name, **fields)
|
||||
|
||||
def _validate_function_signature(self) -> None:
|
||||
"""Validate that the function signature matches the args schema."""
|
||||
@@ -175,7 +170,7 @@ class CrewStructuredTool:
|
||||
f"not found in args_schema"
|
||||
)
|
||||
|
||||
def _parse_args(self, raw_args: Union[str, dict[str, Any]]) -> dict[str, Any]:
|
||||
def _parse_args(self, raw_args: Union[str, dict]) -> dict:
|
||||
"""Parse and validate the input arguments against the schema.
|
||||
|
||||
Args:
|
||||
@@ -183,9 +178,6 @@ class CrewStructuredTool:
|
||||
|
||||
Returns:
|
||||
The validated arguments as a dictionary
|
||||
|
||||
Raises:
|
||||
ValueError: If the arguments cannot be parsed or fail validation
|
||||
"""
|
||||
if isinstance(raw_args, str):
|
||||
try:
|
||||
@@ -203,8 +195,8 @@ class CrewStructuredTool:
|
||||
|
||||
async def ainvoke(
|
||||
self,
|
||||
input: Union[str, dict[str, Any]],
|
||||
config: Optional[dict[str, Any]] = None,
|
||||
input: Union[str, dict],
|
||||
config: Optional[dict] = None,
|
||||
**kwargs: Any,
|
||||
) -> Any:
|
||||
"""Asynchronously invoke the tool.
|
||||
@@ -237,10 +229,7 @@ class CrewStructuredTool:
|
||||
return self.invoke(input_dict)
|
||||
|
||||
def invoke(
|
||||
self,
|
||||
input: Union[str, dict[str, Any]],
|
||||
config: Optional[dict[str, Any]] = None,
|
||||
**kwargs: Any
|
||||
self, input: Union[str, dict], config: Optional[dict] = None, **kwargs: Any
|
||||
) -> Any:
|
||||
"""Main method for tool execution."""
|
||||
parsed_args = self._parse_args(input)
|
||||
|
||||
@@ -10,24 +10,8 @@ class Logger(BaseModel):
|
||||
_printer: Printer = PrivateAttr(default_factory=Printer)
|
||||
|
||||
def log(self, level, message, color="bold_yellow"):
|
||||
if self.verbose or level.upper() in ["WARNING", "ERROR"]:
|
||||
if self.verbose:
|
||||
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
self._printer.print(
|
||||
f"\n[{timestamp}][{level.upper()}]: {message}", color=color
|
||||
)
|
||||
|
||||
def debug(self, message: str) -> None:
|
||||
"""Log a debug message if verbose is enabled."""
|
||||
self.log("debug", message, color="bold_blue")
|
||||
|
||||
def info(self, message: str) -> None:
|
||||
"""Log an info message if verbose is enabled."""
|
||||
self.log("info", message, color="bold_green")
|
||||
|
||||
def warning(self, message: str) -> None:
|
||||
"""Log a warning message."""
|
||||
self.log("warning", message, color="bold_yellow")
|
||||
|
||||
def error(self, message: str) -> None:
|
||||
"""Log an error message."""
|
||||
self.log("error", message, color="bold_red")
|
||||
|
||||
@@ -63,32 +63,16 @@ class Prompts(BaseModel):
|
||||
for component in components
|
||||
if component != "task"
|
||||
]
|
||||
system = ""
|
||||
if system_template:
|
||||
system = system_template.replace("{{ .System }}", "".join(prompt_parts))
|
||||
|
||||
prompt_text = ""
|
||||
if prompt_template:
|
||||
prompt_text = prompt_template.replace(
|
||||
"{{ .Prompt }}", "".join(self.i18n.slice("task"))
|
||||
)
|
||||
|
||||
response = ""
|
||||
if response_template:
|
||||
response = response_template.split("{{ .Response }}")[0]
|
||||
|
||||
parts = [p for p in [system, prompt_text, response] if p]
|
||||
prompt = "\n".join(parts) if parts else ""
|
||||
system = system_template.replace("{{ .System }}", "".join(prompt_parts))
|
||||
prompt = prompt_template.replace(
|
||||
"{{ .Prompt }}", "".join(self.i18n.slice("task"))
|
||||
)
|
||||
response = response_template.split("{{ .Response }}")[0]
|
||||
prompt = f"{system}\n{prompt}\n{response}"
|
||||
|
||||
# Get agent attributes with default values
|
||||
goal = str(getattr(self.agent, 'goal', '') or '')
|
||||
role = str(getattr(self.agent, 'role', '') or '')
|
||||
backstory = str(getattr(self.agent, 'backstory', '') or '')
|
||||
|
||||
# Replace placeholders with agent attributes
|
||||
prompt = (
|
||||
prompt.replace("{goal}", goal)
|
||||
.replace("{role}", role)
|
||||
.replace("{backstory}", backstory)
|
||||
prompt.replace("{goal}", self.agent.goal)
|
||||
.replace("{role}", self.agent.role)
|
||||
.replace("{backstory}", self.agent.backstory)
|
||||
)
|
||||
return prompt
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
"""Token processing utility for tracking and managing token usage."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
|
||||
from crewai.types.usage_metrics import UsageMetrics
|
||||
|
||||
|
||||
class TokenProcess:
|
||||
"""Handles token processing and tracking for agents."""
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize the token processor."""
|
||||
self._total_tokens = 0
|
||||
self._prompt_tokens = 0
|
||||
self._completion_tokens = 0
|
||||
self._cached_prompt_tokens = 0
|
||||
self._successful_requests = 0
|
||||
|
||||
def sum_prompt_tokens(self, count: int) -> None:
|
||||
"""Add to prompt token count.
|
||||
|
||||
Args:
|
||||
count (int): Number of prompt tokens to add
|
||||
"""
|
||||
self._prompt_tokens += count
|
||||
self._total_tokens += count
|
||||
|
||||
def sum_completion_tokens(self, count: int) -> None:
|
||||
"""Add to completion token count.
|
||||
|
||||
Args:
|
||||
count (int): Number of completion tokens to add
|
||||
"""
|
||||
self._completion_tokens += count
|
||||
self._total_tokens += count
|
||||
|
||||
def sum_cached_prompt_tokens(self, count: int) -> None:
|
||||
"""Add to cached prompt token count.
|
||||
|
||||
Args:
|
||||
count (int): Number of cached prompt tokens to add
|
||||
"""
|
||||
self._cached_prompt_tokens += count
|
||||
|
||||
def sum_successful_requests(self, count: int) -> None:
|
||||
"""Add to successful requests count.
|
||||
|
||||
Args:
|
||||
count (int): Number of successful requests to add
|
||||
"""
|
||||
self._successful_requests += count
|
||||
|
||||
def reset(self) -> None:
|
||||
"""Reset all token counts to zero."""
|
||||
self._total_tokens = 0
|
||||
self._prompt_tokens = 0
|
||||
self._completion_tokens = 0
|
||||
self._cached_prompt_tokens = 0
|
||||
self._successful_requests = 0
|
||||
|
||||
def get_summary(self) -> UsageMetrics:
|
||||
"""Get a summary of token usage.
|
||||
|
||||
Returns:
|
||||
UsageMetrics: Object containing token usage metrics
|
||||
"""
|
||||
return UsageMetrics(
|
||||
total_tokens=self._total_tokens,
|
||||
prompt_tokens=self._prompt_tokens,
|
||||
cached_prompt_tokens=self._cached_prompt_tokens,
|
||||
completion_tokens=self._completion_tokens,
|
||||
successful_requests=self._successful_requests
|
||||
)
|
||||
@@ -1457,7 +1457,7 @@ def test_agent_with_ollama_llama3():
|
||||
assert agent.llm.model == "ollama/llama3.2:3b"
|
||||
assert agent.llm.base_url == "http://localhost:11434"
|
||||
|
||||
task = "Respond in 20 words. Who are you?"
|
||||
task = "Respond in 20 words. Which model are you?"
|
||||
response = agent.llm.call([{"role": "user", "content": task}])
|
||||
|
||||
assert response
|
||||
@@ -1473,7 +1473,9 @@ def test_llm_call_with_ollama_llama3():
|
||||
temperature=0.7,
|
||||
max_tokens=30,
|
||||
)
|
||||
messages = [{"role": "user", "content": "Respond in 20 words. Who are you?"}]
|
||||
messages = [
|
||||
{"role": "user", "content": "Respond in 20 words. Which model are you?"}
|
||||
]
|
||||
|
||||
response = llm.call(messages)
|
||||
|
||||
|
||||
@@ -12,862 +12,34 @@ interactions:
|
||||
available and give your best Final Answer, your job depends on it!\n\nThought:\n\n",
|
||||
"options": {"stop": ["\nObservation:"]}, "stream": false}'
|
||||
headers:
|
||||
accept:
|
||||
Accept:
|
||||
- '*/*'
|
||||
accept-encoding:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
Connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
Content-Length:
|
||||
- '839'
|
||||
host:
|
||||
- localhost:11434
|
||||
user-agent:
|
||||
- litellm/1.56.4
|
||||
Content-Type:
|
||||
- application/json
|
||||
User-Agent:
|
||||
- python-requests/2.32.3
|
||||
method: POST
|
||||
uri: http://localhost:11434/api/generate
|
||||
response:
|
||||
content: '{"model":"llama3.2:3b","created_at":"2024-12-31T16:56:15.759718Z","response":"Final
|
||||
Answer: Artificial Intelligence (AI) refers to the development of computer systems
|
||||
able to perform tasks that typically require human intelligence, including learning,
|
||||
problem-solving, decision-making, and perception.","done":true,"done_reason":"stop","context":[128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,271,128009,128006,882,128007,271,14711,744,512,2675,527,1296,3560,13,1296,93371,198,7927,4443,5915,374,25,1296,5915,198,1271,3041,856,1888,4686,1620,4320,311,279,3465,1005,279,4839,2768,3645,1473,85269,25,358,1457,649,3041,264,2294,4320,198,19918,22559,25,4718,1620,4320,2011,387,279,2294,323,279,1455,4686,439,3284,11,433,2011,387,15632,7633,382,40,28832,1005,1521,20447,11,856,2683,14117,389,433,2268,14711,2724,1473,5520,5546,25,83017,1148,15592,374,304,832,11914,271,2028,374,279,1755,13186,369,701,1620,4320,25,362,832,1355,18886,16540,315,15592,198,9514,28832,471,279,5150,4686,2262,439,279,1620,4320,11,539,264,12399,382,11382,0,1115,374,48174,3062,311,499,11,1005,279,7526,2561,323,3041,701,1888,13321,22559,11,701,2683,14117,389,433,2268,85269,1473,128009,128006,78191,128007,271,19918,22559,25,59294,22107,320,15836,8,19813,311,279,4500,315,6500,6067,3025,311,2804,9256,430,11383,1397,3823,11478,11,2737,6975,11,3575,99246,11,5597,28846,11,323,21063,13],"total_duration":1156303250,"load_duration":35999125,"prompt_eval_count":181,"prompt_eval_duration":408000000,"eval_count":38,"eval_duration":711000000}'
|
||||
body:
|
||||
string: '{"model":"llama3.2:3b","created_at":"2025-01-02T20:05:52.24992Z","response":"Final
|
||||
Answer: Artificial Intelligence (AI) refers to the development of computer
|
||||
systems capable of performing tasks that typically require human intelligence,
|
||||
such as learning, problem-solving, decision-making, and perception.","done":true,"done_reason":"stop","context":[128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,271,128009,128006,882,128007,271,14711,744,512,2675,527,1296,3560,13,1296,93371,198,7927,4443,5915,374,25,1296,5915,198,1271,3041,856,1888,4686,1620,4320,311,279,3465,1005,279,4839,2768,3645,1473,85269,25,358,1457,649,3041,264,2294,4320,198,19918,22559,25,4718,1620,4320,2011,387,279,2294,323,279,1455,4686,439,3284,11,433,2011,387,15632,7633,382,40,28832,1005,1521,20447,11,856,2683,14117,389,433,2268,14711,2724,1473,5520,5546,25,83017,1148,15592,374,304,832,11914,271,2028,374,279,1755,13186,369,701,1620,4320,25,362,832,1355,18886,16540,315,15592,198,9514,28832,471,279,5150,4686,2262,439,279,1620,4320,11,539,264,12399,382,11382,0,1115,374,48174,3062,311,499,11,1005,279,7526,2561,323,3041,701,1888,13321,22559,11,701,2683,14117,389,433,2268,85269,1473,128009,128006,78191,128007,271,19918,22559,25,59294,22107,320,15836,8,19813,311,279,4500,315,6500,6067,13171,315,16785,9256,430,11383,1397,3823,11478,11,1778,439,6975,11,3575,99246,11,5597,28846,11,323,21063,13],"total_duration":1461909875,"load_duration":39886208,"prompt_eval_count":181,"prompt_eval_duration":701000000,"eval_count":39,"eval_duration":719000000}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '1528'
|
||||
- '1537'
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Date:
|
||||
- Tue, 31 Dec 2024 16:56:15 GMT
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"name": "llama3.2:3b"}'
|
||||
headers:
|
||||
accept:
|
||||
- '*/*'
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '23'
|
||||
content-type:
|
||||
- application/json
|
||||
host:
|
||||
- localhost:11434
|
||||
user-agent:
|
||||
- litellm/1.56.4
|
||||
method: POST
|
||||
uri: http://localhost:11434/api/show
|
||||
response:
|
||||
content: "{\"license\":\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version
|
||||
Release Date: September 25, 2024\\n\\n\u201CAgreement\u201D means the terms
|
||||
and conditions for use, reproduction, distribution \\nand modification of the
|
||||
Llama Materials set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications,
|
||||
manuals and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D
|
||||
or \u201Cyou\u201D means you, or your employer or any other person or entity
|
||||
(if you are \\nentering into this Agreement on such person or entity\u2019s
|
||||
behalf), of the age required under\\napplicable laws, rules or regulations to
|
||||
provide legal consent and that has legal authority\\nto bind your employer or
|
||||
such other person or entity if you are entering in this Agreement\\non their
|
||||
behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models
|
||||
and software and algorithms, including\\nmachine-learning model code, trained
|
||||
model weights, inference-enabling code, training-enabling code,\\nfine-tuning
|
||||
enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama
|
||||
Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation
|
||||
(and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D
|
||||
or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in
|
||||
or, \\nif you are an entity, your principal place of business is in the EEA
|
||||
or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the
|
||||
EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using
|
||||
or distributing any portion or element of the Llama Materials,\\nyou agree to
|
||||
be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n
|
||||
\ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable
|
||||
and royalty-free limited license under Meta\u2019s intellectual property or
|
||||
other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce,
|
||||
distribute, copy, create derivative works \\nof, and make modifications to the
|
||||
Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If
|
||||
you distribute or make available the Llama Materials (or any derivative works
|
||||
thereof), \\nor a product or service (including another AI model) that contains
|
||||
any of them, you shall (A) provide\\na copy of this Agreement with any such
|
||||
Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non
|
||||
a related website, user interface, blogpost, about page, or product documentation.
|
||||
If you use the\\nLlama Materials or any outputs or results of the Llama Materials
|
||||
to create, train, fine tune, or\\notherwise improve an AI model, which is distributed
|
||||
or made available, you shall also include \u201CLlama\u201D\\nat the beginning
|
||||
of any such AI model name.\\n\\n ii. If you receive Llama Materials,
|
||||
or any derivative works thereof, from a Licensee as part\\nof an integrated
|
||||
end user product, then Section 2 of this Agreement will not apply to you. \\n\\n
|
||||
\ iii. You must retain in all copies of the Llama Materials that you distribute
|
||||
the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed
|
||||
as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2
|
||||
Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n
|
||||
\ iv. Your use of the Llama Materials must comply with applicable laws
|
||||
and regulations\\n(including trade compliance laws and regulations) and adhere
|
||||
to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy),
|
||||
which is hereby \\nincorporated by reference into this Agreement.\\n \\n2.
|
||||
Additional Commercial Terms. If, on the Llama 3.2 version release date, the
|
||||
monthly active users\\nof the products or services made available by or for
|
||||
Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly
|
||||
active users in the preceding calendar month, you must request \\na license
|
||||
from Meta, which Meta may grant to you in its sole discretion, and you are not
|
||||
authorized to\\nexercise any of the rights under this Agreement unless or until
|
||||
Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty.
|
||||
UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS
|
||||
THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF
|
||||
ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND
|
||||
IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR
|
||||
DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS
|
||||
AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY
|
||||
OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR
|
||||
ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT,
|
||||
TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT,
|
||||
\\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL,
|
||||
EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED
|
||||
OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n
|
||||
\ a. No trademark licenses are granted under this Agreement, and in connection
|
||||
with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark
|
||||
owned by or associated with the other or any of its affiliates, \\nexcept as
|
||||
required for reasonable and customary use in describing and redistributing the
|
||||
Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants
|
||||
you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required
|
||||
\\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s
|
||||
brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/).
|
||||
All goodwill arising out of your use of the Mark \\nwill inure to the benefit
|
||||
of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and
|
||||
derivatives made by or for Meta, with respect to any\\n derivative works
|
||||
and modifications of the Llama Materials that are made by you, as between you
|
||||
and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n
|
||||
\ c. If you institute litigation or other proceedings against Meta or any
|
||||
entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging
|
||||
that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n
|
||||
\ of any of the foregoing, constitutes infringement of intellectual property
|
||||
or other rights owned or licensable\\n by you, then any licenses granted
|
||||
to you under this Agreement shall terminate as of the date such litigation or\\n
|
||||
\ claim is filed or instituted. You will indemnify and hold harmless Meta
|
||||
from and against any claim by any third\\n party arising out of or related
|
||||
to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination.
|
||||
The term of this Agreement will commence upon your acceptance of this Agreement
|
||||
or access\\nto the Llama Materials and will continue in full force and effect
|
||||
until terminated in accordance with the terms\\nand conditions herein. Meta
|
||||
may terminate this Agreement if you are in breach of any term or condition of
|
||||
this\\nAgreement. Upon termination of this Agreement, you shall delete and cease
|
||||
use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination
|
||||
of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will
|
||||
be governed and construed under the laws of the State of \\nCalifornia without
|
||||
regard to choice of law principles, and the UN Convention on Contracts for the
|
||||
International\\nSale of Goods does not apply to this Agreement. The courts of
|
||||
California shall have exclusive jurisdiction of\\nany dispute arising out of
|
||||
this Agreement.\\n**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta is committed
|
||||
to promoting safe and fair use of its tools and features, including Llama 3.2.
|
||||
If you access or use Llama 3.2, you agree to this Acceptable Use Policy (\u201C**Policy**\u201D).
|
||||
The most recent copy of this policy can be found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited
|
||||
Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree
|
||||
you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate
|
||||
the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate,
|
||||
contribute to, encourage, plan, incite, or further illegal or unlawful activity
|
||||
or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation
|
||||
or harm to children, including the solicitation, creation, acquisition, or dissemination
|
||||
of child exploitative content or failure to report Child Sexual Abuse Material\\n
|
||||
\ 3. Human trafficking, exploitation, and sexual violence\\n 4.
|
||||
The illegal distribution of information or materials to minors, including obscene
|
||||
materials, or failure to employ legally required age-gating in connection with
|
||||
such information or materials.\\n 5. Sexual solicitation\\n 6.
|
||||
Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate
|
||||
the harassment, abuse, threatening, or bullying of individuals or groups of
|
||||
individuals\\n 2. Engage in, promote, incite, or facilitate discrimination
|
||||
or other unlawful or harmful conduct in the provision of employment, employment
|
||||
benefits, credit, housing, other economic benefits, or other essential goods
|
||||
and services\\n 3. Engage in the unauthorized or unlicensed practice of any
|
||||
profession including, but not limited to, financial, legal, medical/health,
|
||||
or related professional practices\\n 4. Collect, process, disclose, generate,
|
||||
or infer private or sensitive information about individuals, including information
|
||||
about individuals\u2019 identity, health, or demographic information, unless
|
||||
you have obtained the right to do so in accordance with applicable law\\n 5.
|
||||
Engage in or facilitate any action or generate any content that infringes, misappropriates,
|
||||
or otherwise violates any third-party rights, including the outputs or results
|
||||
of any products or services using the Llama Materials\\n 6. Create, generate,
|
||||
or facilitate the creation of malicious code, malware, computer viruses or do
|
||||
anything else that could disable, overburden, interfere with or impair the proper
|
||||
working, integrity, operation or appearance of a website or computer system\\n
|
||||
\ 7. Engage in any action, or facilitate any action, to intentionally circumvent
|
||||
or remove usage restrictions or other safety measures, or to enable functionality
|
||||
disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the
|
||||
planning or development of activities that present a risk of death or bodily
|
||||
harm to individuals, including use of Llama 3.2 related to the following:\\n
|
||||
\ 8. Military, warfare, nuclear industries or applications, espionage, use
|
||||
for materials or activities that are subject to the International Traffic Arms
|
||||
Regulations (ITAR) maintained by the United States Department of State or to
|
||||
the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons
|
||||
Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including
|
||||
weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n
|
||||
\ 11. Operation of critical infrastructure, transportation technologies, or
|
||||
heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting,
|
||||
and eating disorders\\n 13. Any content intended to incite or promote violence,
|
||||
abuse, or any infliction of bodily harm to an individual\\n3. Intentionally
|
||||
deceive or mislead others, including use of Llama 3.2 related to the following:\\n
|
||||
\ 14. Generating, promoting, or furthering fraud or the creation or promotion
|
||||
of disinformation\\n 15. Generating, promoting, or furthering defamatory
|
||||
content, including the creation of defamatory statements, images, or other content\\n
|
||||
\ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating
|
||||
another individual without consent, authorization, or legal right\\n 18.
|
||||
Representing that the use of Llama 3.2 or outputs are human-generated\\n 19.
|
||||
Generating or facilitating false online engagement, including fake reviews and
|
||||
other means of fake online engagement\\n4. Fail to appropriately disclose to
|
||||
end users any known dangers of your AI system\\n5. Interact with third party
|
||||
tools, models, or software designed to generate unlawful content or engage in
|
||||
unlawful or harmful conduct and/or represent that the outputs of such tools,
|
||||
models, or software are associated with Meta or Llama 3.2\\n\\nWith respect
|
||||
to any multimodal models included in Llama 3.2, the rights granted under Section
|
||||
1(a) of the Llama 3.2 Community License Agreement are not being granted to you
|
||||
if you are an individual domiciled in, or a company with a principal place of
|
||||
business in, the European Union. This restriction does not apply to end users
|
||||
of a product or service that incorporates any such multimodal models.\\n\\nPlease
|
||||
report any violation of this Policy, software \u201Cbug,\u201D or other problems
|
||||
that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n*
|
||||
Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n*
|
||||
Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n*
|
||||
Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n*
|
||||
Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama
|
||||
3.2: LlamaUseReport@meta.com\",\"modelfile\":\"# Modelfile generated by \\\"ollama
|
||||
show\\\"\\n# To build a new Modelfile based on this, replace FROM with:\\n#
|
||||
FROM llama3.2:3b\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-dde5aa3fc5ffc17176b5e8bdc82f587b24b2678c6c66101bf7da77af9f7ccdff\\nTEMPLATE
|
||||
\\\"\\\"\\\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting
|
||||
Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{-
|
||||
if .Tools }}When you receive a tool call response, use the output to format
|
||||
an answer to the orginal user question.\\n\\nYou are a helpful assistant with
|
||||
tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i,
|
||||
$_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{-
|
||||
if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if and $.Tools $last }}\\n\\nGiven the following functions, please respond with
|
||||
a JSON for a function call with its proper arguments that best answers the given
|
||||
prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\":
|
||||
dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range
|
||||
$.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{-
|
||||
else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name
|
||||
}}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{
|
||||
.Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{-
|
||||
else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
.Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- end }}\\n{{- end }}\\\"\\\"\\\"\\nPARAMETER stop \\u003c|start_header_id|\\u003e\\nPARAMETER
|
||||
stop \\u003c|end_header_id|\\u003e\\nPARAMETER stop \\u003c|eot_id|\\u003e\\nLICENSE
|
||||
\\\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version Release Date:
|
||||
September 25, 2024\\n\\n\u201CAgreement\u201D means the terms and conditions
|
||||
for use, reproduction, distribution \\nand modification of the Llama Materials
|
||||
set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, manuals
|
||||
and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D
|
||||
or \u201Cyou\u201D means you, or your employer or any other person or entity
|
||||
(if you are \\nentering into this Agreement on such person or entity\u2019s
|
||||
behalf), of the age required under\\napplicable laws, rules or regulations to
|
||||
provide legal consent and that has legal authority\\nto bind your employer or
|
||||
such other person or entity if you are entering in this Agreement\\non their
|
||||
behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models
|
||||
and software and algorithms, including\\nmachine-learning model code, trained
|
||||
model weights, inference-enabling code, training-enabling code,\\nfine-tuning
|
||||
enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama
|
||||
Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation
|
||||
(and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D
|
||||
or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in
|
||||
or, \\nif you are an entity, your principal place of business is in the EEA
|
||||
or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the
|
||||
EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using
|
||||
or distributing any portion or element of the Llama Materials,\\nyou agree to
|
||||
be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n
|
||||
\ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable
|
||||
and royalty-free limited license under Meta\u2019s intellectual property or
|
||||
other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce,
|
||||
distribute, copy, create derivative works \\nof, and make modifications to the
|
||||
Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If
|
||||
you distribute or make available the Llama Materials (or any derivative works
|
||||
thereof), \\nor a product or service (including another AI model) that contains
|
||||
any of them, you shall (A) provide\\na copy of this Agreement with any such
|
||||
Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non
|
||||
a related website, user interface, blogpost, about page, or product documentation.
|
||||
If you use the\\nLlama Materials or any outputs or results of the Llama Materials
|
||||
to create, train, fine tune, or\\notherwise improve an AI model, which is distributed
|
||||
or made available, you shall also include \u201CLlama\u201D\\nat the beginning
|
||||
of any such AI model name.\\n\\n ii. If you receive Llama Materials,
|
||||
or any derivative works thereof, from a Licensee as part\\nof an integrated
|
||||
end user product, then Section 2 of this Agreement will not apply to you. \\n\\n
|
||||
\ iii. You must retain in all copies of the Llama Materials that you distribute
|
||||
the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed
|
||||
as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2
|
||||
Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n
|
||||
\ iv. Your use of the Llama Materials must comply with applicable laws
|
||||
and regulations\\n(including trade compliance laws and regulations) and adhere
|
||||
to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy),
|
||||
which is hereby \\nincorporated by reference into this Agreement.\\n \\n2.
|
||||
Additional Commercial Terms. If, on the Llama 3.2 version release date, the
|
||||
monthly active users\\nof the products or services made available by or for
|
||||
Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly
|
||||
active users in the preceding calendar month, you must request \\na license
|
||||
from Meta, which Meta may grant to you in its sole discretion, and you are not
|
||||
authorized to\\nexercise any of the rights under this Agreement unless or until
|
||||
Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty.
|
||||
UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS
|
||||
THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF
|
||||
ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND
|
||||
IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR
|
||||
DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS
|
||||
AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY
|
||||
OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR
|
||||
ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT,
|
||||
TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT,
|
||||
\\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL,
|
||||
EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED
|
||||
OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n
|
||||
\ a. No trademark licenses are granted under this Agreement, and in connection
|
||||
with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark
|
||||
owned by or associated with the other or any of its affiliates, \\nexcept as
|
||||
required for reasonable and customary use in describing and redistributing the
|
||||
Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants
|
||||
you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required
|
||||
\\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s
|
||||
brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/).
|
||||
All goodwill arising out of your use of the Mark \\nwill inure to the benefit
|
||||
of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and
|
||||
derivatives made by or for Meta, with respect to any\\n derivative works
|
||||
and modifications of the Llama Materials that are made by you, as between you
|
||||
and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n
|
||||
\ c. If you institute litigation or other proceedings against Meta or any
|
||||
entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging
|
||||
that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n
|
||||
\ of any of the foregoing, constitutes infringement of intellectual property
|
||||
or other rights owned or licensable\\n by you, then any licenses granted
|
||||
to you under this Agreement shall terminate as of the date such litigation or\\n
|
||||
\ claim is filed or instituted. You will indemnify and hold harmless Meta
|
||||
from and against any claim by any third\\n party arising out of or related
|
||||
to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination.
|
||||
The term of this Agreement will commence upon your acceptance of this Agreement
|
||||
or access\\nto the Llama Materials and will continue in full force and effect
|
||||
until terminated in accordance with the terms\\nand conditions herein. Meta
|
||||
may terminate this Agreement if you are in breach of any term or condition of
|
||||
this\\nAgreement. Upon termination of this Agreement, you shall delete and cease
|
||||
use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination
|
||||
of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will
|
||||
be governed and construed under the laws of the State of \\nCalifornia without
|
||||
regard to choice of law principles, and the UN Convention on Contracts for the
|
||||
International\\nSale of Goods does not apply to this Agreement. The courts of
|
||||
California shall have exclusive jurisdiction of\\nany dispute arising out of
|
||||
this Agreement.\\\"\\nLICENSE \\\"**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta
|
||||
is committed to promoting safe and fair use of its tools and features, including
|
||||
Llama 3.2. If you access or use Llama 3.2, you agree to this Acceptable Use
|
||||
Policy (\u201C**Policy**\u201D). The most recent copy of this policy can be
|
||||
found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited
|
||||
Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree
|
||||
you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate
|
||||
the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate,
|
||||
contribute to, encourage, plan, incite, or further illegal or unlawful activity
|
||||
or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation
|
||||
or harm to children, including the solicitation, creation, acquisition, or dissemination
|
||||
of child exploitative content or failure to report Child Sexual Abuse Material\\n
|
||||
\ 3. Human trafficking, exploitation, and sexual violence\\n 4.
|
||||
The illegal distribution of information or materials to minors, including obscene
|
||||
materials, or failure to employ legally required age-gating in connection with
|
||||
such information or materials.\\n 5. Sexual solicitation\\n 6.
|
||||
Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate
|
||||
the harassment, abuse, threatening, or bullying of individuals or groups of
|
||||
individuals\\n 2. Engage in, promote, incite, or facilitate discrimination
|
||||
or other unlawful or harmful conduct in the provision of employment, employment
|
||||
benefits, credit, housing, other economic benefits, or other essential goods
|
||||
and services\\n 3. Engage in the unauthorized or unlicensed practice of any
|
||||
profession including, but not limited to, financial, legal, medical/health,
|
||||
or related professional practices\\n 4. Collect, process, disclose, generate,
|
||||
or infer private or sensitive information about individuals, including information
|
||||
about individuals\u2019 identity, health, or demographic information, unless
|
||||
you have obtained the right to do so in accordance with applicable law\\n 5.
|
||||
Engage in or facilitate any action or generate any content that infringes, misappropriates,
|
||||
or otherwise violates any third-party rights, including the outputs or results
|
||||
of any products or services using the Llama Materials\\n 6. Create, generate,
|
||||
or facilitate the creation of malicious code, malware, computer viruses or do
|
||||
anything else that could disable, overburden, interfere with or impair the proper
|
||||
working, integrity, operation or appearance of a website or computer system\\n
|
||||
\ 7. Engage in any action, or facilitate any action, to intentionally circumvent
|
||||
or remove usage restrictions or other safety measures, or to enable functionality
|
||||
disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the
|
||||
planning or development of activities that present a risk of death or bodily
|
||||
harm to individuals, including use of Llama 3.2 related to the following:\\n
|
||||
\ 8. Military, warfare, nuclear industries or applications, espionage, use
|
||||
for materials or activities that are subject to the International Traffic Arms
|
||||
Regulations (ITAR) maintained by the United States Department of State or to
|
||||
the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons
|
||||
Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including
|
||||
weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n
|
||||
\ 11. Operation of critical infrastructure, transportation technologies, or
|
||||
heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting,
|
||||
and eating disorders\\n 13. Any content intended to incite or promote violence,
|
||||
abuse, or any infliction of bodily harm to an individual\\n3. Intentionally
|
||||
deceive or mislead others, including use of Llama 3.2 related to the following:\\n
|
||||
\ 14. Generating, promoting, or furthering fraud or the creation or promotion
|
||||
of disinformation\\n 15. Generating, promoting, or furthering defamatory
|
||||
content, including the creation of defamatory statements, images, or other content\\n
|
||||
\ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating
|
||||
another individual without consent, authorization, or legal right\\n 18.
|
||||
Representing that the use of Llama 3.2 or outputs are human-generated\\n 19.
|
||||
Generating or facilitating false online engagement, including fake reviews and
|
||||
other means of fake online engagement\\n4. Fail to appropriately disclose to
|
||||
end users any known dangers of your AI system\\n5. Interact with third party
|
||||
tools, models, or software designed to generate unlawful content or engage in
|
||||
unlawful or harmful conduct and/or represent that the outputs of such tools,
|
||||
models, or software are associated with Meta or Llama 3.2\\n\\nWith respect
|
||||
to any multimodal models included in Llama 3.2, the rights granted under Section
|
||||
1(a) of the Llama 3.2 Community License Agreement are not being granted to you
|
||||
if you are an individual domiciled in, or a company with a principal place of
|
||||
business in, the European Union. This restriction does not apply to end users
|
||||
of a product or service that incorporates any such multimodal models.\\n\\nPlease
|
||||
report any violation of this Policy, software \u201Cbug,\u201D or other problems
|
||||
that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n*
|
||||
Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n*
|
||||
Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n*
|
||||
Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n*
|
||||
Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama
|
||||
3.2: LlamaUseReport@meta.com\\\"\\n\",\"parameters\":\"stop \\\"\\u003c|start_header_id|\\u003e\\\"\\nstop
|
||||
\ \\\"\\u003c|end_header_id|\\u003e\\\"\\nstop \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting
|
||||
Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{-
|
||||
if .Tools }}When you receive a tool call response, use the output to format
|
||||
an answer to the orginal user question.\\n\\nYou are a helpful assistant with
|
||||
tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i,
|
||||
$_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{-
|
||||
if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if and $.Tools $last }}\\n\\nGiven the following functions, please respond with
|
||||
a JSON for a function call with its proper arguments that best answers the given
|
||||
prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\":
|
||||
dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range
|
||||
$.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{-
|
||||
else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name
|
||||
}}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{
|
||||
.Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{-
|
||||
else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
.Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"3.2B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Llama-3.2\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.parameter_count\":3212749888,\"general.quantization_version\":2,\"general.size_label\":\"3B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":24,\"llama.attention.head_count_kv\":8,\"llama.attention.key_length\":128,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.attention.value_length\":128,\"llama.block_count\":28,\"llama.context_length\":131072,\"llama.embedding_length\":3072,\"llama.feed_forward_length\":8192,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-12-31T11:53:14.529771974-05:00\"}"
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Date:
|
||||
- Tue, 31 Dec 2024 16:56:15 GMT
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"name": "llama3.2:3b"}'
|
||||
headers:
|
||||
accept:
|
||||
- '*/*'
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '23'
|
||||
content-type:
|
||||
- application/json
|
||||
host:
|
||||
- localhost:11434
|
||||
user-agent:
|
||||
- litellm/1.56.4
|
||||
method: POST
|
||||
uri: http://localhost:11434/api/show
|
||||
response:
|
||||
content: "{\"license\":\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version
|
||||
Release Date: September 25, 2024\\n\\n\u201CAgreement\u201D means the terms
|
||||
and conditions for use, reproduction, distribution \\nand modification of the
|
||||
Llama Materials set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications,
|
||||
manuals and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D
|
||||
or \u201Cyou\u201D means you, or your employer or any other person or entity
|
||||
(if you are \\nentering into this Agreement on such person or entity\u2019s
|
||||
behalf), of the age required under\\napplicable laws, rules or regulations to
|
||||
provide legal consent and that has legal authority\\nto bind your employer or
|
||||
such other person or entity if you are entering in this Agreement\\non their
|
||||
behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models
|
||||
and software and algorithms, including\\nmachine-learning model code, trained
|
||||
model weights, inference-enabling code, training-enabling code,\\nfine-tuning
|
||||
enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama
|
||||
Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation
|
||||
(and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D
|
||||
or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in
|
||||
or, \\nif you are an entity, your principal place of business is in the EEA
|
||||
or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the
|
||||
EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using
|
||||
or distributing any portion or element of the Llama Materials,\\nyou agree to
|
||||
be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n
|
||||
\ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable
|
||||
and royalty-free limited license under Meta\u2019s intellectual property or
|
||||
other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce,
|
||||
distribute, copy, create derivative works \\nof, and make modifications to the
|
||||
Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If
|
||||
you distribute or make available the Llama Materials (or any derivative works
|
||||
thereof), \\nor a product or service (including another AI model) that contains
|
||||
any of them, you shall (A) provide\\na copy of this Agreement with any such
|
||||
Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non
|
||||
a related website, user interface, blogpost, about page, or product documentation.
|
||||
If you use the\\nLlama Materials or any outputs or results of the Llama Materials
|
||||
to create, train, fine tune, or\\notherwise improve an AI model, which is distributed
|
||||
or made available, you shall also include \u201CLlama\u201D\\nat the beginning
|
||||
of any such AI model name.\\n\\n ii. If you receive Llama Materials,
|
||||
or any derivative works thereof, from a Licensee as part\\nof an integrated
|
||||
end user product, then Section 2 of this Agreement will not apply to you. \\n\\n
|
||||
\ iii. You must retain in all copies of the Llama Materials that you distribute
|
||||
the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed
|
||||
as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2
|
||||
Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n
|
||||
\ iv. Your use of the Llama Materials must comply with applicable laws
|
||||
and regulations\\n(including trade compliance laws and regulations) and adhere
|
||||
to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy),
|
||||
which is hereby \\nincorporated by reference into this Agreement.\\n \\n2.
|
||||
Additional Commercial Terms. If, on the Llama 3.2 version release date, the
|
||||
monthly active users\\nof the products or services made available by or for
|
||||
Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly
|
||||
active users in the preceding calendar month, you must request \\na license
|
||||
from Meta, which Meta may grant to you in its sole discretion, and you are not
|
||||
authorized to\\nexercise any of the rights under this Agreement unless or until
|
||||
Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty.
|
||||
UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS
|
||||
THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF
|
||||
ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND
|
||||
IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR
|
||||
DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS
|
||||
AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY
|
||||
OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR
|
||||
ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT,
|
||||
TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT,
|
||||
\\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL,
|
||||
EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED
|
||||
OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n
|
||||
\ a. No trademark licenses are granted under this Agreement, and in connection
|
||||
with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark
|
||||
owned by or associated with the other or any of its affiliates, \\nexcept as
|
||||
required for reasonable and customary use in describing and redistributing the
|
||||
Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants
|
||||
you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required
|
||||
\\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s
|
||||
brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/).
|
||||
All goodwill arising out of your use of the Mark \\nwill inure to the benefit
|
||||
of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and
|
||||
derivatives made by or for Meta, with respect to any\\n derivative works
|
||||
and modifications of the Llama Materials that are made by you, as between you
|
||||
and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n
|
||||
\ c. If you institute litigation or other proceedings against Meta or any
|
||||
entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging
|
||||
that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n
|
||||
\ of any of the foregoing, constitutes infringement of intellectual property
|
||||
or other rights owned or licensable\\n by you, then any licenses granted
|
||||
to you under this Agreement shall terminate as of the date such litigation or\\n
|
||||
\ claim is filed or instituted. You will indemnify and hold harmless Meta
|
||||
from and against any claim by any third\\n party arising out of or related
|
||||
to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination.
|
||||
The term of this Agreement will commence upon your acceptance of this Agreement
|
||||
or access\\nto the Llama Materials and will continue in full force and effect
|
||||
until terminated in accordance with the terms\\nand conditions herein. Meta
|
||||
may terminate this Agreement if you are in breach of any term or condition of
|
||||
this\\nAgreement. Upon termination of this Agreement, you shall delete and cease
|
||||
use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination
|
||||
of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will
|
||||
be governed and construed under the laws of the State of \\nCalifornia without
|
||||
regard to choice of law principles, and the UN Convention on Contracts for the
|
||||
International\\nSale of Goods does not apply to this Agreement. The courts of
|
||||
California shall have exclusive jurisdiction of\\nany dispute arising out of
|
||||
this Agreement.\\n**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta is committed
|
||||
to promoting safe and fair use of its tools and features, including Llama 3.2.
|
||||
If you access or use Llama 3.2, you agree to this Acceptable Use Policy (\u201C**Policy**\u201D).
|
||||
The most recent copy of this policy can be found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited
|
||||
Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree
|
||||
you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate
|
||||
the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate,
|
||||
contribute to, encourage, plan, incite, or further illegal or unlawful activity
|
||||
or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation
|
||||
or harm to children, including the solicitation, creation, acquisition, or dissemination
|
||||
of child exploitative content or failure to report Child Sexual Abuse Material\\n
|
||||
\ 3. Human trafficking, exploitation, and sexual violence\\n 4.
|
||||
The illegal distribution of information or materials to minors, including obscene
|
||||
materials, or failure to employ legally required age-gating in connection with
|
||||
such information or materials.\\n 5. Sexual solicitation\\n 6.
|
||||
Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate
|
||||
the harassment, abuse, threatening, or bullying of individuals or groups of
|
||||
individuals\\n 2. Engage in, promote, incite, or facilitate discrimination
|
||||
or other unlawful or harmful conduct in the provision of employment, employment
|
||||
benefits, credit, housing, other economic benefits, or other essential goods
|
||||
and services\\n 3. Engage in the unauthorized or unlicensed practice of any
|
||||
profession including, but not limited to, financial, legal, medical/health,
|
||||
or related professional practices\\n 4. Collect, process, disclose, generate,
|
||||
or infer private or sensitive information about individuals, including information
|
||||
about individuals\u2019 identity, health, or demographic information, unless
|
||||
you have obtained the right to do so in accordance with applicable law\\n 5.
|
||||
Engage in or facilitate any action or generate any content that infringes, misappropriates,
|
||||
or otherwise violates any third-party rights, including the outputs or results
|
||||
of any products or services using the Llama Materials\\n 6. Create, generate,
|
||||
or facilitate the creation of malicious code, malware, computer viruses or do
|
||||
anything else that could disable, overburden, interfere with or impair the proper
|
||||
working, integrity, operation or appearance of a website or computer system\\n
|
||||
\ 7. Engage in any action, or facilitate any action, to intentionally circumvent
|
||||
or remove usage restrictions or other safety measures, or to enable functionality
|
||||
disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the
|
||||
planning or development of activities that present a risk of death or bodily
|
||||
harm to individuals, including use of Llama 3.2 related to the following:\\n
|
||||
\ 8. Military, warfare, nuclear industries or applications, espionage, use
|
||||
for materials or activities that are subject to the International Traffic Arms
|
||||
Regulations (ITAR) maintained by the United States Department of State or to
|
||||
the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons
|
||||
Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including
|
||||
weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n
|
||||
\ 11. Operation of critical infrastructure, transportation technologies, or
|
||||
heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting,
|
||||
and eating disorders\\n 13. Any content intended to incite or promote violence,
|
||||
abuse, or any infliction of bodily harm to an individual\\n3. Intentionally
|
||||
deceive or mislead others, including use of Llama 3.2 related to the following:\\n
|
||||
\ 14. Generating, promoting, or furthering fraud or the creation or promotion
|
||||
of disinformation\\n 15. Generating, promoting, or furthering defamatory
|
||||
content, including the creation of defamatory statements, images, or other content\\n
|
||||
\ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating
|
||||
another individual without consent, authorization, or legal right\\n 18.
|
||||
Representing that the use of Llama 3.2 or outputs are human-generated\\n 19.
|
||||
Generating or facilitating false online engagement, including fake reviews and
|
||||
other means of fake online engagement\\n4. Fail to appropriately disclose to
|
||||
end users any known dangers of your AI system\\n5. Interact with third party
|
||||
tools, models, or software designed to generate unlawful content or engage in
|
||||
unlawful or harmful conduct and/or represent that the outputs of such tools,
|
||||
models, or software are associated with Meta or Llama 3.2\\n\\nWith respect
|
||||
to any multimodal models included in Llama 3.2, the rights granted under Section
|
||||
1(a) of the Llama 3.2 Community License Agreement are not being granted to you
|
||||
if you are an individual domiciled in, or a company with a principal place of
|
||||
business in, the European Union. This restriction does not apply to end users
|
||||
of a product or service that incorporates any such multimodal models.\\n\\nPlease
|
||||
report any violation of this Policy, software \u201Cbug,\u201D or other problems
|
||||
that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n*
|
||||
Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n*
|
||||
Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n*
|
||||
Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n*
|
||||
Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama
|
||||
3.2: LlamaUseReport@meta.com\",\"modelfile\":\"# Modelfile generated by \\\"ollama
|
||||
show\\\"\\n# To build a new Modelfile based on this, replace FROM with:\\n#
|
||||
FROM llama3.2:3b\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-dde5aa3fc5ffc17176b5e8bdc82f587b24b2678c6c66101bf7da77af9f7ccdff\\nTEMPLATE
|
||||
\\\"\\\"\\\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting
|
||||
Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{-
|
||||
if .Tools }}When you receive a tool call response, use the output to format
|
||||
an answer to the orginal user question.\\n\\nYou are a helpful assistant with
|
||||
tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i,
|
||||
$_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{-
|
||||
if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if and $.Tools $last }}\\n\\nGiven the following functions, please respond with
|
||||
a JSON for a function call with its proper arguments that best answers the given
|
||||
prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\":
|
||||
dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range
|
||||
$.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{-
|
||||
else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name
|
||||
}}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{
|
||||
.Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{-
|
||||
else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
.Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- end }}\\n{{- end }}\\\"\\\"\\\"\\nPARAMETER stop \\u003c|start_header_id|\\u003e\\nPARAMETER
|
||||
stop \\u003c|end_header_id|\\u003e\\nPARAMETER stop \\u003c|eot_id|\\u003e\\nLICENSE
|
||||
\\\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version Release Date:
|
||||
September 25, 2024\\n\\n\u201CAgreement\u201D means the terms and conditions
|
||||
for use, reproduction, distribution \\nand modification of the Llama Materials
|
||||
set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, manuals
|
||||
and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D
|
||||
or \u201Cyou\u201D means you, or your employer or any other person or entity
|
||||
(if you are \\nentering into this Agreement on such person or entity\u2019s
|
||||
behalf), of the age required under\\napplicable laws, rules or regulations to
|
||||
provide legal consent and that has legal authority\\nto bind your employer or
|
||||
such other person or entity if you are entering in this Agreement\\non their
|
||||
behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models
|
||||
and software and algorithms, including\\nmachine-learning model code, trained
|
||||
model weights, inference-enabling code, training-enabling code,\\nfine-tuning
|
||||
enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama
|
||||
Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation
|
||||
(and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D
|
||||
or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in
|
||||
or, \\nif you are an entity, your principal place of business is in the EEA
|
||||
or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the
|
||||
EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using
|
||||
or distributing any portion or element of the Llama Materials,\\nyou agree to
|
||||
be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n
|
||||
\ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable
|
||||
and royalty-free limited license under Meta\u2019s intellectual property or
|
||||
other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce,
|
||||
distribute, copy, create derivative works \\nof, and make modifications to the
|
||||
Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If
|
||||
you distribute or make available the Llama Materials (or any derivative works
|
||||
thereof), \\nor a product or service (including another AI model) that contains
|
||||
any of them, you shall (A) provide\\na copy of this Agreement with any such
|
||||
Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non
|
||||
a related website, user interface, blogpost, about page, or product documentation.
|
||||
If you use the\\nLlama Materials or any outputs or results of the Llama Materials
|
||||
to create, train, fine tune, or\\notherwise improve an AI model, which is distributed
|
||||
or made available, you shall also include \u201CLlama\u201D\\nat the beginning
|
||||
of any such AI model name.\\n\\n ii. If you receive Llama Materials,
|
||||
or any derivative works thereof, from a Licensee as part\\nof an integrated
|
||||
end user product, then Section 2 of this Agreement will not apply to you. \\n\\n
|
||||
\ iii. You must retain in all copies of the Llama Materials that you distribute
|
||||
the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed
|
||||
as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2
|
||||
Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n
|
||||
\ iv. Your use of the Llama Materials must comply with applicable laws
|
||||
and regulations\\n(including trade compliance laws and regulations) and adhere
|
||||
to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy),
|
||||
which is hereby \\nincorporated by reference into this Agreement.\\n \\n2.
|
||||
Additional Commercial Terms. If, on the Llama 3.2 version release date, the
|
||||
monthly active users\\nof the products or services made available by or for
|
||||
Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly
|
||||
active users in the preceding calendar month, you must request \\na license
|
||||
from Meta, which Meta may grant to you in its sole discretion, and you are not
|
||||
authorized to\\nexercise any of the rights under this Agreement unless or until
|
||||
Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty.
|
||||
UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS
|
||||
THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF
|
||||
ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND
|
||||
IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR
|
||||
DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS
|
||||
AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY
|
||||
OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR
|
||||
ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT,
|
||||
TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT,
|
||||
\\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL,
|
||||
EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED
|
||||
OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n
|
||||
\ a. No trademark licenses are granted under this Agreement, and in connection
|
||||
with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark
|
||||
owned by or associated with the other or any of its affiliates, \\nexcept as
|
||||
required for reasonable and customary use in describing and redistributing the
|
||||
Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants
|
||||
you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required
|
||||
\\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s
|
||||
brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/).
|
||||
All goodwill arising out of your use of the Mark \\nwill inure to the benefit
|
||||
of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and
|
||||
derivatives made by or for Meta, with respect to any\\n derivative works
|
||||
and modifications of the Llama Materials that are made by you, as between you
|
||||
and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n
|
||||
\ c. If you institute litigation or other proceedings against Meta or any
|
||||
entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging
|
||||
that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n
|
||||
\ of any of the foregoing, constitutes infringement of intellectual property
|
||||
or other rights owned or licensable\\n by you, then any licenses granted
|
||||
to you under this Agreement shall terminate as of the date such litigation or\\n
|
||||
\ claim is filed or instituted. You will indemnify and hold harmless Meta
|
||||
from and against any claim by any third\\n party arising out of or related
|
||||
to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination.
|
||||
The term of this Agreement will commence upon your acceptance of this Agreement
|
||||
or access\\nto the Llama Materials and will continue in full force and effect
|
||||
until terminated in accordance with the terms\\nand conditions herein. Meta
|
||||
may terminate this Agreement if you are in breach of any term or condition of
|
||||
this\\nAgreement. Upon termination of this Agreement, you shall delete and cease
|
||||
use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination
|
||||
of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will
|
||||
be governed and construed under the laws of the State of \\nCalifornia without
|
||||
regard to choice of law principles, and the UN Convention on Contracts for the
|
||||
International\\nSale of Goods does not apply to this Agreement. The courts of
|
||||
California shall have exclusive jurisdiction of\\nany dispute arising out of
|
||||
this Agreement.\\\"\\nLICENSE \\\"**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta
|
||||
is committed to promoting safe and fair use of its tools and features, including
|
||||
Llama 3.2. If you access or use Llama 3.2, you agree to this Acceptable Use
|
||||
Policy (\u201C**Policy**\u201D). The most recent copy of this policy can be
|
||||
found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited
|
||||
Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree
|
||||
you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate
|
||||
the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate,
|
||||
contribute to, encourage, plan, incite, or further illegal or unlawful activity
|
||||
or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation
|
||||
or harm to children, including the solicitation, creation, acquisition, or dissemination
|
||||
of child exploitative content or failure to report Child Sexual Abuse Material\\n
|
||||
\ 3. Human trafficking, exploitation, and sexual violence\\n 4.
|
||||
The illegal distribution of information or materials to minors, including obscene
|
||||
materials, or failure to employ legally required age-gating in connection with
|
||||
such information or materials.\\n 5. Sexual solicitation\\n 6.
|
||||
Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate
|
||||
the harassment, abuse, threatening, or bullying of individuals or groups of
|
||||
individuals\\n 2. Engage in, promote, incite, or facilitate discrimination
|
||||
or other unlawful or harmful conduct in the provision of employment, employment
|
||||
benefits, credit, housing, other economic benefits, or other essential goods
|
||||
and services\\n 3. Engage in the unauthorized or unlicensed practice of any
|
||||
profession including, but not limited to, financial, legal, medical/health,
|
||||
or related professional practices\\n 4. Collect, process, disclose, generate,
|
||||
or infer private or sensitive information about individuals, including information
|
||||
about individuals\u2019 identity, health, or demographic information, unless
|
||||
you have obtained the right to do so in accordance with applicable law\\n 5.
|
||||
Engage in or facilitate any action or generate any content that infringes, misappropriates,
|
||||
or otherwise violates any third-party rights, including the outputs or results
|
||||
of any products or services using the Llama Materials\\n 6. Create, generate,
|
||||
or facilitate the creation of malicious code, malware, computer viruses or do
|
||||
anything else that could disable, overburden, interfere with or impair the proper
|
||||
working, integrity, operation or appearance of a website or computer system\\n
|
||||
\ 7. Engage in any action, or facilitate any action, to intentionally circumvent
|
||||
or remove usage restrictions or other safety measures, or to enable functionality
|
||||
disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the
|
||||
planning or development of activities that present a risk of death or bodily
|
||||
harm to individuals, including use of Llama 3.2 related to the following:\\n
|
||||
\ 8. Military, warfare, nuclear industries or applications, espionage, use
|
||||
for materials or activities that are subject to the International Traffic Arms
|
||||
Regulations (ITAR) maintained by the United States Department of State or to
|
||||
the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons
|
||||
Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including
|
||||
weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n
|
||||
\ 11. Operation of critical infrastructure, transportation technologies, or
|
||||
heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting,
|
||||
and eating disorders\\n 13. Any content intended to incite or promote violence,
|
||||
abuse, or any infliction of bodily harm to an individual\\n3. Intentionally
|
||||
deceive or mislead others, including use of Llama 3.2 related to the following:\\n
|
||||
\ 14. Generating, promoting, or furthering fraud or the creation or promotion
|
||||
of disinformation\\n 15. Generating, promoting, or furthering defamatory
|
||||
content, including the creation of defamatory statements, images, or other content\\n
|
||||
\ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating
|
||||
another individual without consent, authorization, or legal right\\n 18.
|
||||
Representing that the use of Llama 3.2 or outputs are human-generated\\n 19.
|
||||
Generating or facilitating false online engagement, including fake reviews and
|
||||
other means of fake online engagement\\n4. Fail to appropriately disclose to
|
||||
end users any known dangers of your AI system\\n5. Interact with third party
|
||||
tools, models, or software designed to generate unlawful content or engage in
|
||||
unlawful or harmful conduct and/or represent that the outputs of such tools,
|
||||
models, or software are associated with Meta or Llama 3.2\\n\\nWith respect
|
||||
to any multimodal models included in Llama 3.2, the rights granted under Section
|
||||
1(a) of the Llama 3.2 Community License Agreement are not being granted to you
|
||||
if you are an individual domiciled in, or a company with a principal place of
|
||||
business in, the European Union. This restriction does not apply to end users
|
||||
of a product or service that incorporates any such multimodal models.\\n\\nPlease
|
||||
report any violation of this Policy, software \u201Cbug,\u201D or other problems
|
||||
that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n*
|
||||
Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n*
|
||||
Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n*
|
||||
Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n*
|
||||
Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama
|
||||
3.2: LlamaUseReport@meta.com\\\"\\n\",\"parameters\":\"stop \\\"\\u003c|start_header_id|\\u003e\\\"\\nstop
|
||||
\ \\\"\\u003c|end_header_id|\\u003e\\\"\\nstop \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting
|
||||
Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{-
|
||||
if .Tools }}When you receive a tool call response, use the output to format
|
||||
an answer to the orginal user question.\\n\\nYou are a helpful assistant with
|
||||
tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i,
|
||||
$_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{-
|
||||
if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if and $.Tools $last }}\\n\\nGiven the following functions, please respond with
|
||||
a JSON for a function call with its proper arguments that best answers the given
|
||||
prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\":
|
||||
dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range
|
||||
$.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{-
|
||||
else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name
|
||||
}}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{
|
||||
.Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{-
|
||||
else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
.Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"3.2B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Llama-3.2\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.parameter_count\":3212749888,\"general.quantization_version\":2,\"general.size_label\":\"3B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":24,\"llama.attention.head_count_kv\":8,\"llama.attention.key_length\":128,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.attention.value_length\":128,\"llama.block_count\":28,\"llama.context_length\":131072,\"llama.embedding_length\":3072,\"llama.feed_forward_length\":8192,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-12-31T11:53:14.529771974-05:00\"}"
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Date:
|
||||
- Tue, 31 Dec 2024 16:56:15 GMT
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- Thu, 02 Jan 2025 20:05:52 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
|
||||
@@ -1,863 +1,36 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"model": "llama3.2:3b", "prompt": "### User:\nRespond in 20 words. Who
|
||||
are you?\n\n", "options": {"stop": ["\nObservation:"]}, "stream": false}'
|
||||
which model are you?\n\n", "options": {"stop": ["\nObservation:"]}, "stream":
|
||||
false}'
|
||||
headers:
|
||||
accept:
|
||||
Accept:
|
||||
- '*/*'
|
||||
accept-encoding:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
Connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '144'
|
||||
host:
|
||||
- localhost:11434
|
||||
user-agent:
|
||||
- litellm/1.56.4
|
||||
Content-Length:
|
||||
- '156'
|
||||
Content-Type:
|
||||
- application/json
|
||||
User-Agent:
|
||||
- python-requests/2.32.3
|
||||
method: POST
|
||||
uri: http://localhost:11434/api/generate
|
||||
response:
|
||||
content: '{"model":"llama3.2:3b","created_at":"2024-12-31T16:57:54.063894Z","response":"I''m
|
||||
an AI designed to provide information and assist with inquiries, while maintaining
|
||||
a neutral and respectful tone always.","done":true,"done_reason":"stop","context":[128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,271,128009,128006,882,128007,271,14711,2724,512,66454,304,220,508,4339,13,10699,527,499,1980,128009,128006,78191,128007,271,40,2846,459,15592,6319,311,3493,2038,323,7945,449,44983,11,1418,20958,264,21277,323,49150,16630,2744,13],"total_duration":651386042,"load_duration":41061917,"prompt_eval_count":38,"prompt_eval_duration":204000000,"eval_count":23,"eval_duration":405000000}'
|
||||
body:
|
||||
string: '{"model":"llama3.2:3b","created_at":"2025-01-02T20:07:07.623404Z","response":"I''m
|
||||
an AI designed to assist and communicate with users, utilizing a combination
|
||||
of natural language processing models.","done":true,"done_reason":"stop","context":[128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,271,128009,128006,882,128007,271,14711,2724,512,66454,304,220,508,4339,13,10699,902,1646,527,499,1980,128009,128006,78191,128007,271,40,2846,459,15592,6319,311,7945,323,19570,449,3932,11,35988,264,10824,315,5933,4221,8863,4211,13],"total_duration":1076617833,"load_duration":46505416,"prompt_eval_count":40,"prompt_eval_duration":626000000,"eval_count":22,"eval_duration":399000000}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '692'
|
||||
- '690'
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Date:
|
||||
- Tue, 31 Dec 2024 16:57:54 GMT
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"name": "llama3.2:3b"}'
|
||||
headers:
|
||||
accept:
|
||||
- '*/*'
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '23'
|
||||
content-type:
|
||||
- application/json
|
||||
host:
|
||||
- localhost:11434
|
||||
user-agent:
|
||||
- litellm/1.56.4
|
||||
method: POST
|
||||
uri: http://localhost:11434/api/show
|
||||
response:
|
||||
content: "{\"license\":\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version
|
||||
Release Date: September 25, 2024\\n\\n\u201CAgreement\u201D means the terms
|
||||
and conditions for use, reproduction, distribution \\nand modification of the
|
||||
Llama Materials set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications,
|
||||
manuals and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D
|
||||
or \u201Cyou\u201D means you, or your employer or any other person or entity
|
||||
(if you are \\nentering into this Agreement on such person or entity\u2019s
|
||||
behalf), of the age required under\\napplicable laws, rules or regulations to
|
||||
provide legal consent and that has legal authority\\nto bind your employer or
|
||||
such other person or entity if you are entering in this Agreement\\non their
|
||||
behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models
|
||||
and software and algorithms, including\\nmachine-learning model code, trained
|
||||
model weights, inference-enabling code, training-enabling code,\\nfine-tuning
|
||||
enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama
|
||||
Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation
|
||||
(and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D
|
||||
or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in
|
||||
or, \\nif you are an entity, your principal place of business is in the EEA
|
||||
or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the
|
||||
EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using
|
||||
or distributing any portion or element of the Llama Materials,\\nyou agree to
|
||||
be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n
|
||||
\ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable
|
||||
and royalty-free limited license under Meta\u2019s intellectual property or
|
||||
other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce,
|
||||
distribute, copy, create derivative works \\nof, and make modifications to the
|
||||
Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If
|
||||
you distribute or make available the Llama Materials (or any derivative works
|
||||
thereof), \\nor a product or service (including another AI model) that contains
|
||||
any of them, you shall (A) provide\\na copy of this Agreement with any such
|
||||
Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non
|
||||
a related website, user interface, blogpost, about page, or product documentation.
|
||||
If you use the\\nLlama Materials or any outputs or results of the Llama Materials
|
||||
to create, train, fine tune, or\\notherwise improve an AI model, which is distributed
|
||||
or made available, you shall also include \u201CLlama\u201D\\nat the beginning
|
||||
of any such AI model name.\\n\\n ii. If you receive Llama Materials,
|
||||
or any derivative works thereof, from a Licensee as part\\nof an integrated
|
||||
end user product, then Section 2 of this Agreement will not apply to you. \\n\\n
|
||||
\ iii. You must retain in all copies of the Llama Materials that you distribute
|
||||
the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed
|
||||
as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2
|
||||
Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n
|
||||
\ iv. Your use of the Llama Materials must comply with applicable laws
|
||||
and regulations\\n(including trade compliance laws and regulations) and adhere
|
||||
to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy),
|
||||
which is hereby \\nincorporated by reference into this Agreement.\\n \\n2.
|
||||
Additional Commercial Terms. If, on the Llama 3.2 version release date, the
|
||||
monthly active users\\nof the products or services made available by or for
|
||||
Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly
|
||||
active users in the preceding calendar month, you must request \\na license
|
||||
from Meta, which Meta may grant to you in its sole discretion, and you are not
|
||||
authorized to\\nexercise any of the rights under this Agreement unless or until
|
||||
Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty.
|
||||
UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS
|
||||
THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF
|
||||
ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND
|
||||
IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR
|
||||
DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS
|
||||
AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY
|
||||
OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR
|
||||
ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT,
|
||||
TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT,
|
||||
\\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL,
|
||||
EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED
|
||||
OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n
|
||||
\ a. No trademark licenses are granted under this Agreement, and in connection
|
||||
with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark
|
||||
owned by or associated with the other or any of its affiliates, \\nexcept as
|
||||
required for reasonable and customary use in describing and redistributing the
|
||||
Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants
|
||||
you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required
|
||||
\\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s
|
||||
brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/).
|
||||
All goodwill arising out of your use of the Mark \\nwill inure to the benefit
|
||||
of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and
|
||||
derivatives made by or for Meta, with respect to any\\n derivative works
|
||||
and modifications of the Llama Materials that are made by you, as between you
|
||||
and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n
|
||||
\ c. If you institute litigation or other proceedings against Meta or any
|
||||
entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging
|
||||
that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n
|
||||
\ of any of the foregoing, constitutes infringement of intellectual property
|
||||
or other rights owned or licensable\\n by you, then any licenses granted
|
||||
to you under this Agreement shall terminate as of the date such litigation or\\n
|
||||
\ claim is filed or instituted. You will indemnify and hold harmless Meta
|
||||
from and against any claim by any third\\n party arising out of or related
|
||||
to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination.
|
||||
The term of this Agreement will commence upon your acceptance of this Agreement
|
||||
or access\\nto the Llama Materials and will continue in full force and effect
|
||||
until terminated in accordance with the terms\\nand conditions herein. Meta
|
||||
may terminate this Agreement if you are in breach of any term or condition of
|
||||
this\\nAgreement. Upon termination of this Agreement, you shall delete and cease
|
||||
use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination
|
||||
of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will
|
||||
be governed and construed under the laws of the State of \\nCalifornia without
|
||||
regard to choice of law principles, and the UN Convention on Contracts for the
|
||||
International\\nSale of Goods does not apply to this Agreement. The courts of
|
||||
California shall have exclusive jurisdiction of\\nany dispute arising out of
|
||||
this Agreement.\\n**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta is committed
|
||||
to promoting safe and fair use of its tools and features, including Llama 3.2.
|
||||
If you access or use Llama 3.2, you agree to this Acceptable Use Policy (\u201C**Policy**\u201D).
|
||||
The most recent copy of this policy can be found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited
|
||||
Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree
|
||||
you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate
|
||||
the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate,
|
||||
contribute to, encourage, plan, incite, or further illegal or unlawful activity
|
||||
or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation
|
||||
or harm to children, including the solicitation, creation, acquisition, or dissemination
|
||||
of child exploitative content or failure to report Child Sexual Abuse Material\\n
|
||||
\ 3. Human trafficking, exploitation, and sexual violence\\n 4.
|
||||
The illegal distribution of information or materials to minors, including obscene
|
||||
materials, or failure to employ legally required age-gating in connection with
|
||||
such information or materials.\\n 5. Sexual solicitation\\n 6.
|
||||
Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate
|
||||
the harassment, abuse, threatening, or bullying of individuals or groups of
|
||||
individuals\\n 2. Engage in, promote, incite, or facilitate discrimination
|
||||
or other unlawful or harmful conduct in the provision of employment, employment
|
||||
benefits, credit, housing, other economic benefits, or other essential goods
|
||||
and services\\n 3. Engage in the unauthorized or unlicensed practice of any
|
||||
profession including, but not limited to, financial, legal, medical/health,
|
||||
or related professional practices\\n 4. Collect, process, disclose, generate,
|
||||
or infer private or sensitive information about individuals, including information
|
||||
about individuals\u2019 identity, health, or demographic information, unless
|
||||
you have obtained the right to do so in accordance with applicable law\\n 5.
|
||||
Engage in or facilitate any action or generate any content that infringes, misappropriates,
|
||||
or otherwise violates any third-party rights, including the outputs or results
|
||||
of any products or services using the Llama Materials\\n 6. Create, generate,
|
||||
or facilitate the creation of malicious code, malware, computer viruses or do
|
||||
anything else that could disable, overburden, interfere with or impair the proper
|
||||
working, integrity, operation or appearance of a website or computer system\\n
|
||||
\ 7. Engage in any action, or facilitate any action, to intentionally circumvent
|
||||
or remove usage restrictions or other safety measures, or to enable functionality
|
||||
disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the
|
||||
planning or development of activities that present a risk of death or bodily
|
||||
harm to individuals, including use of Llama 3.2 related to the following:\\n
|
||||
\ 8. Military, warfare, nuclear industries or applications, espionage, use
|
||||
for materials or activities that are subject to the International Traffic Arms
|
||||
Regulations (ITAR) maintained by the United States Department of State or to
|
||||
the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons
|
||||
Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including
|
||||
weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n
|
||||
\ 11. Operation of critical infrastructure, transportation technologies, or
|
||||
heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting,
|
||||
and eating disorders\\n 13. Any content intended to incite or promote violence,
|
||||
abuse, or any infliction of bodily harm to an individual\\n3. Intentionally
|
||||
deceive or mislead others, including use of Llama 3.2 related to the following:\\n
|
||||
\ 14. Generating, promoting, or furthering fraud or the creation or promotion
|
||||
of disinformation\\n 15. Generating, promoting, or furthering defamatory
|
||||
content, including the creation of defamatory statements, images, or other content\\n
|
||||
\ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating
|
||||
another individual without consent, authorization, or legal right\\n 18.
|
||||
Representing that the use of Llama 3.2 or outputs are human-generated\\n 19.
|
||||
Generating or facilitating false online engagement, including fake reviews and
|
||||
other means of fake online engagement\\n4. Fail to appropriately disclose to
|
||||
end users any known dangers of your AI system\\n5. Interact with third party
|
||||
tools, models, or software designed to generate unlawful content or engage in
|
||||
unlawful or harmful conduct and/or represent that the outputs of such tools,
|
||||
models, or software are associated with Meta or Llama 3.2\\n\\nWith respect
|
||||
to any multimodal models included in Llama 3.2, the rights granted under Section
|
||||
1(a) of the Llama 3.2 Community License Agreement are not being granted to you
|
||||
if you are an individual domiciled in, or a company with a principal place of
|
||||
business in, the European Union. This restriction does not apply to end users
|
||||
of a product or service that incorporates any such multimodal models.\\n\\nPlease
|
||||
report any violation of this Policy, software \u201Cbug,\u201D or other problems
|
||||
that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n*
|
||||
Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n*
|
||||
Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n*
|
||||
Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n*
|
||||
Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama
|
||||
3.2: LlamaUseReport@meta.com\",\"modelfile\":\"# Modelfile generated by \\\"ollama
|
||||
show\\\"\\n# To build a new Modelfile based on this, replace FROM with:\\n#
|
||||
FROM llama3.2:3b\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-dde5aa3fc5ffc17176b5e8bdc82f587b24b2678c6c66101bf7da77af9f7ccdff\\nTEMPLATE
|
||||
\\\"\\\"\\\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting
|
||||
Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{-
|
||||
if .Tools }}When you receive a tool call response, use the output to format
|
||||
an answer to the orginal user question.\\n\\nYou are a helpful assistant with
|
||||
tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i,
|
||||
$_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{-
|
||||
if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if and $.Tools $last }}\\n\\nGiven the following functions, please respond with
|
||||
a JSON for a function call with its proper arguments that best answers the given
|
||||
prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\":
|
||||
dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range
|
||||
$.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{-
|
||||
else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name
|
||||
}}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{
|
||||
.Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{-
|
||||
else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
.Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- end }}\\n{{- end }}\\\"\\\"\\\"\\nPARAMETER stop \\u003c|start_header_id|\\u003e\\nPARAMETER
|
||||
stop \\u003c|end_header_id|\\u003e\\nPARAMETER stop \\u003c|eot_id|\\u003e\\nLICENSE
|
||||
\\\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version Release Date:
|
||||
September 25, 2024\\n\\n\u201CAgreement\u201D means the terms and conditions
|
||||
for use, reproduction, distribution \\nand modification of the Llama Materials
|
||||
set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, manuals
|
||||
and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D
|
||||
or \u201Cyou\u201D means you, or your employer or any other person or entity
|
||||
(if you are \\nentering into this Agreement on such person or entity\u2019s
|
||||
behalf), of the age required under\\napplicable laws, rules or regulations to
|
||||
provide legal consent and that has legal authority\\nto bind your employer or
|
||||
such other person or entity if you are entering in this Agreement\\non their
|
||||
behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models
|
||||
and software and algorithms, including\\nmachine-learning model code, trained
|
||||
model weights, inference-enabling code, training-enabling code,\\nfine-tuning
|
||||
enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama
|
||||
Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation
|
||||
(and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D
|
||||
or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in
|
||||
or, \\nif you are an entity, your principal place of business is in the EEA
|
||||
or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the
|
||||
EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using
|
||||
or distributing any portion or element of the Llama Materials,\\nyou agree to
|
||||
be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n
|
||||
\ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable
|
||||
and royalty-free limited license under Meta\u2019s intellectual property or
|
||||
other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce,
|
||||
distribute, copy, create derivative works \\nof, and make modifications to the
|
||||
Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If
|
||||
you distribute or make available the Llama Materials (or any derivative works
|
||||
thereof), \\nor a product or service (including another AI model) that contains
|
||||
any of them, you shall (A) provide\\na copy of this Agreement with any such
|
||||
Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non
|
||||
a related website, user interface, blogpost, about page, or product documentation.
|
||||
If you use the\\nLlama Materials or any outputs or results of the Llama Materials
|
||||
to create, train, fine tune, or\\notherwise improve an AI model, which is distributed
|
||||
or made available, you shall also include \u201CLlama\u201D\\nat the beginning
|
||||
of any such AI model name.\\n\\n ii. If you receive Llama Materials,
|
||||
or any derivative works thereof, from a Licensee as part\\nof an integrated
|
||||
end user product, then Section 2 of this Agreement will not apply to you. \\n\\n
|
||||
\ iii. You must retain in all copies of the Llama Materials that you distribute
|
||||
the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed
|
||||
as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2
|
||||
Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n
|
||||
\ iv. Your use of the Llama Materials must comply with applicable laws
|
||||
and regulations\\n(including trade compliance laws and regulations) and adhere
|
||||
to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy),
|
||||
which is hereby \\nincorporated by reference into this Agreement.\\n \\n2.
|
||||
Additional Commercial Terms. If, on the Llama 3.2 version release date, the
|
||||
monthly active users\\nof the products or services made available by or for
|
||||
Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly
|
||||
active users in the preceding calendar month, you must request \\na license
|
||||
from Meta, which Meta may grant to you in its sole discretion, and you are not
|
||||
authorized to\\nexercise any of the rights under this Agreement unless or until
|
||||
Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty.
|
||||
UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS
|
||||
THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF
|
||||
ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND
|
||||
IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR
|
||||
DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS
|
||||
AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY
|
||||
OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR
|
||||
ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT,
|
||||
TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT,
|
||||
\\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL,
|
||||
EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED
|
||||
OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n
|
||||
\ a. No trademark licenses are granted under this Agreement, and in connection
|
||||
with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark
|
||||
owned by or associated with the other or any of its affiliates, \\nexcept as
|
||||
required for reasonable and customary use in describing and redistributing the
|
||||
Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants
|
||||
you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required
|
||||
\\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s
|
||||
brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/).
|
||||
All goodwill arising out of your use of the Mark \\nwill inure to the benefit
|
||||
of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and
|
||||
derivatives made by or for Meta, with respect to any\\n derivative works
|
||||
and modifications of the Llama Materials that are made by you, as between you
|
||||
and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n
|
||||
\ c. If you institute litigation or other proceedings against Meta or any
|
||||
entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging
|
||||
that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n
|
||||
\ of any of the foregoing, constitutes infringement of intellectual property
|
||||
or other rights owned or licensable\\n by you, then any licenses granted
|
||||
to you under this Agreement shall terminate as of the date such litigation or\\n
|
||||
\ claim is filed or instituted. You will indemnify and hold harmless Meta
|
||||
from and against any claim by any third\\n party arising out of or related
|
||||
to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination.
|
||||
The term of this Agreement will commence upon your acceptance of this Agreement
|
||||
or access\\nto the Llama Materials and will continue in full force and effect
|
||||
until terminated in accordance with the terms\\nand conditions herein. Meta
|
||||
may terminate this Agreement if you are in breach of any term or condition of
|
||||
this\\nAgreement. Upon termination of this Agreement, you shall delete and cease
|
||||
use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination
|
||||
of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will
|
||||
be governed and construed under the laws of the State of \\nCalifornia without
|
||||
regard to choice of law principles, and the UN Convention on Contracts for the
|
||||
International\\nSale of Goods does not apply to this Agreement. The courts of
|
||||
California shall have exclusive jurisdiction of\\nany dispute arising out of
|
||||
this Agreement.\\\"\\nLICENSE \\\"**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta
|
||||
is committed to promoting safe and fair use of its tools and features, including
|
||||
Llama 3.2. If you access or use Llama 3.2, you agree to this Acceptable Use
|
||||
Policy (\u201C**Policy**\u201D). The most recent copy of this policy can be
|
||||
found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited
|
||||
Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree
|
||||
you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate
|
||||
the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate,
|
||||
contribute to, encourage, plan, incite, or further illegal or unlawful activity
|
||||
or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation
|
||||
or harm to children, including the solicitation, creation, acquisition, or dissemination
|
||||
of child exploitative content or failure to report Child Sexual Abuse Material\\n
|
||||
\ 3. Human trafficking, exploitation, and sexual violence\\n 4.
|
||||
The illegal distribution of information or materials to minors, including obscene
|
||||
materials, or failure to employ legally required age-gating in connection with
|
||||
such information or materials.\\n 5. Sexual solicitation\\n 6.
|
||||
Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate
|
||||
the harassment, abuse, threatening, or bullying of individuals or groups of
|
||||
individuals\\n 2. Engage in, promote, incite, or facilitate discrimination
|
||||
or other unlawful or harmful conduct in the provision of employment, employment
|
||||
benefits, credit, housing, other economic benefits, or other essential goods
|
||||
and services\\n 3. Engage in the unauthorized or unlicensed practice of any
|
||||
profession including, but not limited to, financial, legal, medical/health,
|
||||
or related professional practices\\n 4. Collect, process, disclose, generate,
|
||||
or infer private or sensitive information about individuals, including information
|
||||
about individuals\u2019 identity, health, or demographic information, unless
|
||||
you have obtained the right to do so in accordance with applicable law\\n 5.
|
||||
Engage in or facilitate any action or generate any content that infringes, misappropriates,
|
||||
or otherwise violates any third-party rights, including the outputs or results
|
||||
of any products or services using the Llama Materials\\n 6. Create, generate,
|
||||
or facilitate the creation of malicious code, malware, computer viruses or do
|
||||
anything else that could disable, overburden, interfere with or impair the proper
|
||||
working, integrity, operation or appearance of a website or computer system\\n
|
||||
\ 7. Engage in any action, or facilitate any action, to intentionally circumvent
|
||||
or remove usage restrictions or other safety measures, or to enable functionality
|
||||
disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the
|
||||
planning or development of activities that present a risk of death or bodily
|
||||
harm to individuals, including use of Llama 3.2 related to the following:\\n
|
||||
\ 8. Military, warfare, nuclear industries or applications, espionage, use
|
||||
for materials or activities that are subject to the International Traffic Arms
|
||||
Regulations (ITAR) maintained by the United States Department of State or to
|
||||
the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons
|
||||
Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including
|
||||
weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n
|
||||
\ 11. Operation of critical infrastructure, transportation technologies, or
|
||||
heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting,
|
||||
and eating disorders\\n 13. Any content intended to incite or promote violence,
|
||||
abuse, or any infliction of bodily harm to an individual\\n3. Intentionally
|
||||
deceive or mislead others, including use of Llama 3.2 related to the following:\\n
|
||||
\ 14. Generating, promoting, or furthering fraud or the creation or promotion
|
||||
of disinformation\\n 15. Generating, promoting, or furthering defamatory
|
||||
content, including the creation of defamatory statements, images, or other content\\n
|
||||
\ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating
|
||||
another individual without consent, authorization, or legal right\\n 18.
|
||||
Representing that the use of Llama 3.2 or outputs are human-generated\\n 19.
|
||||
Generating or facilitating false online engagement, including fake reviews and
|
||||
other means of fake online engagement\\n4. Fail to appropriately disclose to
|
||||
end users any known dangers of your AI system\\n5. Interact with third party
|
||||
tools, models, or software designed to generate unlawful content or engage in
|
||||
unlawful or harmful conduct and/or represent that the outputs of such tools,
|
||||
models, or software are associated with Meta or Llama 3.2\\n\\nWith respect
|
||||
to any multimodal models included in Llama 3.2, the rights granted under Section
|
||||
1(a) of the Llama 3.2 Community License Agreement are not being granted to you
|
||||
if you are an individual domiciled in, or a company with a principal place of
|
||||
business in, the European Union. This restriction does not apply to end users
|
||||
of a product or service that incorporates any such multimodal models.\\n\\nPlease
|
||||
report any violation of this Policy, software \u201Cbug,\u201D or other problems
|
||||
that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n*
|
||||
Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n*
|
||||
Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n*
|
||||
Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n*
|
||||
Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama
|
||||
3.2: LlamaUseReport@meta.com\\\"\\n\",\"parameters\":\"stop \\\"\\u003c|start_header_id|\\u003e\\\"\\nstop
|
||||
\ \\\"\\u003c|end_header_id|\\u003e\\\"\\nstop \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting
|
||||
Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{-
|
||||
if .Tools }}When you receive a tool call response, use the output to format
|
||||
an answer to the orginal user question.\\n\\nYou are a helpful assistant with
|
||||
tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i,
|
||||
$_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{-
|
||||
if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if and $.Tools $last }}\\n\\nGiven the following functions, please respond with
|
||||
a JSON for a function call with its proper arguments that best answers the given
|
||||
prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\":
|
||||
dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range
|
||||
$.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{-
|
||||
else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name
|
||||
}}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{
|
||||
.Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{-
|
||||
else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
.Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"3.2B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Llama-3.2\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.parameter_count\":3212749888,\"general.quantization_version\":2,\"general.size_label\":\"3B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":24,\"llama.attention.head_count_kv\":8,\"llama.attention.key_length\":128,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.attention.value_length\":128,\"llama.block_count\":28,\"llama.context_length\":131072,\"llama.embedding_length\":3072,\"llama.feed_forward_length\":8192,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-12-31T11:53:14.529771974-05:00\"}"
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Date:
|
||||
- Tue, 31 Dec 2024 16:57:54 GMT
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"name": "llama3.2:3b"}'
|
||||
headers:
|
||||
accept:
|
||||
- '*/*'
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '23'
|
||||
content-type:
|
||||
- application/json
|
||||
host:
|
||||
- localhost:11434
|
||||
user-agent:
|
||||
- litellm/1.56.4
|
||||
method: POST
|
||||
uri: http://localhost:11434/api/show
|
||||
response:
|
||||
content: "{\"license\":\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version
|
||||
Release Date: September 25, 2024\\n\\n\u201CAgreement\u201D means the terms
|
||||
and conditions for use, reproduction, distribution \\nand modification of the
|
||||
Llama Materials set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications,
|
||||
manuals and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D
|
||||
or \u201Cyou\u201D means you, or your employer or any other person or entity
|
||||
(if you are \\nentering into this Agreement on such person or entity\u2019s
|
||||
behalf), of the age required under\\napplicable laws, rules or regulations to
|
||||
provide legal consent and that has legal authority\\nto bind your employer or
|
||||
such other person or entity if you are entering in this Agreement\\non their
|
||||
behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models
|
||||
and software and algorithms, including\\nmachine-learning model code, trained
|
||||
model weights, inference-enabling code, training-enabling code,\\nfine-tuning
|
||||
enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama
|
||||
Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation
|
||||
(and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D
|
||||
or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in
|
||||
or, \\nif you are an entity, your principal place of business is in the EEA
|
||||
or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the
|
||||
EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using
|
||||
or distributing any portion or element of the Llama Materials,\\nyou agree to
|
||||
be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n
|
||||
\ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable
|
||||
and royalty-free limited license under Meta\u2019s intellectual property or
|
||||
other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce,
|
||||
distribute, copy, create derivative works \\nof, and make modifications to the
|
||||
Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If
|
||||
you distribute or make available the Llama Materials (or any derivative works
|
||||
thereof), \\nor a product or service (including another AI model) that contains
|
||||
any of them, you shall (A) provide\\na copy of this Agreement with any such
|
||||
Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non
|
||||
a related website, user interface, blogpost, about page, or product documentation.
|
||||
If you use the\\nLlama Materials or any outputs or results of the Llama Materials
|
||||
to create, train, fine tune, or\\notherwise improve an AI model, which is distributed
|
||||
or made available, you shall also include \u201CLlama\u201D\\nat the beginning
|
||||
of any such AI model name.\\n\\n ii. If you receive Llama Materials,
|
||||
or any derivative works thereof, from a Licensee as part\\nof an integrated
|
||||
end user product, then Section 2 of this Agreement will not apply to you. \\n\\n
|
||||
\ iii. You must retain in all copies of the Llama Materials that you distribute
|
||||
the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed
|
||||
as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2
|
||||
Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n
|
||||
\ iv. Your use of the Llama Materials must comply with applicable laws
|
||||
and regulations\\n(including trade compliance laws and regulations) and adhere
|
||||
to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy),
|
||||
which is hereby \\nincorporated by reference into this Agreement.\\n \\n2.
|
||||
Additional Commercial Terms. If, on the Llama 3.2 version release date, the
|
||||
monthly active users\\nof the products or services made available by or for
|
||||
Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly
|
||||
active users in the preceding calendar month, you must request \\na license
|
||||
from Meta, which Meta may grant to you in its sole discretion, and you are not
|
||||
authorized to\\nexercise any of the rights under this Agreement unless or until
|
||||
Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty.
|
||||
UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS
|
||||
THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF
|
||||
ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND
|
||||
IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR
|
||||
DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS
|
||||
AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY
|
||||
OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR
|
||||
ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT,
|
||||
TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT,
|
||||
\\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL,
|
||||
EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED
|
||||
OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n
|
||||
\ a. No trademark licenses are granted under this Agreement, and in connection
|
||||
with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark
|
||||
owned by or associated with the other or any of its affiliates, \\nexcept as
|
||||
required for reasonable and customary use in describing and redistributing the
|
||||
Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants
|
||||
you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required
|
||||
\\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s
|
||||
brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/).
|
||||
All goodwill arising out of your use of the Mark \\nwill inure to the benefit
|
||||
of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and
|
||||
derivatives made by or for Meta, with respect to any\\n derivative works
|
||||
and modifications of the Llama Materials that are made by you, as between you
|
||||
and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n
|
||||
\ c. If you institute litigation or other proceedings against Meta or any
|
||||
entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging
|
||||
that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n
|
||||
\ of any of the foregoing, constitutes infringement of intellectual property
|
||||
or other rights owned or licensable\\n by you, then any licenses granted
|
||||
to you under this Agreement shall terminate as of the date such litigation or\\n
|
||||
\ claim is filed or instituted. You will indemnify and hold harmless Meta
|
||||
from and against any claim by any third\\n party arising out of or related
|
||||
to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination.
|
||||
The term of this Agreement will commence upon your acceptance of this Agreement
|
||||
or access\\nto the Llama Materials and will continue in full force and effect
|
||||
until terminated in accordance with the terms\\nand conditions herein. Meta
|
||||
may terminate this Agreement if you are in breach of any term or condition of
|
||||
this\\nAgreement. Upon termination of this Agreement, you shall delete and cease
|
||||
use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination
|
||||
of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will
|
||||
be governed and construed under the laws of the State of \\nCalifornia without
|
||||
regard to choice of law principles, and the UN Convention on Contracts for the
|
||||
International\\nSale of Goods does not apply to this Agreement. The courts of
|
||||
California shall have exclusive jurisdiction of\\nany dispute arising out of
|
||||
this Agreement.\\n**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta is committed
|
||||
to promoting safe and fair use of its tools and features, including Llama 3.2.
|
||||
If you access or use Llama 3.2, you agree to this Acceptable Use Policy (\u201C**Policy**\u201D).
|
||||
The most recent copy of this policy can be found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited
|
||||
Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree
|
||||
you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate
|
||||
the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate,
|
||||
contribute to, encourage, plan, incite, or further illegal or unlawful activity
|
||||
or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation
|
||||
or harm to children, including the solicitation, creation, acquisition, or dissemination
|
||||
of child exploitative content or failure to report Child Sexual Abuse Material\\n
|
||||
\ 3. Human trafficking, exploitation, and sexual violence\\n 4.
|
||||
The illegal distribution of information or materials to minors, including obscene
|
||||
materials, or failure to employ legally required age-gating in connection with
|
||||
such information or materials.\\n 5. Sexual solicitation\\n 6.
|
||||
Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate
|
||||
the harassment, abuse, threatening, or bullying of individuals or groups of
|
||||
individuals\\n 2. Engage in, promote, incite, or facilitate discrimination
|
||||
or other unlawful or harmful conduct in the provision of employment, employment
|
||||
benefits, credit, housing, other economic benefits, or other essential goods
|
||||
and services\\n 3. Engage in the unauthorized or unlicensed practice of any
|
||||
profession including, but not limited to, financial, legal, medical/health,
|
||||
or related professional practices\\n 4. Collect, process, disclose, generate,
|
||||
or infer private or sensitive information about individuals, including information
|
||||
about individuals\u2019 identity, health, or demographic information, unless
|
||||
you have obtained the right to do so in accordance with applicable law\\n 5.
|
||||
Engage in or facilitate any action or generate any content that infringes, misappropriates,
|
||||
or otherwise violates any third-party rights, including the outputs or results
|
||||
of any products or services using the Llama Materials\\n 6. Create, generate,
|
||||
or facilitate the creation of malicious code, malware, computer viruses or do
|
||||
anything else that could disable, overburden, interfere with or impair the proper
|
||||
working, integrity, operation or appearance of a website or computer system\\n
|
||||
\ 7. Engage in any action, or facilitate any action, to intentionally circumvent
|
||||
or remove usage restrictions or other safety measures, or to enable functionality
|
||||
disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the
|
||||
planning or development of activities that present a risk of death or bodily
|
||||
harm to individuals, including use of Llama 3.2 related to the following:\\n
|
||||
\ 8. Military, warfare, nuclear industries or applications, espionage, use
|
||||
for materials or activities that are subject to the International Traffic Arms
|
||||
Regulations (ITAR) maintained by the United States Department of State or to
|
||||
the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons
|
||||
Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including
|
||||
weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n
|
||||
\ 11. Operation of critical infrastructure, transportation technologies, or
|
||||
heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting,
|
||||
and eating disorders\\n 13. Any content intended to incite or promote violence,
|
||||
abuse, or any infliction of bodily harm to an individual\\n3. Intentionally
|
||||
deceive or mislead others, including use of Llama 3.2 related to the following:\\n
|
||||
\ 14. Generating, promoting, or furthering fraud or the creation or promotion
|
||||
of disinformation\\n 15. Generating, promoting, or furthering defamatory
|
||||
content, including the creation of defamatory statements, images, or other content\\n
|
||||
\ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating
|
||||
another individual without consent, authorization, or legal right\\n 18.
|
||||
Representing that the use of Llama 3.2 or outputs are human-generated\\n 19.
|
||||
Generating or facilitating false online engagement, including fake reviews and
|
||||
other means of fake online engagement\\n4. Fail to appropriately disclose to
|
||||
end users any known dangers of your AI system\\n5. Interact with third party
|
||||
tools, models, or software designed to generate unlawful content or engage in
|
||||
unlawful or harmful conduct and/or represent that the outputs of such tools,
|
||||
models, or software are associated with Meta or Llama 3.2\\n\\nWith respect
|
||||
to any multimodal models included in Llama 3.2, the rights granted under Section
|
||||
1(a) of the Llama 3.2 Community License Agreement are not being granted to you
|
||||
if you are an individual domiciled in, or a company with a principal place of
|
||||
business in, the European Union. This restriction does not apply to end users
|
||||
of a product or service that incorporates any such multimodal models.\\n\\nPlease
|
||||
report any violation of this Policy, software \u201Cbug,\u201D or other problems
|
||||
that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n*
|
||||
Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n*
|
||||
Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n*
|
||||
Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n*
|
||||
Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama
|
||||
3.2: LlamaUseReport@meta.com\",\"modelfile\":\"# Modelfile generated by \\\"ollama
|
||||
show\\\"\\n# To build a new Modelfile based on this, replace FROM with:\\n#
|
||||
FROM llama3.2:3b\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-dde5aa3fc5ffc17176b5e8bdc82f587b24b2678c6c66101bf7da77af9f7ccdff\\nTEMPLATE
|
||||
\\\"\\\"\\\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting
|
||||
Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{-
|
||||
if .Tools }}When you receive a tool call response, use the output to format
|
||||
an answer to the orginal user question.\\n\\nYou are a helpful assistant with
|
||||
tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i,
|
||||
$_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{-
|
||||
if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if and $.Tools $last }}\\n\\nGiven the following functions, please respond with
|
||||
a JSON for a function call with its proper arguments that best answers the given
|
||||
prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\":
|
||||
dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range
|
||||
$.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{-
|
||||
else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name
|
||||
}}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{
|
||||
.Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{-
|
||||
else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
.Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- end }}\\n{{- end }}\\\"\\\"\\\"\\nPARAMETER stop \\u003c|start_header_id|\\u003e\\nPARAMETER
|
||||
stop \\u003c|end_header_id|\\u003e\\nPARAMETER stop \\u003c|eot_id|\\u003e\\nLICENSE
|
||||
\\\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version Release Date:
|
||||
September 25, 2024\\n\\n\u201CAgreement\u201D means the terms and conditions
|
||||
for use, reproduction, distribution \\nand modification of the Llama Materials
|
||||
set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, manuals
|
||||
and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D
|
||||
or \u201Cyou\u201D means you, or your employer or any other person or entity
|
||||
(if you are \\nentering into this Agreement on such person or entity\u2019s
|
||||
behalf), of the age required under\\napplicable laws, rules or regulations to
|
||||
provide legal consent and that has legal authority\\nto bind your employer or
|
||||
such other person or entity if you are entering in this Agreement\\non their
|
||||
behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models
|
||||
and software and algorithms, including\\nmachine-learning model code, trained
|
||||
model weights, inference-enabling code, training-enabling code,\\nfine-tuning
|
||||
enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama
|
||||
Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation
|
||||
(and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D
|
||||
or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in
|
||||
or, \\nif you are an entity, your principal place of business is in the EEA
|
||||
or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the
|
||||
EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using
|
||||
or distributing any portion or element of the Llama Materials,\\nyou agree to
|
||||
be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n
|
||||
\ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable
|
||||
and royalty-free limited license under Meta\u2019s intellectual property or
|
||||
other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce,
|
||||
distribute, copy, create derivative works \\nof, and make modifications to the
|
||||
Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If
|
||||
you distribute or make available the Llama Materials (or any derivative works
|
||||
thereof), \\nor a product or service (including another AI model) that contains
|
||||
any of them, you shall (A) provide\\na copy of this Agreement with any such
|
||||
Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non
|
||||
a related website, user interface, blogpost, about page, or product documentation.
|
||||
If you use the\\nLlama Materials or any outputs or results of the Llama Materials
|
||||
to create, train, fine tune, or\\notherwise improve an AI model, which is distributed
|
||||
or made available, you shall also include \u201CLlama\u201D\\nat the beginning
|
||||
of any such AI model name.\\n\\n ii. If you receive Llama Materials,
|
||||
or any derivative works thereof, from a Licensee as part\\nof an integrated
|
||||
end user product, then Section 2 of this Agreement will not apply to you. \\n\\n
|
||||
\ iii. You must retain in all copies of the Llama Materials that you distribute
|
||||
the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed
|
||||
as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2
|
||||
Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n
|
||||
\ iv. Your use of the Llama Materials must comply with applicable laws
|
||||
and regulations\\n(including trade compliance laws and regulations) and adhere
|
||||
to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy),
|
||||
which is hereby \\nincorporated by reference into this Agreement.\\n \\n2.
|
||||
Additional Commercial Terms. If, on the Llama 3.2 version release date, the
|
||||
monthly active users\\nof the products or services made available by or for
|
||||
Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly
|
||||
active users in the preceding calendar month, you must request \\na license
|
||||
from Meta, which Meta may grant to you in its sole discretion, and you are not
|
||||
authorized to\\nexercise any of the rights under this Agreement unless or until
|
||||
Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty.
|
||||
UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS
|
||||
THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF
|
||||
ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND
|
||||
IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR
|
||||
DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS
|
||||
AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY
|
||||
OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR
|
||||
ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT,
|
||||
TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT,
|
||||
\\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL,
|
||||
EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED
|
||||
OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n
|
||||
\ a. No trademark licenses are granted under this Agreement, and in connection
|
||||
with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark
|
||||
owned by or associated with the other or any of its affiliates, \\nexcept as
|
||||
required for reasonable and customary use in describing and redistributing the
|
||||
Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants
|
||||
you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required
|
||||
\\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s
|
||||
brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/).
|
||||
All goodwill arising out of your use of the Mark \\nwill inure to the benefit
|
||||
of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and
|
||||
derivatives made by or for Meta, with respect to any\\n derivative works
|
||||
and modifications of the Llama Materials that are made by you, as between you
|
||||
and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n
|
||||
\ c. If you institute litigation or other proceedings against Meta or any
|
||||
entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging
|
||||
that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n
|
||||
\ of any of the foregoing, constitutes infringement of intellectual property
|
||||
or other rights owned or licensable\\n by you, then any licenses granted
|
||||
to you under this Agreement shall terminate as of the date such litigation or\\n
|
||||
\ claim is filed or instituted. You will indemnify and hold harmless Meta
|
||||
from and against any claim by any third\\n party arising out of or related
|
||||
to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination.
|
||||
The term of this Agreement will commence upon your acceptance of this Agreement
|
||||
or access\\nto the Llama Materials and will continue in full force and effect
|
||||
until terminated in accordance with the terms\\nand conditions herein. Meta
|
||||
may terminate this Agreement if you are in breach of any term or condition of
|
||||
this\\nAgreement. Upon termination of this Agreement, you shall delete and cease
|
||||
use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination
|
||||
of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will
|
||||
be governed and construed under the laws of the State of \\nCalifornia without
|
||||
regard to choice of law principles, and the UN Convention on Contracts for the
|
||||
International\\nSale of Goods does not apply to this Agreement. The courts of
|
||||
California shall have exclusive jurisdiction of\\nany dispute arising out of
|
||||
this Agreement.\\\"\\nLICENSE \\\"**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta
|
||||
is committed to promoting safe and fair use of its tools and features, including
|
||||
Llama 3.2. If you access or use Llama 3.2, you agree to this Acceptable Use
|
||||
Policy (\u201C**Policy**\u201D). The most recent copy of this policy can be
|
||||
found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited
|
||||
Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree
|
||||
you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate
|
||||
the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate,
|
||||
contribute to, encourage, plan, incite, or further illegal or unlawful activity
|
||||
or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation
|
||||
or harm to children, including the solicitation, creation, acquisition, or dissemination
|
||||
of child exploitative content or failure to report Child Sexual Abuse Material\\n
|
||||
\ 3. Human trafficking, exploitation, and sexual violence\\n 4.
|
||||
The illegal distribution of information or materials to minors, including obscene
|
||||
materials, or failure to employ legally required age-gating in connection with
|
||||
such information or materials.\\n 5. Sexual solicitation\\n 6.
|
||||
Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate
|
||||
the harassment, abuse, threatening, or bullying of individuals or groups of
|
||||
individuals\\n 2. Engage in, promote, incite, or facilitate discrimination
|
||||
or other unlawful or harmful conduct in the provision of employment, employment
|
||||
benefits, credit, housing, other economic benefits, or other essential goods
|
||||
and services\\n 3. Engage in the unauthorized or unlicensed practice of any
|
||||
profession including, but not limited to, financial, legal, medical/health,
|
||||
or related professional practices\\n 4. Collect, process, disclose, generate,
|
||||
or infer private or sensitive information about individuals, including information
|
||||
about individuals\u2019 identity, health, or demographic information, unless
|
||||
you have obtained the right to do so in accordance with applicable law\\n 5.
|
||||
Engage in or facilitate any action or generate any content that infringes, misappropriates,
|
||||
or otherwise violates any third-party rights, including the outputs or results
|
||||
of any products or services using the Llama Materials\\n 6. Create, generate,
|
||||
or facilitate the creation of malicious code, malware, computer viruses or do
|
||||
anything else that could disable, overburden, interfere with or impair the proper
|
||||
working, integrity, operation or appearance of a website or computer system\\n
|
||||
\ 7. Engage in any action, or facilitate any action, to intentionally circumvent
|
||||
or remove usage restrictions or other safety measures, or to enable functionality
|
||||
disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the
|
||||
planning or development of activities that present a risk of death or bodily
|
||||
harm to individuals, including use of Llama 3.2 related to the following:\\n
|
||||
\ 8. Military, warfare, nuclear industries or applications, espionage, use
|
||||
for materials or activities that are subject to the International Traffic Arms
|
||||
Regulations (ITAR) maintained by the United States Department of State or to
|
||||
the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons
|
||||
Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including
|
||||
weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n
|
||||
\ 11. Operation of critical infrastructure, transportation technologies, or
|
||||
heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting,
|
||||
and eating disorders\\n 13. Any content intended to incite or promote violence,
|
||||
abuse, or any infliction of bodily harm to an individual\\n3. Intentionally
|
||||
deceive or mislead others, including use of Llama 3.2 related to the following:\\n
|
||||
\ 14. Generating, promoting, or furthering fraud or the creation or promotion
|
||||
of disinformation\\n 15. Generating, promoting, or furthering defamatory
|
||||
content, including the creation of defamatory statements, images, or other content\\n
|
||||
\ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating
|
||||
another individual without consent, authorization, or legal right\\n 18.
|
||||
Representing that the use of Llama 3.2 or outputs are human-generated\\n 19.
|
||||
Generating or facilitating false online engagement, including fake reviews and
|
||||
other means of fake online engagement\\n4. Fail to appropriately disclose to
|
||||
end users any known dangers of your AI system\\n5. Interact with third party
|
||||
tools, models, or software designed to generate unlawful content or engage in
|
||||
unlawful or harmful conduct and/or represent that the outputs of such tools,
|
||||
models, or software are associated with Meta or Llama 3.2\\n\\nWith respect
|
||||
to any multimodal models included in Llama 3.2, the rights granted under Section
|
||||
1(a) of the Llama 3.2 Community License Agreement are not being granted to you
|
||||
if you are an individual domiciled in, or a company with a principal place of
|
||||
business in, the European Union. This restriction does not apply to end users
|
||||
of a product or service that incorporates any such multimodal models.\\n\\nPlease
|
||||
report any violation of this Policy, software \u201Cbug,\u201D or other problems
|
||||
that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n*
|
||||
Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n*
|
||||
Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n*
|
||||
Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n*
|
||||
Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama
|
||||
3.2: LlamaUseReport@meta.com\\\"\\n\",\"parameters\":\"stop \\\"\\u003c|start_header_id|\\u003e\\\"\\nstop
|
||||
\ \\\"\\u003c|end_header_id|\\u003e\\\"\\nstop \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting
|
||||
Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{-
|
||||
if .Tools }}When you receive a tool call response, use the output to format
|
||||
an answer to the orginal user question.\\n\\nYou are a helpful assistant with
|
||||
tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i,
|
||||
$_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{-
|
||||
if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if and $.Tools $last }}\\n\\nGiven the following functions, please respond with
|
||||
a JSON for a function call with its proper arguments that best answers the given
|
||||
prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\":
|
||||
dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range
|
||||
$.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{-
|
||||
else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name
|
||||
}}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{
|
||||
.Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{-
|
||||
else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
.Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"3.2B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Llama-3.2\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.parameter_count\":3212749888,\"general.quantization_version\":2,\"general.size_label\":\"3B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":24,\"llama.attention.head_count_kv\":8,\"llama.attention.key_length\":128,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.attention.value_length\":128,\"llama.block_count\":28,\"llama.context_length\":131072,\"llama.embedding_length\":3072,\"llama.feed_forward_length\":8192,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-12-31T11:53:14.529771974-05:00\"}"
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Date:
|
||||
- Tue, 31 Dec 2024 16:57:54 GMT
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- Thu, 02 Jan 2025 20:07:07 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
|
||||
@@ -1,449 +1,36 @@
|
||||
interactions:
|
||||
- request:
|
||||
body: '{"model": "llama3.2:3b", "prompt": "### User:\nRespond in 20 words. Who
|
||||
are you?\n\n", "options": {"temperature": 0.7, "num_predict": 30}, "stream":
|
||||
body: '{"model": "llama3.2:3b", "prompt": "### User:\nRespond in 20 words. Which
|
||||
model are you??\n\n", "options": {"num_predict": 30, "temperature": 0.7}, "stream":
|
||||
false}'
|
||||
headers:
|
||||
accept:
|
||||
Accept:
|
||||
- '*/*'
|
||||
accept-encoding:
|
||||
Accept-Encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
Connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '155'
|
||||
host:
|
||||
- localhost:11434
|
||||
user-agent:
|
||||
- litellm/1.56.4
|
||||
Content-Length:
|
||||
- '164'
|
||||
Content-Type:
|
||||
- application/json
|
||||
User-Agent:
|
||||
- python-requests/2.32.3
|
||||
method: POST
|
||||
uri: http://localhost:11434/api/generate
|
||||
response:
|
||||
content: '{"model":"llama3.2:3b","created_at":"2024-12-31T17:00:06.295261Z","response":"I''m
|
||||
an AI assistant, here to provide information and answer questions to the best
|
||||
of my abilities and knowledge.","done":true,"done_reason":"stop","context":[128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,271,128009,128006,882,128007,271,14711,2724,512,66454,304,220,508,4339,13,10699,527,499,1980,128009,128006,78191,128007,271,40,2846,459,15592,18328,11,1618,311,3493,2038,323,4320,4860,311,279,1888,315,856,18000,323,6677,13],"total_duration":826912750,"load_duration":32648125,"prompt_eval_count":38,"prompt_eval_duration":389000000,"eval_count":23,"eval_duration":404000000}'
|
||||
body:
|
||||
string: '{"model":"llama3.2:3b","created_at":"2025-01-02T20:24:24.812595Z","response":"I''m
|
||||
an AI, specifically a large language model, designed to understand and respond
|
||||
to user queries with accuracy.","done":true,"done_reason":"stop","context":[128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,271,128009,128006,882,128007,271,14711,2724,512,66454,304,220,508,4339,13,16299,1646,527,499,71291,128009,128006,78191,128007,271,40,2846,459,15592,11,11951,264,3544,4221,1646,11,6319,311,3619,323,6013,311,1217,20126,449,13708,13],"total_duration":827817584,"load_duration":41560542,"prompt_eval_count":39,"prompt_eval_duration":384000000,"eval_count":23,"eval_duration":400000000}'
|
||||
headers:
|
||||
Content-Length:
|
||||
- '675'
|
||||
- '683'
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Date:
|
||||
- Tue, 31 Dec 2024 17:00:06 GMT
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- request:
|
||||
body: '{"name": "llama3.2:3b"}'
|
||||
headers:
|
||||
accept:
|
||||
- '*/*'
|
||||
accept-encoding:
|
||||
- gzip, deflate
|
||||
connection:
|
||||
- keep-alive
|
||||
content-length:
|
||||
- '23'
|
||||
content-type:
|
||||
- application/json
|
||||
host:
|
||||
- localhost:11434
|
||||
user-agent:
|
||||
- litellm/1.56.4
|
||||
method: POST
|
||||
uri: http://localhost:11434/api/show
|
||||
response:
|
||||
content: "{\"license\":\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version
|
||||
Release Date: September 25, 2024\\n\\n\u201CAgreement\u201D means the terms
|
||||
and conditions for use, reproduction, distribution \\nand modification of the
|
||||
Llama Materials set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications,
|
||||
manuals and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D
|
||||
or \u201Cyou\u201D means you, or your employer or any other person or entity
|
||||
(if you are \\nentering into this Agreement on such person or entity\u2019s
|
||||
behalf), of the age required under\\napplicable laws, rules or regulations to
|
||||
provide legal consent and that has legal authority\\nto bind your employer or
|
||||
such other person or entity if you are entering in this Agreement\\non their
|
||||
behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models
|
||||
and software and algorithms, including\\nmachine-learning model code, trained
|
||||
model weights, inference-enabling code, training-enabling code,\\nfine-tuning
|
||||
enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama
|
||||
Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation
|
||||
(and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D
|
||||
or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in
|
||||
or, \\nif you are an entity, your principal place of business is in the EEA
|
||||
or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the
|
||||
EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using
|
||||
or distributing any portion or element of the Llama Materials,\\nyou agree to
|
||||
be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n
|
||||
\ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable
|
||||
and royalty-free limited license under Meta\u2019s intellectual property or
|
||||
other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce,
|
||||
distribute, copy, create derivative works \\nof, and make modifications to the
|
||||
Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If
|
||||
you distribute or make available the Llama Materials (or any derivative works
|
||||
thereof), \\nor a product or service (including another AI model) that contains
|
||||
any of them, you shall (A) provide\\na copy of this Agreement with any such
|
||||
Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non
|
||||
a related website, user interface, blogpost, about page, or product documentation.
|
||||
If you use the\\nLlama Materials or any outputs or results of the Llama Materials
|
||||
to create, train, fine tune, or\\notherwise improve an AI model, which is distributed
|
||||
or made available, you shall also include \u201CLlama\u201D\\nat the beginning
|
||||
of any such AI model name.\\n\\n ii. If you receive Llama Materials,
|
||||
or any derivative works thereof, from a Licensee as part\\nof an integrated
|
||||
end user product, then Section 2 of this Agreement will not apply to you. \\n\\n
|
||||
\ iii. You must retain in all copies of the Llama Materials that you distribute
|
||||
the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed
|
||||
as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2
|
||||
Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n
|
||||
\ iv. Your use of the Llama Materials must comply with applicable laws
|
||||
and regulations\\n(including trade compliance laws and regulations) and adhere
|
||||
to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy),
|
||||
which is hereby \\nincorporated by reference into this Agreement.\\n \\n2.
|
||||
Additional Commercial Terms. If, on the Llama 3.2 version release date, the
|
||||
monthly active users\\nof the products or services made available by or for
|
||||
Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly
|
||||
active users in the preceding calendar month, you must request \\na license
|
||||
from Meta, which Meta may grant to you in its sole discretion, and you are not
|
||||
authorized to\\nexercise any of the rights under this Agreement unless or until
|
||||
Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty.
|
||||
UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS
|
||||
THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF
|
||||
ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND
|
||||
IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR
|
||||
DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS
|
||||
AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY
|
||||
OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR
|
||||
ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT,
|
||||
TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT,
|
||||
\\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL,
|
||||
EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED
|
||||
OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n
|
||||
\ a. No trademark licenses are granted under this Agreement, and in connection
|
||||
with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark
|
||||
owned by or associated with the other or any of its affiliates, \\nexcept as
|
||||
required for reasonable and customary use in describing and redistributing the
|
||||
Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants
|
||||
you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required
|
||||
\\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s
|
||||
brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/).
|
||||
All goodwill arising out of your use of the Mark \\nwill inure to the benefit
|
||||
of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and
|
||||
derivatives made by or for Meta, with respect to any\\n derivative works
|
||||
and modifications of the Llama Materials that are made by you, as between you
|
||||
and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n
|
||||
\ c. If you institute litigation or other proceedings against Meta or any
|
||||
entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging
|
||||
that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n
|
||||
\ of any of the foregoing, constitutes infringement of intellectual property
|
||||
or other rights owned or licensable\\n by you, then any licenses granted
|
||||
to you under this Agreement shall terminate as of the date such litigation or\\n
|
||||
\ claim is filed or instituted. You will indemnify and hold harmless Meta
|
||||
from and against any claim by any third\\n party arising out of or related
|
||||
to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination.
|
||||
The term of this Agreement will commence upon your acceptance of this Agreement
|
||||
or access\\nto the Llama Materials and will continue in full force and effect
|
||||
until terminated in accordance with the terms\\nand conditions herein. Meta
|
||||
may terminate this Agreement if you are in breach of any term or condition of
|
||||
this\\nAgreement. Upon termination of this Agreement, you shall delete and cease
|
||||
use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination
|
||||
of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will
|
||||
be governed and construed under the laws of the State of \\nCalifornia without
|
||||
regard to choice of law principles, and the UN Convention on Contracts for the
|
||||
International\\nSale of Goods does not apply to this Agreement. The courts of
|
||||
California shall have exclusive jurisdiction of\\nany dispute arising out of
|
||||
this Agreement.\\n**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta is committed
|
||||
to promoting safe and fair use of its tools and features, including Llama 3.2.
|
||||
If you access or use Llama 3.2, you agree to this Acceptable Use Policy (\u201C**Policy**\u201D).
|
||||
The most recent copy of this policy can be found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited
|
||||
Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree
|
||||
you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate
|
||||
the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate,
|
||||
contribute to, encourage, plan, incite, or further illegal or unlawful activity
|
||||
or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation
|
||||
or harm to children, including the solicitation, creation, acquisition, or dissemination
|
||||
of child exploitative content or failure to report Child Sexual Abuse Material\\n
|
||||
\ 3. Human trafficking, exploitation, and sexual violence\\n 4.
|
||||
The illegal distribution of information or materials to minors, including obscene
|
||||
materials, or failure to employ legally required age-gating in connection with
|
||||
such information or materials.\\n 5. Sexual solicitation\\n 6.
|
||||
Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate
|
||||
the harassment, abuse, threatening, or bullying of individuals or groups of
|
||||
individuals\\n 2. Engage in, promote, incite, or facilitate discrimination
|
||||
or other unlawful or harmful conduct in the provision of employment, employment
|
||||
benefits, credit, housing, other economic benefits, or other essential goods
|
||||
and services\\n 3. Engage in the unauthorized or unlicensed practice of any
|
||||
profession including, but not limited to, financial, legal, medical/health,
|
||||
or related professional practices\\n 4. Collect, process, disclose, generate,
|
||||
or infer private or sensitive information about individuals, including information
|
||||
about individuals\u2019 identity, health, or demographic information, unless
|
||||
you have obtained the right to do so in accordance with applicable law\\n 5.
|
||||
Engage in or facilitate any action or generate any content that infringes, misappropriates,
|
||||
or otherwise violates any third-party rights, including the outputs or results
|
||||
of any products or services using the Llama Materials\\n 6. Create, generate,
|
||||
or facilitate the creation of malicious code, malware, computer viruses or do
|
||||
anything else that could disable, overburden, interfere with or impair the proper
|
||||
working, integrity, operation or appearance of a website or computer system\\n
|
||||
\ 7. Engage in any action, or facilitate any action, to intentionally circumvent
|
||||
or remove usage restrictions or other safety measures, or to enable functionality
|
||||
disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the
|
||||
planning or development of activities that present a risk of death or bodily
|
||||
harm to individuals, including use of Llama 3.2 related to the following:\\n
|
||||
\ 8. Military, warfare, nuclear industries or applications, espionage, use
|
||||
for materials or activities that are subject to the International Traffic Arms
|
||||
Regulations (ITAR) maintained by the United States Department of State or to
|
||||
the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons
|
||||
Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including
|
||||
weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n
|
||||
\ 11. Operation of critical infrastructure, transportation technologies, or
|
||||
heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting,
|
||||
and eating disorders\\n 13. Any content intended to incite or promote violence,
|
||||
abuse, or any infliction of bodily harm to an individual\\n3. Intentionally
|
||||
deceive or mislead others, including use of Llama 3.2 related to the following:\\n
|
||||
\ 14. Generating, promoting, or furthering fraud or the creation or promotion
|
||||
of disinformation\\n 15. Generating, promoting, or furthering defamatory
|
||||
content, including the creation of defamatory statements, images, or other content\\n
|
||||
\ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating
|
||||
another individual without consent, authorization, or legal right\\n 18.
|
||||
Representing that the use of Llama 3.2 or outputs are human-generated\\n 19.
|
||||
Generating or facilitating false online engagement, including fake reviews and
|
||||
other means of fake online engagement\\n4. Fail to appropriately disclose to
|
||||
end users any known dangers of your AI system\\n5. Interact with third party
|
||||
tools, models, or software designed to generate unlawful content or engage in
|
||||
unlawful or harmful conduct and/or represent that the outputs of such tools,
|
||||
models, or software are associated with Meta or Llama 3.2\\n\\nWith respect
|
||||
to any multimodal models included in Llama 3.2, the rights granted under Section
|
||||
1(a) of the Llama 3.2 Community License Agreement are not being granted to you
|
||||
if you are an individual domiciled in, or a company with a principal place of
|
||||
business in, the European Union. This restriction does not apply to end users
|
||||
of a product or service that incorporates any such multimodal models.\\n\\nPlease
|
||||
report any violation of this Policy, software \u201Cbug,\u201D or other problems
|
||||
that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n*
|
||||
Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n*
|
||||
Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n*
|
||||
Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n*
|
||||
Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama
|
||||
3.2: LlamaUseReport@meta.com\",\"modelfile\":\"# Modelfile generated by \\\"ollama
|
||||
show\\\"\\n# To build a new Modelfile based on this, replace FROM with:\\n#
|
||||
FROM llama3.2:3b\\n\\nFROM /Users/brandonhancock/.ollama/models/blobs/sha256-dde5aa3fc5ffc17176b5e8bdc82f587b24b2678c6c66101bf7da77af9f7ccdff\\nTEMPLATE
|
||||
\\\"\\\"\\\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting
|
||||
Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{-
|
||||
if .Tools }}When you receive a tool call response, use the output to format
|
||||
an answer to the orginal user question.\\n\\nYou are a helpful assistant with
|
||||
tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i,
|
||||
$_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{-
|
||||
if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if and $.Tools $last }}\\n\\nGiven the following functions, please respond with
|
||||
a JSON for a function call with its proper arguments that best answers the given
|
||||
prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\":
|
||||
dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range
|
||||
$.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{-
|
||||
else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name
|
||||
}}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{
|
||||
.Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{-
|
||||
else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
.Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- end }}\\n{{- end }}\\\"\\\"\\\"\\nPARAMETER stop \\u003c|start_header_id|\\u003e\\nPARAMETER
|
||||
stop \\u003c|end_header_id|\\u003e\\nPARAMETER stop \\u003c|eot_id|\\u003e\\nLICENSE
|
||||
\\\"LLAMA 3.2 COMMUNITY LICENSE AGREEMENT\\nLlama 3.2 Version Release Date:
|
||||
September 25, 2024\\n\\n\u201CAgreement\u201D means the terms and conditions
|
||||
for use, reproduction, distribution \\nand modification of the Llama Materials
|
||||
set forth herein.\\n\\n\u201CDocumentation\u201D means the specifications, manuals
|
||||
and documentation accompanying Llama 3.2\\ndistributed by Meta at https://llama.meta.com/doc/overview.\\n\\n\u201CLicensee\u201D
|
||||
or \u201Cyou\u201D means you, or your employer or any other person or entity
|
||||
(if you are \\nentering into this Agreement on such person or entity\u2019s
|
||||
behalf), of the age required under\\napplicable laws, rules or regulations to
|
||||
provide legal consent and that has legal authority\\nto bind your employer or
|
||||
such other person or entity if you are entering in this Agreement\\non their
|
||||
behalf.\\n\\n\u201CLlama 3.2\u201D means the foundational large language models
|
||||
and software and algorithms, including\\nmachine-learning model code, trained
|
||||
model weights, inference-enabling code, training-enabling code,\\nfine-tuning
|
||||
enabling code and other elements of the foregoing distributed by Meta at \\nhttps://www.llama.com/llama-downloads.\\n\\n\u201CLlama
|
||||
Materials\u201D means, collectively, Meta\u2019s proprietary Llama 3.2 and Documentation
|
||||
(and \\nany portion thereof) made available under this Agreement.\\n\\n\u201CMeta\u201D
|
||||
or \u201Cwe\u201D means Meta Platforms Ireland Limited (if you are located in
|
||||
or, \\nif you are an entity, your principal place of business is in the EEA
|
||||
or Switzerland) \\nand Meta Platforms, Inc. (if you are located outside of the
|
||||
EEA or Switzerland). \\n\\n\\nBy clicking \u201CI Accept\u201D below or by using
|
||||
or distributing any portion or element of the Llama Materials,\\nyou agree to
|
||||
be bound by this Agreement.\\n\\n\\n1. License Rights and Redistribution.\\n\\n
|
||||
\ a. Grant of Rights. You are granted a non-exclusive, worldwide, \\nnon-transferable
|
||||
and royalty-free limited license under Meta\u2019s intellectual property or
|
||||
other rights \\nowned by Meta embodied in the Llama Materials to use, reproduce,
|
||||
distribute, copy, create derivative works \\nof, and make modifications to the
|
||||
Llama Materials. \\n\\n b. Redistribution and Use. \\n\\n i. If
|
||||
you distribute or make available the Llama Materials (or any derivative works
|
||||
thereof), \\nor a product or service (including another AI model) that contains
|
||||
any of them, you shall (A) provide\\na copy of this Agreement with any such
|
||||
Llama Materials; and (B) prominently display \u201CBuilt with Llama\u201D\\non
|
||||
a related website, user interface, blogpost, about page, or product documentation.
|
||||
If you use the\\nLlama Materials or any outputs or results of the Llama Materials
|
||||
to create, train, fine tune, or\\notherwise improve an AI model, which is distributed
|
||||
or made available, you shall also include \u201CLlama\u201D\\nat the beginning
|
||||
of any such AI model name.\\n\\n ii. If you receive Llama Materials,
|
||||
or any derivative works thereof, from a Licensee as part\\nof an integrated
|
||||
end user product, then Section 2 of this Agreement will not apply to you. \\n\\n
|
||||
\ iii. You must retain in all copies of the Llama Materials that you distribute
|
||||
the \\nfollowing attribution notice within a \u201CNotice\u201D text file distributed
|
||||
as a part of such copies: \\n\u201CLlama 3.2 is licensed under the Llama 3.2
|
||||
Community License, Copyright \xA9 Meta Platforms,\\nInc. All Rights Reserved.\u201D\\n\\n
|
||||
\ iv. Your use of the Llama Materials must comply with applicable laws
|
||||
and regulations\\n(including trade compliance laws and regulations) and adhere
|
||||
to the Acceptable Use Policy for\\nthe Llama Materials (available at https://www.llama.com/llama3_2/use-policy),
|
||||
which is hereby \\nincorporated by reference into this Agreement.\\n \\n2.
|
||||
Additional Commercial Terms. If, on the Llama 3.2 version release date, the
|
||||
monthly active users\\nof the products or services made available by or for
|
||||
Licensee, or Licensee\u2019s affiliates, \\nis greater than 700 million monthly
|
||||
active users in the preceding calendar month, you must request \\na license
|
||||
from Meta, which Meta may grant to you in its sole discretion, and you are not
|
||||
authorized to\\nexercise any of the rights under this Agreement unless or until
|
||||
Meta otherwise expressly grants you such rights.\\n\\n3. Disclaimer of Warranty.
|
||||
UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND \\nRESULTS
|
||||
THEREFROM ARE PROVIDED ON AN \u201CAS IS\u201D BASIS, WITHOUT WARRANTIES OF
|
||||
ANY KIND, AND META DISCLAIMS\\nALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND
|
||||
IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES\\nOF TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE\\nFOR
|
||||
DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS
|
||||
AND ASSUME ANY RISKS ASSOCIATED\\nWITH YOUR USE OF THE LLAMA MATERIALS AND ANY
|
||||
OUTPUT AND RESULTS.\\n\\n4. Limitation of Liability. IN NO EVENT WILL META OR
|
||||
ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, \\nWHETHER IN CONTRACT,
|
||||
TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT,
|
||||
\\nFOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL,
|
||||
EXEMPLARY OR PUNITIVE DAMAGES, EVEN \\nIF META OR ITS AFFILIATES HAVE BEEN ADVISED
|
||||
OF THE POSSIBILITY OF ANY OF THE FOREGOING.\\n\\n5. Intellectual Property.\\n\\n
|
||||
\ a. No trademark licenses are granted under this Agreement, and in connection
|
||||
with the Llama Materials, \\nneither Meta nor Licensee may use any name or mark
|
||||
owned by or associated with the other or any of its affiliates, \\nexcept as
|
||||
required for reasonable and customary use in describing and redistributing the
|
||||
Llama Materials or as \\nset forth in this Section 5(a). Meta hereby grants
|
||||
you a license to use \u201CLlama\u201D (the \u201CMark\u201D) solely as required
|
||||
\\nto comply with the last sentence of Section 1.b.i. You will comply with Meta\u2019s
|
||||
brand guidelines (currently accessible \\nat https://about.meta.com/brand/resources/meta/company-brand/).
|
||||
All goodwill arising out of your use of the Mark \\nwill inure to the benefit
|
||||
of Meta.\\n\\n b. Subject to Meta\u2019s ownership of Llama Materials and
|
||||
derivatives made by or for Meta, with respect to any\\n derivative works
|
||||
and modifications of the Llama Materials that are made by you, as between you
|
||||
and Meta,\\n you are and will be the owner of such derivative works and modifications.\\n\\n
|
||||
\ c. If you institute litigation or other proceedings against Meta or any
|
||||
entity (including a cross-claim or\\n counterclaim in a lawsuit) alleging
|
||||
that the Llama Materials or Llama 3.2 outputs or results, or any portion\\n
|
||||
\ of any of the foregoing, constitutes infringement of intellectual property
|
||||
or other rights owned or licensable\\n by you, then any licenses granted
|
||||
to you under this Agreement shall terminate as of the date such litigation or\\n
|
||||
\ claim is filed or instituted. You will indemnify and hold harmless Meta
|
||||
from and against any claim by any third\\n party arising out of or related
|
||||
to your use or distribution of the Llama Materials.\\n\\n6. Term and Termination.
|
||||
The term of this Agreement will commence upon your acceptance of this Agreement
|
||||
or access\\nto the Llama Materials and will continue in full force and effect
|
||||
until terminated in accordance with the terms\\nand conditions herein. Meta
|
||||
may terminate this Agreement if you are in breach of any term or condition of
|
||||
this\\nAgreement. Upon termination of this Agreement, you shall delete and cease
|
||||
use of the Llama Materials. Sections 3,\\n4 and 7 shall survive the termination
|
||||
of this Agreement. \\n\\n7. Governing Law and Jurisdiction. This Agreement will
|
||||
be governed and construed under the laws of the State of \\nCalifornia without
|
||||
regard to choice of law principles, and the UN Convention on Contracts for the
|
||||
International\\nSale of Goods does not apply to this Agreement. The courts of
|
||||
California shall have exclusive jurisdiction of\\nany dispute arising out of
|
||||
this Agreement.\\\"\\nLICENSE \\\"**Llama 3.2** **Acceptable Use Policy**\\n\\nMeta
|
||||
is committed to promoting safe and fair use of its tools and features, including
|
||||
Llama 3.2. If you access or use Llama 3.2, you agree to this Acceptable Use
|
||||
Policy (\u201C**Policy**\u201D). The most recent copy of this policy can be
|
||||
found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).\\n\\n**Prohibited
|
||||
Uses**\\n\\nWe want everyone to use Llama 3.2 safely and responsibly. You agree
|
||||
you will not use, or allow others to use, Llama 3.2 to:\\n\\n\\n\\n1. Violate
|
||||
the law or others\u2019 rights, including to:\\n 1. Engage in, promote, generate,
|
||||
contribute to, encourage, plan, incite, or further illegal or unlawful activity
|
||||
or content, such as:\\n 1. Violence or terrorism\\n 2. Exploitation
|
||||
or harm to children, including the solicitation, creation, acquisition, or dissemination
|
||||
of child exploitative content or failure to report Child Sexual Abuse Material\\n
|
||||
\ 3. Human trafficking, exploitation, and sexual violence\\n 4.
|
||||
The illegal distribution of information or materials to minors, including obscene
|
||||
materials, or failure to employ legally required age-gating in connection with
|
||||
such information or materials.\\n 5. Sexual solicitation\\n 6.
|
||||
Any other criminal activity\\n 1. Engage in, promote, incite, or facilitate
|
||||
the harassment, abuse, threatening, or bullying of individuals or groups of
|
||||
individuals\\n 2. Engage in, promote, incite, or facilitate discrimination
|
||||
or other unlawful or harmful conduct in the provision of employment, employment
|
||||
benefits, credit, housing, other economic benefits, or other essential goods
|
||||
and services\\n 3. Engage in the unauthorized or unlicensed practice of any
|
||||
profession including, but not limited to, financial, legal, medical/health,
|
||||
or related professional practices\\n 4. Collect, process, disclose, generate,
|
||||
or infer private or sensitive information about individuals, including information
|
||||
about individuals\u2019 identity, health, or demographic information, unless
|
||||
you have obtained the right to do so in accordance with applicable law\\n 5.
|
||||
Engage in or facilitate any action or generate any content that infringes, misappropriates,
|
||||
or otherwise violates any third-party rights, including the outputs or results
|
||||
of any products or services using the Llama Materials\\n 6. Create, generate,
|
||||
or facilitate the creation of malicious code, malware, computer viruses or do
|
||||
anything else that could disable, overburden, interfere with or impair the proper
|
||||
working, integrity, operation or appearance of a website or computer system\\n
|
||||
\ 7. Engage in any action, or facilitate any action, to intentionally circumvent
|
||||
or remove usage restrictions or other safety measures, or to enable functionality
|
||||
disabled by Meta\\n2. Engage in, promote, incite, facilitate, or assist in the
|
||||
planning or development of activities that present a risk of death or bodily
|
||||
harm to individuals, including use of Llama 3.2 related to the following:\\n
|
||||
\ 8. Military, warfare, nuclear industries or applications, espionage, use
|
||||
for materials or activities that are subject to the International Traffic Arms
|
||||
Regulations (ITAR) maintained by the United States Department of State or to
|
||||
the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons
|
||||
Convention Implementation Act of 1997\\n 9. Guns and illegal weapons (including
|
||||
weapon development)\\n 10. Illegal drugs and regulated/controlled substances\\n
|
||||
\ 11. Operation of critical infrastructure, transportation technologies, or
|
||||
heavy machinery\\n 12. Self-harm or harm to others, including suicide, cutting,
|
||||
and eating disorders\\n 13. Any content intended to incite or promote violence,
|
||||
abuse, or any infliction of bodily harm to an individual\\n3. Intentionally
|
||||
deceive or mislead others, including use of Llama 3.2 related to the following:\\n
|
||||
\ 14. Generating, promoting, or furthering fraud or the creation or promotion
|
||||
of disinformation\\n 15. Generating, promoting, or furthering defamatory
|
||||
content, including the creation of defamatory statements, images, or other content\\n
|
||||
\ 16. Generating, promoting, or further distributing spam\\n 17. Impersonating
|
||||
another individual without consent, authorization, or legal right\\n 18.
|
||||
Representing that the use of Llama 3.2 or outputs are human-generated\\n 19.
|
||||
Generating or facilitating false online engagement, including fake reviews and
|
||||
other means of fake online engagement\\n4. Fail to appropriately disclose to
|
||||
end users any known dangers of your AI system\\n5. Interact with third party
|
||||
tools, models, or software designed to generate unlawful content or engage in
|
||||
unlawful or harmful conduct and/or represent that the outputs of such tools,
|
||||
models, or software are associated with Meta or Llama 3.2\\n\\nWith respect
|
||||
to any multimodal models included in Llama 3.2, the rights granted under Section
|
||||
1(a) of the Llama 3.2 Community License Agreement are not being granted to you
|
||||
if you are an individual domiciled in, or a company with a principal place of
|
||||
business in, the European Union. This restriction does not apply to end users
|
||||
of a product or service that incorporates any such multimodal models.\\n\\nPlease
|
||||
report any violation of this Policy, software \u201Cbug,\u201D or other problems
|
||||
that could lead to a violation of this Policy through one of the following means:\\n\\n\\n\\n*
|
||||
Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues\\u0026h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)\\n*
|
||||
Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\\n*
|
||||
Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\\n*
|
||||
Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama
|
||||
3.2: LlamaUseReport@meta.com\\\"\\n\",\"parameters\":\"stop \\\"\\u003c|start_header_id|\\u003e\\\"\\nstop
|
||||
\ \\\"\\u003c|end_header_id|\\u003e\\\"\\nstop \\\"\\u003c|eot_id|\\u003e\\\"\",\"template\":\"\\u003c|start_header_id|\\u003esystem\\u003c|end_header_id|\\u003e\\n\\nCutting
|
||||
Knowledge Date: December 2023\\n\\n{{ if .System }}{{ .System }}\\n{{- end }}\\n{{-
|
||||
if .Tools }}When you receive a tool call response, use the output to format
|
||||
an answer to the orginal user question.\\n\\nYou are a helpful assistant with
|
||||
tool calling capabilities.\\n{{- end }}\\u003c|eot_id|\\u003e\\n{{- range $i,
|
||||
$_ := .Messages }}\\n{{- $last := eq (len (slice $.Messages $i)) 1 }}\\n{{-
|
||||
if eq .Role \\\"user\\\" }}\\u003c|start_header_id|\\u003euser\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if and $.Tools $last }}\\n\\nGiven the following functions, please respond with
|
||||
a JSON for a function call with its proper arguments that best answers the given
|
||||
prompt.\\n\\nRespond in the format {\\\"name\\\": function name, \\\"parameters\\\":
|
||||
dictionary of argument name and its value}. Do not use variables.\\n\\n{{ range
|
||||
$.Tools }}\\n{{- . }}\\n{{ end }}\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{-
|
||||
else }}\\n\\n{{ .Content }}\\u003c|eot_id|\\u003e\\n{{- end }}{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- else if eq .Role \\\"assistant\\\" }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n{{-
|
||||
if .ToolCalls }}\\n{{ range .ToolCalls }}\\n{\\\"name\\\": \\\"{{ .Function.Name
|
||||
}}\\\", \\\"parameters\\\": {{ .Function.Arguments }}}{{ end }}\\n{{- else }}\\n\\n{{
|
||||
.Content }}\\n{{- end }}{{ if not $last }}\\u003c|eot_id|\\u003e{{ end }}\\n{{-
|
||||
else if eq .Role \\\"tool\\\" }}\\u003c|start_header_id|\\u003eipython\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
.Content }}\\u003c|eot_id|\\u003e{{ if $last }}\\u003c|start_header_id|\\u003eassistant\\u003c|end_header_id|\\u003e\\n\\n{{
|
||||
end }}\\n{{- end }}\\n{{- end }}\",\"details\":{\"parent_model\":\"\",\"format\":\"gguf\",\"family\":\"llama\",\"families\":[\"llama\"],\"parameter_size\":\"3.2B\",\"quantization_level\":\"Q4_K_M\"},\"model_info\":{\"general.architecture\":\"llama\",\"general.basename\":\"Llama-3.2\",\"general.file_type\":15,\"general.finetune\":\"Instruct\",\"general.languages\":[\"en\",\"de\",\"fr\",\"it\",\"pt\",\"hi\",\"es\",\"th\"],\"general.parameter_count\":3212749888,\"general.quantization_version\":2,\"general.size_label\":\"3B\",\"general.tags\":[\"facebook\",\"meta\",\"pytorch\",\"llama\",\"llama-3\",\"text-generation\"],\"general.type\":\"model\",\"llama.attention.head_count\":24,\"llama.attention.head_count_kv\":8,\"llama.attention.key_length\":128,\"llama.attention.layer_norm_rms_epsilon\":0.00001,\"llama.attention.value_length\":128,\"llama.block_count\":28,\"llama.context_length\":131072,\"llama.embedding_length\":3072,\"llama.feed_forward_length\":8192,\"llama.rope.dimension_count\":128,\"llama.rope.freq_base\":500000,\"llama.vocab_size\":128256,\"tokenizer.ggml.bos_token_id\":128000,\"tokenizer.ggml.eos_token_id\":128009,\"tokenizer.ggml.merges\":null,\"tokenizer.ggml.model\":\"gpt2\",\"tokenizer.ggml.pre\":\"llama-bpe\",\"tokenizer.ggml.token_type\":null,\"tokenizer.ggml.tokens\":null},\"modified_at\":\"2024-12-31T11:53:14.529771974-05:00\"}"
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Date:
|
||||
- Tue, 31 Dec 2024 17:00:06 GMT
|
||||
Transfer-Encoding:
|
||||
- chunked
|
||||
http_version: HTTP/1.1
|
||||
status_code: 200
|
||||
- Thu, 02 Jan 2025 20:24:24 GMT
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
version: 1
|
||||
|
||||
@@ -28,9 +28,10 @@ def test_create_success(mock_subprocess):
|
||||
with in_temp_dir():
|
||||
tool_command = ToolCommand()
|
||||
|
||||
with patch.object(tool_command, "login") as mock_login, patch(
|
||||
"sys.stdout", new=StringIO()
|
||||
) as fake_out:
|
||||
with (
|
||||
patch.object(tool_command, "login") as mock_login,
|
||||
patch("sys.stdout", new=StringIO()) as fake_out,
|
||||
):
|
||||
tool_command.create("test-tool")
|
||||
output = fake_out.getvalue()
|
||||
|
||||
@@ -82,7 +83,7 @@ def test_install_success(mock_get, mock_subprocess_run):
|
||||
capture_output=False,
|
||||
text=True,
|
||||
check=True,
|
||||
env=unittest.mock.ANY
|
||||
env=unittest.mock.ANY,
|
||||
)
|
||||
|
||||
assert "Successfully installed sample-tool" in output
|
||||
|
||||
@@ -333,16 +333,16 @@ def test_manager_agent_delegating_to_assigned_task_agent():
|
||||
)
|
||||
|
||||
mock_task_output = TaskOutput(
|
||||
description="Mock description",
|
||||
raw="mocked output",
|
||||
agent="mocked agent"
|
||||
description="Mock description", raw="mocked output", agent="mocked agent"
|
||||
)
|
||||
|
||||
# Because we are mocking execute_sync, we never hit the underlying _execute_core
|
||||
# which sets the output attribute of the task
|
||||
task.output = mock_task_output
|
||||
|
||||
with patch.object(Task, 'execute_sync', return_value=mock_task_output) as mock_execute_sync:
|
||||
with patch.object(
|
||||
Task, "execute_sync", return_value=mock_task_output
|
||||
) as mock_execute_sync:
|
||||
crew.kickoff()
|
||||
|
||||
# Verify execute_sync was called once
|
||||
@@ -350,12 +350,20 @@ def test_manager_agent_delegating_to_assigned_task_agent():
|
||||
|
||||
# Get the tools argument from the call
|
||||
_, kwargs = mock_execute_sync.call_args
|
||||
tools = kwargs['tools']
|
||||
tools = kwargs["tools"]
|
||||
|
||||
# Verify the delegation tools were passed correctly
|
||||
assert len(tools) == 2
|
||||
assert any("Delegate a specific task to one of the following coworkers: Researcher" in tool.description for tool in tools)
|
||||
assert any("Ask a specific question to one of the following coworkers: Researcher" in tool.description for tool in tools)
|
||||
assert any(
|
||||
"Delegate a specific task to one of the following coworkers: Researcher"
|
||||
in tool.description
|
||||
for tool in tools
|
||||
)
|
||||
assert any(
|
||||
"Ask a specific question to one of the following coworkers: Researcher"
|
||||
in tool.description
|
||||
for tool in tools
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
@@ -404,7 +412,7 @@ def test_manager_agent_delegates_with_varied_role_cases():
|
||||
backstory="A researcher with spaces in role name",
|
||||
allow_delegation=False,
|
||||
)
|
||||
|
||||
|
||||
writer_caps = Agent(
|
||||
role="SENIOR WRITER", # All caps
|
||||
goal="Write with caps in role",
|
||||
@@ -426,13 +434,13 @@ def test_manager_agent_delegates_with_varied_role_cases():
|
||||
)
|
||||
|
||||
mock_task_output = TaskOutput(
|
||||
description="Mock description",
|
||||
raw="mocked output",
|
||||
agent="mocked agent"
|
||||
description="Mock description", raw="mocked output", agent="mocked agent"
|
||||
)
|
||||
task.output = mock_task_output
|
||||
|
||||
with patch.object(Task, 'execute_sync', return_value=mock_task_output) as mock_execute_sync:
|
||||
with patch.object(
|
||||
Task, "execute_sync", return_value=mock_task_output
|
||||
) as mock_execute_sync:
|
||||
crew.kickoff()
|
||||
|
||||
# Verify execute_sync was called once
|
||||
@@ -440,20 +448,32 @@ def test_manager_agent_delegates_with_varied_role_cases():
|
||||
|
||||
# Get the tools argument from the call
|
||||
_, kwargs = mock_execute_sync.call_args
|
||||
tools = kwargs['tools']
|
||||
tools = kwargs["tools"]
|
||||
|
||||
# Verify the delegation tools were passed correctly and can handle case/whitespace variations
|
||||
assert len(tools) == 2
|
||||
|
||||
|
||||
# Check delegation tool descriptions (should work despite case/whitespace differences)
|
||||
delegation_tool = tools[0]
|
||||
question_tool = tools[1]
|
||||
|
||||
assert "Delegate a specific task to one of the following coworkers:" in delegation_tool.description
|
||||
assert " Researcher " in delegation_tool.description or "SENIOR WRITER" in delegation_tool.description
|
||||
|
||||
assert "Ask a specific question to one of the following coworkers:" in question_tool.description
|
||||
assert " Researcher " in question_tool.description or "SENIOR WRITER" in question_tool.description
|
||||
|
||||
assert (
|
||||
"Delegate a specific task to one of the following coworkers:"
|
||||
in delegation_tool.description
|
||||
)
|
||||
assert (
|
||||
" Researcher " in delegation_tool.description
|
||||
or "SENIOR WRITER" in delegation_tool.description
|
||||
)
|
||||
|
||||
assert (
|
||||
"Ask a specific question to one of the following coworkers:"
|
||||
in question_tool.description
|
||||
)
|
||||
assert (
|
||||
" Researcher " in question_tool.description
|
||||
or "SENIOR WRITER" in question_tool.description
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
@@ -479,6 +499,7 @@ def test_crew_with_delegating_agents():
|
||||
== "In the rapidly evolving landscape of technology, AI agents have emerged as formidable tools, revolutionizing how we interact with data and automate tasks. These sophisticated systems leverage machine learning and natural language processing to perform a myriad of functions, from virtual personal assistants to complex decision-making companions in industries such as finance, healthcare, and education. By mimicking human intelligence, AI agents can analyze massive data sets at unparalleled speeds, enabling businesses to uncover valuable insights, enhance productivity, and elevate user experiences to unprecedented levels.\n\nOne of the most striking aspects of AI agents is their adaptability; they learn from their interactions and continuously improve their performance over time. This feature is particularly valuable in customer service where AI agents can address inquiries, resolve issues, and provide personalized recommendations without the limitations of human fatigue. Moreover, with intuitive interfaces, AI agents enhance user interactions, making technology more accessible and user-friendly, thereby breaking down barriers that have historically hindered digital engagement.\n\nDespite their immense potential, the deployment of AI agents raises important ethical and practical considerations. Issues related to privacy, data security, and the potential for job displacement necessitate thoughtful dialogue and proactive measures. Striking a balance between technological innovation and societal impact will be crucial as organizations integrate these agents into their operations. Additionally, ensuring transparency in AI decision-making processes is vital to maintain public trust as AI agents become an integral part of daily life.\n\nLooking ahead, the future of AI agents appears bright, with ongoing advancements promising even greater capabilities. As we continue to harness the power of AI, we can expect these agents to play a transformative role in shaping various sectors—streamlining workflows, enabling smarter decision-making, and fostering more personalized experiences. Embracing this technology responsibly can lead to a future where AI agents not only augment human effort but also inspire creativity and efficiency across the board, ultimately redefining our interaction with the digital world."
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_crew_with_delegating_agents_should_not_override_task_tools():
|
||||
from typing import Type
|
||||
@@ -489,6 +510,7 @@ def test_crew_with_delegating_agents_should_not_override_task_tools():
|
||||
|
||||
class TestToolInput(BaseModel):
|
||||
"""Input schema for TestTool."""
|
||||
|
||||
query: str = Field(..., description="Query to process")
|
||||
|
||||
class TestTool(BaseTool):
|
||||
@@ -516,24 +538,29 @@ def test_crew_with_delegating_agents_should_not_override_task_tools():
|
||||
)
|
||||
|
||||
mock_task_output = TaskOutput(
|
||||
description="Mock description",
|
||||
raw="mocked output",
|
||||
agent="mocked agent"
|
||||
description="Mock description", raw="mocked output", agent="mocked agent"
|
||||
)
|
||||
|
||||
# Because we are mocking execute_sync, we never hit the underlying _execute_core
|
||||
# which sets the output attribute of the task
|
||||
tasks[0].output = mock_task_output
|
||||
|
||||
with patch.object(Task, 'execute_sync', return_value=mock_task_output) as mock_execute_sync:
|
||||
with patch.object(
|
||||
Task, "execute_sync", return_value=mock_task_output
|
||||
) as mock_execute_sync:
|
||||
crew.kickoff()
|
||||
|
||||
# Execute the task and verify both tools are present
|
||||
_, kwargs = mock_execute_sync.call_args
|
||||
tools = kwargs['tools']
|
||||
tools = kwargs["tools"]
|
||||
|
||||
assert any(
|
||||
isinstance(tool, TestTool) for tool in tools
|
||||
), "TestTool should be present"
|
||||
assert any(
|
||||
"delegate" in tool.name.lower() for tool in tools
|
||||
), "Delegation tool should be present"
|
||||
|
||||
assert any(isinstance(tool, TestTool) for tool in tools), "TestTool should be present"
|
||||
assert any("delegate" in tool.name.lower() for tool in tools), "Delegation tool should be present"
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_crew_with_delegating_agents_should_not_override_agent_tools():
|
||||
@@ -545,6 +572,7 @@ def test_crew_with_delegating_agents_should_not_override_agent_tools():
|
||||
|
||||
class TestToolInput(BaseModel):
|
||||
"""Input schema for TestTool."""
|
||||
|
||||
query: str = Field(..., description="Query to process")
|
||||
|
||||
class TestTool(BaseTool):
|
||||
@@ -563,7 +591,7 @@ def test_crew_with_delegating_agents_should_not_override_agent_tools():
|
||||
Task(
|
||||
description="Produce and amazing 1 paragraph draft of an article about AI Agents.",
|
||||
expected_output="A 4 paragraph article about AI.",
|
||||
agent=new_ceo
|
||||
agent=new_ceo,
|
||||
)
|
||||
]
|
||||
|
||||
@@ -574,24 +602,29 @@ def test_crew_with_delegating_agents_should_not_override_agent_tools():
|
||||
)
|
||||
|
||||
mock_task_output = TaskOutput(
|
||||
description="Mock description",
|
||||
raw="mocked output",
|
||||
agent="mocked agent"
|
||||
description="Mock description", raw="mocked output", agent="mocked agent"
|
||||
)
|
||||
|
||||
# Because we are mocking execute_sync, we never hit the underlying _execute_core
|
||||
# which sets the output attribute of the task
|
||||
tasks[0].output = mock_task_output
|
||||
|
||||
with patch.object(Task, 'execute_sync', return_value=mock_task_output) as mock_execute_sync:
|
||||
with patch.object(
|
||||
Task, "execute_sync", return_value=mock_task_output
|
||||
) as mock_execute_sync:
|
||||
crew.kickoff()
|
||||
|
||||
# Execute the task and verify both tools are present
|
||||
_, kwargs = mock_execute_sync.call_args
|
||||
tools = kwargs['tools']
|
||||
tools = kwargs["tools"]
|
||||
|
||||
assert any(
|
||||
isinstance(tool, TestTool) for tool in new_ceo.tools
|
||||
), "TestTool should be present"
|
||||
assert any(
|
||||
"delegate" in tool.name.lower() for tool in tools
|
||||
), "Delegation tool should be present"
|
||||
|
||||
assert any(isinstance(tool, TestTool) for tool in new_ceo.tools), "TestTool should be present"
|
||||
assert any("delegate" in tool.name.lower() for tool in tools), "Delegation tool should be present"
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_task_tools_override_agent_tools():
|
||||
@@ -603,6 +636,7 @@ def test_task_tools_override_agent_tools():
|
||||
|
||||
class TestToolInput(BaseModel):
|
||||
"""Input schema for TestTool."""
|
||||
|
||||
query: str = Field(..., description="Query to process")
|
||||
|
||||
class TestTool(BaseTool):
|
||||
@@ -630,27 +664,23 @@ def test_task_tools_override_agent_tools():
|
||||
description="Write a test task",
|
||||
expected_output="Test output",
|
||||
agent=new_researcher,
|
||||
tools=[AnotherTestTool()]
|
||||
tools=[AnotherTestTool()],
|
||||
)
|
||||
|
||||
crew = Crew(
|
||||
agents=[new_researcher],
|
||||
tasks=[task],
|
||||
process=Process.sequential
|
||||
)
|
||||
crew = Crew(agents=[new_researcher], tasks=[task], process=Process.sequential)
|
||||
|
||||
crew.kickoff()
|
||||
|
||||
# Verify task tools override agent tools
|
||||
tools = task.tools or []
|
||||
assert len(tools) == 1 # AnotherTestTool
|
||||
assert any(isinstance(tool, AnotherTestTool) for tool in tools)
|
||||
assert not any(isinstance(tool, TestTool) for tool in tools)
|
||||
assert len(task.tools) == 1 # AnotherTestTool
|
||||
assert any(isinstance(tool, AnotherTestTool) for tool in task.tools)
|
||||
assert not any(isinstance(tool, TestTool) for tool in task.tools)
|
||||
|
||||
# Verify agent tools remain unchanged
|
||||
assert len(new_researcher.tools) == 1
|
||||
assert isinstance(new_researcher.tools[0], TestTool)
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_task_tools_override_agent_tools_with_allow_delegation():
|
||||
"""
|
||||
@@ -703,13 +733,13 @@ def test_task_tools_override_agent_tools_with_allow_delegation():
|
||||
)
|
||||
|
||||
mock_task_output = TaskOutput(
|
||||
description="Mock description",
|
||||
raw="mocked output",
|
||||
agent="mocked agent"
|
||||
description="Mock description", raw="mocked output", agent="mocked agent"
|
||||
)
|
||||
|
||||
# We mock execute_sync to verify which tools get used at runtime
|
||||
with patch.object(Task, "execute_sync", return_value=mock_task_output) as mock_execute_sync:
|
||||
with patch.object(
|
||||
Task, "execute_sync", return_value=mock_task_output
|
||||
) as mock_execute_sync:
|
||||
crew.kickoff()
|
||||
|
||||
# Inspect the call kwargs to verify the actual tools passed to execution
|
||||
@@ -717,16 +747,23 @@ def test_task_tools_override_agent_tools_with_allow_delegation():
|
||||
used_tools = kwargs["tools"]
|
||||
|
||||
# Confirm AnotherTestTool is present but TestTool is not
|
||||
assert any(isinstance(tool, AnotherTestTool) for tool in used_tools), "AnotherTestTool should be present"
|
||||
assert not any(isinstance(tool, TestTool) for tool in used_tools), "TestTool should not be present among used tools"
|
||||
assert any(
|
||||
isinstance(tool, AnotherTestTool) for tool in used_tools
|
||||
), "AnotherTestTool should be present"
|
||||
assert not any(
|
||||
isinstance(tool, TestTool) for tool in used_tools
|
||||
), "TestTool should not be present among used tools"
|
||||
|
||||
# Confirm delegation tool(s) are present
|
||||
assert any("delegate" in tool.name.lower() for tool in used_tools), "Delegation tool should be present"
|
||||
assert any(
|
||||
"delegate" in tool.name.lower() for tool in used_tools
|
||||
), "Delegation tool should be present"
|
||||
|
||||
# Finally, make sure the agent's original tools remain unchanged
|
||||
assert len(researcher_with_delegation.tools) == 1
|
||||
assert isinstance(researcher_with_delegation.tools[0], TestTool)
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_crew_verbose_output(capsys):
|
||||
tasks = [
|
||||
@@ -1013,8 +1050,8 @@ def test_three_task_with_async_execution():
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
async def test_crew_async_kickoff():
|
||||
inputs = [
|
||||
{"topic": "dog"},
|
||||
@@ -1061,8 +1098,9 @@ async def test_crew_async_kickoff():
|
||||
assert result[0].token_usage.successful_requests > 0 # type: ignore
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_async_task_execution_call_count():
|
||||
async def test_async_task_execution_call_count():
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
list_ideas = Task(
|
||||
@@ -1189,7 +1227,6 @@ def test_kickoff_for_each_empty_input():
|
||||
assert results == []
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_kickoff_for_each_invalid_input():
|
||||
"""Tests if kickoff_for_each raises TypeError for invalid input types."""
|
||||
|
||||
@@ -1212,7 +1249,6 @@ def test_kickoff_for_each_invalid_input():
|
||||
crew.kickoff_for_each("invalid input")
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_kickoff_for_each_error_handling():
|
||||
"""Tests error handling in kickoff_for_each when kickoff raises an error."""
|
||||
from unittest.mock import patch
|
||||
@@ -1249,7 +1285,6 @@ def test_kickoff_for_each_error_handling():
|
||||
crew.kickoff_for_each(inputs=inputs)
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
@pytest.mark.asyncio
|
||||
async def test_kickoff_async_basic_functionality_and_output():
|
||||
"""Tests the basic functionality and output of kickoff_async."""
|
||||
@@ -1284,7 +1319,6 @@ async def test_kickoff_async_basic_functionality_and_output():
|
||||
mock_kickoff.assert_called_once_with(inputs)
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
@pytest.mark.asyncio
|
||||
async def test_async_kickoff_for_each_async_basic_functionality_and_output():
|
||||
"""Tests the basic functionality and output of kickoff_for_each_async."""
|
||||
@@ -1331,7 +1365,6 @@ async def test_async_kickoff_for_each_async_basic_functionality_and_output():
|
||||
mock_kickoff_async.assert_any_call(inputs=input_data)
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
@pytest.mark.asyncio
|
||||
async def test_async_kickoff_for_each_async_empty_input():
|
||||
"""Tests if akickoff_for_each_async handles an empty input list."""
|
||||
@@ -1515,12 +1548,12 @@ def test_code_execution_flag_adds_code_tool_upon_kickoff():
|
||||
crew = Crew(agents=[programmer], tasks=[task])
|
||||
|
||||
mock_task_output = TaskOutput(
|
||||
description="Mock description",
|
||||
raw="mocked output",
|
||||
agent="mocked agent"
|
||||
description="Mock description", raw="mocked output", agent="mocked agent"
|
||||
)
|
||||
|
||||
with patch.object(Task, "execute_sync", return_value=mock_task_output) as mock_execute_sync:
|
||||
with patch.object(
|
||||
Task, "execute_sync", return_value=mock_task_output
|
||||
) as mock_execute_sync:
|
||||
crew.kickoff()
|
||||
|
||||
# Get the tools that were actually used in execution
|
||||
@@ -1529,7 +1562,10 @@ def test_code_execution_flag_adds_code_tool_upon_kickoff():
|
||||
|
||||
# Verify that exactly one tool was used and it was a CodeInterpreterTool
|
||||
assert len(used_tools) == 1, "Should have exactly one tool"
|
||||
assert isinstance(used_tools[0], CodeInterpreterTool), "Tool should be CodeInterpreterTool"
|
||||
assert isinstance(
|
||||
used_tools[0], CodeInterpreterTool
|
||||
), "Tool should be CodeInterpreterTool"
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_delegation_is_not_enabled_if_there_are_only_one_agent():
|
||||
@@ -1640,16 +1676,16 @@ def test_hierarchical_crew_creation_tasks_with_agents():
|
||||
)
|
||||
|
||||
mock_task_output = TaskOutput(
|
||||
description="Mock description",
|
||||
raw="mocked output",
|
||||
agent="mocked agent"
|
||||
description="Mock description", raw="mocked output", agent="mocked agent"
|
||||
)
|
||||
|
||||
# Because we are mocking execute_sync, we never hit the underlying _execute_core
|
||||
# which sets the output attribute of the task
|
||||
task.output = mock_task_output
|
||||
|
||||
with patch.object(Task, 'execute_sync', return_value=mock_task_output) as mock_execute_sync:
|
||||
with patch.object(
|
||||
Task, "execute_sync", return_value=mock_task_output
|
||||
) as mock_execute_sync:
|
||||
crew.kickoff()
|
||||
|
||||
# Verify execute_sync was called once
|
||||
@@ -1657,12 +1693,20 @@ def test_hierarchical_crew_creation_tasks_with_agents():
|
||||
|
||||
# Get the tools argument from the call
|
||||
_, kwargs = mock_execute_sync.call_args
|
||||
tools = kwargs['tools']
|
||||
tools = kwargs["tools"]
|
||||
|
||||
# Verify the delegation tools were passed correctly
|
||||
assert len(tools) == 2
|
||||
assert any("Delegate a specific task to one of the following coworkers: Senior Writer" in tool.description for tool in tools)
|
||||
assert any("Ask a specific question to one of the following coworkers: Senior Writer" in tool.description for tool in tools)
|
||||
assert any(
|
||||
"Delegate a specific task to one of the following coworkers: Senior Writer"
|
||||
in tool.description
|
||||
for tool in tools
|
||||
)
|
||||
assert any(
|
||||
"Ask a specific question to one of the following coworkers: Senior Writer"
|
||||
in tool.description
|
||||
for tool in tools
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
@@ -1685,9 +1729,7 @@ def test_hierarchical_crew_creation_tasks_with_async_execution():
|
||||
)
|
||||
|
||||
mock_task_output = TaskOutput(
|
||||
description="Mock description",
|
||||
raw="mocked output",
|
||||
agent="mocked agent"
|
||||
description="Mock description", raw="mocked output", agent="mocked agent"
|
||||
)
|
||||
|
||||
# Create a mock Future that returns our TaskOutput
|
||||
@@ -1698,7 +1740,9 @@ def test_hierarchical_crew_creation_tasks_with_async_execution():
|
||||
# which sets the output attribute of the task
|
||||
task.output = mock_task_output
|
||||
|
||||
with patch.object(Task, 'execute_async', return_value=mock_future) as mock_execute_async:
|
||||
with patch.object(
|
||||
Task, "execute_async", return_value=mock_future
|
||||
) as mock_execute_async:
|
||||
crew.kickoff()
|
||||
|
||||
# Verify execute_async was called once
|
||||
@@ -1706,12 +1750,20 @@ def test_hierarchical_crew_creation_tasks_with_async_execution():
|
||||
|
||||
# Get the tools argument from the call
|
||||
_, kwargs = mock_execute_async.call_args
|
||||
tools = kwargs['tools']
|
||||
tools = kwargs["tools"]
|
||||
|
||||
# Verify the delegation tools were passed correctly
|
||||
assert len(tools) == 2
|
||||
assert any("Delegate a specific task to one of the following coworkers: Senior Writer\n" in tool.description for tool in tools)
|
||||
assert any("Ask a specific question to one of the following coworkers: Senior Writer\n" in tool.description for tool in tools)
|
||||
assert any(
|
||||
"Delegate a specific task to one of the following coworkers: Senior Writer\n"
|
||||
in tool.description
|
||||
for tool in tools
|
||||
)
|
||||
assert any(
|
||||
"Ask a specific question to one of the following coworkers: Senior Writer\n"
|
||||
in tool.description
|
||||
for tool in tools
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
@@ -2040,7 +2092,6 @@ def test_crew_output_file_end_to_end(tmp_path):
|
||||
assert expected_file.exists(), f"Output file {expected_file} was not created"
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_crew_output_file_validation_failures():
|
||||
"""Test output file validation failures in a crew context."""
|
||||
agent = Agent(
|
||||
@@ -2056,7 +2107,7 @@ def test_crew_output_file_validation_failures():
|
||||
description="Analyze data",
|
||||
expected_output="Analysis results",
|
||||
agent=agent,
|
||||
output_file="../output.txt"
|
||||
output_file="../output.txt",
|
||||
)
|
||||
Crew(agents=[agent], tasks=[task]).kickoff()
|
||||
|
||||
@@ -2066,7 +2117,7 @@ def test_crew_output_file_validation_failures():
|
||||
description="Analyze data",
|
||||
expected_output="Analysis results",
|
||||
agent=agent,
|
||||
output_file="output.txt | rm -rf /"
|
||||
output_file="output.txt | rm -rf /",
|
||||
)
|
||||
Crew(agents=[agent], tasks=[task]).kickoff()
|
||||
|
||||
@@ -2076,7 +2127,7 @@ def test_crew_output_file_validation_failures():
|
||||
description="Analyze data",
|
||||
expected_output="Analysis results",
|
||||
agent=agent,
|
||||
output_file="~/output.txt"
|
||||
output_file="~/output.txt",
|
||||
)
|
||||
Crew(agents=[agent], tasks=[task]).kickoff()
|
||||
|
||||
@@ -2086,12 +2137,11 @@ def test_crew_output_file_validation_failures():
|
||||
description="Analyze data",
|
||||
expected_output="Analysis results",
|
||||
agent=agent,
|
||||
output_file="{invalid-name}/output.txt"
|
||||
output_file="{invalid-name}/output.txt",
|
||||
)
|
||||
Crew(agents=[agent], tasks=[task]).kickoff()
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_manager_agent():
|
||||
from unittest.mock import patch
|
||||
|
||||
@@ -3050,6 +3100,7 @@ def test_task_tools_preserve_code_execution_tools():
|
||||
|
||||
class TestToolInput(BaseModel):
|
||||
"""Input schema for TestTool."""
|
||||
|
||||
query: str = Field(..., description="Query to process")
|
||||
|
||||
class TestTool(BaseTool):
|
||||
@@ -3083,7 +3134,7 @@ def test_task_tools_preserve_code_execution_tools():
|
||||
description="Write a program to calculate fibonacci numbers.",
|
||||
expected_output="A working fibonacci calculator.",
|
||||
agent=programmer,
|
||||
tools=[TestTool()]
|
||||
tools=[TestTool()],
|
||||
)
|
||||
|
||||
crew = Crew(
|
||||
@@ -3093,12 +3144,12 @@ def test_task_tools_preserve_code_execution_tools():
|
||||
)
|
||||
|
||||
mock_task_output = TaskOutput(
|
||||
description="Mock description",
|
||||
raw="mocked output",
|
||||
agent="mocked agent"
|
||||
description="Mock description", raw="mocked output", agent="mocked agent"
|
||||
)
|
||||
|
||||
with patch.object(Task, "execute_sync", return_value=mock_task_output) as mock_execute_sync:
|
||||
with patch.object(
|
||||
Task, "execute_sync", return_value=mock_task_output
|
||||
) as mock_execute_sync:
|
||||
crew.kickoff()
|
||||
|
||||
# Get the tools that were actually used in execution
|
||||
@@ -3106,12 +3157,21 @@ def test_task_tools_preserve_code_execution_tools():
|
||||
used_tools = kwargs["tools"]
|
||||
|
||||
# Verify all expected tools are present
|
||||
assert any(isinstance(tool, TestTool) for tool in used_tools), "Task's TestTool should be present"
|
||||
assert any(isinstance(tool, CodeInterpreterTool) for tool in used_tools), "CodeInterpreterTool should be present"
|
||||
assert any("delegate" in tool.name.lower() for tool in used_tools), "Delegation tool should be present"
|
||||
assert any(
|
||||
isinstance(tool, TestTool) for tool in used_tools
|
||||
), "Task's TestTool should be present"
|
||||
assert any(
|
||||
isinstance(tool, CodeInterpreterTool) for tool in used_tools
|
||||
), "CodeInterpreterTool should be present"
|
||||
assert any(
|
||||
"delegate" in tool.name.lower() for tool in used_tools
|
||||
), "Delegation tool should be present"
|
||||
|
||||
# Verify the total number of tools (TestTool + CodeInterpreter + 2 delegation tools)
|
||||
assert len(used_tools) == 4, "Should have TestTool, CodeInterpreter, and 2 delegation tools"
|
||||
assert (
|
||||
len(used_tools) == 4
|
||||
), "Should have TestTool, CodeInterpreter, and 2 delegation tools"
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_multimodal_flag_adds_multimodal_tools():
|
||||
@@ -3140,13 +3200,13 @@ def test_multimodal_flag_adds_multimodal_tools():
|
||||
crew = Crew(agents=[multimodal_agent], tasks=[task], process=Process.sequential)
|
||||
|
||||
mock_task_output = TaskOutput(
|
||||
description="Mock description",
|
||||
raw="mocked output",
|
||||
agent="mocked agent"
|
||||
description="Mock description", raw="mocked output", agent="mocked agent"
|
||||
)
|
||||
|
||||
# Mock execute_sync to verify the tools passed at runtime
|
||||
with patch.object(Task, "execute_sync", return_value=mock_task_output) as mock_execute_sync:
|
||||
with patch.object(
|
||||
Task, "execute_sync", return_value=mock_task_output
|
||||
) as mock_execute_sync:
|
||||
crew.kickoff()
|
||||
|
||||
# Get the tools that were actually used in execution
|
||||
@@ -3154,13 +3214,14 @@ def test_multimodal_flag_adds_multimodal_tools():
|
||||
used_tools = kwargs["tools"]
|
||||
|
||||
# Check that the multimodal tool was added
|
||||
assert any(isinstance(tool, AddImageTool) for tool in used_tools), (
|
||||
"AddImageTool should be present when agent is multimodal"
|
||||
)
|
||||
assert any(
|
||||
isinstance(tool, AddImageTool) for tool in used_tools
|
||||
), "AddImageTool should be present when agent is multimodal"
|
||||
|
||||
# Verify we have exactly one tool (just the AddImageTool)
|
||||
assert len(used_tools) == 1, "Should only have the AddImageTool"
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_multimodal_agent_image_tool_handling():
|
||||
"""
|
||||
@@ -3202,10 +3263,10 @@ def test_multimodal_agent_image_tool_handling():
|
||||
mock_task_output = TaskOutput(
|
||||
description="Mock description",
|
||||
raw="A detailed analysis of the image",
|
||||
agent="Image Analyst"
|
||||
agent="Image Analyst",
|
||||
)
|
||||
|
||||
with patch.object(Task, 'execute_sync') as mock_execute_sync:
|
||||
with patch.object(Task, "execute_sync") as mock_execute_sync:
|
||||
# Set up the mock to return our task output
|
||||
mock_execute_sync.return_value = mock_task_output
|
||||
|
||||
@@ -3214,7 +3275,7 @@ def test_multimodal_agent_image_tool_handling():
|
||||
|
||||
# Get the tools that were passed to execute_sync
|
||||
_, kwargs = mock_execute_sync.call_args
|
||||
tools = kwargs['tools']
|
||||
tools = kwargs["tools"]
|
||||
|
||||
# Verify the AddImageTool is present and properly configured
|
||||
image_tools = [tool for tool in tools if tool.name == "Add image to content"]
|
||||
@@ -3224,7 +3285,7 @@ def test_multimodal_agent_image_tool_handling():
|
||||
image_tool = image_tools[0]
|
||||
result = image_tool._run(
|
||||
image_url="https://example.com/test-image.jpg",
|
||||
action="Please analyze this image"
|
||||
action="Please analyze this image",
|
||||
)
|
||||
|
||||
# Verify the tool returns the expected format
|
||||
@@ -3234,6 +3295,7 @@ def test_multimodal_agent_image_tool_handling():
|
||||
assert result["content"][0]["type"] == "text"
|
||||
assert result["content"][1]["type"] == "image_url"
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_multimodal_agent_live_image_analysis():
|
||||
"""
|
||||
@@ -3247,7 +3309,7 @@ def test_multimodal_agent_live_image_analysis():
|
||||
allow_delegation=False,
|
||||
multimodal=True,
|
||||
verbose=True,
|
||||
llm="gpt-4o"
|
||||
llm="gpt-4o",
|
||||
)
|
||||
|
||||
# Create a task for image analysis
|
||||
@@ -3258,19 +3320,18 @@ def test_multimodal_agent_live_image_analysis():
|
||||
Image: {image_url}
|
||||
""",
|
||||
expected_output="A comprehensive description of the image contents.",
|
||||
agent=image_analyst
|
||||
agent=image_analyst,
|
||||
)
|
||||
|
||||
# Create and run the crew
|
||||
crew = Crew(
|
||||
agents=[image_analyst],
|
||||
tasks=[analyze_image]
|
||||
)
|
||||
crew = Crew(agents=[image_analyst], tasks=[analyze_image])
|
||||
|
||||
# Execute with an image URL
|
||||
result = crew.kickoff(inputs={
|
||||
"image_url": "https://media.istockphoto.com/id/946087016/photo/aerial-view-of-lower-manhattan-new-york.jpg?s=612x612&w=0&k=20&c=viLiMRznQ8v5LzKTt_LvtfPFUVl1oiyiemVdSlm29_k="
|
||||
})
|
||||
result = crew.kickoff(
|
||||
inputs={
|
||||
"image_url": "https://media.istockphoto.com/id/946087016/photo/aerial-view-of-lower-manhattan-new-york.jpg?s=612x612&w=0&k=20&c=viLiMRznQ8v5LzKTt_LvtfPFUVl1oiyiemVdSlm29_k="
|
||||
}
|
||||
)
|
||||
|
||||
# Verify we got a meaningful response
|
||||
assert isinstance(result.raw, str)
|
||||
|
||||
@@ -578,14 +578,6 @@ def test_multiple_docling_sources():
|
||||
assert docling_source.content is not None
|
||||
|
||||
|
||||
def test_docling_source_with_local_file():
|
||||
current_dir = Path(__file__).parent
|
||||
pdf_path = current_dir / "crewai_quickstart.pdf"
|
||||
docling_source = CrewDoclingSource(file_paths=[pdf_path])
|
||||
assert docling_source.file_paths == [pdf_path]
|
||||
assert docling_source.content is not None
|
||||
|
||||
|
||||
def test_file_path_validation():
|
||||
"""Test file path validation for knowledge sources."""
|
||||
current_dir = Path(__file__).parent
|
||||
@@ -606,6 +598,6 @@ def test_file_path_validation():
|
||||
# Test neither file_path nor file_paths provided
|
||||
with pytest.raises(
|
||||
ValueError,
|
||||
match="file_path/file_paths must be a Path, str, or a list of these types"
|
||||
match="file_path/file_paths must be a Path, str, or a list of these types",
|
||||
):
|
||||
PDFKnowledgeSource()
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
[pytest]
|
||||
markers =
|
||||
vcr: Mark a test as using VCR.py for recording/replaying HTTP interactions
|
||||
|
||||
[vcr]
|
||||
record_mode = none
|
||||
@@ -719,7 +719,7 @@ def test_interpolate_inputs():
|
||||
task = Task(
|
||||
description="Give me a list of 5 interesting ideas about {topic} to explore for an article, what makes them unique and interesting.",
|
||||
expected_output="Bullet point list of 5 interesting ideas about {topic}.",
|
||||
output_file="/tmp/{topic}/output_{date}.txt"
|
||||
output_file="/tmp/{topic}/output_{date}.txt",
|
||||
)
|
||||
|
||||
task.interpolate_inputs(inputs={"topic": "AI", "date": "2024"})
|
||||
@@ -742,41 +742,35 @@ def test_interpolate_inputs():
|
||||
def test_interpolate_only():
|
||||
"""Test the interpolate_only method for various scenarios including JSON structure preservation."""
|
||||
task = Task(
|
||||
description="Unused in this test",
|
||||
expected_output="Unused in this test"
|
||||
description="Unused in this test", expected_output="Unused in this test"
|
||||
)
|
||||
|
||||
|
||||
# Test JSON structure preservation
|
||||
json_string = '{"info": "Look at {placeholder}", "nested": {"val": "{nestedVal}"}}'
|
||||
result = task.interpolate_only(
|
||||
input_string=json_string,
|
||||
inputs={"placeholder": "the data", "nestedVal": "something else"}
|
||||
inputs={"placeholder": "the data", "nestedVal": "something else"},
|
||||
)
|
||||
assert '"info": "Look at the data"' in result
|
||||
assert '"val": "something else"' in result
|
||||
assert "{placeholder}" not in result
|
||||
assert "{nestedVal}" not in result
|
||||
|
||||
|
||||
# Test normal string interpolation
|
||||
normal_string = "Hello {name}, welcome to {place}!"
|
||||
result = task.interpolate_only(
|
||||
input_string=normal_string,
|
||||
inputs={"name": "John", "place": "CrewAI"}
|
||||
input_string=normal_string, inputs={"name": "John", "place": "CrewAI"}
|
||||
)
|
||||
assert result == "Hello John, welcome to CrewAI!"
|
||||
|
||||
|
||||
# Test empty string
|
||||
result = task.interpolate_only(
|
||||
input_string="",
|
||||
inputs={"unused": "value"}
|
||||
)
|
||||
result = task.interpolate_only(input_string="", inputs={"unused": "value"})
|
||||
assert result == ""
|
||||
|
||||
|
||||
# Test string with no placeholders
|
||||
no_placeholders = "Hello, this is a test"
|
||||
result = task.interpolate_only(
|
||||
input_string=no_placeholders,
|
||||
inputs={"unused": "value"}
|
||||
input_string=no_placeholders, inputs={"unused": "value"}
|
||||
)
|
||||
assert result == no_placeholders
|
||||
|
||||
@@ -880,56 +874,65 @@ def test_key():
|
||||
def test_output_file_validation():
|
||||
"""Test output file path validation."""
|
||||
# Valid paths
|
||||
assert Task(
|
||||
description="Test task",
|
||||
expected_output="Test output",
|
||||
output_file="output.txt"
|
||||
).output_file == "output.txt"
|
||||
assert Task(
|
||||
description="Test task",
|
||||
expected_output="Test output",
|
||||
output_file="/tmp/output.txt"
|
||||
).output_file == "tmp/output.txt"
|
||||
assert Task(
|
||||
description="Test task",
|
||||
expected_output="Test output",
|
||||
output_file="{dir}/output_{date}.txt"
|
||||
).output_file == "{dir}/output_{date}.txt"
|
||||
|
||||
assert (
|
||||
Task(
|
||||
description="Test task",
|
||||
expected_output="Test output",
|
||||
output_file="output.txt",
|
||||
).output_file
|
||||
== "output.txt"
|
||||
)
|
||||
assert (
|
||||
Task(
|
||||
description="Test task",
|
||||
expected_output="Test output",
|
||||
output_file="/tmp/output.txt",
|
||||
).output_file
|
||||
== "tmp/output.txt"
|
||||
)
|
||||
assert (
|
||||
Task(
|
||||
description="Test task",
|
||||
expected_output="Test output",
|
||||
output_file="{dir}/output_{date}.txt",
|
||||
).output_file
|
||||
== "{dir}/output_{date}.txt"
|
||||
)
|
||||
|
||||
# Invalid paths
|
||||
with pytest.raises(ValueError, match="Path traversal"):
|
||||
Task(
|
||||
description="Test task",
|
||||
expected_output="Test output",
|
||||
output_file="../output.txt"
|
||||
output_file="../output.txt",
|
||||
)
|
||||
with pytest.raises(ValueError, match="Path traversal"):
|
||||
Task(
|
||||
description="Test task",
|
||||
expected_output="Test output",
|
||||
output_file="folder/../output.txt"
|
||||
output_file="folder/../output.txt",
|
||||
)
|
||||
with pytest.raises(ValueError, match="Shell special characters"):
|
||||
Task(
|
||||
description="Test task",
|
||||
expected_output="Test output",
|
||||
output_file="output.txt | rm -rf /"
|
||||
output_file="output.txt | rm -rf /",
|
||||
)
|
||||
with pytest.raises(ValueError, match="Shell expansion"):
|
||||
Task(
|
||||
description="Test task",
|
||||
expected_output="Test output",
|
||||
output_file="~/output.txt"
|
||||
output_file="~/output.txt",
|
||||
)
|
||||
with pytest.raises(ValueError, match="Shell expansion"):
|
||||
Task(
|
||||
description="Test task",
|
||||
expected_output="Test output",
|
||||
output_file="$HOME/output.txt"
|
||||
output_file="$HOME/output.txt",
|
||||
)
|
||||
with pytest.raises(ValueError, match="Invalid template variable"):
|
||||
Task(
|
||||
description="Test task",
|
||||
expected_output="Test output",
|
||||
output_file="{invalid-name}/output.txt"
|
||||
output_file="{invalid-name}/output.txt",
|
||||
)
|
||||
|
||||
@@ -8,48 +8,49 @@ from crewai.tools.agent_tools.base_agent_tools import BaseAgentTool
|
||||
|
||||
class TestAgentTool(BaseAgentTool):
|
||||
"""Concrete implementation of BaseAgentTool for testing."""
|
||||
|
||||
def _run(self, *args, **kwargs):
|
||||
"""Implement required _run method."""
|
||||
return "Test response"
|
||||
|
||||
@pytest.mark.parametrize("role_name,should_match", [
|
||||
('Futel Official Infopoint', True), # exact match
|
||||
(' "Futel Official Infopoint" ', True), # extra quotes and spaces
|
||||
('Futel Official Infopoint\n', True), # trailing newline
|
||||
('"Futel Official Infopoint"', True), # embedded quotes
|
||||
(' FUTEL\nOFFICIAL INFOPOINT ', True), # multiple whitespace and newline
|
||||
('futel official infopoint', True), # lowercase
|
||||
('FUTEL OFFICIAL INFOPOINT', True), # uppercase
|
||||
('Non Existent Agent', False), # non-existent agent
|
||||
(None, False), # None agent name
|
||||
])
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"role_name,should_match",
|
||||
[
|
||||
("Futel Official Infopoint", True), # exact match
|
||||
(' "Futel Official Infopoint" ', True), # extra quotes and spaces
|
||||
("Futel Official Infopoint\n", True), # trailing newline
|
||||
('"Futel Official Infopoint"', True), # embedded quotes
|
||||
(" FUTEL\nOFFICIAL INFOPOINT ", True), # multiple whitespace and newline
|
||||
("futel official infopoint", True), # lowercase
|
||||
("FUTEL OFFICIAL INFOPOINT", True), # uppercase
|
||||
("Non Existent Agent", False), # non-existent agent
|
||||
(None, False), # None agent name
|
||||
],
|
||||
)
|
||||
def test_agent_tool_role_matching(role_name, should_match):
|
||||
"""Test that agent tools can match roles regardless of case, whitespace, and special characters."""
|
||||
# Create test agent
|
||||
test_agent = Agent(
|
||||
role='Futel Official Infopoint',
|
||||
goal='Answer questions about Futel',
|
||||
backstory='Futel Football Club info',
|
||||
allow_delegation=False
|
||||
role="Futel Official Infopoint",
|
||||
goal="Answer questions about Futel",
|
||||
backstory="Futel Football Club info",
|
||||
allow_delegation=False,
|
||||
)
|
||||
|
||||
# Create test agent tool
|
||||
agent_tool = TestAgentTool(
|
||||
name="test_tool",
|
||||
description="Test tool",
|
||||
agents=[test_agent]
|
||||
name="test_tool", description="Test tool", agents=[test_agent]
|
||||
)
|
||||
|
||||
# Test role matching
|
||||
result = agent_tool._execute(
|
||||
agent_name=role_name,
|
||||
task='Test task',
|
||||
context=None
|
||||
)
|
||||
result = agent_tool._execute(agent_name=role_name, task="Test task", context=None)
|
||||
|
||||
if should_match:
|
||||
assert "coworker mentioned not found" not in result.lower(), \
|
||||
f"Should find agent with role name: {role_name}"
|
||||
assert (
|
||||
"coworker mentioned not found" not in result.lower()
|
||||
), f"Should find agent with role name: {role_name}"
|
||||
else:
|
||||
assert "coworker mentioned not found" in result.lower(), \
|
||||
f"Should not find agent with role name: {role_name}"
|
||||
assert (
|
||||
"coworker mentioned not found" in result.lower()
|
||||
), f"Should not find agent with role name: {role_name}"
|
||||
|
||||
@@ -15,10 +15,7 @@ def test_task_without_guardrail():
|
||||
agent.execute_task.return_value = "test result"
|
||||
agent.crew = None
|
||||
|
||||
task = Task(
|
||||
description="Test task",
|
||||
expected_output="Output"
|
||||
)
|
||||
task = Task(description="Test task", expected_output="Output")
|
||||
|
||||
result = task.execute_sync(agent=agent)
|
||||
assert isinstance(result, TaskOutput)
|
||||
@@ -27,6 +24,7 @@ def test_task_without_guardrail():
|
||||
|
||||
def test_task_with_successful_guardrail():
|
||||
"""Test that successful guardrail validation passes transformed result."""
|
||||
|
||||
def guardrail(result: TaskOutput):
|
||||
return (True, result.raw.upper())
|
||||
|
||||
@@ -35,11 +33,7 @@ def test_task_with_successful_guardrail():
|
||||
agent.execute_task.return_value = "test result"
|
||||
agent.crew = None
|
||||
|
||||
task = Task(
|
||||
description="Test task",
|
||||
expected_output="Output",
|
||||
guardrail=guardrail
|
||||
)
|
||||
task = Task(description="Test task", expected_output="Output", guardrail=guardrail)
|
||||
|
||||
result = task.execute_sync(agent=agent)
|
||||
assert isinstance(result, TaskOutput)
|
||||
@@ -48,22 +42,20 @@ def test_task_with_successful_guardrail():
|
||||
|
||||
def test_task_with_failing_guardrail():
|
||||
"""Test that failing guardrail triggers retry with error context."""
|
||||
|
||||
def guardrail(result: TaskOutput):
|
||||
return (False, "Invalid format")
|
||||
|
||||
agent = Mock()
|
||||
agent.role = "test_agent"
|
||||
agent.execute_task.side_effect = [
|
||||
"bad result",
|
||||
"good result"
|
||||
]
|
||||
agent.execute_task.side_effect = ["bad result", "good result"]
|
||||
agent.crew = None
|
||||
|
||||
task = Task(
|
||||
description="Test task",
|
||||
expected_output="Output",
|
||||
guardrail=guardrail,
|
||||
max_retries=1
|
||||
max_retries=1,
|
||||
)
|
||||
|
||||
# First execution fails guardrail, second succeeds
|
||||
@@ -77,6 +69,7 @@ def test_task_with_failing_guardrail():
|
||||
|
||||
def test_task_with_guardrail_retries():
|
||||
"""Test that guardrail respects max_retries configuration."""
|
||||
|
||||
def guardrail(result: TaskOutput):
|
||||
return (False, "Invalid format")
|
||||
|
||||
@@ -89,7 +82,7 @@ def test_task_with_guardrail_retries():
|
||||
description="Test task",
|
||||
expected_output="Output",
|
||||
guardrail=guardrail,
|
||||
max_retries=2
|
||||
max_retries=2,
|
||||
)
|
||||
|
||||
with pytest.raises(Exception) as exc_info:
|
||||
@@ -102,6 +95,7 @@ def test_task_with_guardrail_retries():
|
||||
|
||||
def test_guardrail_error_in_context():
|
||||
"""Test that guardrail error is passed in context for retry."""
|
||||
|
||||
def guardrail(result: TaskOutput):
|
||||
return (False, "Expected JSON, got string")
|
||||
|
||||
@@ -113,11 +107,12 @@ def test_guardrail_error_in_context():
|
||||
description="Test task",
|
||||
expected_output="Output",
|
||||
guardrail=guardrail,
|
||||
max_retries=1
|
||||
max_retries=1,
|
||||
)
|
||||
|
||||
# Mock execute_task to succeed on second attempt
|
||||
first_call = True
|
||||
|
||||
def execute_task(task, context, tools):
|
||||
nonlocal first_call
|
||||
if first_call:
|
||||
|
||||
52
uv.lock
generated
52
uv.lock
generated
@@ -1,18 +1,18 @@
|
||||
version = 1
|
||||
requires-python = ">=3.10, <3.13"
|
||||
resolution-markers = [
|
||||
"python_full_version < '3.11' and platform_system == 'Darwin'",
|
||||
"python_full_version < '3.11' and platform_machine == 'aarch64' and platform_system == 'Linux'",
|
||||
"(python_full_version < '3.11' and platform_machine != 'aarch64' and platform_system != 'Darwin') or (python_full_version < '3.11' and platform_system != 'Darwin' and platform_system != 'Linux')",
|
||||
"python_full_version == '3.11.*' and platform_system == 'Darwin'",
|
||||
"python_full_version == '3.11.*' and platform_machine == 'aarch64' and platform_system == 'Linux'",
|
||||
"(python_full_version == '3.11.*' and platform_machine != 'aarch64' and platform_system != 'Darwin') or (python_full_version == '3.11.*' and platform_system != 'Darwin' and platform_system != 'Linux')",
|
||||
"python_full_version >= '3.12' and python_full_version < '3.12.4' and platform_system == 'Darwin'",
|
||||
"python_full_version >= '3.12' and python_full_version < '3.12.4' and platform_machine == 'aarch64' and platform_system == 'Linux'",
|
||||
"(python_full_version >= '3.12' and python_full_version < '3.12.4' and platform_machine != 'aarch64' and platform_system != 'Darwin') or (python_full_version >= '3.12' and python_full_version < '3.12.4' and platform_system != 'Darwin' and platform_system != 'Linux')",
|
||||
"python_full_version >= '3.12.4' and platform_system == 'Darwin'",
|
||||
"python_full_version >= '3.12.4' and platform_machine == 'aarch64' and platform_system == 'Linux'",
|
||||
"(python_full_version >= '3.12.4' and platform_machine != 'aarch64' and platform_system != 'Darwin') or (python_full_version >= '3.12.4' and platform_system != 'Darwin' and platform_system != 'Linux')",
|
||||
"python_full_version < '3.11' and sys_platform == 'darwin'",
|
||||
"python_full_version < '3.11' and platform_machine == 'aarch64' and sys_platform == 'linux'",
|
||||
"(python_full_version < '3.11' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform != 'darwin' and sys_platform != 'linux')",
|
||||
"python_full_version == '3.11.*' and sys_platform == 'darwin'",
|
||||
"python_full_version == '3.11.*' and platform_machine == 'aarch64' and sys_platform == 'linux'",
|
||||
"(python_full_version == '3.11.*' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version == '3.11.*' and sys_platform != 'darwin' and sys_platform != 'linux')",
|
||||
"python_full_version >= '3.12' and python_full_version < '3.12.4' and sys_platform == 'darwin'",
|
||||
"python_full_version >= '3.12' and python_full_version < '3.12.4' and platform_machine == 'aarch64' and sys_platform == 'linux'",
|
||||
"(python_full_version >= '3.12' and python_full_version < '3.12.4' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.12' and python_full_version < '3.12.4' and sys_platform != 'darwin' and sys_platform != 'linux')",
|
||||
"python_full_version >= '3.12.4' and sys_platform == 'darwin'",
|
||||
"python_full_version >= '3.12.4' and platform_machine == 'aarch64' and sys_platform == 'linux'",
|
||||
"(python_full_version >= '3.12.4' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.12.4' and sys_platform != 'darwin' and sys_platform != 'linux')",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -683,7 +683,7 @@ requires-dist = [
|
||||
{ name = "instructor", specifier = ">=1.3.3" },
|
||||
{ name = "json-repair", specifier = ">=0.25.2" },
|
||||
{ name = "jsonref", specifier = ">=1.1.0" },
|
||||
{ name = "litellm", specifier = ">=1.56.4" },
|
||||
{ name = "litellm", specifier = ">=1.44.22" },
|
||||
{ name = "mem0ai", marker = "extra == 'mem0'", specifier = ">=0.1.29" },
|
||||
{ name = "openai", specifier = ">=1.13.3" },
|
||||
{ name = "openpyxl", specifier = ">=3.1.5" },
|
||||
@@ -2229,24 +2229,24 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "litellm"
|
||||
version = "1.56.4"
|
||||
version = "1.50.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "aiohttp" },
|
||||
{ name = "click" },
|
||||
{ name = "httpx" },
|
||||
{ name = "importlib-metadata" },
|
||||
{ name = "jinja2" },
|
||||
{ name = "jsonschema" },
|
||||
{ name = "openai" },
|
||||
{ name = "pydantic" },
|
||||
{ name = "python-dotenv" },
|
||||
{ name = "requests" },
|
||||
{ name = "tiktoken" },
|
||||
{ name = "tokenizers" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/83/ea/2c51d16c244a64dd3f0bdb1757aef798cf943b92e5695da04e3e42ba09e0/litellm-1.56.4.tar.gz", hash = "sha256:2808ca21878d200f7676a3d11e5bf2b5e3349ae504628f279cd7297c7dbd2038", size = 6284983 }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/a7/45/4d54617b267a96f1f7c17c0010ea1aba20e30a3672b873fe92a6001e5952/litellm-1.50.2.tar.gz", hash = "sha256:b244c9a0e069cc626b85fb9f5cc252114aaff1225500da30ce0940f841aef8ea", size = 6096949 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/8f/25/2fd7b28a270b2963e8fa0ecf6aab4db47c54d932cc5aac8bc87e7ebc3755/litellm-1.56.4-py3-none-any.whl", hash = "sha256:699a8db46f7de045069a77c435e13244b5fdaf5df1c8cb5e6ad675ef7e104ccd", size = 6564370 },
|
||||
{ url = "https://files.pythonhosted.org/packages/22/f3/89a4d65d1b9286eb5ac6a6e92dd93523d92f3142a832e60c00d5cad64176/litellm-1.50.2-py3-none-any.whl", hash = "sha256:99cac60c78037946ab809b7cfbbadad53507bb2db8ae39391b4be215a0869fdd", size = 6318265 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2900,7 +2900,7 @@ name = "nvidia-cudnn-cu12"
|
||||
version = "9.1.0.70"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "nvidia-cublas-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" },
|
||||
{ name = "nvidia-cublas-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'linux')" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/9f/fd/713452cd72343f682b1c7b9321e23829f00b842ceaedcda96e742ea0b0b3/nvidia_cudnn_cu12-9.1.0.70-py3-none-manylinux2014_x86_64.whl", hash = "sha256:165764f44ef8c61fcdfdfdbe769d687e06374059fbb388b6c89ecb0e28793a6f", size = 664752741 },
|
||||
@@ -2927,9 +2927,9 @@ name = "nvidia-cusolver-cu12"
|
||||
version = "11.4.5.107"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "nvidia-cublas-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" },
|
||||
{ name = "nvidia-cusparse-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" },
|
||||
{ name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" },
|
||||
{ name = "nvidia-cublas-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'linux')" },
|
||||
{ name = "nvidia-cusparse-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'linux')" },
|
||||
{ name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'linux')" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/bc/1d/8de1e5c67099015c834315e333911273a8c6aaba78923dd1d1e25fc5f217/nvidia_cusolver_cu12-11.4.5.107-py3-none-manylinux1_x86_64.whl", hash = "sha256:8a7ec542f0412294b15072fa7dab71d31334014a69f953004ea7a118206fe0dd", size = 124161928 },
|
||||
@@ -2940,7 +2940,7 @@ name = "nvidia-cusparse-cu12"
|
||||
version = "12.1.0.106"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" },
|
||||
{ name = "nvidia-nvjitlink-cu12", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'linux')" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/65/5b/cfaeebf25cd9fdec14338ccb16f6b2c4c7fa9163aefcf057d86b9cc248bb/nvidia_cusparse_cu12-12.1.0.106-py3-none-manylinux1_x86_64.whl", hash = "sha256:f3b50f42cf363f86ab21f720998517a659a48131e8d538dc02f8768237bd884c", size = 195958278 },
|
||||
@@ -3040,7 +3040,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "openai"
|
||||
version = "1.58.1"
|
||||
version = "1.52.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "anyio" },
|
||||
@@ -3052,9 +3052,9 @@ dependencies = [
|
||||
{ name = "tqdm" },
|
||||
{ name = "typing-extensions" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/27/3c/b1ecce430ed56fa3ac1b0676966d3250aab9c70a408232b71e419ea62148/openai-1.58.1.tar.gz", hash = "sha256:f5a035fd01e141fc743f4b0e02c41ca49be8fab0866d3b67f5f29b4f4d3c0973", size = 343411 }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/80/ac/54c76352d493866637756b7c0ecec44f0b5bafb8fe753d98472cf6cfe4ce/openai-1.52.1.tar.gz", hash = "sha256:383b96c7e937cbec23cad5bf5718085381e4313ca33c5c5896b54f8e1b19d144", size = 310069 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/8e/5a/d22cd07f1a99b9e8b3c92ee0c1959188db4318828a3d88c9daac120bdd69/openai-1.58.1-py3-none-any.whl", hash = "sha256:e2910b1170a6b7f88ef491ac3a42c387f08bd3db533411f7ee391d166571d63c", size = 454279 },
|
||||
{ url = "https://files.pythonhosted.org/packages/ad/31/28a83e124e9f9dd04c83b5aeb6f8b1770f45addde4dd3d34d9a9091590ad/openai-1.52.1-py3-none-any.whl", hash = "sha256:f23e83df5ba04ee0e82c8562571e8cb596cd88f9a84ab783e6c6259e5ffbfb4a", size = 386945 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5165,7 +5165,7 @@ name = "triton"
|
||||
version = "3.0.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "filelock", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux')" },
|
||||
{ name = "filelock", marker = "(platform_machine != 'aarch64' and platform_system != 'Darwin') or (platform_system != 'Darwin' and platform_system != 'Linux' and sys_platform != 'linux')" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/45/27/14cc3101409b9b4b9241d2ba7deaa93535a217a211c86c4cc7151fb12181/triton-3.0.0-1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e1efef76935b2febc365bfadf74bcb65a6f959a9872e5bddf44cc9e0adce1e1a", size = 209376304 },
|
||||
|
||||
Reference in New Issue
Block a user