@effect/ai-openai 4.0.0-beta.7 → 4.0.0-beta.9
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/ai-openai",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "An OpenAI provider integration for Effect AI SDK",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"provenance": true
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"effect": "^4.0.0-beta.
|
|
46
|
+
"effect": "^4.0.0-beta.9"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"effect": "^4.0.0-beta.
|
|
49
|
+
"effect": "^4.0.0-beta.9"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"codegen": "effect-utils codegen",
|
package/src/Generated.ts
CHANGED
|
@@ -14156,80 +14156,6 @@ export const ChatCompletionRequestAssistantMessage = Schema.Struct({
|
|
|
14156
14156
|
"title": "Assistant message",
|
|
14157
14157
|
"description": "Messages sent by the model in response to user messages.\n"
|
|
14158
14158
|
})
|
|
14159
|
-
export type FineTuneChatCompletionRequestAssistantMessage = {
|
|
14160
|
-
readonly "role": "assistant"
|
|
14161
|
-
readonly "weight"?: 0 | 1
|
|
14162
|
-
readonly "content"?: string | ReadonlyArray<ChatCompletionRequestAssistantMessageContentPart> | null
|
|
14163
|
-
readonly "refusal"?: string | null
|
|
14164
|
-
readonly "name"?: string
|
|
14165
|
-
readonly "audio"?: { readonly "id": string } | null
|
|
14166
|
-
readonly "tool_calls"?: ChatCompletionMessageToolCalls
|
|
14167
|
-
readonly "function_call"?: { readonly "arguments": string; readonly "name": string } | null
|
|
14168
|
-
}
|
|
14169
|
-
export const FineTuneChatCompletionRequestAssistantMessage = Schema.Struct({
|
|
14170
|
-
"role": Schema.Literal("assistant").annotate({
|
|
14171
|
-
"description": "The role of the messages author, in this case `assistant`."
|
|
14172
|
-
}),
|
|
14173
|
-
"weight": Schema.optionalKey(
|
|
14174
|
-
Schema.Literals([0, 1]).annotate({
|
|
14175
|
-
"description": "Controls whether the assistant message is trained against (0 or 1)"
|
|
14176
|
-
})
|
|
14177
|
-
),
|
|
14178
|
-
"content": Schema.optionalKey(
|
|
14179
|
-
Schema.Union([
|
|
14180
|
-
Schema.Union([
|
|
14181
|
-
Schema.String.annotate({ "title": "Text content", "description": "The contents of the assistant message." }),
|
|
14182
|
-
Schema.Array(ChatCompletionRequestAssistantMessageContentPart).annotate({
|
|
14183
|
-
"title": "Array of content parts",
|
|
14184
|
-
"description":
|
|
14185
|
-
"An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`."
|
|
14186
|
-
}).check(Schema.isMinLength(1))
|
|
14187
|
-
], { mode: "oneOf" }).annotate({
|
|
14188
|
-
"description":
|
|
14189
|
-
"The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.\n"
|
|
14190
|
-
}),
|
|
14191
|
-
Schema.Null
|
|
14192
|
-
])
|
|
14193
|
-
),
|
|
14194
|
-
"refusal": Schema.optionalKey(
|
|
14195
|
-
Schema.Union([Schema.String.annotate({ "description": "The refusal message by the assistant." }), Schema.Null])
|
|
14196
|
-
),
|
|
14197
|
-
"name": Schema.optionalKey(
|
|
14198
|
-
Schema.String.annotate({
|
|
14199
|
-
"description":
|
|
14200
|
-
"An optional name for the participant. Provides the model information to differentiate between participants of the same role."
|
|
14201
|
-
})
|
|
14202
|
-
),
|
|
14203
|
-
"audio": Schema.optionalKey(
|
|
14204
|
-
Schema.Union([
|
|
14205
|
-
Schema.Struct({
|
|
14206
|
-
"id": Schema.String.annotate({
|
|
14207
|
-
"description": "Unique identifier for a previous audio response from the model.\n"
|
|
14208
|
-
})
|
|
14209
|
-
}).annotate({
|
|
14210
|
-
"description": "Data about a previous audio response from the model.\n[Learn more](/docs/guides/audio).\n"
|
|
14211
|
-
}),
|
|
14212
|
-
Schema.Null
|
|
14213
|
-
])
|
|
14214
|
-
),
|
|
14215
|
-
"tool_calls": Schema.optionalKey(ChatCompletionMessageToolCalls),
|
|
14216
|
-
"function_call": Schema.optionalKey(Schema.Union([
|
|
14217
|
-
Schema.Struct({
|
|
14218
|
-
"arguments": Schema.String.annotate({
|
|
14219
|
-
"description":
|
|
14220
|
-
"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."
|
|
14221
|
-
}),
|
|
14222
|
-
"name": Schema.String.annotate({ "description": "The name of the function to call." })
|
|
14223
|
-
}).annotate({
|
|
14224
|
-
"description":
|
|
14225
|
-
"Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model."
|
|
14226
|
-
}),
|
|
14227
|
-
Schema.Null
|
|
14228
|
-
]))
|
|
14229
|
-
}).annotate({
|
|
14230
|
-
"title": "Assistant message",
|
|
14231
|
-
"description": "Messages sent by the model in response to user messages.\n"
|
|
14232
|
-
})
|
|
14233
14159
|
export type ChatCompletionRequestSystemMessage = {
|
|
14234
14160
|
readonly "content": string | ReadonlyArray<ChatCompletionRequestSystemMessageContentPart>
|
|
14235
14161
|
readonly "role": "system"
|
|
@@ -19824,7 +19750,7 @@ export const CreateChatCompletionRequest = Schema.Struct({
|
|
|
19824
19750
|
"safety_identifier": Schema.optionalKey(
|
|
19825
19751
|
Schema.Union([Schema.String, Schema.Null]).annotate({
|
|
19826
19752
|
"description":
|
|
19827
|
-
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
19753
|
+
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
19828
19754
|
})
|
|
19829
19755
|
),
|
|
19830
19756
|
"prompt_cache_key": Schema.optionalKey(
|
|
@@ -21714,7 +21640,7 @@ export const Response = Schema.Struct({
|
|
|
21714
21640
|
"safety_identifier": Schema.optionalKey(
|
|
21715
21641
|
Schema.Union([Schema.String, Schema.Null]).annotate({
|
|
21716
21642
|
"description":
|
|
21717
|
-
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
21643
|
+
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
21718
21644
|
})
|
|
21719
21645
|
),
|
|
21720
21646
|
"prompt_cache_key": Schema.optionalKey(
|
|
@@ -21990,7 +21916,7 @@ export const ResponseCompletedEvent = Schema.Struct({
|
|
|
21990
21916
|
"safety_identifier": Schema.optionalKey(
|
|
21991
21917
|
Schema.Union([Schema.String, Schema.Null]).annotate({
|
|
21992
21918
|
"description":
|
|
21993
|
-
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
21919
|
+
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
21994
21920
|
})
|
|
21995
21921
|
),
|
|
21996
21922
|
"prompt_cache_key": Schema.optionalKey(
|
|
@@ -22271,7 +22197,7 @@ export const ResponseCreatedEvent = Schema.Struct({
|
|
|
22271
22197
|
"safety_identifier": Schema.optionalKey(
|
|
22272
22198
|
Schema.Union([Schema.String, Schema.Null]).annotate({
|
|
22273
22199
|
"description":
|
|
22274
|
-
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
22200
|
+
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
22275
22201
|
})
|
|
22276
22202
|
),
|
|
22277
22203
|
"prompt_cache_key": Schema.optionalKey(
|
|
@@ -22555,7 +22481,7 @@ export const ResponseFailedEvent = Schema.Struct({
|
|
|
22555
22481
|
"safety_identifier": Schema.optionalKey(
|
|
22556
22482
|
Schema.Union([Schema.String, Schema.Null]).annotate({
|
|
22557
22483
|
"description":
|
|
22558
|
-
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
22484
|
+
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
22559
22485
|
})
|
|
22560
22486
|
),
|
|
22561
22487
|
"prompt_cache_key": Schema.optionalKey(
|
|
@@ -22833,7 +22759,7 @@ export const ResponseInProgressEvent = Schema.Struct({
|
|
|
22833
22759
|
"safety_identifier": Schema.optionalKey(
|
|
22834
22760
|
Schema.Union([Schema.String, Schema.Null]).annotate({
|
|
22835
22761
|
"description":
|
|
22836
|
-
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
22762
|
+
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
22837
22763
|
})
|
|
22838
22764
|
),
|
|
22839
22765
|
"prompt_cache_key": Schema.optionalKey(
|
|
@@ -23114,7 +23040,7 @@ export const ResponseIncompleteEvent = Schema.Struct({
|
|
|
23114
23040
|
"safety_identifier": Schema.optionalKey(
|
|
23115
23041
|
Schema.Union([Schema.String, Schema.Null]).annotate({
|
|
23116
23042
|
"description":
|
|
23117
|
-
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
23043
|
+
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
23118
23044
|
})
|
|
23119
23045
|
),
|
|
23120
23046
|
"prompt_cache_key": Schema.optionalKey(
|
|
@@ -23395,7 +23321,7 @@ export const ResponseQueuedEvent = Schema.Struct({
|
|
|
23395
23321
|
"safety_identifier": Schema.optionalKey(
|
|
23396
23322
|
Schema.Union([Schema.String, Schema.Null]).annotate({
|
|
23397
23323
|
"description":
|
|
23398
|
-
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
23324
|
+
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
23399
23325
|
})
|
|
23400
23326
|
),
|
|
23401
23327
|
"prompt_cache_key": Schema.optionalKey(
|
|
@@ -23778,7 +23704,7 @@ export const CreateResponse = Schema.Struct({
|
|
|
23778
23704
|
"safety_identifier": Schema.optionalKey(
|
|
23779
23705
|
Schema.Union([Schema.String, Schema.Null]).annotate({
|
|
23780
23706
|
"description":
|
|
23781
|
-
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
23707
|
+
"A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\nThe IDs should be a string that uniquely identifies each user, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).\n"
|
|
23782
23708
|
})
|
|
23783
23709
|
),
|
|
23784
23710
|
"prompt_cache_key": Schema.optionalKey(
|
|
@@ -28212,12 +28138,16 @@ export interface OpenAiClient {
|
|
|
28212
28138
|
>
|
|
28213
28139
|
/**
|
|
28214
28140
|
* Generates audio from the input text.
|
|
28141
|
+
*
|
|
28142
|
+
* Returns the audio file content, or a stream of audio events.
|
|
28215
28143
|
*/
|
|
28216
28144
|
readonly "createSpeech": <Config extends OperationConfig>(
|
|
28217
28145
|
options: { readonly payload: typeof CreateSpeechRequestJson.Encoded; readonly config?: Config | undefined }
|
|
28218
28146
|
) => Effect.Effect<WithOptionalResponse<void, Config>, HttpClientError.HttpClientError | SchemaError>
|
|
28219
28147
|
/**
|
|
28220
28148
|
* Generates audio from the input text.
|
|
28149
|
+
*
|
|
28150
|
+
* Returns the audio file content, or a stream of audio events.
|
|
28221
28151
|
*/
|
|
28222
28152
|
readonly "createSpeechSse": (
|
|
28223
28153
|
options: { readonly payload: typeof CreateSpeechRequestJson.Encoded }
|
|
@@ -28228,12 +28158,17 @@ export interface OpenAiClient {
|
|
|
28228
28158
|
>
|
|
28229
28159
|
/**
|
|
28230
28160
|
* Generates audio from the input text.
|
|
28161
|
+
*
|
|
28162
|
+
* Returns the audio file content, or a stream of audio events.
|
|
28231
28163
|
*/
|
|
28232
28164
|
readonly "createSpeechStream": (
|
|
28233
28165
|
options: { readonly payload: typeof CreateSpeechRequestJson.Encoded }
|
|
28234
28166
|
) => Stream.Stream<Uint8Array, HttpClientError.HttpClientError>
|
|
28235
28167
|
/**
|
|
28236
28168
|
* Transcribes audio into the input language.
|
|
28169
|
+
*
|
|
28170
|
+
* Returns a transcription object in `json`, `diarized_json`, or `verbose_json`
|
|
28171
|
+
* format, or a stream of transcript events.
|
|
28237
28172
|
*/
|
|
28238
28173
|
readonly "createTranscription": <Config extends OperationConfig>(
|
|
28239
28174
|
options: {
|
|
@@ -28246,6 +28181,9 @@ export interface OpenAiClient {
|
|
|
28246
28181
|
>
|
|
28247
28182
|
/**
|
|
28248
28183
|
* Transcribes audio into the input language.
|
|
28184
|
+
*
|
|
28185
|
+
* Returns a transcription object in `json`, `diarized_json`, or `verbose_json`
|
|
28186
|
+
* format, or a stream of transcript events.
|
|
28249
28187
|
*/
|
|
28250
28188
|
readonly "createTranscriptionSse": (
|
|
28251
28189
|
options: { readonly payload: typeof CreateTranscriptionRequestFormData.Encoded }
|
|
@@ -28407,6 +28345,9 @@ export interface OpenAiClient {
|
|
|
28407
28345
|
* supported for reasoning models are noted below. For the current state of
|
|
28408
28346
|
* unsupported parameters in reasoning models,
|
|
28409
28347
|
* [refer to the reasoning guide](/docs/guides/reasoning).
|
|
28348
|
+
*
|
|
28349
|
+
* Returns a chat completion object, or a streamed sequence of chat completion
|
|
28350
|
+
* chunk objects if the request is streamed.
|
|
28410
28351
|
*/
|
|
28411
28352
|
readonly "createChatCompletion": <Config extends OperationConfig>(
|
|
28412
28353
|
options: { readonly payload: typeof CreateChatCompletionRequestJson.Encoded; readonly config?: Config | undefined }
|
|
@@ -28430,6 +28371,9 @@ export interface OpenAiClient {
|
|
|
28430
28371
|
* supported for reasoning models are noted below. For the current state of
|
|
28431
28372
|
* unsupported parameters in reasoning models,
|
|
28432
28373
|
* [refer to the reasoning guide](/docs/guides/reasoning).
|
|
28374
|
+
*
|
|
28375
|
+
* Returns a chat completion object, or a streamed sequence of chat completion
|
|
28376
|
+
* chunk objects if the request is streamed.
|
|
28433
28377
|
*/
|
|
28434
28378
|
readonly "createChatCompletionSse": (
|
|
28435
28379
|
options: { readonly payload: typeof CreateChatCompletionRequestJson.Encoded }
|
|
@@ -28489,6 +28433,8 @@ export interface OpenAiClient {
|
|
|
28489
28433
|
>
|
|
28490
28434
|
/**
|
|
28491
28435
|
* Creates a completion for the provided prompt and parameters.
|
|
28436
|
+
*
|
|
28437
|
+
* Returns a completion object, or a sequence of completion objects if the request is streamed.
|
|
28492
28438
|
*/
|
|
28493
28439
|
readonly "createCompletion": <Config extends OperationConfig>(
|
|
28494
28440
|
options: { readonly payload: typeof CreateCompletionRequestJson.Encoded; readonly config?: Config | undefined }
|
|
@@ -29460,6 +29406,9 @@ export interface OpenAiClient {
|
|
|
29460
29406
|
>
|
|
29461
29407
|
/**
|
|
29462
29408
|
* Deletes an API key from the project.
|
|
29409
|
+
*
|
|
29410
|
+
* Returns confirmation of the key deletion, or an error if the key belonged to
|
|
29411
|
+
* a service account.
|
|
29463
29412
|
*/
|
|
29464
29413
|
readonly "deleteProjectApiKey": <Config extends OperationConfig>(
|
|
29465
29414
|
projectId: string,
|
|
@@ -29629,6 +29578,9 @@ export interface OpenAiClient {
|
|
|
29629
29578
|
>
|
|
29630
29579
|
/**
|
|
29631
29580
|
* Deletes a service account from the project.
|
|
29581
|
+
*
|
|
29582
|
+
* Returns confirmation of service account deletion, or an error if the project
|
|
29583
|
+
* is archived (archived projects have no service accounts).
|
|
29632
29584
|
*/
|
|
29633
29585
|
readonly "deleteProjectServiceAccount": <Config extends OperationConfig>(
|
|
29634
29586
|
projectId: string,
|
|
@@ -29691,6 +29643,9 @@ export interface OpenAiClient {
|
|
|
29691
29643
|
>
|
|
29692
29644
|
/**
|
|
29693
29645
|
* Deletes a user from the project.
|
|
29646
|
+
*
|
|
29647
|
+
* Returns confirmation of project user deletion, or an error if the project is
|
|
29648
|
+
* archived (archived projects have no users).
|
|
29694
29649
|
*/
|
|
29695
29650
|
readonly "deleteProjectUser": <Config extends OperationConfig>(
|
|
29696
29651
|
projectId: string,
|
|
@@ -30056,6 +30011,18 @@ export interface OpenAiClient {
|
|
|
30056
30011
|
) => Effect.Effect<WithOptionalResponse<void, Config>, HttpClientError.HttpClientError | SchemaError>
|
|
30057
30012
|
/**
|
|
30058
30013
|
* Create a Realtime client secret with an associated session configuration.
|
|
30014
|
+
*
|
|
30015
|
+
* Client secrets are short-lived tokens that can be passed to a client app,
|
|
30016
|
+
* such as a web frontend or mobile client, which grants access to the Realtime API without
|
|
30017
|
+
* leaking your main API key. You can configure a custom TTL for each client secret.
|
|
30018
|
+
*
|
|
30019
|
+
* You can also attach session configuration options to the client secret, which will be
|
|
30020
|
+
* applied to any sessions created using that client secret, but these can also be overridden
|
|
30021
|
+
* by the client connection.
|
|
30022
|
+
*
|
|
30023
|
+
* [Learn more about authentication with client secrets over WebRTC](/docs/guides/realtime-webrtc).
|
|
30024
|
+
*
|
|
30025
|
+
* Returns the created client secret and the effective session object. The client secret is a string that looks like `ek_1234`.
|
|
30059
30026
|
*/
|
|
30060
30027
|
readonly "createRealtimeClientSecret": <Config extends OperationConfig>(
|
|
30061
30028
|
options: {
|
|
@@ -30074,6 +30041,8 @@ export interface OpenAiClient {
|
|
|
30074
30041
|
* It responds with a session object, plus a `client_secret` key which contains
|
|
30075
30042
|
* a usable ephemeral API token that can be used to authenticate browser clients
|
|
30076
30043
|
* for the Realtime API.
|
|
30044
|
+
*
|
|
30045
|
+
* Returns the created Realtime session object, plus an ephemeral key.
|
|
30077
30046
|
*/
|
|
30078
30047
|
readonly "createRealtimeSession": <Config extends OperationConfig>(
|
|
30079
30048
|
options: { readonly payload: typeof CreateRealtimeSessionRequestJson.Encoded; readonly config?: Config | undefined }
|
|
@@ -30089,6 +30058,8 @@ export interface OpenAiClient {
|
|
|
30089
30058
|
* It responds with a session object, plus a `client_secret` key which contains
|
|
30090
30059
|
* a usable ephemeral API token that can be used to authenticate browser clients
|
|
30091
30060
|
* for the Realtime API.
|
|
30061
|
+
*
|
|
30062
|
+
* Returns the created Realtime transcription session object, plus an ephemeral key.
|
|
30092
30063
|
*/
|
|
30093
30064
|
readonly "createRealtimeTranscriptionSession": <Config extends OperationConfig>(
|
|
30094
30065
|
options: {
|
|
@@ -30395,6 +30366,8 @@ export interface OpenAiClient {
|
|
|
30395
30366
|
* For guidance on the proper filename extensions for each purpose, please
|
|
30396
30367
|
* follow the documentation on [creating a
|
|
30397
30368
|
* File](/docs/api-reference/files/create).
|
|
30369
|
+
*
|
|
30370
|
+
* Returns the Upload object with status `pending`.
|
|
30398
30371
|
*/
|
|
30399
30372
|
readonly "createUpload": <Config extends OperationConfig>(
|
|
30400
30373
|
options: { readonly payload: typeof CreateUploadRequestJson.Encoded; readonly config?: Config | undefined }
|
|
@@ -30404,6 +30377,8 @@ export interface OpenAiClient {
|
|
|
30404
30377
|
>
|
|
30405
30378
|
/**
|
|
30406
30379
|
* Cancels the Upload. No Parts may be added after an Upload is cancelled.
|
|
30380
|
+
*
|
|
30381
|
+
* Returns the Upload object with status `cancelled`.
|
|
30407
30382
|
*/
|
|
30408
30383
|
readonly "cancelUpload": <Config extends OperationConfig>(
|
|
30409
30384
|
uploadId: string,
|
|
@@ -30420,6 +30395,7 @@ export interface OpenAiClient {
|
|
|
30420
30395
|
* You can specify the order of the Parts by passing in an ordered list of the Part IDs.
|
|
30421
30396
|
*
|
|
30422
30397
|
* 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.
|
|
30398
|
+
* Returns the Upload object with status `completed`, including an additional `file` property containing the created usable File object.
|
|
30423
30399
|
*/
|
|
30424
30400
|
readonly "completeUpload": <Config extends OperationConfig>(
|
|
30425
30401
|
uploadId: string,
|
|
@@ -30703,6 +30679,8 @@ export interface OpenAiClient {
|
|
|
30703
30679
|
>
|
|
30704
30680
|
/**
|
|
30705
30681
|
* Download the generated video bytes or a derived preview asset.
|
|
30682
|
+
*
|
|
30683
|
+
* Streams the rendered video content for the specified video job.
|
|
30706
30684
|
*/
|
|
30707
30685
|
readonly "RetrieveVideoContent": <Config extends OperationConfig>(
|
|
30708
30686
|
videoId: string,
|
|
@@ -30726,6 +30704,8 @@ export interface OpenAiClient {
|
|
|
30726
30704
|
>
|
|
30727
30705
|
/**
|
|
30728
30706
|
* Returns input token counts of the request.
|
|
30707
|
+
*
|
|
30708
|
+
* Returns an object with `object` set to `response.input_tokens` and an `input_tokens` count.
|
|
30729
30709
|
*/
|
|
30730
30710
|
readonly "Getinputtokencounts": <Config extends OperationConfig>(
|
|
30731
30711
|
options: { readonly payload: typeof GetinputtokencountsRequestJson.Encoded; readonly config?: Config | undefined }
|
|
@@ -30734,7 +30714,9 @@ export interface OpenAiClient {
|
|
|
30734
30714
|
HttpClientError.HttpClientError | SchemaError
|
|
30735
30715
|
>
|
|
30736
30716
|
/**
|
|
30737
|
-
*
|
|
30717
|
+
* Compact a conversation. Returns a compacted response object.
|
|
30718
|
+
*
|
|
30719
|
+
* 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).
|
|
30738
30720
|
*/
|
|
30739
30721
|
readonly "Compactconversation": <Config extends OperationConfig>(
|
|
30740
30722
|
options: { readonly payload: typeof CompactconversationRequestJson.Encoded; readonly config?: Config | undefined }
|
|
@@ -30866,6 +30848,8 @@ export interface OpenAiClient {
|
|
|
30866
30848
|
>
|
|
30867
30849
|
/**
|
|
30868
30850
|
* Cancel an active ChatKit session and return its most recent metadata.
|
|
30851
|
+
*
|
|
30852
|
+
* Cancelling prevents new requests from using the issued client secret.
|
|
30869
30853
|
*/
|
|
30870
30854
|
readonly "CancelChatSessionMethod": <Config extends OperationConfig>(
|
|
30871
30855
|
sessionId: string,
|