Las week, Perplexity announced that citations (= url sources) are by default returned with chat completions. This is included into a citations object within the completion output response. I would like to be able to display the citations directly in the chat window, like it is in the perplexity web app.
More details
Exemple of API query towards perplexity :
{
"id": "5db80598-305a-473e-98ba-eb9dbca8a62d",
"model": "llama-3.1-sonar-small-128k-online",
"created": 1731340613,
"usage": {
"prompt_tokens": 7,
"completion_tokens": 497,
"total_tokens": 504
},
"citations": [
"https://www.theatlantic.com/family/archive/2021/10/meaning-life-macronutrients-purpose-search/620440/",
"https://en.wikipedia.org/wiki/Meaning_of_life",
"https://greatergood.berkeley.edu/article/item/three_ways_to_see_meaning_in_your_life",
"https://philosophynow.org/issues/147/Why_Youre_Probably_Wrong_About_The_Meaning_of_Life",
"https://iankoniak.com/what-is-the-meaning-of-life/"
],
"object": "chat.completion",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "The meaning of life is a deeply personal and complex question that has been explored by philosophers, theologians, and psychologists across various cultures and ideologies. There is no consensus on a definitive answer, and the search for meaning continues to be a significant aspect of human existence.\n\n### Key Dimensions of Meaning\n\n1. Coherence: This dimension involves the understanding that events in life fit together for a reason. It is the belief that things happen in your life for a purpose, even if you may not fully comprehend it at the moment[1][3].\n\n2. Purpose: This refers to the existence of goals and aims. It is the belief that you are alive to do something specific, such as sharing secrets to happiness or spreading love abundantly[1][3].\n\n3. Significance: This dimension involves the sense that your life matters. It is the confidence that the world would be poorer if you didn't exist, giving your life inherent value[1][3].\n\n### Philosophical Perspectives\n\n1. Subjective vs. Objective Meaning: Some philosophers argue that meaning in life is subjective, derived from personal experiences and goals. Others propose that there are objective criteria for what constitutes meaningful life, such as fulfilling goals and contributing to society[2][4].\n\n2. Creating vs. Detecting Meaning: While some argue that meaning must be actively constructed through deep self-reflection or significant life events, research suggests that most people find meaning in their daily lives through their relationships, work, and spiritual beliefs[3][4].\n\n3. Activities and Experiences: Philosophers identify various activities and experiences as meaningful, including loving relationships, creativity, personal excellence, moral goodness, altruism, knowledge, transcendence, and achievement[4].\n\n### Practical Approaches\n\n1. Pursuing Full Potential: One practical approach is to pursue your full potential and become the best version of yourself in all areas of life. This philosophy emphasizes the joy in the journey rather than just the destination[5].\n\n2. Cultivating Coherence and Purpose: By focusing on coherence (making sense of life) and purpose (orienting towards fulfilling goals), individuals can enhance their experience of meaning. This involves detecting the meaning already present in daily life and actively pursuing fulfilling goals[3].\n\nIn summary, the meaning of life is multifaceted and highly individualized. It involves a combination of coherence, purpose, and significance, which can be cultivated through various activities and experiences."
},
"delta": {
"role": "assistant",
"content": ""
}
}
]
}
Which components are impacted by your request?
No response
Pictures
UI and completion processing.
Code of Conduct
[X] I agree to follow this project's Code of Conduct
What features would you like to see added?
Las week, Perplexity announced that citations (= url sources) are by default returned with chat completions. This is included into a citations object within the completion output response. I would like to be able to display the citations directly in the chat window, like it is in the perplexity web app.
More details
Exemple of API query towards perplexity :
{ "id": "5db80598-305a-473e-98ba-eb9dbca8a62d", "model": "llama-3.1-sonar-small-128k-online", "created": 1731340613, "usage": { "prompt_tokens": 7, "completion_tokens": 497, "total_tokens": 504 }, "citations": [ "https://www.theatlantic.com/family/archive/2021/10/meaning-life-macronutrients-purpose-search/620440/", "https://en.wikipedia.org/wiki/Meaning_of_life", "https://greatergood.berkeley.edu/article/item/three_ways_to_see_meaning_in_your_life", "https://philosophynow.org/issues/147/Why_Youre_Probably_Wrong_About_The_Meaning_of_Life", "https://iankoniak.com/what-is-the-meaning-of-life/" ], "object": "chat.completion", "choices": [ { "index": 0, "finish_reason": "stop", "message": { "role": "assistant", "content": "The meaning of life is a deeply personal and complex question that has been explored by philosophers, theologians, and psychologists across various cultures and ideologies. There is no consensus on a definitive answer, and the search for meaning continues to be a significant aspect of human existence.\n\n### Key Dimensions of Meaning\n\n1. Coherence: This dimension involves the understanding that events in life fit together for a reason. It is the belief that things happen in your life for a purpose, even if you may not fully comprehend it at the moment[1][3].\n\n2. Purpose: This refers to the existence of goals and aims. It is the belief that you are alive to do something specific, such as sharing secrets to happiness or spreading love abundantly[1][3].\n\n3. Significance: This dimension involves the sense that your life matters. It is the confidence that the world would be poorer if you didn't exist, giving your life inherent value[1][3].\n\n### Philosophical Perspectives\n\n1. Subjective vs. Objective Meaning: Some philosophers argue that meaning in life is subjective, derived from personal experiences and goals. Others propose that there are objective criteria for what constitutes meaningful life, such as fulfilling goals and contributing to society[2][4].\n\n2. Creating vs. Detecting Meaning: While some argue that meaning must be actively constructed through deep self-reflection or significant life events, research suggests that most people find meaning in their daily lives through their relationships, work, and spiritual beliefs[3][4].\n\n3. Activities and Experiences: Philosophers identify various activities and experiences as meaningful, including loving relationships, creativity, personal excellence, moral goodness, altruism, knowledge, transcendence, and achievement[4].\n\n### Practical Approaches\n\n1. Pursuing Full Potential: One practical approach is to pursue your full potential and become the best version of yourself in all areas of life. This philosophy emphasizes the joy in the journey rather than just the destination[5].\n\n2. Cultivating Coherence and Purpose: By focusing on coherence (making sense of life) and purpose (orienting towards fulfilling goals), individuals can enhance their experience of meaning. This involves detecting the meaning already present in daily life and actively pursuing fulfilling goals[3].\n\nIn summary, the meaning of life is multifaceted and highly individualized. It involves a combination of coherence, purpose, and significance, which can be cultivated through various activities and experiences." }, "delta": { "role": "assistant", "content": "" } } ] }
Which components are impacted by your request?
No response
Pictures
UI and completion processing.
Code of Conduct