@orq-ai/node 4.9.0-rc.47 → 4.9.0-rc.49
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/README.md +47 -52
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/reasoningpart.js +1 -1
- package/models/operations/createcontact.js +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.d.ts +5 -5
- package/models/operations/createeval.d.ts.map +1 -1
- package/models/operations/createeval.js +24 -23
- package/models/operations/createeval.js.map +1 -1
- package/models/operations/createidentity.js +1 -1
- package/models/operations/createrouterresponse.d.ts +24 -24
- package/models/operations/createrouterresponse.d.ts.map +1 -1
- package/models/operations/createrouterresponse.js +23 -26
- package/models/operations/createrouterresponse.js.map +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/deploymentgetconfig.d.ts +9 -9
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +17 -15
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +16 -16
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/index.d.ts +0 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -1
- package/models/operations/index.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/listidentities.js +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/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrieveidentity.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +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/updateidentity.js +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +5 -5
- package/sdk/agents.d.ts +2 -2
- package/sdk/agents.d.ts.map +1 -1
- package/sdk/agents.js +2 -2
- package/sdk/agents.js.map +1 -1
- package/sdk/orqresponses.d.ts +13 -5
- package/sdk/orqresponses.d.ts.map +1 -1
- package/sdk/orqresponses.js +16 -6
- package/sdk/orqresponses.js.map +1 -1
- package/sdk/router.d.ts +0 -3
- package/sdk/router.d.ts.map +1 -1
- package/sdk/router.js +0 -4
- package/sdk/router.js.map +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/operations/createcontact.ts +1 -1
- 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 +29 -32
- package/src/models/operations/createidentity.ts +1 -1
- package/src/models/operations/createrouterresponse.ts +40 -58
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/deploymentgetconfig.ts +33 -48
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +16 -16
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/index.ts +0 -1
- 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/listidentities.ts +1 -1
- 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/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrieveidentity.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- 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/updateidentity.ts +1 -1
- package/src/models/operations/updatetool.ts +7 -7
- package/src/sdk/agents.ts +4 -4
- package/src/sdk/orqresponses.ts +28 -7
- package/src/sdk/router.ts +0 -6
- package/funcs/routerResponsesCreate.d.ts +0 -23
- package/funcs/routerResponsesCreate.d.ts.map +0 -1
- package/funcs/routerResponsesCreate.js +0 -122
- package/funcs/routerResponsesCreate.js.map +0 -1
- package/models/operations/createresponse.d.ts +0 -1990
- package/models/operations/createresponse.d.ts.map +0 -1
- package/models/operations/createresponse.js +0 -1422
- package/models/operations/createresponse.js.map +0 -1
- package/sdk/orqagentsresponses.d.ts +0 -24
- package/sdk/orqagentsresponses.d.ts.map +0 -1
- package/sdk/orqagentsresponses.js +0 -34
- package/sdk/orqagentsresponses.js.map +0 -1
- package/src/funcs/routerResponsesCreate.ts +0 -169
- package/src/models/operations/createresponse.ts +0 -3864
- package/src/sdk/orqagentsresponses.ts +0 -53
|
@@ -1,1422 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.CreateResponse2RouterResponses2$outboundSchema = exports.CreateResponse2RouterResponsesRequestRequestBodyType$outboundSchema = exports.CreateResponse23$outboundSchema = exports.CreateResponse2RouterResponsesRequestRequestBodyInputType$outboundSchema = exports.CreateResponseText$outboundSchema = exports.CreateResponseFormat$outboundSchema = exports.Format1$outboundSchema = exports.Format2$outboundSchema = exports.Format3$outboundSchema = exports.CreateResponseThinking$outboundSchema = exports.Reasoning$outboundSchema = exports.Summary$outboundSchema = exports.Effort$outboundSchema = exports.CreateResponseServiceTier = exports.Truncation = exports.CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody2Type = exports.CreateResponseToolsSearchContextSize = exports.CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody3Type = exports.CreateResponseToolsRouterResponsesSearchContextSize = exports.ToolsRanker = exports.CreateResponseToolChoiceRouterResponses1 = exports.CreateResponseToolChoiceRouterResponsesResponseType = exports.OutputStatus = exports.OutputRole = exports.CreateResponseOutputRouterResponsesResponse200ApplicationJSONResponseBodyType = exports.CreateResponseOutputStatus = exports.CreateResponseOutputRouterResponsesStatus = exports.CreateResponseOutputRouterResponsesResponseStatus = exports.CreateResponseOutputRouterResponsesResponse200Status = exports.CreateResponseOutputRouterResponsesResponse200ApplicationJSONResponseBody5Type = exports.Reason = exports.CreateResponseStatus = exports.CreateResponseObject = exports.CreateResponseToolChoice1 = exports.CreateResponseToolChoiceType = exports.CreateResponseToolChoiceRouterResponsesType = exports.CreateResponseToolChoiceRouterResponsesRequestType = exports.CreateResponseToolsRouterResponsesType = exports.SearchContextSize = exports.CreateResponseToolsRouterResponsesRequestRequestBodyType = exports.ToolsSearchContextSize = exports.Ranker = exports.ServiceTier = exports.Include = exports.Detail = exports.TwoRole = exports.CreateResponse2RouterResponsesRequestRequestBodyType = exports.CreateResponse2RouterResponsesRequestRequestBodyInputType = exports.Summary = exports.Effort = void 0;
|
|
40
|
-
exports.Output3$inboundSchema = exports.CreateResponseOutputRouterResponsesStatus$inboundSchema = exports.Output4$inboundSchema = exports.CreateResponseOutputRouterResponsesResponseStatus$inboundSchema = exports.Five$inboundSchema = exports.CreateResponseOutputRouterResponsesResponse200Status$inboundSchema = exports.OutputSummary$inboundSchema = exports.CreateResponseOutputRouterResponsesResponse200ApplicationJSONResponseBody5Type$inboundSchema = exports.IncompleteDetails$inboundSchema = exports.Reason$inboundSchema = exports.ErrorT$inboundSchema = exports.CreateResponseStatus$inboundSchema = exports.CreateResponseObject$inboundSchema = exports.CreateResponseRouterResponsesResponseBody$inboundSchema = exports.CreateResponseData$inboundSchema = exports.CreateResponseRequestBody$outboundSchema = exports.CreateResponseToolChoice$outboundSchema = exports.CreateResponseToolChoice1$outboundSchema = exports.CreateResponseToolChoice2$outboundSchema = exports.CreateResponseToolChoiceType$outboundSchema = exports.ToolChoice3$outboundSchema = exports.CreateResponseToolChoiceRouterResponsesType$outboundSchema = exports.ToolChoice4$outboundSchema = exports.CreateResponseToolChoiceRouterResponsesRequestType$outboundSchema = exports.CreateResponseTools$outboundSchema = exports.Tools1$outboundSchema = exports.Tools2$outboundSchema = exports.UserLocation$outboundSchema = exports.CreateResponseToolsRouterResponsesType$outboundSchema = exports.SearchContextSize$outboundSchema = exports.Tools3$outboundSchema = exports.Filters$outboundSchema = exports.ToolsUserLocation$outboundSchema = exports.CreateResponseToolsRouterResponsesRequestRequestBodyType$outboundSchema = exports.ToolsSearchContextSize$outboundSchema = exports.Tools4$outboundSchema = exports.RankingOptions$outboundSchema = exports.Ranker$outboundSchema = exports.ServiceTier$outboundSchema = exports.Include$outboundSchema = exports.CreateResponseInput$outboundSchema = exports.Input2$outboundSchema = exports.Two1$outboundSchema = exports.TwoContent$outboundSchema = exports.CreateResponseContent2$outboundSchema = exports.CreateResponse21$outboundSchema = exports.CreateResponse22$outboundSchema = exports.Detail$outboundSchema = exports.Two3$outboundSchema = exports.TwoRole$outboundSchema = void 0;
|
|
41
|
-
exports.CreateResponseResponse$inboundSchema = exports.CreateResponseResponseBody$inboundSchema = exports.CreateResponseServiceTier$inboundSchema = exports.Truncation$inboundSchema = exports.CreateResponseRouterResponsesText$inboundSchema = exports.CreateResponseRouterResponsesFormat$inboundSchema = exports.CreateResponseFormat1$inboundSchema = exports.CreateResponseFormat2$inboundSchema = exports.CreateResponseFormat3$inboundSchema = exports.CreateResponseReasoning$inboundSchema = exports.CreateResponseRouterResponsesTools$inboundSchema = exports.CreateResponseTools1$inboundSchema = exports.CreateResponseTools2$inboundSchema = exports.CreateResponseToolsUserLocation$inboundSchema = exports.CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody2Type$inboundSchema = exports.CreateResponseToolsSearchContextSize$inboundSchema = exports.CreateResponseTools3$inboundSchema = exports.ToolsFilters$inboundSchema = exports.CreateResponseToolsRouterResponsesUserLocation$inboundSchema = exports.CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody3Type$inboundSchema = exports.CreateResponseToolsRouterResponsesSearchContextSize$inboundSchema = exports.CreateResponseTools4$inboundSchema = exports.ToolsRankingOptions$inboundSchema = exports.ToolsRanker$inboundSchema = exports.CreateResponseRouterResponsesToolChoice$inboundSchema = exports.CreateResponseToolChoiceRouterResponses1$inboundSchema = exports.CreateResponseToolChoiceRouterResponses2$inboundSchema = exports.CreateResponseToolChoiceFunction$inboundSchema = exports.CreateResponseToolChoiceRouterResponsesResponseType$inboundSchema = exports.CreateResponseUsage$inboundSchema = exports.OutputTokensDetails$inboundSchema = exports.CreateResponseInputTokensDetails$inboundSchema = exports.Output$inboundSchema = exports.Output1$inboundSchema = exports.OutputContent$inboundSchema = exports.Content1$inboundSchema = exports.ContentAnnotations$inboundSchema = exports.Annotations1$inboundSchema = exports.Annotations2$inboundSchema = exports.CreateResponseContentRouterResponses2$inboundSchema = exports.OutputStatus$inboundSchema = exports.OutputRole$inboundSchema = exports.Output2$inboundSchema = exports.Action$inboundSchema = exports.Sources$inboundSchema = exports.CreateResponseOutputRouterResponsesResponse200ApplicationJSONResponseBodyType$inboundSchema = exports.CreateResponseOutputStatus$inboundSchema = void 0;
|
|
42
|
-
exports.reasoningToJSON = reasoningToJSON;
|
|
43
|
-
exports.createResponseThinkingToJSON = createResponseThinkingToJSON;
|
|
44
|
-
exports.format3ToJSON = format3ToJSON;
|
|
45
|
-
exports.format2ToJSON = format2ToJSON;
|
|
46
|
-
exports.format1ToJSON = format1ToJSON;
|
|
47
|
-
exports.createResponseFormatToJSON = createResponseFormatToJSON;
|
|
48
|
-
exports.createResponseTextToJSON = createResponseTextToJSON;
|
|
49
|
-
exports.createResponse23ToJSON = createResponse23ToJSON;
|
|
50
|
-
exports.createResponse2RouterResponses2ToJSON = createResponse2RouterResponses2ToJSON;
|
|
51
|
-
exports.two3ToJSON = two3ToJSON;
|
|
52
|
-
exports.createResponse22ToJSON = createResponse22ToJSON;
|
|
53
|
-
exports.createResponse21ToJSON = createResponse21ToJSON;
|
|
54
|
-
exports.createResponseContent2ToJSON = createResponseContent2ToJSON;
|
|
55
|
-
exports.twoContentToJSON = twoContentToJSON;
|
|
56
|
-
exports.two1ToJSON = two1ToJSON;
|
|
57
|
-
exports.input2ToJSON = input2ToJSON;
|
|
58
|
-
exports.createResponseInputToJSON = createResponseInputToJSON;
|
|
59
|
-
exports.rankingOptionsToJSON = rankingOptionsToJSON;
|
|
60
|
-
exports.tools4ToJSON = tools4ToJSON;
|
|
61
|
-
exports.toolsUserLocationToJSON = toolsUserLocationToJSON;
|
|
62
|
-
exports.filtersToJSON = filtersToJSON;
|
|
63
|
-
exports.tools3ToJSON = tools3ToJSON;
|
|
64
|
-
exports.userLocationToJSON = userLocationToJSON;
|
|
65
|
-
exports.tools2ToJSON = tools2ToJSON;
|
|
66
|
-
exports.tools1ToJSON = tools1ToJSON;
|
|
67
|
-
exports.createResponseToolsToJSON = createResponseToolsToJSON;
|
|
68
|
-
exports.toolChoice4ToJSON = toolChoice4ToJSON;
|
|
69
|
-
exports.toolChoice3ToJSON = toolChoice3ToJSON;
|
|
70
|
-
exports.createResponseToolChoice2ToJSON = createResponseToolChoice2ToJSON;
|
|
71
|
-
exports.createResponseToolChoiceToJSON = createResponseToolChoiceToJSON;
|
|
72
|
-
exports.createResponseRequestBodyToJSON = createResponseRequestBodyToJSON;
|
|
73
|
-
exports.createResponseDataFromJSON = createResponseDataFromJSON;
|
|
74
|
-
exports.createResponseRouterResponsesResponseBodyFromJSON = createResponseRouterResponsesResponseBodyFromJSON;
|
|
75
|
-
exports.errorFromJSON = errorFromJSON;
|
|
76
|
-
exports.incompleteDetailsFromJSON = incompleteDetailsFromJSON;
|
|
77
|
-
exports.outputSummaryFromJSON = outputSummaryFromJSON;
|
|
78
|
-
exports.fiveFromJSON = fiveFromJSON;
|
|
79
|
-
exports.output4FromJSON = output4FromJSON;
|
|
80
|
-
exports.output3FromJSON = output3FromJSON;
|
|
81
|
-
exports.sourcesFromJSON = sourcesFromJSON;
|
|
82
|
-
exports.actionFromJSON = actionFromJSON;
|
|
83
|
-
exports.output2FromJSON = output2FromJSON;
|
|
84
|
-
exports.createResponseContentRouterResponses2FromJSON = createResponseContentRouterResponses2FromJSON;
|
|
85
|
-
exports.annotations2FromJSON = annotations2FromJSON;
|
|
86
|
-
exports.annotations1FromJSON = annotations1FromJSON;
|
|
87
|
-
exports.contentAnnotationsFromJSON = contentAnnotationsFromJSON;
|
|
88
|
-
exports.content1FromJSON = content1FromJSON;
|
|
89
|
-
exports.outputContentFromJSON = outputContentFromJSON;
|
|
90
|
-
exports.output1FromJSON = output1FromJSON;
|
|
91
|
-
exports.outputFromJSON = outputFromJSON;
|
|
92
|
-
exports.createResponseInputTokensDetailsFromJSON = createResponseInputTokensDetailsFromJSON;
|
|
93
|
-
exports.outputTokensDetailsFromJSON = outputTokensDetailsFromJSON;
|
|
94
|
-
exports.createResponseUsageFromJSON = createResponseUsageFromJSON;
|
|
95
|
-
exports.createResponseToolChoiceFunctionFromJSON = createResponseToolChoiceFunctionFromJSON;
|
|
96
|
-
exports.createResponseToolChoiceRouterResponses2FromJSON = createResponseToolChoiceRouterResponses2FromJSON;
|
|
97
|
-
exports.createResponseRouterResponsesToolChoiceFromJSON = createResponseRouterResponsesToolChoiceFromJSON;
|
|
98
|
-
exports.toolsRankingOptionsFromJSON = toolsRankingOptionsFromJSON;
|
|
99
|
-
exports.createResponseTools4FromJSON = createResponseTools4FromJSON;
|
|
100
|
-
exports.createResponseToolsRouterResponsesUserLocationFromJSON = createResponseToolsRouterResponsesUserLocationFromJSON;
|
|
101
|
-
exports.toolsFiltersFromJSON = toolsFiltersFromJSON;
|
|
102
|
-
exports.createResponseTools3FromJSON = createResponseTools3FromJSON;
|
|
103
|
-
exports.createResponseToolsUserLocationFromJSON = createResponseToolsUserLocationFromJSON;
|
|
104
|
-
exports.createResponseTools2FromJSON = createResponseTools2FromJSON;
|
|
105
|
-
exports.createResponseTools1FromJSON = createResponseTools1FromJSON;
|
|
106
|
-
exports.createResponseRouterResponsesToolsFromJSON = createResponseRouterResponsesToolsFromJSON;
|
|
107
|
-
exports.createResponseReasoningFromJSON = createResponseReasoningFromJSON;
|
|
108
|
-
exports.createResponseFormat3FromJSON = createResponseFormat3FromJSON;
|
|
109
|
-
exports.createResponseFormat2FromJSON = createResponseFormat2FromJSON;
|
|
110
|
-
exports.createResponseFormat1FromJSON = createResponseFormat1FromJSON;
|
|
111
|
-
exports.createResponseRouterResponsesFormatFromJSON = createResponseRouterResponsesFormatFromJSON;
|
|
112
|
-
exports.createResponseRouterResponsesTextFromJSON = createResponseRouterResponsesTextFromJSON;
|
|
113
|
-
exports.createResponseResponseBodyFromJSON = createResponseResponseBodyFromJSON;
|
|
114
|
-
exports.createResponseResponseFromJSON = createResponseResponseFromJSON;
|
|
115
|
-
const z = __importStar(require("zod/v3"));
|
|
116
|
-
const event_streams_js_1 = require("../../lib/event-streams.js");
|
|
117
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
118
|
-
const schemas_js_1 = require("../../lib/schemas.js");
|
|
119
|
-
const components = __importStar(require("../components/index.js"));
|
|
120
|
-
/**
|
|
121
|
-
* The effort level for reasoning
|
|
122
|
-
*/
|
|
123
|
-
exports.Effort = {
|
|
124
|
-
None: "none",
|
|
125
|
-
Minimal: "minimal",
|
|
126
|
-
Low: "low",
|
|
127
|
-
Medium: "medium",
|
|
128
|
-
High: "high",
|
|
129
|
-
Xhigh: "xhigh",
|
|
130
|
-
};
|
|
131
|
-
/**
|
|
132
|
-
* The summary mode for reasoning output
|
|
133
|
-
*/
|
|
134
|
-
exports.Summary = {
|
|
135
|
-
Auto: "auto",
|
|
136
|
-
Concise: "concise",
|
|
137
|
-
Detailed: "detailed",
|
|
138
|
-
};
|
|
139
|
-
/**
|
|
140
|
-
* The type of input item
|
|
141
|
-
*/
|
|
142
|
-
exports.CreateResponse2RouterResponsesRequestRequestBodyInputType = {
|
|
143
|
-
FunctionCall: "function_call",
|
|
144
|
-
};
|
|
145
|
-
/**
|
|
146
|
-
* The type of input item
|
|
147
|
-
*/
|
|
148
|
-
exports.CreateResponse2RouterResponsesRequestRequestBodyType = {
|
|
149
|
-
FunctionCallOutput: "function_call_output",
|
|
150
|
-
};
|
|
151
|
-
/**
|
|
152
|
-
* The role of the message author
|
|
153
|
-
*/
|
|
154
|
-
exports.TwoRole = {
|
|
155
|
-
User: "user",
|
|
156
|
-
Assistant: "assistant",
|
|
157
|
-
System: "system",
|
|
158
|
-
Developer: "developer",
|
|
159
|
-
};
|
|
160
|
-
/**
|
|
161
|
-
* Level of detail for image analysis
|
|
162
|
-
*/
|
|
163
|
-
exports.Detail = {
|
|
164
|
-
High: "high",
|
|
165
|
-
Low: "low",
|
|
166
|
-
Auto: "auto",
|
|
167
|
-
};
|
|
168
|
-
exports.Include = {
|
|
169
|
-
CodeInterpreterCallOutputs: "code_interpreter_call.outputs",
|
|
170
|
-
ComputerCallOutputOutputImageUrl: "computer_call_output.output.image_url",
|
|
171
|
-
FileSearchCallResults: "file_search_call.results",
|
|
172
|
-
MessageInputImageImageUrl: "message.input_image.image_url",
|
|
173
|
-
MessageOutputTextLogprobs: "message.output_text.logprobs",
|
|
174
|
-
ReasoningEncryptedContent: "reasoning.encrypted_content",
|
|
175
|
-
WebSearchCallResults: "web_search_call.results",
|
|
176
|
-
WebSearchCallActionSources: "web_search_call.action.sources",
|
|
177
|
-
};
|
|
178
|
-
/**
|
|
179
|
-
* Specifies the latency tier to use for processing the request. Defaults to "auto".
|
|
180
|
-
*/
|
|
181
|
-
exports.ServiceTier = {
|
|
182
|
-
Auto: "auto",
|
|
183
|
-
Default: "default",
|
|
184
|
-
Flex: "flex",
|
|
185
|
-
Scale: "scale",
|
|
186
|
-
Priority: "priority",
|
|
187
|
-
};
|
|
188
|
-
/**
|
|
189
|
-
* The ranking algorithm
|
|
190
|
-
*/
|
|
191
|
-
exports.Ranker = {
|
|
192
|
-
Auto: "auto",
|
|
193
|
-
Default20240821: "default_2024_08_21",
|
|
194
|
-
};
|
|
195
|
-
/**
|
|
196
|
-
* Amount of context to retrieve for each search result
|
|
197
|
-
*/
|
|
198
|
-
exports.ToolsSearchContextSize = {
|
|
199
|
-
Low: "low",
|
|
200
|
-
Medium: "medium",
|
|
201
|
-
High: "high",
|
|
202
|
-
};
|
|
203
|
-
/**
|
|
204
|
-
* The type of location
|
|
205
|
-
*/
|
|
206
|
-
exports.CreateResponseToolsRouterResponsesRequestRequestBodyType = {
|
|
207
|
-
Approximate: "approximate",
|
|
208
|
-
Exact: "exact",
|
|
209
|
-
};
|
|
210
|
-
/**
|
|
211
|
-
* Amount of context to retrieve for each search result
|
|
212
|
-
*/
|
|
213
|
-
exports.SearchContextSize = {
|
|
214
|
-
Low: "low",
|
|
215
|
-
Medium: "medium",
|
|
216
|
-
High: "high",
|
|
217
|
-
};
|
|
218
|
-
/**
|
|
219
|
-
* The type of location
|
|
220
|
-
*/
|
|
221
|
-
exports.CreateResponseToolsRouterResponsesType = {
|
|
222
|
-
Approximate: "approximate",
|
|
223
|
-
Exact: "exact",
|
|
224
|
-
};
|
|
225
|
-
exports.CreateResponseToolChoiceRouterResponsesRequestType = {
|
|
226
|
-
Mcp: "mcp",
|
|
227
|
-
};
|
|
228
|
-
exports.CreateResponseToolChoiceRouterResponsesType = {
|
|
229
|
-
Function: "function",
|
|
230
|
-
};
|
|
231
|
-
exports.CreateResponseToolChoiceType = {
|
|
232
|
-
FileSearch: "file_search",
|
|
233
|
-
WebSearchPreview: "web_search_preview",
|
|
234
|
-
WebSearchPreview20250311: "web_search_preview_2025_03_11",
|
|
235
|
-
WebSearch: "web_search",
|
|
236
|
-
ComputerUsePreview: "computer_use_preview",
|
|
237
|
-
ComputerUse: "computer_use",
|
|
238
|
-
Computer: "computer",
|
|
239
|
-
CodeInterpreter: "code_interpreter",
|
|
240
|
-
ImageGeneration: "image_generation",
|
|
241
|
-
};
|
|
242
|
-
/**
|
|
243
|
-
* Controls which (if any) tool is called by the model. `none` means the model will not call any tool. `auto` means the model can pick between generating a message or calling a tool. `required` means the model must call a tool.
|
|
244
|
-
*/
|
|
245
|
-
exports.CreateResponseToolChoice1 = {
|
|
246
|
-
None: "none",
|
|
247
|
-
Auto: "auto",
|
|
248
|
-
Required: "required",
|
|
249
|
-
};
|
|
250
|
-
/**
|
|
251
|
-
* The object type, which is always "response"
|
|
252
|
-
*/
|
|
253
|
-
exports.CreateResponseObject = {
|
|
254
|
-
Response: "response",
|
|
255
|
-
};
|
|
256
|
-
/**
|
|
257
|
-
* The status of the response
|
|
258
|
-
*/
|
|
259
|
-
exports.CreateResponseStatus = {
|
|
260
|
-
Completed: "completed",
|
|
261
|
-
Failed: "failed",
|
|
262
|
-
InProgress: "in_progress",
|
|
263
|
-
Cancelled: "cancelled",
|
|
264
|
-
Queued: "queued",
|
|
265
|
-
Incomplete: "incomplete",
|
|
266
|
-
};
|
|
267
|
-
/**
|
|
268
|
-
* The reason the response is incomplete
|
|
269
|
-
*/
|
|
270
|
-
exports.Reason = {
|
|
271
|
-
MaxOutputTokens: "max_output_tokens",
|
|
272
|
-
ContentFilter: "content_filter",
|
|
273
|
-
};
|
|
274
|
-
/**
|
|
275
|
-
* The type of summary part
|
|
276
|
-
*/
|
|
277
|
-
exports.CreateResponseOutputRouterResponsesResponse200ApplicationJSONResponseBody5Type = {
|
|
278
|
-
SummaryText: "summary_text",
|
|
279
|
-
};
|
|
280
|
-
/**
|
|
281
|
-
* The status of the reasoning item
|
|
282
|
-
*/
|
|
283
|
-
exports.CreateResponseOutputRouterResponsesResponse200Status = {
|
|
284
|
-
InProgress: "in_progress",
|
|
285
|
-
Completed: "completed",
|
|
286
|
-
Incomplete: "incomplete",
|
|
287
|
-
Failed: "failed",
|
|
288
|
-
};
|
|
289
|
-
/**
|
|
290
|
-
* The status of the function call
|
|
291
|
-
*/
|
|
292
|
-
exports.CreateResponseOutputRouterResponsesResponseStatus = {
|
|
293
|
-
InProgress: "in_progress",
|
|
294
|
-
Completed: "completed",
|
|
295
|
-
Incomplete: "incomplete",
|
|
296
|
-
Failed: "failed",
|
|
297
|
-
};
|
|
298
|
-
/**
|
|
299
|
-
* The status of the file search
|
|
300
|
-
*/
|
|
301
|
-
exports.CreateResponseOutputRouterResponsesStatus = {
|
|
302
|
-
InProgress: "in_progress",
|
|
303
|
-
Completed: "completed",
|
|
304
|
-
Incomplete: "incomplete",
|
|
305
|
-
Failed: "failed",
|
|
306
|
-
};
|
|
307
|
-
/**
|
|
308
|
-
* The status of the web search
|
|
309
|
-
*/
|
|
310
|
-
exports.CreateResponseOutputStatus = {
|
|
311
|
-
InProgress: "in_progress",
|
|
312
|
-
Completed: "completed",
|
|
313
|
-
Incomplete: "incomplete",
|
|
314
|
-
Failed: "failed",
|
|
315
|
-
};
|
|
316
|
-
/**
|
|
317
|
-
* The type of web search action
|
|
318
|
-
*/
|
|
319
|
-
exports.CreateResponseOutputRouterResponsesResponse200ApplicationJSONResponseBodyType = {
|
|
320
|
-
Search: "search",
|
|
321
|
-
OpenPage: "open_page",
|
|
322
|
-
Find: "find",
|
|
323
|
-
};
|
|
324
|
-
/**
|
|
325
|
-
* The role of the message author
|
|
326
|
-
*/
|
|
327
|
-
exports.OutputRole = {
|
|
328
|
-
Assistant: "assistant",
|
|
329
|
-
};
|
|
330
|
-
/**
|
|
331
|
-
* The status of the message
|
|
332
|
-
*/
|
|
333
|
-
exports.OutputStatus = {
|
|
334
|
-
InProgress: "in_progress",
|
|
335
|
-
Completed: "completed",
|
|
336
|
-
Incomplete: "incomplete",
|
|
337
|
-
Failed: "failed",
|
|
338
|
-
};
|
|
339
|
-
exports.CreateResponseToolChoiceRouterResponsesResponseType = {
|
|
340
|
-
Function: "function",
|
|
341
|
-
};
|
|
342
|
-
exports.CreateResponseToolChoiceRouterResponses1 = {
|
|
343
|
-
None: "none",
|
|
344
|
-
Auto: "auto",
|
|
345
|
-
Required: "required",
|
|
346
|
-
};
|
|
347
|
-
/**
|
|
348
|
-
* The ranking algorithm
|
|
349
|
-
*/
|
|
350
|
-
exports.ToolsRanker = {
|
|
351
|
-
Auto: "auto",
|
|
352
|
-
Default20240821: "default_2024_08_21",
|
|
353
|
-
};
|
|
354
|
-
/**
|
|
355
|
-
* Amount of context to retrieve for each search result
|
|
356
|
-
*/
|
|
357
|
-
exports.CreateResponseToolsRouterResponsesSearchContextSize = {
|
|
358
|
-
Low: "low",
|
|
359
|
-
Medium: "medium",
|
|
360
|
-
High: "high",
|
|
361
|
-
};
|
|
362
|
-
/**
|
|
363
|
-
* The type of location
|
|
364
|
-
*/
|
|
365
|
-
exports.CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody3Type = {
|
|
366
|
-
Approximate: "approximate",
|
|
367
|
-
Exact: "exact",
|
|
368
|
-
};
|
|
369
|
-
/**
|
|
370
|
-
* Amount of context to retrieve for each search result
|
|
371
|
-
*/
|
|
372
|
-
exports.CreateResponseToolsSearchContextSize = {
|
|
373
|
-
Low: "low",
|
|
374
|
-
Medium: "medium",
|
|
375
|
-
High: "high",
|
|
376
|
-
};
|
|
377
|
-
/**
|
|
378
|
-
* The type of location
|
|
379
|
-
*/
|
|
380
|
-
exports.CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody2Type = {
|
|
381
|
-
Approximate: "approximate",
|
|
382
|
-
Exact: "exact",
|
|
383
|
-
};
|
|
384
|
-
/**
|
|
385
|
-
* Controls how the model handles inputs longer than the maximum token length
|
|
386
|
-
*/
|
|
387
|
-
exports.Truncation = {
|
|
388
|
-
Auto: "auto",
|
|
389
|
-
Disabled: "disabled",
|
|
390
|
-
};
|
|
391
|
-
/**
|
|
392
|
-
* The service tier used for processing the request
|
|
393
|
-
*/
|
|
394
|
-
exports.CreateResponseServiceTier = {
|
|
395
|
-
Auto: "auto",
|
|
396
|
-
Default: "default",
|
|
397
|
-
Flex: "flex",
|
|
398
|
-
Scale: "scale",
|
|
399
|
-
Priority: "priority",
|
|
400
|
-
};
|
|
401
|
-
/** @internal */
|
|
402
|
-
exports.Effort$outboundSchema = z
|
|
403
|
-
.nativeEnum(exports.Effort);
|
|
404
|
-
/** @internal */
|
|
405
|
-
exports.Summary$outboundSchema = z
|
|
406
|
-
.nativeEnum(exports.Summary);
|
|
407
|
-
/** @internal */
|
|
408
|
-
exports.Reasoning$outboundSchema = z.object({
|
|
409
|
-
effort: exports.Effort$outboundSchema.optional(),
|
|
410
|
-
summary: z.nullable(exports.Summary$outboundSchema).optional(),
|
|
411
|
-
});
|
|
412
|
-
function reasoningToJSON(reasoning) {
|
|
413
|
-
return JSON.stringify(exports.Reasoning$outboundSchema.parse(reasoning));
|
|
414
|
-
}
|
|
415
|
-
/** @internal */
|
|
416
|
-
exports.CreateResponseThinking$outboundSchema = z.union([
|
|
417
|
-
components.ThinkingConfigDisabledSchema$outboundSchema,
|
|
418
|
-
components.ThinkingConfigEnabledSchema$outboundSchema,
|
|
419
|
-
components.ThinkingConfigAdaptiveSchema$outboundSchema,
|
|
420
|
-
]);
|
|
421
|
-
function createResponseThinkingToJSON(createResponseThinking) {
|
|
422
|
-
return JSON.stringify(exports.CreateResponseThinking$outboundSchema.parse(createResponseThinking));
|
|
423
|
-
}
|
|
424
|
-
/** @internal */
|
|
425
|
-
exports.Format3$outboundSchema = z.object({
|
|
426
|
-
type: z.literal("json_schema"),
|
|
427
|
-
name: z.string(),
|
|
428
|
-
description: z.string().optional(),
|
|
429
|
-
schema: z.record(z.any()),
|
|
430
|
-
strict: z.boolean().default(true),
|
|
431
|
-
});
|
|
432
|
-
function format3ToJSON(format3) {
|
|
433
|
-
return JSON.stringify(exports.Format3$outboundSchema.parse(format3));
|
|
434
|
-
}
|
|
435
|
-
/** @internal */
|
|
436
|
-
exports.Format2$outboundSchema = z.object({
|
|
437
|
-
type: z.literal("json_object"),
|
|
438
|
-
});
|
|
439
|
-
function format2ToJSON(format2) {
|
|
440
|
-
return JSON.stringify(exports.Format2$outboundSchema.parse(format2));
|
|
441
|
-
}
|
|
442
|
-
/** @internal */
|
|
443
|
-
exports.Format1$outboundSchema = z.object({
|
|
444
|
-
type: z.literal("text"),
|
|
445
|
-
});
|
|
446
|
-
function format1ToJSON(format1) {
|
|
447
|
-
return JSON.stringify(exports.Format1$outboundSchema.parse(format1));
|
|
448
|
-
}
|
|
449
|
-
/** @internal */
|
|
450
|
-
exports.CreateResponseFormat$outboundSchema = z.union([
|
|
451
|
-
z.lazy(() => exports.Format1$outboundSchema),
|
|
452
|
-
z.lazy(() => exports.Format2$outboundSchema),
|
|
453
|
-
z.lazy(() => exports.Format3$outboundSchema),
|
|
454
|
-
]);
|
|
455
|
-
function createResponseFormatToJSON(createResponseFormat) {
|
|
456
|
-
return JSON.stringify(exports.CreateResponseFormat$outboundSchema.parse(createResponseFormat));
|
|
457
|
-
}
|
|
458
|
-
/** @internal */
|
|
459
|
-
exports.CreateResponseText$outboundSchema = z.object({
|
|
460
|
-
format: z.union([
|
|
461
|
-
z.lazy(() => exports.Format1$outboundSchema),
|
|
462
|
-
z.lazy(() => exports.Format2$outboundSchema),
|
|
463
|
-
z.lazy(() => exports.Format3$outboundSchema),
|
|
464
|
-
]),
|
|
465
|
-
});
|
|
466
|
-
function createResponseTextToJSON(createResponseText) {
|
|
467
|
-
return JSON.stringify(exports.CreateResponseText$outboundSchema.parse(createResponseText));
|
|
468
|
-
}
|
|
469
|
-
/** @internal */
|
|
470
|
-
exports.CreateResponse2RouterResponsesRequestRequestBodyInputType$outboundSchema = z.nativeEnum(exports.CreateResponse2RouterResponsesRequestRequestBodyInputType);
|
|
471
|
-
/** @internal */
|
|
472
|
-
exports.CreateResponse23$outboundSchema = z.object({
|
|
473
|
-
type: exports.CreateResponse2RouterResponsesRequestRequestBodyInputType$outboundSchema,
|
|
474
|
-
callId: z.string(),
|
|
475
|
-
id: z.string(),
|
|
476
|
-
name: z.string(),
|
|
477
|
-
arguments: z.string(),
|
|
478
|
-
status: z.string(),
|
|
479
|
-
}).transform((v) => {
|
|
480
|
-
return (0, primitives_js_1.remap)(v, {
|
|
481
|
-
callId: "call_id",
|
|
482
|
-
});
|
|
483
|
-
});
|
|
484
|
-
function createResponse23ToJSON(createResponse23) {
|
|
485
|
-
return JSON.stringify(exports.CreateResponse23$outboundSchema.parse(createResponse23));
|
|
486
|
-
}
|
|
487
|
-
/** @internal */
|
|
488
|
-
exports.CreateResponse2RouterResponsesRequestRequestBodyType$outboundSchema = z.nativeEnum(exports.CreateResponse2RouterResponsesRequestRequestBodyType);
|
|
489
|
-
/** @internal */
|
|
490
|
-
exports.CreateResponse2RouterResponses2$outboundSchema = z.object({
|
|
491
|
-
type: exports.CreateResponse2RouterResponsesRequestRequestBodyType$outboundSchema,
|
|
492
|
-
callId: z.string(),
|
|
493
|
-
output: z.string(),
|
|
494
|
-
}).transform((v) => {
|
|
495
|
-
return (0, primitives_js_1.remap)(v, {
|
|
496
|
-
callId: "call_id",
|
|
497
|
-
});
|
|
498
|
-
});
|
|
499
|
-
function createResponse2RouterResponses2ToJSON(createResponse2RouterResponses2) {
|
|
500
|
-
return JSON.stringify(exports.CreateResponse2RouterResponses2$outboundSchema.parse(createResponse2RouterResponses2));
|
|
501
|
-
}
|
|
502
|
-
/** @internal */
|
|
503
|
-
exports.TwoRole$outboundSchema = z
|
|
504
|
-
.nativeEnum(exports.TwoRole);
|
|
505
|
-
/** @internal */
|
|
506
|
-
exports.Two3$outboundSchema = z.object({
|
|
507
|
-
type: z.literal("input_file"),
|
|
508
|
-
fileData: z.string().optional(),
|
|
509
|
-
fileId: z.string().optional(),
|
|
510
|
-
filename: z.string().optional(),
|
|
511
|
-
fileUrl: z.string().optional(),
|
|
512
|
-
}).transform((v) => {
|
|
513
|
-
return (0, primitives_js_1.remap)(v, {
|
|
514
|
-
fileData: "file_data",
|
|
515
|
-
fileId: "file_id",
|
|
516
|
-
fileUrl: "file_url",
|
|
517
|
-
});
|
|
518
|
-
});
|
|
519
|
-
function two3ToJSON(two3) {
|
|
520
|
-
return JSON.stringify(exports.Two3$outboundSchema.parse(two3));
|
|
521
|
-
}
|
|
522
|
-
/** @internal */
|
|
523
|
-
exports.Detail$outboundSchema = z
|
|
524
|
-
.nativeEnum(exports.Detail);
|
|
525
|
-
/** @internal */
|
|
526
|
-
exports.CreateResponse22$outboundSchema = z.object({
|
|
527
|
-
type: z.literal("input_image"),
|
|
528
|
-
detail: exports.Detail$outboundSchema.default("auto"),
|
|
529
|
-
fileId: z.nullable(z.string()).optional(),
|
|
530
|
-
imageUrl: z.nullable(z.string()).optional(),
|
|
531
|
-
}).transform((v) => {
|
|
532
|
-
return (0, primitives_js_1.remap)(v, {
|
|
533
|
-
fileId: "file_id",
|
|
534
|
-
imageUrl: "image_url",
|
|
535
|
-
});
|
|
536
|
-
});
|
|
537
|
-
function createResponse22ToJSON(createResponse22) {
|
|
538
|
-
return JSON.stringify(exports.CreateResponse22$outboundSchema.parse(createResponse22));
|
|
539
|
-
}
|
|
540
|
-
/** @internal */
|
|
541
|
-
exports.CreateResponse21$outboundSchema = z.object({
|
|
542
|
-
type: z.literal("input_text"),
|
|
543
|
-
text: z.string(),
|
|
544
|
-
});
|
|
545
|
-
function createResponse21ToJSON(createResponse21) {
|
|
546
|
-
return JSON.stringify(exports.CreateResponse21$outboundSchema.parse(createResponse21));
|
|
547
|
-
}
|
|
548
|
-
/** @internal */
|
|
549
|
-
exports.CreateResponseContent2$outboundSchema = z.union([
|
|
550
|
-
z.lazy(() => exports.CreateResponse21$outboundSchema),
|
|
551
|
-
z.lazy(() => exports.CreateResponse22$outboundSchema),
|
|
552
|
-
z.lazy(() => exports.Two3$outboundSchema),
|
|
553
|
-
]);
|
|
554
|
-
function createResponseContent2ToJSON(createResponseContent2) {
|
|
555
|
-
return JSON.stringify(exports.CreateResponseContent2$outboundSchema.parse(createResponseContent2));
|
|
556
|
-
}
|
|
557
|
-
/** @internal */
|
|
558
|
-
exports.TwoContent$outboundSchema = z.union([
|
|
559
|
-
z.string(),
|
|
560
|
-
z.array(z.union([
|
|
561
|
-
z.lazy(() => exports.CreateResponse21$outboundSchema),
|
|
562
|
-
z.lazy(() => exports.CreateResponse22$outboundSchema),
|
|
563
|
-
z.lazy(() => exports.Two3$outboundSchema),
|
|
564
|
-
])),
|
|
565
|
-
]);
|
|
566
|
-
function twoContentToJSON(twoContent) {
|
|
567
|
-
return JSON.stringify(exports.TwoContent$outboundSchema.parse(twoContent));
|
|
568
|
-
}
|
|
569
|
-
/** @internal */
|
|
570
|
-
exports.Two1$outboundSchema = z.object({
|
|
571
|
-
role: exports.TwoRole$outboundSchema,
|
|
572
|
-
content: z.union([
|
|
573
|
-
z.string(),
|
|
574
|
-
z.array(z.union([
|
|
575
|
-
z.lazy(() => exports.CreateResponse21$outboundSchema),
|
|
576
|
-
z.lazy(() => exports.CreateResponse22$outboundSchema),
|
|
577
|
-
z.lazy(() => exports.Two3$outboundSchema),
|
|
578
|
-
])),
|
|
579
|
-
]),
|
|
580
|
-
});
|
|
581
|
-
function two1ToJSON(two1) {
|
|
582
|
-
return JSON.stringify(exports.Two1$outboundSchema.parse(two1));
|
|
583
|
-
}
|
|
584
|
-
/** @internal */
|
|
585
|
-
exports.Input2$outboundSchema = z.union([
|
|
586
|
-
z.lazy(() => exports.CreateResponse23$outboundSchema),
|
|
587
|
-
z.lazy(() => exports.CreateResponse2RouterResponses2$outboundSchema),
|
|
588
|
-
z.lazy(() => exports.Two1$outboundSchema),
|
|
589
|
-
]);
|
|
590
|
-
function input2ToJSON(input2) {
|
|
591
|
-
return JSON.stringify(exports.Input2$outboundSchema.parse(input2));
|
|
592
|
-
}
|
|
593
|
-
/** @internal */
|
|
594
|
-
exports.CreateResponseInput$outboundSchema = z.union([
|
|
595
|
-
z.string(),
|
|
596
|
-
z.array(z.union([
|
|
597
|
-
z.lazy(() => exports.CreateResponse23$outboundSchema),
|
|
598
|
-
z.lazy(() => exports.CreateResponse2RouterResponses2$outboundSchema),
|
|
599
|
-
z.lazy(() => exports.Two1$outboundSchema),
|
|
600
|
-
])),
|
|
601
|
-
]);
|
|
602
|
-
function createResponseInputToJSON(createResponseInput) {
|
|
603
|
-
return JSON.stringify(exports.CreateResponseInput$outboundSchema.parse(createResponseInput));
|
|
604
|
-
}
|
|
605
|
-
/** @internal */
|
|
606
|
-
exports.Include$outboundSchema = z
|
|
607
|
-
.nativeEnum(exports.Include);
|
|
608
|
-
/** @internal */
|
|
609
|
-
exports.ServiceTier$outboundSchema = z
|
|
610
|
-
.nativeEnum(exports.ServiceTier);
|
|
611
|
-
/** @internal */
|
|
612
|
-
exports.Ranker$outboundSchema = z
|
|
613
|
-
.nativeEnum(exports.Ranker);
|
|
614
|
-
/** @internal */
|
|
615
|
-
exports.RankingOptions$outboundSchema = z.object({
|
|
616
|
-
ranker: exports.Ranker$outboundSchema.optional(),
|
|
617
|
-
scoreThreshold: z.number().optional(),
|
|
618
|
-
}).transform((v) => {
|
|
619
|
-
return (0, primitives_js_1.remap)(v, {
|
|
620
|
-
scoreThreshold: "score_threshold",
|
|
621
|
-
});
|
|
622
|
-
});
|
|
623
|
-
function rankingOptionsToJSON(rankingOptions) {
|
|
624
|
-
return JSON.stringify(exports.RankingOptions$outboundSchema.parse(rankingOptions));
|
|
625
|
-
}
|
|
626
|
-
/** @internal */
|
|
627
|
-
exports.Tools4$outboundSchema = z.object({
|
|
628
|
-
type: z.literal("file_search"),
|
|
629
|
-
vectorStoreIds: z.array(z.string()).optional(),
|
|
630
|
-
maxNumResults: z.number().int().optional(),
|
|
631
|
-
filters: z.any().optional(),
|
|
632
|
-
rankingOptions: z.lazy(() => exports.RankingOptions$outboundSchema).optional(),
|
|
633
|
-
}).transform((v) => {
|
|
634
|
-
return (0, primitives_js_1.remap)(v, {
|
|
635
|
-
vectorStoreIds: "vector_store_ids",
|
|
636
|
-
maxNumResults: "max_num_results",
|
|
637
|
-
rankingOptions: "ranking_options",
|
|
638
|
-
});
|
|
639
|
-
});
|
|
640
|
-
function tools4ToJSON(tools4) {
|
|
641
|
-
return JSON.stringify(exports.Tools4$outboundSchema.parse(tools4));
|
|
642
|
-
}
|
|
643
|
-
/** @internal */
|
|
644
|
-
exports.ToolsSearchContextSize$outboundSchema = z.nativeEnum(exports.ToolsSearchContextSize);
|
|
645
|
-
/** @internal */
|
|
646
|
-
exports.CreateResponseToolsRouterResponsesRequestRequestBodyType$outboundSchema = z.nativeEnum(exports.CreateResponseToolsRouterResponsesRequestRequestBodyType);
|
|
647
|
-
/** @internal */
|
|
648
|
-
exports.ToolsUserLocation$outboundSchema = z.object({
|
|
649
|
-
type: exports.CreateResponseToolsRouterResponsesRequestRequestBodyType$outboundSchema
|
|
650
|
-
.optional(),
|
|
651
|
-
city: z.nullable(z.string()).optional(),
|
|
652
|
-
country: z.string().optional(),
|
|
653
|
-
region: z.nullable(z.string()).optional(),
|
|
654
|
-
timezone: z.nullable(z.string()).optional(),
|
|
655
|
-
});
|
|
656
|
-
function toolsUserLocationToJSON(toolsUserLocation) {
|
|
657
|
-
return JSON.stringify(exports.ToolsUserLocation$outboundSchema.parse(toolsUserLocation));
|
|
658
|
-
}
|
|
659
|
-
/** @internal */
|
|
660
|
-
exports.Filters$outboundSchema = z.object({
|
|
661
|
-
allowedDomains: z.nullable(z.array(z.string())).optional(),
|
|
662
|
-
}).transform((v) => {
|
|
663
|
-
return (0, primitives_js_1.remap)(v, {
|
|
664
|
-
allowedDomains: "allowed_domains",
|
|
665
|
-
});
|
|
666
|
-
});
|
|
667
|
-
function filtersToJSON(filters) {
|
|
668
|
-
return JSON.stringify(exports.Filters$outboundSchema.parse(filters));
|
|
669
|
-
}
|
|
670
|
-
/** @internal */
|
|
671
|
-
exports.Tools3$outboundSchema = z.object({
|
|
672
|
-
type: z.literal("web_search"),
|
|
673
|
-
searchContextSize: exports.ToolsSearchContextSize$outboundSchema.optional(),
|
|
674
|
-
userLocation: z.lazy(() => exports.ToolsUserLocation$outboundSchema).optional(),
|
|
675
|
-
filters: z.nullable(z.lazy(() => exports.Filters$outboundSchema)).optional(),
|
|
676
|
-
}).transform((v) => {
|
|
677
|
-
return (0, primitives_js_1.remap)(v, {
|
|
678
|
-
searchContextSize: "search_context_size",
|
|
679
|
-
userLocation: "user_location",
|
|
680
|
-
});
|
|
681
|
-
});
|
|
682
|
-
function tools3ToJSON(tools3) {
|
|
683
|
-
return JSON.stringify(exports.Tools3$outboundSchema.parse(tools3));
|
|
684
|
-
}
|
|
685
|
-
/** @internal */
|
|
686
|
-
exports.SearchContextSize$outboundSchema = z.nativeEnum(exports.SearchContextSize);
|
|
687
|
-
/** @internal */
|
|
688
|
-
exports.CreateResponseToolsRouterResponsesType$outboundSchema = z.nativeEnum(exports.CreateResponseToolsRouterResponsesType);
|
|
689
|
-
/** @internal */
|
|
690
|
-
exports.UserLocation$outboundSchema = z.object({
|
|
691
|
-
type: exports.CreateResponseToolsRouterResponsesType$outboundSchema.optional(),
|
|
692
|
-
city: z.nullable(z.string()).optional(),
|
|
693
|
-
country: z.string().optional(),
|
|
694
|
-
region: z.nullable(z.string()).optional(),
|
|
695
|
-
timezone: z.nullable(z.string()).optional(),
|
|
696
|
-
});
|
|
697
|
-
function userLocationToJSON(userLocation) {
|
|
698
|
-
return JSON.stringify(exports.UserLocation$outboundSchema.parse(userLocation));
|
|
699
|
-
}
|
|
700
|
-
/** @internal */
|
|
701
|
-
exports.Tools2$outboundSchema = z.object({
|
|
702
|
-
type: z.literal("web_search_preview"),
|
|
703
|
-
domains: z.array(z.string()).optional(),
|
|
704
|
-
searchContextSize: exports.SearchContextSize$outboundSchema.optional(),
|
|
705
|
-
userLocation: z.lazy(() => exports.UserLocation$outboundSchema).optional(),
|
|
706
|
-
}).transform((v) => {
|
|
707
|
-
return (0, primitives_js_1.remap)(v, {
|
|
708
|
-
searchContextSize: "search_context_size",
|
|
709
|
-
userLocation: "user_location",
|
|
710
|
-
});
|
|
711
|
-
});
|
|
712
|
-
function tools2ToJSON(tools2) {
|
|
713
|
-
return JSON.stringify(exports.Tools2$outboundSchema.parse(tools2));
|
|
714
|
-
}
|
|
715
|
-
/** @internal */
|
|
716
|
-
exports.Tools1$outboundSchema = z.object({
|
|
717
|
-
type: z.literal("function"),
|
|
718
|
-
name: z.string(),
|
|
719
|
-
description: z.nullable(z.string()).optional(),
|
|
720
|
-
parameters: z.nullable(z.record(z.any())).optional(),
|
|
721
|
-
strict: z.nullable(z.boolean().default(true)),
|
|
722
|
-
});
|
|
723
|
-
function tools1ToJSON(tools1) {
|
|
724
|
-
return JSON.stringify(exports.Tools1$outboundSchema.parse(tools1));
|
|
725
|
-
}
|
|
726
|
-
/** @internal */
|
|
727
|
-
exports.CreateResponseTools$outboundSchema = z.union([
|
|
728
|
-
z.lazy(() => exports.Tools1$outboundSchema),
|
|
729
|
-
z.lazy(() => exports.Tools2$outboundSchema),
|
|
730
|
-
z.lazy(() => exports.Tools3$outboundSchema),
|
|
731
|
-
z.lazy(() => exports.Tools4$outboundSchema),
|
|
732
|
-
]);
|
|
733
|
-
function createResponseToolsToJSON(createResponseTools) {
|
|
734
|
-
return JSON.stringify(exports.CreateResponseTools$outboundSchema.parse(createResponseTools));
|
|
735
|
-
}
|
|
736
|
-
/** @internal */
|
|
737
|
-
exports.CreateResponseToolChoiceRouterResponsesRequestType$outboundSchema = z
|
|
738
|
-
.nativeEnum(exports.CreateResponseToolChoiceRouterResponsesRequestType);
|
|
739
|
-
/** @internal */
|
|
740
|
-
exports.ToolChoice4$outboundSchema = z.object({
|
|
741
|
-
type: exports.CreateResponseToolChoiceRouterResponsesRequestType$outboundSchema,
|
|
742
|
-
serverLabel: z.string(),
|
|
743
|
-
name: z.nullable(z.string()).optional(),
|
|
744
|
-
}).transform((v) => {
|
|
745
|
-
return (0, primitives_js_1.remap)(v, {
|
|
746
|
-
serverLabel: "server_label",
|
|
747
|
-
});
|
|
748
|
-
});
|
|
749
|
-
function toolChoice4ToJSON(toolChoice4) {
|
|
750
|
-
return JSON.stringify(exports.ToolChoice4$outboundSchema.parse(toolChoice4));
|
|
751
|
-
}
|
|
752
|
-
/** @internal */
|
|
753
|
-
exports.CreateResponseToolChoiceRouterResponsesType$outboundSchema = z
|
|
754
|
-
.nativeEnum(exports.CreateResponseToolChoiceRouterResponsesType);
|
|
755
|
-
/** @internal */
|
|
756
|
-
exports.ToolChoice3$outboundSchema = z.object({
|
|
757
|
-
type: exports.CreateResponseToolChoiceRouterResponsesType$outboundSchema,
|
|
758
|
-
name: z.string(),
|
|
759
|
-
});
|
|
760
|
-
function toolChoice3ToJSON(toolChoice3) {
|
|
761
|
-
return JSON.stringify(exports.ToolChoice3$outboundSchema.parse(toolChoice3));
|
|
762
|
-
}
|
|
763
|
-
/** @internal */
|
|
764
|
-
exports.CreateResponseToolChoiceType$outboundSchema = z.nativeEnum(exports.CreateResponseToolChoiceType);
|
|
765
|
-
/** @internal */
|
|
766
|
-
exports.CreateResponseToolChoice2$outboundSchema = z.object({
|
|
767
|
-
type: exports.CreateResponseToolChoiceType$outboundSchema,
|
|
768
|
-
});
|
|
769
|
-
function createResponseToolChoice2ToJSON(createResponseToolChoice2) {
|
|
770
|
-
return JSON.stringify(exports.CreateResponseToolChoice2$outboundSchema.parse(createResponseToolChoice2));
|
|
771
|
-
}
|
|
772
|
-
/** @internal */
|
|
773
|
-
exports.CreateResponseToolChoice1$outboundSchema = z.nativeEnum(exports.CreateResponseToolChoice1);
|
|
774
|
-
/** @internal */
|
|
775
|
-
exports.CreateResponseToolChoice$outboundSchema = z.union([
|
|
776
|
-
z.lazy(() => exports.ToolChoice3$outboundSchema),
|
|
777
|
-
z.lazy(() => exports.ToolChoice4$outboundSchema),
|
|
778
|
-
z.lazy(() => exports.CreateResponseToolChoice2$outboundSchema),
|
|
779
|
-
exports.CreateResponseToolChoice1$outboundSchema,
|
|
780
|
-
]);
|
|
781
|
-
function createResponseToolChoiceToJSON(createResponseToolChoice) {
|
|
782
|
-
return JSON.stringify(exports.CreateResponseToolChoice$outboundSchema.parse(createResponseToolChoice));
|
|
783
|
-
}
|
|
784
|
-
/** @internal */
|
|
785
|
-
exports.CreateResponseRequestBody$outboundSchema = z.object({
|
|
786
|
-
model: z.string(),
|
|
787
|
-
metadata: z.record(z.string()).optional(),
|
|
788
|
-
temperature: z.nullable(z.number()).optional(),
|
|
789
|
-
topP: z.nullable(z.number()).optional(),
|
|
790
|
-
previousResponseId: z.nullable(z.string()).optional(),
|
|
791
|
-
instructions: z.nullable(z.string()).optional(),
|
|
792
|
-
reasoning: z.nullable(z.lazy(() => exports.Reasoning$outboundSchema)).optional(),
|
|
793
|
-
thinking: z.nullable(z.union([
|
|
794
|
-
components.ThinkingConfigDisabledSchema$outboundSchema,
|
|
795
|
-
components.ThinkingConfigEnabledSchema$outboundSchema,
|
|
796
|
-
components.ThinkingConfigAdaptiveSchema$outboundSchema,
|
|
797
|
-
])).optional(),
|
|
798
|
-
maxOutputTokens: z.nullable(z.number().int()).optional(),
|
|
799
|
-
text: z.nullable(z.lazy(() => exports.CreateResponseText$outboundSchema)).optional(),
|
|
800
|
-
input: z.union([
|
|
801
|
-
z.string(),
|
|
802
|
-
z.array(z.union([
|
|
803
|
-
z.lazy(() => exports.CreateResponse23$outboundSchema),
|
|
804
|
-
z.lazy(() => exports.CreateResponse2RouterResponses2$outboundSchema),
|
|
805
|
-
z.lazy(() => exports.Two1$outboundSchema),
|
|
806
|
-
])),
|
|
807
|
-
]),
|
|
808
|
-
include: z.nullable(z.array(exports.Include$outboundSchema)).optional(),
|
|
809
|
-
parallelToolCalls: z.nullable(z.boolean()).optional(),
|
|
810
|
-
store: z.nullable(z.boolean()).optional(),
|
|
811
|
-
serviceTier: z.nullable(exports.ServiceTier$outboundSchema).optional(),
|
|
812
|
-
tools: z.array(z.union([
|
|
813
|
-
z.lazy(() => exports.Tools1$outboundSchema),
|
|
814
|
-
z.lazy(() => exports.Tools2$outboundSchema),
|
|
815
|
-
z.lazy(() => exports.Tools3$outboundSchema),
|
|
816
|
-
z.lazy(() => exports.Tools4$outboundSchema),
|
|
817
|
-
])).optional(),
|
|
818
|
-
toolChoice: z.union([
|
|
819
|
-
z.lazy(() => exports.ToolChoice3$outboundSchema),
|
|
820
|
-
z.lazy(() => exports.ToolChoice4$outboundSchema),
|
|
821
|
-
z.lazy(() => exports.CreateResponseToolChoice2$outboundSchema),
|
|
822
|
-
exports.CreateResponseToolChoice1$outboundSchema,
|
|
823
|
-
]).optional(),
|
|
824
|
-
stream: z.boolean().default(false),
|
|
825
|
-
}).transform((v) => {
|
|
826
|
-
return (0, primitives_js_1.remap)(v, {
|
|
827
|
-
topP: "top_p",
|
|
828
|
-
previousResponseId: "previous_response_id",
|
|
829
|
-
maxOutputTokens: "max_output_tokens",
|
|
830
|
-
parallelToolCalls: "parallel_tool_calls",
|
|
831
|
-
serviceTier: "service_tier",
|
|
832
|
-
toolChoice: "tool_choice",
|
|
833
|
-
});
|
|
834
|
-
});
|
|
835
|
-
function createResponseRequestBodyToJSON(createResponseRequestBody) {
|
|
836
|
-
return JSON.stringify(exports.CreateResponseRequestBody$outboundSchema.parse(createResponseRequestBody));
|
|
837
|
-
}
|
|
838
|
-
/** @internal */
|
|
839
|
-
exports.CreateResponseData$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
|
|
840
|
-
type: z.string(),
|
|
841
|
-
}).catchall(z.any()), "additionalProperties", true);
|
|
842
|
-
function createResponseDataFromJSON(jsonString) {
|
|
843
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseData' from JSON`);
|
|
844
|
-
}
|
|
845
|
-
/** @internal */
|
|
846
|
-
exports.CreateResponseRouterResponsesResponseBody$inboundSchema = z.object({
|
|
847
|
-
data: z.string().optional().transform((v, ctx) => {
|
|
848
|
-
if (v === undefined)
|
|
849
|
-
return undefined;
|
|
850
|
-
try {
|
|
851
|
-
return JSON.parse(v);
|
|
852
|
-
}
|
|
853
|
-
catch (err) {
|
|
854
|
-
ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
|
|
855
|
-
return z.NEVER;
|
|
856
|
-
}
|
|
857
|
-
}).pipe(z.lazy(() => exports.CreateResponseData$inboundSchema).optional()),
|
|
858
|
-
});
|
|
859
|
-
function createResponseRouterResponsesResponseBodyFromJSON(jsonString) {
|
|
860
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseRouterResponsesResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseRouterResponsesResponseBody' from JSON`);
|
|
861
|
-
}
|
|
862
|
-
/** @internal */
|
|
863
|
-
exports.CreateResponseObject$inboundSchema = z.nativeEnum(exports.CreateResponseObject);
|
|
864
|
-
/** @internal */
|
|
865
|
-
exports.CreateResponseStatus$inboundSchema = z.nativeEnum(exports.CreateResponseStatus);
|
|
866
|
-
/** @internal */
|
|
867
|
-
exports.ErrorT$inboundSchema = z
|
|
868
|
-
.object({
|
|
869
|
-
code: z.string(),
|
|
870
|
-
message: z.string(),
|
|
871
|
-
});
|
|
872
|
-
function errorFromJSON(jsonString) {
|
|
873
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ErrorT$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorT' from JSON`);
|
|
874
|
-
}
|
|
875
|
-
/** @internal */
|
|
876
|
-
exports.Reason$inboundSchema = z
|
|
877
|
-
.nativeEnum(exports.Reason);
|
|
878
|
-
/** @internal */
|
|
879
|
-
exports.IncompleteDetails$inboundSchema = z.object({
|
|
880
|
-
reason: exports.Reason$inboundSchema,
|
|
881
|
-
});
|
|
882
|
-
function incompleteDetailsFromJSON(jsonString) {
|
|
883
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.IncompleteDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IncompleteDetails' from JSON`);
|
|
884
|
-
}
|
|
885
|
-
/** @internal */
|
|
886
|
-
exports.CreateResponseOutputRouterResponsesResponse200ApplicationJSONResponseBody5Type$inboundSchema = z.nativeEnum(exports.CreateResponseOutputRouterResponsesResponse200ApplicationJSONResponseBody5Type);
|
|
887
|
-
/** @internal */
|
|
888
|
-
exports.OutputSummary$inboundSchema = z.object({
|
|
889
|
-
type: exports.CreateResponseOutputRouterResponsesResponse200ApplicationJSONResponseBody5Type$inboundSchema,
|
|
890
|
-
text: z.string(),
|
|
891
|
-
});
|
|
892
|
-
function outputSummaryFromJSON(jsonString) {
|
|
893
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.OutputSummary$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputSummary' from JSON`);
|
|
894
|
-
}
|
|
895
|
-
/** @internal */
|
|
896
|
-
exports.CreateResponseOutputRouterResponsesResponse200Status$inboundSchema = z.nativeEnum(exports.CreateResponseOutputRouterResponsesResponse200Status);
|
|
897
|
-
/** @internal */
|
|
898
|
-
exports.Five$inboundSchema = z
|
|
899
|
-
.object({
|
|
900
|
-
id: z.string(),
|
|
901
|
-
type: z.literal("reasoning"),
|
|
902
|
-
summary: z.array(z.lazy(() => exports.OutputSummary$inboundSchema)).optional(),
|
|
903
|
-
encrypted_content: z.nullable(z.string()).optional(),
|
|
904
|
-
status: exports.CreateResponseOutputRouterResponsesResponse200Status$inboundSchema
|
|
905
|
-
.optional(),
|
|
906
|
-
}).transform((v) => {
|
|
907
|
-
return (0, primitives_js_1.remap)(v, {
|
|
908
|
-
"encrypted_content": "encryptedContent",
|
|
909
|
-
});
|
|
910
|
-
});
|
|
911
|
-
function fiveFromJSON(jsonString) {
|
|
912
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Five$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Five' from JSON`);
|
|
913
|
-
}
|
|
914
|
-
/** @internal */
|
|
915
|
-
exports.CreateResponseOutputRouterResponsesResponseStatus$inboundSchema = z
|
|
916
|
-
.nativeEnum(exports.CreateResponseOutputRouterResponsesResponseStatus);
|
|
917
|
-
/** @internal */
|
|
918
|
-
exports.Output4$inboundSchema = z.object({
|
|
919
|
-
id: z.string(),
|
|
920
|
-
type: z.literal("function_call"),
|
|
921
|
-
call_id: z.string(),
|
|
922
|
-
name: z.string(),
|
|
923
|
-
arguments: z.string(),
|
|
924
|
-
status: exports.CreateResponseOutputRouterResponsesResponseStatus$inboundSchema,
|
|
925
|
-
}).transform((v) => {
|
|
926
|
-
return (0, primitives_js_1.remap)(v, {
|
|
927
|
-
"call_id": "callId",
|
|
928
|
-
});
|
|
929
|
-
});
|
|
930
|
-
function output4FromJSON(jsonString) {
|
|
931
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Output4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Output4' from JSON`);
|
|
932
|
-
}
|
|
933
|
-
/** @internal */
|
|
934
|
-
exports.CreateResponseOutputRouterResponsesStatus$inboundSchema = z
|
|
935
|
-
.nativeEnum(exports.CreateResponseOutputRouterResponsesStatus);
|
|
936
|
-
/** @internal */
|
|
937
|
-
exports.Output3$inboundSchema = z.object({
|
|
938
|
-
id: z.string(),
|
|
939
|
-
type: z.literal("file_search_call"),
|
|
940
|
-
status: exports.CreateResponseOutputRouterResponsesStatus$inboundSchema,
|
|
941
|
-
queries: z.array(z.string()).optional(),
|
|
942
|
-
results: z.any().optional(),
|
|
943
|
-
});
|
|
944
|
-
function output3FromJSON(jsonString) {
|
|
945
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Output3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Output3' from JSON`);
|
|
946
|
-
}
|
|
947
|
-
/** @internal */
|
|
948
|
-
exports.CreateResponseOutputStatus$inboundSchema = z.nativeEnum(exports.CreateResponseOutputStatus);
|
|
949
|
-
/** @internal */
|
|
950
|
-
exports.CreateResponseOutputRouterResponsesResponse200ApplicationJSONResponseBodyType$inboundSchema = z.nativeEnum(exports.CreateResponseOutputRouterResponsesResponse200ApplicationJSONResponseBodyType);
|
|
951
|
-
/** @internal */
|
|
952
|
-
exports.Sources$inboundSchema = z.object({
|
|
953
|
-
url: z.string(),
|
|
954
|
-
title: z.string(),
|
|
955
|
-
});
|
|
956
|
-
function sourcesFromJSON(jsonString) {
|
|
957
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Sources$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Sources' from JSON`);
|
|
958
|
-
}
|
|
959
|
-
/** @internal */
|
|
960
|
-
exports.Action$inboundSchema = z
|
|
961
|
-
.object({
|
|
962
|
-
type: exports.CreateResponseOutputRouterResponsesResponse200ApplicationJSONResponseBodyType$inboundSchema,
|
|
963
|
-
query: z.string().optional(),
|
|
964
|
-
url: z.string().optional(),
|
|
965
|
-
pattern: z.string().optional(),
|
|
966
|
-
sources: z.array(z.lazy(() => exports.Sources$inboundSchema)).optional(),
|
|
967
|
-
});
|
|
968
|
-
function actionFromJSON(jsonString) {
|
|
969
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Action$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Action' from JSON`);
|
|
970
|
-
}
|
|
971
|
-
/** @internal */
|
|
972
|
-
exports.Output2$inboundSchema = z.object({
|
|
973
|
-
id: z.string(),
|
|
974
|
-
type: z.literal("web_search_call"),
|
|
975
|
-
status: exports.CreateResponseOutputStatus$inboundSchema,
|
|
976
|
-
action: z.lazy(() => exports.Action$inboundSchema).optional(),
|
|
977
|
-
});
|
|
978
|
-
function output2FromJSON(jsonString) {
|
|
979
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Output2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Output2' from JSON`);
|
|
980
|
-
}
|
|
981
|
-
/** @internal */
|
|
982
|
-
exports.OutputRole$inboundSchema = z
|
|
983
|
-
.nativeEnum(exports.OutputRole);
|
|
984
|
-
/** @internal */
|
|
985
|
-
exports.OutputStatus$inboundSchema = z.nativeEnum(exports.OutputStatus);
|
|
986
|
-
/** @internal */
|
|
987
|
-
exports.CreateResponseContentRouterResponses2$inboundSchema = z.object({
|
|
988
|
-
type: z.literal("refusal"),
|
|
989
|
-
refusal: z.string(),
|
|
990
|
-
});
|
|
991
|
-
function createResponseContentRouterResponses2FromJSON(jsonString) {
|
|
992
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseContentRouterResponses2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseContentRouterResponses2' from JSON`);
|
|
993
|
-
}
|
|
994
|
-
/** @internal */
|
|
995
|
-
exports.Annotations2$inboundSchema = z.object({
|
|
996
|
-
type: z.literal("file_citation"),
|
|
997
|
-
index: z.number(),
|
|
998
|
-
file_id: z.string(),
|
|
999
|
-
filename: z.string(),
|
|
1000
|
-
}).transform((v) => {
|
|
1001
|
-
return (0, primitives_js_1.remap)(v, {
|
|
1002
|
-
"file_id": "fileId",
|
|
1003
|
-
});
|
|
1004
|
-
});
|
|
1005
|
-
function annotations2FromJSON(jsonString) {
|
|
1006
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Annotations2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Annotations2' from JSON`);
|
|
1007
|
-
}
|
|
1008
|
-
/** @internal */
|
|
1009
|
-
exports.Annotations1$inboundSchema = z.object({
|
|
1010
|
-
type: z.literal("url_citation"),
|
|
1011
|
-
start_index: z.number(),
|
|
1012
|
-
end_index: z.number(),
|
|
1013
|
-
url: z.string(),
|
|
1014
|
-
title: z.string(),
|
|
1015
|
-
text: z.string().optional(),
|
|
1016
|
-
}).transform((v) => {
|
|
1017
|
-
return (0, primitives_js_1.remap)(v, {
|
|
1018
|
-
"start_index": "startIndex",
|
|
1019
|
-
"end_index": "endIndex",
|
|
1020
|
-
});
|
|
1021
|
-
});
|
|
1022
|
-
function annotations1FromJSON(jsonString) {
|
|
1023
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Annotations1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Annotations1' from JSON`);
|
|
1024
|
-
}
|
|
1025
|
-
/** @internal */
|
|
1026
|
-
exports.ContentAnnotations$inboundSchema = z.union([
|
|
1027
|
-
z.lazy(() => exports.Annotations1$inboundSchema),
|
|
1028
|
-
z.lazy(() => exports.Annotations2$inboundSchema),
|
|
1029
|
-
]);
|
|
1030
|
-
function contentAnnotationsFromJSON(jsonString) {
|
|
1031
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ContentAnnotations$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ContentAnnotations' from JSON`);
|
|
1032
|
-
}
|
|
1033
|
-
/** @internal */
|
|
1034
|
-
exports.Content1$inboundSchema = z.object({
|
|
1035
|
-
type: z.literal("output_text"),
|
|
1036
|
-
text: z.string(),
|
|
1037
|
-
annotations: z.array(z.union([
|
|
1038
|
-
z.lazy(() => exports.Annotations1$inboundSchema),
|
|
1039
|
-
z.lazy(() => exports.Annotations2$inboundSchema),
|
|
1040
|
-
])).optional(),
|
|
1041
|
-
logprobs: z.nullable(z.array(z.any())).optional(),
|
|
1042
|
-
});
|
|
1043
|
-
function content1FromJSON(jsonString) {
|
|
1044
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Content1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Content1' from JSON`);
|
|
1045
|
-
}
|
|
1046
|
-
/** @internal */
|
|
1047
|
-
exports.OutputContent$inboundSchema = z.union([
|
|
1048
|
-
z.lazy(() => exports.Content1$inboundSchema),
|
|
1049
|
-
z.lazy(() => exports.CreateResponseContentRouterResponses2$inboundSchema),
|
|
1050
|
-
]);
|
|
1051
|
-
function outputContentFromJSON(jsonString) {
|
|
1052
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.OutputContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputContent' from JSON`);
|
|
1053
|
-
}
|
|
1054
|
-
/** @internal */
|
|
1055
|
-
exports.Output1$inboundSchema = z.object({
|
|
1056
|
-
id: z.string(),
|
|
1057
|
-
type: z.literal("message"),
|
|
1058
|
-
role: exports.OutputRole$inboundSchema,
|
|
1059
|
-
status: exports.OutputStatus$inboundSchema,
|
|
1060
|
-
content: z.array(z.union([
|
|
1061
|
-
z.lazy(() => exports.Content1$inboundSchema),
|
|
1062
|
-
z.lazy(() => exports.CreateResponseContentRouterResponses2$inboundSchema),
|
|
1063
|
-
])).optional(),
|
|
1064
|
-
});
|
|
1065
|
-
function output1FromJSON(jsonString) {
|
|
1066
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Output1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Output1' from JSON`);
|
|
1067
|
-
}
|
|
1068
|
-
/** @internal */
|
|
1069
|
-
exports.Output$inboundSchema = z
|
|
1070
|
-
.union([
|
|
1071
|
-
z.lazy(() => exports.Output1$inboundSchema),
|
|
1072
|
-
z.lazy(() => exports.Output2$inboundSchema),
|
|
1073
|
-
z.lazy(() => exports.Output3$inboundSchema),
|
|
1074
|
-
z.lazy(() => exports.Output4$inboundSchema),
|
|
1075
|
-
z.lazy(() => exports.Five$inboundSchema),
|
|
1076
|
-
]);
|
|
1077
|
-
function outputFromJSON(jsonString) {
|
|
1078
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Output$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Output' from JSON`);
|
|
1079
|
-
}
|
|
1080
|
-
/** @internal */
|
|
1081
|
-
exports.CreateResponseInputTokensDetails$inboundSchema = z.object({
|
|
1082
|
-
cached_tokens: z.number().int().optional(),
|
|
1083
|
-
}).transform((v) => {
|
|
1084
|
-
return (0, primitives_js_1.remap)(v, {
|
|
1085
|
-
"cached_tokens": "cachedTokens",
|
|
1086
|
-
});
|
|
1087
|
-
});
|
|
1088
|
-
function createResponseInputTokensDetailsFromJSON(jsonString) {
|
|
1089
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseInputTokensDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseInputTokensDetails' from JSON`);
|
|
1090
|
-
}
|
|
1091
|
-
/** @internal */
|
|
1092
|
-
exports.OutputTokensDetails$inboundSchema = z.object({
|
|
1093
|
-
reasoning_tokens: z.number().int().optional(),
|
|
1094
|
-
accepted_prediction_tokens: z.number().int().optional(),
|
|
1095
|
-
rejected_prediction_tokens: z.number().int().optional(),
|
|
1096
|
-
}).transform((v) => {
|
|
1097
|
-
return (0, primitives_js_1.remap)(v, {
|
|
1098
|
-
"reasoning_tokens": "reasoningTokens",
|
|
1099
|
-
"accepted_prediction_tokens": "acceptedPredictionTokens",
|
|
1100
|
-
"rejected_prediction_tokens": "rejectedPredictionTokens",
|
|
1101
|
-
});
|
|
1102
|
-
});
|
|
1103
|
-
function outputTokensDetailsFromJSON(jsonString) {
|
|
1104
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.OutputTokensDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputTokensDetails' from JSON`);
|
|
1105
|
-
}
|
|
1106
|
-
/** @internal */
|
|
1107
|
-
exports.CreateResponseUsage$inboundSchema = z.object({
|
|
1108
|
-
input_tokens: z.number().optional(),
|
|
1109
|
-
output_tokens: z.number().optional(),
|
|
1110
|
-
total_tokens: z.number().optional(),
|
|
1111
|
-
input_tokens_details: z.lazy(() => exports.CreateResponseInputTokensDetails$inboundSchema).optional(),
|
|
1112
|
-
output_tokens_details: z.lazy(() => exports.OutputTokensDetails$inboundSchema)
|
|
1113
|
-
.optional(),
|
|
1114
|
-
}).transform((v) => {
|
|
1115
|
-
return (0, primitives_js_1.remap)(v, {
|
|
1116
|
-
"input_tokens": "inputTokens",
|
|
1117
|
-
"output_tokens": "outputTokens",
|
|
1118
|
-
"total_tokens": "totalTokens",
|
|
1119
|
-
"input_tokens_details": "inputTokensDetails",
|
|
1120
|
-
"output_tokens_details": "outputTokensDetails",
|
|
1121
|
-
});
|
|
1122
|
-
});
|
|
1123
|
-
function createResponseUsageFromJSON(jsonString) {
|
|
1124
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseUsage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseUsage' from JSON`);
|
|
1125
|
-
}
|
|
1126
|
-
/** @internal */
|
|
1127
|
-
exports.CreateResponseToolChoiceRouterResponsesResponseType$inboundSchema = z.nativeEnum(exports.CreateResponseToolChoiceRouterResponsesResponseType);
|
|
1128
|
-
/** @internal */
|
|
1129
|
-
exports.CreateResponseToolChoiceFunction$inboundSchema = z.object({
|
|
1130
|
-
name: z.string(),
|
|
1131
|
-
});
|
|
1132
|
-
function createResponseToolChoiceFunctionFromJSON(jsonString) {
|
|
1133
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseToolChoiceFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseToolChoiceFunction' from JSON`);
|
|
1134
|
-
}
|
|
1135
|
-
/** @internal */
|
|
1136
|
-
exports.CreateResponseToolChoiceRouterResponses2$inboundSchema = z.object({
|
|
1137
|
-
type: exports.CreateResponseToolChoiceRouterResponsesResponseType$inboundSchema,
|
|
1138
|
-
function: z.lazy(() => exports.CreateResponseToolChoiceFunction$inboundSchema),
|
|
1139
|
-
});
|
|
1140
|
-
function createResponseToolChoiceRouterResponses2FromJSON(jsonString) {
|
|
1141
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseToolChoiceRouterResponses2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseToolChoiceRouterResponses2' from JSON`);
|
|
1142
|
-
}
|
|
1143
|
-
/** @internal */
|
|
1144
|
-
exports.CreateResponseToolChoiceRouterResponses1$inboundSchema = z
|
|
1145
|
-
.nativeEnum(exports.CreateResponseToolChoiceRouterResponses1);
|
|
1146
|
-
/** @internal */
|
|
1147
|
-
exports.CreateResponseRouterResponsesToolChoice$inboundSchema = z.union([
|
|
1148
|
-
z.lazy(() => exports.CreateResponseToolChoiceRouterResponses2$inboundSchema),
|
|
1149
|
-
exports.CreateResponseToolChoiceRouterResponses1$inboundSchema,
|
|
1150
|
-
]);
|
|
1151
|
-
function createResponseRouterResponsesToolChoiceFromJSON(jsonString) {
|
|
1152
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseRouterResponsesToolChoice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseRouterResponsesToolChoice' from JSON`);
|
|
1153
|
-
}
|
|
1154
|
-
/** @internal */
|
|
1155
|
-
exports.ToolsRanker$inboundSchema = z
|
|
1156
|
-
.nativeEnum(exports.ToolsRanker);
|
|
1157
|
-
/** @internal */
|
|
1158
|
-
exports.ToolsRankingOptions$inboundSchema = z.object({
|
|
1159
|
-
ranker: exports.ToolsRanker$inboundSchema.optional(),
|
|
1160
|
-
score_threshold: z.number().optional(),
|
|
1161
|
-
}).transform((v) => {
|
|
1162
|
-
return (0, primitives_js_1.remap)(v, {
|
|
1163
|
-
"score_threshold": "scoreThreshold",
|
|
1164
|
-
});
|
|
1165
|
-
});
|
|
1166
|
-
function toolsRankingOptionsFromJSON(jsonString) {
|
|
1167
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ToolsRankingOptions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ToolsRankingOptions' from JSON`);
|
|
1168
|
-
}
|
|
1169
|
-
/** @internal */
|
|
1170
|
-
exports.CreateResponseTools4$inboundSchema = z.object({
|
|
1171
|
-
type: z.literal("file_search"),
|
|
1172
|
-
vector_store_ids: z.array(z.string()).optional(),
|
|
1173
|
-
max_num_results: z.number().int().optional(),
|
|
1174
|
-
filters: z.any().optional(),
|
|
1175
|
-
ranking_options: z.lazy(() => exports.ToolsRankingOptions$inboundSchema).optional(),
|
|
1176
|
-
}).transform((v) => {
|
|
1177
|
-
return (0, primitives_js_1.remap)(v, {
|
|
1178
|
-
"vector_store_ids": "vectorStoreIds",
|
|
1179
|
-
"max_num_results": "maxNumResults",
|
|
1180
|
-
"ranking_options": "rankingOptions",
|
|
1181
|
-
});
|
|
1182
|
-
});
|
|
1183
|
-
function createResponseTools4FromJSON(jsonString) {
|
|
1184
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseTools4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseTools4' from JSON`);
|
|
1185
|
-
}
|
|
1186
|
-
/** @internal */
|
|
1187
|
-
exports.CreateResponseToolsRouterResponsesSearchContextSize$inboundSchema = z.nativeEnum(exports.CreateResponseToolsRouterResponsesSearchContextSize);
|
|
1188
|
-
/** @internal */
|
|
1189
|
-
exports.CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody3Type$inboundSchema = z.nativeEnum(exports.CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody3Type);
|
|
1190
|
-
/** @internal */
|
|
1191
|
-
exports.CreateResponseToolsRouterResponsesUserLocation$inboundSchema = z.object({
|
|
1192
|
-
type: exports.CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody3Type$inboundSchema
|
|
1193
|
-
.optional(),
|
|
1194
|
-
city: z.nullable(z.string()).optional(),
|
|
1195
|
-
country: z.string().optional(),
|
|
1196
|
-
region: z.nullable(z.string()).optional(),
|
|
1197
|
-
timezone: z.nullable(z.string()).optional(),
|
|
1198
|
-
});
|
|
1199
|
-
function createResponseToolsRouterResponsesUserLocationFromJSON(jsonString) {
|
|
1200
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseToolsRouterResponsesUserLocation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseToolsRouterResponsesUserLocation' from JSON`);
|
|
1201
|
-
}
|
|
1202
|
-
/** @internal */
|
|
1203
|
-
exports.ToolsFilters$inboundSchema = z.object({
|
|
1204
|
-
allowed_domains: z.nullable(z.array(z.string())).optional(),
|
|
1205
|
-
}).transform((v) => {
|
|
1206
|
-
return (0, primitives_js_1.remap)(v, {
|
|
1207
|
-
"allowed_domains": "allowedDomains",
|
|
1208
|
-
});
|
|
1209
|
-
});
|
|
1210
|
-
function toolsFiltersFromJSON(jsonString) {
|
|
1211
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ToolsFilters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ToolsFilters' from JSON`);
|
|
1212
|
-
}
|
|
1213
|
-
/** @internal */
|
|
1214
|
-
exports.CreateResponseTools3$inboundSchema = z.object({
|
|
1215
|
-
type: z.literal("web_search"),
|
|
1216
|
-
search_context_size: exports.CreateResponseToolsRouterResponsesSearchContextSize$inboundSchema
|
|
1217
|
-
.optional(),
|
|
1218
|
-
user_location: z.lazy(() => exports.CreateResponseToolsRouterResponsesUserLocation$inboundSchema).optional(),
|
|
1219
|
-
filters: z.nullable(z.lazy(() => exports.ToolsFilters$inboundSchema)).optional(),
|
|
1220
|
-
}).transform((v) => {
|
|
1221
|
-
return (0, primitives_js_1.remap)(v, {
|
|
1222
|
-
"search_context_size": "searchContextSize",
|
|
1223
|
-
"user_location": "userLocation",
|
|
1224
|
-
});
|
|
1225
|
-
});
|
|
1226
|
-
function createResponseTools3FromJSON(jsonString) {
|
|
1227
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseTools3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseTools3' from JSON`);
|
|
1228
|
-
}
|
|
1229
|
-
/** @internal */
|
|
1230
|
-
exports.CreateResponseToolsSearchContextSize$inboundSchema = z.nativeEnum(exports.CreateResponseToolsSearchContextSize);
|
|
1231
|
-
/** @internal */
|
|
1232
|
-
exports.CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody2Type$inboundSchema = z.nativeEnum(exports.CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody2Type);
|
|
1233
|
-
/** @internal */
|
|
1234
|
-
exports.CreateResponseToolsUserLocation$inboundSchema = z.object({
|
|
1235
|
-
type: exports.CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody2Type$inboundSchema
|
|
1236
|
-
.optional(),
|
|
1237
|
-
city: z.nullable(z.string()).optional(),
|
|
1238
|
-
country: z.string().optional(),
|
|
1239
|
-
region: z.nullable(z.string()).optional(),
|
|
1240
|
-
timezone: z.nullable(z.string()).optional(),
|
|
1241
|
-
});
|
|
1242
|
-
function createResponseToolsUserLocationFromJSON(jsonString) {
|
|
1243
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseToolsUserLocation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseToolsUserLocation' from JSON`);
|
|
1244
|
-
}
|
|
1245
|
-
/** @internal */
|
|
1246
|
-
exports.CreateResponseTools2$inboundSchema = z.object({
|
|
1247
|
-
type: z.literal("web_search_preview"),
|
|
1248
|
-
domains: z.array(z.string()).optional(),
|
|
1249
|
-
search_context_size: exports.CreateResponseToolsSearchContextSize$inboundSchema
|
|
1250
|
-
.optional(),
|
|
1251
|
-
user_location: z.lazy(() => exports.CreateResponseToolsUserLocation$inboundSchema)
|
|
1252
|
-
.optional(),
|
|
1253
|
-
}).transform((v) => {
|
|
1254
|
-
return (0, primitives_js_1.remap)(v, {
|
|
1255
|
-
"search_context_size": "searchContextSize",
|
|
1256
|
-
"user_location": "userLocation",
|
|
1257
|
-
});
|
|
1258
|
-
});
|
|
1259
|
-
function createResponseTools2FromJSON(jsonString) {
|
|
1260
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseTools2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseTools2' from JSON`);
|
|
1261
|
-
}
|
|
1262
|
-
/** @internal */
|
|
1263
|
-
exports.CreateResponseTools1$inboundSchema = z.object({
|
|
1264
|
-
type: z.literal("function"),
|
|
1265
|
-
name: z.string(),
|
|
1266
|
-
description: z.nullable(z.string()).optional(),
|
|
1267
|
-
parameters: z.nullable(z.record(z.any())).optional(),
|
|
1268
|
-
strict: z.nullable(z.boolean().default(true)),
|
|
1269
|
-
});
|
|
1270
|
-
function createResponseTools1FromJSON(jsonString) {
|
|
1271
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseTools1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseTools1' from JSON`);
|
|
1272
|
-
}
|
|
1273
|
-
/** @internal */
|
|
1274
|
-
exports.CreateResponseRouterResponsesTools$inboundSchema = z.union([
|
|
1275
|
-
z.lazy(() => exports.CreateResponseTools1$inboundSchema),
|
|
1276
|
-
z.lazy(() => exports.CreateResponseTools2$inboundSchema),
|
|
1277
|
-
z.lazy(() => exports.CreateResponseTools3$inboundSchema),
|
|
1278
|
-
z.lazy(() => exports.CreateResponseTools4$inboundSchema),
|
|
1279
|
-
]);
|
|
1280
|
-
function createResponseRouterResponsesToolsFromJSON(jsonString) {
|
|
1281
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseRouterResponsesTools$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseRouterResponsesTools' from JSON`);
|
|
1282
|
-
}
|
|
1283
|
-
/** @internal */
|
|
1284
|
-
exports.CreateResponseReasoning$inboundSchema = z.object({
|
|
1285
|
-
effort: z.nullable(z.string()).optional(),
|
|
1286
|
-
summary: z.nullable(z.string()).optional(),
|
|
1287
|
-
});
|
|
1288
|
-
function createResponseReasoningFromJSON(jsonString) {
|
|
1289
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseReasoning$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseReasoning' from JSON`);
|
|
1290
|
-
}
|
|
1291
|
-
/** @internal */
|
|
1292
|
-
exports.CreateResponseFormat3$inboundSchema = z.object({
|
|
1293
|
-
type: z.literal("json_schema"),
|
|
1294
|
-
name: z.string(),
|
|
1295
|
-
description: z.string().optional(),
|
|
1296
|
-
schema: z.record(z.any()),
|
|
1297
|
-
strict: z.boolean().default(true),
|
|
1298
|
-
});
|
|
1299
|
-
function createResponseFormat3FromJSON(jsonString) {
|
|
1300
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseFormat3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseFormat3' from JSON`);
|
|
1301
|
-
}
|
|
1302
|
-
/** @internal */
|
|
1303
|
-
exports.CreateResponseFormat2$inboundSchema = z.object({
|
|
1304
|
-
type: z.literal("json_object"),
|
|
1305
|
-
});
|
|
1306
|
-
function createResponseFormat2FromJSON(jsonString) {
|
|
1307
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseFormat2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseFormat2' from JSON`);
|
|
1308
|
-
}
|
|
1309
|
-
/** @internal */
|
|
1310
|
-
exports.CreateResponseFormat1$inboundSchema = z.object({
|
|
1311
|
-
type: z.literal("text"),
|
|
1312
|
-
});
|
|
1313
|
-
function createResponseFormat1FromJSON(jsonString) {
|
|
1314
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseFormat1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseFormat1' from JSON`);
|
|
1315
|
-
}
|
|
1316
|
-
/** @internal */
|
|
1317
|
-
exports.CreateResponseRouterResponsesFormat$inboundSchema = z.union([
|
|
1318
|
-
z.lazy(() => exports.CreateResponseFormat1$inboundSchema),
|
|
1319
|
-
z.lazy(() => exports.CreateResponseFormat2$inboundSchema),
|
|
1320
|
-
z.lazy(() => exports.CreateResponseFormat3$inboundSchema),
|
|
1321
|
-
]);
|
|
1322
|
-
function createResponseRouterResponsesFormatFromJSON(jsonString) {
|
|
1323
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseRouterResponsesFormat$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseRouterResponsesFormat' from JSON`);
|
|
1324
|
-
}
|
|
1325
|
-
/** @internal */
|
|
1326
|
-
exports.CreateResponseRouterResponsesText$inboundSchema = z.object({
|
|
1327
|
-
format: z.union([
|
|
1328
|
-
z.lazy(() => exports.CreateResponseFormat1$inboundSchema),
|
|
1329
|
-
z.lazy(() => exports.CreateResponseFormat2$inboundSchema),
|
|
1330
|
-
z.lazy(() => exports.CreateResponseFormat3$inboundSchema),
|
|
1331
|
-
]),
|
|
1332
|
-
});
|
|
1333
|
-
function createResponseRouterResponsesTextFromJSON(jsonString) {
|
|
1334
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseRouterResponsesText$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseRouterResponsesText' from JSON`);
|
|
1335
|
-
}
|
|
1336
|
-
/** @internal */
|
|
1337
|
-
exports.Truncation$inboundSchema = z
|
|
1338
|
-
.nativeEnum(exports.Truncation);
|
|
1339
|
-
/** @internal */
|
|
1340
|
-
exports.CreateResponseServiceTier$inboundSchema = z.nativeEnum(exports.CreateResponseServiceTier);
|
|
1341
|
-
/** @internal */
|
|
1342
|
-
exports.CreateResponseResponseBody$inboundSchema = z.object({
|
|
1343
|
-
id: z.string(),
|
|
1344
|
-
object: exports.CreateResponseObject$inboundSchema,
|
|
1345
|
-
created_at: z.number(),
|
|
1346
|
-
status: exports.CreateResponseStatus$inboundSchema,
|
|
1347
|
-
error: z.nullable(z.lazy(() => exports.ErrorT$inboundSchema)).optional(),
|
|
1348
|
-
incomplete_details: z.nullable(z.lazy(() => exports.IncompleteDetails$inboundSchema)),
|
|
1349
|
-
model: z.string(),
|
|
1350
|
-
instructions: z.nullable(z.string()).optional(),
|
|
1351
|
-
output: z.array(z.union([
|
|
1352
|
-
z.lazy(() => exports.Output1$inboundSchema),
|
|
1353
|
-
z.lazy(() => exports.Output2$inboundSchema),
|
|
1354
|
-
z.lazy(() => exports.Output3$inboundSchema),
|
|
1355
|
-
z.lazy(() => exports.Output4$inboundSchema),
|
|
1356
|
-
z.lazy(() => exports.Five$inboundSchema),
|
|
1357
|
-
])),
|
|
1358
|
-
output_text: z.nullable(z.string()).optional(),
|
|
1359
|
-
usage: z.lazy(() => exports.CreateResponseUsage$inboundSchema).optional(),
|
|
1360
|
-
temperature: z.nullable(z.number()).optional(),
|
|
1361
|
-
top_p: z.nullable(z.number()).optional(),
|
|
1362
|
-
max_output_tokens: z.nullable(z.number().int()).optional(),
|
|
1363
|
-
parallel_tool_calls: z.boolean(),
|
|
1364
|
-
previous_response_id: z.nullable(z.string()).optional(),
|
|
1365
|
-
metadata: z.record(z.string()).optional(),
|
|
1366
|
-
tool_choice: z.union([
|
|
1367
|
-
z.lazy(() => exports.CreateResponseToolChoiceRouterResponses2$inboundSchema),
|
|
1368
|
-
exports.CreateResponseToolChoiceRouterResponses1$inboundSchema,
|
|
1369
|
-
]).optional(),
|
|
1370
|
-
tools: z.array(z.union([
|
|
1371
|
-
z.lazy(() => exports.CreateResponseTools1$inboundSchema),
|
|
1372
|
-
z.lazy(() => exports.CreateResponseTools2$inboundSchema),
|
|
1373
|
-
z.lazy(() => exports.CreateResponseTools3$inboundSchema),
|
|
1374
|
-
z.lazy(() => exports.CreateResponseTools4$inboundSchema),
|
|
1375
|
-
])).optional(),
|
|
1376
|
-
reasoning: z.nullable(z.lazy(() => exports.CreateResponseReasoning$inboundSchema))
|
|
1377
|
-
.optional(),
|
|
1378
|
-
store: z.boolean().optional(),
|
|
1379
|
-
text: z.lazy(() => exports.CreateResponseRouterResponsesText$inboundSchema)
|
|
1380
|
-
.optional(),
|
|
1381
|
-
truncation: z.nullable(exports.Truncation$inboundSchema).optional(),
|
|
1382
|
-
user: z.nullable(z.string()).optional(),
|
|
1383
|
-
service_tier: z.nullable(exports.CreateResponseServiceTier$inboundSchema).optional(),
|
|
1384
|
-
background: z.nullable(z.boolean()).optional(),
|
|
1385
|
-
top_logprobs: z.nullable(z.number().int()).optional(),
|
|
1386
|
-
logprobs: z.nullable(z.boolean()).optional(),
|
|
1387
|
-
}).transform((v) => {
|
|
1388
|
-
return (0, primitives_js_1.remap)(v, {
|
|
1389
|
-
"created_at": "createdAt",
|
|
1390
|
-
"incomplete_details": "incompleteDetails",
|
|
1391
|
-
"output_text": "outputText",
|
|
1392
|
-
"top_p": "topP",
|
|
1393
|
-
"max_output_tokens": "maxOutputTokens",
|
|
1394
|
-
"parallel_tool_calls": "parallelToolCalls",
|
|
1395
|
-
"previous_response_id": "previousResponseId",
|
|
1396
|
-
"tool_choice": "toolChoice",
|
|
1397
|
-
"service_tier": "serviceTier",
|
|
1398
|
-
"top_logprobs": "topLogprobs",
|
|
1399
|
-
});
|
|
1400
|
-
});
|
|
1401
|
-
function createResponseResponseBodyFromJSON(jsonString) {
|
|
1402
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseResponseBody' from JSON`);
|
|
1403
|
-
}
|
|
1404
|
-
/** @internal */
|
|
1405
|
-
exports.CreateResponseResponse$inboundSchema = z.union([
|
|
1406
|
-
z.lazy(() => exports.CreateResponseResponseBody$inboundSchema),
|
|
1407
|
-
z.instanceof((ReadableStream))
|
|
1408
|
-
.transform(stream => {
|
|
1409
|
-
return new event_streams_js_1.EventStream(stream, rawEvent => {
|
|
1410
|
-
if (rawEvent.data === "[DONE]")
|
|
1411
|
-
return { done: true, value: undefined };
|
|
1412
|
-
return {
|
|
1413
|
-
done: false,
|
|
1414
|
-
value: z.lazy(() => exports.CreateResponseRouterResponsesResponseBody$inboundSchema).parse(rawEvent),
|
|
1415
|
-
};
|
|
1416
|
-
}, { dataRequired: false });
|
|
1417
|
-
}),
|
|
1418
|
-
]);
|
|
1419
|
-
function createResponseResponseFromJSON(jsonString) {
|
|
1420
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateResponseResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponseResponse' from JSON`);
|
|
1421
|
-
}
|
|
1422
|
-
//# sourceMappingURL=createresponse.js.map
|