Skip to main content

Perplexity

The Perplexity API interface is very similar to the OpenAI interface. There are some subtle differences in the parameter list.

Parameters

The exact parameter name must be used, followed by the equals sign ( = ), then the value:

max_tokens          = 1024

Whitespace such as tabs and spaces are ignored.

frequency_penalty = 0.5
temperature = 1.0

Comments have a hash ( # ) at the beginning of the line and are ignored:

#not_used          = null

Definitions

The official Perplexity documentation has details about the parameters themselves.

https://docs.perplexity.ai/reference/post_chat_completions

Unused

  • Some parameters (such as model and messages) are handled by the Synthonnel software.

Supported

ParameterData TypeRange
max_tokensinteger1 to model dependant
temperaturefloat0 to 2
top_pfloat0 to 1
top_kinteger0 to 2048
presence_penaltyfloat-2.0 to 2.0
frequency_penaltyfloat-2.0 to 2.0