Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text Classifier node complains when System Prompt option is not explicitly set #10336

Closed
jimleuk opened this issue Aug 8, 2024 · 3 comments
Closed
Labels
in linear Issue or PR has been created in Linear for internal review Released

Comments

@jimleuk
Copy link

jimleuk commented Aug 8, 2024

Bug Description

When using the "text classifier" node, it complains with the following error if the system prompt option is not explicitly set.

{
  "errorMessage": "Could not get parameter",
  "errorDetails": {
    "errorExtra": {
      "parameterName": "options.systemPromptTemplate"
    }
  },
  "n8nDetails": {
    "n8nVersion": "1.53.1 (Self Hosted)",
    "binaryDataMode": "default",
    "stackTrace": [
      "Error: Could not get parameter",
      "    at getNodeParameter (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1629:15)",
      "    at Object.getNodeParameter (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:2358:24)",
      "    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/chains/TextClassifier/TextClassifier.node.js:183:50)",
      "    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:728:19)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:673:51",
      "    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1086:20"
    ]
  }
}

To Reproduce

  1. Add Advanced AI > Text Classifier node
  2. Add inputs "text" and specify a few categories to use.
  3. Click Test step to execute the node
  4. The error message is shown
  5. In the node's options, select system prompt option - do not edit the option's text
  6. Click Test Step again to execute the node
  7. The node executes successfully

Expected behavior

The node should execute successfully if the system prompt option is not set as it's expected to be optional.

Operating System

MacOS Sonoma 14.6

n8n Version

1.53.1

Node.js Version

18

Database

SQLite (default)

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Aug 9, 2024

Thanks @jimleuk,

I have managed to reproduce and have created AI-274 as the internal ticket to get this resolved.

@Joffcom Joffcom added in linear Issue or PR has been created in Linear for internal review in_linear and removed in linear Issue or PR has been created in Linear for internal review in_linear labels Aug 9, 2024
@silva-kleyton
Copy link

I have the same problem

Operating System
MacOS Sonoma 14.6

n8n Version
1.55.0

Node.js Version
20

Database
Postgres

@janober
Copy link
Member

janober commented Oct 2, 2024

Fix got released with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review Released
Projects
None yet
Development

No branches or pull requests

4 participants