aiqtoolkit-crewai 1.2.0a20250707__py3-none-any.whl → 1.2.0a20250731__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.
aiq/plugins/crewai/llm.py CHANGED
@@ -18,8 +18,10 @@ import os
18
18
  from aiq.builder.builder import Builder
19
19
  from aiq.builder.framework_enum import LLMFrameworkEnum
20
20
  from aiq.cli.register_workflow import register_llm_client
21
+ from aiq.data_models.retry_mixin import RetryMixin
21
22
  from aiq.llm.nim_llm import NIMModelConfig
22
23
  from aiq.llm.openai_llm import OpenAIModelConfig
24
+ from aiq.utils.exception_handlers.automatic_retries import patch_with_retry
23
25
 
24
26
 
25
27
  @register_llm_client(config_type=NIMModelConfig, wrapper_type=LLMFrameworkEnum.CREWAI)
@@ -45,7 +47,16 @@ async def nim_crewai(llm_config: NIMModelConfig, builder: Builder):
45
47
  # Transfer the key to the correct environment variable for LiteLLM
46
48
  os.environ["NVIDIA_NIM_API_KEY"] = nvidai_api_key
47
49
 
48
- yield LLM(**config_obj)
50
+ client = LLM(**config_obj)
51
+
52
+ if isinstance(llm_config, RetryMixin):
53
+
54
+ client = patch_with_retry(client,
55
+ retries=llm_config.num_retries,
56
+ retry_codes=llm_config.retry_on_status_codes,
57
+ retry_on_messages=llm_config.retry_on_errors)
58
+
59
+ yield client
49
60
 
50
61
 
51
62
  @register_llm_client(config_type=OpenAIModelConfig, wrapper_type=LLMFrameworkEnum.CREWAI)
@@ -57,4 +68,13 @@ async def openai_crewai(llm_config: OpenAIModelConfig, builder: Builder):
57
68
  **llm_config.model_dump(exclude={"type"}, by_alias=True),
58
69
  }
59
70
 
60
- yield LLM(**config_obj)
71
+ client = LLM(**config_obj)
72
+
73
+ if isinstance(llm_config, RetryMixin):
74
+
75
+ client = patch_with_retry(client,
76
+ retries=llm_config.num_retries,
77
+ retry_codes=llm_config.retry_on_status_codes,
78
+ retry_on_messages=llm_config.retry_on_errors)
79
+
80
+ yield client
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiqtoolkit-crewai
3
- Version: 1.2.0a20250707
3
+ Version: 1.2.0a20250731
4
4
  Summary: Subpackage for CrewAI integration in AIQtoolkit
5
5
  Keywords: ai,rag,agents
6
6
  Classifier: Programming Language :: Python
7
7
  Requires-Python: <3.13,>=3.11
8
8
  Description-Content-Type: text/markdown
9
- Requires-Dist: aiqtoolkit==v1.2.0a20250707
9
+ Requires-Dist: aiqtoolkit==v1.2.0a20250731
10
10
  Requires-Dist: crewai~=0.95.0
11
11
 
12
12
  <!--
@@ -1,11 +1,11 @@
1
1
  aiq/meta/pypi.md,sha256=mAJKaBmH4UyD5wCe3_BfPGv3ihPTg8BNfS3zu2Z4-70,1083
2
2
  aiq/plugins/crewai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  aiq/plugins/crewai/crewai_callback_handler.py,sha256=mFNWmtDsOUVsa6LKw7BBjBl7lsytAEaYKZfPgl9yY1o,8396
4
- aiq/plugins/crewai/llm.py,sha256=a9M3FTvd0L1W2XGTf7hnUoCvaD-CXSp5ClNBao53QOg,2205
4
+ aiq/plugins/crewai/llm.py,sha256=FsNt5TFYNpPU_FxB0dW0Cq_ZkviwJOmvivSYcVPtPvg,3000
5
5
  aiq/plugins/crewai/register.py,sha256=RKXyuaXy4ftA5IL2RrCofIBjpie_-2lP9YZoHAiyPU0,863
6
6
  aiq/plugins/crewai/tool_wrapper.py,sha256=LuL5VHHxOXf-CBd5E6kA6OsUz2N_aGin_r5KF59srL0,1569
7
- aiqtoolkit_crewai-1.2.0a20250707.dist-info/METADATA,sha256=ECNYAPLWYy7GwCR4PTNIwVYCuHoPWDfLH1jNmkeLrqI,1421
8
- aiqtoolkit_crewai-1.2.0a20250707.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- aiqtoolkit_crewai-1.2.0a20250707.dist-info/entry_points.txt,sha256=gY-k52LFDNWYEcSYiFs78LRKWeGijnGCkwcOroG4T3E,58
10
- aiqtoolkit_crewai-1.2.0a20250707.dist-info/top_level.txt,sha256=fo7AzYcNhZ_tRWrhGumtxwnxMew4xrT1iwouDy_f0Kc,4
11
- aiqtoolkit_crewai-1.2.0a20250707.dist-info/RECORD,,
7
+ aiqtoolkit_crewai-1.2.0a20250731.dist-info/METADATA,sha256=k4l4vBcngMbiF2HcirwDph-CNb-IZ2FrwXhPtJvTUlg,1421
8
+ aiqtoolkit_crewai-1.2.0a20250731.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ aiqtoolkit_crewai-1.2.0a20250731.dist-info/entry_points.txt,sha256=gY-k52LFDNWYEcSYiFs78LRKWeGijnGCkwcOroG4T3E,58
10
+ aiqtoolkit_crewai-1.2.0a20250731.dist-info/top_level.txt,sha256=fo7AzYcNhZ_tRWrhGumtxwnxMew4xrT1iwouDy_f0Kc,4
11
+ aiqtoolkit_crewai-1.2.0a20250731.dist-info/RECORD,,