Interface defining the parameters for the Perplexity chat model.
interface PerplexityChatInputAPI key for Perplexity. Defaults to the value of PERPLEXITY_API_KEY environment variable.
When set to true, disables web search completely and the model will only use its training data to respond. This is useful when you want deterministic responses without external information.
Whether to disable streaming.
If streaming is bypassed, then stream() will defer to
invoke().
Enables a classifier that decides if web search is needed based on your query.
Frequency penalty greater than 0
Filters search results to only include content last updated after this date.
Filters search results to only include content last updated before this date.
The maximum number of concurrent calls that can be made.
Defaults to Infinity, which means no limit.
The maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 6.
Maximum number of tokens to generate
Model name to use
Custom handler to handle failed attempts. Takes the originally thrown error object as input, and should itself throw an error if the input error is not retryable.
Version of AIMessage output format to store in message content.
AIMessage.contentBlocks will lazily parse the contents of content into a
standard format. This flag can be used to additionally store the standard format
as the message content, e.g., for serialization purposes.
.contentBlocks).contentBlocks)You can also set LC_OUTPUT_VERSION as an environment variable to "v1" to
enable this by default.
Presence penalty between -2 and 2
Controls how much computational effort the AI dedicates to each query for deep research models. Only applicable for sonar-deep-research.
Whether to return images
Determines whether or not a request to an online model should return related questions.
Filters search results to only include content published after this date.
Filters search results to only include content published before this date.
Search domain filter - limit the citations used by the online model to URLs from the specified domains.
Controls the search mode used for the request. When set to 'academic', results will prioritize scholarly sources.
Returns search results within the specified time interval - does not apply to images. Values include month, week, day, hour.
Whether to stream the results or not
Temperature parameter between 0 and 2
Timeout for requests to Perplexity
Top K parameter between 1 and 2048
Top P parameter between 0 and 1
Configuration for using web search in model responses.