nvidia-nat-semantic-kernel 1.3a20250819__py3-none-any.whl → 1.3.0.dev2__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-semantic-kernel might be problematic. Click here for more details.

@@ -17,20 +17,38 @@ from nat.builder.builder import Builder
17
17
  from nat.builder.framework_enum import LLMFrameworkEnum
18
18
  from nat.cli.register_workflow import register_llm_client
19
19
  from nat.data_models.retry_mixin import RetryMixin
20
+ from nat.llm.azure_openai_llm import AzureOpenAIModelConfig
20
21
  from nat.llm.openai_llm import OpenAIModelConfig
21
22
  from nat.utils.exception_handlers.automatic_retries import patch_with_retry
22
23
 
23
24
 
25
+ @register_llm_client(config_type=AzureOpenAIModelConfig, wrapper_type=LLMFrameworkEnum.SEMANTIC_KERNEL)
26
+ async def azure_openai_semantic_kernel(llm_config: AzureOpenAIModelConfig, _builder: Builder):
27
+
28
+ from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion
29
+
30
+ llm = AzureChatCompletion(
31
+ api_key=llm_config.api_key,
32
+ api_version=llm_config.api_version,
33
+ endpoint=llm_config.azure_endpoint,
34
+ deployment_name=llm_config.azure_deployment,
35
+ )
36
+
37
+ if isinstance(llm_config, RetryMixin):
38
+ llm = patch_with_retry(llm,
39
+ retries=llm_config.num_retries,
40
+ retry_codes=llm_config.retry_on_status_codes,
41
+ retry_on_messages=llm_config.retry_on_errors)
42
+
43
+ yield llm
44
+
45
+
24
46
  @register_llm_client(config_type=OpenAIModelConfig, wrapper_type=LLMFrameworkEnum.SEMANTIC_KERNEL)
25
- async def openai_semantic_kernel(llm_config: OpenAIModelConfig, builder: Builder):
47
+ async def openai_semantic_kernel(llm_config: OpenAIModelConfig, _builder: Builder):
26
48
 
27
49
  from semantic_kernel.connectors.ai.open_ai import OpenAIChatCompletion
28
50
 
29
- config_obj = {
30
- **llm_config.model_dump(exclude={"type"}, by_alias=True),
31
- }
32
-
33
- llm = OpenAIChatCompletion(ai_model_id=config_obj.get("model"))
51
+ llm = OpenAIChatCompletion(ai_model_id=llm_config.model_name)
34
52
 
35
53
  if isinstance(llm_config, RetryMixin):
36
54
  llm = patch_with_retry(llm,
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nvidia-nat-semantic-kernel
3
- Version: 1.3a20250819
3
+ Version: 1.3.0.dev2
4
4
  Summary: Subpackage for Semantic-Kernel integration in NeMo Agent toolkit
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: nvidia-nat==v1.3a20250819
9
+ Requires-Dist: nvidia-nat==v1.3.0-dev2
10
10
  Requires-Dist: semantic-kernel~=1.24.0
11
11
 
12
12
  <!--
@@ -0,0 +1,10 @@
1
+ nat/meta/pypi.md,sha256=rFmwVds3akmoz0TE1SOjCjCUbB6SWfaRex_Vi5OfUAk,1116
2
+ nat/plugins/semantic_kernel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ nat/plugins/semantic_kernel/llm.py,sha256=5HNry_FGjgGMWL1yjF85zLyNsU2I0Fd1Y2FIAdeHJEQ,2514
4
+ nat/plugins/semantic_kernel/register.py,sha256=RKXyuaXy4ftA5IL2RrCofIBjpie_-2lP9YZoHAiyPU0,863
5
+ nat/plugins/semantic_kernel/tool_wrapper.py,sha256=PEtzcYhZ73ftsg80Jz9yWTWQtks1y7PDZdS89seFb3I,7175
6
+ nvidia_nat_semantic_kernel-1.3.0.dev2.dist-info/METADATA,sha256=IYpz6ttyVDq8Uf9tJ3ESiRnI9-k9Mu06-OnxdzhDmz8,1481
7
+ nvidia_nat_semantic_kernel-1.3.0.dev2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
+ nvidia_nat_semantic_kernel-1.3.0.dev2.dist-info/entry_points.txt,sha256=0jCtQBAn5Ohs9XoVCF34WvNCV33OwAsH8bjFzgw_ByM,76
9
+ nvidia_nat_semantic_kernel-1.3.0.dev2.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
10
+ nvidia_nat_semantic_kernel-1.3.0.dev2.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- nat/meta/pypi.md,sha256=rFmwVds3akmoz0TE1SOjCjCUbB6SWfaRex_Vi5OfUAk,1116
2
- nat/plugins/semantic_kernel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- nat/plugins/semantic_kernel/llm.py,sha256=C2ISvuCkz_YN0yOgyf1QJPtbJmX_1kgLpQumwpKfcOI,1744
4
- nat/plugins/semantic_kernel/register.py,sha256=RKXyuaXy4ftA5IL2RrCofIBjpie_-2lP9YZoHAiyPU0,863
5
- nat/plugins/semantic_kernel/tool_wrapper.py,sha256=PEtzcYhZ73ftsg80Jz9yWTWQtks1y7PDZdS89seFb3I,7175
6
- nvidia_nat_semantic_kernel-1.3a20250819.dist-info/METADATA,sha256=xpBRgLqdAeYExPSyS_5wOuKbMxkfinlNN_Ncs1q9cbM,1485
7
- nvidia_nat_semantic_kernel-1.3a20250819.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
- nvidia_nat_semantic_kernel-1.3a20250819.dist-info/entry_points.txt,sha256=0jCtQBAn5Ohs9XoVCF34WvNCV33OwAsH8bjFzgw_ByM,76
9
- nvidia_nat_semantic_kernel-1.3a20250819.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
10
- nvidia_nat_semantic_kernel-1.3a20250819.dist-info/RECORD,,