nvidia-nat-crewai 1.3.0a20251107__py3-none-any.whl → 1.4.0a20251121__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 nvidia-nat-crewai might be problematic. Click here for more details.
- nat/plugins/crewai/llm.py +25 -11
- {nvidia_nat_crewai-1.3.0a20251107.dist-info → nvidia_nat_crewai-1.4.0a20251121.dist-info}/METADATA +2 -2
- {nvidia_nat_crewai-1.3.0a20251107.dist-info → nvidia_nat_crewai-1.4.0a20251121.dist-info}/RECORD +8 -8
- {nvidia_nat_crewai-1.3.0a20251107.dist-info → nvidia_nat_crewai-1.4.0a20251121.dist-info}/WHEEL +0 -0
- {nvidia_nat_crewai-1.3.0a20251107.dist-info → nvidia_nat_crewai-1.4.0a20251121.dist-info}/entry_points.txt +0 -0
- {nvidia_nat_crewai-1.3.0a20251107.dist-info → nvidia_nat_crewai-1.4.0a20251121.dist-info}/licenses/LICENSE-3rd-party.txt +0 -0
- {nvidia_nat_crewai-1.3.0a20251107.dist-info → nvidia_nat_crewai-1.4.0a20251121.dist-info}/licenses/LICENSE.md +0 -0
- {nvidia_nat_crewai-1.3.0a20251107.dist-info → nvidia_nat_crewai-1.4.0a20251121.dist-info}/top_level.txt +0 -0
nat/plugins/crewai/llm.py
CHANGED
|
@@ -19,6 +19,7 @@ from typing import TypeVar
|
|
|
19
19
|
from nat.builder.builder import Builder
|
|
20
20
|
from nat.builder.framework_enum import LLMFrameworkEnum
|
|
21
21
|
from nat.cli.register_workflow import register_llm_client
|
|
22
|
+
from nat.data_models.common import get_secret_value
|
|
22
23
|
from nat.data_models.llm import LLMBaseConfig
|
|
23
24
|
from nat.data_models.retry_mixin import RetryMixin
|
|
24
25
|
from nat.data_models.thinking_mixin import ThinkingMixin
|
|
@@ -30,6 +31,7 @@ from nat.llm.utils.thinking import BaseThinkingInjector
|
|
|
30
31
|
from nat.llm.utils.thinking import FunctionArgumentWrapper
|
|
31
32
|
from nat.llm.utils.thinking import patch_with_thinking
|
|
32
33
|
from nat.utils.exception_handlers.automatic_retries import patch_with_retry
|
|
34
|
+
from nat.utils.responses_api import validate_no_responses_api
|
|
33
35
|
from nat.utils.type_utils import override
|
|
34
36
|
|
|
35
37
|
ModelType = TypeVar("ModelType")
|
|
@@ -74,9 +76,12 @@ async def azure_openai_crewai(llm_config: AzureOpenAIModelConfig, _builder: Buil
|
|
|
74
76
|
|
|
75
77
|
from crewai import LLM
|
|
76
78
|
|
|
79
|
+
validate_no_responses_api(llm_config, LLMFrameworkEnum.CREWAI)
|
|
80
|
+
|
|
77
81
|
# https://docs.crewai.com/en/concepts/llms#azure
|
|
78
82
|
|
|
79
|
-
api_key = llm_config.api_key
|
|
83
|
+
api_key = get_secret_value(llm_config.api_key) if llm_config.api_key else os.environ.get(
|
|
84
|
+
"AZURE_OPENAI_API_KEY") or os.environ.get("AZURE_API_KEY")
|
|
80
85
|
if api_key is None:
|
|
81
86
|
raise ValueError("Azure API key is not set")
|
|
82
87
|
os.environ["AZURE_API_KEY"] = api_key
|
|
@@ -93,17 +98,13 @@ async def azure_openai_crewai(llm_config: AzureOpenAIModelConfig, _builder: Buil
|
|
|
93
98
|
|
|
94
99
|
client = LLM(
|
|
95
100
|
**llm_config.model_dump(
|
|
96
|
-
exclude={
|
|
97
|
-
"type",
|
|
98
|
-
"api_key",
|
|
99
|
-
"azure_endpoint",
|
|
100
|
-
"azure_deployment",
|
|
101
|
-
"thinking",
|
|
102
|
-
},
|
|
101
|
+
exclude={"type", "api_key", "azure_endpoint", "azure_deployment", "thinking", "api_type", "api_version"},
|
|
103
102
|
by_alias=True,
|
|
104
103
|
exclude_none=True,
|
|
104
|
+
exclude_unset=True,
|
|
105
105
|
),
|
|
106
106
|
model=model,
|
|
107
|
+
api_version=llm_config.api_version,
|
|
107
108
|
)
|
|
108
109
|
|
|
109
110
|
yield _patch_llm_based_on_config(client, llm_config)
|
|
@@ -114,6 +115,8 @@ async def nim_crewai(llm_config: NIMModelConfig, _builder: Builder):
|
|
|
114
115
|
|
|
115
116
|
from crewai import LLM
|
|
116
117
|
|
|
118
|
+
validate_no_responses_api(llm_config, LLMFrameworkEnum.CREWAI)
|
|
119
|
+
|
|
117
120
|
# Because CrewAI uses a different environment variable for the API key, we need to set it here manually
|
|
118
121
|
if llm_config.api_key is None and "NVIDIA_NIM_API_KEY" not in os.environ:
|
|
119
122
|
nvidia_api_key = os.getenv("NVIDIA_API_KEY")
|
|
@@ -121,7 +124,12 @@ async def nim_crewai(llm_config: NIMModelConfig, _builder: Builder):
|
|
|
121
124
|
os.environ["NVIDIA_NIM_API_KEY"] = nvidia_api_key
|
|
122
125
|
|
|
123
126
|
client = LLM(
|
|
124
|
-
**llm_config.model_dump(
|
|
127
|
+
**llm_config.model_dump(
|
|
128
|
+
exclude={"type", "model_name", "thinking", "api_type"},
|
|
129
|
+
by_alias=True,
|
|
130
|
+
exclude_none=True,
|
|
131
|
+
exclude_unset=True,
|
|
132
|
+
),
|
|
125
133
|
model=f"nvidia_nim/{llm_config.model_name}",
|
|
126
134
|
)
|
|
127
135
|
|
|
@@ -133,7 +141,10 @@ async def openai_crewai(llm_config: OpenAIModelConfig, _builder: Builder):
|
|
|
133
141
|
|
|
134
142
|
from crewai import LLM
|
|
135
143
|
|
|
136
|
-
|
|
144
|
+
validate_no_responses_api(llm_config, LLMFrameworkEnum.CREWAI)
|
|
145
|
+
|
|
146
|
+
client = LLM(**llm_config.model_dump(
|
|
147
|
+
exclude={"type", "thinking", "api_type"}, by_alias=True, exclude_none=True, exclude_unset=True))
|
|
137
148
|
|
|
138
149
|
yield _patch_llm_based_on_config(client, llm_config)
|
|
139
150
|
|
|
@@ -143,6 +154,9 @@ async def litellm_crewai(llm_config: LiteLlmModelConfig, _builder: Builder):
|
|
|
143
154
|
|
|
144
155
|
from crewai import LLM
|
|
145
156
|
|
|
146
|
-
|
|
157
|
+
validate_no_responses_api(llm_config, LLMFrameworkEnum.CREWAI)
|
|
158
|
+
|
|
159
|
+
client = LLM(**llm_config.model_dump(
|
|
160
|
+
exclude={"type", "thinking", "api_type"}, by_alias=True, exclude_none=True, exclude_unset=True))
|
|
147
161
|
|
|
148
162
|
yield _patch_llm_based_on_config(client, llm_config)
|
{nvidia_nat_crewai-1.3.0a20251107.dist-info → nvidia_nat_crewai-1.4.0a20251121.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nvidia-nat-crewai
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0a20251121
|
|
4
4
|
Summary: Subpackage for CrewAI integration in NeMo Agent toolkit
|
|
5
5
|
Author: NVIDIA Corporation
|
|
6
6
|
Maintainer: NVIDIA Corporation
|
|
@@ -16,7 +16,7 @@ Requires-Python: <3.14,>=3.11
|
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE-3rd-party.txt
|
|
18
18
|
License-File: LICENSE.md
|
|
19
|
-
Requires-Dist: nvidia-nat[litellm]==v1.
|
|
19
|
+
Requires-Dist: nvidia-nat[litellm]==v1.4.0a20251121
|
|
20
20
|
Requires-Dist: crewai~=0.193.2
|
|
21
21
|
Dynamic: license-file
|
|
22
22
|
|
{nvidia_nat_crewai-1.3.0a20251107.dist-info → nvidia_nat_crewai-1.4.0a20251121.dist-info}/RECORD
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
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=il537F5tD9pFL1P9Q38ReOZasD-GgcBrm8BX_w0-xdo,8582
|
|
4
|
-
nat/plugins/crewai/llm.py,sha256=
|
|
4
|
+
nat/plugins/crewai/llm.py,sha256=WiIvjAGGYJ7Ofu9YtEwHoLv2xLNCANbOunu8v7Oxn54,6602
|
|
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.
|
|
8
|
-
nvidia_nat_crewai-1.
|
|
9
|
-
nvidia_nat_crewai-1.
|
|
10
|
-
nvidia_nat_crewai-1.
|
|
11
|
-
nvidia_nat_crewai-1.
|
|
12
|
-
nvidia_nat_crewai-1.
|
|
13
|
-
nvidia_nat_crewai-1.
|
|
7
|
+
nvidia_nat_crewai-1.4.0a20251121.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
|
|
8
|
+
nvidia_nat_crewai-1.4.0a20251121.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
9
|
+
nvidia_nat_crewai-1.4.0a20251121.dist-info/METADATA,sha256=3AP03dQTtuR1nGrtsi5aqsdhuWQaZZSug_KtwNTkzYs,1922
|
|
10
|
+
nvidia_nat_crewai-1.4.0a20251121.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
11
|
+
nvidia_nat_crewai-1.4.0a20251121.dist-info/entry_points.txt,sha256=YF5PUdQGr_OUDXB4TykElHJTsKT8yKkuE0bMX5n_RXs,58
|
|
12
|
+
nvidia_nat_crewai-1.4.0a20251121.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
|
|
13
|
+
nvidia_nat_crewai-1.4.0a20251121.dist-info/RECORD,,
|
{nvidia_nat_crewai-1.3.0a20251107.dist-info → nvidia_nat_crewai-1.4.0a20251121.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|