Skip to content

Conversation

@Zayadul-huq-afnan
Copy link
Collaborator

PR Type

Feature

PR Checklist

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made.
  • Version number has been updated.
  • Required modules have been added to respective "requirements*.txt" files.
  • Relevant Test Cases added to this description (below).
  • (Team) Label with affected action categories and semver status.

Overview

This action takes image and user prompt as input and return the data according to the user prompt. The user prompt is optional, if no user prompt is given then this action will read the data from the image and return it in a JSON format. This acion uses OpenAI's API. Currently the users will have to use their own API key to use this action. Detailed instruction of how to setup the API key will be mentioned in the documentation and action description as well.

Test Cases


{"name": "render jinja template", "function": "render_jinja_template", "screenshot": "none" },
{"name": "download chrome extension", "function": "download_chrome_extension", "screenshot": "none" },
{"name": "AI visual reader", "function": "AI_visual_reader", "screenshot": "none" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action name should change to "AI - LLM prompt with files"

# Load API key from .env file
try:
from dotenv import load_dotenv
framework_dir = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to load these ourselves. load_dotenv() is already called when node_cli.py starts. So, if a user specifies and environment variable and starts node, it'll already be available in os.getenv() calls.

}

payload = {
"model": "gpt-4o",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users should be able to specify the model name as part of the action parameters.
They should also be able to configure the temperature and any other associated hyperparameters of the model.

@sazid
Copy link
Member

sazid commented Oct 5, 2025

@Zayadul-huq-afnan please review the requests

@Zayadul-huq-afnan
Copy link
Collaborator Author

@Zayadul-huq-afnan please review the requests

@sazid bhai please review this PR #603 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants