camel-ai 0.1.5.3__py3-none-any.whl → 0.1.5.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of camel-ai might be problematic. Click here for more details.

Files changed (51) hide show
  1. camel/__init__.py +1 -1
  2. camel/agents/knowledge_graph_agent.py +4 -1
  3. camel/configs/__init__.py +6 -0
  4. camel/configs/litellm_config.py +8 -18
  5. camel/configs/ollama_config.py +85 -0
  6. camel/configs/zhipuai_config.py +78 -0
  7. camel/embeddings/base.py +10 -9
  8. camel/embeddings/openai_embedding.py +27 -14
  9. camel/embeddings/sentence_transformers_embeddings.py +28 -14
  10. camel/functions/search_functions.py +5 -14
  11. camel/functions/slack_functions.py +5 -7
  12. camel/functions/twitter_function.py +3 -8
  13. camel/functions/weather_functions.py +3 -8
  14. camel/interpreters/__init__.py +2 -0
  15. camel/interpreters/docker_interpreter.py +235 -0
  16. camel/loaders/__init__.py +2 -0
  17. camel/loaders/base_io.py +5 -9
  18. camel/loaders/jina_url_reader.py +99 -0
  19. camel/loaders/unstructured_io.py +4 -6
  20. camel/models/anthropic_model.py +6 -4
  21. camel/models/litellm_model.py +49 -21
  22. camel/models/model_factory.py +1 -0
  23. camel/models/nemotron_model.py +14 -6
  24. camel/models/ollama_model.py +11 -17
  25. camel/models/openai_audio_models.py +10 -2
  26. camel/models/openai_model.py +4 -3
  27. camel/models/zhipuai_model.py +12 -6
  28. camel/retrievers/auto_retriever.py +2 -2
  29. camel/retrievers/bm25_retriever.py +3 -8
  30. camel/retrievers/cohere_rerank_retriever.py +3 -5
  31. camel/storages/__init__.py +2 -0
  32. camel/storages/graph_storages/graph_element.py +9 -1
  33. camel/storages/graph_storages/neo4j_graph.py +3 -7
  34. camel/storages/key_value_storages/__init__.py +2 -0
  35. camel/storages/key_value_storages/redis.py +169 -0
  36. camel/storages/vectordb_storages/milvus.py +3 -7
  37. camel/storages/vectordb_storages/qdrant.py +3 -7
  38. camel/toolkits/__init__.py +2 -0
  39. camel/toolkits/code_execution.py +69 -0
  40. camel/toolkits/github_toolkit.py +5 -9
  41. camel/types/enums.py +49 -20
  42. camel/utils/__init__.py +2 -2
  43. camel/utils/async_func.py +42 -0
  44. camel/utils/commons.py +31 -49
  45. camel/utils/token_counting.py +40 -1
  46. {camel_ai-0.1.5.3.dist-info → camel_ai-0.1.5.5.dist-info}/METADATA +16 -8
  47. {camel_ai-0.1.5.3.dist-info → camel_ai-0.1.5.5.dist-info}/RECORD +48 -44
  48. camel/bots/__init__.py +0 -20
  49. camel/bots/discord_bot.py +0 -103
  50. camel/bots/telegram_bot.py +0 -84
  51. {camel_ai-0.1.5.3.dist-info → camel_ai-0.1.5.5.dist-info}/WHEEL +0 -0
@@ -1,29 +1,28 @@
1
- camel/__init__.py,sha256=9lSkzCVy_evUPseFTI7wD_oMEn6wRo9aRZna06ygz5I,778
1
+ camel/__init__.py,sha256=SpC9pRp8bm5IPRCPalmZqDISaDVcj64s9RpwgxSeg9E,780
2
2
  camel/agents/__init__.py,sha256=SSU1wbhZXWwQnE0rRxkpyN57kEu72KklsZNcdLkXfTs,1551
3
3
  camel/agents/base.py,sha256=X39qWSiT1WnDqaJ9k3gQrTpOQSwUKzNEVpp5AY6fDH8,1130
4
4
  camel/agents/chat_agent.py,sha256=yeSSVTnKbRmA7DUFv2waaPz3rMM6z-Gevi0DoYQ8-Uo,27687
5
5
  camel/agents/critic_agent.py,sha256=M3XNxRS0wAs5URjc_0kvtXqUlD-KpXq3L5ADz-KCKGU,7199
6
6
  camel/agents/deductive_reasoner_agent.py,sha256=8R9hY_yCr_guq_ySuIE3eaYbiPeHVrsh6HKqIWrR0zY,13180
7
7
  camel/agents/embodied_agent.py,sha256=Mm2-wvcpduXOvsHMBcavroACyvK06Mxe6QYTf80tdfI,7160
8
- camel/agents/knowledge_graph_agent.py,sha256=WvKee0ja-vqB4L38pu7c8iqgExSTI7bgHP78D7zOpvY,8770
8
+ camel/agents/knowledge_graph_agent.py,sha256=h3LdqqX0KPPyq5v9O4WXZTdcyS2Exz5cMGZPei38ZNo,8818
9
9
  camel/agents/role_assignment_agent.py,sha256=IWfu5b2RW1gYziffskErhdmybJOusVvhb9gqLF9_5mw,4800
10
10
  camel/agents/search_agent.py,sha256=TMyV2LoBVB0hMnSex6q7xbyLRGsF_EMKxCZ8xbZBX9o,4404
11
11
  camel/agents/task_agent.py,sha256=aNpn8bYoe2VlVSlWfbV6ynI5zG9pXq6V5NcppqJGVlU,14253
12
12
  camel/agents/tool_agents/__init__.py,sha256=ulTNWU2qoFGe3pvVmCq_sdfeSX3NKZ0due66TYvsL-M,862
13
13
  camel/agents/tool_agents/base.py,sha256=nQAhfWi8a_bCgzlf5-G-tmj1fKm6AjpRc89NQkWwpnc,1399
14
14
  camel/agents/tool_agents/hugging_face_tool_agent.py,sha256=1Z5tG6f_86eL0vmtRZ-BJvoLDFFLhoHt8JtDvgat1xU,8723
15
- camel/bots/__init__.py,sha256=DGgIhb7Gr_ShnAldq-4wAXucOdSvKtiV3m6e9G10rbA,834
16
- camel/bots/discord_bot.py,sha256=y4rUyKgeowBpkMkhK29UKyE-DPfJhoouh7onqh7NzXE,3595
17
- camel/bots/telegram_bot.py,sha256=bekO5vQcd62UcyUmEbdiSMJao9CWDsu3Okb6bXXQFUg,2890
18
- camel/configs/__init__.py,sha256=9yc5rMGH_FHYCRyC89vmtozNi7RGhN8XHLXxtnIzRh4,1170
15
+ camel/configs/__init__.py,sha256=WW7R8GtyeXqBdYDNbax6XK6M1BfEByQHdYT1K3kDPMo,1383
19
16
  camel/configs/anthropic_config.py,sha256=zD7VMFUw4s7wmBlr64oSXxpEUkhp7wj9mvAd0WK2zFc,3308
20
17
  camel/configs/base_config.py,sha256=CEF8ryl_dkH6LgOhwuP5_EgjaWCUCB-E3GcMWR-2YFE,870
21
- camel/configs/litellm_config.py,sha256=6nghqAD1G7nsvW6W56LHpSKEnJyRiCLEcLgtzpPr-ac,5542
18
+ camel/configs/litellm_config.py,sha256=tfLls2XkKfmejMuPZT-_k2XzMc0GaepDy31XGzPYJ0I,4885
19
+ camel/configs/ollama_config.py,sha256=npjJMe1lIK_WpnVtSnnKzKE78i2bWb6FPPoPa-nJ3Fo,4396
22
20
  camel/configs/openai_config.py,sha256=tFEiPDQ8Cdvkfds83T7_5osNikwA3NuRGbpjV0wq4Ao,7593
21
+ camel/configs/zhipuai_config.py,sha256=5JNhOjDexD6wzOMb3-diDaCa-IYXoiU0II0QpyV7Qdo,3769
23
22
  camel/embeddings/__init__.py,sha256=9TI7392iYxrlYYerPoboDBOFvpEmP_nSSgtEjks1vJQ,1034
24
- camel/embeddings/base.py,sha256=nauXLNEJlPnk2sKigFzvNTk_RKsC_2l_EQiyPyj_ATo,2208
25
- camel/embeddings/openai_embedding.py,sha256=nlBIlbTqps34OT-ydrA1CUYOOZMJqbNSsqyjCx-16wM,2885
26
- camel/embeddings/sentence_transformers_embeddings.py,sha256=BbgrBHrT8ACrID3RCaALIfuXAHGJG9jcuWu6W-Gd93I,2372
23
+ camel/embeddings/base.py,sha256=deX70VXGmWGRAPal3HheXvMaarymRR5I1i90KPWGWXs,2196
24
+ camel/embeddings/openai_embedding.py,sha256=Eh7Hbj6bWMTrX0Tze2IgPdD3-v9aRoBeE8AifG3jF8A,3332
25
+ camel/embeddings/sentence_transformers_embeddings.py,sha256=ayYIBOADdmmhlmo1iZS8tI_mZ-rX0sxjljyQpkuftcw,2730
27
26
  camel/embeddings/vlm_embedding.py,sha256=VvD_b737snNrZTRE4ejFvWLjd_YT1DCTKl8yKIgRM-g,5436
28
27
  camel/functions/__init__.py,sha256=3d1ZI3xx67DvHeBQhQQAu7IwTohC6Sa-_EPZeDE8_50,1737
29
28
  camel/functions/google_maps_function.py,sha256=AmhlIyqkrkZF6Vb4O-wdtEKTQjRh5mMjHjS56ciGgjk,12468
@@ -56,20 +55,22 @@ camel/functions/open_api_specs/web_scraper/paths/__init__.py,sha256=f3LXNDzN2XWW
56
55
  camel/functions/open_api_specs/web_scraper/paths/scraper.py,sha256=SQGbFkshLN4xm-Ya49ssbSvaU1nFVNFYhWsEPYVeFe0,1123
57
56
  camel/functions/openai_function.py,sha256=NyN8LBKdNeWizR7SnOp6VwEQhq29OJgskFfXq8EzIFg,14948
58
57
  camel/functions/retrieval_functions.py,sha256=ZBwQhBeun86k6AnMDCpf0U-JYNaU0alDJAS1hdnumAQ,2281
59
- camel/functions/search_functions.py,sha256=tj2eM7Jc70a5tsZhKr3mWczUbK9saUAJxXTrlWKBAv8,11151
60
- camel/functions/slack_functions.py,sha256=nQ9qzaswzQ1wEFVapWzgZ2-zF2oVXNMJQ50zxBPaz_g,9100
61
- camel/functions/twitter_function.py,sha256=xL-GKU69WrcTUm3lQl1yPgJFxtBJKRmWN3zx9AfGNKI,17254
62
- camel/functions/weather_functions.py,sha256=W2jMFqxq5M7Dan7cgEpnvzBk0SV_MduMbCuvHBsgo-c,5881
58
+ camel/functions/search_functions.py,sha256=LtIGHsZLUveTMkdlaonlNoqFK_Sx1yGujdySeL1-kfg,10882
59
+ camel/functions/slack_functions.py,sha256=XQZnGHLURKcmtiqN1mxsBxdCbG4i8ArX8MnnNn91GQc,8988
60
+ camel/functions/twitter_function.py,sha256=hN8FR0bUtd0RLlCK8MFRDwFbbukYGTry9WhVKQEV_Y8,17121
61
+ camel/functions/weather_functions.py,sha256=CKBh8hS8ylUIAlEH6HlrjdgjLuzT-GM4WcvCBATMl0g,5774
63
62
  camel/generators.py,sha256=tcYDoHwSKN0rBiu7u4rWN9pb61O8OaclrNaasCqHSJM,10437
64
63
  camel/human.py,sha256=W_T7PSO-ReiJbC5JMX1wPrpt6LVFBqoNEwUdjDScG1M,4963
65
- camel/interpreters/__init__.py,sha256=iGaeff8zeVDHr_5qHGmMuDzo8gz8vnW4yA7NMhk3-hg,1040
64
+ camel/interpreters/__init__.py,sha256=rHuOgwyWDLsuRzPLZ_WZteFBb_-zp4G-xfnDP7VFRC8,1115
66
65
  camel/interpreters/base.py,sha256=JZpQmxYBflPcDerj-R6TB6nnKvhnZR3Drraxo84JuxE,1904
66
+ camel/interpreters/docker_interpreter.py,sha256=Lsq5XxcDCAvxoDcVnog8tyvKIervI5aEkPXLTLQqeh4,8441
67
67
  camel/interpreters/internal_python_interpreter.py,sha256=ZbVmSB2zvWbvvTOL0xpDlJel-I9rv13w1rP4RvtpNiE,21866
68
68
  camel/interpreters/interpreter_error.py,sha256=4pI_dKohUKcQOrqJafolyjRfOHwBUuUBXCwwD46P4wE,886
69
69
  camel/interpreters/subprocess_interpreter.py,sha256=nKxFXZJ9zGYlKdNlz6Ln7bvg65ejKZ8yAHgIFuR2WzM,6835
70
- camel/loaders/__init__.py,sha256=TYKJlSEUCajdXVWLNHBL8qQO0WYdQwut4gO-r3-SaMY,856
71
- camel/loaders/base_io.py,sha256=vhNDyjlxvxG20PTImpRrv_XxkploDUyRP43kgs31S5A,8688
72
- camel/loaders/unstructured_io.py,sha256=JE0kFouTURqjUoLz1fBfxwSVYzkULaqdNf_A1YONfS4,25403
70
+ camel/loaders/__init__.py,sha256=IeNDC84goWnYHFyuImIkwe-9nbnuFfTySXz8ghloEp0,920
71
+ camel/loaders/base_io.py,sha256=LSke5Pje3GyA9JJJMAo1Ib9P07FtTYUr3a9RG9Mzr7c,8487
72
+ camel/loaders/jina_url_reader.py,sha256=PNl3fuU_7TkmuxaDnoW5pLnOi8XRnb7wlXA4FudWIbE,3620
73
+ camel/loaders/unstructured_io.py,sha256=Y4epnItSnd7BXMdt3b9L7Q3PRTKBldX6nzgAJTG6Z5A,25363
73
74
  camel/memories/__init__.py,sha256=ml1Uj4Y_1Q2LfrTXOY38niF0x1H-N-u_zoN_VvR939U,1364
74
75
  camel/memories/agent_memories.py,sha256=XxZCNSqMy2zME-vYjy9EBpQc9WzW1vOIFwdAoxImvtY,6110
75
76
  camel/memories/base.py,sha256=kbyAmKkOfFdOKfHxwao8bIAbRSuOEXyzxPFd0NlvUCE,5003
@@ -83,17 +84,17 @@ camel/messages/__init__.py,sha256=djLvpz6AmjeLzuUSQl7J6T2O4x8MwSdcH0l9fbj_3yg,14
83
84
  camel/messages/base.py,sha256=1cyYITXxBsp2UCdOjF1Ky4W_PgRegEfitqbrF9PjUPs,13721
84
85
  camel/messages/func_message.py,sha256=CCVkbz-2pdxXV0vBETI0xt7d7uiN8zACpRI7lCnfTFQ,3841
85
86
  camel/models/__init__.py,sha256=RfAHcSSaBUAilObQIU07uICxaujjeO5EwLv4Pg0vrPc,1408
86
- camel/models/anthropic_model.py,sha256=Gaf3xVcUa3OqFHWOyi3qhiG9LIbqozhdtmJNHDGomQY,5412
87
+ camel/models/anthropic_model.py,sha256=mypGlcn2koBFf3FsgBAqOqWwxvY-c1prINr5nYvjvts,5540
87
88
  camel/models/base_model.py,sha256=TMbS44Fn-6m0OlrxYCtvwKqGUM_4Jz2y6kX-P28nOeI,4030
88
- camel/models/litellm_model.py,sha256=_f61yTPFNMrdAAKuDokLoohjuhECcwjdOjLmDoxgNJk,3942
89
- camel/models/model_factory.py,sha256=786bR7cCdqK4V5i4wUJ20PC6cKPyX9AQN7zE8PBeW0s,3878
90
- camel/models/nemotron_model.py,sha256=qaRbqEPFYR2Chp4SqdiNOOZvPjFfbLKZiQdGMEg74bc,2443
91
- camel/models/ollama_model.py,sha256=Z65KZ4R_GPV3ezAORzNQIZmu28fCF13Lb01nGwQYuMk,4488
89
+ camel/models/litellm_model.py,sha256=3o8ImWSYc_a_3rXA_y5Hh562SzNVyfCmVj9B2pMN78k,4902
90
+ camel/models/model_factory.py,sha256=EFc5_M68AVfi34VhPeftaiWfTR9dDRHUxsJ1F81RxhQ,3949
91
+ camel/models/nemotron_model.py,sha256=2Idf4wrZervxvfu6av42EKjefFtDnBb6cKnWCJUkqI4,2682
92
+ camel/models/ollama_model.py,sha256=n6Ra4virpjqEZr3rnXwFVScN4WFj3psksEPGadvyk88,4151
92
93
  camel/models/open_source_model.py,sha256=r8TGq-9xAwOANZ5s_y3fJUGAvS0zDg03RmbZ8X2ga-E,6156
93
- camel/models/openai_audio_models.py,sha256=Jpd_B-5R8d8s3qYo_0x-Ahw5icMCysGEjaDtssV34dg,9799
94
- camel/models/openai_model.py,sha256=-pW1dtDkP1WemGIzgxkYeEZ6kzGpgsFsGuF069HIeIo,4356
94
+ camel/models/openai_audio_models.py,sha256=_ddOxqzFZCVZaK6h33Z0THU6HXk2XlJTxVWquZ3oOaQ,10042
95
+ camel/models/openai_model.py,sha256=RtUxWEOO9Mn1ClXep2eVgaZxTA4cgXttndF_O-9ulgs,4403
95
96
  camel/models/stub_model.py,sha256=kyFXy9WyHgjnXDFO8Sag4q023lHGu4D0vyzfkGTSi9w,3704
96
- camel/models/zhipuai_model.py,sha256=DMpmwn6eCXwof1ASvih3NTfGxTlt5YstGEC6qrQqRJE,4484
97
+ camel/models/zhipuai_model.py,sha256=aB1bad4VxTqzlj75PtX2jIsXgiGi4tPnGPO_YVNqkck,4766
97
98
  camel/prompts/__init__.py,sha256=tvN1pz132rgjV_C4MoVrSMTqgtOP0SzdfzAPX8rjpaQ,2049
98
99
  camel/prompts/ai_society.py,sha256=ApgvIED1Z_mdsWDNc2_u35Ktp7pEKksMrOIQKo_q5cI,6306
99
100
  camel/prompts/base.py,sha256=VMde6w97zHPP03OA628wGwXhtJweoccOK1B1f3aESDo,8464
@@ -111,41 +112,44 @@ camel/prompts/translation.py,sha256=V_40Ko2is5dAOCZ8DzsHo6DO7l8_jnEV9KjCKH7GxtY,
111
112
  camel/responses/__init__.py,sha256=edtTQskOgq5obyITziRFL62HTJP9sAikAtP9vrFacEQ,795
112
113
  camel/responses/agent_responses.py,sha256=UsTZHi4jPs2wfChPQWttVNyHneoGdQtdrRouatywE4w,1714
113
114
  camel/retrievers/__init__.py,sha256=CuP3B77zl2PoF-W2y9xSkTGRzoK2J4TlUHdCtuJD8dg,1059
114
- camel/retrievers/auto_retriever.py,sha256=malgItbxMWYhg7LAw8BuZl-osmbriG7BPtzvPYxI5UE,13469
115
+ camel/retrievers/auto_retriever.py,sha256=3UPGsGXIkEclg75Fj-EbW0Y8_jrBK8Li2lA0NBn-O-8,13467
115
116
  camel/retrievers/base.py,sha256=sgqaJDwIkWluEgPBlukFN7RYZJnrp0imCAOEWm6bZ40,2646
116
- camel/retrievers/bm25_retriever.py,sha256=-aWMZBF_WqSeyk_0Gcf9x4B12ywSBwHScSzxQmFZkXw,5199
117
- camel/retrievers/cohere_rerank_retriever.py,sha256=jDAo5OxAWZBQhgH9cSo0_3h057AN4z6_oDMIy6HZvik,4142
117
+ camel/retrievers/bm25_retriever.py,sha256=qM1oCQ-fak3izEjQVn18t0aceW-W8cRKbaYPwcHrEjI,5067
118
+ camel/retrievers/cohere_rerank_retriever.py,sha256=HvnFqXpsX9EdBOab0kFLDyxxJnknPFMVxyQJQDlHbOA,4100
118
119
  camel/retrievers/vector_retriever.py,sha256=PhPIUyjffOojwYiATEY1lsCQO9yDmpc8k-R4sAt5IvY,7316
119
120
  camel/societies/__init__.py,sha256=JhGwUHjht4CewzC3shKuxmgB3oS7FIxIxmiKyhNsfIs,832
120
121
  camel/societies/babyagi_playing.py,sha256=0sDe65XbGGWQOe4I758sH-sAk1Hf82Y_qawjaEbbBXE,11791
121
122
  camel/societies/role_playing.py,sha256=C5hQIPH8gwP7_dkh65nOPplsw50lYQiYXk-aapODqMY,21983
122
- camel/storages/__init__.py,sha256=crRaZKmgvs8RCzfffREYIVo09J4q_HVu44JGb4CJMfo,1480
123
+ camel/storages/__init__.py,sha256=ghlDZ1cF3O_QxwX9xIIZ__bnHcUjh7dbAF1X_ivkofc,1551
123
124
  camel/storages/graph_storages/__init__.py,sha256=vsJZkedaCS-cLQ-KgMqio8cxXvbousBWVqzZJvlimT8,897
124
125
  camel/storages/graph_storages/base.py,sha256=-Ys1BIuz4H5FvYMZTBIjg8Cfv40CPQ-OsovwMzygEgU,2858
125
- camel/storages/graph_storages/graph_element.py,sha256=fQNxY-BHCRlTT9I_VY3NODysxW4vuqk-zjvTCMwAoH4,2356
126
- camel/storages/graph_storages/neo4j_graph.py,sha256=wvOiHLsMPN5dTIBk97oOyyAhwU7TJHxFRaMsBimt25k,22077
127
- camel/storages/key_value_storages/__init__.py,sha256=lZOFtqj1iTQ9pRB4DkCYSMyPwEwaJDVzU06kM5jxFd4,916
126
+ camel/storages/graph_storages/graph_element.py,sha256=cz3eQdSockPsJwEVo6R_X_QeuS81_x5XrZjpzK1Q7cw,2599
127
+ camel/storages/graph_storages/neo4j_graph.py,sha256=O2L6vUUaqZcOPRo-VgRSzBSUQe6IAZjVv0U2pMB6KL4,21950
128
+ camel/storages/key_value_storages/__init__.py,sha256=v3Wy3CAJNgrPyBV4miOC6TxQDL-PYdGW8HbqiYl7k00,968
128
129
  camel/storages/key_value_storages/base.py,sha256=knxni8WiyTXJ2emZQO-JIsbxw6Ei7EO6dj-bU2YCoSY,2183
129
130
  camel/storages/key_value_storages/in_memory.py,sha256=pAcKkVd7jlPS6seR31agdyjx9TNIIRMIyx497XWXwbs,1955
130
131
  camel/storages/key_value_storages/json.py,sha256=BlOhuyWbSjzKixtA5e9O0z8BFK4pi96OcPNxnFfDPQw,3471
132
+ camel/storages/key_value_storages/redis.py,sha256=nQmdVUTLL0bW3hDeX5k-V2XKv0n6wuvbBxlrBmWVbpw,5706
131
133
  camel/storages/vectordb_storages/__init__.py,sha256=hEhPyCPlzyXUsDFDzKRdLBj09rO1b5bsn76AJrDcaG4,1076
132
134
  camel/storages/vectordb_storages/base.py,sha256=BS1QPz11ZUBVtn_M7j1Q0GW0Ya_ILai4Y2o1UPW9bAM,6009
133
- camel/storages/vectordb_storages/milvus.py,sha256=0cMoLnBLG4-gdXbFK-AYlfIhCm6CPveFPl584PY7vPk,13637
134
- camel/storages/vectordb_storages/qdrant.py,sha256=fnAPhWubLWnMa7eNTmK13gLNC2j6jnP1OF_OCHZoDzE,13618
135
+ camel/storages/vectordb_storages/milvus.py,sha256=F3wBsvERSHaYpa3FaBkiKkdi6jxcrH7wDRlSQP6DXx0,13492
136
+ camel/storages/vectordb_storages/qdrant.py,sha256=k2aCM1goLS9vllcgvk8bBQJ_sHf81G0C5UcyURTDCmo,13468
135
137
  camel/terminators/__init__.py,sha256=pE7fcfDUNngdbm1BhzSQPRMXNbdd28rl9YbF4gKWwXE,997
136
138
  camel/terminators/base.py,sha256=TSkl3maNEsdjyAniJaSgFfD4UF8RQ1LwNIiGw0dN8Gg,1396
137
139
  camel/terminators/response_terminator.py,sha256=zcXuigbvlclUoBv4xcVbfU36ZohUT1RhI-rSnukloUY,4951
138
140
  camel/terminators/token_limit_terminator.py,sha256=mK30wVUnoqNAvIo-wxkqY5gUSNay2M04rsAktKqoiOI,2087
139
- camel/toolkits/__init__.py,sha256=2-z9eGt53U6_1uwMtiu0-GgU7k5iFkS3HEMXuB3Qs2A,836
141
+ camel/toolkits/__init__.py,sha256=_PA4kkQrmIT1J5b-gnOB-thYOVAZKhpqI5Vj4MIR-jE,913
140
142
  camel/toolkits/base.py,sha256=znjnZtgxA5gbT7OMnrKQF_a9FK3A7Xk5s_lP94u76vI,923
141
- camel/toolkits/github_toolkit.py,sha256=ZBShnR7Vc3xQhQiTHsiF2esyBn7JEJxldvlgg-Cnsgk,11631
143
+ camel/toolkits/code_execution.py,sha256=pwWwZQ5etSghdWUZAg5Wao7l2GC7FYHXiVJfr0tM66E,2426
144
+ camel/toolkits/github_toolkit.py,sha256=NT6gGqy5kV7AGgiJVHAuhlcZxSkTiSJu6f1sm6n-0PU,11516
142
145
  camel/types/__init__.py,sha256=ArKXATj3z_Vv4ISmROVeo6Mv3tj5kE1dTkqfgwyxVY4,1975
143
- camel/types/enums.py,sha256=qcpDy5pnI_-5LoQyWtRQeVID5X2bSCFQv7NFUjFY1lE,10909
146
+ camel/types/enums.py,sha256=77O6gCE5YWgqRIND50QMHopsgQ8Ksu5iqfaY4HbOqRU,11876
144
147
  camel/types/openai_types.py,sha256=BNQ6iCzKTjSvgcXFsAFIgrUS_YUFZBU6bDoyAp387hI,2045
145
- camel/utils/__init__.py,sha256=qFRBTiHE_QXYDSQoNecobtJYSFuNHEULx7nr00Q1S6Y,1827
146
- camel/utils/commons.py,sha256=1p50ci5bnX1sQdJG_bewGbG6WKwR220YrCr3yoJmtu0,12110
148
+ camel/utils/__init__.py,sha256=hD5gV-vYs_otMnQY0ZOuHoJ4iVkmCh2PgBCkYNgIm0Y,1817
149
+ camel/utils/async_func.py,sha256=q8t7vq_Yd_i5i0b2Mce9d7-hrH70WrtQbqa-T4wYwQU,1595
150
+ camel/utils/commons.py,sha256=J7AOOh5huQkwTvjDt_gpiXNTXnuk0yM_hdtRU8clpNE,11298
147
151
  camel/utils/constants.py,sha256=ZIw5ILfOyJFyjEAYrbJMANeg1_EZI-zMK_xVrkwALbM,1105
148
- camel/utils/token_counting.py,sha256=_eX314B0ikffz76bUwnN7xbLGnHJ3rezvesxwPNwfQ0,14410
149
- camel_ai-0.1.5.3.dist-info/METADATA,sha256=dQemzv34rEPO-VZ7CEswERffe8-Ja_MZgZ0rdWk9G0k,21608
150
- camel_ai-0.1.5.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
151
- camel_ai-0.1.5.3.dist-info/RECORD,,
152
+ camel/utils/token_counting.py,sha256=umFg9UhUpmM9Fu5nbC29UhXuc9iy8b8aKWOYGDEeRcg,15856
153
+ camel_ai-0.1.5.5.dist-info/METADATA,sha256=6y14QJuQrAcvFhszMRfROf3yB1ww3bWcFTChl0I43N8,21966
154
+ camel_ai-0.1.5.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
155
+ camel_ai-0.1.5.5.dist-info/RECORD,,
camel/bots/__init__.py DELETED
@@ -1,20 +0,0 @@
1
- # =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
2
- # Licensed under the Apache License, Version 2.0 (the “License”);
3
- # you may not use this file except in compliance with the License.
4
- # You may obtain a copy of the License at
5
- #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
- #
8
- # Unless required by applicable law or agreed to in writing, software
9
- # distributed under the License is distributed on an “AS IS” BASIS,
10
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- # See the License for the specific language governing permissions and
12
- # limitations under the License.
13
- # =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
14
- from .discord_bot import DiscordBot
15
- from .telegram_bot import TelegramBot
16
-
17
- __all__ = [
18
- 'DiscordBot',
19
- 'TelegramBot',
20
- ]
camel/bots/discord_bot.py DELETED
@@ -1,103 +0,0 @@
1
- # =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
2
- # Licensed under the Apache License, Version 2.0 (the “License”);
3
- # you may not use this file except in compliance with the License.
4
- # You may obtain a copy of the License at
5
- #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
- #
8
- # Unless required by applicable law or agreed to in writing, software
9
- # distributed under the License is distributed on an “AS IS” BASIS,
10
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- # See the License for the specific language governing permissions and
12
- # limitations under the License.
13
- # =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
14
- import os
15
- from typing import TYPE_CHECKING, List, Optional
16
-
17
- from camel.agents import ChatAgent
18
- from camel.messages import BaseMessage
19
-
20
- if TYPE_CHECKING:
21
- from discord import Message
22
-
23
-
24
- class DiscordBot:
25
- r"""Represents a Discord bot that is powered by an agent.
26
-
27
- Attributes:
28
- chat_agent (ChatAgent): Chat agent that will power the bot.
29
- channel_ids (List[int], optional): The channel IDs that the bot will
30
- listen to.
31
- discord_token (str, optional): The bot token.
32
- """
33
-
34
- def __init__(
35
- self,
36
- chat_agent: ChatAgent,
37
- channel_ids: Optional[List[int]] = None,
38
- discord_token: Optional[str] = None,
39
- ) -> None:
40
- self.chat_agent = chat_agent
41
- self.token = discord_token or os.getenv('DISCORD_TOKEN')
42
- self.channel_ids = channel_ids
43
-
44
- if not self.token:
45
- raise ValueError(
46
- "`DISCORD_TOKEN` not found in environment variables. Get it"
47
- " here: `https://discord.com/developers/applications`."
48
- )
49
-
50
- try:
51
- import discord
52
- except ImportError:
53
- raise ImportError(
54
- "Please install `discord` first. You can install it by running"
55
- " `python3 -m pip install -U discord.py`."
56
- )
57
- intents = discord.Intents.default()
58
- intents.message_content = True
59
- self.client = discord.Client(intents=intents)
60
-
61
- # Register event handlers
62
- self.client.event(self.on_ready)
63
- self.client.event(self.on_message)
64
-
65
- def run(self) -> None:
66
- r"""Start the Discord bot using its token.
67
-
68
- This method starts the Discord bot by running the client with the
69
- provided token.
70
- """
71
- self.client.run(self.token) # type: ignore[arg-type]
72
-
73
- async def on_ready(self) -> None:
74
- r"""This method is called when the bot has successfully connected to
75
- the Discord server.
76
-
77
- It prints a message indicating that the bot has logged in and displays
78
- the username of the bot.
79
- """
80
- print(f'We have logged in as {self.client.user}')
81
-
82
- async def on_message(self, message: 'Message') -> None:
83
- r"""Event handler for when a message is received.
84
-
85
- Args:
86
- message (discord.Message): The message object received.
87
- """
88
- if message.author == self.client.user:
89
- return
90
-
91
- if self.channel_ids and message.channel.id not in self.channel_ids:
92
- return
93
-
94
- if not self.client.user or not self.client.user.mentioned_in(message):
95
- return
96
-
97
- self.chat_agent.reset()
98
-
99
- user_msg = BaseMessage.make_user_message(
100
- role_name="User", content=message.content
101
- )
102
- assistant_response = self.chat_agent.step(user_msg)
103
- await message.channel.send(assistant_response.msg.content)
@@ -1,84 +0,0 @@
1
- # =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
2
- # Licensed under the Apache License, Version 2.0 (the “License”);
3
- # you may not use this file except in compliance with the License.
4
- # You may obtain a copy of the License at
5
- #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
- #
8
- # Unless required by applicable law or agreed to in writing, software
9
- # distributed under the License is distributed on an “AS IS” BASIS,
10
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- # See the License for the specific language governing permissions and
12
- # limitations under the License.
13
- # =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
14
- import os
15
- from typing import TYPE_CHECKING, Optional
16
-
17
- from camel.agents import ChatAgent
18
- from camel.messages import BaseMessage
19
-
20
- # Conditionally import telebot types only for type checking
21
- if TYPE_CHECKING:
22
- from telebot.types import Message # type: ignore[import-untyped]
23
-
24
-
25
- class TelegramBot:
26
- r"""Represents a Telegram bot that is powered by an agent.
27
-
28
- Attributes:
29
- chat_agent (ChatAgent): Chat agent that will power the bot.
30
- telegram_token (str, optional): The bot token.
31
- """
32
-
33
- def __init__(
34
- self,
35
- chat_agent: ChatAgent,
36
- telegram_token: Optional[str] = None,
37
- ) -> None:
38
- self.chat_agent = chat_agent
39
-
40
- if not telegram_token:
41
- self.token = os.getenv('TELEGRAM_TOKEN')
42
- if not self.token:
43
- raise ValueError(
44
- "`TELEGRAM_TOKEN` not found in environment variables. "
45
- "Get it from t.me/BotFather."
46
- )
47
- else:
48
- self.token = telegram_token
49
-
50
- try:
51
- import telebot # type: ignore[import-untyped]
52
- except ImportError:
53
- raise ImportError(
54
- "Please install `telegram_bot` first. "
55
- "You can install it by running "
56
- "`pip install pyTelegramBotAPI`."
57
- )
58
- self.bot = telebot.TeleBot(token=self.token)
59
-
60
- # Register the message handler within the constructor
61
- self.bot.message_handler(func=lambda message: True)(self.on_message)
62
-
63
- def run(self) -> None:
64
- r"""Start the Telegram bot."""
65
- print("Telegram bot is running...")
66
- self.bot.infinity_polling()
67
-
68
- def on_message(self, message: 'Message') -> None:
69
- r"""Handles incoming messages from the user.
70
-
71
- Args:
72
- message (types.Message): The incoming message object.
73
- """
74
- self.chat_agent.reset()
75
-
76
- if not message.text:
77
- return
78
-
79
- user_msg = BaseMessage.make_user_message(
80
- role_name="User", content=message.text
81
- )
82
- assistant_response = self.chat_agent.step(user_msg)
83
-
84
- self.bot.reply_to(message, assistant_response.msg.content)