@orq-ai/node 4.15.0-rc.53 → 4.15.0-rc.54
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/FUNCTIONS.md +38 -3
- package/README.md +252 -71
- package/examples/deploymentsInvoke.example.ts +62 -0
- package/funcs/deploymentsInvoke.d.ts +18 -0
- package/funcs/deploymentsInvoke.d.ts.map +1 -0
- package/funcs/deploymentsInvoke.js +116 -0
- package/funcs/deploymentsInvoke.js.map +1 -0
- package/funcs/deploymentsStream.d.ts +18 -0
- package/funcs/deploymentsStream.d.ts.map +1 -0
- package/funcs/deploymentsStream.js +129 -0
- package/funcs/deploymentsStream.js.map +1 -0
- package/funcs/skillsUpdate.d.ts +1 -1
- package/funcs/skillsUpdate.js +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/agentresponserequest.d.ts +8 -8
- package/models/components/agentresponserequest.d.ts.map +1 -1
- package/models/components/agentresponserequest.js +10 -9
- package/models/components/agentresponserequest.js.map +1 -1
- package/models/components/agentthoughtstreamingevent.d.ts +12 -12
- package/models/components/agentthoughtstreamingevent.d.ts.map +1 -1
- package/models/components/agentthoughtstreamingevent.js +17 -17
- package/models/components/agentthoughtstreamingevent.js.map +1 -1
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invokedeploymentrequest.d.ts +1544 -0
- package/models/components/invokedeploymentrequest.d.ts.map +1 -0
- package/models/components/invokedeploymentrequest.js +1109 -0
- package/models/components/invokedeploymentrequest.js.map +1 -0
- package/models/components/reasoningpart.js +1 -1
- package/models/components/searchknowledgerequest.d.ts +176 -176
- package/models/components/searchknowledgerequest.d.ts.map +1 -1
- package/models/components/searchknowledgerequest.js +211 -222
- package/models/components/searchknowledgerequest.js.map +1 -1
- package/models/components/updatememorystorerequest.d.ts +5 -0
- package/models/components/updatememorystorerequest.d.ts.map +1 -1
- package/models/components/updatememorystorerequest.js +6 -0
- package/models/components/updatememorystorerequest.js.map +1 -1
- package/models/components/updateskillrequest.d.ts +1 -1
- package/models/operations/createchatcompletion.d.ts +58 -58
- package/models/operations/createchatcompletion.d.ts.map +1 -1
- package/models/operations/createchatcompletion.js +81 -80
- package/models/operations/createchatcompletion.js.map +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +5 -5
- package/models/operations/createprompt.d.ts +4 -4
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +5 -6
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createtool.js +4 -4
- package/models/operations/deploymentgetconfig.d.ts +442 -442
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +481 -485
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deploymentinvoke.d.ts +367 -0
- package/models/operations/deploymentinvoke.d.ts.map +1 -0
- package/models/operations/deploymentinvoke.js +373 -0
- package/models/operations/deploymentinvoke.js.map +1 -0
- package/models/operations/deployments.d.ts +16 -16
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +16 -18
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +1899 -0
- package/models/operations/deploymentstream.d.ts.map +1 -0
- package/models/operations/deploymentstream.js +1488 -0
- package/models/operations/deploymentstream.js.map +1 -0
- package/models/operations/getalltools.js +4 -4
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +5 -5
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +4 -4
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrievedatapoint.js +5 -5
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievetool.js +4 -4
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updatedatapoint.js +5 -5
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatetool.js +4 -4
- package/package.json +7 -7
- package/sdk/deployments.d.ts +16 -0
- package/sdk/deployments.d.ts.map +1 -1
- package/sdk/deployments.js +20 -0
- package/sdk/deployments.js.map +1 -1
- package/sdk/skills.d.ts +1 -1
- package/sdk/skills.js +1 -1
- package/src/funcs/deploymentsInvoke.ts +170 -0
- package/src/funcs/deploymentsStream.ts +180 -0
- package/src/funcs/skillsUpdate.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/agentresponserequest.ts +17 -12
- package/src/models/components/agentthoughtstreamingevent.ts +55 -43
- package/src/models/components/index.ts +1 -0
- package/src/models/components/invokedeploymentrequest.ts +3444 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/searchknowledgerequest.ts +680 -469
- package/src/models/components/updatememorystorerequest.ts +11 -0
- package/src/models/components/updateskillrequest.ts +1 -1
- package/src/models/operations/createchatcompletion.ts +313 -248
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +5 -5
- package/src/models/operations/createprompt.ts +7 -6
- package/src/models/operations/createtool.ts +4 -4
- package/src/models/operations/deploymentgetconfig.ts +1631 -1141
- package/src/models/operations/deploymentinvoke.ts +732 -0
- package/src/models/operations/deployments.ts +46 -42
- package/src/models/operations/deploymentstream.ts +4102 -0
- package/src/models/operations/getalltools.ts +4 -4
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listdatasetdatapoints.ts +5 -5
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +4 -4
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +5 -5
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievetool.ts +4 -4
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +5 -5
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatetool.ts +4 -4
- package/src/sdk/deployments.ts +38 -0
- package/src/sdk/skills.ts +1 -1
- package/examples/deploymentsList.example.ts +0 -26
|
@@ -1169,28 +1169,28 @@ export type CreateChatCompletion1In = {
|
|
|
1169
1169
|
/**
|
|
1170
1170
|
* Less than or equal to
|
|
1171
1171
|
*/
|
|
1172
|
-
export type
|
|
1172
|
+
export type CreateChatCompletion1Lte = {
|
|
1173
1173
|
lte: number;
|
|
1174
1174
|
};
|
|
1175
1175
|
|
|
1176
1176
|
/**
|
|
1177
1177
|
* Less than
|
|
1178
1178
|
*/
|
|
1179
|
-
export type
|
|
1179
|
+
export type CreateChatCompletion1Lt = {
|
|
1180
1180
|
lt: number;
|
|
1181
1181
|
};
|
|
1182
1182
|
|
|
1183
1183
|
/**
|
|
1184
1184
|
* Greater than or equal to
|
|
1185
1185
|
*/
|
|
1186
|
-
export type
|
|
1186
|
+
export type CreateChatCompletion1Gte = {
|
|
1187
1187
|
gte: number;
|
|
1188
1188
|
};
|
|
1189
1189
|
|
|
1190
1190
|
/**
|
|
1191
1191
|
* Greater than
|
|
1192
1192
|
*/
|
|
1193
|
-
export type
|
|
1193
|
+
export type CreateChatCompletion1Gt = {
|
|
1194
1194
|
gt: number;
|
|
1195
1195
|
};
|
|
1196
1196
|
|
|
@@ -1221,10 +1221,10 @@ export type CreateChatCompletion1Eq = {
|
|
|
1221
1221
|
export type FilterBy1 =
|
|
1222
1222
|
| CreateChatCompletion1Eq
|
|
1223
1223
|
| CreateChatCompletion1Ne
|
|
1224
|
-
|
|
|
1225
|
-
|
|
|
1226
|
-
|
|
|
1227
|
-
|
|
|
1224
|
+
| CreateChatCompletion1Gt
|
|
1225
|
+
| CreateChatCompletion1Gte
|
|
1226
|
+
| CreateChatCompletion1Lt
|
|
1227
|
+
| CreateChatCompletion1Lte
|
|
1228
1228
|
| CreateChatCompletion1In
|
|
1229
1229
|
| CreateChatCompletion1Nin;
|
|
1230
1230
|
|
|
@@ -1235,10 +1235,10 @@ export type FilterBy = FilterByAnd | FilterByOr | {
|
|
|
1235
1235
|
[k: string]:
|
|
1236
1236
|
| CreateChatCompletion1Eq
|
|
1237
1237
|
| CreateChatCompletion1Ne
|
|
1238
|
-
|
|
|
1239
|
-
|
|
|
1240
|
-
|
|
|
1241
|
-
|
|
|
1238
|
+
| CreateChatCompletion1Gt
|
|
1239
|
+
| CreateChatCompletion1Gte
|
|
1240
|
+
| CreateChatCompletion1Lt
|
|
1241
|
+
| CreateChatCompletion1Lte
|
|
1242
1242
|
| CreateChatCompletion1In
|
|
1243
1243
|
| CreateChatCompletion1Nin;
|
|
1244
1244
|
};
|
|
@@ -1309,10 +1309,10 @@ export type CreateChatCompletionKnowledgeBases = {
|
|
|
1309
1309
|
[k: string]:
|
|
1310
1310
|
| CreateChatCompletion1Eq
|
|
1311
1311
|
| CreateChatCompletion1Ne
|
|
1312
|
-
|
|
|
1313
|
-
|
|
|
1314
|
-
|
|
|
1315
|
-
|
|
|
1312
|
+
| CreateChatCompletion1Gt
|
|
1313
|
+
| CreateChatCompletion1Gte
|
|
1314
|
+
| CreateChatCompletion1Lt
|
|
1315
|
+
| CreateChatCompletion1Lte
|
|
1316
1316
|
| CreateChatCompletion1In
|
|
1317
1317
|
| CreateChatCompletion1Nin;
|
|
1318
1318
|
} | undefined;
|
|
@@ -1821,7 +1821,7 @@ export type Delta = {
|
|
|
1821
1821
|
| undefined;
|
|
1822
1822
|
};
|
|
1823
1823
|
|
|
1824
|
-
export type
|
|
1824
|
+
export type CreateChatCompletionRouterChatCompletionsChoices = {
|
|
1825
1825
|
/**
|
|
1826
1826
|
* The reason the model stopped generating tokens.
|
|
1827
1827
|
*/
|
|
@@ -1840,7 +1840,7 @@ export type CreateChatCompletionChoices = {
|
|
|
1840
1840
|
delta: Delta;
|
|
1841
1841
|
};
|
|
1842
1842
|
|
|
1843
|
-
export type
|
|
1843
|
+
export type CreateChatCompletionRouterChatCompletionsPromptTokensDetails = {
|
|
1844
1844
|
cachedTokens?: number | null | undefined;
|
|
1845
1845
|
cacheCreationTokens?: number | null | undefined;
|
|
1846
1846
|
/**
|
|
@@ -1849,7 +1849,7 @@ export type CreateChatCompletionPromptTokensDetails = {
|
|
|
1849
1849
|
audioTokens?: number | null | undefined;
|
|
1850
1850
|
};
|
|
1851
1851
|
|
|
1852
|
-
export type
|
|
1852
|
+
export type CreateChatCompletionRouterChatCompletionsCompletionTokensDetails = {
|
|
1853
1853
|
reasoningTokens?: number | null | undefined;
|
|
1854
1854
|
acceptedPredictionTokens?: number | null | undefined;
|
|
1855
1855
|
rejectedPredictionTokens?: number | null | undefined;
|
|
@@ -1862,7 +1862,7 @@ export type CreateChatCompletionCompletionTokensDetails = {
|
|
|
1862
1862
|
/**
|
|
1863
1863
|
* Usage statistics for the completion request.
|
|
1864
1864
|
*/
|
|
1865
|
-
export type
|
|
1865
|
+
export type CreateChatCompletionRouterChatCompletionsUsage = {
|
|
1866
1866
|
/**
|
|
1867
1867
|
* Number of tokens in the generated completion.
|
|
1868
1868
|
*/
|
|
@@ -1876,11 +1876,11 @@ export type CreateChatCompletionUsage = {
|
|
|
1876
1876
|
*/
|
|
1877
1877
|
totalTokens?: number | undefined;
|
|
1878
1878
|
promptTokensDetails?:
|
|
1879
|
-
|
|
|
1879
|
+
| CreateChatCompletionRouterChatCompletionsPromptTokensDetails
|
|
1880
1880
|
| null
|
|
1881
1881
|
| undefined;
|
|
1882
1882
|
completionTokensDetails?:
|
|
1883
|
-
|
|
|
1883
|
+
| CreateChatCompletionRouterChatCompletionsCompletionTokensDetails
|
|
1884
1884
|
| null
|
|
1885
1885
|
| undefined;
|
|
1886
1886
|
};
|
|
@@ -1903,7 +1903,7 @@ export type CreateChatCompletionData = {
|
|
|
1903
1903
|
/**
|
|
1904
1904
|
* A list of chat completion choices. Can contain more than one elements if n is greater than 1. Can also be empty for the last chunk if you set stream_options: {"include_usage": true}.
|
|
1905
1905
|
*/
|
|
1906
|
-
choices: Array<
|
|
1906
|
+
choices: Array<CreateChatCompletionRouterChatCompletionsChoices>;
|
|
1907
1907
|
/**
|
|
1908
1908
|
* The Unix timestamp (in seconds) of when the chat completion was created.
|
|
1909
1909
|
*/
|
|
@@ -1919,7 +1919,7 @@ export type CreateChatCompletionData = {
|
|
|
1919
1919
|
/**
|
|
1920
1920
|
* Usage statistics for the completion request.
|
|
1921
1921
|
*/
|
|
1922
|
-
usage?:
|
|
1922
|
+
usage?: CreateChatCompletionRouterChatCompletionsUsage | null | undefined;
|
|
1923
1923
|
object: CreateChatCompletionRouterChatCompletionsObject;
|
|
1924
1924
|
};
|
|
1925
1925
|
|
|
@@ -1997,7 +1997,7 @@ export type CreateChatCompletionRouterChatCompletionsAudio = {
|
|
|
1997
1997
|
/**
|
|
1998
1998
|
* A chat completion message generated by the model.
|
|
1999
1999
|
*/
|
|
2000
|
-
export type
|
|
2000
|
+
export type CreateChatCompletionMessage = {
|
|
2001
2001
|
content?: string | null | undefined;
|
|
2002
2002
|
refusal?: string | null | undefined;
|
|
2003
2003
|
toolCalls?: Array<CreateChatCompletionToolCalls> | undefined;
|
|
@@ -2102,7 +2102,7 @@ export type Logprobs = {
|
|
|
2102
2102
|
refusal: Array<Refusal> | null;
|
|
2103
2103
|
};
|
|
2104
2104
|
|
|
2105
|
-
export type
|
|
2105
|
+
export type CreateChatCompletionChoices = {
|
|
2106
2106
|
/**
|
|
2107
2107
|
* The reason the model stopped generating tokens.
|
|
2108
2108
|
*/
|
|
@@ -2114,14 +2114,14 @@ export type Choices = {
|
|
|
2114
2114
|
/**
|
|
2115
2115
|
* A chat completion message generated by the model.
|
|
2116
2116
|
*/
|
|
2117
|
-
message:
|
|
2117
|
+
message: CreateChatCompletionMessage;
|
|
2118
2118
|
/**
|
|
2119
2119
|
* Log probability information for the choice.
|
|
2120
2120
|
*/
|
|
2121
2121
|
logprobs?: Logprobs | null | undefined;
|
|
2122
2122
|
};
|
|
2123
2123
|
|
|
2124
|
-
export type
|
|
2124
|
+
export type CreateChatCompletionPromptTokensDetails = {
|
|
2125
2125
|
cachedTokens?: number | null | undefined;
|
|
2126
2126
|
cacheCreationTokens?: number | null | undefined;
|
|
2127
2127
|
/**
|
|
@@ -2130,7 +2130,7 @@ export type PromptTokensDetails = {
|
|
|
2130
2130
|
audioTokens?: number | null | undefined;
|
|
2131
2131
|
};
|
|
2132
2132
|
|
|
2133
|
-
export type
|
|
2133
|
+
export type CreateChatCompletionCompletionTokensDetails = {
|
|
2134
2134
|
reasoningTokens?: number | null | undefined;
|
|
2135
2135
|
acceptedPredictionTokens?: number | null | undefined;
|
|
2136
2136
|
rejectedPredictionTokens?: number | null | undefined;
|
|
@@ -2143,7 +2143,7 @@ export type CompletionTokensDetails = {
|
|
|
2143
2143
|
/**
|
|
2144
2144
|
* Usage statistics for the completion request.
|
|
2145
2145
|
*/
|
|
2146
|
-
export type
|
|
2146
|
+
export type CreateChatCompletionUsage = {
|
|
2147
2147
|
/**
|
|
2148
2148
|
* Number of tokens in the generated completion.
|
|
2149
2149
|
*/
|
|
@@ -2156,8 +2156,14 @@ export type Usage = {
|
|
|
2156
2156
|
* Total number of tokens used in the request (prompt + completion).
|
|
2157
2157
|
*/
|
|
2158
2158
|
totalTokens?: number | undefined;
|
|
2159
|
-
promptTokensDetails?:
|
|
2160
|
-
|
|
2159
|
+
promptTokensDetails?:
|
|
2160
|
+
| CreateChatCompletionPromptTokensDetails
|
|
2161
|
+
| null
|
|
2162
|
+
| undefined;
|
|
2163
|
+
completionTokensDetails?:
|
|
2164
|
+
| CreateChatCompletionCompletionTokensDetails
|
|
2165
|
+
| null
|
|
2166
|
+
| undefined;
|
|
2161
2167
|
};
|
|
2162
2168
|
|
|
2163
2169
|
export const CreateChatCompletionObject = {
|
|
@@ -2178,7 +2184,7 @@ export type CreateChatCompletionResponseBody = {
|
|
|
2178
2184
|
/**
|
|
2179
2185
|
* A list of chat completion choices. Can be more than one if n is greater than 1.
|
|
2180
2186
|
*/
|
|
2181
|
-
choices: Array<
|
|
2187
|
+
choices: Array<CreateChatCompletionChoices>;
|
|
2182
2188
|
/**
|
|
2183
2189
|
* The Unix timestamp (in seconds) of when the chat completion was created.
|
|
2184
2190
|
*/
|
|
@@ -2194,7 +2200,7 @@ export type CreateChatCompletionResponseBody = {
|
|
|
2194
2200
|
/**
|
|
2195
2201
|
* Usage statistics for the completion request.
|
|
2196
2202
|
*/
|
|
2197
|
-
usage?:
|
|
2203
|
+
usage?: CreateChatCompletionUsage | null | undefined;
|
|
2198
2204
|
object: CreateChatCompletionObject;
|
|
2199
2205
|
};
|
|
2200
2206
|
|
|
@@ -4663,75 +4669,91 @@ export function createChatCompletion1InToJSON(
|
|
|
4663
4669
|
}
|
|
4664
4670
|
|
|
4665
4671
|
/** @internal */
|
|
4666
|
-
export type
|
|
4672
|
+
export type CreateChatCompletion1Lte$Outbound = {
|
|
4667
4673
|
lte: number;
|
|
4668
4674
|
};
|
|
4669
4675
|
|
|
4670
4676
|
/** @internal */
|
|
4671
|
-
export const
|
|
4672
|
-
|
|
4677
|
+
export const CreateChatCompletion1Lte$outboundSchema: z.ZodType<
|
|
4678
|
+
CreateChatCompletion1Lte$Outbound,
|
|
4673
4679
|
z.ZodTypeDef,
|
|
4674
|
-
|
|
4680
|
+
CreateChatCompletion1Lte
|
|
4675
4681
|
> = z.object({
|
|
4676
4682
|
lte: z.number(),
|
|
4677
4683
|
});
|
|
4678
4684
|
|
|
4679
|
-
export function
|
|
4680
|
-
|
|
4685
|
+
export function createChatCompletion1LteToJSON(
|
|
4686
|
+
createChatCompletion1Lte: CreateChatCompletion1Lte,
|
|
4687
|
+
): string {
|
|
4688
|
+
return JSON.stringify(
|
|
4689
|
+
CreateChatCompletion1Lte$outboundSchema.parse(createChatCompletion1Lte),
|
|
4690
|
+
);
|
|
4681
4691
|
}
|
|
4682
4692
|
|
|
4683
4693
|
/** @internal */
|
|
4684
|
-
export type
|
|
4694
|
+
export type CreateChatCompletion1Lt$Outbound = {
|
|
4685
4695
|
lt: number;
|
|
4686
4696
|
};
|
|
4687
4697
|
|
|
4688
4698
|
/** @internal */
|
|
4689
|
-
export const
|
|
4690
|
-
|
|
4699
|
+
export const CreateChatCompletion1Lt$outboundSchema: z.ZodType<
|
|
4700
|
+
CreateChatCompletion1Lt$Outbound,
|
|
4691
4701
|
z.ZodTypeDef,
|
|
4692
|
-
|
|
4702
|
+
CreateChatCompletion1Lt
|
|
4693
4703
|
> = z.object({
|
|
4694
4704
|
lt: z.number(),
|
|
4695
4705
|
});
|
|
4696
4706
|
|
|
4697
|
-
export function
|
|
4698
|
-
|
|
4707
|
+
export function createChatCompletion1LtToJSON(
|
|
4708
|
+
createChatCompletion1Lt: CreateChatCompletion1Lt,
|
|
4709
|
+
): string {
|
|
4710
|
+
return JSON.stringify(
|
|
4711
|
+
CreateChatCompletion1Lt$outboundSchema.parse(createChatCompletion1Lt),
|
|
4712
|
+
);
|
|
4699
4713
|
}
|
|
4700
4714
|
|
|
4701
4715
|
/** @internal */
|
|
4702
|
-
export type
|
|
4716
|
+
export type CreateChatCompletion1Gte$Outbound = {
|
|
4703
4717
|
gte: number;
|
|
4704
4718
|
};
|
|
4705
4719
|
|
|
4706
4720
|
/** @internal */
|
|
4707
|
-
export const
|
|
4708
|
-
|
|
4721
|
+
export const CreateChatCompletion1Gte$outboundSchema: z.ZodType<
|
|
4722
|
+
CreateChatCompletion1Gte$Outbound,
|
|
4709
4723
|
z.ZodTypeDef,
|
|
4710
|
-
|
|
4724
|
+
CreateChatCompletion1Gte
|
|
4711
4725
|
> = z.object({
|
|
4712
4726
|
gte: z.number(),
|
|
4713
4727
|
});
|
|
4714
4728
|
|
|
4715
|
-
export function
|
|
4716
|
-
|
|
4729
|
+
export function createChatCompletion1GteToJSON(
|
|
4730
|
+
createChatCompletion1Gte: CreateChatCompletion1Gte,
|
|
4731
|
+
): string {
|
|
4732
|
+
return JSON.stringify(
|
|
4733
|
+
CreateChatCompletion1Gte$outboundSchema.parse(createChatCompletion1Gte),
|
|
4734
|
+
);
|
|
4717
4735
|
}
|
|
4718
4736
|
|
|
4719
4737
|
/** @internal */
|
|
4720
|
-
export type
|
|
4738
|
+
export type CreateChatCompletion1Gt$Outbound = {
|
|
4721
4739
|
gt: number;
|
|
4722
4740
|
};
|
|
4723
4741
|
|
|
4724
4742
|
/** @internal */
|
|
4725
|
-
export const
|
|
4726
|
-
|
|
4743
|
+
export const CreateChatCompletion1Gt$outboundSchema: z.ZodType<
|
|
4744
|
+
CreateChatCompletion1Gt$Outbound,
|
|
4727
4745
|
z.ZodTypeDef,
|
|
4728
|
-
|
|
4746
|
+
CreateChatCompletion1Gt
|
|
4729
4747
|
> = z.object({
|
|
4730
4748
|
gt: z.number(),
|
|
4731
4749
|
});
|
|
4732
4750
|
|
|
4733
|
-
export function
|
|
4734
|
-
|
|
4751
|
+
export function createChatCompletion1GtToJSON(
|
|
4752
|
+
createChatCompletion1Gt: CreateChatCompletion1Gt,
|
|
4753
|
+
): string {
|
|
4754
|
+
return JSON.stringify(
|
|
4755
|
+
CreateChatCompletion1Gt$outboundSchema.parse(createChatCompletion1Gt),
|
|
4756
|
+
);
|
|
4735
4757
|
}
|
|
4736
4758
|
|
|
4737
4759
|
/** @internal */
|
|
@@ -4832,10 +4854,10 @@ export function createChatCompletion1EqToJSON(
|
|
|
4832
4854
|
export type FilterBy1$Outbound =
|
|
4833
4855
|
| CreateChatCompletion1Eq$Outbound
|
|
4834
4856
|
| CreateChatCompletion1Ne$Outbound
|
|
4835
|
-
|
|
|
4836
|
-
|
|
|
4837
|
-
|
|
|
4838
|
-
|
|
|
4857
|
+
| CreateChatCompletion1Gt$Outbound
|
|
4858
|
+
| CreateChatCompletion1Gte$Outbound
|
|
4859
|
+
| CreateChatCompletion1Lt$Outbound
|
|
4860
|
+
| CreateChatCompletion1Lte$Outbound
|
|
4839
4861
|
| CreateChatCompletion1In$Outbound
|
|
4840
4862
|
| CreateChatCompletion1Nin$Outbound;
|
|
4841
4863
|
|
|
@@ -4847,10 +4869,10 @@ export const FilterBy1$outboundSchema: z.ZodType<
|
|
|
4847
4869
|
> = z.union([
|
|
4848
4870
|
z.lazy(() => CreateChatCompletion1Eq$outboundSchema),
|
|
4849
4871
|
z.lazy(() => CreateChatCompletion1Ne$outboundSchema),
|
|
4850
|
-
z.lazy(() =>
|
|
4851
|
-
z.lazy(() =>
|
|
4852
|
-
z.lazy(() =>
|
|
4853
|
-
z.lazy(() =>
|
|
4872
|
+
z.lazy(() => CreateChatCompletion1Gt$outboundSchema),
|
|
4873
|
+
z.lazy(() => CreateChatCompletion1Gte$outboundSchema),
|
|
4874
|
+
z.lazy(() => CreateChatCompletion1Lt$outboundSchema),
|
|
4875
|
+
z.lazy(() => CreateChatCompletion1Lte$outboundSchema),
|
|
4854
4876
|
z.lazy(() => CreateChatCompletion1In$outboundSchema),
|
|
4855
4877
|
z.lazy(() => CreateChatCompletion1Nin$outboundSchema),
|
|
4856
4878
|
]);
|
|
@@ -4864,10 +4886,10 @@ export type FilterBy$Outbound = FilterByAnd$Outbound | FilterByOr$Outbound | {
|
|
|
4864
4886
|
[k: string]:
|
|
4865
4887
|
| CreateChatCompletion1Eq$Outbound
|
|
4866
4888
|
| CreateChatCompletion1Ne$Outbound
|
|
4867
|
-
|
|
|
4868
|
-
|
|
|
4869
|
-
|
|
|
4870
|
-
|
|
|
4889
|
+
| CreateChatCompletion1Gt$Outbound
|
|
4890
|
+
| CreateChatCompletion1Gte$Outbound
|
|
4891
|
+
| CreateChatCompletion1Lt$Outbound
|
|
4892
|
+
| CreateChatCompletion1Lte$Outbound
|
|
4871
4893
|
| CreateChatCompletion1In$Outbound
|
|
4872
4894
|
| CreateChatCompletion1Nin$Outbound;
|
|
4873
4895
|
};
|
|
@@ -4883,10 +4905,10 @@ export const FilterBy$outboundSchema: z.ZodType<
|
|
|
4883
4905
|
z.record(z.union([
|
|
4884
4906
|
z.lazy(() => CreateChatCompletion1Eq$outboundSchema),
|
|
4885
4907
|
z.lazy(() => CreateChatCompletion1Ne$outboundSchema),
|
|
4886
|
-
z.lazy(() =>
|
|
4887
|
-
z.lazy(() =>
|
|
4888
|
-
z.lazy(() =>
|
|
4889
|
-
z.lazy(() =>
|
|
4908
|
+
z.lazy(() => CreateChatCompletion1Gt$outboundSchema),
|
|
4909
|
+
z.lazy(() => CreateChatCompletion1Gte$outboundSchema),
|
|
4910
|
+
z.lazy(() => CreateChatCompletion1Lt$outboundSchema),
|
|
4911
|
+
z.lazy(() => CreateChatCompletion1Lte$outboundSchema),
|
|
4890
4912
|
z.lazy(() => CreateChatCompletion1In$outboundSchema),
|
|
4891
4913
|
z.lazy(() => CreateChatCompletion1Nin$outboundSchema),
|
|
4892
4914
|
])),
|
|
@@ -4981,10 +5003,10 @@ export type CreateChatCompletionKnowledgeBases$Outbound = {
|
|
|
4981
5003
|
[k: string]:
|
|
4982
5004
|
| CreateChatCompletion1Eq$Outbound
|
|
4983
5005
|
| CreateChatCompletion1Ne$Outbound
|
|
4984
|
-
|
|
|
4985
|
-
|
|
|
4986
|
-
|
|
|
4987
|
-
|
|
|
5006
|
+
| CreateChatCompletion1Gt$Outbound
|
|
5007
|
+
| CreateChatCompletion1Gte$Outbound
|
|
5008
|
+
| CreateChatCompletion1Lt$Outbound
|
|
5009
|
+
| CreateChatCompletion1Lte$Outbound
|
|
4988
5010
|
| CreateChatCompletion1In$Outbound
|
|
4989
5011
|
| CreateChatCompletion1Nin$Outbound;
|
|
4990
5012
|
} | undefined;
|
|
@@ -5010,10 +5032,10 @@ export const CreateChatCompletionKnowledgeBases$outboundSchema: z.ZodType<
|
|
|
5010
5032
|
z.record(z.union([
|
|
5011
5033
|
z.lazy(() => CreateChatCompletion1Eq$outboundSchema),
|
|
5012
5034
|
z.lazy(() => CreateChatCompletion1Ne$outboundSchema),
|
|
5013
|
-
z.lazy(() =>
|
|
5014
|
-
z.lazy(() =>
|
|
5015
|
-
z.lazy(() =>
|
|
5016
|
-
z.lazy(() =>
|
|
5035
|
+
z.lazy(() => CreateChatCompletion1Gt$outboundSchema),
|
|
5036
|
+
z.lazy(() => CreateChatCompletion1Gte$outboundSchema),
|
|
5037
|
+
z.lazy(() => CreateChatCompletion1Lt$outboundSchema),
|
|
5038
|
+
z.lazy(() => CreateChatCompletion1Lte$outboundSchema),
|
|
5017
5039
|
z.lazy(() => CreateChatCompletion1In$outboundSchema),
|
|
5018
5040
|
z.lazy(() => CreateChatCompletion1Nin$outboundSchema),
|
|
5019
5041
|
])),
|
|
@@ -5713,69 +5735,77 @@ export function deltaFromJSON(
|
|
|
5713
5735
|
}
|
|
5714
5736
|
|
|
5715
5737
|
/** @internal */
|
|
5716
|
-
export const
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
.
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5738
|
+
export const CreateChatCompletionRouterChatCompletionsChoices$inboundSchema:
|
|
5739
|
+
z.ZodType<
|
|
5740
|
+
CreateChatCompletionRouterChatCompletionsChoices,
|
|
5741
|
+
z.ZodTypeDef,
|
|
5742
|
+
unknown
|
|
5743
|
+
> = z.object({
|
|
5744
|
+
finish_reason: z.nullable(CreateChatCompletionFinishReason$inboundSchema),
|
|
5745
|
+
index: z.number().default(0),
|
|
5746
|
+
logprobs: z.nullable(
|
|
5747
|
+
z.lazy(() => CreateChatCompletionLogprobs$inboundSchema),
|
|
5748
|
+
).optional(),
|
|
5749
|
+
delta: z.lazy(() => Delta$inboundSchema),
|
|
5750
|
+
}).transform((v) => {
|
|
5751
|
+
return remap$(v, {
|
|
5752
|
+
"finish_reason": "finishReason",
|
|
5753
|
+
});
|
|
5729
5754
|
});
|
|
5730
|
-
});
|
|
5731
5755
|
|
|
5732
|
-
export function
|
|
5756
|
+
export function createChatCompletionRouterChatCompletionsChoicesFromJSON(
|
|
5733
5757
|
jsonString: string,
|
|
5734
|
-
): SafeParseResult<
|
|
5758
|
+
): SafeParseResult<
|
|
5759
|
+
CreateChatCompletionRouterChatCompletionsChoices,
|
|
5760
|
+
SDKValidationError
|
|
5761
|
+
> {
|
|
5735
5762
|
return safeParse(
|
|
5736
5763
|
jsonString,
|
|
5737
|
-
(x) =>
|
|
5738
|
-
|
|
5764
|
+
(x) =>
|
|
5765
|
+
CreateChatCompletionRouterChatCompletionsChoices$inboundSchema.parse(
|
|
5766
|
+
JSON.parse(x),
|
|
5767
|
+
),
|
|
5768
|
+
`Failed to parse 'CreateChatCompletionRouterChatCompletionsChoices' from JSON`,
|
|
5739
5769
|
);
|
|
5740
5770
|
}
|
|
5741
5771
|
|
|
5742
5772
|
/** @internal */
|
|
5743
|
-
export const
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5773
|
+
export const CreateChatCompletionRouterChatCompletionsPromptTokensDetails$inboundSchema:
|
|
5774
|
+
z.ZodType<
|
|
5775
|
+
CreateChatCompletionRouterChatCompletionsPromptTokensDetails,
|
|
5776
|
+
z.ZodTypeDef,
|
|
5777
|
+
unknown
|
|
5778
|
+
> = z.object({
|
|
5779
|
+
cached_tokens: z.nullable(z.number().int()).optional(),
|
|
5780
|
+
cache_creation_tokens: z.nullable(z.number().int()).optional(),
|
|
5781
|
+
audio_tokens: z.nullable(z.number().int()).optional(),
|
|
5782
|
+
}).transform((v) => {
|
|
5783
|
+
return remap$(v, {
|
|
5784
|
+
"cached_tokens": "cachedTokens",
|
|
5785
|
+
"cache_creation_tokens": "cacheCreationTokens",
|
|
5786
|
+
"audio_tokens": "audioTokens",
|
|
5787
|
+
});
|
|
5756
5788
|
});
|
|
5757
|
-
});
|
|
5758
5789
|
|
|
5759
|
-
export function
|
|
5790
|
+
export function createChatCompletionRouterChatCompletionsPromptTokensDetailsFromJSON(
|
|
5760
5791
|
jsonString: string,
|
|
5761
5792
|
): SafeParseResult<
|
|
5762
|
-
|
|
5793
|
+
CreateChatCompletionRouterChatCompletionsPromptTokensDetails,
|
|
5763
5794
|
SDKValidationError
|
|
5764
5795
|
> {
|
|
5765
5796
|
return safeParse(
|
|
5766
5797
|
jsonString,
|
|
5767
5798
|
(x) =>
|
|
5768
|
-
|
|
5769
|
-
JSON.parse(x),
|
|
5770
|
-
|
|
5771
|
-
`Failed to parse 'CreateChatCompletionPromptTokensDetails' from JSON`,
|
|
5799
|
+
CreateChatCompletionRouterChatCompletionsPromptTokensDetails$inboundSchema
|
|
5800
|
+
.parse(JSON.parse(x)),
|
|
5801
|
+
`Failed to parse 'CreateChatCompletionRouterChatCompletionsPromptTokensDetails' from JSON`,
|
|
5772
5802
|
);
|
|
5773
5803
|
}
|
|
5774
5804
|
|
|
5775
5805
|
/** @internal */
|
|
5776
|
-
export const
|
|
5806
|
+
export const CreateChatCompletionRouterChatCompletionsCompletionTokensDetails$inboundSchema:
|
|
5777
5807
|
z.ZodType<
|
|
5778
|
-
|
|
5808
|
+
CreateChatCompletionRouterChatCompletionsCompletionTokensDetails,
|
|
5779
5809
|
z.ZodTypeDef,
|
|
5780
5810
|
unknown
|
|
5781
5811
|
> = z.object({
|
|
@@ -5792,54 +5822,64 @@ export const CreateChatCompletionCompletionTokensDetails$inboundSchema:
|
|
|
5792
5822
|
});
|
|
5793
5823
|
});
|
|
5794
5824
|
|
|
5795
|
-
export function
|
|
5825
|
+
export function createChatCompletionRouterChatCompletionsCompletionTokensDetailsFromJSON(
|
|
5796
5826
|
jsonString: string,
|
|
5797
5827
|
): SafeParseResult<
|
|
5798
|
-
|
|
5828
|
+
CreateChatCompletionRouterChatCompletionsCompletionTokensDetails,
|
|
5799
5829
|
SDKValidationError
|
|
5800
5830
|
> {
|
|
5801
5831
|
return safeParse(
|
|
5802
5832
|
jsonString,
|
|
5803
5833
|
(x) =>
|
|
5804
|
-
|
|
5805
|
-
JSON.parse(x),
|
|
5806
|
-
|
|
5807
|
-
`Failed to parse 'CreateChatCompletionCompletionTokensDetails' from JSON`,
|
|
5834
|
+
CreateChatCompletionRouterChatCompletionsCompletionTokensDetails$inboundSchema
|
|
5835
|
+
.parse(JSON.parse(x)),
|
|
5836
|
+
`Failed to parse 'CreateChatCompletionRouterChatCompletionsCompletionTokensDetails' from JSON`,
|
|
5808
5837
|
);
|
|
5809
5838
|
}
|
|
5810
5839
|
|
|
5811
5840
|
/** @internal */
|
|
5812
|
-
export const
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
z.
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5841
|
+
export const CreateChatCompletionRouterChatCompletionsUsage$inboundSchema:
|
|
5842
|
+
z.ZodType<
|
|
5843
|
+
CreateChatCompletionRouterChatCompletionsUsage,
|
|
5844
|
+
z.ZodTypeDef,
|
|
5845
|
+
unknown
|
|
5846
|
+
> = z.object({
|
|
5847
|
+
completion_tokens: z.number().optional(),
|
|
5848
|
+
prompt_tokens: z.number().optional(),
|
|
5849
|
+
total_tokens: z.number().optional(),
|
|
5850
|
+
prompt_tokens_details: z.nullable(
|
|
5851
|
+
z.lazy(() =>
|
|
5852
|
+
CreateChatCompletionRouterChatCompletionsPromptTokensDetails$inboundSchema
|
|
5853
|
+
),
|
|
5854
|
+
).optional(),
|
|
5855
|
+
completion_tokens_details: z.nullable(
|
|
5856
|
+
z.lazy(() =>
|
|
5857
|
+
CreateChatCompletionRouterChatCompletionsCompletionTokensDetails$inboundSchema
|
|
5858
|
+
),
|
|
5859
|
+
).optional(),
|
|
5860
|
+
}).transform((v) => {
|
|
5861
|
+
return remap$(v, {
|
|
5862
|
+
"completion_tokens": "completionTokens",
|
|
5863
|
+
"prompt_tokens": "promptTokens",
|
|
5864
|
+
"total_tokens": "totalTokens",
|
|
5865
|
+
"prompt_tokens_details": "promptTokensDetails",
|
|
5866
|
+
"completion_tokens_details": "completionTokensDetails",
|
|
5867
|
+
});
|
|
5833
5868
|
});
|
|
5834
|
-
});
|
|
5835
5869
|
|
|
5836
|
-
export function
|
|
5870
|
+
export function createChatCompletionRouterChatCompletionsUsageFromJSON(
|
|
5837
5871
|
jsonString: string,
|
|
5838
|
-
): SafeParseResult<
|
|
5872
|
+
): SafeParseResult<
|
|
5873
|
+
CreateChatCompletionRouterChatCompletionsUsage,
|
|
5874
|
+
SDKValidationError
|
|
5875
|
+
> {
|
|
5839
5876
|
return safeParse(
|
|
5840
5877
|
jsonString,
|
|
5841
|
-
(x) =>
|
|
5842
|
-
|
|
5878
|
+
(x) =>
|
|
5879
|
+
CreateChatCompletionRouterChatCompletionsUsage$inboundSchema.parse(
|
|
5880
|
+
JSON.parse(x),
|
|
5881
|
+
),
|
|
5882
|
+
`Failed to parse 'CreateChatCompletionRouterChatCompletionsUsage' from JSON`,
|
|
5843
5883
|
);
|
|
5844
5884
|
}
|
|
5845
5885
|
|
|
@@ -5855,12 +5895,17 @@ export const CreateChatCompletionData$inboundSchema: z.ZodType<
|
|
|
5855
5895
|
unknown
|
|
5856
5896
|
> = z.object({
|
|
5857
5897
|
id: z.string(),
|
|
5858
|
-
choices: z.array(
|
|
5898
|
+
choices: z.array(
|
|
5899
|
+
z.lazy(() =>
|
|
5900
|
+
CreateChatCompletionRouterChatCompletionsChoices$inboundSchema
|
|
5901
|
+
),
|
|
5902
|
+
),
|
|
5859
5903
|
created: z.number(),
|
|
5860
5904
|
model: z.string(),
|
|
5861
5905
|
system_fingerprint: z.nullable(z.string()).optional(),
|
|
5862
|
-
usage: z.nullable(
|
|
5863
|
-
.
|
|
5906
|
+
usage: z.nullable(
|
|
5907
|
+
z.lazy(() => CreateChatCompletionRouterChatCompletionsUsage$inboundSchema),
|
|
5908
|
+
).optional(),
|
|
5864
5909
|
object: CreateChatCompletionRouterChatCompletionsObject$inboundSchema,
|
|
5865
5910
|
}).transform((v) => {
|
|
5866
5911
|
return remap$(v, {
|
|
@@ -6019,37 +6064,37 @@ export function createChatCompletionRouterChatCompletionsAudioFromJSON(
|
|
|
6019
6064
|
}
|
|
6020
6065
|
|
|
6021
6066
|
/** @internal */
|
|
6022
|
-
export const
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
});
|
|
6067
|
+
export const CreateChatCompletionMessage$inboundSchema: z.ZodType<
|
|
6068
|
+
CreateChatCompletionMessage,
|
|
6069
|
+
z.ZodTypeDef,
|
|
6070
|
+
unknown
|
|
6071
|
+
> = z.object({
|
|
6072
|
+
content: z.nullable(z.string()).optional(),
|
|
6073
|
+
refusal: z.nullable(z.string()).optional(),
|
|
6074
|
+
tool_calls: z.array(z.lazy(() => CreateChatCompletionToolCalls$inboundSchema))
|
|
6075
|
+
.optional(),
|
|
6076
|
+
role: CreateChatCompletionRole$inboundSchema.optional(),
|
|
6077
|
+
reasoning: z.nullable(z.string()).optional(),
|
|
6078
|
+
reasoning_signature: z.nullable(z.string()).optional(),
|
|
6079
|
+
redacted_reasoning: z.string().optional(),
|
|
6080
|
+
audio: z.nullable(
|
|
6081
|
+
z.lazy(() => CreateChatCompletionRouterChatCompletionsAudio$inboundSchema),
|
|
6082
|
+
).optional(),
|
|
6083
|
+
}).transform((v) => {
|
|
6084
|
+
return remap$(v, {
|
|
6085
|
+
"tool_calls": "toolCalls",
|
|
6086
|
+
"reasoning_signature": "reasoningSignature",
|
|
6087
|
+
"redacted_reasoning": "redactedReasoning",
|
|
6044
6088
|
});
|
|
6089
|
+
});
|
|
6045
6090
|
|
|
6046
|
-
export function
|
|
6091
|
+
export function createChatCompletionMessageFromJSON(
|
|
6047
6092
|
jsonString: string,
|
|
6048
|
-
): SafeParseResult<
|
|
6093
|
+
): SafeParseResult<CreateChatCompletionMessage, SDKValidationError> {
|
|
6049
6094
|
return safeParse(
|
|
6050
6095
|
jsonString,
|
|
6051
|
-
(x) =>
|
|
6052
|
-
`Failed to parse '
|
|
6096
|
+
(x) => CreateChatCompletionMessage$inboundSchema.parse(JSON.parse(x)),
|
|
6097
|
+
`Failed to parse 'CreateChatCompletionMessage' from JSON`,
|
|
6053
6098
|
);
|
|
6054
6099
|
}
|
|
6055
6100
|
|
|
@@ -6169,31 +6214,34 @@ export function logprobsFromJSON(
|
|
|
6169
6214
|
}
|
|
6170
6215
|
|
|
6171
6216
|
/** @internal */
|
|
6172
|
-
export const
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6217
|
+
export const CreateChatCompletionChoices$inboundSchema: z.ZodType<
|
|
6218
|
+
CreateChatCompletionChoices,
|
|
6219
|
+
z.ZodTypeDef,
|
|
6220
|
+
unknown
|
|
6221
|
+
> = z.object({
|
|
6222
|
+
finish_reason: z.nullable(FinishReason$inboundSchema),
|
|
6223
|
+
index: z.number().default(0),
|
|
6224
|
+
message: z.lazy(() => CreateChatCompletionMessage$inboundSchema),
|
|
6225
|
+
logprobs: z.nullable(z.lazy(() => Logprobs$inboundSchema)).optional(),
|
|
6226
|
+
}).transform((v) => {
|
|
6227
|
+
return remap$(v, {
|
|
6228
|
+
"finish_reason": "finishReason",
|
|
6182
6229
|
});
|
|
6230
|
+
});
|
|
6183
6231
|
|
|
6184
|
-
export function
|
|
6232
|
+
export function createChatCompletionChoicesFromJSON(
|
|
6185
6233
|
jsonString: string,
|
|
6186
|
-
): SafeParseResult<
|
|
6234
|
+
): SafeParseResult<CreateChatCompletionChoices, SDKValidationError> {
|
|
6187
6235
|
return safeParse(
|
|
6188
6236
|
jsonString,
|
|
6189
|
-
(x) =>
|
|
6190
|
-
`Failed to parse '
|
|
6237
|
+
(x) => CreateChatCompletionChoices$inboundSchema.parse(JSON.parse(x)),
|
|
6238
|
+
`Failed to parse 'CreateChatCompletionChoices' from JSON`,
|
|
6191
6239
|
);
|
|
6192
6240
|
}
|
|
6193
6241
|
|
|
6194
6242
|
/** @internal */
|
|
6195
|
-
export const
|
|
6196
|
-
|
|
6243
|
+
export const CreateChatCompletionPromptTokensDetails$inboundSchema: z.ZodType<
|
|
6244
|
+
CreateChatCompletionPromptTokensDetails,
|
|
6197
6245
|
z.ZodTypeDef,
|
|
6198
6246
|
unknown
|
|
6199
6247
|
> = z.object({
|
|
@@ -6208,74 +6256,90 @@ export const PromptTokensDetails$inboundSchema: z.ZodType<
|
|
|
6208
6256
|
});
|
|
6209
6257
|
});
|
|
6210
6258
|
|
|
6211
|
-
export function
|
|
6259
|
+
export function createChatCompletionPromptTokensDetailsFromJSON(
|
|
6212
6260
|
jsonString: string,
|
|
6213
|
-
): SafeParseResult<
|
|
6261
|
+
): SafeParseResult<
|
|
6262
|
+
CreateChatCompletionPromptTokensDetails,
|
|
6263
|
+
SDKValidationError
|
|
6264
|
+
> {
|
|
6214
6265
|
return safeParse(
|
|
6215
6266
|
jsonString,
|
|
6216
|
-
(x) =>
|
|
6217
|
-
|
|
6267
|
+
(x) =>
|
|
6268
|
+
CreateChatCompletionPromptTokensDetails$inboundSchema.parse(
|
|
6269
|
+
JSON.parse(x),
|
|
6270
|
+
),
|
|
6271
|
+
`Failed to parse 'CreateChatCompletionPromptTokensDetails' from JSON`,
|
|
6218
6272
|
);
|
|
6219
6273
|
}
|
|
6220
6274
|
|
|
6221
6275
|
/** @internal */
|
|
6222
|
-
export const
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6276
|
+
export const CreateChatCompletionCompletionTokensDetails$inboundSchema:
|
|
6277
|
+
z.ZodType<
|
|
6278
|
+
CreateChatCompletionCompletionTokensDetails,
|
|
6279
|
+
z.ZodTypeDef,
|
|
6280
|
+
unknown
|
|
6281
|
+
> = z.object({
|
|
6282
|
+
reasoning_tokens: z.nullable(z.number()).optional(),
|
|
6283
|
+
accepted_prediction_tokens: z.nullable(z.number()).optional(),
|
|
6284
|
+
rejected_prediction_tokens: z.nullable(z.number()).optional(),
|
|
6285
|
+
audio_tokens: z.nullable(z.number().int()).optional(),
|
|
6286
|
+
}).transform((v) => {
|
|
6287
|
+
return remap$(v, {
|
|
6288
|
+
"reasoning_tokens": "reasoningTokens",
|
|
6289
|
+
"accepted_prediction_tokens": "acceptedPredictionTokens",
|
|
6290
|
+
"rejected_prediction_tokens": "rejectedPredictionTokens",
|
|
6291
|
+
"audio_tokens": "audioTokens",
|
|
6292
|
+
});
|
|
6237
6293
|
});
|
|
6238
|
-
});
|
|
6239
6294
|
|
|
6240
|
-
export function
|
|
6295
|
+
export function createChatCompletionCompletionTokensDetailsFromJSON(
|
|
6241
6296
|
jsonString: string,
|
|
6242
|
-
): SafeParseResult<
|
|
6297
|
+
): SafeParseResult<
|
|
6298
|
+
CreateChatCompletionCompletionTokensDetails,
|
|
6299
|
+
SDKValidationError
|
|
6300
|
+
> {
|
|
6243
6301
|
return safeParse(
|
|
6244
6302
|
jsonString,
|
|
6245
|
-
(x) =>
|
|
6246
|
-
|
|
6303
|
+
(x) =>
|
|
6304
|
+
CreateChatCompletionCompletionTokensDetails$inboundSchema.parse(
|
|
6305
|
+
JSON.parse(x),
|
|
6306
|
+
),
|
|
6307
|
+
`Failed to parse 'CreateChatCompletionCompletionTokensDetails' from JSON`,
|
|
6247
6308
|
);
|
|
6248
6309
|
}
|
|
6249
6310
|
|
|
6250
6311
|
/** @internal */
|
|
6251
|
-
export const
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6312
|
+
export const CreateChatCompletionUsage$inboundSchema: z.ZodType<
|
|
6313
|
+
CreateChatCompletionUsage,
|
|
6314
|
+
z.ZodTypeDef,
|
|
6315
|
+
unknown
|
|
6316
|
+
> = z.object({
|
|
6317
|
+
completion_tokens: z.number().optional(),
|
|
6318
|
+
prompt_tokens: z.number().optional(),
|
|
6319
|
+
total_tokens: z.number().optional(),
|
|
6320
|
+
prompt_tokens_details: z.nullable(
|
|
6321
|
+
z.lazy(() => CreateChatCompletionPromptTokensDetails$inboundSchema),
|
|
6322
|
+
).optional(),
|
|
6323
|
+
completion_tokens_details: z.nullable(
|
|
6324
|
+
z.lazy(() => CreateChatCompletionCompletionTokensDetails$inboundSchema),
|
|
6325
|
+
).optional(),
|
|
6326
|
+
}).transform((v) => {
|
|
6327
|
+
return remap$(v, {
|
|
6328
|
+
"completion_tokens": "completionTokens",
|
|
6329
|
+
"prompt_tokens": "promptTokens",
|
|
6330
|
+
"total_tokens": "totalTokens",
|
|
6331
|
+
"prompt_tokens_details": "promptTokensDetails",
|
|
6332
|
+
"completion_tokens_details": "completionTokensDetails",
|
|
6270
6333
|
});
|
|
6334
|
+
});
|
|
6271
6335
|
|
|
6272
|
-
export function
|
|
6336
|
+
export function createChatCompletionUsageFromJSON(
|
|
6273
6337
|
jsonString: string,
|
|
6274
|
-
): SafeParseResult<
|
|
6338
|
+
): SafeParseResult<CreateChatCompletionUsage, SDKValidationError> {
|
|
6275
6339
|
return safeParse(
|
|
6276
6340
|
jsonString,
|
|
6277
|
-
(x) =>
|
|
6278
|
-
`Failed to parse '
|
|
6341
|
+
(x) => CreateChatCompletionUsage$inboundSchema.parse(JSON.parse(x)),
|
|
6342
|
+
`Failed to parse 'CreateChatCompletionUsage' from JSON`,
|
|
6279
6343
|
);
|
|
6280
6344
|
}
|
|
6281
6345
|
|
|
@@ -6291,11 +6355,12 @@ export const CreateChatCompletionResponseBody$inboundSchema: z.ZodType<
|
|
|
6291
6355
|
unknown
|
|
6292
6356
|
> = z.object({
|
|
6293
6357
|
id: z.string(),
|
|
6294
|
-
choices: z.array(z.lazy(() =>
|
|
6358
|
+
choices: z.array(z.lazy(() => CreateChatCompletionChoices$inboundSchema)),
|
|
6295
6359
|
created: z.number(),
|
|
6296
6360
|
model: z.string(),
|
|
6297
6361
|
system_fingerprint: z.nullable(z.string()).optional(),
|
|
6298
|
-
usage: z.nullable(z.lazy(() =>
|
|
6362
|
+
usage: z.nullable(z.lazy(() => CreateChatCompletionUsage$inboundSchema))
|
|
6363
|
+
.optional(),
|
|
6299
6364
|
object: CreateChatCompletionObject$inboundSchema,
|
|
6300
6365
|
}).transform((v) => {
|
|
6301
6366
|
return remap$(v, {
|