@effect/ai-openai 4.0.0-beta.5 → 4.0.0-beta.7

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/src/Generated.ts CHANGED
@@ -26017,7 +26017,7 @@ export const make = (
26017
26017
  }))
26018
26018
  ),
26019
26019
  "deleteAssistant": (assistantId, options) =>
26020
- HttpClientRequest.del(`/assistants/${assistantId}`).pipe(
26020
+ HttpClientRequest.delete(`/assistants/${assistantId}`).pipe(
26021
26021
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26022
26022
  "2xx": decodeSuccess(DeleteAssistant200),
26023
26023
  orElse: unexpectedStatus
@@ -26096,7 +26096,7 @@ export const make = (
26096
26096
  }))
26097
26097
  ),
26098
26098
  "deleteVoiceConsent": (consentId, options) =>
26099
- HttpClientRequest.del(`/audio/voice_consents/${consentId}`).pipe(
26099
+ HttpClientRequest.delete(`/audio/voice_consents/${consentId}`).pipe(
26100
26100
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26101
26101
  "2xx": decodeSuccess(DeleteVoiceConsent200),
26102
26102
  orElse: unexpectedStatus
@@ -26186,7 +26186,7 @@ export const make = (
26186
26186
  }))
26187
26187
  ),
26188
26188
  "deleteChatCompletion": (completionId, options) =>
26189
- HttpClientRequest.del(`/chat/completions/${completionId}`).pipe(
26189
+ HttpClientRequest.delete(`/chat/completions/${completionId}`).pipe(
26190
26190
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26191
26191
  "2xx": decodeSuccess(DeleteChatCompletion200),
26192
26192
  orElse: unexpectedStatus
@@ -26241,7 +26241,7 @@ export const make = (
26241
26241
  }))
26242
26242
  ),
26243
26243
  "DeleteContainer": (containerId, options) =>
26244
- HttpClientRequest.del(`/containers/${containerId}`).pipe(
26244
+ HttpClientRequest.delete(`/containers/${containerId}`).pipe(
26245
26245
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26246
26246
  "200": () => Effect.void,
26247
26247
  orElse: unexpectedStatus
@@ -26275,7 +26275,7 @@ export const make = (
26275
26275
  }))
26276
26276
  ),
26277
26277
  "DeleteContainerFile": (containerId, fileId, options) =>
26278
- HttpClientRequest.del(`/containers/${containerId}/files/${fileId}`).pipe(
26278
+ HttpClientRequest.delete(`/containers/${containerId}/files/${fileId}`).pipe(
26279
26279
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26280
26280
  "200": () => Effect.void,
26281
26281
  orElse: unexpectedStatus
@@ -26319,7 +26319,7 @@ export const make = (
26319
26319
  }))
26320
26320
  ),
26321
26321
  "deleteConversationItem": (conversationId, itemId, options) =>
26322
- HttpClientRequest.del(`/conversations/${conversationId}/items/${itemId}`).pipe(
26322
+ HttpClientRequest.delete(`/conversations/${conversationId}/items/${itemId}`).pipe(
26323
26323
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26324
26324
  "2xx": decodeSuccess(DeleteConversationItem200),
26325
26325
  orElse: unexpectedStatus
@@ -26370,7 +26370,7 @@ export const make = (
26370
26370
  }))
26371
26371
  ),
26372
26372
  "deleteEval": (evalId, options) =>
26373
- HttpClientRequest.del(`/evals/${evalId}`).pipe(
26373
+ HttpClientRequest.delete(`/evals/${evalId}`).pipe(
26374
26374
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26375
26375
  "2xx": decodeSuccess(DeleteEval200),
26376
26376
  "404": decodeError("DeleteEval404", DeleteEval404),
@@ -26414,7 +26414,7 @@ export const make = (
26414
26414
  }))
26415
26415
  ),
26416
26416
  "deleteEvalRun": (evalId, runId, options) =>
26417
- HttpClientRequest.del(`/evals/${evalId}/runs/${runId}`).pipe(
26417
+ HttpClientRequest.delete(`/evals/${evalId}/runs/${runId}`).pipe(
26418
26418
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26419
26419
  "2xx": decodeSuccess(DeleteEvalRun200),
26420
26420
  "404": decodeError("DeleteEvalRun404", DeleteEvalRun404),
@@ -26470,7 +26470,7 @@ export const make = (
26470
26470
  }))
26471
26471
  ),
26472
26472
  "deleteFile": (fileId, options) =>
26473
- HttpClientRequest.del(`/files/${fileId}`).pipe(
26473
+ HttpClientRequest.delete(`/files/${fileId}`).pipe(
26474
26474
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26475
26475
  "2xx": decodeSuccess(DeleteFile200),
26476
26476
  orElse: unexpectedStatus
@@ -26521,7 +26521,7 @@ export const make = (
26521
26521
  }))
26522
26522
  ),
26523
26523
  "deleteFineTuningCheckpointPermission": (fineTunedModelCheckpoint, permissionId, options) =>
26524
- HttpClientRequest.del(`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions/${permissionId}`).pipe(
26524
+ HttpClientRequest.delete(`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions/${permissionId}`).pipe(
26525
26525
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26526
26526
  "2xx": decodeSuccess(DeleteFineTuningCheckpointPermission200),
26527
26527
  orElse: unexpectedStatus
@@ -26646,7 +26646,7 @@ export const make = (
26646
26646
  }))
26647
26647
  ),
26648
26648
  "deleteModel": (model, options) =>
26649
- HttpClientRequest.del(`/models/${model}`).pipe(
26649
+ HttpClientRequest.delete(`/models/${model}`).pipe(
26650
26650
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26651
26651
  "2xx": decodeSuccess(DeleteModel200),
26652
26652
  orElse: unexpectedStatus
@@ -26688,7 +26688,7 @@ export const make = (
26688
26688
  }))
26689
26689
  ),
26690
26690
  "adminApiKeysDelete": (keyId, options) =>
26691
- HttpClientRequest.del(`/organization/admin_api_keys/${keyId}`).pipe(
26691
+ HttpClientRequest.delete(`/organization/admin_api_keys/${keyId}`).pipe(
26692
26692
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26693
26693
  "2xx": decodeSuccess(AdminApiKeysDelete200),
26694
26694
  orElse: unexpectedStatus
@@ -26768,7 +26768,7 @@ export const make = (
26768
26768
  }))
26769
26769
  ),
26770
26770
  "deleteCertificate": (certificateId, options) =>
26771
- HttpClientRequest.del(`/organization/certificates/${certificateId}`).pipe(
26771
+ HttpClientRequest.delete(`/organization/certificates/${certificateId}`).pipe(
26772
26772
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26773
26773
  "2xx": decodeSuccess(DeleteCertificate200),
26774
26774
  orElse: unexpectedStatus
@@ -26819,7 +26819,7 @@ export const make = (
26819
26819
  }))
26820
26820
  ),
26821
26821
  "deleteGroup": (groupId, options) =>
26822
- HttpClientRequest.del(`/organization/groups/${groupId}`).pipe(
26822
+ HttpClientRequest.delete(`/organization/groups/${groupId}`).pipe(
26823
26823
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26824
26824
  "2xx": decodeSuccess(DeleteGroup200),
26825
26825
  orElse: unexpectedStatus
@@ -26846,7 +26846,7 @@ export const make = (
26846
26846
  }))
26847
26847
  ),
26848
26848
  "unassignGroupRole": (groupId, roleId, options) =>
26849
- HttpClientRequest.del(`/organization/groups/${groupId}/roles/${roleId}`).pipe(
26849
+ HttpClientRequest.delete(`/organization/groups/${groupId}/roles/${roleId}`).pipe(
26850
26850
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26851
26851
  "2xx": decodeSuccess(UnassignGroupRole200),
26852
26852
  orElse: unexpectedStatus
@@ -26873,7 +26873,7 @@ export const make = (
26873
26873
  }))
26874
26874
  ),
26875
26875
  "removeGroupUser": (groupId, userId, options) =>
26876
- HttpClientRequest.del(`/organization/groups/${groupId}/users/${userId}`).pipe(
26876
+ HttpClientRequest.delete(`/organization/groups/${groupId}/users/${userId}`).pipe(
26877
26877
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26878
26878
  "2xx": decodeSuccess(RemoveGroupUser200),
26879
26879
  orElse: unexpectedStatus
@@ -26906,7 +26906,7 @@ export const make = (
26906
26906
  }))
26907
26907
  ),
26908
26908
  "deleteInvite": (inviteId, options) =>
26909
- HttpClientRequest.del(`/organization/invites/${inviteId}`).pipe(
26909
+ HttpClientRequest.delete(`/organization/invites/${inviteId}`).pipe(
26910
26910
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26911
26911
  "2xx": decodeSuccess(DeleteInvite200),
26912
26912
  orElse: unexpectedStatus
@@ -26967,7 +26967,7 @@ export const make = (
26967
26967
  }))
26968
26968
  ),
26969
26969
  "deleteProjectApiKey": (projectId, keyId, options) =>
26970
- HttpClientRequest.del(`/organization/projects/${projectId}/api_keys/${keyId}`).pipe(
26970
+ HttpClientRequest.delete(`/organization/projects/${projectId}/api_keys/${keyId}`).pipe(
26971
26971
  withResponse(options?.config)(HttpClientResponse.matchStatus({
26972
26972
  "2xx": decodeSuccess(DeleteProjectApiKey200),
26973
26973
  "400": decodeError("DeleteProjectApiKey400", DeleteProjectApiKey400),
@@ -27030,7 +27030,7 @@ export const make = (
27030
27030
  }))
27031
27031
  ),
27032
27032
  "removeProjectGroup": (projectId, groupId, options) =>
27033
- HttpClientRequest.del(`/organization/projects/${projectId}/groups/${groupId}`).pipe(
27033
+ HttpClientRequest.delete(`/organization/projects/${projectId}/groups/${groupId}`).pipe(
27034
27034
  withResponse(options?.config)(HttpClientResponse.matchStatus({
27035
27035
  "2xx": decodeSuccess(RemoveProjectGroup200),
27036
27036
  orElse: unexpectedStatus
@@ -27086,7 +27086,7 @@ export const make = (
27086
27086
  }))
27087
27087
  ),
27088
27088
  "deleteProjectServiceAccount": (projectId, serviceAccountId, options) =>
27089
- HttpClientRequest.del(`/organization/projects/${projectId}/service_accounts/${serviceAccountId}`).pipe(
27089
+ HttpClientRequest.delete(`/organization/projects/${projectId}/service_accounts/${serviceAccountId}`).pipe(
27090
27090
  withResponse(options?.config)(HttpClientResponse.matchStatus({
27091
27091
  "2xx": decodeSuccess(DeleteProjectServiceAccount200),
27092
27092
  orElse: unexpectedStatus
@@ -27130,7 +27130,7 @@ export const make = (
27130
27130
  }))
27131
27131
  ),
27132
27132
  "deleteProjectUser": (projectId, userId, options) =>
27133
- HttpClientRequest.del(`/organization/projects/${projectId}/users/${userId}`).pipe(
27133
+ HttpClientRequest.delete(`/organization/projects/${projectId}/users/${userId}`).pipe(
27134
27134
  withResponse(options?.config)(HttpClientResponse.matchStatus({
27135
27135
  "2xx": decodeSuccess(DeleteProjectUser200),
27136
27136
  "400": decodeError("DeleteProjectUser400", DeleteProjectUser400),
@@ -27166,7 +27166,7 @@ export const make = (
27166
27166
  }))
27167
27167
  ),
27168
27168
  "deleteRole": (roleId, options) =>
27169
- HttpClientRequest.del(`/organization/roles/${roleId}`).pipe(
27169
+ HttpClientRequest.delete(`/organization/roles/${roleId}`).pipe(
27170
27170
  withResponse(options?.config)(HttpClientResponse.matchStatus({
27171
27171
  "2xx": decodeSuccess(DeleteRole200),
27172
27172
  orElse: unexpectedStatus
@@ -27349,7 +27349,7 @@ export const make = (
27349
27349
  }))
27350
27350
  ),
27351
27351
  "deleteUser": (userId, options) =>
27352
- HttpClientRequest.del(`/organization/users/${userId}`).pipe(
27352
+ HttpClientRequest.delete(`/organization/users/${userId}`).pipe(
27353
27353
  withResponse(options?.config)(HttpClientResponse.matchStatus({
27354
27354
  "2xx": decodeSuccess(DeleteUser200),
27355
27355
  orElse: unexpectedStatus
@@ -27376,7 +27376,7 @@ export const make = (
27376
27376
  }))
27377
27377
  ),
27378
27378
  "unassignUserRole": (userId, roleId, options) =>
27379
- HttpClientRequest.del(`/organization/users/${userId}/roles/${roleId}`).pipe(
27379
+ HttpClientRequest.delete(`/organization/users/${userId}/roles/${roleId}`).pipe(
27380
27380
  withResponse(options?.config)(HttpClientResponse.matchStatus({
27381
27381
  "2xx": decodeSuccess(UnassignUserRole200),
27382
27382
  orElse: unexpectedStatus
@@ -27403,7 +27403,7 @@ export const make = (
27403
27403
  }))
27404
27404
  ),
27405
27405
  "unassignProjectGroupRole": (projectId, groupId, roleId, options) =>
27406
- HttpClientRequest.del(`/projects/${projectId}/groups/${groupId}/roles/${roleId}`).pipe(
27406
+ HttpClientRequest.delete(`/projects/${projectId}/groups/${groupId}/roles/${roleId}`).pipe(
27407
27407
  withResponse(options?.config)(HttpClientResponse.matchStatus({
27408
27408
  "2xx": decodeSuccess(UnassignProjectGroupRole200),
27409
27409
  orElse: unexpectedStatus
@@ -27438,7 +27438,7 @@ export const make = (
27438
27438
  }))
27439
27439
  ),
27440
27440
  "deleteProjectRole": (projectId, roleId, options) =>
27441
- HttpClientRequest.del(`/projects/${projectId}/roles/${roleId}`).pipe(
27441
+ HttpClientRequest.delete(`/projects/${projectId}/roles/${roleId}`).pipe(
27442
27442
  withResponse(options?.config)(HttpClientResponse.matchStatus({
27443
27443
  "2xx": decodeSuccess(DeleteProjectRole200),
27444
27444
  orElse: unexpectedStatus
@@ -27465,7 +27465,7 @@ export const make = (
27465
27465
  }))
27466
27466
  ),
27467
27467
  "unassignProjectUserRole": (projectId, userId, roleId, options) =>
27468
- HttpClientRequest.del(`/projects/${projectId}/users/${userId}/roles/${roleId}`).pipe(
27468
+ HttpClientRequest.delete(`/projects/${projectId}/users/${userId}/roles/${roleId}`).pipe(
27469
27469
  withResponse(options?.config)(HttpClientResponse.matchStatus({
27470
27470
  "2xx": decodeSuccess(UnassignProjectUserRole200),
27471
27471
  orElse: unexpectedStatus
@@ -27560,7 +27560,7 @@ export const make = (
27560
27560
  }))
27561
27561
  ),
27562
27562
  "deleteResponse": (responseId, options) =>
27563
- HttpClientRequest.del(`/responses/${responseId}`).pipe(
27563
+ HttpClientRequest.delete(`/responses/${responseId}`).pipe(
27564
27564
  withResponse(options?.config)(HttpClientResponse.matchStatus({
27565
27565
  "404": decodeError("DeleteResponse404", DeleteResponse404),
27566
27566
  "200": () => Effect.void,
@@ -27620,7 +27620,7 @@ export const make = (
27620
27620
  }))
27621
27621
  ),
27622
27622
  "deleteThread": (threadId, options) =>
27623
- HttpClientRequest.del(`/threads/${threadId}`).pipe(
27623
+ HttpClientRequest.delete(`/threads/${threadId}`).pipe(
27624
27624
  withResponse(options?.config)(HttpClientResponse.matchStatus({
27625
27625
  "2xx": decodeSuccess(DeleteThread200),
27626
27626
  orElse: unexpectedStatus
@@ -27664,7 +27664,7 @@ export const make = (
27664
27664
  }))
27665
27665
  ),
27666
27666
  "deleteMessage": (threadId, messageId, options) =>
27667
- HttpClientRequest.del(`/threads/${threadId}/messages/${messageId}`).pipe(
27667
+ HttpClientRequest.delete(`/threads/${threadId}/messages/${messageId}`).pipe(
27668
27668
  withResponse(options?.config)(HttpClientResponse.matchStatus({
27669
27669
  "2xx": decodeSuccess(DeleteMessage200),
27670
27670
  orElse: unexpectedStatus
@@ -27812,7 +27812,7 @@ export const make = (
27812
27812
  }))
27813
27813
  ),
27814
27814
  "deleteVectorStore": (vectorStoreId, options) =>
27815
- HttpClientRequest.del(`/vector_stores/${vectorStoreId}`).pipe(
27815
+ HttpClientRequest.delete(`/vector_stores/${vectorStoreId}`).pipe(
27816
27816
  withResponse(options?.config)(HttpClientResponse.matchStatus({
27817
27817
  "2xx": decodeSuccess(DeleteVectorStore200),
27818
27818
  orElse: unexpectedStatus
@@ -27892,7 +27892,7 @@ export const make = (
27892
27892
  }))
27893
27893
  ),
27894
27894
  "deleteVectorStoreFile": (vectorStoreId, fileId, options) =>
27895
- HttpClientRequest.del(`/vector_stores/${vectorStoreId}/files/${fileId}`).pipe(
27895
+ HttpClientRequest.delete(`/vector_stores/${vectorStoreId}/files/${fileId}`).pipe(
27896
27896
  withResponse(options?.config)(HttpClientResponse.matchStatus({
27897
27897
  "2xx": decodeSuccess(DeleteVectorStoreFile200),
27898
27898
  orElse: unexpectedStatus
@@ -27937,7 +27937,7 @@ export const make = (
27937
27937
  }))
27938
27938
  ),
27939
27939
  "deleteConversation": (conversationId, options) =>
27940
- HttpClientRequest.del(`/conversations/${conversationId}`).pipe(
27940
+ HttpClientRequest.delete(`/conversations/${conversationId}`).pipe(
27941
27941
  withResponse(options?.config)(HttpClientResponse.matchStatus({
27942
27942
  "2xx": decodeSuccess(DeleteConversation200),
27943
27943
  orElse: unexpectedStatus
@@ -27971,7 +27971,7 @@ export const make = (
27971
27971
  }))
27972
27972
  ),
27973
27973
  "DeleteVideo": (videoId, options) =>
27974
- HttpClientRequest.del(`/videos/${videoId}`).pipe(
27974
+ HttpClientRequest.delete(`/videos/${videoId}`).pipe(
27975
27975
  withResponse(options?.config)(HttpClientResponse.matchStatus({
27976
27976
  "2xx": decodeSuccess(DeleteVideo200),
27977
27977
  orElse: unexpectedStatus
@@ -28045,7 +28045,7 @@ export const make = (
28045
28045
  }))
28046
28046
  ),
28047
28047
  "DeleteSkill": (skillId, options) =>
28048
- HttpClientRequest.del(`/skills/${skillId}`).pipe(
28048
+ HttpClientRequest.delete(`/skills/${skillId}`).pipe(
28049
28049
  withResponse(options?.config)(HttpClientResponse.matchStatus({
28050
28050
  "2xx": decodeSuccess(DeleteSkill200),
28051
28051
  orElse: unexpectedStatus
@@ -28086,7 +28086,7 @@ export const make = (
28086
28086
  }))
28087
28087
  ),
28088
28088
  "DeleteSkillVersion": (skillId, version, options) =>
28089
- HttpClientRequest.del(`/skills/${skillId}/versions/${version}`).pipe(
28089
+ HttpClientRequest.delete(`/skills/${skillId}/versions/${version}`).pipe(
28090
28090
  withResponse(options?.config)(HttpClientResponse.matchStatus({
28091
28091
  "2xx": decodeSuccess(DeleteSkillVersion200),
28092
28092
  orElse: unexpectedStatus
@@ -28135,7 +28135,7 @@ export const make = (
28135
28135
  }))
28136
28136
  ),
28137
28137
  "DeleteThreadMethod": (threadId, options) =>
28138
- HttpClientRequest.del(`/chatkit/threads/${threadId}`).pipe(
28138
+ HttpClientRequest.delete(`/chatkit/threads/${threadId}`).pipe(
28139
28139
  withResponse(options?.config)(HttpClientResponse.matchStatus({
28140
28140
  "2xx": decodeSuccess(DeleteThreadMethod200),
28141
28141
  orElse: unexpectedStatus
@@ -8,7 +8,7 @@
8
8
  */
9
9
  import * as DateTime from "effect/DateTime"
10
10
  import * as Effect from "effect/Effect"
11
- import * as Base64 from "effect/encoding/Base64"
11
+ import * as Encoding from "effect/Encoding"
12
12
  import { dual } from "effect/Function"
13
13
  import * as Layer from "effect/Layer"
14
14
  import * as Predicate from "effect/Predicate"
@@ -592,7 +592,7 @@ const prepareMessages = Effect.fnUntraced(
592
592
  }
593
593
 
594
594
  if (part.data instanceof Uint8Array) {
595
- const base64 = Base64.encode(part.data)
595
+ const base64 = Encoding.encodeBase64(part.data)
596
596
  const imageUrl = `data:${mediaType};base64,${base64}`
597
597
  content.push({ type: "input_image", image_url: imageUrl, detail })
598
598
  }
@@ -606,7 +606,7 @@ const prepareMessages = Effect.fnUntraced(
606
606
  }
607
607
 
608
608
  if (part.data instanceof Uint8Array) {
609
- const base64 = Base64.encode(part.data)
609
+ const base64 = Encoding.encodeBase64(part.data)
610
610
  const fileName = part.fileName ?? `part-${index}.pdf`
611
611
  const fileData = `data:application/pdf;base64,${base64}`
612
612
  content.push({ type: "input_file", filename: fileName, file_data: fileData })