perplex.js 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/client.js +19 -1
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -67,7 +67,13 @@ export default class PerplexityClient {
|
|
|
67
67
|
// Build the payload for the request
|
|
68
68
|
_buildPayload(query, opts = {}) {
|
|
69
69
|
const {
|
|
70
|
-
mode = 'auto',
|
|
70
|
+
mode = 'auto',
|
|
71
|
+
model = null,
|
|
72
|
+
sources = ['web'],
|
|
73
|
+
attachments = [],
|
|
74
|
+
language = 'en-US',
|
|
75
|
+
follow_up = null,
|
|
76
|
+
incognito = false
|
|
71
77
|
} = opts;
|
|
72
78
|
|
|
73
79
|
const attachmentsFinal = attachments.concat(follow_up && follow_up.attachments ? follow_up.attachments : []);
|
|
@@ -127,14 +133,26 @@ export default class PerplexityClient {
|
|
|
127
133
|
}
|
|
128
134
|
|
|
129
135
|
const params = {
|
|
136
|
+
always_search_override: false,
|
|
130
137
|
attachments: attachmentsFinal,
|
|
138
|
+
browser_agent_allow_once_from_toggle: false,
|
|
139
|
+
client_coordinates: null,
|
|
140
|
+
dsl_query: query,
|
|
141
|
+
force_enable_browser_agent: false,
|
|
131
142
|
frontend_context_uuid: cryptoRandomUUID(),
|
|
132
143
|
frontend_uuid: cryptoRandomUUID(),
|
|
133
144
|
is_incognito: incognito,
|
|
145
|
+
is_nav_suggestions_disabled: false,
|
|
146
|
+
is_related_query: false,
|
|
147
|
+
is_sponsored: false,
|
|
134
148
|
language,
|
|
135
149
|
last_backend_uuid: follow_up ? follow_up.backend_uuid : null,
|
|
150
|
+
local_search_enabled: false,
|
|
151
|
+
mentions: [],
|
|
136
152
|
mode: mode === 'auto' ? 'concise' : 'copilot',
|
|
137
153
|
model_preference: modelPref,
|
|
154
|
+
override_no_search: false,
|
|
155
|
+
prompt_source: "user",
|
|
138
156
|
source: 'default',
|
|
139
157
|
sources,
|
|
140
158
|
version: this.version
|