nvidia-nat-semantic-kernel 1.3.0a20251009__py3-none-any.whl → 1.4.0a20251104__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.
- nat/plugins/semantic_kernel/llm.py +9 -5
- {nvidia_nat_semantic_kernel-1.3.0a20251009.dist-info → nvidia_nat_semantic_kernel-1.4.0a20251104.dist-info}/METADATA +2 -2
- {nvidia_nat_semantic_kernel-1.3.0a20251009.dist-info → nvidia_nat_semantic_kernel-1.4.0a20251104.dist-info}/RECORD +8 -8
- {nvidia_nat_semantic_kernel-1.3.0a20251009.dist-info → nvidia_nat_semantic_kernel-1.4.0a20251104.dist-info}/WHEEL +0 -0
- {nvidia_nat_semantic_kernel-1.3.0a20251009.dist-info → nvidia_nat_semantic_kernel-1.4.0a20251104.dist-info}/entry_points.txt +0 -0
- {nvidia_nat_semantic_kernel-1.3.0a20251009.dist-info → nvidia_nat_semantic_kernel-1.4.0a20251104.dist-info}/licenses/LICENSE-3rd-party.txt +0 -0
- {nvidia_nat_semantic_kernel-1.3.0a20251009.dist-info → nvidia_nat_semantic_kernel-1.4.0a20251104.dist-info}/licenses/LICENSE.md +0 -0
- {nvidia_nat_semantic_kernel-1.3.0a20251009.dist-info → nvidia_nat_semantic_kernel-1.4.0a20251104.dist-info}/top_level.txt +0 -0
|
@@ -18,6 +18,7 @@ from typing import TypeVar
|
|
|
18
18
|
from nat.builder.builder import Builder
|
|
19
19
|
from nat.builder.framework_enum import LLMFrameworkEnum
|
|
20
20
|
from nat.cli.register_workflow import register_llm_client
|
|
21
|
+
from nat.data_models.common import get_secret_value
|
|
21
22
|
from nat.data_models.llm import LLMBaseConfig
|
|
22
23
|
from nat.data_models.retry_mixin import RetryMixin
|
|
23
24
|
from nat.data_models.thinking_mixin import ThinkingMixin
|
|
@@ -27,6 +28,7 @@ from nat.llm.utils.thinking import BaseThinkingInjector
|
|
|
27
28
|
from nat.llm.utils.thinking import FunctionArgumentWrapper
|
|
28
29
|
from nat.llm.utils.thinking import patch_with_thinking
|
|
29
30
|
from nat.utils.exception_handlers.automatic_retries import patch_with_retry
|
|
31
|
+
from nat.utils.responses_api import validate_no_responses_api
|
|
30
32
|
from nat.utils.type_utils import override
|
|
31
33
|
|
|
32
34
|
ModelType = TypeVar("ModelType")
|
|
@@ -35,8 +37,6 @@ ModelType = TypeVar("ModelType")
|
|
|
35
37
|
def _patch_llm_based_on_config(client: ModelType, llm_config: LLMBaseConfig) -> ModelType:
|
|
36
38
|
|
|
37
39
|
from semantic_kernel.contents.chat_history import ChatHistory
|
|
38
|
-
from semantic_kernel.contents.chat_message_content import ChatMessageContent
|
|
39
|
-
from semantic_kernel.contents.utils.author_role import AuthorRole
|
|
40
40
|
|
|
41
41
|
class SemanticKernelThinkingInjector(BaseThinkingInjector):
|
|
42
42
|
|
|
@@ -61,8 +61,8 @@ def _patch_llm_based_on_config(client: ModelType, llm_config: LLMBaseConfig) ->
|
|
|
61
61
|
return FunctionArgumentWrapper(new_messages, *args, **kwargs)
|
|
62
62
|
else:
|
|
63
63
|
new_messages = ChatHistory(
|
|
64
|
-
|
|
65
|
-
system_message=chat_history.system_message,
|
|
64
|
+
chat_history.messages,
|
|
65
|
+
system_message=f"{self.system_prompt}\n\n{chat_history.system_message}",
|
|
66
66
|
)
|
|
67
67
|
return FunctionArgumentWrapper(new_messages, *args, **kwargs)
|
|
68
68
|
|
|
@@ -91,8 +91,10 @@ async def azure_openai_semantic_kernel(llm_config: AzureOpenAIModelConfig, _buil
|
|
|
91
91
|
|
|
92
92
|
from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion
|
|
93
93
|
|
|
94
|
+
validate_no_responses_api(llm_config, LLMFrameworkEnum.SEMANTIC_KERNEL)
|
|
95
|
+
|
|
94
96
|
llm = AzureChatCompletion(
|
|
95
|
-
api_key=llm_config.api_key,
|
|
97
|
+
api_key=get_secret_value(llm_config.api_key),
|
|
96
98
|
api_version=llm_config.api_version,
|
|
97
99
|
endpoint=llm_config.azure_endpoint,
|
|
98
100
|
deployment_name=llm_config.azure_deployment,
|
|
@@ -106,6 +108,8 @@ async def openai_semantic_kernel(llm_config: OpenAIModelConfig, _builder: Builde
|
|
|
106
108
|
|
|
107
109
|
from semantic_kernel.connectors.ai.open_ai import OpenAIChatCompletion
|
|
108
110
|
|
|
111
|
+
validate_no_responses_api(llm_config, LLMFrameworkEnum.SEMANTIC_KERNEL)
|
|
112
|
+
|
|
109
113
|
llm = OpenAIChatCompletion(ai_model_id=llm_config.model_name)
|
|
110
114
|
|
|
111
115
|
yield _patch_llm_based_on_config(llm, llm_config)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nvidia-nat-semantic-kernel
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0a20251104
|
|
4
4
|
Summary: Subpackage for Semantic-Kernel 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==v1.
|
|
19
|
+
Requires-Dist: nvidia-nat==v1.4.0a20251104
|
|
20
20
|
Requires-Dist: semantic-kernel~=1.35
|
|
21
21
|
Dynamic: license-file
|
|
22
22
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
nat/meta/pypi.md,sha256=rFmwVds3akmoz0TE1SOjCjCUbB6SWfaRex_Vi5OfUAk,1116
|
|
2
2
|
nat/plugins/semantic_kernel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
nat/plugins/semantic_kernel/llm.py,sha256=
|
|
3
|
+
nat/plugins/semantic_kernel/llm.py,sha256=nuadrIqpc4SXQT6EWii8M7I6_cCZR0qPArZtfnpKUGo,4908
|
|
4
4
|
nat/plugins/semantic_kernel/register.py,sha256=_R3bhGmz___696_NwyIcpw3koMBiWqIFoWEFJ0VAgXs,831
|
|
5
5
|
nat/plugins/semantic_kernel/tool_wrapper.py,sha256=N6WGEdveLYFKtOKjxEMMNT5vG8QJUoSddtswQ1fPEzQ,7121
|
|
6
|
-
nvidia_nat_semantic_kernel-1.
|
|
7
|
-
nvidia_nat_semantic_kernel-1.
|
|
8
|
-
nvidia_nat_semantic_kernel-1.
|
|
9
|
-
nvidia_nat_semantic_kernel-1.
|
|
10
|
-
nvidia_nat_semantic_kernel-1.
|
|
11
|
-
nvidia_nat_semantic_kernel-1.
|
|
12
|
-
nvidia_nat_semantic_kernel-1.
|
|
6
|
+
nvidia_nat_semantic_kernel-1.4.0a20251104.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
|
|
7
|
+
nvidia_nat_semantic_kernel-1.4.0a20251104.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
8
|
+
nvidia_nat_semantic_kernel-1.4.0a20251104.dist-info/METADATA,sha256=kIOydmwgk73UbvC9272LyD7-kr1RMRTxFN4-qRmk2UM,1946
|
|
9
|
+
nvidia_nat_semantic_kernel-1.4.0a20251104.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
+
nvidia_nat_semantic_kernel-1.4.0a20251104.dist-info/entry_points.txt,sha256=0jCtQBAn5Ohs9XoVCF34WvNCV33OwAsH8bjFzgw_ByM,76
|
|
11
|
+
nvidia_nat_semantic_kernel-1.4.0a20251104.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
|
|
12
|
+
nvidia_nat_semantic_kernel-1.4.0a20251104.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|