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.agent.openai import OpenAIAgent

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

agent = OpenAIAgent.from_tools(tool_spec.to_tool_list())

agent.chat(
    "caption this image and tell me what tags are in it https://portal.vision.cognitive.azure.com/dist/assets/ImageCaptioningSample1-bbe41ac5.png"
)
agent.chat(
    "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.3.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for llama_index_tools_azure_cv-0.3.0.tar.gz
Algorithm Hash digest
SHA256 27a3945feadd25216b0ea9f2535b02d59cc3c8a424ea1c221a0aaa46fa630a2d
MD5 0125beb8ddf0b7e900dcb418c571e293
BLAKE2b-256 4fc61c9fb07ff90560c6a6cac29c67b147e3ef9c38641707ce077e3dd03525fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_tools_azure_cv-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29ee4e4e17d118f3bff30f5f763fcccc7742ef1dbb8007ed4b034cb42649d11f
MD5 3d8a4348d8074edd348ae6ce78acff60
BLAKE2b-256 a03a21f8da599a3fa01b9ca8e75ed4ebc1dc6cc7752191c1cd2c35ddb5097fc5

See more details on using hashes here.

Supported by

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