nvidia-nat-llama-index 1.2.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.
aiq/meta/pypi.md ADDED
@@ -0,0 +1,23 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+ SPDX-License-Identifier: Apache-2.0
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+
18
+ ![NVIDIA NeMo Agent Toolkit](https://media.githubusercontent.com/media/NVIDIA/NeMo-Agent-Toolkit/refs/heads/main/docs/source/_static/aiqtoolkit_banner.png "NeMo Agent toolkit banner image")
19
+
20
+ # NVIDIA NeMo Agent Toolkit Subpackage
21
+ This is a subpackage for Llama-Index integration in NeMo Agent toolkit.
22
+
23
+ For more information about the NVIDIA NeMo Agent toolkit, please visit the [NeMo Agent toolkit GitHub Repo](https://github.com/NVIDIA/NeMo-Agent-Toolkit).
File without changes
@@ -0,0 +1,83 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ from aiq.builder.builder import Builder
17
+ from aiq.builder.framework_enum import LLMFrameworkEnum
18
+ from aiq.cli.register_workflow import register_llm_client
19
+ from aiq.data_models.retry_mixin import RetryMixin
20
+ from aiq.llm.aws_bedrock_llm import AWSBedrockModelConfig
21
+ from aiq.llm.nim_llm import NIMModelConfig
22
+ from aiq.llm.openai_llm import OpenAIModelConfig
23
+ from aiq.utils.exception_handlers.automatic_retries import patch_with_retry
24
+
25
+
26
+ @register_llm_client(config_type=NIMModelConfig, wrapper_type=LLMFrameworkEnum.LLAMA_INDEX)
27
+ async def nim_llama_index(llm_config: NIMModelConfig, builder: Builder):
28
+
29
+ from llama_index.llms.nvidia import NVIDIA
30
+
31
+ kwargs = llm_config.model_dump(exclude={"type"}, by_alias=True)
32
+
33
+ if ("base_url" in kwargs and kwargs["base_url"] is None):
34
+ del kwargs["base_url"]
35
+
36
+ llm = NVIDIA(**kwargs)
37
+
38
+ if isinstance(llm_config, RetryMixin):
39
+ llm = patch_with_retry(llm,
40
+ retries=llm_config.num_retries,
41
+ retry_codes=llm_config.retry_on_status_codes,
42
+ retry_on_messages=llm_config.retry_on_errors)
43
+
44
+ yield llm
45
+
46
+
47
+ @register_llm_client(config_type=OpenAIModelConfig, wrapper_type=LLMFrameworkEnum.LLAMA_INDEX)
48
+ async def openai_llama_index(llm_config: OpenAIModelConfig, builder: Builder):
49
+
50
+ from llama_index.llms.openai import OpenAI
51
+
52
+ kwargs = llm_config.model_dump(exclude={"type"}, by_alias=True)
53
+
54
+ if ("base_url" in kwargs and kwargs["base_url"] is None):
55
+ del kwargs["base_url"]
56
+
57
+ llm = OpenAI(**kwargs)
58
+
59
+ if isinstance(llm_config, RetryMixin):
60
+ llm = patch_with_retry(llm,
61
+ retries=llm_config.num_retries,
62
+ retry_codes=llm_config.retry_on_status_codes,
63
+ retry_on_messages=llm_config.retry_on_errors)
64
+
65
+ yield llm
66
+
67
+
68
+ @register_llm_client(config_type=AWSBedrockModelConfig, wrapper_type=LLMFrameworkEnum.LLAMA_INDEX)
69
+ async def aws_bedrock_llama_index(llm_config: AWSBedrockModelConfig, builder: Builder):
70
+
71
+ from llama_index.llms.bedrock import Bedrock
72
+
73
+ kwargs = llm_config.model_dump(exclude={"type", "max_tokens"}, by_alias=True)
74
+
75
+ llm = Bedrock(**kwargs)
76
+
77
+ if isinstance(llm_config, RetryMixin):
78
+ llm = patch_with_retry(llm,
79
+ retries=llm_config.num_retries,
80
+ retry_codes=llm_config.retry_on_status_codes,
81
+ retry_on_messages=llm_config.retry_on_errors)
82
+
83
+ yield llm
@@ -0,0 +1,23 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ # pylint: disable=unused-import
17
+ # flake8: noqa
18
+ # isort:skip_file
19
+
20
+ # Import any providers which need to be automatically registered here
21
+
22
+ from . import llm
23
+ from . import tool_wrapper
@@ -0,0 +1,32 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ from aiq.builder.builder import Builder
17
+ from aiq.builder.framework_enum import LLMFrameworkEnum
18
+ from aiq.builder.function import Function
19
+ from aiq.cli.register_workflow import register_tool_wrapper
20
+
21
+
22
+ @register_tool_wrapper(wrapper_type=LLMFrameworkEnum.LLAMA_INDEX)
23
+ def langchain_tool_wrapper(name: str, fn: Function, builder: Builder):
24
+
25
+ from llama_index.core.tools import FunctionTool
26
+
27
+ assert fn.input_schema is not None, "Tool must have input schema"
28
+
29
+ return FunctionTool.from_defaults(async_fn=fn.acall_invoke,
30
+ name=name,
31
+ description=fn.description,
32
+ fn_schema=fn.input_schema)
@@ -0,0 +1,39 @@
1
+ Metadata-Version: 2.4
2
+ Name: nvidia-nat-llama-index
3
+ Version: 1.2.0rc5
4
+ Summary: Subpackage for Llama-Index integration in AIQtoolkit
5
+ Keywords: ai,rag,agents
6
+ Classifier: Programming Language :: Python
7
+ Requires-Python: <3.13,>=3.11
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: nvidia-nat~=1.2
10
+ Requires-Dist: llama-index-core==0.12.21
11
+ Requires-Dist: llama-index-embeddings-nvidia==0.3.1
12
+ Requires-Dist: llama-index-llms-bedrock==0.3.8
13
+ Requires-Dist: llama-index-llms-nvidia==0.3.1
14
+ Requires-Dist: llama-index-readers-file==0.4.4
15
+ Requires-Dist: llama-index==0.12.21
16
+
17
+ <!--
18
+ SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
19
+ SPDX-License-Identifier: Apache-2.0
20
+
21
+ Licensed under the Apache License, Version 2.0 (the "License");
22
+ you may not use this file except in compliance with the License.
23
+ You may obtain a copy of the License at
24
+
25
+ http://www.apache.org/licenses/LICENSE-2.0
26
+
27
+ Unless required by applicable law or agreed to in writing, software
28
+ distributed under the License is distributed on an "AS IS" BASIS,
29
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30
+ See the License for the specific language governing permissions and
31
+ limitations under the License.
32
+ -->
33
+
34
+ ![NVIDIA NeMo Agent Toolkit](https://media.githubusercontent.com/media/NVIDIA/NeMo-Agent-Toolkit/refs/heads/main/docs/source/_static/aiqtoolkit_banner.png "NeMo Agent toolkit banner image")
35
+
36
+ # NVIDIA NeMo Agent Toolkit Subpackage
37
+ This is a subpackage for Llama-Index integration in NeMo Agent toolkit.
38
+
39
+ For more information about the NVIDIA NeMo Agent toolkit, please visit the [NeMo Agent toolkit GitHub Repo](https://github.com/NVIDIA/NeMo-Agent-Toolkit).
@@ -0,0 +1,10 @@
1
+ aiq/meta/pypi.md,sha256=7X4IiHrJQTL9Y0L6MHdKQnW3MAx1R7SxolOdPGtSWKY,1123
2
+ aiq/plugins/llama_index/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ aiq/plugins/llama_index/llm.py,sha256=kxoorizIF5jM9-mAup57c2tmV5zp4t3eDuaGhDG9EiI,3220
4
+ aiq/plugins/llama_index/register.py,sha256=da1IYMrYe4MUtlwzBGIiukPazf7WU40j5X3n2KCjNts,868
5
+ aiq/plugins/llama_index/tool_wrapper.py,sha256=n7E6uzVtcyFXSWtkYG8yrtqRCsXVHdEU38eTrWLSlrU,1387
6
+ nvidia_nat_llama_index-1.2.0rc5.dist-info/METADATA,sha256=j6LnyLp0kLBGt9J1bxLiDSSqnyiLi6B03wsZHuZAiHw,1692
7
+ nvidia_nat_llama_index-1.2.0rc5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
+ nvidia_nat_llama_index-1.2.0rc5.dist-info/entry_points.txt,sha256=2_FES--T1uOL8QdHJWWhuFipXoSK8uo0DR8olysK2Ck,68
9
+ nvidia_nat_llama_index-1.2.0rc5.dist-info/top_level.txt,sha256=fo7AzYcNhZ_tRWrhGumtxwnxMew4xrT1iwouDy_f0Kc,4
10
+ nvidia_nat_llama_index-1.2.0rc5.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [aiq.components]
2
+ aiq_llama_index = aiq.plugins.llama_index.register