Socket
Book a DemoInstallSign in
Socket

promptflow-azure-ai-language-custom-text-classification

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promptflow-azure-ai-language-custom-text-classification

Use Azure AI Language to generate abstractive summaries of documents.

1.0.0
pipPyPI
Maintainers
1

Azure AI Language Custom Text Classification Tool for Prompt Flow

GitHub Actions Workflow Status PyPI - Version PyPI - Downloads

Based on promptflow-azure-ai-language

NameDescription
Custom Text ClassificationUse Azure AI Language to generate abstractive summaries of documents

Requirements

PyPI package: promptflow-azure-ai-language.

  • For AzureML users: follow this wiki, starting from Prepare runtime.
  • For local users:
pip install promptflow-azure-ai-language

You may also want to install the Prompt flow for VS Code extension.

Prerequisites

The tool calls APIs from Azure AI Language. To use it, you must create a connection to an Azure AI Language resource. Create a Language Resource first, if necessary.

  • In Prompt flow, add a new CustomConnection.
    • Under the secrets field, specify the resource's API key: api_key: <Azure AI Language Resource api key>
    • Under the configs field, specify the resource's endpoint: endpoint: <Azure AI Language Resource endpoint>

Inputs

When a tool parameter is of type Document, it requires a dict object of this specification.

Example:

my_document = {
    "id": "1",
    "text": "This is some document text!",
    "language": "en"
}
NameTypeDescriptionRequired
connectionCustomConnectionThe created connection to an Azure AI Language resource.Yes
documentDocumentThe input document.Yes
project_namestringThe project to be called.Yes
deployment_namestringThe project deployment to be called.Yes
max_retriesintThe maximum number of HTTP request retries. Default value is 5.No
max_waitintThe maximum wait time (in seconds) in-between HTTP requests. Default value is 60.No
parse_responseboolShould the full API JSON output be parsed to extract the single task result. Default value is False.No

Outputs

  • When the input parameter parse_response is set to False (default value), the full API JSON response will be returned (as a dict object).
  • When the input parameter parse_response is set to True, the full API JSON response will be parsed to extract the single task result associated with the tool's given skill. Output will depend on the skill (but will still be a dict object). Refer to Azure AI Language's REST API reference for details on API response format, specific task result formats, etc.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.