LlamaIndex integration for Nativ — AI-powered localization tools
Project description
llamaindex-nativ
LlamaIndex integration for Nativ — AI-powered localization.
Give any LlamaIndex agent the ability to translate text, search translation memory, manage terminology, and more — all backed by your team's brand voice and style guides.
Installation
pip install llamaindex-nativ
Quick start
from llamaindex_nativ import NativToolSpec
spec = NativToolSpec() # reads NATIV_API_KEY from env
tools = spec.to_tool_list()
# Use a single tool directly
result = spec.translate("Hello world", target_language="French")
print(result)
# Bonjour le monde
# Rationale: Standard greeting translated with neutral register.
Use with a LlamaIndex agent
from llamaindex_nativ import NativToolSpec
from llama_index.llms.openai import OpenAI
from llama_index.core.agent import ReActAgent
tools = NativToolSpec().to_tool_list()
llm = OpenAI(model="gpt-4o")
agent = ReActAgent.from_tools(tools, llm=llm, verbose=True)
response = agent.chat(
"Translate 'Welcome back!' to French, German, and Japanese"
)
Available tools
| Tool | Description |
|---|---|
translate |
Translate text with cultural adaptation |
translate_batch |
Translate multiple texts to one language |
search_translation_memory |
Fuzzy-search existing translations |
add_translation_memory_entry |
Store an approved translation for reuse |
get_languages |
List configured target languages |
get_style_guides |
Get style guide content |
get_brand_voice |
Get the brand voice prompt |
get_translation_memory_stats |
Get TM statistics |
Configuration
Pass api_key and base_url directly:
spec = NativToolSpec(api_key="nativ_...", base_url="https://api.usenativ.com")
Or set the environment variable:
export NATIV_API_KEY=nativ_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Use individual tools
from llamaindex_nativ import NativToolSpec
spec = NativToolSpec()
# Search translation memory
print(spec.search_translation_memory("Welcome"))
# Found 3 match(es):
# - [98% exact] "Welcome" -> "Bienvenue"
# - [85% fuzzy] "Welcome back" -> "Content de vous revoir"
# ...
# Get configured languages
print(spec.get_languages())
# Configured languages:
# - French (fr) -- formality: formal
# - German (de) -- formality: formal
# ...
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llamaindex_nativ-0.1.0.tar.gz.
File metadata
- Download URL: llamaindex_nativ-0.1.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcf5af98ed141acfa6c811806a18deac79d5a12e3630761b1b32d40c7af3b774
|
|
| MD5 |
afce153d5f3d92712a4facf4d0870b62
|
|
| BLAKE2b-256 |
017232771835b4922f0e6c353e26b7777dc53d44d4421934f7b1426a9f036071
|
Provenance
The following attestation bundles were made for llamaindex_nativ-0.1.0.tar.gz:
Publisher:
publish.yml on Nativ-Technologies/llamaindex-nativ
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llamaindex_nativ-0.1.0.tar.gz -
Subject digest:
dcf5af98ed141acfa6c811806a18deac79d5a12e3630761b1b32d40c7af3b774 - Sigstore transparency entry: 975844253
- Sigstore integration time:
-
Permalink:
Nativ-Technologies/llamaindex-nativ@fbc443a8a0f43b708b7f9d32a81abb01b005b122 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Nativ-Technologies
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fbc443a8a0f43b708b7f9d32a81abb01b005b122 -
Trigger Event:
release
-
Statement type:
File details
Details for the file llamaindex_nativ-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llamaindex_nativ-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a88f8e11c02c4c6cf6576be2b1e7d88e74a25ad184747407e6450420a5062c2
|
|
| MD5 |
25f6746c2d77eb05f34628570e14b601
|
|
| BLAKE2b-256 |
67cc0428b8aaa1dc05d13d4ba7a57af93cb43e47dafe521756ad6a74bbea5e4e
|
Provenance
The following attestation bundles were made for llamaindex_nativ-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Nativ-Technologies/llamaindex-nativ
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llamaindex_nativ-0.1.0-py3-none-any.whl -
Subject digest:
5a88f8e11c02c4c6cf6576be2b1e7d88e74a25ad184747407e6450420a5062c2 - Sigstore transparency entry: 975844254
- Sigstore integration time:
-
Permalink:
Nativ-Technologies/llamaindex-nativ@fbc443a8a0f43b708b7f9d32a81abb01b005b122 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Nativ-Technologies
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fbc443a8a0f43b708b7f9d32a81abb01b005b122 -
Trigger Event:
release
-
Statement type: