brianpetro / obsidian-smart-connections

Chat with your notes & see links to related content with AI embeddings. Use local models or 100+ via APIs like Claude, Gemini, ChatGPT & Llama 3
https://smartconnections.app
GNU General Public License v3.0
2.58k stars 175 forks source link

Cannot use APIs from Perplexity #627

Open maitiSoutrik opened 4 months ago

maitiSoutrik commented 4 months ago

Hi Brian, Perplexity is a tool that has replaced everything for me. It would be nice to have support to use the API from this platform as well. Can this be added?

Msouza91 commented 4 months ago

Adding to this request, I have tried setting up my Perplexity API key for Chat and I'm getting a 400 error for a header with a default value that is not supported by the API.

{
    "message": "Frequency penalty must satisfy p > 0.",
    "type": "invalid_parameter",
    "code": 400
}

Here is my configuration on the plugin screen trying to follow their docs:

Screenshot 2024-05-30 at 10 36 58
brianpetro commented 4 months ago

Hey, thanks for letting me know. It might require adding an adapter to the https://github.com/brianpetro/jsbrains/blob/main/smart-chat-model module.