other-emerald•15mo ago
perflexity
Hi, I'm trying to utilize the Perplexity API with Voiceflow, but I keep receiving a 400 Bad Request error. Does anyone know how to resolve this? Thanks.
10 Replies
Voiceflow provides a platform for creating voice and chat assistants. It offers various functionalities such as interacting with third-party APIs or your own backend services, making network requests, and processing responses. Here's an example of how to make a GET request and process the response:
You can also create traces for each item you want to include in the assistant's response:
Voiceflow also supports various trace types, including text, visual content, cards, and more. For example, to perform a POST request, you can use the following code:
For more detailed guidance on making API requests in Voiceflow, you can refer to our Voiceflow Functions Documentation.
Send Question to Perplexity | Voiceflow Functions
Send a question to Perplexity's AI models. This supports pplx-7b-online and pplx-70b-online.
There is a function to do it super easily
genetic-orange•15mo ago
still gets a bad request
in the perplexity function?
genetic-orange•15mo ago
yeah it's a real mess
it's very different from the other chat completion functions
I haven't used it but it couldn't be that different.
Let me have a look at the API docs and see if I can through something together real quick.
genetic-orange•15mo ago
the endpoint works exactly like together.ai or mistral or anyscale i think
i'm working on it myself, just tweaking the function i used for anyscale
yeah it does look like it's a function error
i'm gonna try to get a test perplexity api key to confirm it
@sjst_0414 this might work? but i don't have an api key on me so i can't really test it
@shen @sjst_0414 Re-wrote it from scratch. Works like a charm! Now supports online models and did a bit more error checking.
genetic-orange•15mo ago
nice man that looks perfect