camel-ai 0.2.56__py3-none-any.whl → 0.2.57__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 CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  from camel.logger import disable_logging, enable_logging, set_log_level
16
16
 
17
- __version__ = '0.2.56'
17
+ __version__ = '0.2.57'
18
18
 
19
19
  __all__ = [
20
20
  '__version__',
@@ -1311,7 +1311,9 @@ class ChatAgent(BaseAgent):
1311
1311
  response_id: str = ""
1312
1312
  # All choices in one response share one role
1313
1313
  for chunk in response:
1314
- response_id = chunk.id
1314
+ # Some model platforms like siliconflow may return None for the
1315
+ # chunk.id
1316
+ response_id = chunk.id if chunk.id else str(uuid.uuid4())
1315
1317
  self._handle_chunk(
1316
1318
  chunk, content_dict, finish_reasons_dict, output_messages
1317
1319
  )
@@ -1351,7 +1353,9 @@ class ChatAgent(BaseAgent):
1351
1353
  response_id: str = ""
1352
1354
  # All choices in one response share one role
1353
1355
  async for chunk in response:
1354
- response_id = chunk.id
1356
+ # Some model platforms like siliconflow may return None for the
1357
+ # chunk.id
1358
+ response_id = chunk.id if chunk.id else str(uuid.uuid4())
1355
1359
  self._handle_chunk(
1356
1360
  chunk, content_dict, finish_reasons_dict, output_messages
1357
1361
  )
@@ -125,6 +125,11 @@ class GeminiModel(OpenAICompatibleModel):
125
125
  )
126
126
  messages = self._process_messages(messages)
127
127
  if response_format:
128
+ if tools:
129
+ raise ValueError(
130
+ "Gemini does not support function calling with "
131
+ "response format."
132
+ )
128
133
  return self._request_parse(messages, response_format)
129
134
  else:
130
135
  return self._request_chat_completion(messages, tools)
@@ -155,6 +160,11 @@ class GeminiModel(OpenAICompatibleModel):
155
160
  )
156
161
  messages = self._process_messages(messages)
157
162
  if response_format:
163
+ if tools:
164
+ raise ValueError(
165
+ "Gemini does not support function calling with "
166
+ "response format."
167
+ )
158
168
  return await self._arequest_parse(messages, response_format)
159
169
  else:
160
170
  return await self._arequest_chat_completion(messages, tools)
camel/types/enums.py CHANGED
@@ -15,8 +15,11 @@ import os
15
15
  from enum import Enum, EnumMeta
16
16
  from typing import cast
17
17
 
18
+ from camel.logger import get_logger
18
19
  from camel.types.unified_model_type import UnifiedModelType
19
20
 
21
+ logger = get_logger(__name__)
22
+
20
23
 
21
24
  class RoleType(Enum):
22
25
  ASSISTANT = "assistant"
@@ -1200,7 +1203,11 @@ class ModelType(UnifiedModelType, Enum):
1200
1203
  }:
1201
1204
  return 10_000_000
1202
1205
  else:
1203
- raise ValueError("Unknown model type")
1206
+ logger.warning(
1207
+ f"Unknown model type {self}, set maximum token limit "
1208
+ f"to 999_999_999"
1209
+ )
1210
+ return 999_999_999
1204
1211
 
1205
1212
 
1206
1213
  class EmbeddingModelType(Enum):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: camel-ai
3
- Version: 0.2.56
3
+ Version: 0.2.57
4
4
  Summary: Communicative Agents for AI Society Study
5
5
  Project-URL: Homepage, https://www.camel-ai.org/
6
6
  Project-URL: Repository, https://github.com/camel-ai/camel
@@ -1,4 +1,4 @@
1
- camel/__init__.py,sha256=YtkzoktMmiyIItoI8OWaV4sxG0yQ8KBjS65mn83J5Jo,912
1
+ camel/__init__.py,sha256=w5hgs58ruWalSpq12-blpBnUVKcz68enl_rI6eePmx0,912
2
2
  camel/generators.py,sha256=JRqj9_m1PF4qT6UtybzTQ-KBT9MJQt18OAAYvQ_fr2o,13844
3
3
  camel/human.py,sha256=9X09UmxI2JqQnhrFfnZ3B9EzFmVfdSWQcjLWTIXKXe0,4962
4
4
  camel/logger.py,sha256=rZVeOVYuQ9RYJ5Tqyv0usqy0g4zaVEq4qSfZ9nd2640,5755
@@ -7,7 +7,7 @@ camel/agents/__init__.py,sha256=64weKqdvmpZcGWyVkO-OKASAmVUdrQjv60JApgPk_SA,1644
7
7
  camel/agents/_types.py,sha256=ryPRmEXnpNtbFT23GoAcwK-zxWWsIOqYu64mxMx_PhI,1430
8
8
  camel/agents/_utils.py,sha256=AR7Qqgbkmn4X2edYUQf1rdksGUyV5hm3iK1z-Dn0Mcg,6266
9
9
  camel/agents/base.py,sha256=c4bJYL3G3Z41SaFdMPMn8ZjLdFiFaVOFO6EQIfuCVR8,1124
10
- camel/agents/chat_agent.py,sha256=s19qJ0eK_bVX6P-yIoazO4cMUeAumwVY1XFNVKaDfVo,59281
10
+ camel/agents/chat_agent.py,sha256=bumSJSWfyc_8jGUX4Gb66Tma8pAfXGf4UqyGkyWrOog,59549
11
11
  camel/agents/critic_agent.py,sha256=qFVlHlQo0CVgmPWfWYLT8_oP_KyzCLFsQw_nN_vu5Bs,7487
12
12
  camel/agents/deductive_reasoner_agent.py,sha256=6BZGaq1hR6hKJuQtOfoYQnk_AkZpw_Mr7mUy2MspQgs,13540
13
13
  camel/agents/embodied_agent.py,sha256=XBxBu5ZMmSJ4B2U3Z7SMwvLlgp6yNpaBe8HNQmY9CZA,7536
@@ -171,7 +171,7 @@ camel/models/base_model.py,sha256=eDeUlgH8iS0Stk6zommzqce4dfD4Qj51tvgXUs5ys4s,14
171
171
  camel/models/cohere_model.py,sha256=OgRHxlPrei-NT5UVDFf6lVR88k6eKnmcZMyFj4XmONE,14880
172
172
  camel/models/deepseek_model.py,sha256=TLs-674MBM-vDxBkMwWn63q51HlQucE3HDxmFMe5c9o,9222
173
173
  camel/models/fish_audio_model.py,sha256=RCwORRIdCbjZXWWjjctpksPI2DnS0b68JjxunHBQ1xk,5981
174
- camel/models/gemini_model.py,sha256=WlLpFgkRbOiEUXtA7wsV4FQbIJ4UYjR6TgZQpbCEpto,10459
174
+ camel/models/gemini_model.py,sha256=f7rMcVpZIP0wVJGdz1pT0gGXtXuZjEc-_Z7ca9UTn8g,10823
175
175
  camel/models/groq_model.py,sha256=596VqRJ_yxv9Jz3sG7UVXVkIjZI1nX7zQAD709m4uig,3774
176
176
  camel/models/internlm_model.py,sha256=l7WjJ7JISCCqkezhEXzmjj_Mvhqhxxhsg4NuenP7w9w,4374
177
177
  camel/models/litellm_model.py,sha256=rlSt3EnBAAYyoIxq0_XTuRmRnc4RWvD2Z14yIrI_7uw,5942
@@ -375,7 +375,7 @@ camel/toolkits/open_api_specs/web_scraper/openapi.yaml,sha256=u_WalQ01e8W1D27VnZ
375
375
  camel/toolkits/open_api_specs/web_scraper/paths/__init__.py,sha256=OKCZrQCDwaWtXIN_2rA9FSqEvgpQRieRoHh7Ek6N16A,702
376
376
  camel/toolkits/open_api_specs/web_scraper/paths/scraper.py,sha256=aWy1_ppV4NVVEZfnbN3tu9XA9yAPAC9bRStJ5JuXMRU,1117
377
377
  camel/types/__init__.py,sha256=Xdkjh7TQDAQUQ7pFnt7i_rLjjOhsJJnhzusARcFc94Q,2311
378
- camel/types/enums.py,sha256=ULkVZwiCBO6tjemF8V_A7BlYsSWJH1owp2UVDE39N4A,58317
378
+ camel/types/enums.py,sha256=flMhlgYsmNn_5RdAMTR2_W-Zk4jzuLEtbRzyAEDt2lY,58511
379
379
  camel/types/openai_types.py,sha256=8ZFzLe-zGmKNPfuVZFzxlxAX98lGf18gtrPhOgMmzus,2104
380
380
  camel/types/unified_model_type.py,sha256=TpiUmJ3IuX8LNLtTUeUcVM7U82r4ClSq3ZQlNX3ODKs,5351
381
381
  camel/types/agents/__init__.py,sha256=cbvVkogPoZgcwZrgxLH6EtpGXk0kavF79nOic0Dc1vg,786
@@ -399,7 +399,7 @@ camel/verifiers/math_verifier.py,sha256=tA1D4S0sm8nsWISevxSN0hvSVtIUpqmJhzqfbuMo
399
399
  camel/verifiers/models.py,sha256=GdxYPr7UxNrR1577yW4kyroRcLGfd-H1GXgv8potDWU,2471
400
400
  camel/verifiers/physics_verifier.py,sha256=c1grrRddcrVN7szkxhv2QirwY9viIRSITWeWFF5HmLs,30187
401
401
  camel/verifiers/python_verifier.py,sha256=ogTz77wODfEcDN4tMVtiSkRQyoiZbHPY2fKybn59lHw,20558
402
- camel_ai-0.2.56.dist-info/METADATA,sha256=EJjtjqfftYHbjaVC_Nv8Kavlpf32Kj685q-2sE98GH4,44254
403
- camel_ai-0.2.56.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
404
- camel_ai-0.2.56.dist-info/licenses/LICENSE,sha256=id0nB2my5kG0xXeimIu5zZrbHLS6EQvxvkKkzIHaT2k,11343
405
- camel_ai-0.2.56.dist-info/RECORD,,
402
+ camel_ai-0.2.57.dist-info/METADATA,sha256=3p4MukfjBAa2HETSYZYTEL-DBzUWxMxuLmfxlbZhRfo,44254
403
+ camel_ai-0.2.57.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
404
+ camel_ai-0.2.57.dist-info/licenses/LICENSE,sha256=id0nB2my5kG0xXeimIu5zZrbHLS6EQvxvkKkzIHaT2k,11343
405
+ camel_ai-0.2.57.dist-info/RECORD,,