Overview
This node enables interaction with a government AI assistant service via API. It allows users to send prompts (questions or commands) to a specified assistant and receive AI-generated replies. Additionally, it supports uploading a binary file alongside the prompt, which can be useful for scenarios where the assistant needs to analyze or reference an attached document or data file.
Common use cases include:
- Automating responses from a government-related AI assistant.
- Submitting documents or files for AI-assisted processing or analysis.
- Integrating AI-driven chat capabilities into workflows that require official or regulated information handling.
Example: A user sends a question about a government procedure along with a scanned form as a file, and the assistant replies with guidance based on both the prompt and the uploaded document.
Properties
| Name | Meaning |
|---|---|
| Assistant ID | The unique identifier of the AI assistant to interact with. |
| Prompt | The text message or query sent to the assistant. |
| Timeout (seconds) | Maximum time in seconds to wait for the assistant's reply before timing out. |
| Upload binary file from property | Optional. The name of the binary property containing a file to upload along with the prompt. Leave blank to skip uploading a file. |
Output
The node outputs JSON objects with the following structure:
assistantId: The ID of the assistant used for the request.threadId: The unique identifier of the conversation thread created for this interaction.reply: The textual response generated by the AI assistant.fileId: If a file was uploaded, this contains the ID of the uploaded file; otherwise, it is undefined.
If a binary file is uploaded, it is sent to the external service but not returned in the output. The output focuses on the assistant's textual reply and metadata about the interaction.
Dependencies
- Requires an API key credential for authenticating with the external government AI assistant service.
- Uses HTTPS requests with optional proxy and custom certificate authority bundle support.
- Depends on the external API endpoints for creating threads, uploading files, sending messages, and retrieving replies.
- The node uses the
axioslibrary for HTTP requests andform-datafor file uploads.
Troubleshooting
- Binary Property Not Found: If the specified binary property does not exist on the input item, the node throws an error indicating the missing property. Ensure the binary property name matches exactly and that the input item contains the binary data.
- Timeout Waiting for Reply: If the assistant does not respond within the configured timeout period, an error is thrown. Consider increasing the timeout or verifying the assistant's availability.
- Authentication Errors: If the API token is invalid or missing, requests will fail. Verify that the API key credential is correctly configured.
- Proxy or SSL Issues: Misconfigured proxy settings or invalid SSL certificates may cause connection failures. Check proxy URLs and certificate bundles if used.
Links and References
- No direct links are provided in the source code. For more information, consult the documentation of the external government AI assistant service or the API provider’s website.