公众号验证码功能完成 yeah!!!

This commit is contained in:
2025-11-21 15:33:03 +08:00
parent ad35173301
commit 6330f6faa1
614 changed files with 31574 additions and 4571 deletions

View File

@@ -1,3 +1,4 @@
export { InputItems, type ResponseItemList, type InputItemListParams } from "./input-items.mjs";
export { InputTokens, type InputTokenCountResponse, type InputTokenCountParams } from "./input-tokens.mjs";
export { Responses } from "./responses.mjs";
//# sourceMappingURL=index.d.mts.map

View File

@@ -1 +1 @@
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/responses/index.ts"],"names":[],"mappings":"OAEO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE;OAC/D,EAAE,SAAS,EAAE"}
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/responses/index.ts"],"names":[],"mappings":"OAEO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE;OAC/D,EAAE,WAAW,EAAE,KAAK,uBAAuB,EAAE,KAAK,qBAAqB,EAAE;OACzE,EAAE,SAAS,EAAE"}

View File

@@ -1,3 +1,4 @@
export { InputItems, type ResponseItemList, type InputItemListParams } from "./input-items.js";
export { InputTokens, type InputTokenCountResponse, type InputTokenCountParams } from "./input-tokens.js";
export { Responses } from "./responses.js";
//# sourceMappingURL=index.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/responses/index.ts"],"names":[],"mappings":"OAEO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE;OAC/D,EAAE,SAAS,EAAE"}
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/responses/index.ts"],"names":[],"mappings":"OAEO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE;OAC/D,EAAE,WAAW,EAAE,KAAK,uBAAuB,EAAE,KAAK,qBAAqB,EAAE;OACzE,EAAE,SAAS,EAAE"}

View File

@@ -1,9 +1,11 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Responses = exports.InputItems = void 0;
exports.Responses = exports.InputTokens = exports.InputItems = void 0;
var input_items_1 = require("./input-items.js");
Object.defineProperty(exports, "InputItems", { enumerable: true, get: function () { return input_items_1.InputItems; } });
var input_tokens_1 = require("./input-tokens.js");
Object.defineProperty(exports, "InputTokens", { enumerable: true, get: function () { return input_tokens_1.InputTokens; } });
var responses_1 = require("./responses.js");
Object.defineProperty(exports, "Responses", { enumerable: true, get: function () { return responses_1.Responses; } });
//# sourceMappingURL=index.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/responses/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA4F;AAAnF,yGAAA,UAAU,OAAA;AACnB,4CAAwC;AAA/B,sGAAA,SAAS,OAAA"}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/responses/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA4F;AAAnF,yGAAA,UAAU,OAAA;AACnB,kDAAuG;AAA9F,2GAAA,WAAW,OAAA;AACpB,4CAAwC;AAA/B,sGAAA,SAAS,OAAA"}

View File

@@ -1,4 +1,5 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export { InputItems } from "./input-items.mjs";
export { InputTokens } from "./input-tokens.mjs";
export { Responses } from "./responses.mjs";
//# sourceMappingURL=index.mjs.map

View File

@@ -1 +1 @@
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/responses/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,UAAU,EAAmD;OAC/D,EAAE,SAAS,EAAE"}
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/responses/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,UAAU,EAAmD;OAC/D,EAAE,WAAW,EAA4D;OACzE,EAAE,SAAS,EAAE"}

View File

@@ -0,0 +1,128 @@
import { APIResource } from "../../core/resource.mjs";
import * as Shared from "../shared.mjs";
import * as ResponsesAPI from "./responses.mjs";
import { APIPromise } from "../../core/api-promise.mjs";
import { RequestOptions } from "../../internal/request-options.mjs";
export declare class InputTokens extends APIResource {
/**
* Get input token counts
*
* @example
* ```ts
* const response = await client.responses.inputTokens.count();
* ```
*/
count(body?: InputTokenCountParams | null | undefined, options?: RequestOptions): APIPromise<InputTokenCountResponse>;
}
export interface InputTokenCountResponse {
input_tokens: number;
object: 'response.input_tokens';
}
export interface InputTokenCountParams {
/**
* The conversation that this response belongs to. Items from this conversation are
* prepended to `input_items` for this response request. Input items and output
* items from this response are automatically added to this conversation after this
* response completes.
*/
conversation?: string | ResponsesAPI.ResponseConversationParam | null;
/**
* Text, image, or file inputs to the model, used to generate a response
*/
input?: string | Array<ResponsesAPI.ResponseInputItem> | null;
/**
* A system (or developer) message inserted into the model's context. When used
* along with `previous_response_id`, the instructions from a previous response
* will not be carried over to the next response. This makes it simple to swap out
* system (or developer) messages in new responses.
*/
instructions?: string | null;
/**
* Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
* wide range of models with different capabilities, performance characteristics,
* and price points. Refer to the
* [model guide](https://platform.openai.com/docs/models) to browse and compare
* available models.
*/
model?: string | null;
/**
* Whether to allow the model to run tool calls in parallel.
*/
parallel_tool_calls?: boolean | null;
/**
* The unique ID of the previous response to the model. Use this to create
* multi-turn conversations. Learn more about
* [conversation state](https://platform.openai.com/docs/guides/conversation-state).
* Cannot be used in conjunction with `conversation`.
*/
previous_response_id?: string | null;
/**
* **gpt-5 and o-series models only** Configuration options for
* [reasoning models](https://platform.openai.com/docs/guides/reasoning).
*/
reasoning?: Shared.Reasoning | null;
/**
* Configuration options for a text response from the model. Can be plain text or
* structured JSON data. Learn more:
*
* - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
* - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
*/
text?: InputTokenCountParams.Text | null;
/**
* How the model should select which tool (or tools) to use when generating a
* response. See the `tools` parameter to see how to specify which tools the model
* can call.
*/
tool_choice?: ResponsesAPI.ToolChoiceOptions | ResponsesAPI.ToolChoiceAllowed | ResponsesAPI.ToolChoiceTypes | ResponsesAPI.ToolChoiceFunction | ResponsesAPI.ToolChoiceMcp | ResponsesAPI.ToolChoiceCustom | ResponsesAPI.ToolChoiceApplyPatch | ResponsesAPI.ToolChoiceShell | null;
/**
* An array of tools the model may call while generating a response. You can
* specify which tool to use by setting the `tool_choice` parameter.
*/
tools?: Array<ResponsesAPI.Tool> | null;
/**
* The truncation strategy to use for the model response. - `auto`: If the input to
* this Response exceeds the model's context window size, the model will truncate
* the response to fit the context window by dropping items from the beginning of
* the conversation. - `disabled` (default): If the input size will exceed the
* context window size for a model, the request will fail with a 400 error.
*/
truncation?: 'auto' | 'disabled';
}
export declare namespace InputTokenCountParams {
/**
* Configuration options for a text response from the model. Can be plain text or
* structured JSON data. Learn more:
*
* - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
* - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
*/
interface Text {
/**
* An object specifying the format that the model must output.
*
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
* ensures the model will match your supplied JSON schema. Learn more in the
* [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
*
* The default format is `{ "type": "text" }` with no additional options.
*
* **Not recommended for gpt-4o and newer models:**
*
* Setting to `{ "type": "json_object" }` enables the older JSON mode, which
* ensures the message the model generates is valid JSON. Using `json_schema` is
* preferred for models that support it.
*/
format?: ResponsesAPI.ResponseFormatTextConfig;
/**
* Constrains the verbosity of the model's response. Lower values will result in
* more concise responses, while higher values will result in more verbose
* responses. Currently supported values are `low`, `medium`, and `high`.
*/
verbosity?: 'low' | 'medium' | 'high' | null;
}
}
export declare namespace InputTokens {
export { type InputTokenCountResponse as InputTokenCountResponse, type InputTokenCountParams as InputTokenCountParams, };
}
//# sourceMappingURL=input-tokens.d.mts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"input-tokens.d.mts","sourceRoot":"","sources":["../../src/resources/responses/input-tokens.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,YAAY;OACjB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;OAOG;IACH,KAAK,CACH,IAAI,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;CAGvC;AAED,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,CAAC;IAErB,MAAM,EAAE,uBAAuB,CAAC;CACjC;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC,yBAAyB,GAAG,IAAI,CAAC;IAEtE;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC;IAE9D;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAErC;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;IAEpC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,qBAAqB,CAAC,IAAI,GAAG,IAAI,CAAC;IAEzC;;;;OAIG;IACH,WAAW,CAAC,EACR,YAAY,CAAC,iBAAiB,GAC9B,YAAY,CAAC,iBAAiB,GAC9B,YAAY,CAAC,eAAe,GAC5B,YAAY,CAAC,kBAAkB,GAC/B,YAAY,CAAC,aAAa,GAC1B,YAAY,CAAC,gBAAgB,GAC7B,YAAY,CAAC,oBAAoB,GACjC,YAAY,CAAC,eAAe,GAC5B,IAAI,CAAC;IAET;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAExC;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;CAClC;AAED,yBAAiB,qBAAqB,CAAC;IACrC;;;;;;OAMG;IACH,UAAiB,IAAI;QACnB;;;;;;;;;;;;;;WAcG;QACH,MAAM,CAAC,EAAE,YAAY,CAAC,wBAAwB,CAAC;QAE/C;;;;WAIG;QACH,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC;KAC9C;CACF;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}

View File

@@ -0,0 +1,128 @@
import { APIResource } from "../../core/resource.js";
import * as Shared from "../shared.js";
import * as ResponsesAPI from "./responses.js";
import { APIPromise } from "../../core/api-promise.js";
import { RequestOptions } from "../../internal/request-options.js";
export declare class InputTokens extends APIResource {
/**
* Get input token counts
*
* @example
* ```ts
* const response = await client.responses.inputTokens.count();
* ```
*/
count(body?: InputTokenCountParams | null | undefined, options?: RequestOptions): APIPromise<InputTokenCountResponse>;
}
export interface InputTokenCountResponse {
input_tokens: number;
object: 'response.input_tokens';
}
export interface InputTokenCountParams {
/**
* The conversation that this response belongs to. Items from this conversation are
* prepended to `input_items` for this response request. Input items and output
* items from this response are automatically added to this conversation after this
* response completes.
*/
conversation?: string | ResponsesAPI.ResponseConversationParam | null;
/**
* Text, image, or file inputs to the model, used to generate a response
*/
input?: string | Array<ResponsesAPI.ResponseInputItem> | null;
/**
* A system (or developer) message inserted into the model's context. When used
* along with `previous_response_id`, the instructions from a previous response
* will not be carried over to the next response. This makes it simple to swap out
* system (or developer) messages in new responses.
*/
instructions?: string | null;
/**
* Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
* wide range of models with different capabilities, performance characteristics,
* and price points. Refer to the
* [model guide](https://platform.openai.com/docs/models) to browse and compare
* available models.
*/
model?: string | null;
/**
* Whether to allow the model to run tool calls in parallel.
*/
parallel_tool_calls?: boolean | null;
/**
* The unique ID of the previous response to the model. Use this to create
* multi-turn conversations. Learn more about
* [conversation state](https://platform.openai.com/docs/guides/conversation-state).
* Cannot be used in conjunction with `conversation`.
*/
previous_response_id?: string | null;
/**
* **gpt-5 and o-series models only** Configuration options for
* [reasoning models](https://platform.openai.com/docs/guides/reasoning).
*/
reasoning?: Shared.Reasoning | null;
/**
* Configuration options for a text response from the model. Can be plain text or
* structured JSON data. Learn more:
*
* - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
* - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
*/
text?: InputTokenCountParams.Text | null;
/**
* How the model should select which tool (or tools) to use when generating a
* response. See the `tools` parameter to see how to specify which tools the model
* can call.
*/
tool_choice?: ResponsesAPI.ToolChoiceOptions | ResponsesAPI.ToolChoiceAllowed | ResponsesAPI.ToolChoiceTypes | ResponsesAPI.ToolChoiceFunction | ResponsesAPI.ToolChoiceMcp | ResponsesAPI.ToolChoiceCustom | ResponsesAPI.ToolChoiceApplyPatch | ResponsesAPI.ToolChoiceShell | null;
/**
* An array of tools the model may call while generating a response. You can
* specify which tool to use by setting the `tool_choice` parameter.
*/
tools?: Array<ResponsesAPI.Tool> | null;
/**
* The truncation strategy to use for the model response. - `auto`: If the input to
* this Response exceeds the model's context window size, the model will truncate
* the response to fit the context window by dropping items from the beginning of
* the conversation. - `disabled` (default): If the input size will exceed the
* context window size for a model, the request will fail with a 400 error.
*/
truncation?: 'auto' | 'disabled';
}
export declare namespace InputTokenCountParams {
/**
* Configuration options for a text response from the model. Can be plain text or
* structured JSON data. Learn more:
*
* - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
* - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
*/
interface Text {
/**
* An object specifying the format that the model must output.
*
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
* ensures the model will match your supplied JSON schema. Learn more in the
* [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
*
* The default format is `{ "type": "text" }` with no additional options.
*
* **Not recommended for gpt-4o and newer models:**
*
* Setting to `{ "type": "json_object" }` enables the older JSON mode, which
* ensures the message the model generates is valid JSON. Using `json_schema` is
* preferred for models that support it.
*/
format?: ResponsesAPI.ResponseFormatTextConfig;
/**
* Constrains the verbosity of the model's response. Lower values will result in
* more concise responses, while higher values will result in more verbose
* responses. Currently supported values are `low`, `medium`, and `high`.
*/
verbosity?: 'low' | 'medium' | 'high' | null;
}
}
export declare namespace InputTokens {
export { type InputTokenCountResponse as InputTokenCountResponse, type InputTokenCountParams as InputTokenCountParams, };
}
//# sourceMappingURL=input-tokens.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"input-tokens.d.ts","sourceRoot":"","sources":["../../src/resources/responses/input-tokens.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,YAAY;OACjB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;OAOG;IACH,KAAK,CACH,IAAI,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;CAGvC;AAED,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,CAAC;IAErB,MAAM,EAAE,uBAAuB,CAAC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AAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC;KAC9C;CACF;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}

View File

@@ -0,0 +1,20 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.InputTokens = void 0;
const resource_1 = require("../../core/resource.js");
class InputTokens extends resource_1.APIResource {
/**
* Get input token counts
*
* @example
* ```ts
* const response = await client.responses.inputTokens.count();
* ```
*/
count(body = {}, options) {
return this._client.post('/responses/input_tokens', { body, ...options });
}
}
exports.InputTokens = InputTokens;
//# sourceMappingURL=input-tokens.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"input-tokens.js","sourceRoot":"","sources":["../../src/resources/responses/input-tokens.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAMlD,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;OAOG;IACH,KAAK,CACH,OAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF;AAfD,kCAeC"}

View File

@@ -0,0 +1,16 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
export class InputTokens extends APIResource {
/**
* Get input token counts
*
* @example
* ```ts
* const response = await client.responses.inputTokens.count();
* ```
*/
count(body = {}, options) {
return this._client.post('/responses/input_tokens', { body, ...options });
}
}
//# sourceMappingURL=input-tokens.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"input-tokens.mjs","sourceRoot":"","sources":["../../src/resources/responses/input-tokens.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAMtB,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;OAOG;IACH,KAAK,CACH,OAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -8,12 +8,15 @@ const ResponseStream_1 = require("../../lib/responses/ResponseStream.js");
const resource_1 = require("../../core/resource.js");
const InputItemsAPI = tslib_1.__importStar(require("./input-items.js"));
const input_items_1 = require("./input-items.js");
const InputTokensAPI = tslib_1.__importStar(require("./input-tokens.js"));
const input_tokens_1 = require("./input-tokens.js");
const headers_1 = require("../../internal/headers.js");
const path_1 = require("../../internal/utils/path.js");
class Responses extends resource_1.APIResource {
constructor() {
super(...arguments);
this.inputItems = new InputItemsAPI.InputItems(this._client);
this.inputTokens = new InputTokensAPI.InputTokens(this._client);
}
create(body, options) {
return this._client.post('/responses', { body, ...options, stream: body.stream ?? false })._thenUnwrap((rsp) => {
@@ -80,4 +83,5 @@ class Responses extends resource_1.APIResource {
}
exports.Responses = Responses;
Responses.InputItems = input_items_1.InputItems;
Responses.InputTokens = input_tokens_1.InputTokens;
//# sourceMappingURL=responses.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"responses.js","sourceRoot":"","sources":["../../src/resources/responses/responses.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,kEAKmC;AACnC,0EAA0F;AAC1F,qDAAkD;AAGlD,wEAA+C;AAC/C,kDAAkF;AAIlF,uDAAsD;AAEtD,uDAAiD;AAuCjD,MAAa,SAAU,SAAQ,sBAAW;IAA1C;;QACE,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CA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AAE,EAAE,CAAC,IAAA,+BAAa,EAAC,QAAoB,EAAE,IAAI,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,IAAY,EACZ,OAAwB;QAExB,OAAO,+BAAc,CAAC,cAAc,CAAU,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,UAAkB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,cAAc,UAAU,SAAS,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;CACF;AAhJD,8BAgJC;AAkjMD,SAAS,CAAC,UAAU,GAAG,wBAAU,CAAC;AAClC,SAAS,CAAC,WAAW,GAAG,0BAAW,CAAC"}

View File

@@ -4,12 +4,15 @@ import { ResponseStream } from "../../lib/responses/ResponseStream.mjs";
import { APIResource } from "../../core/resource.mjs";
import * as InputItemsAPI from "./input-items.mjs";
import { InputItems } from "./input-items.mjs";
import * as InputTokensAPI from "./input-tokens.mjs";
import { InputTokens } from "./input-tokens.mjs";
import { buildHeaders } from "../../internal/headers.mjs";
import { path } from "../../internal/utils/path.mjs";
export class Responses extends APIResource {
constructor() {
super(...arguments);
this.inputItems = new InputItemsAPI.InputItems(this._client);
this.inputTokens = new InputTokensAPI.InputTokens(this._client);
}
create(body, options) {
return this._client.post('/responses', { body, ...options, stream: body.stream ?? false })._thenUnwrap((rsp) => {
@@ -75,4 +78,5 @@ export class Responses extends APIResource {
}
}
Responses.InputItems = InputItems;
Responses.InputTokens = InputTokens;
//# sourceMappingURL=responses.mjs.map

View File

@@ -1 +1 @@
{"version":3,"file":"responses.mjs","sourceRoot":"","sources":["../../src/resources/responses/responses.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAEL,aAAa,EAEb,aAAa,GACd;OACM,EAAE,cAAc,EAAwB;OACxC,EAAE,WAAW,EA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