From 3c197b9925a0a2bbeed41fdb7d015db0e94f9827 Mon Sep 17 00:00:00 2001 From: miraclebakelaser <65143272+miraclebakelaser@users.noreply.github.com> Date: Fri, 14 Feb 2025 15:09:54 +0900 Subject: [PATCH] docs(perplexity.md): removing `return_citations` documentation (#8527) Deprecation Notice: Effective immediately, all API users will see citations returned as part of their requests by default. This is not a breaking change. The return_citations parameter will no longer have any effect. [source](https://docs.perplexity.ai/changelog/changelog#citations-public-release-and-increased-default-rate-limits) --- docs/my-website/docs/providers/perplexity.md | 66 +------------------- 1 file changed, 1 insertion(+), 65 deletions(-) diff --git a/docs/my-website/docs/providers/perplexity.md b/docs/my-website/docs/providers/perplexity.md index 446f22b1f2f..620a7640ad5 100644 --- a/docs/my-website/docs/providers/perplexity.md +++ b/docs/my-website/docs/providers/perplexity.md @@ -64,71 +64,7 @@ All models listed here https://docs.perplexity.ai/docs/model-cards are supported -## Return citations - -Perplexity supports returning citations via `return_citations=True`. [Perplexity Docs](https://docs.perplexity.ai/reference/post_chat_completions). Note: Perplexity has this feature in **closed beta**, so you need them to grant you access to get citations from their API. - -If perplexity returns citations, LiteLLM will pass it straight through. - :::info -For passing more provider-specific, [go here](../completion/provider_specific_params.md) +For more information about passing provider-specific parameters, [go here](../completion/provider_specific_params.md) ::: - - - - -```python -from litellm import completion -import os - -os.environ['PERPLEXITYAI_API_KEY'] = "" -response = completion( - model="perplexity/mistral-7b-instruct", - messages=messages, - return_citations=True -) -print(response) -``` - - - - -1. Add perplexity to config.yaml - -```yaml -model_list: - - model_name: "perplexity-model" - litellm_params: - model: "llama-3.1-sonar-small-128k-online" - api_key: os.environ/PERPLEXITY_API_KEY -``` - -2. Start proxy - -```bash -litellm --config /path/to/config.yaml -``` - -3. Test it! - -```bash -curl -L -X POST 'http://0.0.0.0:4000/chat/completions' \ --H 'Content-Type: application/json' \ --H 'Authorization: Bearer sk-1234' \ --d '{ - "model": "perplexity-model", - "messages": [ - { - "role": "user", - "content": "Who won the world cup in 2022?" - } - ], - "return_citations": true -}' -``` - -[**Call w/ OpenAI SDK, Langchain, Instructor, etc.**](../proxy/user_keys.md#chatcompletions) - - -