nvidia-nat-llama-index 1.3.0rc4__py3-none-any.whl → 1.3.0rc5__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/llama_index/llm.py +9 -7
- {nvidia_nat_llama_index-1.3.0rc4.dist-info → nvidia_nat_llama_index-1.3.0rc5.dist-info}/METADATA +2 -2
- {nvidia_nat_llama_index-1.3.0rc4.dist-info → nvidia_nat_llama_index-1.3.0rc5.dist-info}/RECORD +8 -8
- {nvidia_nat_llama_index-1.3.0rc4.dist-info → nvidia_nat_llama_index-1.3.0rc5.dist-info}/WHEEL +0 -0
- {nvidia_nat_llama_index-1.3.0rc4.dist-info → nvidia_nat_llama_index-1.3.0rc5.dist-info}/entry_points.txt +0 -0
- {nvidia_nat_llama_index-1.3.0rc4.dist-info → nvidia_nat_llama_index-1.3.0rc5.dist-info}/licenses/LICENSE-3rd-party.txt +0 -0
- {nvidia_nat_llama_index-1.3.0rc4.dist-info → nvidia_nat_llama_index-1.3.0rc5.dist-info}/licenses/LICENSE.md +0 -0
- {nvidia_nat_llama_index-1.3.0rc4.dist-info → nvidia_nat_llama_index-1.3.0rc5.dist-info}/top_level.txt +0 -0
nat/plugins/llama_index/llm.py
CHANGED
@@ -44,14 +44,16 @@ def _patch_llm_based_on_config(client: ModelType, llm_config: LLMBaseConfig) ->
|
|
44
44
|
|
45
45
|
@override
|
46
46
|
def inject(self, messages: Sequence[ChatMessage], *args, **kwargs) -> FunctionArgumentWrapper:
|
47
|
-
|
48
|
-
for message in messages:
|
47
|
+
for i, message in enumerate(messages):
|
49
48
|
if message.role == "system":
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
49
|
+
if self.system_prompt not in str(message.content):
|
50
|
+
messages = list(messages)
|
51
|
+
messages[i] = ChatMessage(role="system", content=f"{message.content}\n{self.system_prompt}")
|
52
|
+
break
|
53
|
+
else:
|
54
|
+
messages = list(messages)
|
55
|
+
messages.insert(0, ChatMessage(role="system", content=self.system_prompt))
|
56
|
+
return FunctionArgumentWrapper(messages, *args, **kwargs)
|
55
57
|
|
56
58
|
if isinstance(llm_config, RetryMixin):
|
57
59
|
client = patch_with_retry(client,
|
{nvidia_nat_llama_index-1.3.0rc4.dist-info → nvidia_nat_llama_index-1.3.0rc5.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: nvidia-nat-llama-index
|
3
|
-
Version: 1.3.
|
3
|
+
Version: 1.3.0rc5
|
4
4
|
Summary: Subpackage for Llama-Index 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.3.0-
|
19
|
+
Requires-Dist: nvidia-nat==v1.3.0-rc5
|
20
20
|
Requires-Dist: llama-index-core~=0.12.21
|
21
21
|
Requires-Dist: llama-index-embeddings-azure-openai~=0.3.9
|
22
22
|
Requires-Dist: llama-index-embeddings-nvidia~=0.3.1
|
{nvidia_nat_llama_index-1.3.0rc4.dist-info → nvidia_nat_llama_index-1.3.0rc5.dist-info}/RECORD
RENAMED
@@ -1,13 +1,13 @@
|
|
1
1
|
nat/meta/pypi.md,sha256=s9C3pgWB0HLIXTx5QPryNOWN0O2fIRIap0p9_zCHlTs,1112
|
2
2
|
nat/plugins/llama_index/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
nat/plugins/llama_index/embedder.py,sha256=4c4uAa19UArqA_Npe5mwEnUhCaguTbyWcAntBzcPEeQ,3493
|
4
|
-
nat/plugins/llama_index/llm.py,sha256=
|
4
|
+
nat/plugins/llama_index/llm.py,sha256=7fneFsjXjZJ-ReLAy1aUslkGhj6_fG_gFbyy4ME-QH4,5350
|
5
5
|
nat/plugins/llama_index/register.py,sha256=1x_b8u6cuQwh4Iz_7TcIFWXvLIL9IIKUPE-zR9d6ug8,859
|
6
6
|
nat/plugins/llama_index/tool_wrapper.py,sha256=VFKMIIeLdWqHwW2Ax11E2w-_9w3ow6Iuhra1Hk78RYM,1387
|
7
|
-
nvidia_nat_llama_index-1.3.
|
8
|
-
nvidia_nat_llama_index-1.3.
|
9
|
-
nvidia_nat_llama_index-1.3.
|
10
|
-
nvidia_nat_llama_index-1.3.
|
11
|
-
nvidia_nat_llama_index-1.3.
|
12
|
-
nvidia_nat_llama_index-1.3.
|
13
|
-
nvidia_nat_llama_index-1.3.
|
7
|
+
nvidia_nat_llama_index-1.3.0rc5.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
|
8
|
+
nvidia_nat_llama_index-1.3.0rc5.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
9
|
+
nvidia_nat_llama_index-1.3.0rc5.dist-info/METADATA,sha256=QyzxQegwrn-Qhxjy6AFjWBRcD5PpDSiULYGbLoAVJy8,2411
|
10
|
+
nvidia_nat_llama_index-1.3.0rc5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
11
|
+
nvidia_nat_llama_index-1.3.0rc5.dist-info/entry_points.txt,sha256=2LqRRju5448P2v8B3y6TSPnk-nOd5T3AmV5JibCnoQc,68
|
12
|
+
nvidia_nat_llama_index-1.3.0rc5.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
|
13
|
+
nvidia_nat_llama_index-1.3.0rc5.dist-info/RECORD,,
|
{nvidia_nat_llama_index-1.3.0rc4.dist-info → nvidia_nat_llama_index-1.3.0rc5.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|