@etainabl/nodejs-sdk 1.3.129 → 1.3.130
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/dist/esm/index.js +9 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -10,6 +10,8 @@ import winston from 'winston';
|
|
|
10
10
|
import moment from 'moment';
|
|
11
11
|
import { ZodObject } from 'zod';
|
|
12
12
|
import OpenAI from 'openai';
|
|
13
|
+
import { ResponseTextConfig } from 'openai/resources/responses/responses';
|
|
14
|
+
import { Reasoning } from 'openai/resources.mjs';
|
|
13
15
|
|
|
14
16
|
declare const wasteCategories: readonly [{
|
|
15
17
|
readonly name: "General Waste";
|
|
@@ -454,7 +456,6 @@ interface Address {
|
|
|
454
456
|
postCode: string;
|
|
455
457
|
province?: string;
|
|
456
458
|
countryCode?: string;
|
|
457
|
-
jurisdictionCode?: string;
|
|
458
459
|
latitude?: string;
|
|
459
460
|
longitude?: string;
|
|
460
461
|
}
|
|
@@ -1690,6 +1691,9 @@ interface PromptOptions {
|
|
|
1690
1691
|
model: ETNModels;
|
|
1691
1692
|
instructions: string;
|
|
1692
1693
|
temperature?: number;
|
|
1694
|
+
cacheKey?: string;
|
|
1695
|
+
reasoning?: Reasoning;
|
|
1696
|
+
verbosity?: ResponseTextConfig['verbosity'];
|
|
1693
1697
|
}
|
|
1694
1698
|
interface PromptInput {
|
|
1695
1699
|
type: 'text' | 'file';
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ import winston from 'winston';
|
|
|
10
10
|
import moment from 'moment';
|
|
11
11
|
import { ZodObject } from 'zod';
|
|
12
12
|
import OpenAI from 'openai';
|
|
13
|
+
import { ResponseTextConfig } from 'openai/resources/responses/responses';
|
|
14
|
+
import { Reasoning } from 'openai/resources.mjs';
|
|
13
15
|
|
|
14
16
|
declare const wasteCategories: readonly [{
|
|
15
17
|
readonly name: "General Waste";
|
|
@@ -454,7 +456,6 @@ interface Address {
|
|
|
454
456
|
postCode: string;
|
|
455
457
|
province?: string;
|
|
456
458
|
countryCode?: string;
|
|
457
|
-
jurisdictionCode?: string;
|
|
458
459
|
latitude?: string;
|
|
459
460
|
longitude?: string;
|
|
460
461
|
}
|
|
@@ -1690,6 +1691,9 @@ interface PromptOptions {
|
|
|
1690
1691
|
model: ETNModels;
|
|
1691
1692
|
instructions: string;
|
|
1692
1693
|
temperature?: number;
|
|
1694
|
+
cacheKey?: string;
|
|
1695
|
+
reasoning?: Reasoning;
|
|
1696
|
+
verbosity?: ResponseTextConfig['verbosity'];
|
|
1693
1697
|
}
|
|
1694
1698
|
interface PromptInput {
|
|
1695
1699
|
type: 'text' | 'file';
|
package/dist/index.js
CHANGED
|
@@ -17471,6 +17471,15 @@ ${additionalInstructions.join("\n\n")}`,
|
|
|
17471
17471
|
if (this.options.temperature !== void 0 && !model.id.startsWith("gpt-5")) {
|
|
17472
17472
|
responsesInput.temperature = this.options.temperature;
|
|
17473
17473
|
}
|
|
17474
|
+
if (this.options.cacheKey) {
|
|
17475
|
+
responsesInput.prompt_cache_key = this.options.cacheKey;
|
|
17476
|
+
}
|
|
17477
|
+
if (this.options.reasoning) {
|
|
17478
|
+
responsesInput.reasoning = this.options.reasoning;
|
|
17479
|
+
}
|
|
17480
|
+
if (this.options.verbosity) {
|
|
17481
|
+
responsesInput.text.verbosity = this.options.verbosity;
|
|
17482
|
+
}
|
|
17474
17483
|
const response = await this.openai.responses.create(responsesInput);
|
|
17475
17484
|
const inputTokens = response.usage?.input_tokens || 0;
|
|
17476
17485
|
const outputTokens = response.usage?.output_tokens || 0;
|