@effect/ai-openai 0.11.4 → 0.12.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.
- package/dist/cjs/Generated.js +284 -334
- package/dist/cjs/Generated.js.map +1 -1
- package/dist/cjs/OpenAiClient.js +4 -1
- package/dist/cjs/OpenAiClient.js.map +1 -1
- package/dist/cjs/OpenAiConfig.js +10 -5
- package/dist/cjs/OpenAiConfig.js.map +1 -1
- package/dist/dts/Generated.d.ts +91 -75
- package/dist/dts/Generated.d.ts.map +1 -1
- package/dist/dts/OpenAiClient.d.ts.map +1 -1
- package/dist/dts/OpenAiConfig.d.ts +22 -58
- package/dist/dts/OpenAiConfig.d.ts.map +1 -1
- package/dist/esm/Generated.js +280 -331
- package/dist/esm/Generated.js.map +1 -1
- package/dist/esm/OpenAiClient.js +4 -1
- package/dist/esm/OpenAiClient.js.map +1 -1
- package/dist/esm/OpenAiConfig.js +9 -3
- package/dist/esm/OpenAiConfig.js.map +1 -1
- package/package.json +5 -5
- package/src/Generated.ts +983 -750
- package/src/OpenAiClient.ts +7 -1
- package/src/OpenAiConfig.ts +53 -8
package/dist/cjs/OpenAiClient.js
CHANGED
|
@@ -21,6 +21,7 @@ var Option = _interopRequireWildcard(require("effect/Option"));
|
|
|
21
21
|
var Redacted = _interopRequireWildcard(require("effect/Redacted"));
|
|
22
22
|
var Stream = _interopRequireWildcard(require("effect/Stream"));
|
|
23
23
|
var Generated = _interopRequireWildcard(require("./Generated.js"));
|
|
24
|
+
var _OpenAiConfig = require("./OpenAiConfig.js");
|
|
24
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
25
26
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
27
|
/**
|
|
@@ -40,7 +41,9 @@ exports.OpenAiClient = OpenAiClient;
|
|
|
40
41
|
const make = options => Effect.gen(function* () {
|
|
41
42
|
const httpClient = (yield* HttpClient.HttpClient).pipe(HttpClient.mapRequest(request => request.pipe(HttpClientRequest.prependUrl(options.apiUrl ?? "https://api.openai.com/v1"), options.apiKey ? HttpClientRequest.bearerToken(options.apiKey) : _Function.identity, options.organizationId !== undefined ? HttpClientRequest.setHeader("OpenAI-Organization", Redacted.value(options.organizationId)) : _Function.identity, options.projectId !== undefined ? HttpClientRequest.setHeader("OpenAI-Project", Redacted.value(options.projectId)) : _Function.identity, HttpClientRequest.acceptJson)), options.transformClient ? options.transformClient : _Function.identity);
|
|
42
43
|
const httpClientOk = HttpClient.filterStatusOk(httpClient);
|
|
43
|
-
const client = Generated.make(httpClient
|
|
44
|
+
const client = Generated.make(httpClient, {
|
|
45
|
+
transformClient: client => _OpenAiConfig.OpenAiConfig.getOrUndefined.pipe(Effect.map(config => config?.transformClient ? config.transformClient(client) : client))
|
|
46
|
+
});
|
|
44
47
|
const streamRequest = request => httpClientOk.execute(request).pipe(Effect.map(r => r.stream), Stream.unwrapScoped, Stream.decodeText(), Stream.pipeThroughChannel(Sse.makeChannel()), Stream.takeWhile(event => event.data !== "[DONE]"), Stream.map(event => JSON.parse(event.data)));
|
|
45
48
|
const stream = request => Stream.suspend(() => {
|
|
46
49
|
const finishReasons = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAiClient.js","names":["AiResponse","_interopRequireWildcard","require","AiRole","Sse","HttpBody","HttpClient","HttpClientRequest","Chunk","Config","Context","Data","Effect","_Function","Layer","Option","Redacted","Stream","Generated","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","OpenAiClient","Tag","exports","make","options","gen","httpClient","pipe","mapRequest","request","prependUrl","apiUrl","apiKey","bearerToken","identity","organizationId","undefined","setHeader","value","projectId","acceptJson","transformClient","httpClientOk","filterStatusOk","client","
|
|
1
|
+
{"version":3,"file":"OpenAiClient.js","names":["AiResponse","_interopRequireWildcard","require","AiRole","Sse","HttpBody","HttpClient","HttpClientRequest","Chunk","Config","Context","Data","Effect","_Function","Layer","Option","Redacted","Stream","Generated","_OpenAiConfig","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","OpenAiClient","Tag","exports","make","options","gen","httpClient","pipe","mapRequest","request","prependUrl","apiUrl","apiKey","bearerToken","identity","organizationId","undefined","setHeader","value","projectId","acceptJson","transformClient","httpClientOk","filterStatusOk","client","OpenAiConfig","getOrUndefined","map","config","streamRequest","execute","stream","unwrapScoped","decodeText","pipeThroughChannel","makeChannel","takeWhile","event","data","JSON","parse","suspend","finishReasons","post","body","unsafeJson","stream_options","include_usage","mapAccum","Map","acc","chunk","parts","usage","push","_tag","id","model","inputTokens","prompt_tokens","outputTokens","completion_tokens","systemFingerprint","system_fingerprint","serviceTier","service_tier","choices","length","choice","finish_reason","delta","content","part","index","Array","isArray","tool_calls","toolCall","toolPart","arguments","function","role","toolParts","args","name","none","some","StreamChunk","filterMap","of","layer","effect","layerConfig","unwrap","flatMap","Class","text","asAiResponse","fromText","ToolCallPart","fromUnknown","params","empty"],"sources":["../../src/OpenAiClient.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,UAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,GAAA,GAAA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5
|
});
|
|
6
|
-
exports.OpenAiConfig = void 0;
|
|
6
|
+
exports.withClientTransform = exports.OpenAiConfig = void 0;
|
|
7
7
|
var Context = _interopRequireWildcard(require("effect/Context"));
|
|
8
8
|
var Effect = _interopRequireWildcard(require("effect/Effect"));
|
|
9
|
+
var _Function = require("effect/Function");
|
|
9
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
|
-
/**
|
|
12
|
-
* @since 1.0.0
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
12
|
/**
|
|
16
13
|
* @since 1.0.0
|
|
17
14
|
* @category tags
|
|
@@ -22,5 +19,13 @@ class OpenAiConfig extends /*#__PURE__*/Context.Tag("@effect/ai-openai/OpenAiCon
|
|
|
22
19
|
*/
|
|
23
20
|
static getOrUndefined = /*#__PURE__*/Effect.map( /*#__PURE__*/Effect.context(), context => context.unsafeMap.get(OpenAiConfig.key));
|
|
24
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* @since 1.0.0
|
|
24
|
+
* @category configuration
|
|
25
|
+
*/
|
|
25
26
|
exports.OpenAiConfig = OpenAiConfig;
|
|
27
|
+
const withClientTransform = exports.withClientTransform = /*#__PURE__*/(0, _Function.dual)(2, (self, transformClient) => Effect.flatMap(OpenAiConfig.getOrUndefined, config => Effect.provideService(self, OpenAiConfig, {
|
|
28
|
+
...config,
|
|
29
|
+
transformClient
|
|
30
|
+
})));
|
|
26
31
|
//# sourceMappingURL=OpenAiConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAiConfig.js","names":["Context","_interopRequireWildcard","require","Effect","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","OpenAiConfig","Tag","getOrUndefined","map","context","unsafeMap","key"],"sources":["../../src/OpenAiConfig.ts"],"sourcesContent":[null],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"OpenAiConfig.js","names":["Context","_interopRequireWildcard","require","Effect","_Function","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","OpenAiConfig","Tag","getOrUndefined","map","context","unsafeMap","key","exports","withClientTransform","dual","self","transformClient","flatMap","config","provideService"],"sources":["../../src/OpenAiConfig.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAAsC,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAA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,CAAE,CAAC,CACtF,CACJ","ignoreList":[]}
|
package/dist/dts/Generated.d.ts
CHANGED
|
@@ -94,6 +94,9 @@ declare const AssistantToolsFunction_base: S.Struct<{
|
|
|
94
94
|
}>;
|
|
95
95
|
export declare class AssistantToolsFunction extends AssistantToolsFunction_base {
|
|
96
96
|
}
|
|
97
|
+
declare const Metadata_base: S.Record$<typeof S.String, typeof S.Unknown>;
|
|
98
|
+
export declare class Metadata extends Metadata_base {
|
|
99
|
+
}
|
|
97
100
|
declare const ResponseFormatTextType_base: S.Literal<["text"]>;
|
|
98
101
|
export declare class ResponseFormatTextType extends ResponseFormatTextType_base {
|
|
99
102
|
}
|
|
@@ -207,7 +210,7 @@ declare const AssistantObject_base: S.Struct<{
|
|
|
207
210
|
}>, {
|
|
208
211
|
nullable: true;
|
|
209
212
|
}>;
|
|
210
|
-
metadata: S.NullOr<
|
|
213
|
+
metadata: S.NullOr<typeof Metadata>;
|
|
211
214
|
temperature: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
212
215
|
nullable: true;
|
|
213
216
|
default: () => 1;
|
|
@@ -406,7 +409,7 @@ declare const CreateAssistantRequest_base: S.Class<CreateAssistantRequest, {
|
|
|
406
409
|
}>, {
|
|
407
410
|
nullable: true;
|
|
408
411
|
}>;
|
|
409
|
-
metadata: S.optionalWith<
|
|
412
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
410
413
|
nullable: true;
|
|
411
414
|
}>;
|
|
412
415
|
temperature: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
@@ -515,7 +518,7 @@ declare const CreateAssistantRequest_base: S.Class<CreateAssistantRequest, {
|
|
|
515
518
|
}>, {
|
|
516
519
|
nullable: true;
|
|
517
520
|
}>;
|
|
518
|
-
metadata: S.optionalWith<
|
|
521
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
519
522
|
nullable: true;
|
|
520
523
|
}>;
|
|
521
524
|
temperature: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
@@ -683,7 +686,7 @@ declare const ModifyAssistantRequest_base: S.Class<ModifyAssistantRequest, {
|
|
|
683
686
|
}>, {
|
|
684
687
|
nullable: true;
|
|
685
688
|
}>;
|
|
686
|
-
metadata: S.optionalWith<
|
|
689
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
687
690
|
nullable: true;
|
|
688
691
|
}>;
|
|
689
692
|
temperature: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
@@ -775,7 +778,7 @@ declare const ModifyAssistantRequest_base: S.Class<ModifyAssistantRequest, {
|
|
|
775
778
|
}>, {
|
|
776
779
|
nullable: true;
|
|
777
780
|
}>;
|
|
778
|
-
metadata: S.optionalWith<
|
|
781
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
779
782
|
nullable: true;
|
|
780
783
|
}>;
|
|
781
784
|
temperature: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
@@ -950,7 +953,7 @@ export declare class TranscriptionSegment extends TranscriptionSegment_base {
|
|
|
950
953
|
}
|
|
951
954
|
declare const CreateTranscriptionResponseVerboseJson_base: S.Struct<{
|
|
952
955
|
language: typeof S.String;
|
|
953
|
-
duration: typeof S.
|
|
956
|
+
duration: typeof S.Number;
|
|
954
957
|
text: typeof S.String;
|
|
955
958
|
words: S.optionalWith<S.Array$<typeof TranscriptionWord>, {
|
|
956
959
|
nullable: true;
|
|
@@ -971,7 +974,7 @@ export declare class CreateTranslationResponseJson extends CreateTranslationResp
|
|
|
971
974
|
}
|
|
972
975
|
declare const CreateTranslationResponseVerboseJson_base: S.Struct<{
|
|
973
976
|
language: typeof S.String;
|
|
974
|
-
duration: typeof S.
|
|
977
|
+
duration: typeof S.Number;
|
|
975
978
|
text: typeof S.String;
|
|
976
979
|
segments: S.optionalWith<S.Array$<typeof TranscriptionSegment>, {
|
|
977
980
|
nullable: true;
|
|
@@ -1067,7 +1070,7 @@ declare const Batch_base: S.Struct<{
|
|
|
1067
1070
|
}>, {
|
|
1068
1071
|
nullable: true;
|
|
1069
1072
|
}>;
|
|
1070
|
-
metadata: S.optionalWith<
|
|
1073
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
1071
1074
|
nullable: true;
|
|
1072
1075
|
}>;
|
|
1073
1076
|
}>;
|
|
@@ -1154,14 +1157,14 @@ declare const CreateBatchRequest_base: S.Class<CreateBatchRequest, {
|
|
|
1154
1157
|
input_file_id: typeof S.String;
|
|
1155
1158
|
endpoint: typeof CreateBatchRequestEndpoint;
|
|
1156
1159
|
completion_window: typeof CreateBatchRequestCompletionWindow;
|
|
1157
|
-
metadata: S.optionalWith<
|
|
1160
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
1158
1161
|
nullable: true;
|
|
1159
1162
|
}>;
|
|
1160
1163
|
}, S.Struct.Encoded<{
|
|
1161
1164
|
input_file_id: typeof S.String;
|
|
1162
1165
|
endpoint: typeof CreateBatchRequestEndpoint;
|
|
1163
1166
|
completion_window: typeof CreateBatchRequestCompletionWindow;
|
|
1164
|
-
metadata: S.optionalWith<
|
|
1167
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
1165
1168
|
nullable: true;
|
|
1166
1169
|
}>;
|
|
1167
1170
|
}>, never, {
|
|
@@ -1344,7 +1347,7 @@ export declare class ChatCompletionRequestFunctionMessage extends ChatCompletion
|
|
|
1344
1347
|
declare const ChatCompletionRequestMessage_base: S.Union<[typeof ChatCompletionRequestDeveloperMessage, typeof ChatCompletionRequestSystemMessage, typeof ChatCompletionRequestUserMessage, typeof ChatCompletionRequestAssistantMessage, typeof ChatCompletionRequestToolMessage, typeof ChatCompletionRequestFunctionMessage]>;
|
|
1345
1348
|
export declare class ChatCompletionRequestMessage extends ChatCompletionRequestMessage_base {
|
|
1346
1349
|
}
|
|
1347
|
-
declare const CreateChatCompletionRequestModel_base: S.Literal<["o1", "o1-2024-12-17", "o1-preview", "o1-preview-2024-09-12", "o1-mini", "o1-mini-2024-09-12", "gpt-4o", "gpt-4o-2024-11-20", "gpt-4o-2024-08-06", "gpt-4o-2024-05-13", "gpt-4o-audio-preview", "gpt-4o-audio-preview-2024-10-01", "gpt-4o-audio-preview-2024-12-17", "gpt-4o-mini-audio-preview", "gpt-4o-mini-audio-preview-2024-12-17", "chatgpt-4o-latest", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-0125-preview", "gpt-4-turbo-preview", "gpt-4-1106-preview", "gpt-4-vision-preview", "gpt-4", "gpt-4-0314", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0314", "gpt-4-32k-0613", "gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0301", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613"]>;
|
|
1350
|
+
declare const CreateChatCompletionRequestModel_base: S.Literal<["o3-mini", "o3-mini-2025-01-31", "o1", "o1-2024-12-17", "o1-preview", "o1-preview-2024-09-12", "o1-mini", "o1-mini-2024-09-12", "gpt-4o", "gpt-4o-2024-11-20", "gpt-4o-2024-08-06", "gpt-4o-2024-05-13", "gpt-4o-audio-preview", "gpt-4o-audio-preview-2024-10-01", "gpt-4o-audio-preview-2024-12-17", "gpt-4o-mini-audio-preview", "gpt-4o-mini-audio-preview-2024-12-17", "chatgpt-4o-latest", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-0125-preview", "gpt-4-turbo-preview", "gpt-4-1106-preview", "gpt-4-vision-preview", "gpt-4", "gpt-4-0314", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0314", "gpt-4-32k-0613", "gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0301", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613"]>;
|
|
1348
1351
|
export declare class CreateChatCompletionRequestModel extends CreateChatCompletionRequestModel_base {
|
|
1349
1352
|
}
|
|
1350
1353
|
declare const CreateChatCompletionRequestReasoningEffort_base: S.Literal<["low", "medium", "high"]>;
|
|
@@ -1433,7 +1436,7 @@ declare const CreateChatCompletionRequest_base: S.Class<CreateChatCompletionRequ
|
|
|
1433
1436
|
nullable: true;
|
|
1434
1437
|
default: () => "medium";
|
|
1435
1438
|
}>;
|
|
1436
|
-
metadata: S.optionalWith<
|
|
1439
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
1437
1440
|
nullable: true;
|
|
1438
1441
|
}>;
|
|
1439
1442
|
frequency_penalty: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
@@ -1546,7 +1549,7 @@ declare const CreateChatCompletionRequest_base: S.Class<CreateChatCompletionRequ
|
|
|
1546
1549
|
nullable: true;
|
|
1547
1550
|
default: () => "medium";
|
|
1548
1551
|
}>;
|
|
1549
|
-
metadata: S.optionalWith<
|
|
1552
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
1550
1553
|
nullable: true;
|
|
1551
1554
|
}>;
|
|
1552
1555
|
frequency_penalty: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
@@ -2015,21 +2018,25 @@ declare const CreateChatCompletionResponseObject_base: S.Literal<["chat.completi
|
|
|
2015
2018
|
export declare class CreateChatCompletionResponseObject extends CreateChatCompletionResponseObject_base {
|
|
2016
2019
|
}
|
|
2017
2020
|
declare const CompletionUsage_base: S.Struct<{
|
|
2018
|
-
completion_tokens:
|
|
2019
|
-
prompt_tokens:
|
|
2020
|
-
total_tokens:
|
|
2021
|
+
completion_tokens: S.PropertySignature<":", number, never, ":", number, true, never>;
|
|
2022
|
+
prompt_tokens: S.PropertySignature<":", number, never, ":", number, true, never>;
|
|
2023
|
+
total_tokens: S.PropertySignature<":", number, never, ":", number, true, never>;
|
|
2021
2024
|
completion_tokens_details: S.optionalWith<S.Struct<{
|
|
2022
2025
|
accepted_prediction_tokens: S.optionalWith<typeof S.Int, {
|
|
2023
2026
|
nullable: true;
|
|
2027
|
+
default: () => 0;
|
|
2024
2028
|
}>;
|
|
2025
2029
|
audio_tokens: S.optionalWith<typeof S.Int, {
|
|
2026
2030
|
nullable: true;
|
|
2031
|
+
default: () => 0;
|
|
2027
2032
|
}>;
|
|
2028
2033
|
reasoning_tokens: S.optionalWith<typeof S.Int, {
|
|
2029
2034
|
nullable: true;
|
|
2035
|
+
default: () => 0;
|
|
2030
2036
|
}>;
|
|
2031
2037
|
rejected_prediction_tokens: S.optionalWith<typeof S.Int, {
|
|
2032
2038
|
nullable: true;
|
|
2039
|
+
default: () => 0;
|
|
2033
2040
|
}>;
|
|
2034
2041
|
}>, {
|
|
2035
2042
|
nullable: true;
|
|
@@ -2037,9 +2044,11 @@ declare const CompletionUsage_base: S.Struct<{
|
|
|
2037
2044
|
prompt_tokens_details: S.optionalWith<S.Struct<{
|
|
2038
2045
|
audio_tokens: S.optionalWith<typeof S.Int, {
|
|
2039
2046
|
nullable: true;
|
|
2047
|
+
default: () => 0;
|
|
2040
2048
|
}>;
|
|
2041
2049
|
cached_tokens: S.optionalWith<typeof S.Int, {
|
|
2042
2050
|
nullable: true;
|
|
2051
|
+
default: () => 0;
|
|
2043
2052
|
}>;
|
|
2044
2053
|
}>, {
|
|
2045
2054
|
nullable: true;
|
|
@@ -2161,14 +2170,14 @@ declare const CreateChatCompletionResponse_base: S.Class<CreateChatCompletionRes
|
|
|
2161
2170
|
readonly prompt_tokens: number;
|
|
2162
2171
|
readonly total_tokens: number;
|
|
2163
2172
|
readonly completion_tokens_details?: {
|
|
2164
|
-
readonly accepted_prediction_tokens
|
|
2165
|
-
readonly audio_tokens
|
|
2166
|
-
readonly reasoning_tokens
|
|
2167
|
-
readonly rejected_prediction_tokens
|
|
2173
|
+
readonly accepted_prediction_tokens: number;
|
|
2174
|
+
readonly audio_tokens: number;
|
|
2175
|
+
readonly reasoning_tokens: number;
|
|
2176
|
+
readonly rejected_prediction_tokens: number;
|
|
2168
2177
|
} | undefined;
|
|
2169
2178
|
readonly prompt_tokens_details?: {
|
|
2170
|
-
readonly audio_tokens
|
|
2171
|
-
readonly cached_tokens
|
|
2179
|
+
readonly audio_tokens: number;
|
|
2180
|
+
readonly cached_tokens: number;
|
|
2172
2181
|
} | undefined;
|
|
2173
2182
|
} | undefined;
|
|
2174
2183
|
}, {}, {}>;
|
|
@@ -2436,14 +2445,14 @@ declare const CreateCompletionResponse_base: S.Class<CreateCompletionResponse, {
|
|
|
2436
2445
|
readonly prompt_tokens: number;
|
|
2437
2446
|
readonly total_tokens: number;
|
|
2438
2447
|
readonly completion_tokens_details?: {
|
|
2439
|
-
readonly accepted_prediction_tokens
|
|
2440
|
-
readonly audio_tokens
|
|
2441
|
-
readonly reasoning_tokens
|
|
2442
|
-
readonly rejected_prediction_tokens
|
|
2448
|
+
readonly accepted_prediction_tokens: number;
|
|
2449
|
+
readonly audio_tokens: number;
|
|
2450
|
+
readonly reasoning_tokens: number;
|
|
2451
|
+
readonly rejected_prediction_tokens: number;
|
|
2443
2452
|
} | undefined;
|
|
2444
2453
|
readonly prompt_tokens_details?: {
|
|
2445
|
-
readonly audio_tokens
|
|
2446
|
-
readonly cached_tokens
|
|
2454
|
+
readonly audio_tokens: number;
|
|
2455
|
+
readonly cached_tokens: number;
|
|
2447
2456
|
} | undefined;
|
|
2448
2457
|
} | undefined;
|
|
2449
2458
|
}, {}, {}>;
|
|
@@ -5735,6 +5744,9 @@ declare const ListUsersParams_base: S.Struct<{
|
|
|
5735
5744
|
after: S.optionalWith<typeof S.String, {
|
|
5736
5745
|
nullable: true;
|
|
5737
5746
|
}>;
|
|
5747
|
+
emails: S.optionalWith<S.Array$<typeof S.String>, {
|
|
5748
|
+
nullable: true;
|
|
5749
|
+
}>;
|
|
5738
5750
|
}>;
|
|
5739
5751
|
export declare class ListUsersParams extends ListUsersParams_base {
|
|
5740
5752
|
}
|
|
@@ -5859,6 +5871,12 @@ declare const RealtimeSessionCreateRequest_base: S.Class<RealtimeSessionCreateRe
|
|
|
5859
5871
|
model: S.optionalWith<typeof S.String, {
|
|
5860
5872
|
nullable: true;
|
|
5861
5873
|
}>;
|
|
5874
|
+
language: S.optionalWith<typeof S.String, {
|
|
5875
|
+
nullable: true;
|
|
5876
|
+
}>;
|
|
5877
|
+
prompt: S.optionalWith<typeof S.String, {
|
|
5878
|
+
nullable: true;
|
|
5879
|
+
}>;
|
|
5862
5880
|
}>, {
|
|
5863
5881
|
nullable: true;
|
|
5864
5882
|
}>;
|
|
@@ -5927,6 +5945,12 @@ declare const RealtimeSessionCreateRequest_base: S.Class<RealtimeSessionCreateRe
|
|
|
5927
5945
|
model: S.optionalWith<typeof S.String, {
|
|
5928
5946
|
nullable: true;
|
|
5929
5947
|
}>;
|
|
5948
|
+
language: S.optionalWith<typeof S.String, {
|
|
5949
|
+
nullable: true;
|
|
5950
|
+
}>;
|
|
5951
|
+
prompt: S.optionalWith<typeof S.String, {
|
|
5952
|
+
nullable: true;
|
|
5953
|
+
}>;
|
|
5930
5954
|
}>, {
|
|
5931
5955
|
nullable: true;
|
|
5932
5956
|
}>;
|
|
@@ -6001,6 +6025,8 @@ declare const RealtimeSessionCreateRequest_base: S.Class<RealtimeSessionCreateRe
|
|
|
6001
6025
|
} & {
|
|
6002
6026
|
readonly input_audio_transcription?: {
|
|
6003
6027
|
readonly model?: string | undefined;
|
|
6028
|
+
readonly language?: string | undefined;
|
|
6029
|
+
readonly prompt?: string | undefined;
|
|
6004
6030
|
} | undefined;
|
|
6005
6031
|
} & {
|
|
6006
6032
|
readonly turn_detection?: {
|
|
@@ -6025,15 +6051,9 @@ declare const RealtimeSessionCreateResponseMaxResponseOutputTokens_base: S.Liter
|
|
|
6025
6051
|
export declare class RealtimeSessionCreateResponseMaxResponseOutputTokens extends RealtimeSessionCreateResponseMaxResponseOutputTokens_base {
|
|
6026
6052
|
}
|
|
6027
6053
|
declare const RealtimeSessionCreateResponse_base: S.Class<RealtimeSessionCreateResponse, {
|
|
6028
|
-
client_secret: S.
|
|
6029
|
-
value:
|
|
6030
|
-
|
|
6031
|
-
}>;
|
|
6032
|
-
expires_at: S.optionalWith<typeof S.Int, {
|
|
6033
|
-
nullable: true;
|
|
6034
|
-
}>;
|
|
6035
|
-
}>, {
|
|
6036
|
-
nullable: true;
|
|
6054
|
+
client_secret: S.Struct<{
|
|
6055
|
+
value: typeof S.String;
|
|
6056
|
+
expires_at: typeof S.Int;
|
|
6037
6057
|
}>;
|
|
6038
6058
|
instructions: S.optionalWith<typeof S.String, {
|
|
6039
6059
|
nullable: true;
|
|
@@ -6096,15 +6116,9 @@ declare const RealtimeSessionCreateResponse_base: S.Class<RealtimeSessionCreateR
|
|
|
6096
6116
|
nullable: true;
|
|
6097
6117
|
}>;
|
|
6098
6118
|
}, S.Struct.Encoded<{
|
|
6099
|
-
client_secret: S.
|
|
6100
|
-
value:
|
|
6101
|
-
|
|
6102
|
-
}>;
|
|
6103
|
-
expires_at: S.optionalWith<typeof S.Int, {
|
|
6104
|
-
nullable: true;
|
|
6105
|
-
}>;
|
|
6106
|
-
}>, {
|
|
6107
|
-
nullable: true;
|
|
6119
|
+
client_secret: S.Struct<{
|
|
6120
|
+
value: typeof S.String;
|
|
6121
|
+
expires_at: typeof S.Int;
|
|
6108
6122
|
}>;
|
|
6109
6123
|
instructions: S.optionalWith<typeof S.String, {
|
|
6110
6124
|
nullable: true;
|
|
@@ -6201,10 +6215,10 @@ declare const RealtimeSessionCreateResponse_base: S.Class<RealtimeSessionCreateR
|
|
|
6201
6215
|
} & {
|
|
6202
6216
|
readonly max_response_output_tokens?: number | "inf" | undefined;
|
|
6203
6217
|
} & {
|
|
6204
|
-
readonly client_secret
|
|
6205
|
-
readonly value
|
|
6206
|
-
readonly expires_at
|
|
6207
|
-
}
|
|
6218
|
+
readonly client_secret: {
|
|
6219
|
+
readonly value: string;
|
|
6220
|
+
readonly expires_at: number;
|
|
6221
|
+
};
|
|
6208
6222
|
}, {}, {}>;
|
|
6209
6223
|
export declare class RealtimeSessionCreateResponse extends RealtimeSessionCreateResponse_base {
|
|
6210
6224
|
}
|
|
@@ -6277,7 +6291,7 @@ declare const CreateMessageRequest_base: S.Struct<{
|
|
|
6277
6291
|
}>>, {
|
|
6278
6292
|
nullable: true;
|
|
6279
6293
|
}>;
|
|
6280
|
-
metadata: S.optionalWith<
|
|
6294
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
6281
6295
|
nullable: true;
|
|
6282
6296
|
}>;
|
|
6283
6297
|
}>;
|
|
@@ -6328,7 +6342,7 @@ declare const CreateThreadRequest_base: S.Class<CreateThreadRequest, {
|
|
|
6328
6342
|
}>, {
|
|
6329
6343
|
nullable: true;
|
|
6330
6344
|
}>;
|
|
6331
|
-
metadata: S.optionalWith<
|
|
6345
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
6332
6346
|
nullable: true;
|
|
6333
6347
|
}>;
|
|
6334
6348
|
}, S.Struct.Encoded<{
|
|
@@ -6373,7 +6387,7 @@ declare const CreateThreadRequest_base: S.Class<CreateThreadRequest, {
|
|
|
6373
6387
|
}>, {
|
|
6374
6388
|
nullable: true;
|
|
6375
6389
|
}>;
|
|
6376
|
-
metadata: S.optionalWith<
|
|
6390
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
6377
6391
|
nullable: true;
|
|
6378
6392
|
}>;
|
|
6379
6393
|
}>, never, {
|
|
@@ -6471,7 +6485,7 @@ declare const ThreadObject_base: S.Class<ThreadObject, {
|
|
|
6471
6485
|
nullable: true;
|
|
6472
6486
|
}>;
|
|
6473
6487
|
}>>;
|
|
6474
|
-
metadata: S.NullOr<
|
|
6488
|
+
metadata: S.NullOr<typeof Metadata>;
|
|
6475
6489
|
}, S.Struct.Encoded<{
|
|
6476
6490
|
id: typeof S.String;
|
|
6477
6491
|
object: typeof ThreadObjectObject;
|
|
@@ -6493,7 +6507,7 @@ declare const ThreadObject_base: S.Class<ThreadObject, {
|
|
|
6493
6507
|
nullable: true;
|
|
6494
6508
|
}>;
|
|
6495
6509
|
}>>;
|
|
6496
|
-
metadata: S.NullOr<
|
|
6510
|
+
metadata: S.NullOr<typeof Metadata>;
|
|
6497
6511
|
}>, never, {
|
|
6498
6512
|
readonly object: "thread";
|
|
6499
6513
|
} & {
|
|
@@ -6621,7 +6635,7 @@ declare const CreateThreadAndRunRequest_base: S.Class<CreateThreadAndRunRequest,
|
|
|
6621
6635
|
}>, {
|
|
6622
6636
|
nullable: true;
|
|
6623
6637
|
}>;
|
|
6624
|
-
metadata: S.optionalWith<
|
|
6638
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
6625
6639
|
nullable: true;
|
|
6626
6640
|
}>;
|
|
6627
6641
|
temperature: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
@@ -6729,7 +6743,7 @@ declare const CreateThreadAndRunRequest_base: S.Class<CreateThreadAndRunRequest,
|
|
|
6729
6743
|
}>, {
|
|
6730
6744
|
nullable: true;
|
|
6731
6745
|
}>;
|
|
6732
|
-
metadata: S.optionalWith<
|
|
6746
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
6733
6747
|
nullable: true;
|
|
6734
6748
|
}>;
|
|
6735
6749
|
temperature: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
@@ -6956,7 +6970,7 @@ declare const RunObject_base: S.Class<RunObject, {
|
|
|
6956
6970
|
};
|
|
6957
6971
|
readonly type: "function";
|
|
6958
6972
|
})[], true, never>;
|
|
6959
|
-
metadata: S.NullOr<
|
|
6973
|
+
metadata: S.NullOr<typeof Metadata>;
|
|
6960
6974
|
usage: S.NullOr<typeof RunCompletionUsage>;
|
|
6961
6975
|
temperature: S.optionalWith<typeof S.Number, {
|
|
6962
6976
|
nullable: true;
|
|
@@ -7042,7 +7056,7 @@ declare const RunObject_base: S.Class<RunObject, {
|
|
|
7042
7056
|
};
|
|
7043
7057
|
readonly type: "function";
|
|
7044
7058
|
})[], true, never>;
|
|
7045
|
-
metadata: S.NullOr<
|
|
7059
|
+
metadata: S.NullOr<typeof Metadata>;
|
|
7046
7060
|
usage: S.NullOr<typeof RunCompletionUsage>;
|
|
7047
7061
|
temperature: S.optionalWith<typeof S.Number, {
|
|
7048
7062
|
nullable: true;
|
|
@@ -7199,7 +7213,7 @@ declare const ModifyThreadRequest_base: S.Class<ModifyThreadRequest, {
|
|
|
7199
7213
|
}>, {
|
|
7200
7214
|
nullable: true;
|
|
7201
7215
|
}>;
|
|
7202
|
-
metadata: S.optionalWith<
|
|
7216
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
7203
7217
|
nullable: true;
|
|
7204
7218
|
}>;
|
|
7205
7219
|
}, S.Struct.Encoded<{
|
|
@@ -7222,7 +7236,7 @@ declare const ModifyThreadRequest_base: S.Class<ModifyThreadRequest, {
|
|
|
7222
7236
|
}>, {
|
|
7223
7237
|
nullable: true;
|
|
7224
7238
|
}>;
|
|
7225
|
-
metadata: S.optionalWith<
|
|
7239
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
7226
7240
|
nullable: true;
|
|
7227
7241
|
}>;
|
|
7228
7242
|
}>, never, {
|
|
@@ -7369,7 +7383,7 @@ declare const MessageObject_base: S.Struct<{
|
|
|
7369
7383
|
nullable: true;
|
|
7370
7384
|
}>;
|
|
7371
7385
|
}>>>;
|
|
7372
|
-
metadata: S.NullOr<
|
|
7386
|
+
metadata: S.NullOr<typeof Metadata>;
|
|
7373
7387
|
}>;
|
|
7374
7388
|
export declare class MessageObject extends MessageObject_base {
|
|
7375
7389
|
}
|
|
@@ -7462,11 +7476,11 @@ declare const ListMessagesResponse_base: S.Class<ListMessagesResponse, {
|
|
|
7462
7476
|
export declare class ListMessagesResponse extends ListMessagesResponse_base {
|
|
7463
7477
|
}
|
|
7464
7478
|
declare const ModifyMessageRequest_base: S.Class<ModifyMessageRequest, {
|
|
7465
|
-
metadata: S.optionalWith<
|
|
7479
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
7466
7480
|
nullable: true;
|
|
7467
7481
|
}>;
|
|
7468
7482
|
}, S.Struct.Encoded<{
|
|
7469
|
-
metadata: S.optionalWith<
|
|
7483
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
7470
7484
|
nullable: true;
|
|
7471
7485
|
}>;
|
|
7472
7486
|
}>, never, {
|
|
@@ -7614,7 +7628,7 @@ declare const CreateRunRequest_base: S.Class<CreateRunRequest, {
|
|
|
7614
7628
|
})[], never>>, {
|
|
7615
7629
|
nullable: true;
|
|
7616
7630
|
}>;
|
|
7617
|
-
metadata: S.optionalWith<
|
|
7631
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
7618
7632
|
nullable: true;
|
|
7619
7633
|
}>;
|
|
7620
7634
|
temperature: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
@@ -7706,7 +7720,7 @@ declare const CreateRunRequest_base: S.Class<CreateRunRequest, {
|
|
|
7706
7720
|
})[], never>>, {
|
|
7707
7721
|
nullable: true;
|
|
7708
7722
|
}>;
|
|
7709
|
-
metadata: S.optionalWith<
|
|
7723
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
7710
7724
|
nullable: true;
|
|
7711
7725
|
}>;
|
|
7712
7726
|
temperature: S.optionalWith<S.filter<S.Schema<number, number, never>>, {
|
|
@@ -7864,11 +7878,11 @@ declare const CreateRunRequest_base: S.Class<CreateRunRequest, {
|
|
|
7864
7878
|
export declare class CreateRunRequest extends CreateRunRequest_base {
|
|
7865
7879
|
}
|
|
7866
7880
|
declare const ModifyRunRequest_base: S.Class<ModifyRunRequest, {
|
|
7867
|
-
metadata: S.optionalWith<
|
|
7881
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
7868
7882
|
nullable: true;
|
|
7869
7883
|
}>;
|
|
7870
7884
|
}, S.Struct.Encoded<{
|
|
7871
|
-
metadata: S.optionalWith<
|
|
7885
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
7872
7886
|
nullable: true;
|
|
7873
7887
|
}>;
|
|
7874
7888
|
}>, never, {
|
|
@@ -8055,7 +8069,7 @@ declare const RunStepObject_base: S.Struct<{
|
|
|
8055
8069
|
cancelled_at: S.NullOr<typeof S.Int>;
|
|
8056
8070
|
failed_at: S.NullOr<typeof S.Int>;
|
|
8057
8071
|
completed_at: S.NullOr<typeof S.Int>;
|
|
8058
|
-
metadata: S.NullOr<
|
|
8072
|
+
metadata: S.NullOr<typeof Metadata>;
|
|
8059
8073
|
usage: S.NullOr<typeof RunStepCompletionUsage>;
|
|
8060
8074
|
}>;
|
|
8061
8075
|
export declare class RunStepObject extends RunStepObject_base {
|
|
@@ -8343,7 +8357,7 @@ declare const VectorStoreObject_base: S.Struct<{
|
|
|
8343
8357
|
nullable: true;
|
|
8344
8358
|
}>;
|
|
8345
8359
|
last_active_at: S.NullOr<typeof S.Int>;
|
|
8346
|
-
metadata: S.NullOr<
|
|
8360
|
+
metadata: S.NullOr<typeof Metadata>;
|
|
8347
8361
|
}>;
|
|
8348
8362
|
export declare class VectorStoreObject extends VectorStoreObject_base {
|
|
8349
8363
|
}
|
|
@@ -8431,7 +8445,7 @@ declare const CreateVectorStoreRequest_base: S.Class<CreateVectorStoreRequest, {
|
|
|
8431
8445
|
chunking_strategy: S.optionalWith<S.Record$<typeof S.String, typeof S.Unknown>, {
|
|
8432
8446
|
nullable: true;
|
|
8433
8447
|
}>;
|
|
8434
|
-
metadata: S.optionalWith<
|
|
8448
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
8435
8449
|
nullable: true;
|
|
8436
8450
|
}>;
|
|
8437
8451
|
}, S.Struct.Encoded<{
|
|
@@ -8447,7 +8461,7 @@ declare const CreateVectorStoreRequest_base: S.Class<CreateVectorStoreRequest, {
|
|
|
8447
8461
|
chunking_strategy: S.optionalWith<S.Record$<typeof S.String, typeof S.Unknown>, {
|
|
8448
8462
|
nullable: true;
|
|
8449
8463
|
}>;
|
|
8450
|
-
metadata: S.optionalWith<
|
|
8464
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
8451
8465
|
nullable: true;
|
|
8452
8466
|
}>;
|
|
8453
8467
|
}>, never, {
|
|
@@ -8477,7 +8491,7 @@ declare const UpdateVectorStoreRequest_base: S.Class<UpdateVectorStoreRequest, {
|
|
|
8477
8491
|
expires_after: S.optionalWith<typeof VectorStoreExpirationAfter, {
|
|
8478
8492
|
nullable: true;
|
|
8479
8493
|
}>;
|
|
8480
|
-
metadata: S.optionalWith<
|
|
8494
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
8481
8495
|
nullable: true;
|
|
8482
8496
|
}>;
|
|
8483
8497
|
}, S.Struct.Encoded<{
|
|
@@ -8487,7 +8501,7 @@ declare const UpdateVectorStoreRequest_base: S.Class<UpdateVectorStoreRequest, {
|
|
|
8487
8501
|
expires_after: S.optionalWith<typeof VectorStoreExpirationAfter, {
|
|
8488
8502
|
nullable: true;
|
|
8489
8503
|
}>;
|
|
8490
|
-
metadata: S.optionalWith<
|
|
8504
|
+
metadata: S.optionalWith<typeof Metadata, {
|
|
8491
8505
|
nullable: true;
|
|
8492
8506
|
}>;
|
|
8493
8507
|
}>, never, {
|
|
@@ -8774,7 +8788,9 @@ declare const DeleteVectorStoreFileResponse_base: S.Class<DeleteVectorStoreFileR
|
|
|
8774
8788
|
}, {}, {}>;
|
|
8775
8789
|
export declare class DeleteVectorStoreFileResponse extends DeleteVectorStoreFileResponse_base {
|
|
8776
8790
|
}
|
|
8777
|
-
export declare const make: (httpClient: HttpClient.HttpClient
|
|
8791
|
+
export declare const make: (httpClient: HttpClient.HttpClient, options?: {
|
|
8792
|
+
readonly transformClient?: ((client: HttpClient.HttpClient) => Effect.Effect<HttpClient.HttpClient>) | undefined;
|
|
8793
|
+
}) => Client;
|
|
8778
8794
|
export interface Client {
|
|
8779
8795
|
readonly "listAssistants": (options: typeof ListAssistantsParams.Encoded) => Effect.Effect<typeof ListAssistantsResponse.Type, HttpClientError.HttpClientError | ParseError>;
|
|
8780
8796
|
readonly "createAssistant": (options: typeof CreateAssistantRequest.Encoded) => Effect.Effect<typeof AssistantObject.Type, HttpClientError.HttpClientError | ParseError>;
|