camel-ai 0.2.0__py3-none-any.whl → 0.2.3__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 +326 -115
- camel/agents/knowledge_graph_agent.py +4 -6
- camel/bots/__init__.py +34 -0
- camel/bots/discord_app.py +138 -0
- camel/bots/slack/__init__.py +30 -0
- camel/bots/slack/models.py +158 -0
- camel/bots/slack/slack_app.py +255 -0
- camel/bots/telegram_bot.py +82 -0
- camel/configs/__init__.py +1 -2
- camel/configs/anthropic_config.py +2 -5
- camel/configs/base_config.py +6 -6
- camel/configs/gemini_config.py +1 -1
- camel/configs/groq_config.py +2 -3
- camel/configs/ollama_config.py +1 -2
- camel/configs/openai_config.py +2 -23
- 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 +2 -3
- camel/embeddings/openai_embedding.py +2 -2
- camel/loaders/__init__.py +2 -0
- camel/loaders/chunkr_reader.py +163 -0
- camel/loaders/firecrawl_reader.py +13 -45
- camel/loaders/unstructured_io.py +65 -29
- camel/messages/__init__.py +1 -0
- camel/messages/func_message.py +2 -2
- camel/models/__init__.py +2 -4
- camel/models/anthropic_model.py +32 -26
- camel/models/azure_openai_model.py +39 -36
- camel/models/base_model.py +31 -20
- camel/models/gemini_model.py +37 -29
- camel/models/groq_model.py +29 -23
- camel/models/litellm_model.py +44 -61
- camel/models/mistral_model.py +33 -30
- camel/models/model_factory.py +66 -76
- camel/models/nemotron_model.py +33 -23
- camel/models/ollama_model.py +42 -47
- camel/models/{openai_compatibility_model.py → openai_compatible_model.py} +36 -41
- camel/models/openai_model.py +48 -29
- camel/models/reka_model.py +30 -28
- camel/models/samba_model.py +82 -177
- camel/models/stub_model.py +2 -2
- camel/models/togetherai_model.py +37 -43
- camel/models/vllm_model.py +43 -50
- camel/models/zhipuai_model.py +33 -27
- camel/retrievers/auto_retriever.py +28 -10
- camel/retrievers/vector_retriever.py +72 -44
- camel/societies/babyagi_playing.py +6 -3
- camel/societies/role_playing.py +17 -3
- camel/storages/__init__.py +2 -0
- camel/storages/graph_storages/__init__.py +2 -0
- camel/storages/graph_storages/graph_element.py +3 -5
- camel/storages/graph_storages/nebula_graph.py +547 -0
- camel/storages/key_value_storages/json.py +6 -1
- camel/tasks/task.py +11 -4
- camel/tasks/task_prompt.py +4 -0
- camel/toolkits/__init__.py +20 -7
- camel/toolkits/arxiv_toolkit.py +155 -0
- camel/toolkits/ask_news_toolkit.py +653 -0
- camel/toolkits/base.py +2 -3
- camel/toolkits/code_execution.py +6 -7
- camel/toolkits/dalle_toolkit.py +6 -6
- camel/toolkits/{openai_function.py → function_tool.py} +34 -11
- camel/toolkits/github_toolkit.py +9 -10
- camel/toolkits/google_maps_toolkit.py +7 -7
- camel/toolkits/google_scholar_toolkit.py +146 -0
- camel/toolkits/linkedin_toolkit.py +7 -7
- camel/toolkits/math_toolkit.py +8 -8
- camel/toolkits/open_api_toolkit.py +5 -5
- 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 +378 -452
- camel/toolkits/weather_toolkit.py +6 -6
- camel/toolkits/whatsapp_toolkit.py +177 -0
- camel/types/__init__.py +6 -1
- camel/types/enums.py +43 -85
- camel/types/openai_types.py +3 -0
- camel/types/unified_model_type.py +104 -0
- camel/utils/__init__.py +0 -2
- camel/utils/async_func.py +7 -7
- camel/utils/commons.py +40 -4
- camel/utils/token_counting.py +30 -212
- camel/workforce/__init__.py +6 -6
- camel/workforce/base.py +9 -5
- camel/workforce/prompts.py +179 -0
- camel/workforce/role_playing_worker.py +181 -0
- camel/workforce/{single_agent_node.py → single_agent_worker.py} +49 -23
- camel/workforce/task_channel.py +7 -8
- camel/workforce/utils.py +20 -50
- camel/workforce/{worker_node.py → worker.py} +15 -12
- camel/workforce/workforce.py +456 -19
- camel_ai-0.2.3.dist-info/LICENSE +201 -0
- {camel_ai-0.2.0.dist-info → camel_ai-0.2.3.dist-info}/METADATA +39 -65
- {camel_ai-0.2.0.dist-info → camel_ai-0.2.3.dist-info}/RECORD +98 -86
- {camel_ai-0.2.0.dist-info → camel_ai-0.2.3.dist-info}/WHEEL +1 -1
- camel/models/open_source_model.py +0 -170
- camel/workforce/manager_node.py +0 -299
- camel/workforce/role_playing_node.py +0 -168
- camel/workforce/workforce_prompt.py +0 -125
|
@@ -1,35 +1,41 @@
|
|
|
1
|
-
camel/__init__.py,sha256=
|
|
1
|
+
camel/__init__.py,sha256=e6dIaHw_eDU2NB2qSNz6wTWm5yNyK5keh4OzV2tPmWg,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=eA7kuzbfQkEdnvefxk6t_-MhB64ibSgSiQ54ztiqvJI,44764
|
|
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=TCj5G0pqXAK8aow7P9fYpf-V5vJeUES2fXgCpG1Eqjo,8968
|
|
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/
|
|
16
|
-
camel/
|
|
17
|
-
camel/
|
|
18
|
-
camel/
|
|
19
|
-
camel/
|
|
15
|
+
camel/bots/__init__.py,sha256=nreEUF1Udlx-nqasfLpDlSMIHpR-DQ82xg3dGSgZKLc,1184
|
|
16
|
+
camel/bots/discord_app.py,sha256=5lZtFfCfO_Q5wHe08dd2tKrCcalHHRs94-CE550DNpI,5004
|
|
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
|
|
20
|
+
camel/bots/telegram_bot.py,sha256=MM91afWKUtEZLOoybFY7LGisQJFypc_p_P8kQOUlXwg,2747
|
|
21
|
+
camel/configs/__init__.py,sha256=uWDugt92v48tg3g78fI_6J2G5wdCA7Ds5IV6HXvuXF0,2299
|
|
22
|
+
camel/configs/anthropic_config.py,sha256=ie4un-NMWARs_ALaq-0LTqcZOkft5bAS4Ybv_mfigjQ,3284
|
|
23
|
+
camel/configs/base_config.py,sha256=JBrIAGoPHjTJwsWTuyfdtMFa0TpVRsddNpSr8KgggcQ,2473
|
|
24
|
+
camel/configs/gemini_config.py,sha256=qhGdWMRP87E99ApQdRrf9UyFpp2R0k6Y2n9ZV27qpzs,6879
|
|
25
|
+
camel/configs/groq_config.py,sha256=YO3OFqAM9c7CZE0XQqKt-GfNj5iryrwR2i7WHzHX6TQ,5750
|
|
20
26
|
camel/configs/litellm_config.py,sha256=77k7HT-0s9Sq_g4KeDjL_MZId0Tx5TB8oupIyGQHx08,4692
|
|
21
27
|
camel/configs/mistral_config.py,sha256=G9LuY0-3S6az-8j8kpqB-4asgoaxTOsZVYeZBYJl6LI,3634
|
|
22
|
-
camel/configs/ollama_config.py,sha256=
|
|
23
|
-
camel/configs/openai_config.py,sha256=
|
|
28
|
+
camel/configs/ollama_config.py,sha256=4Qw5V89wljCj7ie3zI6wXL7XqdCFmRH2TzVM6uqSV1k,4354
|
|
29
|
+
camel/configs/openai_config.py,sha256=Q-V3GmU08wiXxEIqsaPSWLN1GonRVXUFt-VWUAhD0KU,6477
|
|
24
30
|
camel/configs/reka_config.py,sha256=ECYg3BT7onwZX-iKLq-5TBhCFdm70rV-9hZ_G6Ye8-k,3504
|
|
25
|
-
camel/configs/samba_config.py,sha256=
|
|
26
|
-
camel/configs/togetherai_config.py,sha256
|
|
27
|
-
camel/configs/vllm_config.py,sha256=
|
|
28
|
-
camel/configs/zhipuai_config.py,sha256=
|
|
31
|
+
camel/configs/samba_config.py,sha256=a9Y-dYkktXgIGGeEVW9NY7cCaLsBUoWsvkRlHratAZ8,10250
|
|
32
|
+
camel/configs/togetherai_config.py,sha256=-yUZWvD138PX2uvTzAv1WaFBwz5ViFeGl-S0xn7en-0,5661
|
|
33
|
+
camel/configs/vllm_config.py,sha256=zz0NlIE3Xd_2YT5iJk2OwnFvvTIVz5vMb79QUnhDf6o,5514
|
|
34
|
+
camel/configs/zhipuai_config.py,sha256=VW1s4cgT375ALk-W4SRvnJmGCNsZEtDpDb8MSi5tkqs,3595
|
|
29
35
|
camel/embeddings/__init__.py,sha256=KTX6IC9b2ifKde-Yh7srSp_gNopvBwtDy8kEzazn5lE,1106
|
|
30
36
|
camel/embeddings/base.py,sha256=deX70VXGmWGRAPal3HheXvMaarymRR5I1i90KPWGWXs,2196
|
|
31
37
|
camel/embeddings/mistral_embedding.py,sha256=Ft5GYWgGXTtPS71AVut0wjGMbXPIcDPQbu7ovWRVwAQ,3241
|
|
32
|
-
camel/embeddings/openai_embedding.py,sha256=
|
|
38
|
+
camel/embeddings/openai_embedding.py,sha256=28V5MwENVt306CTZUOgsM5-T8hrsReJJRcFlY3rRxUY,3608
|
|
33
39
|
camel/embeddings/sentence_transformers_embeddings.py,sha256=ayYIBOADdmmhlmo1iZS8tI_mZ-rX0sxjljyQpkuftcw,2730
|
|
34
40
|
camel/embeddings/vlm_embedding.py,sha256=VvD_b737snNrZTRE4ejFvWLjd_YT1DCTKl8yKIgRM-g,5436
|
|
35
41
|
camel/generators.py,sha256=tcYDoHwSKN0rBiu7u4rWN9pb61O8OaclrNaasCqHSJM,10437
|
|
@@ -41,11 +47,12 @@ camel/interpreters/internal_python_interpreter.py,sha256=ZbVmSB2zvWbvvTOL0xpDlJe
|
|
|
41
47
|
camel/interpreters/interpreter_error.py,sha256=4pI_dKohUKcQOrqJafolyjRfOHwBUuUBXCwwD46P4wE,886
|
|
42
48
|
camel/interpreters/ipython_interpreter.py,sha256=B0v1DCiq6PmOYQXXQAQBX1oOYjgJ0geLwUG9UxPR4TM,5950
|
|
43
49
|
camel/interpreters/subprocess_interpreter.py,sha256=nKxFXZJ9zGYlKdNlz6Ln7bvg65ejKZ8yAHgIFuR2WzM,6835
|
|
44
|
-
camel/loaders/__init__.py,sha256=
|
|
50
|
+
camel/loaders/__init__.py,sha256=7vhTU1SIxnTpBoiukhQARStzHmt39jaQG0dCa73zDCQ,1009
|
|
45
51
|
camel/loaders/base_io.py,sha256=xzK67fqx66eYaM6fMXRJiSZfwKhFVNQmzuKURPtTzhk,10339
|
|
46
|
-
camel/loaders/
|
|
52
|
+
camel/loaders/chunkr_reader.py,sha256=hKlvTkU-E8TOgLj3zw6wiaAuqUNF_s8o8ET-Kr4kk4g,6074
|
|
53
|
+
camel/loaders/firecrawl_reader.py,sha256=q5-6F3FUlaliyczsydI25rhWWGMzmQznngJoPW1ANgM,6697
|
|
47
54
|
camel/loaders/jina_url_reader.py,sha256=ur_2Z3NFrz5AbPFi5REyZh5fISkJ9H_UZV4gtmOSO04,3607
|
|
48
|
-
camel/loaders/unstructured_io.py,sha256=
|
|
55
|
+
camel/loaders/unstructured_io.py,sha256=XtaBr_teAyYbWCunwcwmetlLK25c8jzqr0jF3PGCC40,17435
|
|
49
56
|
camel/memories/__init__.py,sha256=ml1Uj4Y_1Q2LfrTXOY38niF0x1H-N-u_zoN_VvR939U,1364
|
|
50
57
|
camel/memories/agent_memories.py,sha256=pzmjztFXPyNpabMWLi_-oJljMkYQvDP_s6Yq5U0hVEs,6097
|
|
51
58
|
camel/memories/base.py,sha256=kbyAmKkOfFdOKfHxwao8bIAbRSuOEXyzxPFd0NlvUCE,5003
|
|
@@ -55,30 +62,29 @@ camel/memories/blocks/vectordb_block.py,sha256=NekHoRa-8W9IKx6PPGZdhuDZiOhNxF8vX
|
|
|
55
62
|
camel/memories/context_creators/__init__.py,sha256=0uLLP3YD46gOOh39her_weJo3viHmE4IWyWBLlutnqs,806
|
|
56
63
|
camel/memories/context_creators/score_based.py,sha256=UrioLcsj4jB4Rz5mg5hYmR8UYZzoYXMCxX2PKxblhxY,5385
|
|
57
64
|
camel/memories/records.py,sha256=kcXOATDTRRo-SCAcDpsV8Ttfie7p1GcXYzuXgXKJB0E,3686
|
|
58
|
-
camel/messages/__init__.py,sha256=
|
|
65
|
+
camel/messages/__init__.py,sha256=_aaXdZyuSI-KLZLEGtzXyUBAuDRO2cuWbHkD1udj2qU,1497
|
|
59
66
|
camel/messages/base.py,sha256=694Zz19D4u-j8mmpRXwCVJ8cd2Wll6h7acbyNRofNTI,13722
|
|
60
|
-
camel/messages/func_message.py,sha256=
|
|
61
|
-
camel/models/__init__.py,sha256=
|
|
62
|
-
camel/models/anthropic_model.py,sha256=
|
|
63
|
-
camel/models/azure_openai_model.py,sha256=
|
|
64
|
-
camel/models/base_model.py,sha256=
|
|
65
|
-
camel/models/gemini_model.py,sha256=
|
|
66
|
-
camel/models/groq_model.py,sha256=
|
|
67
|
-
camel/models/litellm_model.py,sha256=
|
|
68
|
-
camel/models/mistral_model.py,sha256=
|
|
69
|
-
camel/models/model_factory.py,sha256=
|
|
70
|
-
camel/models/nemotron_model.py,sha256=
|
|
71
|
-
camel/models/ollama_model.py,sha256=
|
|
72
|
-
camel/models/open_source_model.py,sha256=p5a2sCeZl5SyrgkygClndOrHEjpJxmyhE1CqKE2fZSw,6363
|
|
67
|
+
camel/messages/func_message.py,sha256=wqVhTC81g5Fb2b_2EPsOBP3rHZBTP6o9wMiIRkN_HAE,3807
|
|
68
|
+
camel/models/__init__.py,sha256=7n9D48hxzr8tG4umKDENsSU6p8ihBhFrL12gBkGny1k,1892
|
|
69
|
+
camel/models/anthropic_model.py,sha256=MpwHqBSO5UUnnvWB52lw4aUSmL4sIXHAmYLNoBsL0_w,6073
|
|
70
|
+
camel/models/azure_openai_model.py,sha256=X_ivrvBh2jIilmTmFP56reHkbf_LlJbYL0OYfcnapbE,6175
|
|
71
|
+
camel/models/base_model.py,sha256=YW00vyLFG8WuIKtdfjrtLDSkzaw3Hvkv5PhsPhVQ4hY,4801
|
|
72
|
+
camel/models/gemini_model.py,sha256=PkmjwbPmuI1r5_bWL_yI96FjbR-EzW8uTL_9GuDMn5U,8078
|
|
73
|
+
camel/models/groq_model.py,sha256=N8he05SLAjPLajjA3S6U3qJ9cHE17nCcVScpYiSpGrA,4969
|
|
74
|
+
camel/models/litellm_model.py,sha256=V1MKO9QRzJsFbemuLEt9XOG96-U8W7mo7HaV507Ja7o,5302
|
|
75
|
+
camel/models/mistral_model.py,sha256=bdkn2IYjDpqyKtIMk93Pr3pLZEkxy5rNLnlmDvYiaMk,9778
|
|
76
|
+
camel/models/model_factory.py,sha256=syADEJfPcbQUd4TWUWzMH1EK-RcjqbzcgLQ7YNhLrdY,5333
|
|
77
|
+
camel/models/nemotron_model.py,sha256=ZHKffxPxHmKxyKNIEVEgpWgRjeRvDWmyQ7rHPDERQyE,2911
|
|
78
|
+
camel/models/ollama_model.py,sha256=EH5B3QVxogCUR3J7S066lO0qXkRPY9vJGtPMZYCyrSg,5580
|
|
73
79
|
camel/models/openai_audio_models.py,sha256=_ddOxqzFZCVZaK6h33Z0THU6HXk2XlJTxVWquZ3oOaQ,10042
|
|
74
|
-
camel/models/
|
|
75
|
-
camel/models/openai_model.py,sha256=
|
|
76
|
-
camel/models/reka_model.py,sha256=
|
|
77
|
-
camel/models/samba_model.py,sha256=
|
|
78
|
-
camel/models/stub_model.py,sha256=
|
|
79
|
-
camel/models/togetherai_model.py,sha256=
|
|
80
|
-
camel/models/vllm_model.py,sha256=
|
|
81
|
-
camel/models/zhipuai_model.py,sha256=
|
|
80
|
+
camel/models/openai_compatible_model.py,sha256=ToABSdpKaqmLsQeGlGUCwZoT2UvLIyVEYfMzxOumumY,4064
|
|
81
|
+
camel/models/openai_model.py,sha256=3RC-8GsI0dTY3zu9JZQCdgNTQq5UFPrVCUYfxTcYeug,6089
|
|
82
|
+
camel/models/reka_model.py,sha256=KZYNQFN2Wey0qe7i25yo7YIW5ciTH03fnxXZk-UaYWk,8283
|
|
83
|
+
camel/models/samba_model.py,sha256=4C9XrhLD6VQbTFkO1nYkED_J2lbwE7sS4K2r23dec2I,14400
|
|
84
|
+
camel/models/stub_model.py,sha256=ewwO7AMQ3BbbO7Yk8wkVVXWy27yv9aNgxu4QU_e-ZWE,3709
|
|
85
|
+
camel/models/togetherai_model.py,sha256=gEf8r2d5z4hPqvW8TKiyMOja9iWrNTwdSk9ljiYzFsQ,5251
|
|
86
|
+
camel/models/vllm_model.py,sha256=eUUZOeyuBIrGKhbJg0slpwPCGHcr30EJWhL8kF3Zu3w,5655
|
|
87
|
+
camel/models/zhipuai_model.py,sha256=DFKxs_JRoeKPNaB3mEeoMrHieLu9RvAze8WQw0_QrGk,5126
|
|
82
88
|
camel/prompts/__init__.py,sha256=O5bkcuwj2kXTkz5yDPiiMI8KN04vI8bCKG7mGE1SIdI,2326
|
|
83
89
|
camel/prompts/ai_society.py,sha256=ApgvIED1Z_mdsWDNc2_u35Ktp7pEKksMrOIQKo_q5cI,6306
|
|
84
90
|
camel/prompts/base.py,sha256=VMde6w97zHPP03OA628wGwXhtJweoccOK1B1f3aESDo,8464
|
|
@@ -98,23 +104,24 @@ camel/prompts/video_description_prompt.py,sha256=HRd3fHXftKwBm5QH7Tvm3FabgZPCoAv
|
|
|
98
104
|
camel/responses/__init__.py,sha256=edtTQskOgq5obyITziRFL62HTJP9sAikAtP9vrFacEQ,795
|
|
99
105
|
camel/responses/agent_responses.py,sha256=sGlGwXz2brWI-FpiU5EhVRpZvcfGWUmooAF0ukqAF3I,1771
|
|
100
106
|
camel/retrievers/__init__.py,sha256=CuP3B77zl2PoF-W2y9xSkTGRzoK2J4TlUHdCtuJD8dg,1059
|
|
101
|
-
camel/retrievers/auto_retriever.py,sha256=
|
|
107
|
+
camel/retrievers/auto_retriever.py,sha256=WJ1b-xOGu13nSqb1Sz5gs0xVRvVnbp71Lp9lXJ2Yq2Y,13010
|
|
102
108
|
camel/retrievers/base.py,sha256=sgqaJDwIkWluEgPBlukFN7RYZJnrp0imCAOEWm6bZ40,2646
|
|
103
109
|
camel/retrievers/bm25_retriever.py,sha256=Dr7Yfkjw45sovI1EVNByGIMj7KERWrr8JHlh8csSF1s,5155
|
|
104
110
|
camel/retrievers/cohere_rerank_retriever.py,sha256=HvnFqXpsX9EdBOab0kFLDyxxJnknPFMVxyQJQDlHbOA,4100
|
|
105
|
-
camel/retrievers/vector_retriever.py,sha256=
|
|
111
|
+
camel/retrievers/vector_retriever.py,sha256=8ICL6lNiqv2fSk_Z4SYek3x_xYkYAsV9wAO0ibzex_E,9588
|
|
106
112
|
camel/societies/__init__.py,sha256=JhGwUHjht4CewzC3shKuxmgB3oS7FIxIxmiKyhNsfIs,832
|
|
107
|
-
camel/societies/babyagi_playing.py,sha256=
|
|
108
|
-
camel/societies/role_playing.py,sha256=
|
|
109
|
-
camel/storages/__init__.py,sha256=
|
|
110
|
-
camel/storages/graph_storages/__init__.py,sha256=
|
|
113
|
+
camel/societies/babyagi_playing.py,sha256=z0nKqtq4374BLN-eGNTf07OcTPmJtRO4avTDkbeaOHg,11788
|
|
114
|
+
camel/societies/role_playing.py,sha256=LSkYqNAFcKn9JNFLIEfoUTNP7cYeXaIzaIHcha9IM9Q,23469
|
|
115
|
+
camel/storages/__init__.py,sha256=erzsXX2rPVodgWxlV6hSjwmc4UCguzVb6m3ahBoyWu0,1623
|
|
116
|
+
camel/storages/graph_storages/__init__.py,sha256=YFwNjNYaxpKT2j5dxWZur62T8J0ZPER3DHaWGEAXgo8,954
|
|
111
117
|
camel/storages/graph_storages/base.py,sha256=-Ys1BIuz4H5FvYMZTBIjg8Cfv40CPQ-OsovwMzygEgU,2858
|
|
112
|
-
camel/storages/graph_storages/graph_element.py,sha256=
|
|
118
|
+
camel/storages/graph_storages/graph_element.py,sha256=iUpX1A9QMdCnaoqTuqDBRiulNkvXPEsetPzh_h2ruAU,2580
|
|
119
|
+
camel/storages/graph_storages/nebula_graph.py,sha256=PFLI--kgC93Nt5kPFWH2DVqwvk2GrC--dr2bzwvmeXw,18863
|
|
113
120
|
camel/storages/graph_storages/neo4j_graph.py,sha256=YAT7u2jPs5pNSO_tSwARHJyt3HqYXpbpE4ZBtv935Kg,22138
|
|
114
121
|
camel/storages/key_value_storages/__init__.py,sha256=v3Wy3CAJNgrPyBV4miOC6TxQDL-PYdGW8HbqiYl7k00,968
|
|
115
122
|
camel/storages/key_value_storages/base.py,sha256=knxni8WiyTXJ2emZQO-JIsbxw6Ei7EO6dj-bU2YCoSY,2183
|
|
116
123
|
camel/storages/key_value_storages/in_memory.py,sha256=pAcKkVd7jlPS6seR31agdyjx9TNIIRMIyx497XWXwbs,1955
|
|
117
|
-
camel/storages/key_value_storages/json.py,sha256=
|
|
124
|
+
camel/storages/key_value_storages/json.py,sha256=xc06GNFwsdz0rMqMhaNG5OpAETfvGyormwzuATeH9RY,3492
|
|
118
125
|
camel/storages/key_value_storages/redis.py,sha256=nQmdVUTLL0bW3hDeX5k-V2XKv0n6wuvbBxlrBmWVbpw,5706
|
|
119
126
|
camel/storages/object_storages/__init__.py,sha256=H-0dcB_SOxn1eyg2ojq5Nk9dZQURBsPZ6u2Xw3L7_To,921
|
|
120
127
|
camel/storages/object_storages/amazon_s3.py,sha256=Sm-NqjrpaaHCOfMuaRoI7DjuzG3uFjG4d7OEfa5yQK4,7401
|
|
@@ -126,20 +133,24 @@ camel/storages/vectordb_storages/base.py,sha256=XNRv6CFg1rb9G_hZhUmN4t9XCU9rCakH
|
|
|
126
133
|
camel/storages/vectordb_storages/milvus.py,sha256=EkwaG3bq7djektSI2jdSTccE7GjBpZruqXQoPTxtyoo,13489
|
|
127
134
|
camel/storages/vectordb_storages/qdrant.py,sha256=lG_tOdjfTybSUNluQ1TEqYX96dSMrVSPg6HjO6Uzw7I,13439
|
|
128
135
|
camel/tasks/__init__.py,sha256=g8_UAa4WmhaesYtzAUMW7m3mg-3ILEUvTaB7eOU9-3I,912
|
|
129
|
-
camel/tasks/task.py,sha256=
|
|
130
|
-
camel/tasks/task_prompt.py,sha256=
|
|
136
|
+
camel/tasks/task.py,sha256=ptVnC1cbY6einAPf7_p8AV5d04IcTsvv7gay_qmKJ48,12817
|
|
137
|
+
camel/tasks/task_prompt.py,sha256=iQRzCe6YoOH29ktjp5iOsE_qbWCNljV0HyaWmNsHH2s,2156
|
|
131
138
|
camel/terminators/__init__.py,sha256=pE7fcfDUNngdbm1BhzSQPRMXNbdd28rl9YbF4gKWwXE,997
|
|
132
139
|
camel/terminators/base.py,sha256=TSkl3maNEsdjyAniJaSgFfD4UF8RQ1LwNIiGw0dN8Gg,1396
|
|
133
140
|
camel/terminators/response_terminator.py,sha256=zcXuigbvlclUoBv4xcVbfU36ZohUT1RhI-rSnukloUY,4951
|
|
134
141
|
camel/terminators/token_limit_terminator.py,sha256=mK30wVUnoqNAvIo-wxkqY5gUSNay2M04rsAktKqoiOI,2087
|
|
135
|
-
camel/toolkits/__init__.py,sha256=
|
|
136
|
-
camel/toolkits/
|
|
137
|
-
camel/toolkits/
|
|
138
|
-
camel/toolkits/
|
|
139
|
-
camel/toolkits/
|
|
140
|
-
camel/toolkits/
|
|
141
|
-
camel/toolkits/
|
|
142
|
-
camel/toolkits/
|
|
142
|
+
camel/toolkits/__init__.py,sha256=8B4vrtjaOaBhEeQekbxoVSLTds0Am3CjWFeADkUaCyg,2415
|
|
143
|
+
camel/toolkits/arxiv_toolkit.py,sha256=puM9SvpbitvAn0p6v9DexO307suAP_Fcq4b5V9t4MfE,5672
|
|
144
|
+
camel/toolkits/ask_news_toolkit.py,sha256=6imOAdQ2kur6U99xmCPFM7m_HcgQLqSeMWLb_u5t25A,23524
|
|
145
|
+
camel/toolkits/base.py,sha256=seVhKQIkPWSADIn81CVAeYGJvrtFdnthPjRe6T7Xpxc,979
|
|
146
|
+
camel/toolkits/code_execution.py,sha256=-jBubEBsVPCjGTOXIVTj0kXntajqB98J0NPLlB6Xu6M,2426
|
|
147
|
+
camel/toolkits/dalle_toolkit.py,sha256=osyBhZy_HYPAJvLsQk4PIo6w2by1RRn3D-gUZMEdv3I,5247
|
|
148
|
+
camel/toolkits/function_tool.py,sha256=OwAC6Eca_QaYf0DKS2BSBM7eA71-dWBpKi77TbL3_2E,15508
|
|
149
|
+
camel/toolkits/github_toolkit.py,sha256=pWXf0z_SFZPfANwKycNmnENT6aEk4tADMjqAW_eUhgE,10972
|
|
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
|
|
143
154
|
camel/toolkits/open_api_specs/biztoc/__init__.py,sha256=f3LXNDzN2XWWoF2D0nesG8VuEA6Zd14i2aiTDbCm5bA,708
|
|
144
155
|
camel/toolkits/open_api_specs/biztoc/ai-plugin.json,sha256=IJinQbLv5MFPGFwdN7PbOhwArFVExSEZdJspe-mOBIo,866
|
|
145
156
|
camel/toolkits/open_api_specs/biztoc/openapi.yaml,sha256=SQ2bYIWb1nVBtkBeFaOihiWQ71oZ2bzz0fCgu6igM8A,610
|
|
@@ -165,32 +176,33 @@ camel/toolkits/open_api_specs/web_scraper/ai-plugin.json,sha256=jjHvbj0DQ4AYcL9J
|
|
|
165
176
|
camel/toolkits/open_api_specs/web_scraper/openapi.yaml,sha256=u_WalQ01e8W1D27VnZviOylpGmJ-zssYrfAgkzqdoyk,2191
|
|
166
177
|
camel/toolkits/open_api_specs/web_scraper/paths/__init__.py,sha256=f3LXNDzN2XWWoF2D0nesG8VuEA6Zd14i2aiTDbCm5bA,708
|
|
167
178
|
camel/toolkits/open_api_specs/web_scraper/paths/scraper.py,sha256=SQGbFkshLN4xm-Ya49ssbSvaU1nFVNFYhWsEPYVeFe0,1123
|
|
168
|
-
camel/toolkits/open_api_toolkit.py,sha256=
|
|
169
|
-
camel/toolkits/
|
|
170
|
-
camel/toolkits/
|
|
171
|
-
camel/toolkits/
|
|
172
|
-
camel/toolkits/
|
|
173
|
-
camel/toolkits/
|
|
174
|
-
camel/toolkits/
|
|
175
|
-
camel/toolkits/
|
|
176
|
-
camel/types/__init__.py,sha256=
|
|
177
|
-
camel/types/enums.py,sha256=
|
|
178
|
-
camel/types/openai_types.py,sha256=
|
|
179
|
-
camel/
|
|
180
|
-
camel/utils/
|
|
181
|
-
camel/utils/
|
|
179
|
+
camel/toolkits/open_api_toolkit.py,sha256=XDQrKmtgS489lVoxex5lpFoto1ATLH4v_ROsu0FERGA,23322
|
|
180
|
+
camel/toolkits/reddit_toolkit.py,sha256=zCmZcQfliFokXWuBHmf2kirv17KqHQGXOxP2PbtVeEY,8892
|
|
181
|
+
camel/toolkits/retrieval_toolkit.py,sha256=FSl1zWjUHZvfFttX7q0FqjMDXw15rd2D2-zzE9T2JdE,3701
|
|
182
|
+
camel/toolkits/search_toolkit.py,sha256=IR9pfeh7aNf687Tp9ORzOC_a7T9jWnkT20YKVYS-dvk,12921
|
|
183
|
+
camel/toolkits/slack_toolkit.py,sha256=ko_zHDRssMmW4vouXIeKAB9Q2j4siktPo_GFui5GfNw,10750
|
|
184
|
+
camel/toolkits/twitter_toolkit.py,sha256=6EoyecIhclpmaOZvjKRbAy9hw6Y6Wkl5Di15-AVn3kA,15517
|
|
185
|
+
camel/toolkits/weather_toolkit.py,sha256=argNmFaHeXP0oqYTaFWPSTH-b2x0u7kEfkJTHaXEdV4,7038
|
|
186
|
+
camel/toolkits/whatsapp_toolkit.py,sha256=NC1nSgsmOU4jVjqrJoKz6w0e99aJg8fKp4M--JOR9sM,6338
|
|
187
|
+
camel/types/__init__.py,sha256=7DQOBYiB5WN7XPVyWeozXfnhujUNEdsdsmWJ7E1JzjE,2087
|
|
188
|
+
camel/types/enums.py,sha256=jtk4xdBPDMF2CVDaQxPobigTTtE8AanWtcmPQFJV4RQ,16001
|
|
189
|
+
camel/types/openai_types.py,sha256=q3EIk0ovQXDcmhScr0VNTIoRvmoNuwMWVtTmcBAmJsg,2133
|
|
190
|
+
camel/types/unified_model_type.py,sha256=jZe4ZcApIXsGNKi2vBFAYRIRw6mtADX_xoW6SOfMgl0,3453
|
|
191
|
+
camel/utils/__init__.py,sha256=5s6ExvqQY7LXTF8WHpDvGZJKLh74DcLZVPOz4NDIu8g,2245
|
|
192
|
+
camel/utils/async_func.py,sha256=_N3HIrQ9QagXjHzgTd_OKHDlmi059yPw2_lf8Pb6NHQ,1562
|
|
193
|
+
camel/utils/commons.py,sha256=Bj_QzhNddDRqKqgLBOBL9lMl0jvmbaE-YU3a72IzSjs,17533
|
|
182
194
|
camel/utils/constants.py,sha256=8n4F8Y-DZy4z2F0hRvAq6f-d9SbS59kK5FyLrnJ3mkY,1360
|
|
183
|
-
camel/utils/token_counting.py,sha256=
|
|
184
|
-
camel/workforce/__init__.py,sha256=
|
|
185
|
-
camel/workforce/base.py,sha256=
|
|
186
|
-
camel/workforce/
|
|
187
|
-
camel/workforce/
|
|
188
|
-
camel/workforce/
|
|
189
|
-
camel/workforce/task_channel.py,sha256=
|
|
190
|
-
camel/workforce/utils.py,sha256=
|
|
191
|
-
camel/workforce/
|
|
192
|
-
camel/workforce/workforce.py,sha256=
|
|
193
|
-
|
|
194
|
-
camel_ai-0.2.
|
|
195
|
-
camel_ai-0.2.
|
|
196
|
-
camel_ai-0.2.
|
|
195
|
+
camel/utils/token_counting.py,sha256=6mc5PmyN5sOP02u02r7Jjxki75hjk9z1KPaIx_0wFmY,14624
|
|
196
|
+
camel/workforce/__init__.py,sha256=m2KbPItARjIyKiHc_Z34joWTJ-1XnIJfQqAZEeonz2U,926
|
|
197
|
+
camel/workforce/base.py,sha256=ScUPdtMLJgvvJkGEku6rrr4gBRw3GFt3V8HlYOY5Y8A,1809
|
|
198
|
+
camel/workforce/prompts.py,sha256=0Wcu7HpiyaD_387urc2P1uY9-DN8JAdk00HSlhNWz34,6184
|
|
199
|
+
camel/workforce/role_playing_worker.py,sha256=CIo_akfzeCvOovfDXR847DGR1FQ8jm28koiayuCsNzM,7109
|
|
200
|
+
camel/workforce/single_agent_worker.py,sha256=k6QFoKwTfdzfn6_kYqaDhQA2gLytF6aKZf8Z_ZW_Gvw,3563
|
|
201
|
+
camel/workforce/task_channel.py,sha256=WE3SHp5TKaXDzKnoul9KPfk-PkBMcGT6akVId0RtWpY,6724
|
|
202
|
+
camel/workforce/utils.py,sha256=kBrjA_k9BblJBT13kW0eQYcBDjetyjOUHMbRuh_IfPM,2270
|
|
203
|
+
camel/workforce/worker.py,sha256=oZtl3PhxgpizKy7W_wB94Qm4Z2Tw4k1SQsqAGAi_XoI,3844
|
|
204
|
+
camel/workforce/workforce.py,sha256=IV911OlzSng_qR8KafFlDvkUEzEFa6A_upTgi8kZKxI,18191
|
|
205
|
+
camel_ai-0.2.3.dist-info/LICENSE,sha256=id0nB2my5kG0xXeimIu5zZrbHLS6EQvxvkKkzIHaT2k,11343
|
|
206
|
+
camel_ai-0.2.3.dist-info/METADATA,sha256=ge3aCDlzzFjI89SvPI5CQA-WYSIs1orbBLq8Sg7aW_Q,23181
|
|
207
|
+
camel_ai-0.2.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
208
|
+
camel_ai-0.2.3.dist-info/RECORD,,
|
|
@@ -1,170 +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 Any, Dict, List, Optional, Union
|
|
15
|
-
|
|
16
|
-
from openai import OpenAI, Stream
|
|
17
|
-
|
|
18
|
-
from camel.configs import OPENAI_API_PARAMS
|
|
19
|
-
from camel.messages import OpenAIMessage
|
|
20
|
-
from camel.models import BaseModelBackend
|
|
21
|
-
from camel.types import ChatCompletion, ChatCompletionChunk, ModelType
|
|
22
|
-
from camel.utils import (
|
|
23
|
-
BaseTokenCounter,
|
|
24
|
-
OpenSourceTokenCounter,
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class OpenSourceModel(BaseModelBackend):
|
|
29
|
-
r"""Class for interace with OpenAI-API-compatible servers running
|
|
30
|
-
open-source models.
|
|
31
|
-
"""
|
|
32
|
-
|
|
33
|
-
def __init__(
|
|
34
|
-
self,
|
|
35
|
-
model_type: ModelType,
|
|
36
|
-
model_config_dict: Dict[str, Any],
|
|
37
|
-
api_key: Optional[str] = None,
|
|
38
|
-
url: Optional[str] = None,
|
|
39
|
-
token_counter: Optional[BaseTokenCounter] = None,
|
|
40
|
-
) -> None:
|
|
41
|
-
r"""Constructor for model backends of Open-source models.
|
|
42
|
-
|
|
43
|
-
Args:
|
|
44
|
-
model_type (ModelType): Model for which a backend is created.
|
|
45
|
-
model_config_dict (Dict[str, Any]): A dictionary that will
|
|
46
|
-
be fed into :obj:`openai.ChatCompletion.create()`.
|
|
47
|
-
api_key (Optional[str]): The API key for authenticating with the
|
|
48
|
-
model service. (ignored for open-source models)
|
|
49
|
-
url (Optional[str]): The url to the model service.
|
|
50
|
-
token_counter (Optional[BaseTokenCounter]): Token counter to use
|
|
51
|
-
for the model. If not provided, `OpenSourceTokenCounter` will
|
|
52
|
-
be used.
|
|
53
|
-
"""
|
|
54
|
-
super().__init__(
|
|
55
|
-
model_type, model_config_dict, api_key, url, token_counter
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
# Check whether the input model type is open-source
|
|
59
|
-
if not model_type.is_open_source:
|
|
60
|
-
raise ValueError(
|
|
61
|
-
f"Model `{model_type}` is not a supported open-source model."
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
# Check whether input model path is empty
|
|
65
|
-
model_path: Optional[str] = self.model_config_dict.get(
|
|
66
|
-
"model_path", None
|
|
67
|
-
)
|
|
68
|
-
if not model_path:
|
|
69
|
-
raise ValueError("Path to open-source model is not provided.")
|
|
70
|
-
self.model_path: str = model_path
|
|
71
|
-
|
|
72
|
-
# Check whether the model name matches the model type
|
|
73
|
-
self.model_name: str = self.model_path.split('/')[-1]
|
|
74
|
-
if not self.model_type.validate_model_name(self.model_name):
|
|
75
|
-
raise ValueError(
|
|
76
|
-
f"Model name `{self.model_name}` does not match model type "
|
|
77
|
-
f"`{self.model_type.value}`."
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
# Load the server URL and check whether it is None
|
|
81
|
-
server_url: Optional[str] = url or self.model_config_dict.get(
|
|
82
|
-
"server_url", None
|
|
83
|
-
)
|
|
84
|
-
if not server_url:
|
|
85
|
-
raise ValueError(
|
|
86
|
-
"URL to server running open-source LLM is not provided."
|
|
87
|
-
)
|
|
88
|
-
self.server_url: str = server_url
|
|
89
|
-
self._client = OpenAI(
|
|
90
|
-
base_url=self.server_url,
|
|
91
|
-
timeout=60,
|
|
92
|
-
max_retries=3,
|
|
93
|
-
api_key="fake_key",
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
# Replace `model_config_dict` with only the params to be
|
|
97
|
-
# passed to OpenAI API
|
|
98
|
-
self.model_config_dict = self.model_config_dict["api_params"]
|
|
99
|
-
|
|
100
|
-
@property
|
|
101
|
-
def token_counter(self) -> BaseTokenCounter:
|
|
102
|
-
r"""Initialize the token counter for the model backend.
|
|
103
|
-
|
|
104
|
-
Returns:
|
|
105
|
-
BaseTokenCounter: The token counter following the model's
|
|
106
|
-
tokenization style.
|
|
107
|
-
"""
|
|
108
|
-
if not self._token_counter:
|
|
109
|
-
self._token_counter = OpenSourceTokenCounter(
|
|
110
|
-
self.model_type, self.model_path
|
|
111
|
-
)
|
|
112
|
-
return self._token_counter
|
|
113
|
-
|
|
114
|
-
def run(
|
|
115
|
-
self,
|
|
116
|
-
messages: List[OpenAIMessage],
|
|
117
|
-
) -> Union[ChatCompletion, Stream[ChatCompletionChunk]]:
|
|
118
|
-
r"""Runs inference of OpenAI-API-style chat completion.
|
|
119
|
-
|
|
120
|
-
Args:
|
|
121
|
-
messages (List[OpenAIMessage]): Message list with the chat history
|
|
122
|
-
in OpenAI API format.
|
|
123
|
-
|
|
124
|
-
Returns:
|
|
125
|
-
Union[ChatCompletion, Stream[ChatCompletionChunk]]:
|
|
126
|
-
`ChatCompletion` in the non-stream mode, or
|
|
127
|
-
`Stream[ChatCompletionChunk]` in the stream mode.
|
|
128
|
-
"""
|
|
129
|
-
messages_openai: List[OpenAIMessage] = messages
|
|
130
|
-
response = self._client.chat.completions.create(
|
|
131
|
-
messages=messages_openai,
|
|
132
|
-
model=self.model_name,
|
|
133
|
-
**self.model_config_dict,
|
|
134
|
-
)
|
|
135
|
-
return response
|
|
136
|
-
|
|
137
|
-
def check_model_config(self):
|
|
138
|
-
r"""Check whether the model configuration is valid for open-source
|
|
139
|
-
model backends.
|
|
140
|
-
|
|
141
|
-
Raises:
|
|
142
|
-
ValueError: If the model configuration dictionary contains any
|
|
143
|
-
unexpected arguments to OpenAI API, or it does not contain
|
|
144
|
-
:obj:`model_path` or :obj:`server_url`.
|
|
145
|
-
"""
|
|
146
|
-
if (
|
|
147
|
-
"model_path" not in self.model_config_dict
|
|
148
|
-
or "server_url" not in self.model_config_dict
|
|
149
|
-
):
|
|
150
|
-
raise ValueError(
|
|
151
|
-
"Invalid configuration for open-source model backend with "
|
|
152
|
-
":obj:`model_path` or :obj:`server_url` missing."
|
|
153
|
-
)
|
|
154
|
-
|
|
155
|
-
for param in self.model_config_dict["api_params"]:
|
|
156
|
-
if param not in OPENAI_API_PARAMS:
|
|
157
|
-
raise ValueError(
|
|
158
|
-
f"Unexpected argument `{param}` is "
|
|
159
|
-
"input into open-source model backend."
|
|
160
|
-
)
|
|
161
|
-
|
|
162
|
-
@property
|
|
163
|
-
def stream(self) -> bool:
|
|
164
|
-
r"""Returns whether the model is in stream mode,
|
|
165
|
-
which sends partial results each time.
|
|
166
|
-
|
|
167
|
-
Returns:
|
|
168
|
-
bool: Whether the model is in stream mode.
|
|
169
|
-
"""
|
|
170
|
-
return self.model_config_dict.get('stream', False)
|