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.1.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.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_tools_azure_translate-0.4.1.tar.gz
Algorithm Hash digest
SHA256 092702918cd8cda344b96679d2c84b3a9bcb9f36a64be369d8a19707880562db
MD5 fd0df4ff77ad7be601c772fa95801418
BLAKE2b-256 df37befb0c13723649c2130ec275c464dce2fa15286c6e911e1f6d2eaf84a02f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_tools_azure_translate-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9292eba21011d9b1afc97f3ab9eddb95012a4bccc485e3b49ebf68c5b5153c23
MD5 b85fa80157f9ecc4600614ca3614c391
BLAKE2b-256 ffefc943466b4276192cf5ce0a6651daf2bb1d8666ef43299483f1504ec6de80

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