camel-ai 0.2.76a9__py3-none-any.whl → 0.2.76a13__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/mcp_agent.py +30 -27
- camel/loaders/__init__.py +11 -2
- camel/loaders/chunkr_reader.py +9 -0
- camel/memories/records.py +36 -0
- camel/messages/base.py +126 -33
- camel/parsers/__init__.py +18 -0
- camel/parsers/mcp_tool_call_parser.py +176 -0
- camel/societies/workforce/task_channel.py +43 -0
- camel/societies/workforce/workforce.py +433 -76
- camel/storages/vectordb_storages/oceanbase.py +0 -1
- camel/tasks/task.py +4 -3
- camel/toolkits/hybrid_browser_toolkit/installer.py +203 -0
- camel/toolkits/hybrid_browser_toolkit/ts/package-lock.json +5 -612
- camel/toolkits/hybrid_browser_toolkit/ts/package.json +0 -1
- camel/toolkits/hybrid_browser_toolkit/ws_wrapper.py +54 -131
- camel/toolkits/mcp_toolkit.py +2 -1
- camel/toolkits/video_analysis_toolkit.py +1 -1
- camel/types/enums.py +3 -0
- camel/utils/commons.py +13 -0
- camel/utils/token_counting.py +25 -17
- {camel_ai-0.2.76a9.dist-info → camel_ai-0.2.76a13.dist-info}/METADATA +47 -48
- {camel_ai-0.2.76a9.dist-info → camel_ai-0.2.76a13.dist-info}/RECORD +25 -23
- camel/loaders/pandas_reader.py +0 -368
- {camel_ai-0.2.76a9.dist-info → camel_ai-0.2.76a13.dist-info}/WHEEL +0 -0
- {camel_ai-0.2.76a9.dist-info → camel_ai-0.2.76a13.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
camel/__init__.py,sha256=
|
|
1
|
+
camel/__init__.py,sha256=VhpEyVTNYd6JwdWL7o_GvaCbZHyDg0eJ_rNe8j0ncyQ,902
|
|
2
2
|
camel/generators.py,sha256=JRqj9_m1PF4qT6UtybzTQ-KBT9MJQt18OAAYvQ_fr2o,13844
|
|
3
3
|
camel/human.py,sha256=Xg8x1cS5KK4bQ1SDByiHZnzsRpvRP-KZViNvmu38xo4,5475
|
|
4
4
|
camel/logger.py,sha256=WgEwael_eT6D-lVAKHpKIpwXSTjvLbny5jbV1Ab8lnA,5760
|
|
@@ -12,7 +12,7 @@ camel/agents/critic_agent.py,sha256=L6cTbYjyZB0DCa51tQ6LZLA6my8kHLC4nktHySH78H4,
|
|
|
12
12
|
camel/agents/deductive_reasoner_agent.py,sha256=6BZGaq1hR6hKJuQtOfoYQnk_AkZpw_Mr7mUy2MspQgs,13540
|
|
13
13
|
camel/agents/embodied_agent.py,sha256=XBxBu5ZMmSJ4B2U3Z7SMwvLlgp6yNpaBe8HNQmY9CZA,7536
|
|
14
14
|
camel/agents/knowledge_graph_agent.py,sha256=7Tchhyvm1s8tQ3at7iGKZt70xWZllRXu2vwUFR37p10,9681
|
|
15
|
-
camel/agents/mcp_agent.py,sha256=
|
|
15
|
+
camel/agents/mcp_agent.py,sha256=WAs6JDO2hxTrB_bMvTB-dpOlu2b2BpciUbbBPGJp8Sg,16234
|
|
16
16
|
camel/agents/multi_hop_generator_agent.py,sha256=aYsZNsEFHxIq8_wDN8lZRkvRbfhlOYGBKezWr87y8Bs,4325
|
|
17
17
|
camel/agents/programmed_agent_instruction.py,sha256=99fLe41che3X6wPpNPJXRwl4If6EoQqQVWIoT3DKE1s,7124
|
|
18
18
|
camel/agents/repo_agent.py,sha256=VGylY9GHAVba0gYZsa9EayejPg0Te_B9ZLpY6GdxX0o,22285
|
|
@@ -143,31 +143,30 @@ camel/interpreters/ipython_interpreter.py,sha256=V-Z_nIwaKmmivv_gD6nwdzmqfBUW4Io
|
|
|
143
143
|
camel/interpreters/microsandbox_interpreter.py,sha256=sHh787YawKahoHpNUnujIVIreSSEuerF7TVxrbhDz_Y,14179
|
|
144
144
|
camel/interpreters/subprocess_interpreter.py,sha256=DMLJIlTiHk0QA_pH5CXESHdJk-5olKo3aUh0KNECqJI,17759
|
|
145
145
|
camel/interpreters/docker/Dockerfile,sha256=7LGYJrf4Okpqg9JSEXoWMCVN-0QUG89Y49BTQl7rjvA,1406
|
|
146
|
-
camel/loaders/__init__.py,sha256=
|
|
146
|
+
camel/loaders/__init__.py,sha256=L-1GQN69dqpe1FfdKGV2XRBPtpaUcztU6cMUeeJO9a8,1909
|
|
147
147
|
camel/loaders/apify_reader.py,sha256=oaVjKyNhJhG-hTuIwrpZ2hsB4XTL0M-kUksgSL2R0ck,7952
|
|
148
148
|
camel/loaders/base_io.py,sha256=zsbdBPHgSPFyQrtiUgAsHvy39QHWUObRYNaVvr-pPk0,10190
|
|
149
149
|
camel/loaders/base_loader.py,sha256=sZd-fHDNav1U0b2C3IKl4nX42OzrqRioCgRLajb6VdE,3080
|
|
150
|
-
camel/loaders/chunkr_reader.py,sha256=
|
|
150
|
+
camel/loaders/chunkr_reader.py,sha256=K6UWy2H4czDfTUcldmnLnvZ2wZXb0xedRsPuEYXhQec,6890
|
|
151
151
|
camel/loaders/crawl4ai_reader.py,sha256=ugfGMpWhfLnKf_XEOyDGI2ekpViDnSATg9eSxHyWX7M,7653
|
|
152
152
|
camel/loaders/firecrawl_reader.py,sha256=whHBhixQkCtJZYhhr7TgU7aMcbnfDR8LXx5If5Ci_kg,5687
|
|
153
153
|
camel/loaders/jina_url_reader.py,sha256=dL9J5JlsFKEhi4gU_vYIxKvvf_RJ4LY9gG6i8P8JpcA,3601
|
|
154
154
|
camel/loaders/markitdown.py,sha256=2tc9Tf2pMJFkFzJwTAge-2kdmgRBBAV3sXHjcbo9AVE,7058
|
|
155
155
|
camel/loaders/mineru_extractor.py,sha256=nKa5n7f3ergv1TURcbXZJP5mQpnSCIFdlWrxWn4hBz8,9070
|
|
156
156
|
camel/loaders/mistral_reader.py,sha256=N9y6mqxPri9w4wE3nfQ2Ch4ph9oxeMR5yJo2oOcQl-Y,5426
|
|
157
|
-
camel/loaders/pandas_reader.py,sha256=zTVrUWsnR6oeOqeL8KLlnapJeaB4El0wyIrEPY1aLus,11922
|
|
158
157
|
camel/loaders/scrapegraph_reader.py,sha256=k8EOV5-p41DHDr2ITV8BR1sMqBsvN41CN8Byj2cf5kY,3120
|
|
159
158
|
camel/loaders/unstructured_io.py,sha256=wA3fkDeS4mSPFkMDnWZzJYKDltio7l72BU9D3EGfoUs,17423
|
|
160
159
|
camel/memories/__init__.py,sha256=vaStmUZNcHI884Fg9IQTezd50x4Me5fhDej0uK0O5fk,1404
|
|
161
160
|
camel/memories/agent_memories.py,sha256=M8L4WyFqrT1Ec-uBjZXa4puHnKFMBcU6a3AXneOJb2I,10895
|
|
162
161
|
camel/memories/base.py,sha256=LRhCmPwQl7ADBb8bE0Izd0vmo5VhOSymtR8Q58fvrYA,5971
|
|
163
|
-
camel/memories/records.py,sha256=
|
|
162
|
+
camel/memories/records.py,sha256=rG3c8JU3GT_B3PEfIRdEmaHDOx6-QgcqxG2EkXaKprI,7866
|
|
164
163
|
camel/memories/blocks/__init__.py,sha256=ci7_WU11222cNd1Zkv-a0z5E2ux95NMjAYm_cDzF0pE,854
|
|
165
164
|
camel/memories/blocks/chat_history_block.py,sha256=gn69kHY4UI3NpTPCiq66L_Jk74xjznuB6BZC9PVBUeg,7190
|
|
166
165
|
camel/memories/blocks/vectordb_block.py,sha256=r0mRGLV14YUr8aruLdylBjKdSm11oprsiNEWl0EJJhQ,4166
|
|
167
166
|
camel/memories/context_creators/__init__.py,sha256=pqzkBM2ro5JZD7RhWg05TjinphhCq0QTIqBJlIL1sJ0,800
|
|
168
167
|
camel/memories/context_creators/score_based.py,sha256=OQ7eEECkzu4Op5sS9qS1dVgZl-cchSkUZj8Puh8C024,16488
|
|
169
168
|
camel/messages/__init__.py,sha256=Px-gTFp2Kcgbeb2sZQ_f4tqjoLHE-QEOiMHIMfPrvTw,1949
|
|
170
|
-
camel/messages/base.py,sha256=
|
|
169
|
+
camel/messages/base.py,sha256=HWroXFvktECm78fT1rb8iYIEfu-4iGeqCc9iv7XlKmY,23985
|
|
171
170
|
camel/messages/func_message.py,sha256=7e6HsU2FmiDwxhQCFhUenAhms6s9q22ol2Eg7FJa3yw,6892
|
|
172
171
|
camel/messages/conversion/__init__.py,sha256=8B4C-0wj-dm925YRKNyx31WYK25PWpME7Q9jPtx2jkY,1047
|
|
173
172
|
camel/messages/conversion/alpaca.py,sha256=jBU2bMhzNjzptGuoasThYvFov_cYPCYt3pEfs0T7z7U,4163
|
|
@@ -229,6 +228,8 @@ camel/models/reward/base_reward_model.py,sha256=erCmBCl51oFNjEHCXWxdHKIPNVJnQlNG
|
|
|
229
228
|
camel/models/reward/evaluator.py,sha256=54ev5MuQ_5Tp0-LGO59EIuIkGrVMbtXXqpBR5Ps9kCM,2426
|
|
230
229
|
camel/models/reward/nemotron_model.py,sha256=EICDP2SyQpARupxsGWFKJHNADsVknT_t6tCG5R8AEPA,3916
|
|
231
230
|
camel/models/reward/skywork_model.py,sha256=KxHVDuwja2kZBCoCX8_sLBbXUGRSFsTPjgwsy1uyoyU,3246
|
|
231
|
+
camel/parsers/__init__.py,sha256=8f2k4MgjY73DeUQVVN1CaKqrIkOdexJqfJ4xNuAvbYM,862
|
|
232
|
+
camel/parsers/mcp_tool_call_parser.py,sha256=PsWBSJPBTmG9rgOXApdjrHA8P88e0gL0vLXTmvzr_Uw,4974
|
|
232
233
|
camel/personas/__init__.py,sha256=b2EU-unbIfCZjgq2dODf9mq0L9-VP5QXDVTjeYyvKCM,804
|
|
233
234
|
camel/personas/persona.py,sha256=PCu_hCXM3AqOc4J0HT8F6_WT_GKj8ahWM1Aw1lxL0q4,4253
|
|
234
235
|
camel/personas/persona_hub.py,sha256=v5O3BE_krz6s1OOiRhhnODuCf-2cqIw1tDCWgGG55dU,10555
|
|
@@ -284,10 +285,10 @@ camel/societies/workforce/prompts.py,sha256=WetbTS0x_vb2XZ8AsotxhGXUhnPHJ6ndeR9Z
|
|
|
284
285
|
camel/societies/workforce/role_playing_worker.py,sha256=Zm89lZTlV0T3o9C-DJ0HAV68Iq2Kdg8QqJRWs1TV9_A,10320
|
|
285
286
|
camel/societies/workforce/single_agent_worker.py,sha256=STgGJ_nPM6OjraZHTXKl26jFBXvU6npzfeY1HaL2CoI,19584
|
|
286
287
|
camel/societies/workforce/structured_output_handler.py,sha256=xr8szFN86hg3jQ825aEkJTjkSFQnTlbinVg4j1vZJVI,17870
|
|
287
|
-
camel/societies/workforce/task_channel.py,sha256=
|
|
288
|
+
camel/societies/workforce/task_channel.py,sha256=rl0xSZg-8QIIHtXwC7f1GqESmNpdHJ_Jz8M524m5nEc,13238
|
|
288
289
|
camel/societies/workforce/utils.py,sha256=THgNHSeZsNVnjTzQTur3qCJhi72MrDS8X2gPET174cI,8434
|
|
289
290
|
camel/societies/workforce/worker.py,sha256=MtUqYkTC9V-PIIRwSkKiB9w_YSu92iOpoha2rktEiQ0,6248
|
|
290
|
-
camel/societies/workforce/workforce.py,sha256=
|
|
291
|
+
camel/societies/workforce/workforce.py,sha256=jUMF8x3IGUNFgRSLIqydnKxavlTYfaWL4iOw4tGOGp4,159193
|
|
291
292
|
camel/societies/workforce/workforce_logger.py,sha256=0YT__ys48Bgn0IICKIZBmSWhON-eA1KShebjCdn5ppE,24525
|
|
292
293
|
camel/storages/__init__.py,sha256=RwpEyvxpMbJzVDZJJygeBg4AzyYMkTjjkfB53hTuqGo,2141
|
|
293
294
|
camel/storages/graph_storages/__init__.py,sha256=G29BNn651C0WTOpjCl4QnVM-4B9tcNh8DdmsCiONH8Y,948
|
|
@@ -311,14 +312,14 @@ camel/storages/vectordb_storages/base.py,sha256=EP_WbEtI3SJPHro9rjNkIq9UDUP1AAHm
|
|
|
311
312
|
camel/storages/vectordb_storages/chroma.py,sha256=wXuLUYsgkC2VvdyLrlL5VqEDVzJDBUo7OdimK8hBLmg,27553
|
|
312
313
|
camel/storages/vectordb_storages/faiss.py,sha256=MHE3db9kJmVuu0aScXsSo8p60TCtc2Ot0rO77zcPgt8,26760
|
|
313
314
|
camel/storages/vectordb_storages/milvus.py,sha256=ChQyEuaXCWCKxytLN2z4QrkEthx2xE6bQPO6KCS9RgQ,13535
|
|
314
|
-
camel/storages/vectordb_storages/oceanbase.py,sha256=
|
|
315
|
+
camel/storages/vectordb_storages/oceanbase.py,sha256=ZfvmsDfcKJWlxkdZhRQXl47ra9wxZ57Gg8lWx_zBcQE,17056
|
|
315
316
|
camel/storages/vectordb_storages/pgvector.py,sha256=p-5RGCVT46zP-Yop85thWi2m0ZnHILSJFpu2A-7qWnk,12438
|
|
316
317
|
camel/storages/vectordb_storages/qdrant.py,sha256=a_cT0buSCHQ2CPZy852-mdvMDwy5zodCvAKMaa4zIvg,18017
|
|
317
318
|
camel/storages/vectordb_storages/surreal.py,sha256=vPUh3iFz73kiDFP_FLDzq3ULaFGQGAcJDkOh9Y8SKps,13392
|
|
318
319
|
camel/storages/vectordb_storages/tidb.py,sha256=8XuKZw_WekmOEKZEqUzdy_hijRHhHhaJaT3idSAoHSY,11264
|
|
319
320
|
camel/storages/vectordb_storages/weaviate.py,sha256=wDUE4KvfmOl3DqHFU4uF0VKbHu-q9vKhZDe8FZ6QXsk,27888
|
|
320
321
|
camel/tasks/__init__.py,sha256=MuHwkw5GRQc8NOCzj8tjtBrr2Xg9KrcKp-ed_-2ZGIM,906
|
|
321
|
-
camel/tasks/task.py,sha256=
|
|
322
|
+
camel/tasks/task.py,sha256=JsT7uPECL7Krp6IGu3mQcqH6YuArbyzIN_XbX67vrRU,24272
|
|
322
323
|
camel/tasks/task_prompt.py,sha256=3KZmKYKUPcTKe8EAZOZBN3G05JHRVt7oHY9ORzLVu1g,2150
|
|
323
324
|
camel/terminators/__init__.py,sha256=t8uqrkUnXEOYMXQDgaBkMFJ0EXFKI0kmx4cUimli3Ls,991
|
|
324
325
|
camel/terminators/base.py,sha256=xmJzERX7GdSXcxZjAHHODa0rOxRChMSRboDCNHWSscs,1511
|
|
@@ -357,7 +358,7 @@ camel/toolkits/klavis_toolkit.py,sha256=ZKerhgz5e-AV-iv0ftf07HgWikknIHjB3EOQswfu
|
|
|
357
358
|
camel/toolkits/linkedin_toolkit.py,sha256=wn4eXwYYlVA7doTna7k7WYhUqTBF83W79S-UJs_IQr0,8065
|
|
358
359
|
camel/toolkits/markitdown_toolkit.py,sha256=lwN6qQY8TLZkNWOqzeKZG3Fku-HMpGFrdRwhtPaJSlw,3844
|
|
359
360
|
camel/toolkits/math_toolkit.py,sha256=SJbzT6akHRlmqo1QwCj1f7-6pEv0sNKJbcYvYAylHQw,5439
|
|
360
|
-
camel/toolkits/mcp_toolkit.py,sha256=
|
|
361
|
+
camel/toolkits/mcp_toolkit.py,sha256=jRzxKhuZFT2S1HYIkJtGeTu1-veoQYvi7gdwDMSzVKE,37575
|
|
361
362
|
camel/toolkits/memory_toolkit.py,sha256=TeKYd5UMwgjVpuS2orb-ocFL13eUNKujvrFOruDCpm8,4436
|
|
362
363
|
camel/toolkits/meshy_toolkit.py,sha256=NbgdOBD3FYLtZf-AfonIv6-Q8-8DW129jsaP1PqI2rs,7126
|
|
363
364
|
camel/toolkits/message_agent_toolkit.py,sha256=yWvAaxoxAvDEtD7NH7IkkHIyfWIYK47WZhn5E_RaxKo,22661
|
|
@@ -391,7 +392,7 @@ camel/toolkits/task_planning_toolkit.py,sha256=Ttw9fHae4omGC1SA-6uaeXVHJ1YkwiVlo
|
|
|
391
392
|
camel/toolkits/thinking_toolkit.py,sha256=nZYLvKWIx2BM1DYu69I9B5EISAG7aYcLYXKv9663BVk,8000
|
|
392
393
|
camel/toolkits/twitter_toolkit.py,sha256=Px4N8aUxUzy01LhGSWkdrC2JgwKkrY3cvxgMeJ2XYfU,15939
|
|
393
394
|
camel/toolkits/vertex_ai_veo_toolkit.py,sha256=RFLUSG3pJxxDQq64EgcG43f7dmCpwPuecdTGwABaaZ0,21971
|
|
394
|
-
camel/toolkits/video_analysis_toolkit.py,sha256=
|
|
395
|
+
camel/toolkits/video_analysis_toolkit.py,sha256=4PPu46P_XQBcZe5vT2rpNDBhouzG8Ra2UhgS8mTu9pg,23594
|
|
395
396
|
camel/toolkits/video_download_toolkit.py,sha256=0dOzsG9vpCHr31bW4Iiqz4iMkQ7uxkAyTMgiculvenk,7567
|
|
396
397
|
camel/toolkits/weather_toolkit.py,sha256=fs9x9aC38Wsvni6A4PPpbRX6-aBnZiqs2Jix39yoULU,7413
|
|
397
398
|
camel/toolkits/web_deploy_toolkit.py,sha256=jUiU8ur759Q0Aiw5TUcvhu7Iv10W36Y1RS0hEHZIb4U,46154
|
|
@@ -403,9 +404,10 @@ camel/toolkits/hybrid_browser_toolkit/__init__.py,sha256=vxjWhq7GjUKE5I9RGQU_Goi
|
|
|
403
404
|
camel/toolkits/hybrid_browser_toolkit/config_loader.py,sha256=1FVZzDucDsC9IB6EcfP9TMgD3Z60vOniY4dk5TB1dsg,7595
|
|
404
405
|
camel/toolkits/hybrid_browser_toolkit/hybrid_browser_toolkit.py,sha256=56o6ht3SwvkUbULFfDOQMx3eE-WVp8L81zZ_hp4tjfM,12195
|
|
405
406
|
camel/toolkits/hybrid_browser_toolkit/hybrid_browser_toolkit_ts.py,sha256=KGvtdJdUJ86VacPmL4BYd0EZjscH6Z2wXtraXAQud1Y,56214
|
|
406
|
-
camel/toolkits/hybrid_browser_toolkit/
|
|
407
|
-
camel/toolkits/hybrid_browser_toolkit/
|
|
408
|
-
camel/toolkits/hybrid_browser_toolkit/ts/package.json,sha256=
|
|
407
|
+
camel/toolkits/hybrid_browser_toolkit/installer.py,sha256=O1XM_ThJQnI0ALf4pBIhpOhzhOX8fIBJqOFJ1MxRZT0,7521
|
|
408
|
+
camel/toolkits/hybrid_browser_toolkit/ws_wrapper.py,sha256=Ajvy1A9CdzEkG4TOvtLGjeTHHuWNkUn_YYif5IT2gvs,34654
|
|
409
|
+
camel/toolkits/hybrid_browser_toolkit/ts/package-lock.json,sha256=ErLLgeniWWkZOljCO7mZe0DTFbBOF6rR4WbNxCcoKcc,134512
|
|
410
|
+
camel/toolkits/hybrid_browser_toolkit/ts/package.json,sha256=fVN66U4GWyB_0WQxMt4PfYKXRebPkKm1TfYQO1jLM74,721
|
|
409
411
|
camel/toolkits/hybrid_browser_toolkit/ts/tsconfig.json,sha256=SwpQnq4Q-rwRobF2iWrP96mgmgwaVPZEv-nii5QIYEU,523
|
|
410
412
|
camel/toolkits/hybrid_browser_toolkit/ts/websocket-server.js,sha256=lh-j0zkPS8WLUMRysVp2vPQ9lgnImw2ELMYgXGYyaek,10954
|
|
411
413
|
camel/toolkits/hybrid_browser_toolkit/ts/src/browser-scripts.js,sha256=NNwM_H2xaDrlrdac0PJK1iUBwdiuQsg9qKaMhHAvZuI,3160
|
|
@@ -455,7 +457,7 @@ camel/toolkits/terminal_toolkit/__init__.py,sha256=yE66haKm-NwoNJwtnCmcRpANtWxQB
|
|
|
455
457
|
camel/toolkits/terminal_toolkit/terminal_toolkit.py,sha256=Mp7C41d_T3guUNU7iXXOFKLNopTUyNGckzQ0JDCQ9og,36784
|
|
456
458
|
camel/toolkits/terminal_toolkit/utils.py,sha256=N0Dz5EEoJRfkP_LEVXepP5XQB57z8Hqt30Xt6SkGgOg,19221
|
|
457
459
|
camel/types/__init__.py,sha256=EOmWlqS7aE5cB51_Vv7vHUexKeBbx9FSsfynl5vKjwo,2565
|
|
458
|
-
camel/types/enums.py,sha256=
|
|
460
|
+
camel/types/enums.py,sha256=bp1bP8YouVs_H9m5teSFgLX1cYsehDPJr5w3w7WUQ64,70420
|
|
459
461
|
camel/types/mcp_registries.py,sha256=dl4LgYtSaUhsqAKpz28k_SA9La11qxqBvDLaEuyzrFE,4971
|
|
460
462
|
camel/types/openai_types.py,sha256=m7oWb8nWYWOAwBRY1mP9mS9RVufXeDVj-fGvHAhXuMU,2120
|
|
461
463
|
camel/types/unified_model_type.py,sha256=gs_Wr0acrqn81kjyd6zm_OzCUol2d0QQH1-QXsuxVxo,6196
|
|
@@ -463,7 +465,7 @@ camel/types/agents/__init__.py,sha256=cbvVkogPoZgcwZrgxLH6EtpGXk0kavF79nOic0Dc1v
|
|
|
463
465
|
camel/types/agents/tool_calling_record.py,sha256=xG0a9TJu-nQQ9aAxpZwYmgqnpjEbnm2cRjjG8uDSIbg,1979
|
|
464
466
|
camel/utils/__init__.py,sha256=qQeMHZJ8Bbgpm4tBu-LWc_P3iFjXBlVfALdKTiD_s8I,3305
|
|
465
467
|
camel/utils/async_func.py,sha256=KqoktGSWjZBuAMQ2CV0X6FRgHGlzCKLfeaWvp-f1Qz8,1568
|
|
466
|
-
camel/utils/commons.py,sha256=
|
|
468
|
+
camel/utils/commons.py,sha256=OJxvdnpfUColR0nM4ounrt6ygszvOin2jp8NA08jTGw,37843
|
|
467
469
|
camel/utils/constants.py,sha256=cqnxmpUeOwrtsR-tRO4bbOc6ZP19TLj7avjm3FONMJs,1410
|
|
468
470
|
camel/utils/context_utils.py,sha256=oJ6mdN2q4NKoHV-KBtlGhCEiKGrOtdwwmZpYbLL-2Ek,15466
|
|
469
471
|
camel/utils/deduplication.py,sha256=UHikAtOW1TTDunf2t_wa2kFbmkrXWf7HfOKwLvwCxzo,8958
|
|
@@ -473,7 +475,7 @@ camel/utils/mcp.py,sha256=Wg_IWMv2kHBVQsoDjxbviCYpVyC2PEoX00sAtRKV2tE,9857
|
|
|
473
475
|
camel/utils/mcp_client.py,sha256=o-EPdJ5EL5M9sjkSADvLBz9IoHhtXteKGidauIxw3ps,37584
|
|
474
476
|
camel/utils/message_summarizer.py,sha256=7AvPDlevle5uU3mXtfvSFS--nDjp9yqfrf546qTe9rE,5939
|
|
475
477
|
camel/utils/response_format.py,sha256=xZcx6xBxeg3A0e7R0JCMJdNm2oQ1-diqVLs0JsiCkZU,5319
|
|
476
|
-
camel/utils/token_counting.py,sha256=
|
|
478
|
+
camel/utils/token_counting.py,sha256=BZ-5pLVRdxNAJDQWpXJFS3JxCEm5S6Xc7CYF5OgMDUM,18809
|
|
477
479
|
camel/utils/tool_result.py,sha256=0dKMb22cwuxnjeO4K9wbM4gwwPHV1yfoSJquLTUJVXs,1813
|
|
478
480
|
camel/utils/chunker/__init__.py,sha256=6iN6HL6sblIjDuJTILk-9qKcHBZ97t8b6tZCWPZ0OYI,899
|
|
479
481
|
camel/utils/chunker/base.py,sha256=9CuqymFCRncyAdEST-IcRonB732YAPhusznqH-RES3E,960
|
|
@@ -485,7 +487,7 @@ camel/verifiers/math_verifier.py,sha256=tA1D4S0sm8nsWISevxSN0hvSVtIUpqmJhzqfbuMo
|
|
|
485
487
|
camel/verifiers/models.py,sha256=GdxYPr7UxNrR1577yW4kyroRcLGfd-H1GXgv8potDWU,2471
|
|
486
488
|
camel/verifiers/physics_verifier.py,sha256=c1grrRddcrVN7szkxhv2QirwY9viIRSITWeWFF5HmLs,30187
|
|
487
489
|
camel/verifiers/python_verifier.py,sha256=ogTz77wODfEcDN4tMVtiSkRQyoiZbHPY2fKybn59lHw,20558
|
|
488
|
-
camel_ai-0.2.
|
|
489
|
-
camel_ai-0.2.
|
|
490
|
-
camel_ai-0.2.
|
|
491
|
-
camel_ai-0.2.
|
|
490
|
+
camel_ai-0.2.76a13.dist-info/METADATA,sha256=TbWu2lS1Q7QSGlX46uMBPCL084szWP0vL8ql_z6ClTE,55165
|
|
491
|
+
camel_ai-0.2.76a13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
492
|
+
camel_ai-0.2.76a13.dist-info/licenses/LICENSE,sha256=id0nB2my5kG0xXeimIu5zZrbHLS6EQvxvkKkzIHaT2k,11343
|
|
493
|
+
camel_ai-0.2.76a13.dist-info/RECORD,,
|
camel/loaders/pandas_reader.py
DELETED
|
@@ -1,368 +0,0 @@
|
|
|
1
|
-
# ========= Copyright 2023-2024 @ 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-2024 @ CAMEL-AI.org. All Rights Reserved. =========
|
|
14
|
-
from functools import wraps
|
|
15
|
-
from pathlib import Path
|
|
16
|
-
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union
|
|
17
|
-
|
|
18
|
-
if TYPE_CHECKING:
|
|
19
|
-
from pandas import DataFrame
|
|
20
|
-
from pandasai import SmartDataframe
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def check_suffix(valid_suffixs: List[str]) -> Callable:
|
|
24
|
-
r"""A decorator to check the file suffix of a given file path.
|
|
25
|
-
|
|
26
|
-
Args:
|
|
27
|
-
valid_suffix (str): The required file suffix.
|
|
28
|
-
|
|
29
|
-
Returns:
|
|
30
|
-
Callable: The decorator function.
|
|
31
|
-
"""
|
|
32
|
-
|
|
33
|
-
def decorator(func: Callable):
|
|
34
|
-
@wraps(func)
|
|
35
|
-
def wrapper(
|
|
36
|
-
self, file_path: str, *args: Any, **kwargs: Dict[str, Any]
|
|
37
|
-
) -> "DataFrame":
|
|
38
|
-
suffix = Path(file_path).suffix
|
|
39
|
-
if suffix not in valid_suffixs:
|
|
40
|
-
raise ValueError(
|
|
41
|
-
f"Only {', '.join(valid_suffixs)} files are supported"
|
|
42
|
-
)
|
|
43
|
-
return func(self, file_path, *args, **kwargs)
|
|
44
|
-
|
|
45
|
-
return wrapper
|
|
46
|
-
|
|
47
|
-
return decorator
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
class PandasReader:
|
|
51
|
-
def __init__(self, config: Optional[Dict[str, Any]] = None) -> None:
|
|
52
|
-
r"""Initializes the PandasReader class.
|
|
53
|
-
|
|
54
|
-
Args:
|
|
55
|
-
config (Optional[Dict[str, Any]], optional): The configuration
|
|
56
|
-
dictionary that can include LLM API settings for LLM-based
|
|
57
|
-
processing. If not provided, no LLM will be configured by
|
|
58
|
-
default. You can customize the LLM configuration by providing
|
|
59
|
-
a 'llm' key in the config dictionary. (default: :obj:`None`)
|
|
60
|
-
"""
|
|
61
|
-
self.config = config or {}
|
|
62
|
-
|
|
63
|
-
self.__LOADER = {
|
|
64
|
-
".csv": self.read_csv,
|
|
65
|
-
".xlsx": self.read_excel,
|
|
66
|
-
".xls": self.read_excel,
|
|
67
|
-
".json": self.read_json,
|
|
68
|
-
".parquet": self.read_parquet,
|
|
69
|
-
".sql": self.read_sql,
|
|
70
|
-
".html": self.read_html,
|
|
71
|
-
".feather": self.read_feather,
|
|
72
|
-
".dta": self.read_stata,
|
|
73
|
-
".sas": self.read_sas,
|
|
74
|
-
".pkl": self.read_pickle,
|
|
75
|
-
".h5": self.read_hdf,
|
|
76
|
-
".orc": self.read_orc,
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
def load(
|
|
80
|
-
self,
|
|
81
|
-
data: Union["DataFrame", str],
|
|
82
|
-
*args: Any,
|
|
83
|
-
**kwargs: Dict[str, Any],
|
|
84
|
-
) -> Union["DataFrame", "SmartDataframe"]:
|
|
85
|
-
r"""Loads a file or DataFrame and returns a DataFrame or
|
|
86
|
-
SmartDataframe object.
|
|
87
|
-
|
|
88
|
-
If an LLM is configured in the config dictionary, a SmartDataframe
|
|
89
|
-
will be returned, otherwise a regular pandas DataFrame will be
|
|
90
|
-
returned.
|
|
91
|
-
|
|
92
|
-
args:
|
|
93
|
-
data (Union[DataFrame, str]): The data to load.
|
|
94
|
-
*args (Any): Additional positional arguments.
|
|
95
|
-
**kwargs (Dict[str, Any]): Additional keyword arguments.
|
|
96
|
-
|
|
97
|
-
Returns:
|
|
98
|
-
Union[DataFrame, SmartDataframe]: The DataFrame or SmartDataframe
|
|
99
|
-
object.
|
|
100
|
-
"""
|
|
101
|
-
from pandas import DataFrame
|
|
102
|
-
|
|
103
|
-
# Load the data into a pandas DataFrame
|
|
104
|
-
if isinstance(data, DataFrame):
|
|
105
|
-
df = data
|
|
106
|
-
else:
|
|
107
|
-
file_path = str(data)
|
|
108
|
-
path = Path(file_path)
|
|
109
|
-
if not file_path.startswith("http") and not path.exists():
|
|
110
|
-
raise FileNotFoundError(f"File {file_path} not found")
|
|
111
|
-
if path.suffix in self.__LOADER:
|
|
112
|
-
df = self.__LOADER[path.suffix](file_path, *args, **kwargs) # type: ignore[operator]
|
|
113
|
-
else:
|
|
114
|
-
raise ValueError(f"Unsupported file format: {path.suffix}")
|
|
115
|
-
|
|
116
|
-
# If an LLM is configured, return a SmartDataframe, otherwise return a
|
|
117
|
-
# regular DataFrame
|
|
118
|
-
if "llm" in self.config:
|
|
119
|
-
from pandasai import SmartDataframe
|
|
120
|
-
|
|
121
|
-
return SmartDataframe(df, config=self.config)
|
|
122
|
-
else:
|
|
123
|
-
return df
|
|
124
|
-
|
|
125
|
-
@check_suffix([".csv"])
|
|
126
|
-
def read_csv(
|
|
127
|
-
self, file_path: str, *args: Any, **kwargs: Dict[str, Any]
|
|
128
|
-
) -> "DataFrame":
|
|
129
|
-
r"""Reads a CSV file and returns a DataFrame.
|
|
130
|
-
|
|
131
|
-
Args:
|
|
132
|
-
file_path (str): The path to the CSV file.
|
|
133
|
-
*args (Any): Additional positional arguments.
|
|
134
|
-
**kwargs (Dict[str, Any]): Additional keyword arguments.
|
|
135
|
-
|
|
136
|
-
Returns:
|
|
137
|
-
DataFrame: The DataFrame object.
|
|
138
|
-
"""
|
|
139
|
-
import pandas as pd
|
|
140
|
-
|
|
141
|
-
return pd.read_csv(file_path, *args, **kwargs)
|
|
142
|
-
|
|
143
|
-
@check_suffix([".xlsx", ".xls"])
|
|
144
|
-
def read_excel(
|
|
145
|
-
self, file_path: str, *args: Any, **kwargs: Dict[str, Any]
|
|
146
|
-
) -> "DataFrame":
|
|
147
|
-
r"""Reads an Excel file and returns a DataFrame.
|
|
148
|
-
|
|
149
|
-
Args:
|
|
150
|
-
file_path (str): The path to the Excel file.
|
|
151
|
-
*args (Any): Additional positional arguments.
|
|
152
|
-
**kwargs (Dict[str, Any]): Additional keyword arguments.
|
|
153
|
-
|
|
154
|
-
Returns:
|
|
155
|
-
DataFrame: The DataFrame object.
|
|
156
|
-
"""
|
|
157
|
-
import pandas as pd
|
|
158
|
-
|
|
159
|
-
return pd.read_excel(file_path, *args, **kwargs)
|
|
160
|
-
|
|
161
|
-
@check_suffix([".json"])
|
|
162
|
-
def read_json(
|
|
163
|
-
self, file_path: str, *args: Any, **kwargs: Dict[str, Any]
|
|
164
|
-
) -> "DataFrame":
|
|
165
|
-
r"""Reads a JSON file and returns a DataFrame.
|
|
166
|
-
|
|
167
|
-
Args:
|
|
168
|
-
file_path (str): The path to the JSON file.
|
|
169
|
-
*args (Any): Additional positional arguments.
|
|
170
|
-
**kwargs (Dict[str, Any]): Additional keyword arguments.
|
|
171
|
-
|
|
172
|
-
Returns:
|
|
173
|
-
DataFrame: The DataFrame object.
|
|
174
|
-
"""
|
|
175
|
-
import pandas as pd
|
|
176
|
-
|
|
177
|
-
return pd.read_json(file_path, *args, **kwargs)
|
|
178
|
-
|
|
179
|
-
@check_suffix([".parquet"])
|
|
180
|
-
def read_parquet(
|
|
181
|
-
self, file_path: str, *args: Any, **kwargs: Dict[str, Any]
|
|
182
|
-
) -> "DataFrame":
|
|
183
|
-
r"""Reads a Parquet file and returns a DataFrame.
|
|
184
|
-
|
|
185
|
-
Args:
|
|
186
|
-
file_path (str): The path to the Parquet file.
|
|
187
|
-
*args (Any): Additional positional arguments.
|
|
188
|
-
**kwargs (Dict[str, Any]): Additional keyword arguments.
|
|
189
|
-
|
|
190
|
-
Returns:
|
|
191
|
-
DataFrame: The DataFrame object.
|
|
192
|
-
"""
|
|
193
|
-
import pandas as pd
|
|
194
|
-
|
|
195
|
-
return pd.read_parquet(file_path, *args, **kwargs)
|
|
196
|
-
|
|
197
|
-
def read_sql(self, *args: Any, **kwargs: Dict[str, Any]) -> "DataFrame":
|
|
198
|
-
r"""Reads a SQL file and returns a DataFrame.
|
|
199
|
-
|
|
200
|
-
Args:
|
|
201
|
-
*args (Any): Additional positional arguments.
|
|
202
|
-
**kwargs (Dict[str, Any]): Additional keyword arguments.
|
|
203
|
-
|
|
204
|
-
Returns:
|
|
205
|
-
DataFrame: The DataFrame object.
|
|
206
|
-
"""
|
|
207
|
-
import pandas as pd
|
|
208
|
-
|
|
209
|
-
return pd.read_sql(*args, **kwargs)
|
|
210
|
-
|
|
211
|
-
def read_table(
|
|
212
|
-
self, file_path: str, *args: Any, **kwargs: Dict[str, Any]
|
|
213
|
-
) -> "DataFrame":
|
|
214
|
-
r"""Reads a table and returns a DataFrame.
|
|
215
|
-
|
|
216
|
-
Args:
|
|
217
|
-
file_path (str): The path to the table.
|
|
218
|
-
*args (Any): Additional positional arguments.
|
|
219
|
-
**kwargs (Dict[str, Any]): Additional keyword arguments.
|
|
220
|
-
|
|
221
|
-
Returns:
|
|
222
|
-
DataFrame: The DataFrame object.
|
|
223
|
-
"""
|
|
224
|
-
import pandas as pd
|
|
225
|
-
|
|
226
|
-
return pd.read_table(file_path, *args, **kwargs)
|
|
227
|
-
|
|
228
|
-
def read_clipboard(
|
|
229
|
-
self, *args: Any, **kwargs: Dict[str, Any]
|
|
230
|
-
) -> "DataFrame":
|
|
231
|
-
r"""Reads a clipboard and returns a DataFrame.
|
|
232
|
-
|
|
233
|
-
Args:
|
|
234
|
-
*args (Any): Additional positional arguments.
|
|
235
|
-
**kwargs (Dict[str, Any]): Additional keyword arguments.
|
|
236
|
-
|
|
237
|
-
Returns:
|
|
238
|
-
DataFrame: The DataFrame object.
|
|
239
|
-
"""
|
|
240
|
-
import pandas as pd
|
|
241
|
-
|
|
242
|
-
return pd.read_clipboard(*args, **kwargs)
|
|
243
|
-
|
|
244
|
-
@check_suffix([".html"])
|
|
245
|
-
def read_html(
|
|
246
|
-
self, file_path: str, *args: Any, **kwargs: Dict[str, Any]
|
|
247
|
-
) -> "DataFrame":
|
|
248
|
-
r"""Reads an HTML file and returns a DataFrame.
|
|
249
|
-
|
|
250
|
-
Args:
|
|
251
|
-
file_path (str): The path to the HTML file.
|
|
252
|
-
*args (Any): Additional positional arguments.
|
|
253
|
-
**kwargs (Dict[str, Any]): Additional keyword arguments.
|
|
254
|
-
|
|
255
|
-
Returns:
|
|
256
|
-
DataFrame: The DataFrame object.
|
|
257
|
-
"""
|
|
258
|
-
import pandas as pd
|
|
259
|
-
|
|
260
|
-
return pd.read_html(file_path, *args, **kwargs)
|
|
261
|
-
|
|
262
|
-
@check_suffix([".feather"])
|
|
263
|
-
def read_feather(
|
|
264
|
-
self, file_path: str, *args: Any, **kwargs: Dict[str, Any]
|
|
265
|
-
) -> "DataFrame":
|
|
266
|
-
r"""Reads a Feather file and returns a DataFrame.
|
|
267
|
-
|
|
268
|
-
Args:
|
|
269
|
-
file_path (str): The path to the Feather file.
|
|
270
|
-
*args (Any): Additional positional arguments.
|
|
271
|
-
**kwargs (Dict[str, Any]): Additional keyword arguments.
|
|
272
|
-
|
|
273
|
-
Returns:
|
|
274
|
-
DataFrame: The DataFrame object.
|
|
275
|
-
"""
|
|
276
|
-
import pandas as pd
|
|
277
|
-
|
|
278
|
-
return pd.read_feather(file_path, *args, **kwargs)
|
|
279
|
-
|
|
280
|
-
@check_suffix([".dta"])
|
|
281
|
-
def read_stata(
|
|
282
|
-
self, file_path: str, *args: Any, **kwargs: Dict[str, Any]
|
|
283
|
-
) -> "DataFrame":
|
|
284
|
-
r"""Reads a Stata file and returns a DataFrame.
|
|
285
|
-
|
|
286
|
-
Args:
|
|
287
|
-
file_path (str): The path to the Stata file.
|
|
288
|
-
*args (Any): Additional positional arguments.
|
|
289
|
-
**kwargs (Dict[str, Any]): Additional keyword arguments.
|
|
290
|
-
|
|
291
|
-
Returns:
|
|
292
|
-
DataFrame: The DataFrame object.
|
|
293
|
-
"""
|
|
294
|
-
import pandas as pd
|
|
295
|
-
|
|
296
|
-
return pd.read_stata(file_path, *args, **kwargs)
|
|
297
|
-
|
|
298
|
-
@check_suffix([".sas"])
|
|
299
|
-
def read_sas(
|
|
300
|
-
self, file_path: str, *args: Any, **kwargs: Dict[str, Any]
|
|
301
|
-
) -> "DataFrame":
|
|
302
|
-
r"""Reads a SAS file and returns a DataFrame.
|
|
303
|
-
|
|
304
|
-
Args:
|
|
305
|
-
file_path (str): The path to the SAS file.
|
|
306
|
-
*args (Any): Additional positional arguments.
|
|
307
|
-
**kwargs (Dict[str, Any]): Additional keyword arguments.
|
|
308
|
-
|
|
309
|
-
Returns:
|
|
310
|
-
DataFrame: The DataFrame object.
|
|
311
|
-
"""
|
|
312
|
-
import pandas as pd
|
|
313
|
-
|
|
314
|
-
return pd.read_sas(file_path, *args, **kwargs)
|
|
315
|
-
|
|
316
|
-
@check_suffix([".pkl"])
|
|
317
|
-
def read_pickle(
|
|
318
|
-
self, file_path: str, *args: Any, **kwargs: Dict[str, Any]
|
|
319
|
-
) -> "DataFrame":
|
|
320
|
-
r"""Reads a Pickle file and returns a DataFrame.
|
|
321
|
-
|
|
322
|
-
Args:
|
|
323
|
-
file_path (str): The path to the Pickle file.
|
|
324
|
-
*args (Any): Additional positional arguments.
|
|
325
|
-
**kwargs (Dict[str, Any]): Additional keyword arguments.
|
|
326
|
-
|
|
327
|
-
Returns:
|
|
328
|
-
DataFrame: The DataFrame object.
|
|
329
|
-
"""
|
|
330
|
-
import pandas as pd
|
|
331
|
-
|
|
332
|
-
return pd.read_pickle(file_path, *args, **kwargs)
|
|
333
|
-
|
|
334
|
-
@check_suffix([".h5"])
|
|
335
|
-
def read_hdf(
|
|
336
|
-
self, file_path: str, *args: Any, **kwargs: Dict[str, Any]
|
|
337
|
-
) -> "DataFrame":
|
|
338
|
-
r"""Reads an HDF file and returns a DataFrame.
|
|
339
|
-
|
|
340
|
-
Args:
|
|
341
|
-
file_path (str): The path to the HDF file.
|
|
342
|
-
*args (Any): Additional positional arguments.
|
|
343
|
-
**kwargs (Dict[str, Any]): Additional keyword arguments.
|
|
344
|
-
|
|
345
|
-
Returns:
|
|
346
|
-
DataFrame: The DataFrame object.
|
|
347
|
-
"""
|
|
348
|
-
import pandas as pd
|
|
349
|
-
|
|
350
|
-
return pd.read_hdf(file_path, *args, **kwargs)
|
|
351
|
-
|
|
352
|
-
@check_suffix([".orc"])
|
|
353
|
-
def read_orc(
|
|
354
|
-
self, file_path: str, *args: Any, **kwargs: Dict[str, Any]
|
|
355
|
-
) -> "DataFrame":
|
|
356
|
-
r"""Reads an ORC file and returns a DataFrame.
|
|
357
|
-
|
|
358
|
-
Args:
|
|
359
|
-
file_path (str): The path to the ORC file.
|
|
360
|
-
*args (Any): Additional positional arguments.
|
|
361
|
-
**kwargs (Dict[str, Any]): Additional keyword arguments.
|
|
362
|
-
|
|
363
|
-
Returns:
|
|
364
|
-
DataFrame: The DataFrame object.
|
|
365
|
-
"""
|
|
366
|
-
import pandas as pd
|
|
367
|
-
|
|
368
|
-
return pd.read_orc(file_path, *args, **kwargs)
|
|
File without changes
|
|
File without changes
|