Node Perplexity worked perfectly until a Perplexity chat completion evolution.
Are you willing to work on this?
When role “User” is set, the JSon does not specifiy “user”. When we set “System” or “Assistant” this is set. Maybe it is the issue.
Does anyone reproduce this issue ?
How to fix it ?
Hi @AVEk I have personally used Perplexity node and sometimes i also used to face inconsistent behavior, what i have end up using is the HTTP node to send requests with perplexity’s API, with that bearer token as auth header, also you can try upgrading to the latest stable version of n8n, for now using HTTP node would solve this:
Yeah this is a known bug with the Perplexity node, it doesn’t set the role properly when you pick “User”. Easiest fix is just using an HTTP Request node pointed at https://api.perplexity.ai/chat/completions with your API key as a Bearer token, that way you control the message payload yourself and don’t have to wait for the node to get patched.
Yeah this is a known bug with the built-in Perplexity node not setting the role properly, easiest fix is just use the HTTP Request node and hit the Perplexity API directly at https://api.perplexity.ai/chat/completions with your API key as a Bearer token. That way you control the full JSON body and don’t have to wait for a node fix.
Indeed, it is a work around.
Unfortunately, the native node and the Completions API does not use the same path ant the Completions API costs much more than the native node
@AVEk There is no fix for now for the perplexity node so the only best method you currently has is to use this https://api.perplexity.ai/chat/completions as end point using HTTP node