Discussions

Ask a Question

Differents returns for same topic

It seems return wrong results if specify the response language. and results is differents with English return. curl --request POST --url <https://api.perplexity.ai/chat/completions> --header 'accept: application/json' --header "authorization: Bearer $KEY" --header 'content-type: application/json' --data '{"model": "sonar-small-20240223-online", "messages": [{"role":"system", "content": "Always respond in japanese"},{"role": "user", "content": "how many EV car sold in Japan in 2024?"}], "return_citations": true, "return_images": true}' { "id": "586bddee-7930-441f-8ebf-b4dc7ce959cb", "model": "sonar-small-20240223-online", "created": 1716005266, "usage": { "prompt_tokens": 49, "completion_tokens": 11, "total_tokens": 60 }, "object": "chat.completion", "choices": [{ "index": 0, "finish_reason": "stop", "message": { "role": "assistant", "content": "102,000" }, "delta": { "role": "assistant", "content": "" } }] } curl --request POST --url <https://api.perplexity.ai/chat/completions> --header 'accept: application/json' --header "authorization: Bearer $KEY" --header 'content-type: application/json' --data '{"model": "sonar-small-20240223-online", "messages": [{"role":"system", "content": ""},{"role": "user", "content": "how many EV car sold in Japan in 2024?"}], "return_citations": true, "return_images": true}' { "id": "748558e7-cb1f-4366-b4d2-f1386de9957b", "model": "sonar-small-20240223-online", "created": 1716005421, "usage": { "prompt_tokens": 44, "completion_tokens": 122, "total_tokens": 166 }, "object": "chat.completion", "choices": [{ "index": 0, "finish_reason": "stop", "message": { "role": "assistant", "content": "The search results do not provide specific information on the number of electric vehicles (EVs) sold in Japan in 2024. However, they do provide data on the number of EVs sold in the United States, which reached approximately 1.2 million in 2023. The data indicates that the EV market is growing rapidly in the United States, with sales volumes increasing and market share reaching 7.6% in 2023. However, there is no direct information available on the number of EVs sold in Japan during the same period." }, "delta": { "role": "assistant", "content": "" } }] } it seems return wrong results if specify the response language. and results is differents with English return.

Missing Additional Text/Description in Website Listings

Hello, I'm seeking assistance with an issue we're facing for our website being presented in Perplexity. We're trying to improve our presented data, but it seems we're missing some additional text/description for certain entries. I've attached a screenshot to illustrate the problem: <https://prnt.sc/icTiNjV-kNdu> As you can see, the listing data for our website lacks complete descriptions compared to other websites. What steps can we take to ensure our data is fully populated with the necessary descriptions? Are there specific guidelines or tools you recommend for auditing and enhancing the data on our site? Thank you in advance for your help!

Ineffective Constrain to Domain & Irrelevant Citations

When using "search_domain_filter" to constrain searches to a specified domain there are a couple of challenges: 1. The model still returns answers to questions completely unrelated to the specified domain e.g. 'who invented aeroplanes'; and 2. When doing so, it returns irrelevant citations from the specified domain.

Constrain to domain: "search_domain_filter" with multiple domains

Is search_domain_filter designed to work with multiple domains? Judging by the citations returned, my experience of using search_domain_filter: ["abc.com", "xyz.com"] is that results seem to be generated more from the first term ("abc.com") than the second term ("xyz.com"). Have you observed the same? If so, how can we give multiple domains equal weight?

response spec for return_citations, return_images requests

It would be helpful to specify the specification about response body for return_citations, return_images requests. If I missed it, please let me know.

Tunction/Tool calling plans?

I read "Enforce JSON grammar in responses" is planned for June. Does this mean function/tool calling capabilities?

API response with source link same with perplexity web

Hi Perplexity Team, I apply <https://perplexity.typeform.com/to/j50rnNiB> some days ago , but I still not receive the reply , Where can I get the status of the process

Custom stop words are not supported?

When I try with below configuration: completion = client.chat.completions.create( model=model, messages=messages, temperature=0, stop=["Observation:"] ) I got this error openai.BadRequestError: Error code: 400 - {'error': {'message': 'custom stop words are not implemented for completions.', 'type': 'unsupported_parameter', 'code': 400}} Without this It is not possible to use React prompts :(

Resolving Perplexity AI API Issue with Accessing some Links

When attempting to access and analyze the article '<https://news.google.com/rss/articles/CBMiZ2h0dHBzOi8vd3d3LmJmbXR2LmNvbS9lY29ub21pZS9sLWVyZS1nZW5lcmF0aXZlLW91LWxhLXZlcml0YWJsZS1yZXZvbHV0aW9uLWRlLWwtaWFfVk4tMjAyNDA0MTYwMTc3Lmh0bWzSAWtodHRwczovL3d3dy5iZm10di5jb20vYW1wL2Vjb25vbWllL2wtZXJlLWdlbmVyYXRpdmUtb3UtbGEtdmVyaXRhYmxlLXJldm9sdXRpb24tZGUtbC1pYV9WTi0yMDI0MDQxNjAxNzcuaHRtbA?oc=5'> using Perplexity AI in my browser, the analysis works flawlessly. However, when attempting the same analysis using the Perplexity AI API, it fails. I suspect the issue may be related to navigation headers. Are there any known solutions or workarounds to resolve or bypass this issue? Thank you for your assistance :)

[Online LLMs] How to expand the response token size?

I'm using `sonar-small-online` and the responses are always between ~300-400 tokens. How do I make it respond with longer responses (the same model in `https://labs.perplexity.ai/` is a lot longer). <br> I tried using max_tokens = 5000, for example. Didn't work. <br> Any help is greatly appreciated!