nvidia-nat-crewai 1.3.0a20250906__py3-none-any.whl → 1.3.0a20250909__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.
nat/plugins/crewai/llm.py CHANGED
@@ -66,15 +66,6 @@ async def azure_openai_crewai(llm_config: AzureOpenAIModelConfig, _builder: Buil
66
66
 
67
67
  # https://docs.crewai.com/en/concepts/llms#azure
68
68
 
69
- config_obj = {
70
- **llm_config.model_dump(exclude={
71
- "type",
72
- "api_key",
73
- "azure_endpoint",
74
- "azure_deployment",
75
- }, by_alias=True),
76
- }
77
-
78
69
  api_key = llm_config.api_key or os.environ.get("AZURE_OPENAI_API_KEY") or os.environ.get("AZURE_API_KEY")
79
70
  if api_key is None:
80
71
  raise ValueError("Azure API key is not set")
@@ -89,9 +80,20 @@ async def azure_openai_crewai(llm_config: AzureOpenAIModelConfig, _builder: Buil
89
80
  model = llm_config.azure_deployment or os.environ.get("AZURE_MODEL_DEPLOYMENT")
90
81
  if model is None:
91
82
  raise ValueError("Azure model deployment is not set")
92
- config_obj["model"] = model
93
83
 
94
- client = LLM(**config_obj)
84
+ client = LLM(
85
+ **llm_config.model_dump(
86
+ exclude={
87
+ "type",
88
+ "api_key",
89
+ "azure_endpoint",
90
+ "azure_deployment",
91
+ "thinking",
92
+ },
93
+ by_alias=True,
94
+ ),
95
+ model=model,
96
+ )
95
97
 
96
98
  yield _patch_llm_based_on_config(client, llm_config)
97
99
 
@@ -101,18 +103,16 @@ async def nim_crewai(llm_config: NIMModelConfig, _builder: Builder):
101
103
 
102
104
  from crewai import LLM
103
105
 
104
- config_obj = {
105
- **llm_config.model_dump(exclude={"type"}, by_alias=True),
106
- "model": f"nvidia_nim/{llm_config.model_name}",
107
- }
108
-
109
106
  # Because CrewAI uses a different environment variable for the API key, we need to set it here manually
110
- if config_obj.get("api_key") is None and "NVIDIA_NIM_API_KEY" not in os.environ:
107
+ if llm_config.api_key is None and "NVIDIA_NIM_API_KEY" not in os.environ:
111
108
  nvidia_api_key = os.getenv("NVIDIA_API_KEY")
112
109
  if nvidia_api_key is not None:
113
110
  os.environ["NVIDIA_NIM_API_KEY"] = nvidia_api_key
114
111
 
115
- client = LLM(**config_obj)
112
+ client = LLM(
113
+ **llm_config.model_dump(exclude={"type", "model_name", "thinking"}, by_alias=True),
114
+ model=f"nvidia_nim/{llm_config.model_name}",
115
+ )
116
116
 
117
117
  yield _patch_llm_based_on_config(client, llm_config)
118
118
 
@@ -122,10 +122,6 @@ async def openai_crewai(llm_config: OpenAIModelConfig, _builder: Builder):
122
122
 
123
123
  from crewai import LLM
124
124
 
125
- config_obj = {
126
- **llm_config.model_dump(exclude={"type"}, by_alias=True),
127
- }
128
-
129
- client = LLM(**config_obj)
125
+ client = LLM(**llm_config.model_dump(exclude={"type", "thinking"}, by_alias=True))
130
126
 
131
127
  yield _patch_llm_based_on_config(client, llm_config)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nvidia-nat-crewai
3
- Version: 1.3.0a20250906
3
+ Version: 1.3.0a20250909
4
4
  Summary: Subpackage for CrewAI integration in NeMo Agent toolkit
5
5
  Keywords: ai,rag,agents
6
6
  Classifier: Programming Language :: Python
@@ -9,7 +9,7 @@ Classifier: Programming Language :: Python :: 3.12
9
9
  Classifier: Programming Language :: Python :: 3.13
10
10
  Requires-Python: <3.14,>=3.11
11
11
  Description-Content-Type: text/markdown
12
- Requires-Dist: nvidia-nat==v1.3.0a20250906
12
+ Requires-Dist: nvidia-nat==v1.3.0a20250909
13
13
  Requires-Dist: crewai~=0.95.0
14
14
 
15
15
  <!--
@@ -1,11 +1,11 @@
1
1
  nat/meta/pypi.md,sha256=T68FnThRzDGFf1LR8u-okM-r11-skSnKqSyI6HOktQY,1107
2
2
  nat/plugins/crewai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  nat/plugins/crewai/crewai_callback_handler.py,sha256=nBpWWpYQ-yrAG1-6G3kvcYrb0jJQzckd_ftojvGVWj4,8333
4
- nat/plugins/crewai/llm.py,sha256=Snz67QawrXGd7SmeG7jC9CKeZ19fAiAmjuht9kIXfQc,5024
4
+ nat/plugins/crewai/llm.py,sha256=5-73k7G0kcztcFPEgyQs_cVzV_Qz8ve9uRrjG5AM28c,5010
5
5
  nat/plugins/crewai/register.py,sha256=_R3bhGmz___696_NwyIcpw3koMBiWqIFoWEFJ0VAgXs,831
6
6
  nat/plugins/crewai/tool_wrapper.py,sha256=BNKEPQQCLKtXNzGDAKBLCdmGJXe9lBOVI1hObha8hoI,1569
7
- nvidia_nat_crewai-1.3.0a20250906.dist-info/METADATA,sha256=cHgcFH7qeTSyRO6AkPo0qOqn4kypWZARhEGmj1zS-Dk,1606
8
- nvidia_nat_crewai-1.3.0a20250906.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- nvidia_nat_crewai-1.3.0a20250906.dist-info/entry_points.txt,sha256=YF5PUdQGr_OUDXB4TykElHJTsKT8yKkuE0bMX5n_RXs,58
10
- nvidia_nat_crewai-1.3.0a20250906.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
11
- nvidia_nat_crewai-1.3.0a20250906.dist-info/RECORD,,
7
+ nvidia_nat_crewai-1.3.0a20250909.dist-info/METADATA,sha256=2t73T_buu4Yjqb-q8I5JKD4T5Fzjdo0qjnbeh5VqDZY,1606
8
+ nvidia_nat_crewai-1.3.0a20250909.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ nvidia_nat_crewai-1.3.0a20250909.dist-info/entry_points.txt,sha256=YF5PUdQGr_OUDXB4TykElHJTsKT8yKkuE0bMX5n_RXs,58
10
+ nvidia_nat_crewai-1.3.0a20250909.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
11
+ nvidia_nat_crewai-1.3.0a20250909.dist-info/RECORD,,