camel-ai 0.2.3__py3-none-any.whl → 0.2.3a0__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.
- camel/__init__.py +1 -1
- camel/agents/chat_agent.py +69 -93
- camel/agents/knowledge_graph_agent.py +6 -4
- camel/bots/__init__.py +2 -16
- camel/bots/discord_bot.py +206 -0
- camel/configs/__init__.py +2 -1
- camel/configs/anthropic_config.py +5 -2
- camel/configs/base_config.py +6 -6
- camel/configs/groq_config.py +3 -2
- camel/configs/ollama_config.py +2 -1
- camel/configs/openai_config.py +23 -2
- camel/configs/samba_config.py +2 -2
- camel/configs/togetherai_config.py +1 -1
- camel/configs/vllm_config.py +1 -1
- camel/configs/zhipuai_config.py +3 -2
- camel/embeddings/openai_embedding.py +2 -2
- camel/loaders/__init__.py +0 -2
- camel/loaders/firecrawl_reader.py +3 -3
- camel/loaders/unstructured_io.py +33 -35
- camel/messages/__init__.py +0 -1
- camel/models/__init__.py +4 -2
- camel/models/anthropic_model.py +26 -32
- camel/models/azure_openai_model.py +36 -39
- camel/models/base_model.py +20 -31
- camel/models/gemini_model.py +29 -37
- camel/models/groq_model.py +23 -29
- camel/models/litellm_model.py +61 -44
- camel/models/mistral_model.py +29 -32
- camel/models/model_factory.py +76 -66
- camel/models/nemotron_model.py +23 -33
- camel/models/ollama_model.py +47 -42
- camel/models/open_source_model.py +170 -0
- camel/models/{openai_compatible_model.py → openai_compatibility_model.py} +49 -31
- camel/models/openai_model.py +29 -48
- camel/models/reka_model.py +28 -30
- camel/models/samba_model.py +177 -82
- camel/models/stub_model.py +2 -2
- camel/models/togetherai_model.py +43 -37
- camel/models/vllm_model.py +50 -43
- camel/models/zhipuai_model.py +27 -33
- camel/retrievers/auto_retriever.py +10 -28
- camel/retrievers/vector_retriever.py +47 -58
- camel/societies/babyagi_playing.py +3 -6
- camel/societies/role_playing.py +3 -5
- camel/storages/graph_storages/graph_element.py +5 -3
- camel/storages/key_value_storages/json.py +1 -6
- camel/toolkits/__init__.py +7 -20
- camel/toolkits/base.py +3 -2
- camel/toolkits/code_execution.py +7 -6
- camel/toolkits/dalle_toolkit.py +6 -6
- camel/toolkits/github_toolkit.py +10 -9
- camel/toolkits/google_maps_toolkit.py +7 -7
- camel/toolkits/linkedin_toolkit.py +7 -7
- camel/toolkits/math_toolkit.py +8 -8
- camel/toolkits/open_api_toolkit.py +5 -5
- camel/toolkits/{function_tool.py → openai_function.py} +11 -34
- camel/toolkits/reddit_toolkit.py +7 -7
- camel/toolkits/retrieval_toolkit.py +5 -5
- camel/toolkits/search_toolkit.py +9 -9
- camel/toolkits/slack_toolkit.py +11 -11
- camel/toolkits/twitter_toolkit.py +452 -378
- camel/toolkits/weather_toolkit.py +6 -6
- camel/types/__init__.py +1 -6
- camel/types/enums.py +85 -40
- camel/types/openai_types.py +0 -3
- camel/utils/__init__.py +2 -0
- camel/utils/async_func.py +7 -7
- camel/utils/commons.py +3 -32
- camel/utils/token_counting.py +212 -30
- camel/workforce/role_playing_worker.py +1 -1
- camel/workforce/single_agent_worker.py +1 -1
- camel/workforce/task_channel.py +3 -4
- camel/workforce/workforce.py +4 -4
- {camel_ai-0.2.3.dist-info → camel_ai-0.2.3a0.dist-info}/METADATA +56 -27
- {camel_ai-0.2.3.dist-info → camel_ai-0.2.3a0.dist-info}/RECORD +76 -85
- {camel_ai-0.2.3.dist-info → camel_ai-0.2.3a0.dist-info}/WHEEL +1 -1
- camel/bots/discord_app.py +0 -138
- camel/bots/slack/__init__.py +0 -30
- camel/bots/slack/models.py +0 -158
- camel/bots/slack/slack_app.py +0 -255
- camel/loaders/chunkr_reader.py +0 -163
- camel/toolkits/arxiv_toolkit.py +0 -155
- camel/toolkits/ask_news_toolkit.py +0 -653
- camel/toolkits/google_scholar_toolkit.py +0 -146
- camel/toolkits/whatsapp_toolkit.py +0 -177
- camel/types/unified_model_type.py +0 -104
- camel_ai-0.2.3.dist-info/LICENSE +0 -201
|
@@ -1,41 +1,38 @@
|
|
|
1
|
-
camel/__init__.py,sha256=
|
|
1
|
+
camel/__init__.py,sha256=lQSKaE7GqJm4K6yZtPgrzu5SimTTJ16AVlL93Pk2DuI,778
|
|
2
2
|
camel/agents/__init__.py,sha256=SSU1wbhZXWwQnE0rRxkpyN57kEu72KklsZNcdLkXfTs,1551
|
|
3
3
|
camel/agents/base.py,sha256=X39qWSiT1WnDqaJ9k3gQrTpOQSwUKzNEVpp5AY6fDH8,1130
|
|
4
|
-
camel/agents/chat_agent.py,sha256=
|
|
4
|
+
camel/agents/chat_agent.py,sha256=KwbKYfNzYSgNDHeUeBWOFUTlqVn8P8h2eHTVpeBNK8Q,43735
|
|
5
5
|
camel/agents/critic_agent.py,sha256=To-istnO-9Eb0iabdeIDrgfvkxYYfsdX9xIZiSrc3oM,7493
|
|
6
6
|
camel/agents/deductive_reasoner_agent.py,sha256=49vwglWYHgXf-VRftdMN9OFGOwqdsXyTt45PP6z-pbg,13473
|
|
7
7
|
camel/agents/embodied_agent.py,sha256=3ABuiRQXBpplKbuhPY5KNLJyKc6Z8SgXgzIges3ZwVs,7542
|
|
8
|
-
camel/agents/knowledge_graph_agent.py,sha256=
|
|
8
|
+
camel/agents/knowledge_graph_agent.py,sha256=DNfFD3qJ-xMze3hphPPn66BpeDlchlNtF-7lj_QWFNc,9011
|
|
9
9
|
camel/agents/role_assignment_agent.py,sha256=DOKQVo9unusFOLJfNKsH-8BjvS_JBK7jjyqaTF4p4IY,5094
|
|
10
10
|
camel/agents/search_agent.py,sha256=k4R29_S6GuKnqCnrccjw59MBAR0NCTeaMplI8mUnLVs,4622
|
|
11
11
|
camel/agents/task_agent.py,sha256=n9xIU3QtcptRPSuHZJ4ntQ_M_a8AvJ6U9ZRV8VaxV5A,14660
|
|
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=
|
|
16
|
-
camel/bots/
|
|
17
|
-
camel/bots/slack/__init__.py,sha256=6DvvD5-9phNWdF8fDEYWU6ZaQo6fuOkRbFp2Y-jzKpw,1061
|
|
18
|
-
camel/bots/slack/models.py,sha256=cb3rD6vWPMTremG5wiqylJL1-I6AghrdlmaihE-xFok,5149
|
|
19
|
-
camel/bots/slack/slack_app.py,sha256=umTiWpMYv65i6rV3MR2jjdwswUfWLzX1C2s1--NCRtI,9950
|
|
15
|
+
camel/bots/__init__.py,sha256=DGgIhb7Gr_ShnAldq-4wAXucOdSvKtiV3m6e9G10rbA,834
|
|
16
|
+
camel/bots/discord_bot.py,sha256=VplQA162NqSohMzpCexSsuCCx_GdhAXOnL3040Ba1uE,8138
|
|
20
17
|
camel/bots/telegram_bot.py,sha256=MM91afWKUtEZLOoybFY7LGisQJFypc_p_P8kQOUlXwg,2747
|
|
21
|
-
camel/configs/__init__.py,sha256=
|
|
22
|
-
camel/configs/anthropic_config.py,sha256=
|
|
23
|
-
camel/configs/base_config.py,sha256=
|
|
18
|
+
camel/configs/__init__.py,sha256=3SCXrA7ML8CNoOWQ1poJY6dE2e07Qxf7ACD_mdo2aJ8,2341
|
|
19
|
+
camel/configs/anthropic_config.py,sha256=DGQoPyYrayhYQ7aSjkYYGHOZ5VdQ9qahtaS0p_GpU0Q,3294
|
|
20
|
+
camel/configs/base_config.py,sha256=gjsDACMCk-hXDBk7qkeHcpbQrWy6jbp4iyzfqgghJEk,2485
|
|
24
21
|
camel/configs/gemini_config.py,sha256=qhGdWMRP87E99ApQdRrf9UyFpp2R0k6Y2n9ZV27qpzs,6879
|
|
25
|
-
camel/configs/groq_config.py,sha256
|
|
22
|
+
camel/configs/groq_config.py,sha256=-ihiO5h4N_kUSlPNeBqIlnIkLkhC7oXsC2FYyAqtKp0,5755
|
|
26
23
|
camel/configs/litellm_config.py,sha256=77k7HT-0s9Sq_g4KeDjL_MZId0Tx5TB8oupIyGQHx08,4692
|
|
27
24
|
camel/configs/mistral_config.py,sha256=G9LuY0-3S6az-8j8kpqB-4asgoaxTOsZVYeZBYJl6LI,3634
|
|
28
|
-
camel/configs/ollama_config.py,sha256=
|
|
29
|
-
camel/configs/openai_config.py,sha256=
|
|
25
|
+
camel/configs/ollama_config.py,sha256=xrT-ulqvANjIu0bVxOzN93uaKUs8e2gW1tmYK1jULEM,4357
|
|
26
|
+
camel/configs/openai_config.py,sha256=yQf7lkBcYTtCNAopow3SlZgcDMlMkiCpC5Dvhh9wb9M,7327
|
|
30
27
|
camel/configs/reka_config.py,sha256=ECYg3BT7onwZX-iKLq-5TBhCFdm70rV-9hZ_G6Ye8-k,3504
|
|
31
|
-
camel/configs/samba_config.py,sha256=
|
|
32
|
-
camel/configs/togetherai_config.py,sha256
|
|
33
|
-
camel/configs/vllm_config.py,sha256=
|
|
34
|
-
camel/configs/zhipuai_config.py,sha256=
|
|
28
|
+
camel/configs/samba_config.py,sha256=U1krJSFRaFCvNCxKxgT0zlYxifviHsdkS53hr6D_Bvg,10254
|
|
29
|
+
camel/configs/togetherai_config.py,sha256=WERo8W6yb-qy_3qa1GUckt58J5XGKwN5X_nC9baL8Cs,5663
|
|
30
|
+
camel/configs/vllm_config.py,sha256=jfeveBnlkkBHC2RFkffG6ZlTkGzkwrX_WXMwHkg36Jg,5516
|
|
31
|
+
camel/configs/zhipuai_config.py,sha256=zU8Zaj3d9d7SCFEFIkCIRNlnJw9z_oFDmIoCQKrerEM,3600
|
|
35
32
|
camel/embeddings/__init__.py,sha256=KTX6IC9b2ifKde-Yh7srSp_gNopvBwtDy8kEzazn5lE,1106
|
|
36
33
|
camel/embeddings/base.py,sha256=deX70VXGmWGRAPal3HheXvMaarymRR5I1i90KPWGWXs,2196
|
|
37
34
|
camel/embeddings/mistral_embedding.py,sha256=Ft5GYWgGXTtPS71AVut0wjGMbXPIcDPQbu7ovWRVwAQ,3241
|
|
38
|
-
camel/embeddings/openai_embedding.py,sha256=
|
|
35
|
+
camel/embeddings/openai_embedding.py,sha256=TaNTVhKkCi7-9_k4IivavLeehY7qYnhLPK9WyFuwQac,3608
|
|
39
36
|
camel/embeddings/sentence_transformers_embeddings.py,sha256=ayYIBOADdmmhlmo1iZS8tI_mZ-rX0sxjljyQpkuftcw,2730
|
|
40
37
|
camel/embeddings/vlm_embedding.py,sha256=VvD_b737snNrZTRE4ejFvWLjd_YT1DCTKl8yKIgRM-g,5436
|
|
41
38
|
camel/generators.py,sha256=tcYDoHwSKN0rBiu7u4rWN9pb61O8OaclrNaasCqHSJM,10437
|
|
@@ -47,12 +44,11 @@ camel/interpreters/internal_python_interpreter.py,sha256=ZbVmSB2zvWbvvTOL0xpDlJe
|
|
|
47
44
|
camel/interpreters/interpreter_error.py,sha256=4pI_dKohUKcQOrqJafolyjRfOHwBUuUBXCwwD46P4wE,886
|
|
48
45
|
camel/interpreters/ipython_interpreter.py,sha256=B0v1DCiq6PmOYQXXQAQBX1oOYjgJ0geLwUG9UxPR4TM,5950
|
|
49
46
|
camel/interpreters/subprocess_interpreter.py,sha256=nKxFXZJ9zGYlKdNlz6Ln7bvg65ejKZ8yAHgIFuR2WzM,6835
|
|
50
|
-
camel/loaders/__init__.py,sha256=
|
|
47
|
+
camel/loaders/__init__.py,sha256=ClE516UbyUes6Zut8CCiH0zWqFwwpgEcP9ur3dte8iU,949
|
|
51
48
|
camel/loaders/base_io.py,sha256=xzK67fqx66eYaM6fMXRJiSZfwKhFVNQmzuKURPtTzhk,10339
|
|
52
|
-
camel/loaders/
|
|
53
|
-
camel/loaders/firecrawl_reader.py,sha256=q5-6F3FUlaliyczsydI25rhWWGMzmQznngJoPW1ANgM,6697
|
|
49
|
+
camel/loaders/firecrawl_reader.py,sha256=OmnT4XdoL-naTg_nvUnN_sjiP6Xf4gdDxFUOqyQbKJo,6691
|
|
54
50
|
camel/loaders/jina_url_reader.py,sha256=ur_2Z3NFrz5AbPFi5REyZh5fISkJ9H_UZV4gtmOSO04,3607
|
|
55
|
-
camel/loaders/unstructured_io.py,sha256=
|
|
51
|
+
camel/loaders/unstructured_io.py,sha256=c2-vBhgVAWD3bJ3Gqo4nOcM5-xGc8CIMXogkc5Li9dw,17502
|
|
56
52
|
camel/memories/__init__.py,sha256=ml1Uj4Y_1Q2LfrTXOY38niF0x1H-N-u_zoN_VvR939U,1364
|
|
57
53
|
camel/memories/agent_memories.py,sha256=pzmjztFXPyNpabMWLi_-oJljMkYQvDP_s6Yq5U0hVEs,6097
|
|
58
54
|
camel/memories/base.py,sha256=kbyAmKkOfFdOKfHxwao8bIAbRSuOEXyzxPFd0NlvUCE,5003
|
|
@@ -62,29 +58,30 @@ camel/memories/blocks/vectordb_block.py,sha256=NekHoRa-8W9IKx6PPGZdhuDZiOhNxF8vX
|
|
|
62
58
|
camel/memories/context_creators/__init__.py,sha256=0uLLP3YD46gOOh39her_weJo3viHmE4IWyWBLlutnqs,806
|
|
63
59
|
camel/memories/context_creators/score_based.py,sha256=UrioLcsj4jB4Rz5mg5hYmR8UYZzoYXMCxX2PKxblhxY,5385
|
|
64
60
|
camel/memories/records.py,sha256=kcXOATDTRRo-SCAcDpsV8Ttfie7p1GcXYzuXgXKJB0E,3686
|
|
65
|
-
camel/messages/__init__.py,sha256=
|
|
61
|
+
camel/messages/__init__.py,sha256=djLvpz6AmjeLzuUSQl7J6T2O4x8MwSdcH0l9fbj_3yg,1468
|
|
66
62
|
camel/messages/base.py,sha256=694Zz19D4u-j8mmpRXwCVJ8cd2Wll6h7acbyNRofNTI,13722
|
|
67
63
|
camel/messages/func_message.py,sha256=wqVhTC81g5Fb2b_2EPsOBP3rHZBTP6o9wMiIRkN_HAE,3807
|
|
68
|
-
camel/models/__init__.py,sha256=
|
|
69
|
-
camel/models/anthropic_model.py,sha256=
|
|
70
|
-
camel/models/azure_openai_model.py,sha256=
|
|
71
|
-
camel/models/base_model.py,sha256=
|
|
72
|
-
camel/models/gemini_model.py,sha256=
|
|
73
|
-
camel/models/groq_model.py,sha256=
|
|
74
|
-
camel/models/litellm_model.py,sha256=
|
|
75
|
-
camel/models/mistral_model.py,sha256=
|
|
76
|
-
camel/models/model_factory.py,sha256=
|
|
77
|
-
camel/models/nemotron_model.py,sha256=
|
|
78
|
-
camel/models/ollama_model.py,sha256=
|
|
64
|
+
camel/models/__init__.py,sha256=CxrRisXkHgJPv7HdC6pblHuhSpDjUbUjrTdZeZ-0v7w,1971
|
|
65
|
+
camel/models/anthropic_model.py,sha256=_xhnbrMsuumB2jkuv2pVv3MFYxNE5EL5kVlZbYYBo5E,5751
|
|
66
|
+
camel/models/azure_openai_model.py,sha256=r5diPZp4XmCcZClkCqvTHB8frzRNou559j89dryKLKw,6078
|
|
67
|
+
camel/models/base_model.py,sha256=UHyAgo6GzYZNLTZD1T0C3_WmHUPoh9Qoe_SfvdI7HrU,4387
|
|
68
|
+
camel/models/gemini_model.py,sha256=h_kyD8LSpXCn2dQ4OEer5HwwEUwuTD65yRIRV4LD3Vs,7700
|
|
69
|
+
camel/models/groq_model.py,sha256=Lm1br_2FBdqNQ3pCgMNf3VnjykYzttUKnHWExEXshLo,4753
|
|
70
|
+
camel/models/litellm_model.py,sha256=5sTOzI07FsxDEW3jSK-XXBx91Yo8z9voahyCsK36U6U,5748
|
|
71
|
+
camel/models/mistral_model.py,sha256=7K0hwk4QEGtCO_Btq9v7_iLQRgg6COpdgvXxRB8rd3U,9517
|
|
72
|
+
camel/models/model_factory.py,sha256=_dQOx_MYxXih6uQOjkKR7uoIrhDcWRsMTKHbO3NLYN0,5974
|
|
73
|
+
camel/models/nemotron_model.py,sha256=2Idf4wrZervxvfu6av42EKjefFtDnBb6cKnWCJUkqI4,2682
|
|
74
|
+
camel/models/ollama_model.py,sha256=FSMwH2-856Zhxusm4B773xBBHdlD3UOw9OAuH5eTJTw,5686
|
|
75
|
+
camel/models/open_source_model.py,sha256=p5a2sCeZl5SyrgkygClndOrHEjpJxmyhE1CqKE2fZSw,6363
|
|
79
76
|
camel/models/openai_audio_models.py,sha256=_ddOxqzFZCVZaK6h33Z0THU6HXk2XlJTxVWquZ3oOaQ,10042
|
|
80
|
-
camel/models/
|
|
81
|
-
camel/models/openai_model.py,sha256=
|
|
82
|
-
camel/models/reka_model.py,sha256=
|
|
83
|
-
camel/models/samba_model.py,sha256=
|
|
84
|
-
camel/models/stub_model.py,sha256=
|
|
85
|
-
camel/models/togetherai_model.py,sha256=
|
|
86
|
-
camel/models/vllm_model.py,sha256=
|
|
87
|
-
camel/models/zhipuai_model.py,sha256=
|
|
77
|
+
camel/models/openai_compatibility_model.py,sha256=jeYBqB3xjV8jx8CJGFShkISO_TrgwubCU1WfmSiDhBY,4758
|
|
78
|
+
camel/models/openai_model.py,sha256=27NbN0bU_cAPmWjwsWceNO4zW8WS2j3P_YWNTXeg1O8,5464
|
|
79
|
+
camel/models/reka_model.py,sha256=_ERZvtkK0Gd7GUx3f4VVqqtH093clVMoJfa896t9f2M,8043
|
|
80
|
+
camel/models/samba_model.py,sha256=CgAYMIVJFAEoyCOsYS7qD_bvWhzOkvA6SD5nGBClbzE,17699
|
|
81
|
+
camel/models/stub_model.py,sha256=DuqaBsS55STSbcLJsk025Uwo_u4ixrSSKqKEoZj2ihY,3680
|
|
82
|
+
camel/models/togetherai_model.py,sha256=kUFGxb6cXUgkvMNQ0MsDKW27Udw622zt2QIVa3U7iLU,5461
|
|
83
|
+
camel/models/vllm_model.py,sha256=Q71tfFyfd1t81r1CxS6UT5KLadDYPgOt_cG_z6DHkWE,5808
|
|
84
|
+
camel/models/zhipuai_model.py,sha256=JqJDEMk6vWH-ZnKkMwdG4yDvJWf1xk4PBsp2ifSFGR0,4939
|
|
88
85
|
camel/prompts/__init__.py,sha256=O5bkcuwj2kXTkz5yDPiiMI8KN04vI8bCKG7mGE1SIdI,2326
|
|
89
86
|
camel/prompts/ai_society.py,sha256=ApgvIED1Z_mdsWDNc2_u35Ktp7pEKksMrOIQKo_q5cI,6306
|
|
90
87
|
camel/prompts/base.py,sha256=VMde6w97zHPP03OA628wGwXhtJweoccOK1B1f3aESDo,8464
|
|
@@ -104,24 +101,24 @@ camel/prompts/video_description_prompt.py,sha256=HRd3fHXftKwBm5QH7Tvm3FabgZPCoAv
|
|
|
104
101
|
camel/responses/__init__.py,sha256=edtTQskOgq5obyITziRFL62HTJP9sAikAtP9vrFacEQ,795
|
|
105
102
|
camel/responses/agent_responses.py,sha256=sGlGwXz2brWI-FpiU5EhVRpZvcfGWUmooAF0ukqAF3I,1771
|
|
106
103
|
camel/retrievers/__init__.py,sha256=CuP3B77zl2PoF-W2y9xSkTGRzoK2J4TlUHdCtuJD8dg,1059
|
|
107
|
-
camel/retrievers/auto_retriever.py,sha256=
|
|
104
|
+
camel/retrievers/auto_retriever.py,sha256=XPyECIXO7lFbHoLMPasFurYmC9Me6wa7JPKHZWYLLuo,12571
|
|
108
105
|
camel/retrievers/base.py,sha256=sgqaJDwIkWluEgPBlukFN7RYZJnrp0imCAOEWm6bZ40,2646
|
|
109
106
|
camel/retrievers/bm25_retriever.py,sha256=Dr7Yfkjw45sovI1EVNByGIMj7KERWrr8JHlh8csSF1s,5155
|
|
110
107
|
camel/retrievers/cohere_rerank_retriever.py,sha256=HvnFqXpsX9EdBOab0kFLDyxxJnknPFMVxyQJQDlHbOA,4100
|
|
111
|
-
camel/retrievers/vector_retriever.py,sha256=
|
|
108
|
+
camel/retrievers/vector_retriever.py,sha256=zVsxWrv7-69GBRzC90Bt_JuMy8rQLsUYXXn5glZgdgo,9019
|
|
112
109
|
camel/societies/__init__.py,sha256=JhGwUHjht4CewzC3shKuxmgB3oS7FIxIxmiKyhNsfIs,832
|
|
113
|
-
camel/societies/babyagi_playing.py,sha256=
|
|
114
|
-
camel/societies/role_playing.py,sha256=
|
|
110
|
+
camel/societies/babyagi_playing.py,sha256=tZTcfQrD9ECUhkqwdthsM2yFPfYGKsoAGMfTlrxt5as,11675
|
|
111
|
+
camel/societies/role_playing.py,sha256=tu6AyUPEe0j3rGNwzCCTiGqHw9RWdyTStB5JbPNvBs8,23403
|
|
115
112
|
camel/storages/__init__.py,sha256=erzsXX2rPVodgWxlV6hSjwmc4UCguzVb6m3ahBoyWu0,1623
|
|
116
113
|
camel/storages/graph_storages/__init__.py,sha256=YFwNjNYaxpKT2j5dxWZur62T8J0ZPER3DHaWGEAXgo8,954
|
|
117
114
|
camel/storages/graph_storages/base.py,sha256=-Ys1BIuz4H5FvYMZTBIjg8Cfv40CPQ-OsovwMzygEgU,2858
|
|
118
|
-
camel/storages/graph_storages/graph_element.py,sha256=
|
|
115
|
+
camel/storages/graph_storages/graph_element.py,sha256=FGYJZpS3UeSd9yyzz5KelMqbpJ6m5177PspZ8ueoQQI,2580
|
|
119
116
|
camel/storages/graph_storages/nebula_graph.py,sha256=PFLI--kgC93Nt5kPFWH2DVqwvk2GrC--dr2bzwvmeXw,18863
|
|
120
117
|
camel/storages/graph_storages/neo4j_graph.py,sha256=YAT7u2jPs5pNSO_tSwARHJyt3HqYXpbpE4ZBtv935Kg,22138
|
|
121
118
|
camel/storages/key_value_storages/__init__.py,sha256=v3Wy3CAJNgrPyBV4miOC6TxQDL-PYdGW8HbqiYl7k00,968
|
|
122
119
|
camel/storages/key_value_storages/base.py,sha256=knxni8WiyTXJ2emZQO-JIsbxw6Ei7EO6dj-bU2YCoSY,2183
|
|
123
120
|
camel/storages/key_value_storages/in_memory.py,sha256=pAcKkVd7jlPS6seR31agdyjx9TNIIRMIyx497XWXwbs,1955
|
|
124
|
-
camel/storages/key_value_storages/json.py,sha256=
|
|
121
|
+
camel/storages/key_value_storages/json.py,sha256=BlOhuyWbSjzKixtA5e9O0z8BFK4pi96OcPNxnFfDPQw,3471
|
|
125
122
|
camel/storages/key_value_storages/redis.py,sha256=nQmdVUTLL0bW3hDeX5k-V2XKv0n6wuvbBxlrBmWVbpw,5706
|
|
126
123
|
camel/storages/object_storages/__init__.py,sha256=H-0dcB_SOxn1eyg2ojq5Nk9dZQURBsPZ6u2Xw3L7_To,921
|
|
127
124
|
camel/storages/object_storages/amazon_s3.py,sha256=Sm-NqjrpaaHCOfMuaRoI7DjuzG3uFjG4d7OEfa5yQK4,7401
|
|
@@ -139,18 +136,14 @@ camel/terminators/__init__.py,sha256=pE7fcfDUNngdbm1BhzSQPRMXNbdd28rl9YbF4gKWwXE
|
|
|
139
136
|
camel/terminators/base.py,sha256=TSkl3maNEsdjyAniJaSgFfD4UF8RQ1LwNIiGw0dN8Gg,1396
|
|
140
137
|
camel/terminators/response_terminator.py,sha256=zcXuigbvlclUoBv4xcVbfU36ZohUT1RhI-rSnukloUY,4951
|
|
141
138
|
camel/terminators/token_limit_terminator.py,sha256=mK30wVUnoqNAvIo-wxkqY5gUSNay2M04rsAktKqoiOI,2087
|
|
142
|
-
camel/toolkits/__init__.py,sha256=
|
|
143
|
-
camel/toolkits/
|
|
144
|
-
camel/toolkits/
|
|
145
|
-
camel/toolkits/
|
|
146
|
-
camel/toolkits/
|
|
147
|
-
camel/toolkits/
|
|
148
|
-
camel/toolkits/
|
|
149
|
-
camel/toolkits/
|
|
150
|
-
camel/toolkits/google_maps_toolkit.py,sha256=73CrBaL_DKEWiN3eP7CdFOxX2ZQ6NuPKR7oQeAOiKZw,11954
|
|
151
|
-
camel/toolkits/google_scholar_toolkit.py,sha256=LC64ksmsgM4OR81yhAudsBR0Lq13z_TpdG9XmHi44u0,5424
|
|
152
|
-
camel/toolkits/linkedin_toolkit.py,sha256=ltKuzGclbxLBijDQcqAzYk86Ts-E4gpkrv_UiEMCpB4,7917
|
|
153
|
-
camel/toolkits/math_toolkit.py,sha256=mIpMmMg5GiMzNDeJCKQegobxmq-IINImqH8qx_WBcFg,2501
|
|
139
|
+
camel/toolkits/__init__.py,sha256=g5xQo15tx1WiR6MEHS6IXayLSnwSWk88VK7dosEG79M,2033
|
|
140
|
+
camel/toolkits/base.py,sha256=ez04Ei8jwIAws023bM19EGkOPUkQMouULqBvOKfM4kM,986
|
|
141
|
+
camel/toolkits/code_execution.py,sha256=fWBhn1_3adiv7YYuA0gJzEBlc_dYNS6_hVtDbgB-zX0,2425
|
|
142
|
+
camel/toolkits/dalle_toolkit.py,sha256=IalDFfNCz58LMRdCZNSJfLMiauHGBGN9XNRV7pzuf28,5261
|
|
143
|
+
camel/toolkits/github_toolkit.py,sha256=ZauRY-kW8nx_L6igVEF62hD16j3KhqU2r49t1j6hO78,10979
|
|
144
|
+
camel/toolkits/google_maps_toolkit.py,sha256=7kTWBp6hzh10MryFY4RLIBAWD-9fjiecHIQcRm0OsvA,11972
|
|
145
|
+
camel/toolkits/linkedin_toolkit.py,sha256=JgO8vpuum_KBijvKvDSjM9QpRPedT1azVSZHJb4EtfM,7933
|
|
146
|
+
camel/toolkits/math_toolkit.py,sha256=r-85DHvihR87DU6n_W75pecV1P9xV3Hylfp6u-ue7T4,2521
|
|
154
147
|
camel/toolkits/open_api_specs/biztoc/__init__.py,sha256=f3LXNDzN2XWWoF2D0nesG8VuEA6Zd14i2aiTDbCm5bA,708
|
|
155
148
|
camel/toolkits/open_api_specs/biztoc/ai-plugin.json,sha256=IJinQbLv5MFPGFwdN7PbOhwArFVExSEZdJspe-mOBIo,866
|
|
156
149
|
camel/toolkits/open_api_specs/biztoc/openapi.yaml,sha256=SQ2bYIWb1nVBtkBeFaOihiWQ71oZ2bzz0fCgu6igM8A,610
|
|
@@ -176,33 +169,31 @@ camel/toolkits/open_api_specs/web_scraper/ai-plugin.json,sha256=jjHvbj0DQ4AYcL9J
|
|
|
176
169
|
camel/toolkits/open_api_specs/web_scraper/openapi.yaml,sha256=u_WalQ01e8W1D27VnZviOylpGmJ-zssYrfAgkzqdoyk,2191
|
|
177
170
|
camel/toolkits/open_api_specs/web_scraper/paths/__init__.py,sha256=f3LXNDzN2XWWoF2D0nesG8VuEA6Zd14i2aiTDbCm5bA,708
|
|
178
171
|
camel/toolkits/open_api_specs/web_scraper/paths/scraper.py,sha256=SQGbFkshLN4xm-Ya49ssbSvaU1nFVNFYhWsEPYVeFe0,1123
|
|
179
|
-
camel/toolkits/open_api_toolkit.py,sha256=
|
|
180
|
-
camel/toolkits/
|
|
181
|
-
camel/toolkits/
|
|
182
|
-
camel/toolkits/
|
|
183
|
-
camel/toolkits/
|
|
184
|
-
camel/toolkits/
|
|
185
|
-
camel/toolkits/
|
|
186
|
-
camel/toolkits/
|
|
187
|
-
camel/types/__init__.py,sha256=
|
|
188
|
-
camel/types/enums.py,sha256=
|
|
189
|
-
camel/types/openai_types.py,sha256=
|
|
190
|
-
camel/
|
|
191
|
-
camel/utils/
|
|
192
|
-
camel/utils/
|
|
193
|
-
camel/utils/commons.py,sha256=Bj_QzhNddDRqKqgLBOBL9lMl0jvmbaE-YU3a72IzSjs,17533
|
|
172
|
+
camel/toolkits/open_api_toolkit.py,sha256=dwXd-msNKVAOmqF1WIkdsK8bcOjDH9rV2sT1AJy8pMY,23334
|
|
173
|
+
camel/toolkits/openai_function.py,sha256=eaE441qxLvuRKr_WrpYLGkr5P2Nav07VVdR29n76RkU,14767
|
|
174
|
+
camel/toolkits/reddit_toolkit.py,sha256=zVojG_dM_ZbU8lZDM7AnxfMsL2JVWnNYdWqvdYUwVeM,8908
|
|
175
|
+
camel/toolkits/retrieval_toolkit.py,sha256=qE1IS2WZnFtnxvj4t7eSUYMhKpK5-4ifExbIBgLEPT8,3713
|
|
176
|
+
camel/toolkits/search_toolkit.py,sha256=vXe026bQpLic09iwY5PN4RS6SXeHYBBkjfnOlJYB670,12943
|
|
177
|
+
camel/toolkits/slack_toolkit.py,sha256=gblCbN_RCsOdgo1GGUF-R8YJneNRjezJMHhYoRFjCE0,10774
|
|
178
|
+
camel/toolkits/twitter_toolkit.py,sha256=0QYLlsg4hUVev2Z0hPJHksDNHG_54IiVHsB3IxCqrXs,19741
|
|
179
|
+
camel/toolkits/weather_toolkit.py,sha256=n4YrUI_jTIH7oqH918IdHbXLgfQ2BPGIWWK8Jp8G1Uw,7054
|
|
180
|
+
camel/types/__init__.py,sha256=ArKXATj3z_Vv4ISmROVeo6Mv3tj5kE1dTkqfgwyxVY4,1975
|
|
181
|
+
camel/types/enums.py,sha256=OfxiXL7VRcIQgfEEu0gdFeHPWGQpiuXHOC86jJE47DA,17773
|
|
182
|
+
camel/types/openai_types.py,sha256=BNQ6iCzKTjSvgcXFsAFIgrUS_YUFZBU6bDoyAp387hI,2045
|
|
183
|
+
camel/utils/__init__.py,sha256=IdI9v0FetNR-nx-Hg4bmNHoYto6Xfcs_uaomksdewmo,2303
|
|
184
|
+
camel/utils/async_func.py,sha256=SLo8KPkrNKdsONvFf3KBb33EgFn4gH2EKSX1aI_LKes,1578
|
|
185
|
+
camel/utils/commons.py,sha256=kJ6-9pnt6HgERZh3DXofMUzT0FvDujvybuZG4rzjlso,16611
|
|
194
186
|
camel/utils/constants.py,sha256=8n4F8Y-DZy4z2F0hRvAq6f-d9SbS59kK5FyLrnJ3mkY,1360
|
|
195
|
-
camel/utils/token_counting.py,sha256=
|
|
187
|
+
camel/utils/token_counting.py,sha256=AVGml8X_qq3rPdzw2tc9I3n-oEkGyNH_vPsedhVtew0,21318
|
|
196
188
|
camel/workforce/__init__.py,sha256=m2KbPItARjIyKiHc_Z34joWTJ-1XnIJfQqAZEeonz2U,926
|
|
197
189
|
camel/workforce/base.py,sha256=ScUPdtMLJgvvJkGEku6rrr4gBRw3GFt3V8HlYOY5Y8A,1809
|
|
198
190
|
camel/workforce/prompts.py,sha256=0Wcu7HpiyaD_387urc2P1uY9-DN8JAdk00HSlhNWz34,6184
|
|
199
|
-
camel/workforce/role_playing_worker.py,sha256=
|
|
200
|
-
camel/workforce/single_agent_worker.py,sha256=
|
|
201
|
-
camel/workforce/task_channel.py,sha256=
|
|
191
|
+
camel/workforce/role_playing_worker.py,sha256=pKKT6MdVCPeag5s45yOzjT4Gn1u_aTbERSVw53ISBUY,7107
|
|
192
|
+
camel/workforce/single_agent_worker.py,sha256=DsibU4VkdFWuzi6mhMnT-YYm3FcVGcKfF7r1WtGii3E,3561
|
|
193
|
+
camel/workforce/task_channel.py,sha256=oQJ-qzXWBqZljwV3EdZ7Kpo7RExZfI_tqg0bop14clM,6741
|
|
202
194
|
camel/workforce/utils.py,sha256=kBrjA_k9BblJBT13kW0eQYcBDjetyjOUHMbRuh_IfPM,2270
|
|
203
195
|
camel/workforce/worker.py,sha256=oZtl3PhxgpizKy7W_wB94Qm4Z2Tw4k1SQsqAGAi_XoI,3844
|
|
204
|
-
camel/workforce/workforce.py,sha256=
|
|
205
|
-
camel_ai-0.2.
|
|
206
|
-
camel_ai-0.2.
|
|
207
|
-
camel_ai-0.2.
|
|
208
|
-
camel_ai-0.2.3.dist-info/RECORD,,
|
|
196
|
+
camel/workforce/workforce.py,sha256=lF0ZeGtol91N3kAlAFwDxnO6YYVKmZPohxNb5ezHEUc,18185
|
|
197
|
+
camel_ai-0.2.3a0.dist-info/METADATA,sha256=usnLO_QSIxLsoD6iyL09pp0ED-Z5foxzcpvclWoKWpo,25040
|
|
198
|
+
camel_ai-0.2.3a0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
199
|
+
camel_ai-0.2.3a0.dist-info/RECORD,,
|
camel/bots/discord_app.py
DELETED
|
@@ -1,138 +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 logging
|
|
15
|
-
import os
|
|
16
|
-
from typing import TYPE_CHECKING, List, Optional
|
|
17
|
-
|
|
18
|
-
from camel.utils import dependencies_required
|
|
19
|
-
|
|
20
|
-
if TYPE_CHECKING:
|
|
21
|
-
from discord import Message
|
|
22
|
-
|
|
23
|
-
logging.basicConfig(level=logging.INFO)
|
|
24
|
-
logger = logging.getLogger(__name__)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class DiscordApp:
|
|
28
|
-
r"""A class representing a Discord app that uses the `discord.py` library
|
|
29
|
-
to interact with Discord servers.
|
|
30
|
-
|
|
31
|
-
This bot can respond to messages in specific channels and only reacts to
|
|
32
|
-
messages that mention the bot.
|
|
33
|
-
|
|
34
|
-
Attributes:
|
|
35
|
-
channel_ids (Optional[List[int]]): A list of allowed channel IDs. If
|
|
36
|
-
provided, the bot will only respond to messages in these channels.
|
|
37
|
-
token (Optional[str]): The Discord bot token used for authentication.
|
|
38
|
-
"""
|
|
39
|
-
|
|
40
|
-
@dependencies_required('discord')
|
|
41
|
-
def __init__(
|
|
42
|
-
self,
|
|
43
|
-
channel_ids: Optional[List[int]] = None,
|
|
44
|
-
token: Optional[str] = None,
|
|
45
|
-
) -> None:
|
|
46
|
-
r"""Initialize the DiscordApp instance by setting up the Discord client
|
|
47
|
-
and event handlers.
|
|
48
|
-
|
|
49
|
-
Args:
|
|
50
|
-
channel_ids (Optional[List[int]]): A list of allowed channel IDs.
|
|
51
|
-
The bot will only respond to messages in these channels if
|
|
52
|
-
provided.
|
|
53
|
-
token (Optional[str]): The Discord bot token for authentication.
|
|
54
|
-
If not provided, the token will be retrieved from the
|
|
55
|
-
environment variable `DISCORD_TOKEN`.
|
|
56
|
-
|
|
57
|
-
Raises:
|
|
58
|
-
ValueError: If the `DISCORD_TOKEN` is not found in environment
|
|
59
|
-
variables.
|
|
60
|
-
"""
|
|
61
|
-
self.token = token or os.getenv('DISCORD_TOKEN')
|
|
62
|
-
self.channel_ids = channel_ids
|
|
63
|
-
|
|
64
|
-
if not self.token:
|
|
65
|
-
raise ValueError(
|
|
66
|
-
"`DISCORD_TOKEN` not found in environment variables. Get it"
|
|
67
|
-
" here: `https://discord.com/developers/applications`."
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
import discord
|
|
71
|
-
|
|
72
|
-
intents = discord.Intents.default()
|
|
73
|
-
intents.message_content = True
|
|
74
|
-
self._client = discord.Client(intents=intents)
|
|
75
|
-
|
|
76
|
-
# Register event handlers
|
|
77
|
-
self._client.event(self.on_ready)
|
|
78
|
-
self._client.event(self.on_message)
|
|
79
|
-
|
|
80
|
-
async def start(self):
|
|
81
|
-
r"""Asynchronously start the Discord bot using its token.
|
|
82
|
-
|
|
83
|
-
This method starts the bot and logs into Discord asynchronously using
|
|
84
|
-
the provided token. It should be awaited when used in an async
|
|
85
|
-
environment.
|
|
86
|
-
"""
|
|
87
|
-
await self._client.start(self.token)
|
|
88
|
-
|
|
89
|
-
def run(self) -> None:
|
|
90
|
-
r"""Start the Discord bot using its token.
|
|
91
|
-
|
|
92
|
-
This method starts the bot and logs into Discord synchronously using
|
|
93
|
-
the provided token. It blocks execution and keeps the bot running.
|
|
94
|
-
"""
|
|
95
|
-
self._client.run(self.token) # type: ignore[arg-type]
|
|
96
|
-
|
|
97
|
-
async def on_ready(self) -> None:
|
|
98
|
-
r"""Event handler that is called when the bot has successfully
|
|
99
|
-
connected to the Discord server.
|
|
100
|
-
|
|
101
|
-
When the bot is ready and logged into Discord, it prints a message
|
|
102
|
-
displaying the bot's username.
|
|
103
|
-
"""
|
|
104
|
-
logger.info(f'We have logged in as {self._client.user}')
|
|
105
|
-
|
|
106
|
-
async def on_message(self, message: 'Message') -> None:
|
|
107
|
-
r"""Event handler for processing incoming messages.
|
|
108
|
-
|
|
109
|
-
This method is called whenever a new message is received by the bot. It
|
|
110
|
-
will ignore messages sent by the bot itself, only respond to messages
|
|
111
|
-
in allowed channels (if specified), and only to messages that mention
|
|
112
|
-
the bot.
|
|
113
|
-
|
|
114
|
-
Args:
|
|
115
|
-
message (discord.Message): The message object received from
|
|
116
|
-
Discord.
|
|
117
|
-
"""
|
|
118
|
-
# If the message author is the bot itself,
|
|
119
|
-
# do not respond to this message
|
|
120
|
-
if message.author == self._client.user:
|
|
121
|
-
return
|
|
122
|
-
|
|
123
|
-
# If allowed channel IDs are provided,
|
|
124
|
-
# only respond to messages in those channels
|
|
125
|
-
if self.channel_ids and message.channel.id not in self.channel_ids:
|
|
126
|
-
return
|
|
127
|
-
|
|
128
|
-
# Only respond to messages that mention the bot
|
|
129
|
-
if not self._client.user or not self._client.user.mentioned_in(
|
|
130
|
-
message
|
|
131
|
-
):
|
|
132
|
-
return
|
|
133
|
-
|
|
134
|
-
logger.info(f"Received message: {message.content}")
|
|
135
|
-
|
|
136
|
-
@property
|
|
137
|
-
def client(self):
|
|
138
|
-
return self._client
|
camel/bots/slack/__init__.py
DELETED
|
@@ -1,30 +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 .models import (
|
|
15
|
-
SlackAppMentionEventBody,
|
|
16
|
-
SlackAppMentionEventProfile,
|
|
17
|
-
SlackAuthProfile,
|
|
18
|
-
SlackEventBody,
|
|
19
|
-
SlackEventProfile,
|
|
20
|
-
)
|
|
21
|
-
from .slack_app import SlackApp
|
|
22
|
-
|
|
23
|
-
__all__ = [
|
|
24
|
-
'SlackApp',
|
|
25
|
-
'SlackAppMentionEventBody',
|
|
26
|
-
'SlackAppMentionEventProfile',
|
|
27
|
-
'SlackAuthProfile',
|
|
28
|
-
'SlackEventBody',
|
|
29
|
-
'SlackEventProfile',
|
|
30
|
-
]
|
camel/bots/slack/models.py
DELETED
|
@@ -1,158 +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 typing import Optional
|
|
15
|
-
|
|
16
|
-
from pydantic import BaseModel
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class SlackAuthProfile(BaseModel):
|
|
20
|
-
r"""Represents the authorization profile within a Slack event.
|
|
21
|
-
|
|
22
|
-
Events will contain a single, compact authorizations field that shows one
|
|
23
|
-
installation of your app that the event is visible to.
|
|
24
|
-
In other words, lists of authorizations will be truncated to one element.
|
|
25
|
-
|
|
26
|
-
If there's more than one installing party that your app is keeping track
|
|
27
|
-
of, it's best not to rely on the single party listed in authorizations to
|
|
28
|
-
be any particular one.
|
|
29
|
-
|
|
30
|
-
To get a full list of who can see events, call the apps.event.
|
|
31
|
-
authorizations.list method after obtaining an app-level token. Read more on
|
|
32
|
-
the changes here; they have taken effect for existing apps as of
|
|
33
|
-
February 24, 2021.
|
|
34
|
-
|
|
35
|
-
References:
|
|
36
|
-
|
|
37
|
-
- https://api.slack.com/apis/events-api#authorizations
|
|
38
|
-
- https://api.slack.com/changelog/2020-09-15-events-api-truncate-authed-users#no_context
|
|
39
|
-
"""
|
|
40
|
-
|
|
41
|
-
enterprise_id: Optional[str] = None
|
|
42
|
-
"""The ID of the enterprise associated with the authorization."""
|
|
43
|
-
|
|
44
|
-
team_id: str
|
|
45
|
-
"""The ID of the team associated with the authorization."""
|
|
46
|
-
|
|
47
|
-
user_id: str
|
|
48
|
-
"""The ID of the user associated with the authorization."""
|
|
49
|
-
|
|
50
|
-
is_bot: bool
|
|
51
|
-
"""Whether the authorized user is a bot."""
|
|
52
|
-
|
|
53
|
-
is_enterprise_install: bool
|
|
54
|
-
"""Whether the authorization is for an enterprise installation."""
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
class SlackEventProfile(BaseModel):
|
|
58
|
-
r"""Represents the detailed profile of a Slack event, including user,
|
|
59
|
-
message, and context data.
|
|
60
|
-
"""
|
|
61
|
-
|
|
62
|
-
user: str
|
|
63
|
-
"""The ID of the user associated with the event."""
|
|
64
|
-
|
|
65
|
-
type: str
|
|
66
|
-
"""The type of the event (e.g., 'message')."""
|
|
67
|
-
|
|
68
|
-
ts: str
|
|
69
|
-
"""A timestamp representing when the event was triggered."""
|
|
70
|
-
|
|
71
|
-
thread_ts: Optional[str] = None
|
|
72
|
-
"""The timestamp of the parent message in a thread."""
|
|
73
|
-
|
|
74
|
-
client_msg_id: str
|
|
75
|
-
"""A unique ID generated by the client for the message (if available)."""
|
|
76
|
-
|
|
77
|
-
text: str
|
|
78
|
-
"""The message content text."""
|
|
79
|
-
|
|
80
|
-
team: str
|
|
81
|
-
"""The ID of the team that the event is associated with."""
|
|
82
|
-
|
|
83
|
-
blocks: list
|
|
84
|
-
"""The list of message blocks, providing structured information."""
|
|
85
|
-
|
|
86
|
-
channel: str
|
|
87
|
-
"""The ID of the Slack channel where the event happened."""
|
|
88
|
-
|
|
89
|
-
event_ts: str
|
|
90
|
-
"""The event-specific timestamp when it occurred."""
|
|
91
|
-
|
|
92
|
-
channel_type: Optional[str]
|
|
93
|
-
"""The type of Slack channel (e.g., 'channel', 'im')."""
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
class SlackEventBody(BaseModel):
|
|
97
|
-
r"""Represents the entire body of a Slack event, including the event
|
|
98
|
-
profile, authorization, and context.
|
|
99
|
-
"""
|
|
100
|
-
|
|
101
|
-
token: str
|
|
102
|
-
"""The token to verify the source of the event."""
|
|
103
|
-
|
|
104
|
-
team_id: str
|
|
105
|
-
"""The ID of the team where the event is happening."""
|
|
106
|
-
|
|
107
|
-
context_team_id: Optional[str]
|
|
108
|
-
"""The team ID for the shared channel context, if applicable."""
|
|
109
|
-
|
|
110
|
-
context_enterprise_id: Optional[str] = None
|
|
111
|
-
"""The enterprise ID for the shared channel context, if applicable."""
|
|
112
|
-
|
|
113
|
-
api_app_id: str
|
|
114
|
-
"""The unique identifier for the Slack app that received the event."""
|
|
115
|
-
|
|
116
|
-
event: SlackEventProfile
|
|
117
|
-
"""A detailed profile of the event"""
|
|
118
|
-
|
|
119
|
-
type: str
|
|
120
|
-
"""The overall type of event received (e.g., 'event_callback')."""
|
|
121
|
-
|
|
122
|
-
event_id: str
|
|
123
|
-
"""A unique identifier assigned to this event by Slack."""
|
|
124
|
-
|
|
125
|
-
event_time: int
|
|
126
|
-
"""The timestamp (in seconds) representing when the event was triggered."""
|
|
127
|
-
|
|
128
|
-
authorizations: Optional[list[SlackAuthProfile]] = None
|
|
129
|
-
"""An optional list of authorizations that describe which installation can
|
|
130
|
-
see the event."""
|
|
131
|
-
|
|
132
|
-
is_ext_shared_channel: bool
|
|
133
|
-
"""Indicates if the event is part of a shared channel between different
|
|
134
|
-
organizations."""
|
|
135
|
-
|
|
136
|
-
event_context: str
|
|
137
|
-
"""A unique string representing the context of the event."""
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
class SlackAppMentionEventProfile(SlackEventProfile):
|
|
141
|
-
r"""Represents the detailed profile of a Slack event where the app was
|
|
142
|
-
mentioned in a message.
|
|
143
|
-
"""
|
|
144
|
-
|
|
145
|
-
channel_type: Optional[str] = None
|
|
146
|
-
"""The type of Slack channel. it's None for app mentions."""
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
class SlackAppMentionEventBody(SlackEventBody):
|
|
150
|
-
r"""Represents the entire body of a Slack event where the app was mentioned
|
|
151
|
-
in a message.
|
|
152
|
-
"""
|
|
153
|
-
|
|
154
|
-
context_team_id: Optional[str] = None
|
|
155
|
-
"""A detailed profile of the event. it's None for app mentions."""
|
|
156
|
-
|
|
157
|
-
event: SlackAppMentionEventProfile
|
|
158
|
-
"""A detailed profile of the event"""
|