Perplexity Sonar transport. Builds the current /v1/sonar request shape and normalizes grounded citations, search results, usage/cost, and full or concise SSE streams.
Perplexity Sonar transport. Builds the current /v1/sonar request shape and normalizes grounded citations, search results, usage/cost, and full or concise SSE streams.
(extract-citation-parts raw)Return a vector of CitationPart maps from a Perplexity raw response. Prefers :search_results (carries title + snippet); falls back to :citations (URL-only).
Return a vector of CitationPart maps from a Perplexity raw response. Prefers :search_results (carries title + snippet); falls back to :citations (URL-only).
(parse-stream-event-perplexity _profile line)Parse both full and concise Sonar SSE chunks. Full-mode metadata can repeat on content chunks, so citations and usage are emitted only when the choice finishes. Concise reasoning metadata is translated to canonical reasoning deltas and final search results are emitted from chat.completion.done.
Parse both full and concise Sonar SSE chunks. Full-mode metadata can repeat on content chunks, so citations and usage are emitted only when the choice finishes. Concise reasoning metadata is translated to canonical reasoning deltas and final search results are emitted from chat.completion.done.
(perplexity-cost-calculator {:keys [_provider _model usage pricing]})Reads canonical token + search-query usage and produces a cost-result. Falls back to the default token cost when no :search-cost-per-call is set.
Reads canonical token + search-query usage and produces a cost-result. Falls back to the default token cost when no :search-cost-per-call is set.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |