Skip to main content

llama-index tools azure_cv integration

Project description

Azure Computer Vision Tool

This tool connects to a Azure account and allows an Agent to perform a variety of computer vision tasks on image urls.

You will need to set up an api key and computer vision instance using Azure, learn more here: https://azure.microsoft.com/en-ca/products/cognitive-services/computer-vision

Usage

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

Here's an example usage of the AzureCVToolSpec.

from llama_index.tools.azure_cv import AzureCVToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

tool_spec = AzureCVToolSpec(api_key="your-key", resource="your-resource")

agent = FunctionAgent(
    tools=tool_spec.to_tool_list(), llm=OpenAI(model="gpt-4.1")
)

await agent.run(
    "caption this image and tell me what tags are in it https://portal.vision.cognitive.azure.com/dist/assets/ImageCaptioningSample1-bbe41ac5.png"
)
await agent.run(
    "caption this image and read any text https://portal.vision.cognitive.azure.com/dist/assets/OCR3-4782f088.jpg"
)

process_image: Send an image for computer vision classification of objects, tags, captioning or OCR.

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_cv-0.4.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

llama_index_tools_azure_cv-0.4.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for llama_index_tools_azure_cv-0.4.0.tar.gz
Algorithm Hash digest
SHA256 793a4f869d1123ce84a071a38c2460f7feeab89a1ddce48964bd4c67be2149a4
MD5 df9c72cc54cfda4c1f9356423d6b57fd
BLAKE2b-256 980692b9f66f4c62331d9bd30466772d5002b02fd7a4eab4efcf2eaec56e1599

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_tools_azure_cv-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b92d5e750b47f5c6c5a38df702c8b726a8d6cdc7496ccbd226fd6d47c58cee4
MD5 422bde2c0ccf61c22af25dcd3196c9c9
BLAKE2b-256 81c8ec1b45a06289ba02e765ee03c12f8aa4049496fa80e713a1aef5b6738ccb

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