@perplexity-ai/perplexity_ai 0.38.8 → 0.39.1
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/CHANGELOG.md +22 -0
- package/dist/generated/api.d.ts +367 -3
- package/dist/generated/api.d.ts.map +1 -1
- package/dist/generated/api.js +145 -18
- package/dist/generated/api.js.map +1 -1
- package/dist/generated/runtime.d.ts +7 -0
- package/dist/generated/runtime.d.ts.map +1 -1
- package/dist/generated/runtime.js +113 -0
- package/dist/generated/runtime.js.map +1 -1
- package/dist/resources/client.d.ts +21 -0
- package/dist/resources/client.d.ts.map +1 -1
- package/dist/resources/client.js +8 -2
- package/dist/resources/client.js.map +1 -1
- package/dist/resources/decisions.d.ts +7 -0
- package/dist/resources/decisions.d.ts.map +1 -0
- package/dist/resources/decisions.js +3 -0
- package/dist/resources/decisions.js.map +1 -0
- package/dist/resources/index.d.ts +3 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +3 -0
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/models.d.ts +5 -0
- package/dist/resources/models.d.ts.map +1 -0
- package/dist/resources/models.js +3 -0
- package/dist/resources/models.js.map +1 -0
- package/dist/resources/shared.d.ts +12 -0
- package/dist/resources/shared.d.ts.map +1 -1
- package/dist/resources/skills/index.d.ts +3 -0
- package/dist/resources/skills/index.d.ts.map +1 -0
- package/dist/resources/skills/index.js +3 -0
- package/dist/resources/skills/index.js.map +1 -0
- package/dist/resources/skills/revisions.d.ts +5 -0
- package/dist/resources/skills/revisions.d.ts.map +1 -0
- package/dist/resources/skills/revisions.js +3 -0
- package/dist/resources/skills/revisions.js.map +1 -0
- package/dist/resources/skills/skills.d.ts +9 -0
- package/dist/resources/skills/skills.d.ts.map +1 -0
- package/dist/resources/skills/skills.js +3 -0
- package/dist/resources/skills/skills.js.map +1 -0
- package/dist/resources/skills.d.ts +2 -0
- package/dist/resources/skills.d.ts.map +1 -0
- package/dist/resources/skills.js +2 -0
- package/dist/resources/skills.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/generated/api.ts +487 -25
- package/src/generated/runtime.ts +129 -0
- package/src/resources/client.ts +26 -2
- package/src/resources/decisions.ts +6 -0
- package/src/resources/index.ts +3 -0
- package/src/resources/models.ts +4 -0
- package/src/resources/shared.ts +12 -0
- package/src/resources/skills/index.ts +2 -0
- package/src/resources/skills/revisions.ts +4 -0
- package/src/resources/skills/skills.ts +8 -0
- package/src/resources/skills.ts +1 -0
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.39.1](https://github.com/perplexityai/perplexity-node/compare/v0.39.0...v0.39.1) (2026-10-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Chores
|
|
7
|
+
|
|
8
|
+
* sync generated API SDKs ([#112](https://github.com/perplexityai/perplexity-node/issues/112)) ([31e234e](https://github.com/perplexityai/perplexity-node/commit/31e234ea29207cf60a2e57a944f749b27f9f4cd4))
|
|
9
|
+
|
|
10
|
+
## [0.39.0](https://github.com/perplexityai/perplexity-node/compare/v0.38.8...v0.39.0) (2026-10-15)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add Agent model catalog ([0e67ccb](https://github.com/perplexityai/perplexity-node/commit/0e67ccbc1812aa610e958733361982611deebed2))
|
|
16
|
+
* add Decisions API ([3795f06](https://github.com/perplexityai/perplexity-node/commit/3795f06ea165c9e131474faae2852b417a4efb55))
|
|
17
|
+
* **api:** add custom Skill management ([1bce8e5](https://github.com/perplexityai/perplexity-node/commit/1bce8e55e7e72eb34019d027532879b35b9eede2))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* support Agent cache controls and extraction usage ([9967ea8](https://github.com/perplexityai/perplexity-node/commit/9967ea8f54cfad1255c8241c61e6e8a9d63deafe))
|
|
23
|
+
* type background response stream reconnection ([2d5bb13](https://github.com/perplexityai/perplexity-node/commit/2d5bb135adc16d9d1cbeba49f9f2e77fcbf92aff))
|
|
24
|
+
|
|
3
25
|
## [0.38.8](https://github.com/perplexityai/perplexity-node/compare/v0.38.7...v0.38.8) (2026-10-07)
|
|
4
26
|
|
|
5
27
|
|
package/dist/generated/api.d.ts
CHANGED
|
@@ -538,6 +538,110 @@ export type DateFiltersOutput = {
|
|
|
538
538
|
search_before_date_filter?: DateOutput;
|
|
539
539
|
search_recency_filter?: SearchRecencyFilterOutput;
|
|
540
540
|
};
|
|
541
|
+
export type DecisionAnswerInput = DecisionNoulAnswerInput | DecisionScoreAnswerInput | DecisionChoiceAnswerInput;
|
|
542
|
+
export type DecisionAnswerOutput = DecisionNoulAnswerOutput | DecisionScoreAnswerOutput | DecisionChoiceAnswerOutput;
|
|
543
|
+
export type DecisionChoiceAnswerInput = {
|
|
544
|
+
choice: string;
|
|
545
|
+
confidence: number;
|
|
546
|
+
probabilities: {} & Record<string, number>;
|
|
547
|
+
type: "choice";
|
|
548
|
+
};
|
|
549
|
+
export type DecisionChoiceAnswerOutput = {
|
|
550
|
+
choice: string;
|
|
551
|
+
confidence: number;
|
|
552
|
+
probabilities: {} & Record<string, number>;
|
|
553
|
+
type: "choice";
|
|
554
|
+
};
|
|
555
|
+
export type DecisionChoiceQuestionInput = {
|
|
556
|
+
criteria: {} & Record<string, string | ({} & Record<string, unknown>) | unknown[] | null>;
|
|
557
|
+
instructions?: string | ({} & Record<string, unknown>) | unknown[] | null;
|
|
558
|
+
type: "choice";
|
|
559
|
+
};
|
|
560
|
+
export type DecisionChoiceQuestionOutput = {
|
|
561
|
+
criteria: {} & Record<string, string | ({} & Record<string, unknown>) | unknown[] | null>;
|
|
562
|
+
instructions?: string | ({} & Record<string, unknown>) | unknown[] | null;
|
|
563
|
+
type: "choice";
|
|
564
|
+
};
|
|
565
|
+
export type DecisionNoulAnswerInput = {
|
|
566
|
+
noul: number;
|
|
567
|
+
type: "noul";
|
|
568
|
+
};
|
|
569
|
+
export type DecisionNoulAnswerOutput = {
|
|
570
|
+
noul: number;
|
|
571
|
+
type: "noul";
|
|
572
|
+
};
|
|
573
|
+
export type DecisionNoulCriteriaInput = {
|
|
574
|
+
false?: string | ({} & Record<string, unknown>) | unknown[] | null;
|
|
575
|
+
true?: string | ({} & Record<string, unknown>) | unknown[] | null;
|
|
576
|
+
} | null;
|
|
577
|
+
export type DecisionNoulCriteriaOutput = {
|
|
578
|
+
false?: string | ({} & Record<string, unknown>) | unknown[] | null;
|
|
579
|
+
true?: string | ({} & Record<string, unknown>) | unknown[] | null;
|
|
580
|
+
} | null;
|
|
581
|
+
export type DecisionNoulQuestionInput = {
|
|
582
|
+
criteria?: DecisionNoulCriteriaInput;
|
|
583
|
+
instructions?: string | ({} & Record<string, unknown>) | unknown[] | null;
|
|
584
|
+
type: "noul";
|
|
585
|
+
};
|
|
586
|
+
export type DecisionNoulQuestionOutput = {
|
|
587
|
+
criteria?: DecisionNoulCriteriaOutput;
|
|
588
|
+
instructions?: string | ({} & Record<string, unknown>) | unknown[] | null;
|
|
589
|
+
type: "noul";
|
|
590
|
+
};
|
|
591
|
+
export type DecisionQuestionInput = DecisionNoulQuestionInput | DecisionChoiceQuestionInput | DecisionScoreQuestionInput;
|
|
592
|
+
export type DecisionQuestionOutput = DecisionNoulQuestionOutput | DecisionChoiceQuestionOutput | DecisionScoreQuestionOutput;
|
|
593
|
+
export type DecisionScoreAnswerInput = {
|
|
594
|
+
confidence: number;
|
|
595
|
+
legend: {} & Record<string, string | ({} & Record<string, unknown>) | unknown[]>;
|
|
596
|
+
probabilities: {} & Record<string, number>;
|
|
597
|
+
score: number;
|
|
598
|
+
type: "score";
|
|
599
|
+
};
|
|
600
|
+
export type DecisionScoreAnswerOutput = {
|
|
601
|
+
confidence: number;
|
|
602
|
+
legend: {} & Record<string, string | ({} & Record<string, unknown>) | unknown[]>;
|
|
603
|
+
probabilities: {} & Record<string, number>;
|
|
604
|
+
score: number;
|
|
605
|
+
type: "score";
|
|
606
|
+
};
|
|
607
|
+
export type DecisionScoreQuestionInput = {
|
|
608
|
+
criteria: (string | ({} & Record<string, unknown>) | unknown[])[];
|
|
609
|
+
instructions?: string | ({} & Record<string, unknown>) | unknown[] | null;
|
|
610
|
+
type: "score";
|
|
611
|
+
};
|
|
612
|
+
export type DecisionScoreQuestionOutput = {
|
|
613
|
+
criteria: (string | ({} & Record<string, unknown>) | unknown[])[];
|
|
614
|
+
instructions?: string | ({} & Record<string, unknown>) | unknown[] | null;
|
|
615
|
+
type: "score";
|
|
616
|
+
};
|
|
617
|
+
export type DecisionsRequestInput = {
|
|
618
|
+
model: string;
|
|
619
|
+
questions: {} & Record<string, DecisionQuestionInput>;
|
|
620
|
+
state: string | ({} & Record<string, unknown>) | unknown[];
|
|
621
|
+
};
|
|
622
|
+
export type DecisionsRequestOutput = {
|
|
623
|
+
model: string;
|
|
624
|
+
questions: {} & Record<string, DecisionQuestionOutput>;
|
|
625
|
+
state: string | ({} & Record<string, unknown>) | unknown[];
|
|
626
|
+
};
|
|
627
|
+
export type DecisionsResponseInput = {
|
|
628
|
+
answers: {} & Record<string, DecisionAnswerInput>;
|
|
629
|
+
model: string;
|
|
630
|
+
usage: DecisionUsageInput;
|
|
631
|
+
};
|
|
632
|
+
export type DecisionsResponseOutput = {
|
|
633
|
+
answers: {} & Record<string, DecisionAnswerOutput>;
|
|
634
|
+
model: string;
|
|
635
|
+
usage: DecisionUsageOutput;
|
|
636
|
+
};
|
|
637
|
+
export type DecisionUsageInput = {
|
|
638
|
+
input_tokens: number;
|
|
639
|
+
output_tokens: number;
|
|
640
|
+
};
|
|
641
|
+
export type DecisionUsageOutput = {
|
|
642
|
+
input_tokens: number;
|
|
643
|
+
output_tokens: number;
|
|
644
|
+
};
|
|
541
645
|
export type EmbeddingObjectInput = {
|
|
542
646
|
embedding?: string;
|
|
543
647
|
index?: number;
|
|
@@ -875,12 +979,22 @@ export type InputItemOutput = InputMessageOutput | FunctionCallOutputInputOutput
|
|
|
875
979
|
export type InputMessageInput = {
|
|
876
980
|
content: InputContentInput;
|
|
877
981
|
role: "user" | "assistant" | "system" | "developer";
|
|
878
|
-
type
|
|
982
|
+
type?: "message";
|
|
879
983
|
};
|
|
880
984
|
export type InputMessageOutput = {
|
|
881
985
|
content: InputContentOutput;
|
|
882
986
|
role: "user" | "assistant" | "system" | "developer";
|
|
883
|
-
type
|
|
987
|
+
type?: "message";
|
|
988
|
+
};
|
|
989
|
+
export type InputTokensDetailsInput = {
|
|
990
|
+
cache_creation_input_tokens?: number;
|
|
991
|
+
cache_read_input_tokens?: number;
|
|
992
|
+
cached_tokens: number;
|
|
993
|
+
};
|
|
994
|
+
export type InputTokensDetailsOutput = {
|
|
995
|
+
cache_creation_input_tokens?: number;
|
|
996
|
+
cache_read_input_tokens?: number;
|
|
997
|
+
cached_tokens: number;
|
|
884
998
|
};
|
|
885
999
|
export type JSONSchemaInput = {
|
|
886
1000
|
description?: string | null;
|
|
@@ -914,6 +1028,24 @@ export type ListAsyncApiChatCompletionsResponseOutput = {
|
|
|
914
1028
|
next_token?: string | null;
|
|
915
1029
|
requests: AsyncApiChatCompletionsResponseSummaryOutput[];
|
|
916
1030
|
};
|
|
1031
|
+
export type ManagedSkillInput = {
|
|
1032
|
+
created_at?: string;
|
|
1033
|
+
description?: string;
|
|
1034
|
+
latest_revision?: string;
|
|
1035
|
+
name?: string;
|
|
1036
|
+
revision?: string;
|
|
1037
|
+
skill_id: string;
|
|
1038
|
+
updated_at?: string;
|
|
1039
|
+
};
|
|
1040
|
+
export type ManagedSkillOutput = {
|
|
1041
|
+
created_at?: string;
|
|
1042
|
+
description?: string;
|
|
1043
|
+
latest_revision?: string;
|
|
1044
|
+
name?: string;
|
|
1045
|
+
revision?: string;
|
|
1046
|
+
skill_id: string;
|
|
1047
|
+
updated_at?: string;
|
|
1048
|
+
};
|
|
917
1049
|
export type McpApprovalRequestInputInput = {
|
|
918
1050
|
arguments: string;
|
|
919
1051
|
connector_id?: string;
|
|
@@ -1088,6 +1220,26 @@ export type MessageOutputItemOutput = {
|
|
|
1088
1220
|
status: StatusOutput;
|
|
1089
1221
|
type: "message";
|
|
1090
1222
|
};
|
|
1223
|
+
export type ModelInput = {
|
|
1224
|
+
created: number;
|
|
1225
|
+
id: string;
|
|
1226
|
+
object: "model";
|
|
1227
|
+
owned_by: string;
|
|
1228
|
+
};
|
|
1229
|
+
export type ModelOutput = {
|
|
1230
|
+
created: number;
|
|
1231
|
+
id: string;
|
|
1232
|
+
object: "model";
|
|
1233
|
+
owned_by: string;
|
|
1234
|
+
};
|
|
1235
|
+
export type ModelListInput = {
|
|
1236
|
+
data: ModelInput[];
|
|
1237
|
+
object: "list";
|
|
1238
|
+
};
|
|
1239
|
+
export type ModelListOutput = {
|
|
1240
|
+
data: ModelOutput[];
|
|
1241
|
+
object: "list";
|
|
1242
|
+
};
|
|
1091
1243
|
export type NamespaceToolInput = {
|
|
1092
1244
|
description: string;
|
|
1093
1245
|
name: string;
|
|
@@ -1138,6 +1290,12 @@ export type OutputItemDoneEventOutput = {
|
|
|
1138
1290
|
sequence_number: number;
|
|
1139
1291
|
type: "response.output_item.done";
|
|
1140
1292
|
};
|
|
1293
|
+
export type OutputTokensDetailsInput = {
|
|
1294
|
+
reasoning_tokens: number;
|
|
1295
|
+
};
|
|
1296
|
+
export type OutputTokensDetailsOutput = {
|
|
1297
|
+
reasoning_tokens: number;
|
|
1298
|
+
};
|
|
1141
1299
|
export type ParameterSpecInput = {
|
|
1142
1300
|
additional_properties?: boolean | null;
|
|
1143
1301
|
properties: {} & Record<string, unknown>;
|
|
@@ -1400,9 +1558,12 @@ export type ResponsesRequestInput = {
|
|
|
1400
1558
|
preset?: string;
|
|
1401
1559
|
previous_response_id?: string;
|
|
1402
1560
|
profile?: ProfileReferenceInput;
|
|
1561
|
+
prompt_cache_key?: string;
|
|
1403
1562
|
reasoning?: ReasoningConfigInput;
|
|
1404
1563
|
response_format?: ResponseFormatInput;
|
|
1564
|
+
service_tier?: "auto" | "default" | "flex" | "priority" | "fast";
|
|
1405
1565
|
skills?: SkillInput[];
|
|
1566
|
+
step_budget_reminder?: boolean;
|
|
1406
1567
|
store?: boolean;
|
|
1407
1568
|
stream?: boolean;
|
|
1408
1569
|
temperature?: number;
|
|
@@ -1422,9 +1583,12 @@ export type ResponsesRequestOutput = {
|
|
|
1422
1583
|
preset?: string;
|
|
1423
1584
|
previous_response_id?: string;
|
|
1424
1585
|
profile?: ProfileReferenceOutput;
|
|
1586
|
+
prompt_cache_key?: string;
|
|
1425
1587
|
reasoning?: ReasoningConfigOutput;
|
|
1426
1588
|
response_format?: ResponseFormatOutput;
|
|
1589
|
+
service_tier?: "auto" | "default" | "flex" | "priority" | "fast";
|
|
1427
1590
|
skills?: SkillOutput[];
|
|
1591
|
+
step_budget_reminder?: boolean;
|
|
1428
1592
|
store?: boolean;
|
|
1429
1593
|
stream?: boolean;
|
|
1430
1594
|
temperature?: number;
|
|
@@ -1440,7 +1604,10 @@ export type ResponsesResponseInput = {
|
|
|
1440
1604
|
model: string;
|
|
1441
1605
|
object: ResponsesObjectTypeInput;
|
|
1442
1606
|
output: OutputItemInput[];
|
|
1607
|
+
preset?: string;
|
|
1443
1608
|
previous_response_id?: string | null;
|
|
1609
|
+
prompt_cache_key?: string | null;
|
|
1610
|
+
service_tier?: string;
|
|
1444
1611
|
status: StatusInput;
|
|
1445
1612
|
store?: boolean;
|
|
1446
1613
|
usage?: ResponsesUsageInput;
|
|
@@ -1453,7 +1620,10 @@ export type ResponsesResponseOutput = {
|
|
|
1453
1620
|
model: string;
|
|
1454
1621
|
object: ResponsesObjectTypeOutput;
|
|
1455
1622
|
output: OutputItemOutput[];
|
|
1623
|
+
preset?: string;
|
|
1456
1624
|
previous_response_id?: string | null;
|
|
1625
|
+
prompt_cache_key?: string | null;
|
|
1626
|
+
service_tier?: string;
|
|
1457
1627
|
status: StatusOutput;
|
|
1458
1628
|
store?: boolean;
|
|
1459
1629
|
usage?: ResponsesUsageOutput;
|
|
@@ -1700,6 +1870,30 @@ export type ShareFileOutputItemOutput = {
|
|
|
1700
1870
|
};
|
|
1701
1871
|
export type SkillInput = BuiltinSkillInput | InlineSkillInput | CustomSkillInput;
|
|
1702
1872
|
export type SkillOutput = BuiltinSkillOutput | InlineSkillOutput | CustomSkillOutput;
|
|
1873
|
+
export type SkillBundleInput = {
|
|
1874
|
+
file: Blob;
|
|
1875
|
+
};
|
|
1876
|
+
export type SkillBundleOutput = {
|
|
1877
|
+
file: string;
|
|
1878
|
+
};
|
|
1879
|
+
export type SkillDownloadInput = {
|
|
1880
|
+
download_url: string;
|
|
1881
|
+
name?: string;
|
|
1882
|
+
revision?: string;
|
|
1883
|
+
};
|
|
1884
|
+
export type SkillDownloadOutput = {
|
|
1885
|
+
download_url: string;
|
|
1886
|
+
name?: string;
|
|
1887
|
+
revision?: string;
|
|
1888
|
+
};
|
|
1889
|
+
export type SkillListInput = {
|
|
1890
|
+
next_page_token?: string;
|
|
1891
|
+
skills: SkillSummaryInput[];
|
|
1892
|
+
};
|
|
1893
|
+
export type SkillListOutput = {
|
|
1894
|
+
next_page_token?: string;
|
|
1895
|
+
skills: SkillSummaryOutput[];
|
|
1896
|
+
};
|
|
1703
1897
|
export type SkillLoadedOutputItemInput = {
|
|
1704
1898
|
name: string;
|
|
1705
1899
|
type: "skill_loaded";
|
|
@@ -1708,6 +1902,38 @@ export type SkillLoadedOutputItemOutput = {
|
|
|
1708
1902
|
name: string;
|
|
1709
1903
|
type: "skill_loaded";
|
|
1710
1904
|
};
|
|
1905
|
+
export type SkillRevisionInput = {
|
|
1906
|
+
created_at?: string;
|
|
1907
|
+
name?: string;
|
|
1908
|
+
revision: string;
|
|
1909
|
+
};
|
|
1910
|
+
export type SkillRevisionOutput = {
|
|
1911
|
+
created_at?: string;
|
|
1912
|
+
name?: string;
|
|
1913
|
+
revision: string;
|
|
1914
|
+
};
|
|
1915
|
+
export type SkillRevisionListInput = {
|
|
1916
|
+
next_page_token?: string;
|
|
1917
|
+
revisions: SkillRevisionInput[];
|
|
1918
|
+
};
|
|
1919
|
+
export type SkillRevisionListOutput = {
|
|
1920
|
+
next_page_token?: string;
|
|
1921
|
+
revisions: SkillRevisionOutput[];
|
|
1922
|
+
};
|
|
1923
|
+
export type SkillSummaryInput = {
|
|
1924
|
+
created_at?: string;
|
|
1925
|
+
name?: string;
|
|
1926
|
+
revision?: string;
|
|
1927
|
+
skill_id: string;
|
|
1928
|
+
updated_at?: string;
|
|
1929
|
+
};
|
|
1930
|
+
export type SkillSummaryOutput = {
|
|
1931
|
+
created_at?: string;
|
|
1932
|
+
name?: string;
|
|
1933
|
+
revision?: string;
|
|
1934
|
+
skill_id: string;
|
|
1935
|
+
updated_at?: string;
|
|
1936
|
+
};
|
|
1711
1937
|
export type StatusInput = "completed" | "failed" | "in_progress" | "queued" | "cancelled" | "requires_action";
|
|
1712
1938
|
export type StatusOutput = "completed" | "failed" | "in_progress" | "queued" | "cancelled" | "requires_action";
|
|
1713
1939
|
export type TextDeltaEventInput = {
|
|
@@ -1755,10 +1981,14 @@ export type ToolCallOutput = {
|
|
|
1755
1981
|
type?: "function" | null;
|
|
1756
1982
|
};
|
|
1757
1983
|
export type ToolCallDetailsInput = {
|
|
1984
|
+
cost_usd?: number;
|
|
1758
1985
|
invocation?: number;
|
|
1986
|
+
token_usage?: ToolCallTokenUsageInput[];
|
|
1759
1987
|
};
|
|
1760
1988
|
export type ToolCallDetailsOutput = {
|
|
1989
|
+
cost_usd?: number;
|
|
1761
1990
|
invocation?: number;
|
|
1991
|
+
token_usage?: ToolCallTokenUsageOutput[];
|
|
1762
1992
|
};
|
|
1763
1993
|
export type ToolCallFunctionInput = {
|
|
1764
1994
|
arguments?: string | null;
|
|
@@ -1768,6 +1998,20 @@ export type ToolCallFunctionOutput = {
|
|
|
1768
1998
|
arguments?: string | null;
|
|
1769
1999
|
name?: string | null;
|
|
1770
2000
|
};
|
|
2001
|
+
export type ToolCallTokenUsageInput = {
|
|
2002
|
+
input_tokens: number;
|
|
2003
|
+
input_tokens_details: InputTokensDetailsInput;
|
|
2004
|
+
model?: string;
|
|
2005
|
+
output_tokens: number;
|
|
2006
|
+
output_tokens_details: OutputTokensDetailsInput;
|
|
2007
|
+
};
|
|
2008
|
+
export type ToolCallTokenUsageOutput = {
|
|
2009
|
+
input_tokens: number;
|
|
2010
|
+
input_tokens_details: InputTokensDetailsOutput;
|
|
2011
|
+
model?: string;
|
|
2012
|
+
output_tokens: number;
|
|
2013
|
+
output_tokens_details: OutputTokensDetailsOutput;
|
|
2014
|
+
};
|
|
1771
2015
|
export type ToolChoiceInput = ("none" | "auto" | "required") | ({} & Record<string, unknown>);
|
|
1772
2016
|
export type ToolChoiceOutput = ("none" | "auto" | "required") | ({} & Record<string, unknown>);
|
|
1773
2017
|
export type ToolSearchOutputItemInput = {
|
|
@@ -1972,6 +2216,14 @@ export declare class ResponsesFilesResource {
|
|
|
1972
2216
|
}, options?: RequestOptions): APIPromise<Response>;
|
|
1973
2217
|
list(responseID: string, options?: RequestOptions): APIPromise<ResponseFileListOutput>;
|
|
1974
2218
|
}
|
|
2219
|
+
export declare class SkillsRevisionsResource {
|
|
2220
|
+
private readonly _client;
|
|
2221
|
+
constructor(client: SdkTransport);
|
|
2222
|
+
list(skillID: string, params?: {
|
|
2223
|
+
limit?: number;
|
|
2224
|
+
page_token?: string;
|
|
2225
|
+
}, options?: RequestOptions): APIPromise<SkillRevisionListOutput>;
|
|
2226
|
+
}
|
|
1975
2227
|
export declare class AsyncResource {
|
|
1976
2228
|
readonly chat: AsyncChatResource;
|
|
1977
2229
|
constructor(client: SdkTransport);
|
|
@@ -1989,11 +2241,21 @@ export declare class ContextualizedEmbeddingsResource {
|
|
|
1989
2241
|
constructor(client: SdkTransport);
|
|
1990
2242
|
create(body: ContextualizedEmbeddingsRequestInput, options?: RequestOptions): APIPromise<ContextualizedEmbeddingsResponseOutput>;
|
|
1991
2243
|
}
|
|
2244
|
+
export declare class DecisionsResource {
|
|
2245
|
+
private readonly _client;
|
|
2246
|
+
constructor(client: SdkTransport);
|
|
2247
|
+
create(body: DecisionsRequestInput, options?: RequestOptions): APIPromise<DecisionsResponseOutput>;
|
|
2248
|
+
}
|
|
1992
2249
|
export declare class EmbeddingsResource {
|
|
1993
2250
|
private readonly _client;
|
|
1994
2251
|
constructor(client: SdkTransport);
|
|
1995
2252
|
create(body: EmbeddingsRequestInput, options?: RequestOptions): APIPromise<EmbeddingsResponseOutput>;
|
|
1996
2253
|
}
|
|
2254
|
+
export declare class ModelsResource {
|
|
2255
|
+
private readonly _client;
|
|
2256
|
+
constructor(client: SdkTransport);
|
|
2257
|
+
list(options?: RequestOptions): APIPromise<ModelListOutput>;
|
|
2258
|
+
}
|
|
1997
2259
|
export declare class ResponsesResource {
|
|
1998
2260
|
private readonly _client;
|
|
1999
2261
|
readonly files: ResponsesFilesResource;
|
|
@@ -2013,23 +2275,83 @@ export declare class ResponsesResource {
|
|
|
2013
2275
|
create(body: ResponsesRequestInput, options?: RequestOptions): APIPromise<(ResponsesResponseOutput & {
|
|
2014
2276
|
output_text: string;
|
|
2015
2277
|
}) | Stream<ResponseStreamEventOutput>>;
|
|
2016
|
-
retrieve(responseID: string,
|
|
2278
|
+
retrieve(responseID: string, params?: Omit<{
|
|
2279
|
+
format?: "default" | "short";
|
|
2280
|
+
starting_after?: number;
|
|
2281
|
+
stream?: boolean;
|
|
2282
|
+
}, "stream"> & {
|
|
2283
|
+
stream?: false;
|
|
2284
|
+
}, options?: RequestOptions): APIPromise<ResponsesResponseOutput & {
|
|
2285
|
+
output_text: string;
|
|
2286
|
+
}>;
|
|
2287
|
+
retrieve(responseID: string, params: Omit<Required<{
|
|
2288
|
+
format?: "default" | "short";
|
|
2289
|
+
starting_after?: number;
|
|
2290
|
+
stream?: boolean;
|
|
2291
|
+
}>, "stream"> & {
|
|
2292
|
+
stream: true;
|
|
2293
|
+
}, options?: RequestOptions): APIPromise<Stream<ResponseStreamEventOutput>>;
|
|
2294
|
+
retrieve(responseID: string, params: Omit<Required<{
|
|
2295
|
+
format?: "default" | "short";
|
|
2296
|
+
starting_after?: number;
|
|
2297
|
+
stream?: boolean;
|
|
2298
|
+
}>, "stream"> & {
|
|
2299
|
+
stream: boolean;
|
|
2300
|
+
}, options?: RequestOptions): APIPromise<(ResponsesResponseOutput & {
|
|
2301
|
+
output_text: string;
|
|
2302
|
+
}) | Stream<ResponseStreamEventOutput>>;
|
|
2303
|
+
retrieve(responseID: string, params?: Omit<RequestOptions, "__binaryResponse" | "body" | "defaultBaseURL" | "method" | "path"> & {
|
|
2304
|
+
format?: never;
|
|
2305
|
+
starting_after?: never;
|
|
2306
|
+
}, options?: RequestOptions): APIPromise<ResponsesResponseOutput & {
|
|
2017
2307
|
output_text: string;
|
|
2018
2308
|
}>;
|
|
2309
|
+
retrieve(responseID: string, params?: {
|
|
2310
|
+
format?: "default" | "short";
|
|
2311
|
+
starting_after?: number;
|
|
2312
|
+
stream?: boolean;
|
|
2313
|
+
}, options?: RequestOptions): APIPromise<(ResponsesResponseOutput & {
|
|
2314
|
+
output_text: string;
|
|
2315
|
+
}) | Stream<ResponseStreamEventOutput>>;
|
|
2019
2316
|
}
|
|
2020
2317
|
export declare class SearchResource {
|
|
2021
2318
|
private readonly _client;
|
|
2022
2319
|
constructor(client: SdkTransport);
|
|
2023
2320
|
create(body: ApiSearchRequestInput, options?: RequestOptions): APIPromise<ApiSearchResponseOutput>;
|
|
2024
2321
|
}
|
|
2322
|
+
export declare class SkillsResource {
|
|
2323
|
+
private readonly _client;
|
|
2324
|
+
readonly revisions: SkillsRevisionsResource;
|
|
2325
|
+
constructor(client: SdkTransport);
|
|
2326
|
+
create(body: SkillBundleInput, options?: RequestOptions): APIPromise<ManagedSkillOutput>;
|
|
2327
|
+
delete(skillID: string, params: {
|
|
2328
|
+
expected_revision: string;
|
|
2329
|
+
}, options?: RequestOptions): APIPromise<void>;
|
|
2330
|
+
download(skillID: string, params?: {
|
|
2331
|
+
revision?: string;
|
|
2332
|
+
}, options?: RequestOptions): APIPromise<SkillDownloadOutput>;
|
|
2333
|
+
list(params?: {
|
|
2334
|
+
limit?: number;
|
|
2335
|
+
page_token?: string;
|
|
2336
|
+
}, options?: RequestOptions): APIPromise<SkillListOutput>;
|
|
2337
|
+
retrieve(skillID: string, params?: {
|
|
2338
|
+
revision?: string;
|
|
2339
|
+
}, options?: RequestOptions): APIPromise<ManagedSkillOutput>;
|
|
2340
|
+
update(skillID: string, body: SkillBundleInput, params: {
|
|
2341
|
+
expected_revision: string;
|
|
2342
|
+
}, options?: RequestOptions): APIPromise<ManagedSkillOutput>;
|
|
2343
|
+
}
|
|
2025
2344
|
export declare class PerplexitySdk {
|
|
2026
2345
|
readonly async: AsyncResource;
|
|
2027
2346
|
readonly browser: BrowserResource;
|
|
2028
2347
|
readonly chat: ChatResource;
|
|
2029
2348
|
readonly contextualizedEmbeddings: ContextualizedEmbeddingsResource;
|
|
2349
|
+
readonly decisions: DecisionsResource;
|
|
2030
2350
|
readonly embeddings: EmbeddingsResource;
|
|
2351
|
+
readonly models: ModelsResource;
|
|
2031
2352
|
readonly responses: ResponsesResource;
|
|
2032
2353
|
readonly search: SearchResource;
|
|
2354
|
+
readonly skills: SkillsResource;
|
|
2033
2355
|
constructor(client: SdkTransport);
|
|
2034
2356
|
}
|
|
2035
2357
|
export declare class Async extends AsyncResource {
|
|
@@ -2040,12 +2362,18 @@ export declare class Chat extends ChatResource {
|
|
|
2040
2362
|
}
|
|
2041
2363
|
export declare class ContextualizedEmbeddings extends ContextualizedEmbeddingsResource {
|
|
2042
2364
|
}
|
|
2365
|
+
export declare class Decisions extends DecisionsResource {
|
|
2366
|
+
}
|
|
2043
2367
|
export declare class Embeddings extends EmbeddingsResource {
|
|
2044
2368
|
}
|
|
2369
|
+
export declare class Models extends ModelsResource {
|
|
2370
|
+
}
|
|
2045
2371
|
export declare class Responses extends ResponsesResource {
|
|
2046
2372
|
}
|
|
2047
2373
|
export declare class Search extends SearchResource {
|
|
2048
2374
|
}
|
|
2375
|
+
export declare class Skills extends SkillsResource {
|
|
2376
|
+
}
|
|
2049
2377
|
export type Annotation = AnnotationOutput;
|
|
2050
2378
|
export type APIPublicSearchResult = ApiPublicSearchResultOutput;
|
|
2051
2379
|
export type BrowserSessionResponse = BrowserSessionResponseOutput;
|
|
@@ -2056,6 +2384,10 @@ export type ContentPart = ContentPartOutput;
|
|
|
2056
2384
|
export type ContextualizedEmbeddingCreateParams = ContextualizedEmbeddingsRequestInput;
|
|
2057
2385
|
export type ContextualizedEmbeddingCreateResponse = ContextualizedEmbeddingsResponseOutput;
|
|
2058
2386
|
export type ContextualizedEmbeddingObject = ContextualizedEmbeddingObjectOutput;
|
|
2387
|
+
export type DecisionAnswer = DecisionAnswerOutput;
|
|
2388
|
+
export type DecisionCreateParams = DecisionsRequestInput;
|
|
2389
|
+
export type DecisionCreateResponse = Awaited<ReturnType<DecisionsResource["create"]>>;
|
|
2390
|
+
export type DecisionQuestion = DecisionQuestionInput;
|
|
2059
2391
|
export type EmbeddingCreateParams = EmbeddingsRequestInput;
|
|
2060
2392
|
export type EmbeddingCreateResponse = EmbeddingsResponseOutput;
|
|
2061
2393
|
export type EmbeddingObject = EmbeddingObjectOutput;
|
|
@@ -2068,6 +2400,9 @@ export type ImageSearchResultsOutputItem = ImageSearchResultsOutputItemOutput;
|
|
|
2068
2400
|
export type ImageSearchTool = ImageSearchToolInput;
|
|
2069
2401
|
export type InputItem = InputItemInput;
|
|
2070
2402
|
export type JsonSchemaFormat = JSONSchemaFormatInput;
|
|
2403
|
+
export type ManagedSkill = ManagedSkillOutput;
|
|
2404
|
+
export type Model = ModelOutput;
|
|
2405
|
+
export type ModelListResponse = Awaited<ReturnType<ModelsResource["list"]>>;
|
|
2071
2406
|
export type OutputItem = OutputItemOutput;
|
|
2072
2407
|
export type ResponseCancelResponse = Awaited<ReturnType<ResponsesResource["cancel"]>>;
|
|
2073
2408
|
export type ResponseCreateParams = ResponsesRequestInput;
|
|
@@ -2086,6 +2421,11 @@ export type ResponsesUsage = ResponsesUsageOutput;
|
|
|
2086
2421
|
export type SearchCreateParams = ApiSearchRequestInput;
|
|
2087
2422
|
export type SearchCreateResponse = ApiSearchResponseOutput;
|
|
2088
2423
|
export type SearchResult = SearchResultOutput;
|
|
2424
|
+
export type SkillDownloadResponse = SkillDownloadOutput;
|
|
2425
|
+
export type SkillListResponse = SkillListOutput;
|
|
2426
|
+
export type SkillRevision = SkillRevisionOutput;
|
|
2427
|
+
export type SkillRevisionListResponse = SkillRevisionListOutput;
|
|
2428
|
+
export type SkillUploadParams = SkillBundleInput;
|
|
2089
2429
|
export type StreamChunk = CompletionResponseOutput;
|
|
2090
2430
|
export type UsageInfo = UsageInfoOutput;
|
|
2091
2431
|
export type UserLocation = UserLocationInput;
|
|
@@ -2143,10 +2483,20 @@ export declare namespace ContextualizedEmbeddings {
|
|
|
2143
2483
|
type ContextualizedEmbeddingCreateParams = ContextualizedEmbeddingsRequestInput;
|
|
2144
2484
|
type ContextualizedEmbeddingCreateResponse = ContextualizedEmbeddingsResponseOutput;
|
|
2145
2485
|
}
|
|
2486
|
+
export declare namespace Decisions {
|
|
2487
|
+
type DecisionAnswer = DecisionAnswerOutput;
|
|
2488
|
+
type DecisionCreateParams = DecisionsRequestInput;
|
|
2489
|
+
type DecisionCreateResponse = Awaited<ReturnType<DecisionsResource["create"]>>;
|
|
2490
|
+
type DecisionQuestion = DecisionQuestionInput;
|
|
2491
|
+
}
|
|
2146
2492
|
export declare namespace Embeddings {
|
|
2147
2493
|
type EmbeddingCreateParams = EmbeddingsRequestInput;
|
|
2148
2494
|
type EmbeddingCreateResponse = EmbeddingsResponseOutput;
|
|
2149
2495
|
}
|
|
2496
|
+
export declare namespace Models {
|
|
2497
|
+
type Model = ModelOutput;
|
|
2498
|
+
type ModelListResponse = Awaited<ReturnType<ModelsResource["list"]>>;
|
|
2499
|
+
}
|
|
2150
2500
|
export declare namespace Responses {
|
|
2151
2501
|
class Files extends ResponsesFilesResource {
|
|
2152
2502
|
}
|
|
@@ -2188,4 +2538,18 @@ export declare namespace Search {
|
|
|
2188
2538
|
type SearchCreateParams = ApiSearchRequestInput;
|
|
2189
2539
|
type SearchCreateResponse = ApiSearchResponseOutput;
|
|
2190
2540
|
}
|
|
2541
|
+
export declare namespace Skills {
|
|
2542
|
+
class Revisions extends SkillsRevisionsResource {
|
|
2543
|
+
}
|
|
2544
|
+
type ManagedSkill = ManagedSkillOutput;
|
|
2545
|
+
type SkillDownloadResponse = SkillDownloadOutput;
|
|
2546
|
+
type SkillListResponse = SkillListOutput;
|
|
2547
|
+
type SkillRevision = SkillRevisionOutput;
|
|
2548
|
+
type SkillRevisionListResponse = SkillRevisionListOutput;
|
|
2549
|
+
type SkillUploadParams = SkillBundleInput;
|
|
2550
|
+
namespace Revisions {
|
|
2551
|
+
type SkillRevision = SkillRevisionOutput;
|
|
2552
|
+
type SkillRevisionListResponse = SkillRevisionListOutput;
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2191
2555
|
//# sourceMappingURL=api.d.ts.map
|