OptionalapiAPI key for Perplexity. Defaults to the value of PERPLEXITY_API_KEY environment variable.
OptionalcacheOptionalcallbackOptionalcallbacksOptionaldisableWhen 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.
OptionaldisableWhether to disable streaming.
If streaming is bypassed, then stream() will defer to
invoke().
OptionalenableEnables a classifier that decides if web search is needed based on your query.
OptionalfrequencyFrequency penalty greater than 0
OptionallastFilters search results to only include content last updated after this date.
OptionallastFilters search results to only include content last updated before this date.
OptionalmaxThe maximum number of concurrent calls that can be made.
Defaults to Infinity, which means no limit.
OptionalmaxThe maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 6.
OptionalmaxMaximum number of tokens to generate
OptionalmetadataModel name to use
OptionalonCustom 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.
OptionalpresencePresence penalty between -2 and 2
OptionalreasoningControls how much computational effort the AI dedicates to each query for deep research models. Only applicable for sonar-deep-research.
OptionalreturnWhether to return images
OptionalreturnDetermines whether or not a request to an online model should return related questions.
OptionalsearchFilters search results to only include content published after this date.
OptionalsearchFilters search results to only include content published before this date.
OptionalsearchSearch domain filter - limit the citations used by the online model to URLs from the specified domains.
OptionalsearchControls the search mode used for the request. When set to 'academic', results will prioritize scholarly sources.
OptionalsearchReturns search results within the specified time interval - does not apply to images. Values include month, week, day, hour.
OptionalstreamingWhether to stream the results or not
OptionaltagsOptionaltemperatureTemperature parameter between 0 and 2
OptionaltimeoutTimeout for requests to Perplexity
OptionaltopKTop K parameter between 1 and 2048
OptionaltopPTop P parameter between 0 and 1
OptionalverboseOptionalwebConfiguration for using web search in model responses.
Interface defining the parameters for the Perplexity chat model.