@orq-ai/node 4.5.0-rc.4 → 4.5.0-rc.40
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/README.md +38 -28
- package/funcs/agentsList.d.ts +1 -1
- package/funcs/agentsList.d.ts.map +1 -1
- package/funcs/agentsList.js +5 -3
- package/funcs/agentsList.js.map +1 -1
- package/funcs/agentsPostV2AgentsA2a.d.ts +18 -0
- package/funcs/agentsPostV2AgentsA2a.d.ts.map +1 -0
- package/funcs/agentsPostV2AgentsA2a.js +120 -0
- package/funcs/agentsPostV2AgentsA2a.js.map +1 -0
- package/funcs/agentsPostV2AgentsKeyCardRefresh.d.ts +18 -0
- package/funcs/agentsPostV2AgentsKeyCardRefresh.d.ts.map +1 -0
- package/funcs/agentsPostV2AgentsKeyCardRefresh.js +124 -0
- package/funcs/agentsPostV2AgentsKeyCardRefresh.js.map +1 -0
- package/funcs/agentsResponsesGet.d.ts +19 -0
- package/funcs/agentsResponsesGet.d.ts.map +1 -0
- package/funcs/agentsResponsesGet.js +128 -0
- package/funcs/agentsResponsesGet.js.map +1 -0
- package/funcs/agentsStream.js +4 -2
- package/funcs/agentsStream.js.map +1 -1
- package/funcs/agentsStreamRun.js +4 -2
- package/funcs/agentsStreamRun.js.map +1 -1
- package/funcs/agentsUpdate.d.ts +1 -1
- package/funcs/agentsUpdate.d.ts.map +1 -1
- package/funcs/agentsUpdate.js.map +1 -1
- package/funcs/deploymentsStream.js +4 -2
- package/funcs/deploymentsStream.js.map +1 -1
- package/funcs/filesCreate.d.ts +1 -1
- package/funcs/filesCreate.js +8 -1
- package/funcs/filesCreate.js.map +1 -1
- package/funcs/routerAudioTranscriptionsCreate.js +7 -0
- package/funcs/routerAudioTranscriptionsCreate.js.map +1 -1
- package/funcs/routerAudioTranslationsCreate.js +7 -0
- package/funcs/routerAudioTranslationsCreate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/lib/event-streams.d.ts +5 -0
- package/lib/event-streams.d.ts.map +1 -1
- package/lib/event-streams.js.map +1 -1
- package/lib/matchers.d.ts.map +1 -1
- package/lib/matchers.js +0 -1
- package/lib/matchers.js.map +1 -1
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +1 -2
- package/lib/security.js.map +1 -1
- package/models/components/createagentresponse.d.ts +5 -0
- package/models/components/createagentresponse.d.ts.map +1 -1
- package/models/components/createagentresponse.js +2 -0
- package/models/components/createagentresponse.js.map +1 -1
- package/models/components/extendedmessage.d.ts +71 -0
- package/models/components/extendedmessage.d.ts.map +1 -0
- package/models/components/extendedmessage.js +98 -0
- package/models/components/extendedmessage.js.map +1 -0
- package/models/components/getagentresponse.d.ts +157 -0
- package/models/components/getagentresponse.d.ts.map +1 -0
- package/models/components/getagentresponse.js +175 -0
- package/models/components/getagentresponse.js.map +1 -0
- package/models/components/index.d.ts +3 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +3 -0
- package/models/components/index.js.map +1 -1
- package/models/components/partdoneevent.js +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/components/responsedoneevent.d.ts +5 -0
- package/models/components/responsedoneevent.d.ts.map +1 -1
- package/models/components/responsedoneevent.js +2 -0
- package/models/components/responsedoneevent.js.map +1 -1
- package/models/components/responsestartedevent.d.ts +5 -0
- package/models/components/responsestartedevent.d.ts.map +1 -1
- package/models/components/responsestartedevent.js +2 -0
- package/models/components/responsestartedevent.js.map +1 -1
- package/models/components/telemetry.d.ts +20 -0
- package/models/components/telemetry.d.ts.map +1 -0
- package/models/components/telemetry.js +57 -0
- package/models/components/telemetry.js.map +1 -0
- package/models/errors/index.d.ts +2 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +2 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/postv2agentsa2a.d.ts +43 -0
- package/models/errors/postv2agentsa2a.d.ts.map +1 -0
- package/models/errors/postv2agentsa2a.js +94 -0
- package/models/errors/postv2agentsa2a.js.map +1 -0
- package/models/errors/postv2agentskeycardrefresh.d.ts +43 -0
- package/models/errors/postv2agentskeycardrefresh.d.ts.map +1 -0
- package/models/errors/postv2agentskeycardrefresh.js +94 -0
- package/models/errors/postv2agentskeycardrefresh.js.map +1 -0
- package/models/operations/createagentrequest.d.ts +324 -601
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js +308 -454
- package/models/operations/createagentrequest.js.map +1 -1
- package/models/operations/createagentresponserequest.d.ts +22 -1
- package/models/operations/createagentresponserequest.d.ts.map +1 -1
- package/models/operations/createagentresponserequest.js +12 -2
- package/models/operations/createagentresponserequest.js.map +1 -1
- package/models/operations/createannotation.d.ts +1 -1
- package/models/operations/createannotation.d.ts.map +1 -1
- package/models/operations/createannotation.js +4 -0
- package/models/operations/createannotation.js.map +1 -1
- package/models/operations/createchatcompletion.d.ts +15 -2
- package/models/operations/createchatcompletion.d.ts.map +1 -1
- package/models/operations/createchatcompletion.js +3 -1
- package/models/operations/createchatcompletion.js.map +1 -1
- package/models/operations/createcompletion.d.ts +6 -2
- package/models/operations/createcompletion.d.ts.map +1 -1
- package/models/operations/createcompletion.js +2 -1
- package/models/operations/createcompletion.js.map +1 -1
- package/models/operations/createcontact.js +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createeval.js +16 -16
- package/models/operations/createfeedback.d.ts +2 -2
- package/models/operations/createidentity.js +1 -1
- package/models/operations/createknowledge.d.ts +7 -7
- package/models/operations/createknowledge.d.ts.map +1 -1
- package/models/operations/createknowledge.js +11 -11
- package/models/operations/createknowledge.js.map +1 -1
- package/models/operations/createprompt.d.ts +31 -30
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +32 -29
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createresponse.d.ts.map +1 -1
- package/models/operations/createresponse.js +2 -1
- package/models/operations/createresponse.js.map +1 -1
- package/models/operations/createtool.d.ts +39 -39
- package/models/operations/createtool.d.ts.map +1 -1
- package/models/operations/createtool.js +52 -49
- package/models/operations/createtool.js.map +1 -1
- package/models/operations/deploymentinvoke.d.ts +15 -0
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +17 -1
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +1 -0
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +1 -0
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +15 -0
- package/models/operations/deploymentstream.d.ts.map +1 -1
- package/models/operations/deploymentstream.js +17 -1
- package/models/operations/deploymentstream.js.map +1 -1
- package/models/operations/fileget.js +1 -1
- package/models/operations/filelist.js +1 -1
- package/models/operations/fileupload.js +1 -1
- package/models/operations/getagentresponse.d.ts +20 -0
- package/models/operations/getagentresponse.d.ts.map +1 -0
- package/models/operations/getagentresponse.js +56 -0
- package/models/operations/getagentresponse.js.map +1 -0
- package/models/operations/getallprompts.d.ts +1 -0
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +1 -0
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.d.ts +39 -39
- package/models/operations/getalltools.d.ts.map +1 -1
- package/models/operations/getalltools.js +49 -47
- package/models/operations/getalltools.js.map +1 -1
- package/models/operations/getevals.js +16 -16
- package/models/operations/getoneprompt.d.ts +1 -0
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +1 -0
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +1 -0
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +1 -0
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/index.d.ts +3 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +3 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/invokeagent.d.ts +26 -1
- package/models/operations/invokeagent.d.ts.map +1 -1
- package/models/operations/invokeagent.js +12 -1
- package/models/operations/invokeagent.js.map +1 -1
- package/models/operations/listagents.d.ts +328 -346
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +314 -308
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +4 -4
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/listidentities.js +1 -1
- package/models/operations/listknowledgebases.d.ts +8 -8
- package/models/operations/listknowledgebases.d.ts.map +1 -1
- package/models/operations/listknowledgebases.js +13 -15
- package/models/operations/listknowledgebases.js.map +1 -1
- package/models/operations/listpromptversions.d.ts +1 -0
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +1 -0
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/postv2agentsa2a.d.ts +119 -0
- package/models/operations/postv2agentsa2a.d.ts.map +1 -0
- package/models/operations/postv2agentsa2a.js +147 -0
- package/models/operations/postv2agentsa2a.js.map +1 -0
- package/models/operations/postv2agentskeycardrefresh.d.ts +35 -0
- package/models/operations/postv2agentskeycardrefresh.d.ts.map +1 -0
- package/models/operations/postv2agentskeycardrefresh.js +71 -0
- package/models/operations/postv2agentskeycardrefresh.js.map +1 -0
- package/models/operations/retrieveagentrequest.d.ts +313 -349
- package/models/operations/retrieveagentrequest.d.ts.map +1 -1
- package/models/operations/retrieveagentrequest.js +307 -311
- package/models/operations/retrieveagentrequest.js.map +1 -1
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrieveidentity.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.d.ts +27 -265
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +26 -163
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamagent.d.ts +22 -1
- package/models/operations/streamagent.d.ts.map +1 -1
- package/models/operations/streamagent.js +11 -1
- package/models/operations/streamagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +13 -255
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +15 -152
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +407 -614
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +364 -472
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updateeval.d.ts +48 -0
- package/models/operations/updateeval.d.ts.map +1 -1
- package/models/operations/updateeval.js +60 -20
- package/models/operations/updateeval.js.map +1 -1
- package/models/operations/updateidentity.js +1 -1
- package/models/operations/updatememorystore.d.ts +2 -43
- package/models/operations/updatememorystore.d.ts.map +1 -1
- package/models/operations/updatememorystore.js +2 -45
- package/models/operations/updatememorystore.js.map +1 -1
- package/models/operations/updateprompt.d.ts +1 -0
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +1 -0
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.d.ts +60 -0
- package/models/operations/updatetool.d.ts.map +1 -1
- package/models/operations/updatetool.js +63 -9
- package/models/operations/updatetool.js.map +1 -1
- package/package.json +1 -1
- package/sdk/agents.d.ts +16 -2
- package/sdk/agents.d.ts.map +1 -1
- package/sdk/agents.js +22 -2
- package/sdk/agents.js.map +1 -1
- package/sdk/files.d.ts +1 -1
- package/sdk/files.js +1 -1
- package/sdk/responses.d.ts +8 -0
- package/sdk/responses.d.ts.map +1 -1
- package/sdk/responses.js +10 -0
- package/sdk/responses.js.map +1 -1
- package/src/funcs/agentsList.ts +5 -0
- package/src/funcs/agentsPostV2AgentsA2a.ts +178 -0
- package/src/funcs/agentsPostV2AgentsKeyCardRefresh.ts +187 -0
- package/src/funcs/agentsResponsesGet.ts +182 -0
- package/src/funcs/agentsStream.ts +4 -1
- package/src/funcs/agentsStreamRun.ts +4 -1
- package/src/funcs/agentsUpdate.ts +2 -2
- package/src/funcs/deploymentsStream.ts +4 -1
- package/src/funcs/filesCreate.ts +12 -1
- package/src/funcs/routerAudioTranscriptionsCreate.ts +11 -0
- package/src/funcs/routerAudioTranslationsCreate.ts +11 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/event-streams.ts +10 -1
- package/src/lib/matchers.ts +3 -2
- package/src/lib/security.ts +1 -2
- package/src/models/components/createagentresponse.ts +6 -0
- package/src/models/components/extendedmessage.ts +146 -0
- package/src/models/components/getagentresponse.ts +348 -0
- package/src/models/components/index.ts +3 -0
- package/src/models/components/partdoneevent.ts +1 -1
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/responsedoneevent.ts +6 -0
- package/src/models/components/responsestartedevent.ts +6 -0
- package/src/models/components/telemetry.ts +48 -0
- package/src/models/errors/index.ts +2 -0
- package/src/models/errors/postv2agentsa2a.ts +96 -0
- package/src/models/errors/postv2agentskeycardrefresh.ts +97 -0
- package/src/models/operations/createagentrequest.ts +755 -1212
- package/src/models/operations/createagentresponserequest.ts +37 -2
- package/src/models/operations/createannotation.ts +5 -1
- package/src/models/operations/createchatcompletion.ts +14 -3
- package/src/models/operations/createcompletion.ts +8 -3
- package/src/models/operations/createcontact.ts +1 -1
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/createfeedback.ts +2 -2
- package/src/models/operations/createidentity.ts +1 -1
- package/src/models/operations/createknowledge.ts +19 -17
- package/src/models/operations/createprompt.ts +56 -66
- package/src/models/operations/createresponse.ts +2 -1
- package/src/models/operations/createtool.ts +103 -91
- package/src/models/operations/deploymentinvoke.ts +39 -0
- package/src/models/operations/deployments.ts +1 -0
- package/src/models/operations/deploymentstream.ts +39 -0
- package/src/models/operations/fileget.ts +1 -1
- package/src/models/operations/filelist.ts +1 -1
- package/src/models/operations/fileupload.ts +1 -1
- package/src/models/operations/getagentresponse.ts +46 -0
- package/src/models/operations/getallprompts.ts +1 -0
- package/src/models/operations/getalltools.ts +93 -87
- package/src/models/operations/getevals.ts +16 -16
- package/src/models/operations/getoneprompt.ts +1 -0
- package/src/models/operations/getpromptversion.ts +1 -0
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/invokeagent.ts +45 -1
- package/src/models/operations/listagents.ts +751 -787
- package/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/listidentities.ts +1 -1
- package/src/models/operations/listknowledgebases.ts +72 -64
- package/src/models/operations/listpromptversions.ts +1 -0
- package/src/models/operations/postv2agentsa2a.ts +252 -0
- package/src/models/operations/postv2agentskeycardrefresh.ts +100 -0
- package/src/models/operations/retrieveagentrequest.ts +962 -857
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrieveidentity.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +69 -493
- package/src/models/operations/streamagent.ts +40 -1
- package/src/models/operations/streamrunagent.ts +36 -493
- package/src/models/operations/updateagent.ts +1002 -1319
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updateeval.ts +102 -16
- package/src/models/operations/updateidentity.ts +1 -1
- package/src/models/operations/updatememorystore.ts +3 -61
- package/src/models/operations/updateprompt.ts +1 -0
- package/src/models/operations/updatetool.ts +121 -7
- package/src/sdk/agents.ts +39 -1
- package/src/sdk/files.ts +1 -1
- package/src/sdk/responses.ts +19 -0
|
@@ -394,7 +394,7 @@ export type CreatePromptMessages =
|
|
|
394
394
|
/**
|
|
395
395
|
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
396
396
|
*/
|
|
397
|
-
export const
|
|
397
|
+
export const Voice = {
|
|
398
398
|
Alloy: "alloy",
|
|
399
399
|
Echo: "echo",
|
|
400
400
|
Fable: "fable",
|
|
@@ -405,12 +405,12 @@ export const CreatePromptVoice = {
|
|
|
405
405
|
/**
|
|
406
406
|
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
407
407
|
*/
|
|
408
|
-
export type
|
|
408
|
+
export type Voice = ClosedEnum<typeof Voice>;
|
|
409
409
|
|
|
410
410
|
/**
|
|
411
411
|
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
412
412
|
*/
|
|
413
|
-
export const
|
|
413
|
+
export const Format = {
|
|
414
414
|
Wav: "wav",
|
|
415
415
|
Mp3: "mp3",
|
|
416
416
|
Flac: "flac",
|
|
@@ -420,7 +420,7 @@ export const CreatePromptFormat = {
|
|
|
420
420
|
/**
|
|
421
421
|
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
422
422
|
*/
|
|
423
|
-
export type
|
|
423
|
+
export type Format = ClosedEnum<typeof Format>;
|
|
424
424
|
|
|
425
425
|
/**
|
|
426
426
|
* Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
|
|
@@ -429,11 +429,11 @@ export type CreatePromptAudio = {
|
|
|
429
429
|
/**
|
|
430
430
|
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
431
431
|
*/
|
|
432
|
-
voice:
|
|
432
|
+
voice: Voice;
|
|
433
433
|
/**
|
|
434
434
|
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
435
435
|
*/
|
|
436
|
-
format:
|
|
436
|
+
format: Format;
|
|
437
437
|
};
|
|
438
438
|
|
|
439
439
|
export type CreatePromptResponseFormatPromptsJsonSchema = {
|
|
@@ -535,7 +535,7 @@ export type CreatePromptStop = string | Array<string>;
|
|
|
535
535
|
/**
|
|
536
536
|
* Options for streaming response. Only set this when you set stream: true.
|
|
537
537
|
*/
|
|
538
|
-
export type
|
|
538
|
+
export type StreamOptions = {
|
|
539
539
|
/**
|
|
540
540
|
* If set, an additional chunk will be streamed before the data: [DONE] message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array. All other chunks will also include a usage field, but with a null value.
|
|
541
541
|
*/
|
|
@@ -799,7 +799,7 @@ export type PromptInput = {
|
|
|
799
799
|
/**
|
|
800
800
|
* Options for streaming response. Only set this when you set stream: true.
|
|
801
801
|
*/
|
|
802
|
-
streamOptions?:
|
|
802
|
+
streamOptions?: StreamOptions | null | undefined;
|
|
803
803
|
thinking?:
|
|
804
804
|
| components.ThinkingConfigDisabledSchema
|
|
805
805
|
| components.ThinkingConfigEnabledSchema
|
|
@@ -910,7 +910,7 @@ export type ModelType = ClosedEnum<typeof ModelType>;
|
|
|
910
910
|
/**
|
|
911
911
|
* Only supported on `image` models.
|
|
912
912
|
*/
|
|
913
|
-
export const
|
|
913
|
+
export const CreatePromptFormat = {
|
|
914
914
|
Url: "url",
|
|
915
915
|
B64Json: "b64_json",
|
|
916
916
|
Text: "text",
|
|
@@ -919,9 +919,7 @@ export const CreatePromptPromptsFormat = {
|
|
|
919
919
|
/**
|
|
920
920
|
* Only supported on `image` models.
|
|
921
921
|
*/
|
|
922
|
-
export type
|
|
923
|
-
typeof CreatePromptPromptsFormat
|
|
924
|
-
>;
|
|
922
|
+
export type CreatePromptFormat = ClosedEnum<typeof CreatePromptFormat>;
|
|
925
923
|
|
|
926
924
|
export const CreatePromptResponseFormat6 = {
|
|
927
925
|
Json: "json",
|
|
@@ -1138,7 +1136,7 @@ export type ModelParameters = {
|
|
|
1138
1136
|
/**
|
|
1139
1137
|
* Only supported on `image` models.
|
|
1140
1138
|
*/
|
|
1141
|
-
format?:
|
|
1139
|
+
format?: CreatePromptFormat | undefined;
|
|
1142
1140
|
/**
|
|
1143
1141
|
* Only supported on `image` models.
|
|
1144
1142
|
*/
|
|
@@ -1224,6 +1222,7 @@ export const CreatePromptProvider = {
|
|
|
1224
1222
|
Moonshotai: "moonshotai",
|
|
1225
1223
|
Zai: "zai",
|
|
1226
1224
|
Minimax: "minimax",
|
|
1225
|
+
Xai: "xai",
|
|
1227
1226
|
Alibaba: "alibaba",
|
|
1228
1227
|
Slack: "slack",
|
|
1229
1228
|
} as const;
|
|
@@ -1387,7 +1386,7 @@ export type PromptConfig = {
|
|
|
1387
1386
|
/**
|
|
1388
1387
|
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
1389
1388
|
*/
|
|
1390
|
-
export const
|
|
1389
|
+
export const CreatePromptVoice = {
|
|
1391
1390
|
Alloy: "alloy",
|
|
1392
1391
|
Echo: "echo",
|
|
1393
1392
|
Fable: "fable",
|
|
@@ -1398,14 +1397,12 @@ export const CreatePromptPromptsVoice = {
|
|
|
1398
1397
|
/**
|
|
1399
1398
|
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
1400
1399
|
*/
|
|
1401
|
-
export type
|
|
1402
|
-
typeof CreatePromptPromptsVoice
|
|
1403
|
-
>;
|
|
1400
|
+
export type CreatePromptVoice = ClosedEnum<typeof CreatePromptVoice>;
|
|
1404
1401
|
|
|
1405
1402
|
/**
|
|
1406
1403
|
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
1407
1404
|
*/
|
|
1408
|
-
export const
|
|
1405
|
+
export const CreatePromptPromptsFormat = {
|
|
1409
1406
|
Wav: "wav",
|
|
1410
1407
|
Mp3: "mp3",
|
|
1411
1408
|
Flac: "flac",
|
|
@@ -1415,8 +1412,8 @@ export const CreatePromptPromptsResponse200Format = {
|
|
|
1415
1412
|
/**
|
|
1416
1413
|
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
1417
1414
|
*/
|
|
1418
|
-
export type
|
|
1419
|
-
typeof
|
|
1415
|
+
export type CreatePromptPromptsFormat = ClosedEnum<
|
|
1416
|
+
typeof CreatePromptPromptsFormat
|
|
1420
1417
|
>;
|
|
1421
1418
|
|
|
1422
1419
|
/**
|
|
@@ -1426,11 +1423,11 @@ export type CreatePromptPromptsAudio = {
|
|
|
1426
1423
|
/**
|
|
1427
1424
|
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
1428
1425
|
*/
|
|
1429
|
-
voice:
|
|
1426
|
+
voice: CreatePromptVoice;
|
|
1430
1427
|
/**
|
|
1431
1428
|
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
1432
1429
|
*/
|
|
1433
|
-
format:
|
|
1430
|
+
format: CreatePromptPromptsFormat;
|
|
1434
1431
|
};
|
|
1435
1432
|
|
|
1436
1433
|
export type CreatePromptResponseFormatPromptsResponseJsonSchema = {
|
|
@@ -1532,7 +1529,7 @@ export type CreatePromptPromptsStop = string | Array<string>;
|
|
|
1532
1529
|
/**
|
|
1533
1530
|
* Options for streaming response. Only set this when you set stream: true.
|
|
1534
1531
|
*/
|
|
1535
|
-
export type
|
|
1532
|
+
export type CreatePromptStreamOptions = {
|
|
1536
1533
|
/**
|
|
1537
1534
|
* If set, an additional chunk will be streamed before the data: [DONE] message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array. All other chunks will also include a usage field, but with a null value.
|
|
1538
1535
|
*/
|
|
@@ -2122,7 +2119,7 @@ export type PromptField = {
|
|
|
2122
2119
|
/**
|
|
2123
2120
|
* Options for streaming response. Only set this when you set stream: true.
|
|
2124
2121
|
*/
|
|
2125
|
-
streamOptions?:
|
|
2122
|
+
streamOptions?: CreatePromptStreamOptions | null | undefined;
|
|
2126
2123
|
thinking?:
|
|
2127
2124
|
| components.ThinkingConfigDisabledSchema
|
|
2128
2125
|
| components.ThinkingConfigEnabledSchema
|
|
@@ -2925,14 +2922,13 @@ export function createPromptMessagesToJSON(
|
|
|
2925
2922
|
}
|
|
2926
2923
|
|
|
2927
2924
|
/** @internal */
|
|
2928
|
-
export const
|
|
2929
|
-
|
|
2930
|
-
|
|
2925
|
+
export const Voice$outboundSchema: z.ZodNativeEnum<typeof Voice> = z.nativeEnum(
|
|
2926
|
+
Voice,
|
|
2927
|
+
);
|
|
2931
2928
|
|
|
2932
2929
|
/** @internal */
|
|
2933
|
-
export const
|
|
2934
|
-
|
|
2935
|
-
> = z.nativeEnum(CreatePromptFormat);
|
|
2930
|
+
export const Format$outboundSchema: z.ZodNativeEnum<typeof Format> = z
|
|
2931
|
+
.nativeEnum(Format);
|
|
2936
2932
|
|
|
2937
2933
|
/** @internal */
|
|
2938
2934
|
export type CreatePromptAudio$Outbound = {
|
|
@@ -2946,8 +2942,8 @@ export const CreatePromptAudio$outboundSchema: z.ZodType<
|
|
|
2946
2942
|
z.ZodTypeDef,
|
|
2947
2943
|
CreatePromptAudio
|
|
2948
2944
|
> = z.object({
|
|
2949
|
-
voice:
|
|
2950
|
-
format:
|
|
2945
|
+
voice: Voice$outboundSchema,
|
|
2946
|
+
format: Format$outboundSchema,
|
|
2951
2947
|
});
|
|
2952
2948
|
|
|
2953
2949
|
export function createPromptAudioToJSON(
|
|
@@ -3119,15 +3115,15 @@ export function createPromptStopToJSON(
|
|
|
3119
3115
|
}
|
|
3120
3116
|
|
|
3121
3117
|
/** @internal */
|
|
3122
|
-
export type
|
|
3118
|
+
export type StreamOptions$Outbound = {
|
|
3123
3119
|
include_usage?: boolean | undefined;
|
|
3124
3120
|
};
|
|
3125
3121
|
|
|
3126
3122
|
/** @internal */
|
|
3127
|
-
export const
|
|
3128
|
-
|
|
3123
|
+
export const StreamOptions$outboundSchema: z.ZodType<
|
|
3124
|
+
StreamOptions$Outbound,
|
|
3129
3125
|
z.ZodTypeDef,
|
|
3130
|
-
|
|
3126
|
+
StreamOptions
|
|
3131
3127
|
> = z.object({
|
|
3132
3128
|
includeUsage: z.boolean().optional(),
|
|
3133
3129
|
}).transform((v) => {
|
|
@@ -3136,12 +3132,8 @@ export const CreatePromptStreamOptions$outboundSchema: z.ZodType<
|
|
|
3136
3132
|
});
|
|
3137
3133
|
});
|
|
3138
3134
|
|
|
3139
|
-
export function
|
|
3140
|
-
|
|
3141
|
-
): string {
|
|
3142
|
-
return JSON.stringify(
|
|
3143
|
-
CreatePromptStreamOptions$outboundSchema.parse(createPromptStreamOptions),
|
|
3144
|
-
);
|
|
3135
|
+
export function streamOptionsToJSON(streamOptions: StreamOptions): string {
|
|
3136
|
+
return JSON.stringify(StreamOptions$outboundSchema.parse(streamOptions));
|
|
3145
3137
|
}
|
|
3146
3138
|
|
|
3147
3139
|
/** @internal */
|
|
@@ -3511,7 +3503,7 @@ export type PromptInput$Outbound = {
|
|
|
3511
3503
|
verbosity?: string | undefined;
|
|
3512
3504
|
seed?: number | null | undefined;
|
|
3513
3505
|
stop?: string | Array<string> | null | undefined;
|
|
3514
|
-
stream_options?:
|
|
3506
|
+
stream_options?: StreamOptions$Outbound | null | undefined;
|
|
3515
3507
|
thinking?:
|
|
3516
3508
|
| components.ThinkingConfigDisabledSchema$Outbound
|
|
3517
3509
|
| components.ThinkingConfigEnabledSchema$Outbound
|
|
@@ -3563,9 +3555,8 @@ export const PromptInput$outboundSchema: z.ZodType<
|
|
|
3563
3555
|
verbosity: z.string().optional(),
|
|
3564
3556
|
seed: z.nullable(z.number()).optional(),
|
|
3565
3557
|
stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
|
|
3566
|
-
streamOptions: z.nullable(
|
|
3567
|
-
|
|
3568
|
-
).optional(),
|
|
3558
|
+
streamOptions: z.nullable(z.lazy(() => StreamOptions$outboundSchema))
|
|
3559
|
+
.optional(),
|
|
3569
3560
|
thinking: z.union([
|
|
3570
3561
|
components.ThinkingConfigDisabledSchema$outboundSchema,
|
|
3571
3562
|
components.ThinkingConfigEnabledSchema$outboundSchema,
|
|
@@ -3655,9 +3646,9 @@ export const ModelType$inboundSchema: z.ZodNativeEnum<typeof ModelType> = z
|
|
|
3655
3646
|
.nativeEnum(ModelType);
|
|
3656
3647
|
|
|
3657
3648
|
/** @internal */
|
|
3658
|
-
export const
|
|
3659
|
-
typeof
|
|
3660
|
-
> = z.nativeEnum(
|
|
3649
|
+
export const CreatePromptFormat$inboundSchema: z.ZodNativeEnum<
|
|
3650
|
+
typeof CreatePromptFormat
|
|
3651
|
+
> = z.nativeEnum(CreatePromptFormat);
|
|
3661
3652
|
|
|
3662
3653
|
/** @internal */
|
|
3663
3654
|
export const CreatePromptResponseFormat6$inboundSchema: z.ZodNativeEnum<
|
|
@@ -3864,7 +3855,7 @@ export const ModelParameters$inboundSchema: z.ZodType<
|
|
|
3864
3855
|
presencePenalty: z.number().optional(),
|
|
3865
3856
|
numImages: z.number().optional(),
|
|
3866
3857
|
seed: z.number().optional(),
|
|
3867
|
-
format:
|
|
3858
|
+
format: CreatePromptFormat$inboundSchema.optional(),
|
|
3868
3859
|
dimensions: z.string().optional(),
|
|
3869
3860
|
quality: z.string().optional(),
|
|
3870
3861
|
style: z.string().optional(),
|
|
@@ -4187,15 +4178,14 @@ export function promptConfigFromJSON(
|
|
|
4187
4178
|
}
|
|
4188
4179
|
|
|
4189
4180
|
/** @internal */
|
|
4190
|
-
export const
|
|
4191
|
-
typeof
|
|
4192
|
-
> = z.nativeEnum(
|
|
4181
|
+
export const CreatePromptVoice$inboundSchema: z.ZodNativeEnum<
|
|
4182
|
+
typeof CreatePromptVoice
|
|
4183
|
+
> = z.nativeEnum(CreatePromptVoice);
|
|
4193
4184
|
|
|
4194
4185
|
/** @internal */
|
|
4195
|
-
export const
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
);
|
|
4186
|
+
export const CreatePromptPromptsFormat$inboundSchema: z.ZodNativeEnum<
|
|
4187
|
+
typeof CreatePromptPromptsFormat
|
|
4188
|
+
> = z.nativeEnum(CreatePromptPromptsFormat);
|
|
4199
4189
|
|
|
4200
4190
|
/** @internal */
|
|
4201
4191
|
export const CreatePromptPromptsAudio$inboundSchema: z.ZodType<
|
|
@@ -4203,8 +4193,8 @@ export const CreatePromptPromptsAudio$inboundSchema: z.ZodType<
|
|
|
4203
4193
|
z.ZodTypeDef,
|
|
4204
4194
|
unknown
|
|
4205
4195
|
> = z.object({
|
|
4206
|
-
voice:
|
|
4207
|
-
format:
|
|
4196
|
+
voice: CreatePromptVoice$inboundSchema,
|
|
4197
|
+
format: CreatePromptPromptsFormat$inboundSchema,
|
|
4208
4198
|
});
|
|
4209
4199
|
|
|
4210
4200
|
export function createPromptPromptsAudioFromJSON(
|
|
@@ -4370,8 +4360,8 @@ export function createPromptPromptsStopFromJSON(
|
|
|
4370
4360
|
}
|
|
4371
4361
|
|
|
4372
4362
|
/** @internal */
|
|
4373
|
-
export const
|
|
4374
|
-
|
|
4363
|
+
export const CreatePromptStreamOptions$inboundSchema: z.ZodType<
|
|
4364
|
+
CreatePromptStreamOptions,
|
|
4375
4365
|
z.ZodTypeDef,
|
|
4376
4366
|
unknown
|
|
4377
4367
|
> = z.object({
|
|
@@ -4382,13 +4372,13 @@ export const CreatePromptPromptsStreamOptions$inboundSchema: z.ZodType<
|
|
|
4382
4372
|
});
|
|
4383
4373
|
});
|
|
4384
4374
|
|
|
4385
|
-
export function
|
|
4375
|
+
export function createPromptStreamOptionsFromJSON(
|
|
4386
4376
|
jsonString: string,
|
|
4387
|
-
): SafeParseResult<
|
|
4377
|
+
): SafeParseResult<CreatePromptStreamOptions, SDKValidationError> {
|
|
4388
4378
|
return safeParse(
|
|
4389
4379
|
jsonString,
|
|
4390
|
-
(x) =>
|
|
4391
|
-
`Failed to parse '
|
|
4380
|
+
(x) => CreatePromptStreamOptions$inboundSchema.parse(JSON.parse(x)),
|
|
4381
|
+
`Failed to parse 'CreatePromptStreamOptions' from JSON`,
|
|
4392
4382
|
);
|
|
4393
4383
|
}
|
|
4394
4384
|
|
|
@@ -5263,7 +5253,7 @@ export const PromptField$inboundSchema: z.ZodType<
|
|
|
5263
5253
|
seed: z.nullable(z.number()).optional(),
|
|
5264
5254
|
stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
|
|
5265
5255
|
stream_options: z.nullable(
|
|
5266
|
-
z.lazy(() =>
|
|
5256
|
+
z.lazy(() => CreatePromptStreamOptions$inboundSchema),
|
|
5267
5257
|
).optional(),
|
|
5268
5258
|
thinking: z.union([
|
|
5269
5259
|
components.ThinkingConfigDisabledSchema$inboundSchema,
|
|
@@ -3303,8 +3303,9 @@ export const CreateResponseResponse$inboundSchema: z.ZodType<
|
|
|
3303
3303
|
z.instanceof(ReadableStream<Uint8Array>)
|
|
3304
3304
|
.transform(stream => {
|
|
3305
3305
|
return new EventStream(stream, rawEvent => {
|
|
3306
|
-
if (rawEvent.data === "[DONE]") return { done: true };
|
|
3306
|
+
if (rawEvent.data === "[DONE]") return { done: true, value: undefined };
|
|
3307
3307
|
return {
|
|
3308
|
+
done: false,
|
|
3308
3309
|
value: z.lazy(() =>
|
|
3309
3310
|
CreateResponseRouterResponsesResponseBody$inboundSchema
|
|
3310
3311
|
).parse(rawEvent),
|