Use Azure AI Language to generate abstractive summaries of documents.
Project description
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
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>
- 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.
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
Built Distribution
Close
Hashes for promptflow_azure_ai_language_custom_text_classification-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1e5683efaa2f05df115c1e7679f99b6f5d074d53e2f25b84e6cdfabaabf15d1 |
|
MD5 | 5f36b250a220bf835641bf036391c90e |
|
BLAKE2b-256 | b2f48dd241b2f2bd23f970bd6670c4f0c69ac835cc49c499395a9fabebc4ead2 |
Close
Hashes for promptflow_azure_ai_language_custom_text_classification-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c124baff3a9682ba208977a05625c7ddcea4cf4e41bb8f2590791ec2775a2970 |
|
MD5 | a9fd48c11cffdbacc0ccd8d78da1aecc |
|
BLAKE2b-256 | 790d90da93cde9d27b41363e8578837aec96cbc9235d8a2022f8a5d014d608fb |