@effect/ai-openai 4.0.0-beta.7 → 4.0.0-beta.8
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/Generated.d.ts +59 -51
- package/dist/Generated.d.ts.map +1 -1
- package/dist/Generated.js +1 -1
- package/dist/Generated.js.map +1 -1
- package/package.json +3 -3
- package/src/Generated.ts +68 -84
package/dist/Generated.d.ts
CHANGED
|
@@ -9187,56 +9187,6 @@ export declare const ChatCompletionRequestAssistantMessage: Schema.Struct<{
|
|
|
9187
9187
|
readonly name: Schema.String;
|
|
9188
9188
|
}>, Schema.Null]>>;
|
|
9189
9189
|
}>;
|
|
9190
|
-
export type FineTuneChatCompletionRequestAssistantMessage = {
|
|
9191
|
-
readonly "role": "assistant";
|
|
9192
|
-
readonly "weight"?: 0 | 1;
|
|
9193
|
-
readonly "content"?: string | ReadonlyArray<ChatCompletionRequestAssistantMessageContentPart> | null;
|
|
9194
|
-
readonly "refusal"?: string | null;
|
|
9195
|
-
readonly "name"?: string;
|
|
9196
|
-
readonly "audio"?: {
|
|
9197
|
-
readonly "id": string;
|
|
9198
|
-
} | null;
|
|
9199
|
-
readonly "tool_calls"?: ChatCompletionMessageToolCalls;
|
|
9200
|
-
readonly "function_call"?: {
|
|
9201
|
-
readonly "arguments": string;
|
|
9202
|
-
readonly "name": string;
|
|
9203
|
-
} | null;
|
|
9204
|
-
};
|
|
9205
|
-
export declare const FineTuneChatCompletionRequestAssistantMessage: Schema.Struct<{
|
|
9206
|
-
readonly role: Schema.Literal<"assistant">;
|
|
9207
|
-
readonly weight: Schema.optionalKey<Schema.Literals<readonly [0, 1]>>;
|
|
9208
|
-
readonly content: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
9209
|
-
readonly type: Schema.Literal<"text">;
|
|
9210
|
-
readonly text: Schema.String;
|
|
9211
|
-
}>, Schema.Struct<{
|
|
9212
|
-
readonly type: Schema.Literal<"refusal">;
|
|
9213
|
-
readonly refusal: Schema.String;
|
|
9214
|
-
}>]>>]>, Schema.Null]>>;
|
|
9215
|
-
readonly refusal: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
9216
|
-
readonly name: Schema.optionalKey<Schema.String>;
|
|
9217
|
-
readonly audio: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
9218
|
-
readonly id: Schema.String;
|
|
9219
|
-
}>, Schema.Null]>>;
|
|
9220
|
-
readonly tool_calls: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
9221
|
-
readonly id: Schema.String;
|
|
9222
|
-
readonly type: Schema.Literal<"function">;
|
|
9223
|
-
readonly function: Schema.Struct<{
|
|
9224
|
-
readonly name: Schema.String;
|
|
9225
|
-
readonly arguments: Schema.String;
|
|
9226
|
-
}>;
|
|
9227
|
-
}>, Schema.Struct<{
|
|
9228
|
-
readonly id: Schema.String;
|
|
9229
|
-
readonly type: Schema.Literal<"custom">;
|
|
9230
|
-
readonly custom: Schema.Struct<{
|
|
9231
|
-
readonly name: Schema.String;
|
|
9232
|
-
readonly input: Schema.String;
|
|
9233
|
-
}>;
|
|
9234
|
-
}>]>>>;
|
|
9235
|
-
readonly function_call: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
9236
|
-
readonly arguments: Schema.String;
|
|
9237
|
-
readonly name: Schema.String;
|
|
9238
|
-
}>, Schema.Null]>>;
|
|
9239
|
-
}>;
|
|
9240
9190
|
export type ChatCompletionRequestSystemMessage = {
|
|
9241
9191
|
readonly "content": string | ReadonlyArray<ChatCompletionRequestSystemMessageContentPart>;
|
|
9242
9192
|
readonly "role": "system";
|
|
@@ -69113,6 +69063,8 @@ export interface OpenAiClient {
|
|
|
69113
69063
|
} | undefined) => Effect.Effect<WithOptionalResponse<typeof DeleteAssistant200.Type, Config>, HttpClientError.HttpClientError | SchemaError>;
|
|
69114
69064
|
/**
|
|
69115
69065
|
* Generates audio from the input text.
|
|
69066
|
+
*
|
|
69067
|
+
* Returns the audio file content, or a stream of audio events.
|
|
69116
69068
|
*/
|
|
69117
69069
|
readonly "createSpeech": <Config extends OperationConfig>(options: {
|
|
69118
69070
|
readonly payload: typeof CreateSpeechRequestJson.Encoded;
|
|
@@ -69120,6 +69072,8 @@ export interface OpenAiClient {
|
|
|
69120
69072
|
}) => Effect.Effect<WithOptionalResponse<void, Config>, HttpClientError.HttpClientError | SchemaError>;
|
|
69121
69073
|
/**
|
|
69122
69074
|
* Generates audio from the input text.
|
|
69075
|
+
*
|
|
69076
|
+
* Returns the audio file content, or a stream of audio events.
|
|
69123
69077
|
*/
|
|
69124
69078
|
readonly "createSpeechSse": (options: {
|
|
69125
69079
|
readonly payload: typeof CreateSpeechRequestJson.Encoded;
|
|
@@ -69130,12 +69084,17 @@ export interface OpenAiClient {
|
|
|
69130
69084
|
}, HttpClientError.HttpClientError | SchemaError | Sse.Retry, typeof CreateSpeech200Sse.DecodingServices>;
|
|
69131
69085
|
/**
|
|
69132
69086
|
* Generates audio from the input text.
|
|
69087
|
+
*
|
|
69088
|
+
* Returns the audio file content, or a stream of audio events.
|
|
69133
69089
|
*/
|
|
69134
69090
|
readonly "createSpeechStream": (options: {
|
|
69135
69091
|
readonly payload: typeof CreateSpeechRequestJson.Encoded;
|
|
69136
69092
|
}) => Stream.Stream<Uint8Array, HttpClientError.HttpClientError>;
|
|
69137
69093
|
/**
|
|
69138
69094
|
* Transcribes audio into the input language.
|
|
69095
|
+
*
|
|
69096
|
+
* Returns a transcription object in `json`, `diarized_json`, or `verbose_json`
|
|
69097
|
+
* format, or a stream of transcript events.
|
|
69139
69098
|
*/
|
|
69140
69099
|
readonly "createTranscription": <Config extends OperationConfig>(options: {
|
|
69141
69100
|
readonly payload: typeof CreateTranscriptionRequestFormData.Encoded;
|
|
@@ -69143,6 +69102,9 @@ export interface OpenAiClient {
|
|
|
69143
69102
|
}) => Effect.Effect<WithOptionalResponse<typeof CreateTranscription200.Type, Config>, HttpClientError.HttpClientError | SchemaError>;
|
|
69144
69103
|
/**
|
|
69145
69104
|
* Transcribes audio into the input language.
|
|
69105
|
+
*
|
|
69106
|
+
* Returns a transcription object in `json`, `diarized_json`, or `verbose_json`
|
|
69107
|
+
* format, or a stream of transcript events.
|
|
69146
69108
|
*/
|
|
69147
69109
|
readonly "createTranscriptionSse": (options: {
|
|
69148
69110
|
readonly payload: typeof CreateTranscriptionRequestFormData.Encoded;
|
|
@@ -69260,6 +69222,9 @@ export interface OpenAiClient {
|
|
|
69260
69222
|
* supported for reasoning models are noted below. For the current state of
|
|
69261
69223
|
* unsupported parameters in reasoning models,
|
|
69262
69224
|
* [refer to the reasoning guide](/docs/guides/reasoning).
|
|
69225
|
+
*
|
|
69226
|
+
* Returns a chat completion object, or a streamed sequence of chat completion
|
|
69227
|
+
* chunk objects if the request is streamed.
|
|
69263
69228
|
*/
|
|
69264
69229
|
readonly "createChatCompletion": <Config extends OperationConfig>(options: {
|
|
69265
69230
|
readonly payload: typeof CreateChatCompletionRequestJson.Encoded;
|
|
@@ -69281,6 +69246,9 @@ export interface OpenAiClient {
|
|
|
69281
69246
|
* supported for reasoning models are noted below. For the current state of
|
|
69282
69247
|
* unsupported parameters in reasoning models,
|
|
69283
69248
|
* [refer to the reasoning guide](/docs/guides/reasoning).
|
|
69249
|
+
*
|
|
69250
|
+
* Returns a chat completion object, or a streamed sequence of chat completion
|
|
69251
|
+
* chunk objects if the request is streamed.
|
|
69284
69252
|
*/
|
|
69285
69253
|
readonly "createChatCompletionSse": (options: {
|
|
69286
69254
|
readonly payload: typeof CreateChatCompletionRequestJson.Encoded;
|
|
@@ -69323,6 +69291,8 @@ export interface OpenAiClient {
|
|
|
69323
69291
|
} | undefined) => Effect.Effect<WithOptionalResponse<typeof GetChatCompletionMessages200.Type, Config>, HttpClientError.HttpClientError | SchemaError>;
|
|
69324
69292
|
/**
|
|
69325
69293
|
* Creates a completion for the provided prompt and parameters.
|
|
69294
|
+
*
|
|
69295
|
+
* Returns a completion object, or a sequence of completion objects if the request is streamed.
|
|
69326
69296
|
*/
|
|
69327
69297
|
readonly "createCompletion": <Config extends OperationConfig>(options: {
|
|
69328
69298
|
readonly payload: typeof CreateCompletionRequestJson.Encoded;
|
|
@@ -69957,6 +69927,9 @@ export interface OpenAiClient {
|
|
|
69957
69927
|
} | undefined) => Effect.Effect<WithOptionalResponse<typeof RetrieveProjectApiKey200.Type, Config>, HttpClientError.HttpClientError | SchemaError>;
|
|
69958
69928
|
/**
|
|
69959
69929
|
* Deletes an API key from the project.
|
|
69930
|
+
*
|
|
69931
|
+
* Returns confirmation of the key deletion, or an error if the key belonged to
|
|
69932
|
+
* a service account.
|
|
69960
69933
|
*/
|
|
69961
69934
|
readonly "deleteProjectApiKey": <Config extends OperationConfig>(projectId: string, keyId: string, options: {
|
|
69962
69935
|
readonly config?: Config | undefined;
|
|
@@ -70047,6 +70020,9 @@ export interface OpenAiClient {
|
|
|
70047
70020
|
} | undefined) => Effect.Effect<WithOptionalResponse<typeof RetrieveProjectServiceAccount200.Type, Config>, HttpClientError.HttpClientError | SchemaError>;
|
|
70048
70021
|
/**
|
|
70049
70022
|
* Deletes a service account from the project.
|
|
70023
|
+
*
|
|
70024
|
+
* Returns confirmation of service account deletion, or an error if the project
|
|
70025
|
+
* is archived (archived projects have no service accounts).
|
|
70050
70026
|
*/
|
|
70051
70027
|
readonly "deleteProjectServiceAccount": <Config extends OperationConfig>(projectId: string, serviceAccountId: string, options: {
|
|
70052
70028
|
readonly config?: Config | undefined;
|
|
@@ -70080,6 +70056,9 @@ export interface OpenAiClient {
|
|
|
70080
70056
|
}) => Effect.Effect<WithOptionalResponse<typeof ModifyProjectUser200.Type, Config>, HttpClientError.HttpClientError | SchemaError | OpenAiClientError<"ModifyProjectUser400", typeof ModifyProjectUser400.Type>>;
|
|
70081
70057
|
/**
|
|
70082
70058
|
* Deletes a user from the project.
|
|
70059
|
+
*
|
|
70060
|
+
* Returns confirmation of project user deletion, or an error if the project is
|
|
70061
|
+
* archived (archived projects have no users).
|
|
70083
70062
|
*/
|
|
70084
70063
|
readonly "deleteProjectUser": <Config extends OperationConfig>(projectId: string, userId: string, options: {
|
|
70085
70064
|
readonly config?: Config | undefined;
|
|
@@ -70319,6 +70298,18 @@ export interface OpenAiClient {
|
|
|
70319
70298
|
}) => Effect.Effect<WithOptionalResponse<void, Config>, HttpClientError.HttpClientError | SchemaError>;
|
|
70320
70299
|
/**
|
|
70321
70300
|
* Create a Realtime client secret with an associated session configuration.
|
|
70301
|
+
*
|
|
70302
|
+
* Client secrets are short-lived tokens that can be passed to a client app,
|
|
70303
|
+
* such as a web frontend or mobile client, which grants access to the Realtime API without
|
|
70304
|
+
* leaking your main API key. You can configure a custom TTL for each client secret.
|
|
70305
|
+
*
|
|
70306
|
+
* You can also attach session configuration options to the client secret, which will be
|
|
70307
|
+
* applied to any sessions created using that client secret, but these can also be overridden
|
|
70308
|
+
* by the client connection.
|
|
70309
|
+
*
|
|
70310
|
+
* [Learn more about authentication with client secrets over WebRTC](/docs/guides/realtime-webrtc).
|
|
70311
|
+
*
|
|
70312
|
+
* Returns the created client secret and the effective session object. The client secret is a string that looks like `ek_1234`.
|
|
70322
70313
|
*/
|
|
70323
70314
|
readonly "createRealtimeClientSecret": <Config extends OperationConfig>(options: {
|
|
70324
70315
|
readonly payload: typeof CreateRealtimeClientSecretRequestJson.Encoded;
|
|
@@ -70332,6 +70323,8 @@ export interface OpenAiClient {
|
|
|
70332
70323
|
* It responds with a session object, plus a `client_secret` key which contains
|
|
70333
70324
|
* a usable ephemeral API token that can be used to authenticate browser clients
|
|
70334
70325
|
* for the Realtime API.
|
|
70326
|
+
*
|
|
70327
|
+
* Returns the created Realtime session object, plus an ephemeral key.
|
|
70335
70328
|
*/
|
|
70336
70329
|
readonly "createRealtimeSession": <Config extends OperationConfig>(options: {
|
|
70337
70330
|
readonly payload: typeof CreateRealtimeSessionRequestJson.Encoded;
|
|
@@ -70345,6 +70338,8 @@ export interface OpenAiClient {
|
|
|
70345
70338
|
* It responds with a session object, plus a `client_secret` key which contains
|
|
70346
70339
|
* a usable ephemeral API token that can be used to authenticate browser clients
|
|
70347
70340
|
* for the Realtime API.
|
|
70341
|
+
*
|
|
70342
|
+
* Returns the created Realtime transcription session object, plus an ephemeral key.
|
|
70348
70343
|
*/
|
|
70349
70344
|
readonly "createRealtimeTranscriptionSession": <Config extends OperationConfig>(options: {
|
|
70350
70345
|
readonly payload: typeof CreateRealtimeTranscriptionSessionRequestJson.Encoded;
|
|
@@ -70546,6 +70541,8 @@ export interface OpenAiClient {
|
|
|
70546
70541
|
* For guidance on the proper filename extensions for each purpose, please
|
|
70547
70542
|
* follow the documentation on [creating a
|
|
70548
70543
|
* File](/docs/api-reference/files/create).
|
|
70544
|
+
*
|
|
70545
|
+
* Returns the Upload object with status `pending`.
|
|
70549
70546
|
*/
|
|
70550
70547
|
readonly "createUpload": <Config extends OperationConfig>(options: {
|
|
70551
70548
|
readonly payload: typeof CreateUploadRequestJson.Encoded;
|
|
@@ -70553,6 +70550,8 @@ export interface OpenAiClient {
|
|
|
70553
70550
|
}) => Effect.Effect<WithOptionalResponse<typeof CreateUpload200.Type, Config>, HttpClientError.HttpClientError | SchemaError>;
|
|
70554
70551
|
/**
|
|
70555
70552
|
* Cancels the Upload. No Parts may be added after an Upload is cancelled.
|
|
70553
|
+
*
|
|
70554
|
+
* Returns the Upload object with status `cancelled`.
|
|
70556
70555
|
*/
|
|
70557
70556
|
readonly "cancelUpload": <Config extends OperationConfig>(uploadId: string, options: {
|
|
70558
70557
|
readonly config?: Config | undefined;
|
|
@@ -70565,6 +70564,7 @@ export interface OpenAiClient {
|
|
|
70565
70564
|
* You can specify the order of the Parts by passing in an ordered list of the Part IDs.
|
|
70566
70565
|
*
|
|
70567
70566
|
* The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.
|
|
70567
|
+
* Returns the Upload object with status `completed`, including an additional `file` property containing the created usable File object.
|
|
70568
70568
|
*/
|
|
70569
70569
|
readonly "completeUpload": <Config extends OperationConfig>(uploadId: string, options: {
|
|
70570
70570
|
readonly payload: typeof CompleteUploadRequestJson.Encoded;
|
|
@@ -70740,6 +70740,8 @@ export interface OpenAiClient {
|
|
|
70740
70740
|
} | undefined) => Effect.Effect<WithOptionalResponse<typeof DeleteVideo200.Type, Config>, HttpClientError.HttpClientError | SchemaError>;
|
|
70741
70741
|
/**
|
|
70742
70742
|
* Download the generated video bytes or a derived preview asset.
|
|
70743
|
+
*
|
|
70744
|
+
* Streams the rendered video content for the specified video job.
|
|
70743
70745
|
*/
|
|
70744
70746
|
readonly "RetrieveVideoContent": <Config extends OperationConfig>(videoId: string, options: {
|
|
70745
70747
|
readonly params?: typeof RetrieveVideoContentParams.Encoded | undefined;
|
|
@@ -70754,13 +70756,17 @@ export interface OpenAiClient {
|
|
|
70754
70756
|
}) => Effect.Effect<WithOptionalResponse<typeof CreateVideoRemix200.Type, Config>, HttpClientError.HttpClientError | SchemaError>;
|
|
70755
70757
|
/**
|
|
70756
70758
|
* Returns input token counts of the request.
|
|
70759
|
+
*
|
|
70760
|
+
* Returns an object with `object` set to `response.input_tokens` and an `input_tokens` count.
|
|
70757
70761
|
*/
|
|
70758
70762
|
readonly "Getinputtokencounts": <Config extends OperationConfig>(options: {
|
|
70759
70763
|
readonly payload: typeof GetinputtokencountsRequestJson.Encoded;
|
|
70760
70764
|
readonly config?: Config | undefined;
|
|
70761
70765
|
}) => Effect.Effect<WithOptionalResponse<typeof Getinputtokencounts200.Type, Config>, HttpClientError.HttpClientError | SchemaError>;
|
|
70762
70766
|
/**
|
|
70763
|
-
*
|
|
70767
|
+
* Compact a conversation. Returns a compacted response object.
|
|
70768
|
+
*
|
|
70769
|
+
* Learn when and how to compact long-running conversations in the [conversation state guide](/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](/docs/guides/conversation-state#compaction-advanced).
|
|
70764
70770
|
*/
|
|
70765
70771
|
readonly "Compactconversation": <Config extends OperationConfig>(options: {
|
|
70766
70772
|
readonly payload: typeof CompactconversationRequestJson.Encoded;
|
|
@@ -70839,6 +70845,8 @@ export interface OpenAiClient {
|
|
|
70839
70845
|
} | undefined) => Effect.Effect<WithOptionalResponse<typeof GetSkillVersionContent200.Type, Config>, HttpClientError.HttpClientError | SchemaError>;
|
|
70840
70846
|
/**
|
|
70841
70847
|
* Cancel an active ChatKit session and return its most recent metadata.
|
|
70848
|
+
*
|
|
70849
|
+
* Cancelling prevents new requests from using the issued client secret.
|
|
70842
70850
|
*/
|
|
70843
70851
|
readonly "CancelChatSessionMethod": <Config extends OperationConfig>(sessionId: string, options: {
|
|
70844
70852
|
readonly config?: Config | undefined;
|