Unable to Get ChatGPT4 Setup

I have successfully setup the LLM Prompter and received results using the Open AI Chatgpt 3.5 turbo model.

However, when i try to change it to Open AI Chatgpt 4 model in “Open AI Chat model connector” and use the “Chat Mode Prompter node” i receive an error “Execute failed: Error code: 400 - {‘error’: {‘message’: “Invalid value: ‘Cla…ion’. Supported values are: ‘system’, ‘assistant’, ‘user’, ‘function’, and ‘tool’.”, ‘type’: ‘invalid_request_error’, ‘param’: ‘messages[0].role’, ‘code’: ‘invalid_value’}}” Like to seek some advise where did i go wrong with my settings?

Video recording of my workflow: KNIME Analytics Platform - 14 August 2024 | Loom

I think in the Chat Model Prompter the reason will be hidden in the “Task” Column of your table that you use to define the role:

That column should for each row define if the model role is “system” (for system message), assistant (indicating it is a previous AI response), user (the next or a previous message from the user) or function/tool.

I think what you have in your “Task” column is different from the values that are allowed.

The LLM Prompter uses the “completions structure” and I think your input table is made for that. The Chat Model Promter uses the chat completions structure which needs the model role to be defined and there are only specific roles allowed.

1 Like