Skip to main content

llama-index tools azure_translate integration

Project description

Azure Translate Tool

This tool connects to a Azure account and allows an Agent to perform text translation into a variet of different languages

You will need to set up an api key and translate instance using Azure, learn more here: https://learn.microsoft.com/en-us/azure/ai-services/translator/translator-overview

For a full list of supported languages see here: https://learn.microsoft.com/en-us/azure/ai-services/translator/language-support

This tool has a more extensive example usage documented in a Jupyter notebook here

Usage

Here's an example usage of the AzureTranslateToolSpec.

from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
from llama_index.tools.azure_translate import AzureTranslateToolSpec

translate_tool = AzureTranslateToolSpec(api_key="your-key", region="eastus")

agent = FunctionAgent(
    tools=translate_tool.to_tool_list(),
    llm=OpenAI(model="gpt-4.1"),
)
print(await agent.run('Say "hello world" in 5 different languages'))

translate: Translate text to a target language

This loader is designed to be used as a way to load data as a Tool in a Agent.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_tools_azure_translate-0.4.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llama_index_tools_azure_translate-0.4.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_tools_azure_translate-0.4.0.tar.gz
Algorithm Hash digest
SHA256 05b4f77119745f0a2e3048924e44ebbd3c16f6fe1e0d61db3587804074316231
MD5 b524136b6125f70bafa420e19db020ed
BLAKE2b-256 cb6764d7d8036a75930ec9673a9e94d1f7e4531ac21e7b61cff61c12b6f1e208

See more details on using hashes here.

File details

Details for the file llama_index_tools_azure_translate-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_tools_azure_translate-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5fb6f8b9bcd04ab33efcf5d530004a7b3f542568ac5c4d318ceaaef258c57e45
MD5 1ca7126c792108b128641a4a06661625
BLAKE2b-256 c41f3b556e3b492544258551f6f127fbcac0326e68b1f85905a45a4aa986d888

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page