Overview
This node categorizes news articles using an AI-powered agent called pn010ainews categorize agent, which is accessed via a NATS messaging server. It is useful for automatically classifying articles into categories based on their title and content, which can help in organizing news feeds, content management systems, or any workflow requiring article categorization. For example, it can be used to tag articles as sports, politics, technology, etc., based on their content.
Use Case Examples
- Automatically categorize incoming news articles in a content pipeline to tag them for editorial review.
- Classify user-submitted articles in a publishing platform to route them to the appropriate department.
Properties
| Name | Meaning |
|---|---|
| NATS URL | The URL of the NATS server to connect to for agent communication. |
| Title | The title of the article to be categorized. |
| Content | The main content of the article to be categorized. |
| Timeout (ms) | The maximum time in milliseconds to wait for the agent's response. |
Output
JSON
category- The category assigned to the article by the AI agent.confidence- The confidence score of the categorization result.original_title- The original title of the article provided as input.
Dependencies
- NATS messaging server
Troubleshooting
- Connection issues to the NATS server may cause failures; ensure the NATS URL is correct and the server is reachable.
- Timeout errors if the agent does not respond within the specified timeout period; consider increasing the timeout if needed.
- Errors from the agent may be returned; if continueOnFail is enabled, errors will be included in the output JSON under the 'error' key.