@aeye/openai 0.3.9 → 0.4.0

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.
@@ -0,0 +1,110 @@
1
+ /**
2
+ * The Decisions API's wire shapes, which the SDK does not type yet, and
3
+ * their conversion to and from @aeye decisions.
4
+ */
5
+ import type { DecisionAnswer, DecisionQuestion } from '@aeye/ai';
6
+ import OpenAI from 'openai';
7
+ /**
8
+ * A question as the Decisions API takes it.
9
+ */
10
+ export type OpenAIDecisionQuestion = {
11
+ name: string;
12
+ instructions: string;
13
+ } & ({
14
+ type: 'predicate';
15
+ } | {
16
+ type: 'choice';
17
+ choices: Array<{
18
+ value: string;
19
+ description?: string;
20
+ }>;
21
+ } | {
22
+ type: 'score';
23
+ levels: Array<{
24
+ label: string;
25
+ description?: string;
26
+ }>;
27
+ });
28
+ /**
29
+ * Parameters of a decision request.
30
+ */
31
+ export interface OpenAIDecisionParams {
32
+ model: string;
33
+ input: string | OpenAI.Responses.ResponseInputItem[];
34
+ questions: OpenAIDecisionQuestion[];
35
+ }
36
+ /**
37
+ * An answer as the Decisions API returns it.
38
+ */
39
+ export type OpenAIDecisionAnswer = {
40
+ name: string;
41
+ } & ({
42
+ type: 'predicate';
43
+ probability: number;
44
+ } | {
45
+ type: 'choice';
46
+ choice: string;
47
+ probabilities: Array<{
48
+ value: string;
49
+ probability: number;
50
+ }>;
51
+ confidence: number;
52
+ } | {
53
+ type: 'score';
54
+ score: number;
55
+ probabilities: Array<{
56
+ value: number;
57
+ label: string;
58
+ probability: number;
59
+ }>;
60
+ confidence: number;
61
+ } | {
62
+ type: 'refusal';
63
+ });
64
+ /**
65
+ * A decision as the Decisions API returns it.
66
+ */
67
+ export interface OpenAIDecision {
68
+ model: string;
69
+ answers: OpenAIDecisionAnswer[];
70
+ usage: OpenAI.Responses.ResponseUsage;
71
+ }
72
+ /**
73
+ * A question in the System One decision protocol (TypeSafe's), which
74
+ * OpenRouter's decisions endpoint speaks: a predicate is a `noul`
75
+ * question, and choices and levels are its criteria.
76
+ */
77
+ export type SystemOneQuestion = {
78
+ type: 'noul';
79
+ instructions: string;
80
+ } | {
81
+ type: 'choice';
82
+ instructions: string;
83
+ criteria: Record<string, string>;
84
+ } | {
85
+ type: 'score';
86
+ instructions: string;
87
+ criteria: string[];
88
+ };
89
+ /**
90
+ * Parameters of a System One decision request: the evidence as `state`,
91
+ * and questions by name.
92
+ */
93
+ export interface SystemOneDecisionParams {
94
+ model: string;
95
+ state: string | OpenAI.Chat.ChatCompletionMessageParam[];
96
+ questions: Record<string, SystemOneQuestion>;
97
+ }
98
+ /**
99
+ * A question in System One's shape.
100
+ */
101
+ export declare function toSystemOneQuestion(question: DecisionQuestion): SystemOneQuestion;
102
+ /**
103
+ * A named question in the Decisions API's shape.
104
+ */
105
+ export declare function toDecisionQuestion(name: string, question: DecisionQuestion): OpenAIDecisionQuestion;
106
+ /**
107
+ * An answer in @aeye's shape. Score probabilities come back in level order.
108
+ */
109
+ export declare function toDecisionAnswer(answer: OpenAIDecisionAnswer): DecisionAnswer;
110
+ //# sourceMappingURL=decisions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decisions.d.ts","sourceRoot":"","sources":["../src/decisions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GAAG,CAC1E;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,GAC3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E,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GAC1E;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAEhE;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,0BAA0B,EAAE,CAAC;IACzD,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;CAC9C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,iBAAiB,CAUjF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,GAAG,sBAAsB,CAUnG;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,oBAAoB,GAAG,cAAc,CAW7E"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The Decisions API's wire shapes, which the SDK does not type yet, and
3
+ * their conversion to and from @aeye decisions.
4
+ */
5
+ /**
6
+ * A question in System One's shape.
7
+ */
8
+ export function toSystemOneQuestion(question) {
9
+ const { instructions } = question;
10
+ switch (question.type) {
11
+ case 'predicate':
12
+ return { type: 'noul', instructions };
13
+ case 'choice':
14
+ return { type: 'choice', instructions, criteria: question.choices };
15
+ case 'score':
16
+ return { type: 'score', instructions, criteria: question.levels };
17
+ }
18
+ }
19
+ /**
20
+ * A named question in the Decisions API's shape.
21
+ */
22
+ export function toDecisionQuestion(name, question) {
23
+ const { instructions } = question;
24
+ switch (question.type) {
25
+ case 'predicate':
26
+ return { name, type: 'predicate', instructions };
27
+ case 'choice':
28
+ return { name, type: 'choice', instructions, choices: Object.entries(question.choices).map(([value, description]) => ({ value, description: description || undefined })) };
29
+ case 'score':
30
+ return { name, type: 'score', instructions, levels: question.levels.map(label => ({ label })) };
31
+ }
32
+ }
33
+ /**
34
+ * An answer in @aeye's shape. Score probabilities come back in level order.
35
+ */
36
+ export function toDecisionAnswer(answer) {
37
+ switch (answer.type) {
38
+ case 'predicate':
39
+ return { type: 'predicate', probability: answer.probability };
40
+ case 'choice':
41
+ return { type: 'choice', choice: answer.choice, probabilities: Object.fromEntries(answer.probabilities.map(p => [p.value, p.probability])), confidence: answer.confidence };
42
+ case 'score':
43
+ return { type: 'score', score: answer.score, probabilities: answer.probabilities.map(p => p.probability), confidence: answer.confidence };
44
+ case 'refusal':
45
+ return { type: 'refusal' };
46
+ }
47
+ }
48
+ //# sourceMappingURL=decisions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decisions.js","sourceRoot":"","sources":["../src/decisions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA8DH;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAA0B;IAC5D,MAAM,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC;IAClC,QAAQ,QAAQ,CAAC,IAAI,EAAE,CAAC;QACtB,KAAK,WAAW;YACd,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;QACxC,KAAK,QAAQ;YACX,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;QACtE,KAAK,OAAO;YACV,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IACtE,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,QAA0B;IACzE,MAAM,E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AO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC;QAC5I,KAAK,SAAS;YACZ,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC/B,CAAC;AACH,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * GPT Image request parameters and usage, shared by generation and editing.
3
+ * DALL·E models were retired, so every image model takes the GPT Image shape.
4
+ */
5
+ import type { ImageOutputOptions, ModelInfo } from '@aeye/ai';
6
+ import type { Usage } from '@aeye/core';
7
+ /**
8
+ * Parameters shared by image generation and editing. `auto` and exact
9
+ * sizes pass through; other sizes snap to the nearest one the model takes.
10
+ */
11
+ export declare function imageParams(request: ImageOutputOptions, modelId: string, model: ModelInfo | undefined): {
12
+ model: string;
13
+ prompt: string;
14
+ n: number | undefined;
15
+ size: string | undefined;
16
+ quality: import("@aeye/ai").ImageQuality | undefined;
17
+ background: "auto" | "transparent" | "opaque" | undefined;
18
+ output_format: "png" | "jpeg" | "webp" | undefined;
19
+ output_compression: number | undefined;
20
+ user: string | undefined;
21
+ };
22
+ /**
23
+ * How many partial images a streaming request asks for.
24
+ */
25
+ export declare function partialImages(request: ImageOutputOptions): number;
26
+ /**
27
+ * What image responses and completed stream events report about the image.
28
+ */
29
+ interface ImageResult {
30
+ usage?: {
31
+ output_tokens: number;
32
+ input_tokens_details: {
33
+ image_tokens: number;
34
+ text_tokens: number;
35
+ };
36
+ };
37
+ quality?: string;
38
+ size?: string;
39
+ }
40
+ /**
41
+ * Usage of an image response: tokens as reported, plus one output entry per
42
+ * image with the quality and size actually produced, for models priced per
43
+ * image.
44
+ */
45
+ export declare function imageUsage(response: ImageResult, count: number): Usage;
46
+ export {};
47
+ //# sourceMappingURL=images.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../src/images.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AA8CxC;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,SAAS;;;;;;;;;;EAarG;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAEjE;AAED;;GAEG;AACH,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,oBAAoB,EAAE;YAAE,YAAY,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;IACvG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,CAatE"}
package/dist/images.js ADDED
@@ -0,0 +1,80 @@
1
+ /**
2
+ * GPT Image request parameters and usage, shared by generation and editing.
3
+ * DALL·E models were retired, so every image model takes the GPT Image shape.
4
+ */
5
+ /**
6
+ * Sizes every GPT Image model accepts, for models the registry has no sizes for.
7
+ */
8
+ const DEFAULT_SIZES = [
9
+ { width: 1024, height: 1024 },
10
+ { width: 1536, height: 1024 },
11
+ { width: 1024, height: 1536 },
12
+ ];
13
+ /**
14
+ * Most images one request may produce.
15
+ */
16
+ const MAX_IMAGES = 10;
17
+ /**
18
+ * Most partial images a streaming request may produce.
19
+ */
20
+ const MAX_PARTIAL_IMAGES = 3;
21
+ /**
22
+ * The size closest in aspect ratio to the requested one, then the largest.
23
+ */
24
+ function nearestSize(requested, sizes) {
25
+ const [width, height] = requested.split('x').map(Number);
26
+ const ratio = width / height;
27
+ const [closest] = [...sizes].sort((a, b) => Math.abs(a.width / a.height - ratio) - Math.abs(b.width / b.height - ratio) ||
28
+ b.width * b.height - a.width * a.height);
29
+ return `${closest.width}x${closest.height}`;
30
+ }
31
+ /**
32
+ * The sizes the registry prices for a model.
33
+ */
34
+ function pricedSizes(model) {
35
+ return model?.pricing.image?.output?.flatMap(quality => quality.sizes) ?? [];
36
+ }
37
+ /**
38
+ * Parameters shared by image generation and editing. `auto` and exact
39
+ * sizes pass through; other sizes snap to the nearest one the model takes.
40
+ */
41
+ export function imageParams(request, modelId, model) {
42
+ const sizes = pricedSizes(model);
43
+ return {
44
+ model: modelId,
45
+ prompt: request.prompt,
46
+ n: request.n === undefined ? undefined : Math.min(Math.max(request.n, 1), MAX_IMAGES),
47
+ size: !request.size || request.size === 'auto' ? request.size : nearestSize(request.size, sizes.length ? sizes : DEFAULT_SIZES),
48
+ quality: request.quality,
49
+ background: request.background,
50
+ output_format: request.outputFormat,
51
+ output_compression: request.outputCompression,
52
+ user: request.userIdentifier,
53
+ };
54
+ }
55
+ /**
56
+ * How many partial images a streaming request asks for.
57
+ */
58
+ export function partialImages(request) {
59
+ return Math.max(1, Math.min(MAX_PARTIAL_IMAGES, request.streamCount ?? 2));
60
+ }
61
+ /**
62
+ * Usage of an image response: tokens as reported, plus one output entry per
63
+ * image with the quality and size actually produced, for models priced per
64
+ * image.
65
+ */
66
+ export function imageUsage(response, count) {
67
+ const [width, height] = (response.size ?? '').split('x').map(Number);
68
+ const details = response.usage?.input_tokens_details;
69
+ return {
70
+ text: details && { input: details.text_tokens },
71
+ image: {
72
+ input: details?.image_tokens,
73
+ tokens: response.usage?.output_tokens,
74
+ output: response.quality && width && height
75
+ ? [{ quality: response.quality, size: { width, height }, count }]
76
+ : undefined,
77
+ },
78
+ };
79
+ }
80
+ //# sourceM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AM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACrE,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC;IACrD,OAAO;QACL,IAAI,EAAE,OAAO,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,WAAW,EAAE;QAC/C,KAAK,EAAE;YACL,KAAK,EAAE,OAAO,EAAE,YAAY;YAC5B,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,aAAa;YACrC,MAAM,EAAE,QAAQ,CAAC,OAAO,IAAI,KAAK,IAAI,MAAM;gBACzC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC;gBACjE,CAAC,CAAC,SAAS;SACd;KACF,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './openai';
2
+ export { type SystemOneDecisionParams, type SystemOneQuestion, toSystemOneQuestion } from './decisions';
2
3
  export * from './types';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,KAAK,uBAAuB,EAAE,KAAK,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACxG,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './openai';
2
+ export { toSystemOneQuestion } from './decisions';
2
3
  export * from './types';
3
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,OAAO,EAAwD,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACxG,cAAc,SAAS,CAAC"}