-
Notifications
You must be signed in to change notification settings - Fork 106
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
Perplexity: citations #299
Comments
If the Perplexity API supports it, sure. I don't see an option for this in the chat completions API. Kagi includes the links as part of the responses, for example, and gptel formats them as Markdown or Org links. |
I've just asked perplexity itself how to do this ;) and this is the reply I got:
Does that make any sense to you? |
Yup, that makes sense. I don't have a perplexity account, will you be able to test some code if I provide it here? |
Yes, sure. |
Okay, run the following code after adjusting the (defvar gptel--perplexity
(gptel-make-openai "Perplexity"
:host "api.perplexity.ai"
:key "your-api-key"
:endpoint "/chat/completions"
:stream t
:header (lambda () (when-let (key (gptel--get-api-key))
`(("Authorization" . ,(concat "Bearer " key))
("Referer" . "https://www.perplexity.ai/"))))
:models '("pplx-7b-chat"
"pplx-70b-chat"
"pplx-7b-online"
"pplx-70b-online")))
(setq gptel-backend gptel--perplexity
gptel-log-level 'debug)
You can kill the |
|
|
Done. Hope that helps. |
Thanks. There is no Could you try with |
Here |
Thanks. Again, I don't see any citations in the JSON response or in the response content. I think we can consider the LLM response a hallucination. I'll leave this issue open. If someone finds a way to access the citations from the API, they can let us know. |
It could be that citations are only generated for the (My understanding is that these are referred to as the |
as far as I see the pplx-7b-online and the pplx-70b-online models are not accessible anymore. Only the sonar ones. In any case, I've read that citations are not being sent over the API calls, yet. It seems they are working to will include them. I'll let you know as soon as I know more. |
Sure, I'll leave the issue open for now. |
First,
Thank you very much for this great package!
I'm (also) using perplexity. So far I successfully managed to set gptel in order to make API calls to the perplexity models.
One of the nice points of perplexity, at least when used in the browser, is the listing of the citations or sources with links that the model used to formulate the answer. Links that one can follow.
Would it be possible to include this information also when using perplexity through gptel in emacs? That would be awesome!
Thank you for your reply!
The text was updated successfully, but these errors were encountered: