Azure AI Language Custom Text Classification Tool for Prompt Flow
Based on promptflow-azure-ai-language
| Name | Description |
|---|---|
| Custom Text Classification | Use 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
secretsfield, specify the resource's API key:api_key: <Azure AI Language Resource api key> - Under the
configsfield, specify the resource's endpoint:endpoint: <Azure AI Language Resource endpoint>
- Under the
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"
}
| Name | Type | Description | Required |
|---|---|---|---|
| connection | CustomConnection | The created connection to an Azure AI Language resource. | Yes |
| document | Document | The input document. | Yes |
| project_name | string | The project to be called. | Yes |
| deployment_name | string | The project deployment to be called. | Yes |
| max_retries | int | The maximum number of HTTP request retries. Default value is 5. | No |
| max_wait | int | The maximum wait time (in seconds) in-between HTTP requests. Default value is 60. | No |
| parse_response | bool | Should 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.
Metadata
Release files for promptflow-azure-ai-language-custom-text-classification 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| promptflow_azure_ai_language_custom_text_classification-1.0.0.tar.gz | 8.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| promptflow_azure_ai_language_custom_text_classification-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.0 kB
Release files / promptflow_azure_ai_language_custom_text_classification-1.0.0.tar.gz
| Download URL | promptflow_azure_ai_language_custom_text_classification-1.0.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1e5683efaa2f05df115c1e7679f99b6f5d074d53e2f25b84e6cdfabaabf15d1
|
|
BLAKE2b-256 checksum How to use checksums |
b2f48dd241b2f2bd23f970bd6670c4f0c69ac835cc49c499395a9fabebc4ead2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / promptflow_azure_ai_language_custom_text_classification-1.0.0-py3-none-any.whl
| Download URL | promptflow_azure_ai_language_custom_text_classification-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c124baff3a9682ba208977a05625c7ddcea4cf4e41bb8f2590791ec2775a2970
|
|
BLAKE2b-256 checksum How to use checksums |
790d90da93cde9d27b41363e8578837aec96cbc9235d8a2022f8a5d014d608fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|