nvidia-nat-semantic-kernel 1.4.0a20251015__py3-none-any.whl → 1.4.0a20251021__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/semantic_kernel/llm.py +7 -4
- {nvidia_nat_semantic_kernel-1.4.0a20251015.dist-info → nvidia_nat_semantic_kernel-1.4.0a20251021.dist-info}/METADATA +2 -2
- {nvidia_nat_semantic_kernel-1.4.0a20251015.dist-info → nvidia_nat_semantic_kernel-1.4.0a20251021.dist-info}/RECORD +8 -8
- {nvidia_nat_semantic_kernel-1.4.0a20251015.dist-info → nvidia_nat_semantic_kernel-1.4.0a20251021.dist-info}/WHEEL +0 -0
- {nvidia_nat_semantic_kernel-1.4.0a20251015.dist-info → nvidia_nat_semantic_kernel-1.4.0a20251021.dist-info}/entry_points.txt +0 -0
- {nvidia_nat_semantic_kernel-1.4.0a20251015.dist-info → nvidia_nat_semantic_kernel-1.4.0a20251021.dist-info}/licenses/LICENSE-3rd-party.txt +0 -0
- {nvidia_nat_semantic_kernel-1.4.0a20251015.dist-info → nvidia_nat_semantic_kernel-1.4.0a20251021.dist-info}/licenses/LICENSE.md +0 -0
- {nvidia_nat_semantic_kernel-1.4.0a20251015.dist-info → nvidia_nat_semantic_kernel-1.4.0a20251021.dist-info}/top_level.txt +0 -0
|
@@ -27,6 +27,7 @@ from nat.llm.utils.thinking import BaseThinkingInjector
|
|
|
27
27
|
from nat.llm.utils.thinking import FunctionArgumentWrapper
|
|
28
28
|
from nat.llm.utils.thinking import patch_with_thinking
|
|
29
29
|
from nat.utils.exception_handlers.automatic_retries import patch_with_retry
|
|
30
|
+
from nat.utils.responses_api import validate_no_responses_api
|
|
30
31
|
from nat.utils.type_utils import override
|
|
31
32
|
|
|
32
33
|
ModelType = TypeVar("ModelType")
|
|
@@ -35,8 +36,6 @@ ModelType = TypeVar("ModelType")
|
|
|
35
36
|
def _patch_llm_based_on_config(client: ModelType, llm_config: LLMBaseConfig) -> ModelType:
|
|
36
37
|
|
|
37
38
|
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
39
|
|
|
41
40
|
class SemanticKernelThinkingInjector(BaseThinkingInjector):
|
|
42
41
|
|
|
@@ -61,8 +60,8 @@ def _patch_llm_based_on_config(client: ModelType, llm_config: LLMBaseConfig) ->
|
|
|
61
60
|
return FunctionArgumentWrapper(new_messages, *args, **kwargs)
|
|
62
61
|
else:
|
|
63
62
|
new_messages = ChatHistory(
|
|
64
|
-
|
|
65
|
-
system_message=chat_history.system_message,
|
|
63
|
+
chat_history.messages,
|
|
64
|
+
system_message=f"{self.system_prompt}\n\n{chat_history.system_message}",
|
|
66
65
|
)
|
|
67
66
|
return FunctionArgumentWrapper(new_messages, *args, **kwargs)
|
|
68
67
|
|
|
@@ -91,6 +90,8 @@ async def azure_openai_semantic_kernel(llm_config: AzureOpenAIModelConfig, _buil
|
|
|
91
90
|
|
|
92
91
|
from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion
|
|
93
92
|
|
|
93
|
+
validate_no_responses_api(llm_config, LLMFrameworkEnum.SEMANTIC_KERNEL)
|
|
94
|
+
|
|
94
95
|
llm = AzureChatCompletion(
|
|
95
96
|
api_key=llm_config.api_key,
|
|
96
97
|
api_version=llm_config.api_version,
|
|
@@ -106,6 +107,8 @@ async def openai_semantic_kernel(llm_config: OpenAIModelConfig, _builder: Builde
|
|
|
106
107
|
|
|
107
108
|
from semantic_kernel.connectors.ai.open_ai import OpenAIChatCompletion
|
|
108
109
|
|
|
110
|
+
validate_no_responses_api(llm_config, LLMFrameworkEnum.SEMANTIC_KERNEL)
|
|
111
|
+
|
|
109
112
|
llm = OpenAIChatCompletion(ai_model_id=llm_config.model_name)
|
|
110
113
|
|
|
111
114
|
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.4.
|
|
3
|
+
Version: 1.4.0a20251021
|
|
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.4.
|
|
19
|
+
Requires-Dist: nvidia-nat==v1.4.0a20251021
|
|
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=TC5vegYO-zGD2Q4hZwKV7b45iOx7B1Heah5AjhxVGSo,4838
|
|
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.4.
|
|
7
|
-
nvidia_nat_semantic_kernel-1.4.
|
|
8
|
-
nvidia_nat_semantic_kernel-1.4.
|
|
9
|
-
nvidia_nat_semantic_kernel-1.4.
|
|
10
|
-
nvidia_nat_semantic_kernel-1.4.
|
|
11
|
-
nvidia_nat_semantic_kernel-1.4.
|
|
12
|
-
nvidia_nat_semantic_kernel-1.4.
|
|
6
|
+
nvidia_nat_semantic_kernel-1.4.0a20251021.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
|
|
7
|
+
nvidia_nat_semantic_kernel-1.4.0a20251021.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
8
|
+
nvidia_nat_semantic_kernel-1.4.0a20251021.dist-info/METADATA,sha256=iTyhVI-qj9Zdzr05ER0QjrnVKr3mbyESkyRo4OCGU0U,1946
|
|
9
|
+
nvidia_nat_semantic_kernel-1.4.0a20251021.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
+
nvidia_nat_semantic_kernel-1.4.0a20251021.dist-info/entry_points.txt,sha256=0jCtQBAn5Ohs9XoVCF34WvNCV33OwAsH8bjFzgw_ByM,76
|
|
11
|
+
nvidia_nat_semantic_kernel-1.4.0a20251021.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
|
|
12
|
+
nvidia_nat_semantic_kernel-1.4.0a20251021.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|