@orq-ai/node 4.11.0-rc.4 → 4.11.0-rc.5
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/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/modelmetadata.d.ts +2 -0
- package/models/components/modelmetadata.d.ts.map +1 -1
- package/models/components/modelmetadata.js +4 -0
- package/models/components/modelmetadata.js.map +1 -1
- package/models/components/reasoning.d.ts +40 -2
- package/models/components/reasoning.d.ts.map +1 -1
- package/models/components/reasoning.js +26 -3
- package/models/components/reasoning.js.map +1 -1
- package/models/components/reasoningparam.d.ts +40 -2
- package/models/components/reasoningparam.d.ts.map +1 -1
- package/models/components/reasoningparam.js +28 -3
- package/models/components/reasoningparam.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/operations/createagentrequest.d.ts +298 -4
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js +163 -9
- package/models/operations/createagentrequest.js.map +1 -1
- package/models/operations/createchatcompletion.d.ts +81 -4
- package/models/operations/createchatcompletion.d.ts.map +1 -1
- package/models/operations/createchatcompletion.js +45 -7
- package/models/operations/createchatcompletion.js.map +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createeval.js +16 -16
- package/models/operations/createprompt.d.ts +225 -12
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +124 -13
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createrouterresponse.d.ts +353 -8
- package/models/operations/createrouterresponse.d.ts.map +1 -1
- package/models/operations/createrouterresponse.js +198 -7
- package/models/operations/createrouterresponse.js.map +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/deploymentgetconfig.d.ts +70 -4
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +43 -8
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deployments.d.ts +74 -8
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +43 -8
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/getallprompts.d.ts +140 -4
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +79 -6
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +16 -16
- package/models/operations/getoneprompt.d.ts +140 -4
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +79 -6
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +140 -4
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +78 -6
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/listagents.d.ts +140 -0
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +79 -3
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +4 -4
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/listknowledgebases.d.ts +3 -0
- package/models/operations/listknowledgebases.d.ts.map +1 -1
- package/models/operations/listknowledgebases.js +1 -1
- package/models/operations/listknowledgebases.js.map +1 -1
- package/models/operations/listpromptversions.d.ts +140 -4
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +79 -6
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +3 -3
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrieveagentrequest.d.ts +140 -0
- package/models/operations/retrieveagentrequest.d.ts.map +1 -1
- package/models/operations/retrieveagentrequest.js +81 -2
- package/models/operations/retrieveagentrequest.js.map +1 -1
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.d.ts +154 -0
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +80 -5
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +154 -0
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +82 -4
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +298 -4
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +162 -9
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updateeval.js +16 -16
- package/models/operations/updateprompt.d.ts +225 -12
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +125 -14
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +5 -5
- package/sdk/feedback.d.ts +1 -4
- package/sdk/feedback.d.ts.map +1 -1
- package/sdk/feedback.js +1 -4
- package/sdk/feedback.js.map +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/modelmetadata.ts +6 -0
- package/src/models/components/reasoning.ts +50 -4
- package/src/models/components/reasoningparam.ts +48 -4
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/operations/createagentrequest.ts +460 -8
- package/src/models/operations/createchatcompletion.ts +129 -10
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/createprompt.ts +356 -27
- package/src/models/operations/createrouterresponse.ts +540 -16
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/deploymentgetconfig.ts +105 -8
- package/src/models/operations/deployments.ts +113 -16
- package/src/models/operations/getallprompts.ts +210 -8
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +16 -16
- package/src/models/operations/getoneprompt.ts +208 -8
- package/src/models/operations/getpromptversion.ts +212 -8
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/listagents.ts +215 -0
- package/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/listknowledgebases.ts +4 -1
- package/src/models/operations/listpromptversions.ts +212 -8
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrieveagentrequest.ts +222 -0
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +236 -1
- package/src/models/operations/streamrunagent.ts +242 -1
- package/src/models/operations/updateagent.ts +464 -9
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updateeval.ts +16 -16
- package/src/models/operations/updateprompt.ts +356 -27
- package/src/models/operations/updatetool.ts +7 -7
- package/src/sdk/feedback.ts +1 -4
|
@@ -707,6 +707,66 @@ export type CreatePromptTimeout = {
|
|
|
707
707
|
callTimeout: number;
|
|
708
708
|
};
|
|
709
709
|
|
|
710
|
+
/**
|
|
711
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
712
|
+
*/
|
|
713
|
+
export const CreatePromptPromptsType = {
|
|
714
|
+
Ephemeral: "ephemeral",
|
|
715
|
+
} as const;
|
|
716
|
+
/**
|
|
717
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
718
|
+
*/
|
|
719
|
+
export type CreatePromptPromptsType = ClosedEnum<
|
|
720
|
+
typeof CreatePromptPromptsType
|
|
721
|
+
>;
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
725
|
+
*
|
|
726
|
+
* @remarks
|
|
727
|
+
*
|
|
728
|
+
* - `5m`: 5 minutes
|
|
729
|
+
* - `1h`: 1 hour
|
|
730
|
+
*
|
|
731
|
+
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
732
|
+
*/
|
|
733
|
+
export const CreatePromptTtl = {
|
|
734
|
+
Fivem: "5m",
|
|
735
|
+
Oneh: "1h",
|
|
736
|
+
} as const;
|
|
737
|
+
/**
|
|
738
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
739
|
+
*
|
|
740
|
+
* @remarks
|
|
741
|
+
*
|
|
742
|
+
* - `5m`: 5 minutes
|
|
743
|
+
* - `1h`: 1 hour
|
|
744
|
+
*
|
|
745
|
+
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
746
|
+
*/
|
|
747
|
+
export type CreatePromptTtl = ClosedEnum<typeof CreatePromptTtl>;
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* Provider-level prompt caching configuration applied to the request. Creates a cache control breakpoint covering the request content. Only supported by `Anthropic` Claude models.
|
|
751
|
+
*/
|
|
752
|
+
export type CreatePromptCacheControl = {
|
|
753
|
+
/**
|
|
754
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
755
|
+
*/
|
|
756
|
+
type: CreatePromptPromptsType;
|
|
757
|
+
/**
|
|
758
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
759
|
+
*
|
|
760
|
+
* @remarks
|
|
761
|
+
*
|
|
762
|
+
* - `5m`: 5 minutes
|
|
763
|
+
* - `1h`: 1 hour
|
|
764
|
+
*
|
|
765
|
+
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
766
|
+
*/
|
|
767
|
+
ttl?: CreatePromptTtl | undefined;
|
|
768
|
+
};
|
|
769
|
+
|
|
710
770
|
/**
|
|
711
771
|
* Prompt configuration with model and messages.
|
|
712
772
|
*/
|
|
@@ -854,6 +914,14 @@ export type PromptInput = {
|
|
|
854
914
|
* Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
|
|
855
915
|
*/
|
|
856
916
|
timeout?: CreatePromptTimeout | undefined;
|
|
917
|
+
/**
|
|
918
|
+
* Provider-level prompt caching configuration applied to the request. Creates a cache control breakpoint covering the request content. Only supported by `Anthropic` Claude models.
|
|
919
|
+
*/
|
|
920
|
+
cacheControl?: CreatePromptCacheControl | undefined;
|
|
921
|
+
/**
|
|
922
|
+
* Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the legacy `user` field for prompt caching.
|
|
923
|
+
*/
|
|
924
|
+
promptCacheKey?: string | undefined;
|
|
857
925
|
};
|
|
858
926
|
|
|
859
927
|
export type CreatePromptRequestBody = {
|
|
@@ -882,11 +950,11 @@ export type CreatePromptRequestBody = {
|
|
|
882
950
|
path: string;
|
|
883
951
|
};
|
|
884
952
|
|
|
885
|
-
export const
|
|
953
|
+
export const CreatePromptPromptsResponseType = {
|
|
886
954
|
Prompt: "prompt",
|
|
887
955
|
} as const;
|
|
888
|
-
export type
|
|
889
|
-
typeof
|
|
956
|
+
export type CreatePromptPromptsResponseType = ClosedEnum<
|
|
957
|
+
typeof CreatePromptPromptsResponseType
|
|
890
958
|
>;
|
|
891
959
|
|
|
892
960
|
/**
|
|
@@ -1026,6 +1094,69 @@ export type CreatePromptPromptsResponseResponseFormat =
|
|
|
1026
1094
|
| CreatePromptResponseFormat5
|
|
1027
1095
|
| CreatePromptResponseFormat6;
|
|
1028
1096
|
|
|
1097
|
+
/**
|
|
1098
|
+
* Create a cache control breakpoint. Accepts only the value "ephemeral".
|
|
1099
|
+
*/
|
|
1100
|
+
export const CreatePromptPromptsResponse200ApplicationJSONResponseBodyType = {
|
|
1101
|
+
Ephemeral: "ephemeral",
|
|
1102
|
+
} as const;
|
|
1103
|
+
/**
|
|
1104
|
+
* Create a cache control breakpoint. Accepts only the value "ephemeral".
|
|
1105
|
+
*/
|
|
1106
|
+
export type CreatePromptPromptsResponse200ApplicationJSONResponseBodyType =
|
|
1107
|
+
ClosedEnum<
|
|
1108
|
+
typeof CreatePromptPromptsResponse200ApplicationJSONResponseBodyType
|
|
1109
|
+
>;
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
1113
|
+
*
|
|
1114
|
+
* @remarks
|
|
1115
|
+
*
|
|
1116
|
+
* - `5m`: 5 minutes
|
|
1117
|
+
* - `1h`: 1 hour
|
|
1118
|
+
*
|
|
1119
|
+
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
1120
|
+
*/
|
|
1121
|
+
export const CreatePromptPromptsResponseTtl = {
|
|
1122
|
+
Fivem: "5m",
|
|
1123
|
+
Oneh: "1h",
|
|
1124
|
+
} as const;
|
|
1125
|
+
/**
|
|
1126
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
1127
|
+
*
|
|
1128
|
+
* @remarks
|
|
1129
|
+
*
|
|
1130
|
+
* - `5m`: 5 minutes
|
|
1131
|
+
* - `1h`: 1 hour
|
|
1132
|
+
*
|
|
1133
|
+
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
1134
|
+
*/
|
|
1135
|
+
export type CreatePromptPromptsResponseTtl = ClosedEnum<
|
|
1136
|
+
typeof CreatePromptPromptsResponseTtl
|
|
1137
|
+
>;
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Provider-level prompt caching configuration applied to the request. Creates a cache control breakpoint covering the request content. Only supported by `Anthropic` Claude models.
|
|
1141
|
+
*/
|
|
1142
|
+
export type CreatePromptPromptsResponseCacheControl = {
|
|
1143
|
+
/**
|
|
1144
|
+
* Create a cache control breakpoint. Accepts only the value "ephemeral".
|
|
1145
|
+
*/
|
|
1146
|
+
type: CreatePromptPromptsResponse200ApplicationJSONResponseBodyType;
|
|
1147
|
+
/**
|
|
1148
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
1149
|
+
*
|
|
1150
|
+
* @remarks
|
|
1151
|
+
*
|
|
1152
|
+
* - `5m`: 5 minutes
|
|
1153
|
+
* - `1h`: 1 hour
|
|
1154
|
+
*
|
|
1155
|
+
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
1156
|
+
*/
|
|
1157
|
+
ttl: CreatePromptPromptsResponseTtl;
|
|
1158
|
+
};
|
|
1159
|
+
|
|
1029
1160
|
/**
|
|
1030
1161
|
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
1031
1162
|
*/
|
|
@@ -1172,6 +1303,10 @@ export type ModelParameters = {
|
|
|
1172
1303
|
| CreatePromptResponseFormat6
|
|
1173
1304
|
| null
|
|
1174
1305
|
| undefined;
|
|
1306
|
+
/**
|
|
1307
|
+
* Provider-level prompt caching configuration applied to the request. Creates a cache control breakpoint covering the request content. Only supported by `Anthropic` Claude models.
|
|
1308
|
+
*/
|
|
1309
|
+
cacheControl?: CreatePromptPromptsResponseCacheControl | null | undefined;
|
|
1175
1310
|
/**
|
|
1176
1311
|
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
1177
1312
|
*/
|
|
@@ -1326,12 +1461,14 @@ export type CreatePromptContent =
|
|
|
1326
1461
|
| string
|
|
1327
1462
|
| Array<CreatePrompt21 | CreatePrompt22 | CreatePrompt23>;
|
|
1328
1463
|
|
|
1329
|
-
export const
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1464
|
+
export const CreatePromptPromptsResponse200ApplicationJSONResponseBodyPromptConfigType =
|
|
1465
|
+
{
|
|
1466
|
+
Function: "function",
|
|
1467
|
+
} as const;
|
|
1468
|
+
export type CreatePromptPromptsResponse200ApplicationJSONResponseBodyPromptConfigType =
|
|
1469
|
+
ClosedEnum<
|
|
1470
|
+
typeof CreatePromptPromptsResponse200ApplicationJSONResponseBodyPromptConfigType
|
|
1471
|
+
>;
|
|
1335
1472
|
|
|
1336
1473
|
export type CreatePromptFunction = {
|
|
1337
1474
|
name: string;
|
|
@@ -1344,7 +1481,8 @@ export type CreatePromptFunction = {
|
|
|
1344
1481
|
export type CreatePromptToolCalls = {
|
|
1345
1482
|
id?: string | undefined;
|
|
1346
1483
|
index?: number | undefined;
|
|
1347
|
-
type:
|
|
1484
|
+
type:
|
|
1485
|
+
CreatePromptPromptsResponse200ApplicationJSONResponseBodyPromptConfigType;
|
|
1348
1486
|
function: CreatePromptFunction;
|
|
1349
1487
|
};
|
|
1350
1488
|
|
|
@@ -1661,11 +1799,11 @@ export type CreatePromptPromptsRetry = {
|
|
|
1661
1799
|
onCodes?: Array<number> | undefined;
|
|
1662
1800
|
};
|
|
1663
1801
|
|
|
1664
|
-
export const
|
|
1802
|
+
export const CreatePromptPromptsResponse200Type = {
|
|
1665
1803
|
ExactMatch: "exact_match",
|
|
1666
1804
|
} as const;
|
|
1667
|
-
export type
|
|
1668
|
-
typeof
|
|
1805
|
+
export type CreatePromptPromptsResponse200Type = ClosedEnum<
|
|
1806
|
+
typeof CreatePromptPromptsResponse200Type
|
|
1669
1807
|
>;
|
|
1670
1808
|
|
|
1671
1809
|
/**
|
|
@@ -1676,7 +1814,7 @@ export type CreatePromptPromptsCache = {
|
|
|
1676
1814
|
* Time to live for cached responses in seconds. Maximum 259200 seconds (3 days).
|
|
1677
1815
|
*/
|
|
1678
1816
|
ttl: number;
|
|
1679
|
-
type:
|
|
1817
|
+
type: CreatePromptPromptsResponse200Type;
|
|
1680
1818
|
};
|
|
1681
1819
|
|
|
1682
1820
|
export const CreatePromptLoadBalancerPromptsType = {
|
|
@@ -1717,6 +1855,66 @@ export type CreatePromptPromptsTimeout = {
|
|
|
1717
1855
|
callTimeout: number;
|
|
1718
1856
|
};
|
|
1719
1857
|
|
|
1858
|
+
/**
|
|
1859
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
1860
|
+
*/
|
|
1861
|
+
export const CreatePromptPromptsResponse200ApplicationJSONType = {
|
|
1862
|
+
Ephemeral: "ephemeral",
|
|
1863
|
+
} as const;
|
|
1864
|
+
/**
|
|
1865
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
1866
|
+
*/
|
|
1867
|
+
export type CreatePromptPromptsResponse200ApplicationJSONType = ClosedEnum<
|
|
1868
|
+
typeof CreatePromptPromptsResponse200ApplicationJSONType
|
|
1869
|
+
>;
|
|
1870
|
+
|
|
1871
|
+
/**
|
|
1872
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
1873
|
+
*
|
|
1874
|
+
* @remarks
|
|
1875
|
+
*
|
|
1876
|
+
* - `5m`: 5 minutes
|
|
1877
|
+
* - `1h`: 1 hour
|
|
1878
|
+
*
|
|
1879
|
+
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
1880
|
+
*/
|
|
1881
|
+
export const CreatePromptPromptsTtl = {
|
|
1882
|
+
Fivem: "5m",
|
|
1883
|
+
Oneh: "1h",
|
|
1884
|
+
} as const;
|
|
1885
|
+
/**
|
|
1886
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
1887
|
+
*
|
|
1888
|
+
* @remarks
|
|
1889
|
+
*
|
|
1890
|
+
* - `5m`: 5 minutes
|
|
1891
|
+
* - `1h`: 1 hour
|
|
1892
|
+
*
|
|
1893
|
+
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
1894
|
+
*/
|
|
1895
|
+
export type CreatePromptPromptsTtl = ClosedEnum<typeof CreatePromptPromptsTtl>;
|
|
1896
|
+
|
|
1897
|
+
/**
|
|
1898
|
+
* Provider-level prompt caching configuration applied to the request. Creates a cache control breakpoint covering the request content. Only supported by `Anthropic` Claude models.
|
|
1899
|
+
*/
|
|
1900
|
+
export type CreatePromptPromptsCacheControl = {
|
|
1901
|
+
/**
|
|
1902
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
1903
|
+
*/
|
|
1904
|
+
type: CreatePromptPromptsResponse200ApplicationJSONType;
|
|
1905
|
+
/**
|
|
1906
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
1907
|
+
*
|
|
1908
|
+
* @remarks
|
|
1909
|
+
*
|
|
1910
|
+
* - `5m`: 5 minutes
|
|
1911
|
+
* - `1h`: 1 hour
|
|
1912
|
+
*
|
|
1913
|
+
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
1914
|
+
*/
|
|
1915
|
+
ttl: CreatePromptPromptsTtl;
|
|
1916
|
+
};
|
|
1917
|
+
|
|
1720
1918
|
export type CreatePromptContentPromptsResponse200ApplicationJSONResponseBody2 =
|
|
1721
1919
|
components.TextContentPartSchema;
|
|
1722
1920
|
|
|
@@ -2187,6 +2385,14 @@ export type PromptField = {
|
|
|
2187
2385
|
* Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
|
|
2188
2386
|
*/
|
|
2189
2387
|
timeout?: CreatePromptPromptsTimeout | undefined;
|
|
2388
|
+
/**
|
|
2389
|
+
* Provider-level prompt caching configuration applied to the request. Creates a cache control breakpoint covering the request content. Only supported by `Anthropic` Claude models.
|
|
2390
|
+
*/
|
|
2391
|
+
cacheControl?: CreatePromptPromptsCacheControl | undefined;
|
|
2392
|
+
/**
|
|
2393
|
+
* Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the legacy `user` field for prompt caching.
|
|
2394
|
+
*/
|
|
2395
|
+
promptCacheKey?: string | undefined;
|
|
2190
2396
|
/**
|
|
2191
2397
|
* Array of messages that make up the conversation. Each message has a role (system, user, assistant, or tool) and content.
|
|
2192
2398
|
*/
|
|
@@ -2264,7 +2470,7 @@ export type CreatePromptPromptsMetadata = {
|
|
|
2264
2470
|
*/
|
|
2265
2471
|
export type CreatePromptPrompt = {
|
|
2266
2472
|
id: string;
|
|
2267
|
-
type:
|
|
2473
|
+
type: CreatePromptPromptsResponseType;
|
|
2268
2474
|
owner: string;
|
|
2269
2475
|
domainId: string;
|
|
2270
2476
|
created: string;
|
|
@@ -3490,6 +3696,40 @@ export function createPromptTimeoutToJSON(
|
|
|
3490
3696
|
);
|
|
3491
3697
|
}
|
|
3492
3698
|
|
|
3699
|
+
/** @internal */
|
|
3700
|
+
export const CreatePromptPromptsType$outboundSchema: z.ZodNativeEnum<
|
|
3701
|
+
typeof CreatePromptPromptsType
|
|
3702
|
+
> = z.nativeEnum(CreatePromptPromptsType);
|
|
3703
|
+
|
|
3704
|
+
/** @internal */
|
|
3705
|
+
export const CreatePromptTtl$outboundSchema: z.ZodNativeEnum<
|
|
3706
|
+
typeof CreatePromptTtl
|
|
3707
|
+
> = z.nativeEnum(CreatePromptTtl);
|
|
3708
|
+
|
|
3709
|
+
/** @internal */
|
|
3710
|
+
export type CreatePromptCacheControl$Outbound = {
|
|
3711
|
+
type: string;
|
|
3712
|
+
ttl: string;
|
|
3713
|
+
};
|
|
3714
|
+
|
|
3715
|
+
/** @internal */
|
|
3716
|
+
export const CreatePromptCacheControl$outboundSchema: z.ZodType<
|
|
3717
|
+
CreatePromptCacheControl$Outbound,
|
|
3718
|
+
z.ZodTypeDef,
|
|
3719
|
+
CreatePromptCacheControl
|
|
3720
|
+
> = z.object({
|
|
3721
|
+
type: CreatePromptPromptsType$outboundSchema,
|
|
3722
|
+
ttl: CreatePromptTtl$outboundSchema.default("5m"),
|
|
3723
|
+
});
|
|
3724
|
+
|
|
3725
|
+
export function createPromptCacheControlToJSON(
|
|
3726
|
+
createPromptCacheControl: CreatePromptCacheControl,
|
|
3727
|
+
): string {
|
|
3728
|
+
return JSON.stringify(
|
|
3729
|
+
CreatePromptCacheControl$outboundSchema.parse(createPromptCacheControl),
|
|
3730
|
+
);
|
|
3731
|
+
}
|
|
3732
|
+
|
|
3493
3733
|
/** @internal */
|
|
3494
3734
|
export type PromptInput$Outbound = {
|
|
3495
3735
|
messages: Array<
|
|
@@ -3535,6 +3775,8 @@ export type PromptInput$Outbound = {
|
|
|
3535
3775
|
cache?: CreatePromptCache$Outbound | undefined;
|
|
3536
3776
|
load_balancer?: CreatePromptLoadBalancer1$Outbound | undefined;
|
|
3537
3777
|
timeout?: CreatePromptTimeout$Outbound | undefined;
|
|
3778
|
+
cache_control?: CreatePromptCacheControl$Outbound | undefined;
|
|
3779
|
+
prompt_cache_key?: string | undefined;
|
|
3538
3780
|
};
|
|
3539
3781
|
|
|
3540
3782
|
/** @internal */
|
|
@@ -3596,6 +3838,9 @@ export const PromptInput$outboundSchema: z.ZodType<
|
|
|
3596
3838
|
loadBalancer: z.lazy(() => CreatePromptLoadBalancer1$outboundSchema)
|
|
3597
3839
|
.optional(),
|
|
3598
3840
|
timeout: z.lazy(() => CreatePromptTimeout$outboundSchema).optional(),
|
|
3841
|
+
cacheControl: z.lazy(() => CreatePromptCacheControl$outboundSchema)
|
|
3842
|
+
.optional(),
|
|
3843
|
+
promptCacheKey: z.string().optional(),
|
|
3599
3844
|
}).transform((v) => {
|
|
3600
3845
|
return remap$(v, {
|
|
3601
3846
|
frequencyPenalty: "frequency_penalty",
|
|
@@ -3611,6 +3856,8 @@ export const PromptInput$outboundSchema: z.ZodType<
|
|
|
3611
3856
|
toolChoice: "tool_choice",
|
|
3612
3857
|
parallelToolCalls: "parallel_tool_calls",
|
|
3613
3858
|
loadBalancer: "load_balancer",
|
|
3859
|
+
cacheControl: "cache_control",
|
|
3860
|
+
promptCacheKey: "prompt_cache_key",
|
|
3614
3861
|
});
|
|
3615
3862
|
});
|
|
3616
3863
|
|
|
@@ -3653,9 +3900,9 @@ export function createPromptRequestBodyToJSON(
|
|
|
3653
3900
|
}
|
|
3654
3901
|
|
|
3655
3902
|
/** @internal */
|
|
3656
|
-
export const
|
|
3657
|
-
typeof
|
|
3658
|
-
> = z.nativeEnum(
|
|
3903
|
+
export const CreatePromptPromptsResponseType$inboundSchema: z.ZodNativeEnum<
|
|
3904
|
+
typeof CreatePromptPromptsResponseType
|
|
3905
|
+
> = z.nativeEnum(CreatePromptPromptsResponseType);
|
|
3659
3906
|
|
|
3660
3907
|
/** @internal */
|
|
3661
3908
|
export const ModelType$inboundSchema: z.ZodNativeEnum<typeof ModelType> = z
|
|
@@ -3832,6 +4079,46 @@ export function createPromptPromptsResponseResponseFormatFromJSON(
|
|
|
3832
4079
|
);
|
|
3833
4080
|
}
|
|
3834
4081
|
|
|
4082
|
+
/** @internal */
|
|
4083
|
+
export const CreatePromptPromptsResponse200ApplicationJSONResponseBodyType$inboundSchema:
|
|
4084
|
+
z.ZodNativeEnum<
|
|
4085
|
+
typeof CreatePromptPromptsResponse200ApplicationJSONResponseBodyType
|
|
4086
|
+
> = z.nativeEnum(
|
|
4087
|
+
CreatePromptPromptsResponse200ApplicationJSONResponseBodyType,
|
|
4088
|
+
);
|
|
4089
|
+
|
|
4090
|
+
/** @internal */
|
|
4091
|
+
export const CreatePromptPromptsResponseTtl$inboundSchema: z.ZodNativeEnum<
|
|
4092
|
+
typeof CreatePromptPromptsResponseTtl
|
|
4093
|
+
> = z.nativeEnum(CreatePromptPromptsResponseTtl);
|
|
4094
|
+
|
|
4095
|
+
/** @internal */
|
|
4096
|
+
export const CreatePromptPromptsResponseCacheControl$inboundSchema: z.ZodType<
|
|
4097
|
+
CreatePromptPromptsResponseCacheControl,
|
|
4098
|
+
z.ZodTypeDef,
|
|
4099
|
+
unknown
|
|
4100
|
+
> = z.object({
|
|
4101
|
+
type:
|
|
4102
|
+
CreatePromptPromptsResponse200ApplicationJSONResponseBodyType$inboundSchema,
|
|
4103
|
+
ttl: CreatePromptPromptsResponseTtl$inboundSchema.default("5m"),
|
|
4104
|
+
});
|
|
4105
|
+
|
|
4106
|
+
export function createPromptPromptsResponseCacheControlFromJSON(
|
|
4107
|
+
jsonString: string,
|
|
4108
|
+
): SafeParseResult<
|
|
4109
|
+
CreatePromptPromptsResponseCacheControl,
|
|
4110
|
+
SDKValidationError
|
|
4111
|
+
> {
|
|
4112
|
+
return safeParse(
|
|
4113
|
+
jsonString,
|
|
4114
|
+
(x) =>
|
|
4115
|
+
CreatePromptPromptsResponseCacheControl$inboundSchema.parse(
|
|
4116
|
+
JSON.parse(x),
|
|
4117
|
+
),
|
|
4118
|
+
`Failed to parse 'CreatePromptPromptsResponseCacheControl' from JSON`,
|
|
4119
|
+
);
|
|
4120
|
+
}
|
|
4121
|
+
|
|
3835
4122
|
/** @internal */
|
|
3836
4123
|
export const CreatePromptPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
|
|
3837
4124
|
typeof CreatePromptPhotoRealVersion
|
|
@@ -3885,6 +4172,9 @@ export const ModelParameters$inboundSchema: z.ZodType<
|
|
|
3885
4172
|
CreatePromptResponseFormat6$inboundSchema,
|
|
3886
4173
|
]),
|
|
3887
4174
|
).optional(),
|
|
4175
|
+
cacheControl: z.nullable(
|
|
4176
|
+
z.lazy(() => CreatePromptPromptsResponseCacheControl$inboundSchema),
|
|
4177
|
+
).optional(),
|
|
3888
4178
|
photoRealVersion: CreatePromptPhotoRealVersion$inboundSchema.optional(),
|
|
3889
4179
|
encoding_format: CreatePromptEncodingFormat$inboundSchema.optional(),
|
|
3890
4180
|
reasoningEffort: CreatePromptPromptsResponseReasoningEffort$inboundSchema
|
|
@@ -4076,9 +4366,12 @@ export function createPromptContentFromJSON(
|
|
|
4076
4366
|
}
|
|
4077
4367
|
|
|
4078
4368
|
/** @internal */
|
|
4079
|
-
export const
|
|
4080
|
-
|
|
4081
|
-
|
|
4369
|
+
export const CreatePromptPromptsResponse200ApplicationJSONResponseBodyPromptConfigType$inboundSchema:
|
|
4370
|
+
z.ZodNativeEnum<
|
|
4371
|
+
typeof CreatePromptPromptsResponse200ApplicationJSONResponseBodyPromptConfigType
|
|
4372
|
+
> = z.nativeEnum(
|
|
4373
|
+
CreatePromptPromptsResponse200ApplicationJSONResponseBodyPromptConfigType,
|
|
4374
|
+
);
|
|
4082
4375
|
|
|
4083
4376
|
/** @internal */
|
|
4084
4377
|
export const CreatePromptFunction$inboundSchema: z.ZodType<
|
|
@@ -4108,7 +4401,8 @@ export const CreatePromptToolCalls$inboundSchema: z.ZodType<
|
|
|
4108
4401
|
> = z.object({
|
|
4109
4402
|
id: z.string().optional(),
|
|
4110
4403
|
index: z.number().optional(),
|
|
4111
|
-
type:
|
|
4404
|
+
type:
|
|
4405
|
+
CreatePromptPromptsResponse200ApplicationJSONResponseBodyPromptConfigType$inboundSchema,
|
|
4112
4406
|
function: z.lazy(() => CreatePromptFunction$inboundSchema),
|
|
4113
4407
|
});
|
|
4114
4408
|
|
|
@@ -4589,9 +4883,9 @@ export function createPromptPromptsRetryFromJSON(
|
|
|
4589
4883
|
}
|
|
4590
4884
|
|
|
4591
4885
|
/** @internal */
|
|
4592
|
-
export const
|
|
4593
|
-
typeof
|
|
4594
|
-
> = z.nativeEnum(
|
|
4886
|
+
export const CreatePromptPromptsResponse200Type$inboundSchema: z.ZodNativeEnum<
|
|
4887
|
+
typeof CreatePromptPromptsResponse200Type
|
|
4888
|
+
> = z.nativeEnum(CreatePromptPromptsResponse200Type);
|
|
4595
4889
|
|
|
4596
4890
|
/** @internal */
|
|
4597
4891
|
export const CreatePromptPromptsCache$inboundSchema: z.ZodType<
|
|
@@ -4600,7 +4894,7 @@ export const CreatePromptPromptsCache$inboundSchema: z.ZodType<
|
|
|
4600
4894
|
unknown
|
|
4601
4895
|
> = z.object({
|
|
4602
4896
|
ttl: z.number().default(1800),
|
|
4603
|
-
type:
|
|
4897
|
+
type: CreatePromptPromptsResponse200Type$inboundSchema,
|
|
4604
4898
|
});
|
|
4605
4899
|
|
|
4606
4900
|
export function createPromptPromptsCacheFromJSON(
|
|
@@ -4701,6 +4995,36 @@ export function createPromptPromptsTimeoutFromJSON(
|
|
|
4701
4995
|
);
|
|
4702
4996
|
}
|
|
4703
4997
|
|
|
4998
|
+
/** @internal */
|
|
4999
|
+
export const CreatePromptPromptsResponse200ApplicationJSONType$inboundSchema:
|
|
5000
|
+
z.ZodNativeEnum<typeof CreatePromptPromptsResponse200ApplicationJSONType> = z
|
|
5001
|
+
.nativeEnum(CreatePromptPromptsResponse200ApplicationJSONType);
|
|
5002
|
+
|
|
5003
|
+
/** @internal */
|
|
5004
|
+
export const CreatePromptPromptsTtl$inboundSchema: z.ZodNativeEnum<
|
|
5005
|
+
typeof CreatePromptPromptsTtl
|
|
5006
|
+
> = z.nativeEnum(CreatePromptPromptsTtl);
|
|
5007
|
+
|
|
5008
|
+
/** @internal */
|
|
5009
|
+
export const CreatePromptPromptsCacheControl$inboundSchema: z.ZodType<
|
|
5010
|
+
CreatePromptPromptsCacheControl,
|
|
5011
|
+
z.ZodTypeDef,
|
|
5012
|
+
unknown
|
|
5013
|
+
> = z.object({
|
|
5014
|
+
type: CreatePromptPromptsResponse200ApplicationJSONType$inboundSchema,
|
|
5015
|
+
ttl: CreatePromptPromptsTtl$inboundSchema.default("5m"),
|
|
5016
|
+
});
|
|
5017
|
+
|
|
5018
|
+
export function createPromptPromptsCacheControlFromJSON(
|
|
5019
|
+
jsonString: string,
|
|
5020
|
+
): SafeParseResult<CreatePromptPromptsCacheControl, SDKValidationError> {
|
|
5021
|
+
return safeParse(
|
|
5022
|
+
jsonString,
|
|
5023
|
+
(x) => CreatePromptPromptsCacheControl$inboundSchema.parse(JSON.parse(x)),
|
|
5024
|
+
`Failed to parse 'CreatePromptPromptsCacheControl' from JSON`,
|
|
5025
|
+
);
|
|
5026
|
+
}
|
|
5027
|
+
|
|
4704
5028
|
/** @internal */
|
|
4705
5029
|
export const CreatePromptContentPromptsResponse200ApplicationJSONResponseBody2$inboundSchema:
|
|
4706
5030
|
z.ZodType<
|
|
@@ -5296,6 +5620,9 @@ export const PromptField$inboundSchema: z.ZodType<
|
|
|
5296
5620
|
load_balancer: z.lazy(() => CreatePromptLoadBalancerPrompts1$inboundSchema)
|
|
5297
5621
|
.optional(),
|
|
5298
5622
|
timeout: z.lazy(() => CreatePromptPromptsTimeout$inboundSchema).optional(),
|
|
5623
|
+
cache_control: z.lazy(() => CreatePromptPromptsCacheControl$inboundSchema)
|
|
5624
|
+
.optional(),
|
|
5625
|
+
prompt_cache_key: z.string().optional(),
|
|
5299
5626
|
messages: z.array(
|
|
5300
5627
|
z.union([
|
|
5301
5628
|
z.lazy(() => CreatePromptMessagesPromptsSystemMessage$inboundSchema),
|
|
@@ -5321,6 +5648,8 @@ export const PromptField$inboundSchema: z.ZodType<
|
|
|
5321
5648
|
"tool_choice": "toolChoice",
|
|
5322
5649
|
"parallel_tool_calls": "parallelToolCalls",
|
|
5323
5650
|
"load_balancer": "loadBalancer",
|
|
5651
|
+
"cache_control": "cacheControl",
|
|
5652
|
+
"prompt_cache_key": "promptCacheKey",
|
|
5324
5653
|
});
|
|
5325
5654
|
});
|
|
5326
5655
|
|
|
@@ -5375,7 +5704,7 @@ export const CreatePromptPrompt$inboundSchema: z.ZodType<
|
|
|
5375
5704
|
unknown
|
|
5376
5705
|
> = z.object({
|
|
5377
5706
|
_id: z.string(),
|
|
5378
|
-
type:
|
|
5707
|
+
type: CreatePromptPromptsResponseType$inboundSchema,
|
|
5379
5708
|
owner: z.string(),
|
|
5380
5709
|
domain_id: z.string(),
|
|
5381
5710
|
created: z.string(),
|