@orq-ai/node 4.5.0-rc.9 → 4.5.2
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 +113 -500
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js +103 -343
- 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/createprompt.d.ts +33 -32
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +33 -30
- 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.js +6 -6
- 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.js +6 -6
- 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 +114 -241
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +94 -182
- 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/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 +96 -242
- package/models/operations/retrieveagentrequest.d.ts.map +1 -1
- package/models/operations/retrieveagentrequest.js +84 -185
- 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 +190 -507
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +144 -348
- 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 +3 -4
- package/packages/orq-rc/examples/contactsCreate.example.ts +42 -0
- package/packages/orq-rc/src/core.ts +13 -0
- package/packages/orq-rc/src/funcs/agentsCreate.ts +161 -0
- package/packages/orq-rc/src/funcs/agentsDelete.ts +180 -0
- package/packages/orq-rc/src/funcs/agentsInvoke.ts +177 -0
- package/packages/orq-rc/src/funcs/agentsList.ts +184 -0
- package/packages/orq-rc/src/funcs/agentsPostV2AgentsA2a.ts +178 -0
- package/packages/orq-rc/src/funcs/agentsPostV2AgentsKeyCardRefresh.ts +187 -0
- package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +183 -0
- package/packages/orq-rc/src/funcs/agentsResponsesGet.ts +182 -0
- package/packages/orq-rc/src/funcs/agentsRetrieve.ts +180 -0
- package/packages/orq-rc/src/funcs/agentsRun.ts +162 -0
- package/packages/orq-rc/src/funcs/agentsStream.ts +204 -0
- package/packages/orq-rc/src/funcs/agentsStreamRun.ts +189 -0
- package/packages/orq-rc/src/funcs/agentsUpdate.ts +184 -0
- package/packages/orq-rc/src/funcs/annotationsCreate.ts +171 -0
- package/packages/orq-rc/src/funcs/annotationsDelete.ts +171 -0
- package/packages/orq-rc/src/funcs/chunkingParse.ts +160 -0
- package/packages/orq-rc/src/funcs/contactsCreate.ts +160 -0
- package/packages/orq-rc/src/funcs/datasetsClear.ts +167 -0
- package/packages/orq-rc/src/funcs/datasetsCreate.ts +165 -0
- package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +171 -0
- package/packages/orq-rc/src/funcs/datasetsDelete.ts +167 -0
- package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +182 -0
- package/packages/orq-rc/src/funcs/datasetsList.ts +167 -0
- package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +174 -0
- package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +175 -0
- package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +181 -0
- package/packages/orq-rc/src/funcs/datasetsUpdate.ts +176 -0
- package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +179 -0
- package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +168 -0
- package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +176 -0
- package/packages/orq-rc/src/funcs/deploymentsList.ts +176 -0
- package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +168 -0
- package/packages/orq-rc/src/funcs/deploymentsStream.ts +186 -0
- package/packages/orq-rc/src/funcs/evalsAll.ts +173 -0
- package/packages/orq-rc/src/funcs/evalsCreate.ts +169 -0
- package/packages/orq-rc/src/funcs/evalsDelete.ts +173 -0
- package/packages/orq-rc/src/funcs/evalsInvoke.ts +181 -0
- package/packages/orq-rc/src/funcs/evalsUpdate.ts +173 -0
- package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +183 -0
- package/packages/orq-rc/src/funcs/feedbackCreate.ts +160 -0
- package/packages/orq-rc/src/funcs/filesCreate.ts +198 -0
- package/packages/orq-rc/src/funcs/filesDelete.ts +164 -0
- package/packages/orq-rc/src/funcs/filesGet.ts +166 -0
- package/packages/orq-rc/src/funcs/filesList.ts +167 -0
- package/packages/orq-rc/src/funcs/identitiesCreate.ts +165 -0
- package/packages/orq-rc/src/funcs/identitiesDelete.ts +176 -0
- package/packages/orq-rc/src/funcs/identitiesList.ts +170 -0
- package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +175 -0
- package/packages/orq-rc/src/funcs/identitiesUpdate.ts +176 -0
- package/packages/orq-rc/src/funcs/knowledgeCreate.ts +158 -0
- package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +171 -0
- package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +166 -0
- package/packages/orq-rc/src/funcs/knowledgeDelete.ts +167 -0
- package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +174 -0
- package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +170 -0
- package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +173 -0
- package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +170 -0
- package/packages/orq-rc/src/funcs/knowledgeList.ts +169 -0
- package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +178 -0
- package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +171 -0
- package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +174 -0
- package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +166 -0
- package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +173 -0
- package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +169 -0
- package/packages/orq-rc/src/funcs/knowledgeSearch.ts +167 -0
- package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +164 -0
- package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +174 -0
- package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +170 -0
- package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +162 -0
- package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +176 -0
- package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +170 -0
- package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +168 -0
- package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +185 -0
- package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +180 -0
- package/packages/orq-rc/src/funcs/memoryStoresList.ts +178 -0
- package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +184 -0
- package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +177 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +177 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +179 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +174 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +168 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +180 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +175 -0
- package/packages/orq-rc/src/funcs/modelsList.ts +142 -0
- package/packages/orq-rc/src/funcs/promptsCreate.ts +160 -0
- package/packages/orq-rc/src/funcs/promptsDelete.ts +173 -0
- package/packages/orq-rc/src/funcs/promptsGetVersion.ts +181 -0
- package/packages/orq-rc/src/funcs/promptsList.ts +167 -0
- package/packages/orq-rc/src/funcs/promptsListVersions.ts +173 -0
- package/packages/orq-rc/src/funcs/promptsRetrieve.ts +166 -0
- package/packages/orq-rc/src/funcs/promptsUpdate.ts +173 -0
- package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +161 -0
- package/packages/orq-rc/src/funcs/routerAudioSpeechCreate.ts +161 -0
- package/packages/orq-rc/src/funcs/routerAudioTranscriptionsCreate.ts +273 -0
- package/packages/orq-rc/src/funcs/routerAudioTranslationsCreate.ts +263 -0
- package/packages/orq-rc/src/funcs/routerChatCompletionsCreate.ts +168 -0
- package/packages/orq-rc/src/funcs/routerCompletionsCreate.ts +168 -0
- package/packages/orq-rc/src/funcs/routerEmbeddingsCreate.ts +161 -0
- package/packages/orq-rc/src/funcs/routerImagesEditsCreate.ts +222 -0
- package/packages/orq-rc/src/funcs/routerImagesGenerationsCreate.ts +160 -0
- package/packages/orq-rc/src/funcs/routerImagesVariationsCreate.ts +218 -0
- package/packages/orq-rc/src/funcs/routerModerationsCreate.ts +167 -0
- package/packages/orq-rc/src/funcs/routerOcr.ts +158 -0
- package/packages/orq-rc/src/funcs/routerRerankCreate.ts +160 -0
- package/packages/orq-rc/src/funcs/routerResponsesCreate.ts +167 -0
- package/packages/orq-rc/src/funcs/toolsCreate.ts +163 -0
- package/packages/orq-rc/src/funcs/toolsDelete.ts +167 -0
- package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersions.ts +183 -0
- package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +190 -0
- package/packages/orq-rc/src/funcs/toolsList.ts +176 -0
- package/packages/orq-rc/src/funcs/toolsRetrieve.ts +166 -0
- package/packages/orq-rc/src/funcs/toolsUpdate.ts +176 -0
- package/packages/orq-rc/src/hooks/global.ts +44 -0
- package/packages/orq-rc/src/hooks/hooks.ts +132 -0
- package/packages/orq-rc/src/hooks/index.ts +6 -0
- package/packages/orq-rc/src/hooks/registration.ts +15 -0
- package/packages/orq-rc/src/hooks/types.ts +112 -0
- package/packages/orq-rc/src/index.ts +9 -0
- package/packages/orq-rc/src/lib/base64.ts +37 -0
- package/packages/orq-rc/src/lib/config.ts +74 -0
- package/packages/orq-rc/src/lib/dlv.ts +53 -0
- package/packages/orq-rc/src/lib/encodings.ts +497 -0
- package/packages/orq-rc/src/lib/env.ts +89 -0
- package/packages/orq-rc/src/lib/event-streams.ts +161 -0
- package/packages/orq-rc/src/lib/files.ts +82 -0
- package/packages/orq-rc/src/lib/http.ts +323 -0
- package/packages/orq-rc/src/lib/is-plain-object.ts +43 -0
- package/packages/orq-rc/src/lib/logger.ts +9 -0
- package/packages/orq-rc/src/lib/matchers.ts +346 -0
- package/packages/orq-rc/src/lib/primitives.ts +150 -0
- package/packages/orq-rc/src/lib/retries.ts +218 -0
- package/packages/orq-rc/src/lib/schemas.ts +91 -0
- package/packages/orq-rc/src/lib/sdks.ts +407 -0
- package/packages/orq-rc/src/lib/security.ts +263 -0
- package/packages/orq-rc/src/lib/url.ts +33 -0
- package/packages/orq-rc/src/models/components/actionreviewedstreamingevent.ts +99 -0
- package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +185 -0
- package/packages/orq-rc/src/models/components/agenterroredstreamingevent.ts +73 -0
- package/packages/orq-rc/src/models/components/agentexecutionstartedstreamingevent.ts +91 -0
- package/packages/orq-rc/src/models/components/agenthandedoffstreamingevent.ts +71 -0
- package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +507 -0
- package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +165 -0
- package/packages/orq-rc/src/models/components/agentresponsemessage.ts +103 -0
- package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +517 -0
- package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +807 -0
- package/packages/orq-rc/src/models/components/audiocontentpartschema.ts +136 -0
- package/packages/orq-rc/src/models/components/createagentresponse.ts +305 -0
- package/packages/orq-rc/src/models/components/datapart.ts +38 -0
- package/packages/orq-rc/src/models/components/errorpart.ts +58 -0
- package/packages/orq-rc/src/models/components/errorstreamingevent.ts +66 -0
- package/packages/orq-rc/src/models/components/executionnamedstreamingevent.ts +71 -0
- package/packages/orq-rc/src/models/components/executionreviewedstreamingevent.ts +61 -0
- package/packages/orq-rc/src/models/components/executionreviewrequiredstreamingevent.ts +67 -0
- package/packages/orq-rc/src/models/components/extendedmessage.ts +146 -0
- package/packages/orq-rc/src/models/components/filecontentpartschema.ts +87 -0
- package/packages/orq-rc/src/models/components/filepart.ts +218 -0
- package/packages/orq-rc/src/models/components/getagentresponse.ts +348 -0
- package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +268 -0
- package/packages/orq-rc/src/models/components/index.ts +59 -0
- package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +3450 -0
- package/packages/orq-rc/src/models/components/partdelta.ts +39 -0
- package/packages/orq-rc/src/models/components/partdeltaevent.ts +73 -0
- package/packages/orq-rc/src/models/components/partdoneevent.ts +139 -0
- package/packages/orq-rc/src/models/components/publiccontact.ts +71 -0
- package/packages/orq-rc/src/models/components/publicidentity.ts +69 -0
- package/packages/orq-rc/src/models/components/reasoningpart.ts +62 -0
- package/packages/orq-rc/src/models/components/reasoningpartschema.ts +71 -0
- package/packages/orq-rc/src/models/components/redactedreasoningpartschema.ts +66 -0
- package/packages/orq-rc/src/models/components/refusalpartschema.ts +64 -0
- package/packages/orq-rc/src/models/components/responsedoneevent.ts +324 -0
- package/packages/orq-rc/src/models/components/responsefailedevent.ts +72 -0
- package/packages/orq-rc/src/models/components/responsestartedevent.ts +97 -0
- package/packages/orq-rc/src/models/components/responsestreamingevent.ts +85 -0
- package/packages/orq-rc/src/models/components/reviewoutcome.ts +23 -0
- package/packages/orq-rc/src/models/components/security.ts +32 -0
- package/packages/orq-rc/src/models/components/telemetry.ts +48 -0
- package/packages/orq-rc/src/models/components/textcontentpartschema.ts +207 -0
- package/packages/orq-rc/src/models/components/textpart.ts +54 -0
- package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +59 -0
- package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +106 -0
- package/packages/orq-rc/src/models/components/timeoutstreamingevent.ts +64 -0
- package/packages/orq-rc/src/models/components/toolcallpart.ts +51 -0
- package/packages/orq-rc/src/models/components/tooldoneevent.ts +77 -0
- package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +230 -0
- package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +214 -0
- package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +200 -0
- package/packages/orq-rc/src/models/components/toolfailedevent.ts +77 -0
- package/packages/orq-rc/src/models/components/toolresultpart.ts +71 -0
- package/packages/orq-rc/src/models/components/toolreviewdoneevent.ts +78 -0
- package/packages/orq-rc/src/models/components/toolreviewrequestedevent.ts +87 -0
- package/packages/orq-rc/src/models/components/toolstartedevent.ts +82 -0
- package/packages/orq-rc/src/models/errors/apierror.ts +40 -0
- package/packages/orq-rc/src/models/errors/createeval.ts +51 -0
- package/packages/orq-rc/src/models/errors/createmoderation.ts +84 -0
- package/packages/orq-rc/src/models/errors/createtranscription.ts +87 -0
- package/packages/orq-rc/src/models/errors/createtranslation.ts +87 -0
- package/packages/orq-rc/src/models/errors/deleteagent.ts +51 -0
- package/packages/orq-rc/src/models/errors/deleteeval.ts +51 -0
- package/packages/orq-rc/src/models/errors/deleteidentity.ts +62 -0
- package/packages/orq-rc/src/models/errors/deleteprompt.ts +51 -0
- package/packages/orq-rc/src/models/errors/getevals.ts +51 -0
- package/packages/orq-rc/src/models/errors/getpromptversion.ts +51 -0
- package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +51 -0
- package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +51 -0
- package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +52 -0
- package/packages/orq-rc/src/models/errors/honoapierror.ts +59 -0
- package/packages/orq-rc/src/models/errors/httpclienterrors.ts +62 -0
- package/packages/orq-rc/src/models/errors/index.ts +35 -0
- package/packages/orq-rc/src/models/errors/invokeeval.ts +141 -0
- package/packages/orq-rc/src/models/errors/orqerror.ts +35 -0
- package/packages/orq-rc/src/models/errors/postv2agentsa2a.ts +96 -0
- package/packages/orq-rc/src/models/errors/postv2agentskeycardrefresh.ts +97 -0
- package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +50 -0
- package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +51 -0
- package/packages/orq-rc/src/models/errors/retrieveidentity.ts +62 -0
- package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +109 -0
- package/packages/orq-rc/src/models/errors/streamagent.ts +51 -0
- package/packages/orq-rc/src/models/errors/streamrunagent.ts +51 -0
- package/packages/orq-rc/src/models/errors/updateagent.ts +51 -0
- package/packages/orq-rc/src/models/errors/updateeval.ts +51 -0
- package/packages/orq-rc/src/models/errors/updateidentity.ts +54 -0
- package/packages/orq-rc/src/models/errors/updateprompt.ts +51 -0
- package/packages/orq-rc/src/models/errors/updatetool.ts +62 -0
- package/packages/orq-rc/src/models/operations/cleardataset.ts +39 -0
- package/packages/orq-rc/src/models/operations/createagentrequest.ts +6393 -0
- package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +644 -0
- package/packages/orq-rc/src/models/operations/createannotation.ts +166 -0
- package/packages/orq-rc/src/models/operations/createchatcompletion.ts +6392 -0
- package/packages/orq-rc/src/models/operations/createchunk.ts +222 -0
- package/packages/orq-rc/src/models/operations/createcompletion.ts +3418 -0
- package/packages/orq-rc/src/models/operations/createcontact.ts +156 -0
- package/packages/orq-rc/src/models/operations/createdataset.ts +162 -0
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2551 -0
- package/packages/orq-rc/src/models/operations/createdatasource.ts +437 -0
- package/packages/orq-rc/src/models/operations/createembedding.ts +947 -0
- package/packages/orq-rc/src/models/operations/createeval.ts +4170 -0
- package/packages/orq-rc/src/models/operations/createfeedback.ts +144 -0
- package/packages/orq-rc/src/models/operations/createidentity.ts +162 -0
- package/packages/orq-rc/src/models/operations/createimage.ts +1028 -0
- package/packages/orq-rc/src/models/operations/createimageedit.ts +1045 -0
- package/packages/orq-rc/src/models/operations/createimagevariation.ts +1067 -0
- package/packages/orq-rc/src/models/operations/createknowledge.ts +944 -0
- package/packages/orq-rc/src/models/operations/creatememory.ts +142 -0
- package/packages/orq-rc/src/models/operations/creatememorydocument.ts +152 -0
- package/packages/orq-rc/src/models/operations/creatememorystore.ts +199 -0
- package/packages/orq-rc/src/models/operations/createmoderation.ts +664 -0
- package/packages/orq-rc/src/models/operations/createprompt.ts +5391 -0
- package/packages/orq-rc/src/models/operations/creatererank.ts +890 -0
- package/packages/orq-rc/src/models/operations/createresponse.ts +3325 -0
- package/packages/orq-rc/src/models/operations/createspeech.ts +700 -0
- package/packages/orq-rc/src/models/operations/createtool.ts +2499 -0
- package/packages/orq-rc/src/models/operations/createtranscription.ts +955 -0
- package/packages/orq-rc/src/models/operations/createtranslation.ts +930 -0
- package/packages/orq-rc/src/models/operations/deleteagent.ts +39 -0
- package/packages/orq-rc/src/models/operations/deleteannotation.ts +79 -0
- package/packages/orq-rc/src/models/operations/deletechunk.ts +53 -0
- package/packages/orq-rc/src/models/operations/deletechunks.ts +125 -0
- package/packages/orq-rc/src/models/operations/deletedatapoint.ts +46 -0
- package/packages/orq-rc/src/models/operations/deletedataset.ts +39 -0
- package/packages/orq-rc/src/models/operations/deletedatasource.ts +46 -0
- package/packages/orq-rc/src/models/operations/deleteeval.ts +31 -0
- package/packages/orq-rc/src/models/operations/deleteidentity.ts +34 -0
- package/packages/orq-rc/src/models/operations/deleteknowledge.ts +39 -0
- package/packages/orq-rc/src/models/operations/deletememory.ts +46 -0
- package/packages/orq-rc/src/models/operations/deletememorydocument.ts +55 -0
- package/packages/orq-rc/src/models/operations/deletememorystore.ts +39 -0
- package/packages/orq-rc/src/models/operations/deleteprompt.ts +34 -0
- package/packages/orq-rc/src/models/operations/deletetool.ts +36 -0
- package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +2370 -0
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +4525 -0
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +729 -0
- package/packages/orq-rc/src/models/operations/deployments.ts +1269 -0
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +4653 -0
- package/packages/orq-rc/src/models/operations/filedelete.ts +39 -0
- package/packages/orq-rc/src/models/operations/fileget.ts +116 -0
- package/packages/orq-rc/src/models/operations/filelist.ts +172 -0
- package/packages/orq-rc/src/models/operations/fileupload.ts +170 -0
- package/packages/orq-rc/src/models/operations/getagentresponse.ts +46 -0
- package/packages/orq-rc/src/models/operations/getallmemories.ts +173 -0
- package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +188 -0
- package/packages/orq-rc/src/models/operations/getallmemorystores.ts +200 -0
- package/packages/orq-rc/src/models/operations/getallprompts.ts +3165 -0
- package/packages/orq-rc/src/models/operations/getalltools.ts +1398 -0
- package/packages/orq-rc/src/models/operations/getchunkscount.ts +121 -0
- package/packages/orq-rc/src/models/operations/getevals.ts +2842 -0
- package/packages/orq-rc/src/models/operations/getonechunk.ts +171 -0
- package/packages/orq-rc/src/models/operations/getoneknowledge.ts +652 -0
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +3090 -0
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +3135 -0
- package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +162 -0
- package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +163 -0
- package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +110 -0
- package/packages/orq-rc/src/models/operations/index.ts +116 -0
- package/packages/orq-rc/src/models/operations/invokeagent.ts +777 -0
- package/packages/orq-rc/src/models/operations/invokeeval.ts +1253 -0
- package/packages/orq-rc/src/models/operations/listagents.ts +2754 -0
- package/packages/orq-rc/src/models/operations/listchunks.ts +260 -0
- package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +263 -0
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +1498 -0
- package/packages/orq-rc/src/models/operations/listdatasets.ts +205 -0
- package/packages/orq-rc/src/models/operations/listdatasources.ts +235 -0
- package/packages/orq-rc/src/models/operations/listidentities.ts +275 -0
- package/packages/orq-rc/src/models/operations/listknowledgebases.ts +642 -0
- package/packages/orq-rc/src/models/operations/listmodels.ts +143 -0
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +3210 -0
- package/packages/orq-rc/src/models/operations/parse.ts +777 -0
- package/packages/orq-rc/src/models/operations/postv2agentsa2a.ts +252 -0
- package/packages/orq-rc/src/models/operations/postv2agentskeycardrefresh.ts +100 -0
- package/packages/orq-rc/src/models/operations/postv2routerocr.ts +478 -0
- package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +108 -0
- package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +2814 -0
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +1402 -0
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +150 -0
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +152 -0
- package/packages/orq-rc/src/models/operations/retrieveidentity.ts +117 -0
- package/packages/orq-rc/src/models/operations/retrievememory.ts +112 -0
- package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +118 -0
- package/packages/orq-rc/src/models/operations/retrievememorystore.ts +144 -0
- package/packages/orq-rc/src/models/operations/retrievetool.ts +1379 -0
- package/packages/orq-rc/src/models/operations/runagent.ts +4927 -0
- package/packages/orq-rc/src/models/operations/searchknowledge.ts +1762 -0
- package/packages/orq-rc/src/models/operations/streamagent.ts +668 -0
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +5089 -0
- package/packages/orq-rc/src/models/operations/updateagent.ts +6824 -0
- package/packages/orq-rc/src/models/operations/updatechunk.ts +236 -0
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2555 -0
- package/packages/orq-rc/src/models/operations/updatedataset.ts +206 -0
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +186 -0
- package/packages/orq-rc/src/models/operations/updateeval.ts +4152 -0
- package/packages/orq-rc/src/models/operations/updateidentity.ts +189 -0
- package/packages/orq-rc/src/models/operations/updateknowledge.ts +1231 -0
- package/packages/orq-rc/src/models/operations/updatememory.ts +142 -0
- package/packages/orq-rc/src/models/operations/updatememorydocument.ts +159 -0
- package/packages/orq-rc/src/models/operations/updatememorystore.ts +188 -0
- package/packages/orq-rc/src/models/operations/updateprompt.ts +5473 -0
- package/packages/orq-rc/src/models/operations/updatetool.ts +2810 -0
- package/packages/orq-rc/src/sdk/agents.ts +234 -0
- package/packages/orq-rc/src/sdk/annotations.ts +39 -0
- package/packages/orq-rc/src/sdk/audio.ts +25 -0
- package/packages/orq-rc/src/sdk/chat.ts +13 -0
- package/packages/orq-rc/src/sdk/chunking.ts +27 -0
- package/packages/orq-rc/src/sdk/completions.ts +32 -0
- package/packages/orq-rc/src/sdk/contacts.ts +27 -0
- package/packages/orq-rc/src/sdk/datasets.ts +204 -0
- package/packages/orq-rc/src/sdk/deployments.ts +89 -0
- package/packages/orq-rc/src/sdk/edits.ts +27 -0
- package/packages/orq-rc/src/sdk/embeddings.ts +27 -0
- package/packages/orq-rc/src/sdk/evals.ts +84 -0
- package/packages/orq-rc/src/sdk/evaluators.ts +27 -0
- package/packages/orq-rc/src/sdk/feedback.ts +27 -0
- package/packages/orq-rc/src/sdk/files.ts +78 -0
- package/packages/orq-rc/src/sdk/generations.ts +27 -0
- package/packages/orq-rc/src/sdk/identities.ts +99 -0
- package/packages/orq-rc/src/sdk/images.ts +25 -0
- package/packages/orq-rc/src/sdk/index.ts +5 -0
- package/packages/orq-rc/src/sdk/knowledge.ts +309 -0
- package/packages/orq-rc/src/sdk/memorystores.ts +286 -0
- package/packages/orq-rc/src/sdk/metrics.ts +27 -0
- package/packages/orq-rc/src/sdk/models.ts +25 -0
- package/packages/orq-rc/src/sdk/moderations.ts +24 -0
- package/packages/orq-rc/src/sdk/orqcompletions.ts +32 -0
- package/packages/orq-rc/src/sdk/orqresponses.ts +32 -0
- package/packages/orq-rc/src/sdk/prompts.ts +126 -0
- package/packages/orq-rc/src/sdk/remoteconfigs.ts +24 -0
- package/packages/orq-rc/src/sdk/rerank.ts +27 -0
- package/packages/orq-rc/src/sdk/responses.ts +53 -0
- package/packages/orq-rc/src/sdk/router.ts +72 -0
- package/packages/orq-rc/src/sdk/sdk.ts +115 -0
- package/packages/orq-rc/src/sdk/speech.ts +27 -0
- package/packages/orq-rc/src/sdk/tools.ts +135 -0
- package/packages/orq-rc/src/sdk/transcriptions.ts +24 -0
- package/packages/orq-rc/src/sdk/translations.ts +24 -0
- package/packages/orq-rc/src/sdk/variations.ts +27 -0
- package/packages/orq-rc/src/types/async.ts +68 -0
- package/packages/orq-rc/src/types/blobs.ts +32 -0
- package/packages/orq-rc/src/types/constdatetime.ts +15 -0
- package/packages/orq-rc/src/types/enums.ts +45 -0
- package/packages/orq-rc/src/types/fp.ts +50 -0
- package/packages/orq-rc/src/types/index.ts +11 -0
- package/packages/orq-rc/src/types/operations.ts +105 -0
- package/packages/orq-rc/src/types/rfcdate.ts +54 -0
- package/packages/orq-rc/src/types/streams.ts +21 -0
- package/packages/orq-rc/src/types/unrecognized.ts +35 -0
- 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 +243 -943
- 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/createprompt.ts +59 -69
- package/src/models/operations/createresponse.ts +2 -1
- package/src/models/operations/createtool.ts +6 -6
- 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 +6 -6
- 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 +218 -482
- 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/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 +207 -497
- 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 +380 -1003
- 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
|
@@ -0,0 +1,3210 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as components from "../components/index.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
export type ListPromptVersionsRequest = {
|
|
14
|
+
promptId: string;
|
|
15
|
+
/**
|
|
16
|
+
* A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
|
|
17
|
+
*/
|
|
18
|
+
limit?: number | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, ending with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `after=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the next page of the list.
|
|
21
|
+
*/
|
|
22
|
+
startingAfter?: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, starting with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `before=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the previous page of the list.
|
|
25
|
+
*/
|
|
26
|
+
endingBefore?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const ListPromptVersionsObject = {
|
|
30
|
+
List: "list",
|
|
31
|
+
} as const;
|
|
32
|
+
export type ListPromptVersionsObject = ClosedEnum<
|
|
33
|
+
typeof ListPromptVersionsObject
|
|
34
|
+
>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The modality of the model
|
|
38
|
+
*/
|
|
39
|
+
export const ListPromptVersionsModelType = {
|
|
40
|
+
Chat: "chat",
|
|
41
|
+
Completion: "completion",
|
|
42
|
+
Embedding: "embedding",
|
|
43
|
+
Image: "image",
|
|
44
|
+
Tts: "tts",
|
|
45
|
+
Stt: "stt",
|
|
46
|
+
Rerank: "rerank",
|
|
47
|
+
Ocr: "ocr",
|
|
48
|
+
Moderation: "moderation",
|
|
49
|
+
Vision: "vision",
|
|
50
|
+
} as const;
|
|
51
|
+
/**
|
|
52
|
+
* The modality of the model
|
|
53
|
+
*/
|
|
54
|
+
export type ListPromptVersionsModelType = ClosedEnum<
|
|
55
|
+
typeof ListPromptVersionsModelType
|
|
56
|
+
>;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Only supported on `image` models.
|
|
60
|
+
*/
|
|
61
|
+
export const ListPromptVersionsFormat = {
|
|
62
|
+
Url: "url",
|
|
63
|
+
B64Json: "b64_json",
|
|
64
|
+
Text: "text",
|
|
65
|
+
JsonObject: "json_object",
|
|
66
|
+
} as const;
|
|
67
|
+
/**
|
|
68
|
+
* Only supported on `image` models.
|
|
69
|
+
*/
|
|
70
|
+
export type ListPromptVersionsFormat = ClosedEnum<
|
|
71
|
+
typeof ListPromptVersionsFormat
|
|
72
|
+
>;
|
|
73
|
+
|
|
74
|
+
export const ListPromptVersionsResponseFormat6 = {
|
|
75
|
+
Json: "json",
|
|
76
|
+
Text: "text",
|
|
77
|
+
Srt: "srt",
|
|
78
|
+
VerboseJson: "verbose_json",
|
|
79
|
+
Vtt: "vtt",
|
|
80
|
+
} as const;
|
|
81
|
+
export type ListPromptVersionsResponseFormat6 = ClosedEnum<
|
|
82
|
+
typeof ListPromptVersionsResponseFormat6
|
|
83
|
+
>;
|
|
84
|
+
|
|
85
|
+
export const ListPromptVersionsResponseFormat5 = {
|
|
86
|
+
Url: "url",
|
|
87
|
+
Base64Json: "base64_json",
|
|
88
|
+
} as const;
|
|
89
|
+
export type ListPromptVersionsResponseFormat5 = ClosedEnum<
|
|
90
|
+
typeof ListPromptVersionsResponseFormat5
|
|
91
|
+
>;
|
|
92
|
+
|
|
93
|
+
export const ListPromptVersionsResponseFormat4 = {
|
|
94
|
+
Mp3: "mp3",
|
|
95
|
+
Opus: "opus",
|
|
96
|
+
Aac: "aac",
|
|
97
|
+
Flac: "flac",
|
|
98
|
+
Wav: "wav",
|
|
99
|
+
Pcm: "pcm",
|
|
100
|
+
} as const;
|
|
101
|
+
export type ListPromptVersionsResponseFormat4 = ClosedEnum<
|
|
102
|
+
typeof ListPromptVersionsResponseFormat4
|
|
103
|
+
>;
|
|
104
|
+
|
|
105
|
+
export const ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType =
|
|
106
|
+
{
|
|
107
|
+
Text: "text",
|
|
108
|
+
} as const;
|
|
109
|
+
export type ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType =
|
|
110
|
+
ClosedEnum<
|
|
111
|
+
typeof ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType
|
|
112
|
+
>;
|
|
113
|
+
|
|
114
|
+
export type ListPromptVersionsResponseFormat3 = {
|
|
115
|
+
type:
|
|
116
|
+
ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export const ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType =
|
|
120
|
+
{
|
|
121
|
+
JsonObject: "json_object",
|
|
122
|
+
} as const;
|
|
123
|
+
export type ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType =
|
|
124
|
+
ClosedEnum<
|
|
125
|
+
typeof ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType
|
|
126
|
+
>;
|
|
127
|
+
|
|
128
|
+
export type ListPromptVersionsResponseFormat2 = {
|
|
129
|
+
type: ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export const ListPromptVersionsResponseFormatPromptsResponse200Type = {
|
|
133
|
+
JsonSchema: "json_schema",
|
|
134
|
+
} as const;
|
|
135
|
+
export type ListPromptVersionsResponseFormatPromptsResponse200Type = ClosedEnum<
|
|
136
|
+
typeof ListPromptVersionsResponseFormatPromptsResponse200Type
|
|
137
|
+
>;
|
|
138
|
+
|
|
139
|
+
export type ListPromptVersionsResponseFormatPromptsResponseJsonSchema = {
|
|
140
|
+
name: string;
|
|
141
|
+
description?: string | undefined;
|
|
142
|
+
strict?: boolean | undefined;
|
|
143
|
+
schema: { [k: string]: any };
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
export type ListPromptVersionsResponseFormat1 = {
|
|
147
|
+
type: ListPromptVersionsResponseFormatPromptsResponse200Type;
|
|
148
|
+
displayName?: string | undefined;
|
|
149
|
+
jsonSchema: ListPromptVersionsResponseFormatPromptsResponseJsonSchema;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* An object specifying the format that the model must output.
|
|
154
|
+
*
|
|
155
|
+
* @remarks
|
|
156
|
+
*
|
|
157
|
+
* Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
|
|
158
|
+
*
|
|
159
|
+
* Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
|
|
160
|
+
*
|
|
161
|
+
* Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
|
|
162
|
+
*/
|
|
163
|
+
export type ListPromptVersionsPromptsResponseFormat =
|
|
164
|
+
| ListPromptVersionsResponseFormat1
|
|
165
|
+
| ListPromptVersionsResponseFormat2
|
|
166
|
+
| ListPromptVersionsResponseFormat3
|
|
167
|
+
| ListPromptVersionsResponseFormat4
|
|
168
|
+
| ListPromptVersionsResponseFormat5
|
|
169
|
+
| ListPromptVersionsResponseFormat6;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
173
|
+
*/
|
|
174
|
+
export const ListPromptVersionsPhotoRealVersion = {
|
|
175
|
+
V1: "v1",
|
|
176
|
+
V2: "v2",
|
|
177
|
+
} as const;
|
|
178
|
+
/**
|
|
179
|
+
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
180
|
+
*/
|
|
181
|
+
export type ListPromptVersionsPhotoRealVersion = ClosedEnum<
|
|
182
|
+
typeof ListPromptVersionsPhotoRealVersion
|
|
183
|
+
>;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* The format to return the embeddings
|
|
187
|
+
*/
|
|
188
|
+
export const ListPromptVersionsEncodingFormat = {
|
|
189
|
+
Float: "float",
|
|
190
|
+
Base64: "base64",
|
|
191
|
+
} as const;
|
|
192
|
+
/**
|
|
193
|
+
* The format to return the embeddings
|
|
194
|
+
*/
|
|
195
|
+
export type ListPromptVersionsEncodingFormat = ClosedEnum<
|
|
196
|
+
typeof ListPromptVersionsEncodingFormat
|
|
197
|
+
>;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
201
|
+
*/
|
|
202
|
+
export const ListPromptVersionsPromptsReasoningEffort = {
|
|
203
|
+
None: "none",
|
|
204
|
+
Disable: "disable",
|
|
205
|
+
Minimal: "minimal",
|
|
206
|
+
Low: "low",
|
|
207
|
+
Medium: "medium",
|
|
208
|
+
High: "high",
|
|
209
|
+
} as const;
|
|
210
|
+
/**
|
|
211
|
+
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
212
|
+
*/
|
|
213
|
+
export type ListPromptVersionsPromptsReasoningEffort = ClosedEnum<
|
|
214
|
+
typeof ListPromptVersionsPromptsReasoningEffort
|
|
215
|
+
>;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Controls the verbosity of the model output.
|
|
219
|
+
*/
|
|
220
|
+
export const ListPromptVersionsVerbosity = {
|
|
221
|
+
Low: "low",
|
|
222
|
+
Medium: "medium",
|
|
223
|
+
High: "high",
|
|
224
|
+
} as const;
|
|
225
|
+
/**
|
|
226
|
+
* Controls the verbosity of the model output.
|
|
227
|
+
*/
|
|
228
|
+
export type ListPromptVersionsVerbosity = ClosedEnum<
|
|
229
|
+
typeof ListPromptVersionsVerbosity
|
|
230
|
+
>;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* The level of thinking to use for the model. Only supported by `Google AI`
|
|
234
|
+
*/
|
|
235
|
+
export const ListPromptVersionsThinkingLevel = {
|
|
236
|
+
Low: "low",
|
|
237
|
+
High: "high",
|
|
238
|
+
} as const;
|
|
239
|
+
/**
|
|
240
|
+
* The level of thinking to use for the model. Only supported by `Google AI`
|
|
241
|
+
*/
|
|
242
|
+
export type ListPromptVersionsThinkingLevel = ClosedEnum<
|
|
243
|
+
typeof ListPromptVersionsThinkingLevel
|
|
244
|
+
>;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Model Parameters: Not all parameters apply to every model
|
|
248
|
+
*/
|
|
249
|
+
export type ListPromptVersionsModelParameters = {
|
|
250
|
+
/**
|
|
251
|
+
* Only supported on `chat` and `completion` models.
|
|
252
|
+
*/
|
|
253
|
+
temperature?: number | undefined;
|
|
254
|
+
/**
|
|
255
|
+
* Only supported on `chat` and `completion` models.
|
|
256
|
+
*/
|
|
257
|
+
maxTokens?: number | undefined;
|
|
258
|
+
/**
|
|
259
|
+
* Only supported on `chat` and `completion` models.
|
|
260
|
+
*/
|
|
261
|
+
topK?: number | undefined;
|
|
262
|
+
/**
|
|
263
|
+
* Only supported on `chat` and `completion` models.
|
|
264
|
+
*/
|
|
265
|
+
topP?: number | undefined;
|
|
266
|
+
/**
|
|
267
|
+
* Only supported on `chat` and `completion` models.
|
|
268
|
+
*/
|
|
269
|
+
frequencyPenalty?: number | undefined;
|
|
270
|
+
/**
|
|
271
|
+
* Only supported on `chat` and `completion` models.
|
|
272
|
+
*/
|
|
273
|
+
presencePenalty?: number | undefined;
|
|
274
|
+
/**
|
|
275
|
+
* Only supported on `image` models.
|
|
276
|
+
*/
|
|
277
|
+
numImages?: number | undefined;
|
|
278
|
+
/**
|
|
279
|
+
* Best effort deterministic seed for the model. Currently only OpenAI models support these
|
|
280
|
+
*/
|
|
281
|
+
seed?: number | undefined;
|
|
282
|
+
/**
|
|
283
|
+
* Only supported on `image` models.
|
|
284
|
+
*/
|
|
285
|
+
format?: ListPromptVersionsFormat | undefined;
|
|
286
|
+
/**
|
|
287
|
+
* Only supported on `image` models.
|
|
288
|
+
*/
|
|
289
|
+
dimensions?: string | undefined;
|
|
290
|
+
/**
|
|
291
|
+
* Only supported on `image` models.
|
|
292
|
+
*/
|
|
293
|
+
quality?: string | undefined;
|
|
294
|
+
/**
|
|
295
|
+
* Only supported on `image` models.
|
|
296
|
+
*/
|
|
297
|
+
style?: string | undefined;
|
|
298
|
+
/**
|
|
299
|
+
* An object specifying the format that the model must output.
|
|
300
|
+
*
|
|
301
|
+
* @remarks
|
|
302
|
+
*
|
|
303
|
+
* Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
|
|
304
|
+
*
|
|
305
|
+
* Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
|
|
306
|
+
*
|
|
307
|
+
* Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
|
|
308
|
+
*/
|
|
309
|
+
responseFormat?:
|
|
310
|
+
| ListPromptVersionsResponseFormat1
|
|
311
|
+
| ListPromptVersionsResponseFormat2
|
|
312
|
+
| ListPromptVersionsResponseFormat3
|
|
313
|
+
| ListPromptVersionsResponseFormat4
|
|
314
|
+
| ListPromptVersionsResponseFormat5
|
|
315
|
+
| ListPromptVersionsResponseFormat6
|
|
316
|
+
| null
|
|
317
|
+
| undefined;
|
|
318
|
+
/**
|
|
319
|
+
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
320
|
+
*/
|
|
321
|
+
photoRealVersion?: ListPromptVersionsPhotoRealVersion | undefined;
|
|
322
|
+
/**
|
|
323
|
+
* The format to return the embeddings
|
|
324
|
+
*/
|
|
325
|
+
encodingFormat?: ListPromptVersionsEncodingFormat | undefined;
|
|
326
|
+
/**
|
|
327
|
+
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
328
|
+
*/
|
|
329
|
+
reasoningEffort?: ListPromptVersionsPromptsReasoningEffort | undefined;
|
|
330
|
+
/**
|
|
331
|
+
* Gives the model enhanced reasoning capabilities for complex tasks. A value of 0 disables thinking. The minimum budget tokens for thinking are 1024. The Budget Tokens should never exceed the Max Tokens parameter. Only supported by `Anthropic`
|
|
332
|
+
*/
|
|
333
|
+
budgetTokens?: number | undefined;
|
|
334
|
+
/**
|
|
335
|
+
* Controls the verbosity of the model output.
|
|
336
|
+
*/
|
|
337
|
+
verbosity?: ListPromptVersionsVerbosity | undefined;
|
|
338
|
+
/**
|
|
339
|
+
* The level of thinking to use for the model. Only supported by `Google AI`
|
|
340
|
+
*/
|
|
341
|
+
thinkingLevel?: ListPromptVersionsThinkingLevel | undefined;
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
export const ListPromptVersionsProvider = {
|
|
345
|
+
Openai: "openai",
|
|
346
|
+
Groq: "groq",
|
|
347
|
+
Cohere: "cohere",
|
|
348
|
+
Azure: "azure",
|
|
349
|
+
Aws: "aws",
|
|
350
|
+
Google: "google",
|
|
351
|
+
GoogleAi: "google-ai",
|
|
352
|
+
Huggingface: "huggingface",
|
|
353
|
+
Togetherai: "togetherai",
|
|
354
|
+
Perplexity: "perplexity",
|
|
355
|
+
Anthropic: "anthropic",
|
|
356
|
+
Leonardoai: "leonardoai",
|
|
357
|
+
Fal: "fal",
|
|
358
|
+
Nvidia: "nvidia",
|
|
359
|
+
Jina: "jina",
|
|
360
|
+
Elevenlabs: "elevenlabs",
|
|
361
|
+
Litellm: "litellm",
|
|
362
|
+
Cerebras: "cerebras",
|
|
363
|
+
Openailike: "openailike",
|
|
364
|
+
Bytedance: "bytedance",
|
|
365
|
+
Mistral: "mistral",
|
|
366
|
+
Deepseek: "deepseek",
|
|
367
|
+
Contextualai: "contextualai",
|
|
368
|
+
Moonshotai: "moonshotai",
|
|
369
|
+
Zai: "zai",
|
|
370
|
+
Minimax: "minimax",
|
|
371
|
+
Xai: "xai",
|
|
372
|
+
Alibaba: "alibaba",
|
|
373
|
+
Slack: "slack",
|
|
374
|
+
} as const;
|
|
375
|
+
export type ListPromptVersionsProvider = ClosedEnum<
|
|
376
|
+
typeof ListPromptVersionsProvider
|
|
377
|
+
>;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* The role of the prompt message
|
|
381
|
+
*/
|
|
382
|
+
export const ListPromptVersionsRole = {
|
|
383
|
+
System: "system",
|
|
384
|
+
Assistant: "assistant",
|
|
385
|
+
User: "user",
|
|
386
|
+
Exception: "exception",
|
|
387
|
+
Tool: "tool",
|
|
388
|
+
Prompt: "prompt",
|
|
389
|
+
Correction: "correction",
|
|
390
|
+
ExpectedOutput: "expected_output",
|
|
391
|
+
} as const;
|
|
392
|
+
/**
|
|
393
|
+
* The role of the prompt message
|
|
394
|
+
*/
|
|
395
|
+
export type ListPromptVersionsRole = ClosedEnum<typeof ListPromptVersionsRole>;
|
|
396
|
+
|
|
397
|
+
export type ListPromptVersions2File = {
|
|
398
|
+
/**
|
|
399
|
+
* The file data as a data URI string in the format 'data:<mime-type>;base64,<base64-encoded-data>'. Example: 'data:image/png;base64,iVBORw0KGgoAAAANS...'
|
|
400
|
+
*/
|
|
401
|
+
fileData?: string | undefined;
|
|
402
|
+
/**
|
|
403
|
+
* URL to the file. Only supported by Anthropic Claude models for PDF files.
|
|
404
|
+
*/
|
|
405
|
+
uri?: string | undefined;
|
|
406
|
+
/**
|
|
407
|
+
* MIME type of the file (e.g., application/pdf, image/png)
|
|
408
|
+
*/
|
|
409
|
+
mimeType?: string | undefined;
|
|
410
|
+
/**
|
|
411
|
+
* The name of the file, used when passing the file to the model as a string.
|
|
412
|
+
*/
|
|
413
|
+
filename?: string | undefined;
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
export type ListPromptVersions23 = {
|
|
417
|
+
/**
|
|
418
|
+
* The type of the content part. Always `file`.
|
|
419
|
+
*/
|
|
420
|
+
type: "file";
|
|
421
|
+
file: ListPromptVersions2File;
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
export type ListPromptVersions2ImageUrl = {
|
|
425
|
+
/**
|
|
426
|
+
* The orq.ai id of the image
|
|
427
|
+
*/
|
|
428
|
+
id?: string | undefined;
|
|
429
|
+
/**
|
|
430
|
+
* Either a URL of the image or the base64 encoded data URI.
|
|
431
|
+
*/
|
|
432
|
+
url: string;
|
|
433
|
+
/**
|
|
434
|
+
* Specifies the detail level of the image. Currently only supported with OpenAI models
|
|
435
|
+
*/
|
|
436
|
+
detail?: string | undefined;
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* The image part of the prompt message. Only supported with vision models.
|
|
441
|
+
*/
|
|
442
|
+
export type ListPromptVersions22 = {
|
|
443
|
+
type: "image_url";
|
|
444
|
+
imageUrl: ListPromptVersions2ImageUrl;
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Text content part of a prompt message
|
|
449
|
+
*/
|
|
450
|
+
export type ListPromptVersions21 = {
|
|
451
|
+
type: "text";
|
|
452
|
+
text: string;
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
export type ListPromptVersionsContent2 =
|
|
456
|
+
| ListPromptVersions21
|
|
457
|
+
| ListPromptVersions22
|
|
458
|
+
| ListPromptVersions23;
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Can be null for tool messages in certain scenarios.
|
|
462
|
+
*/
|
|
463
|
+
export type ListPromptVersionsContent =
|
|
464
|
+
| string
|
|
465
|
+
| Array<ListPromptVersions21 | ListPromptVersions22 | ListPromptVersions23>;
|
|
466
|
+
|
|
467
|
+
export const ListPromptVersionsPromptsType = {
|
|
468
|
+
Function: "function",
|
|
469
|
+
} as const;
|
|
470
|
+
export type ListPromptVersionsPromptsType = ClosedEnum<
|
|
471
|
+
typeof ListPromptVersionsPromptsType
|
|
472
|
+
>;
|
|
473
|
+
|
|
474
|
+
export type ListPromptVersionsFunction = {
|
|
475
|
+
name: string;
|
|
476
|
+
/**
|
|
477
|
+
* JSON string arguments for the functions
|
|
478
|
+
*/
|
|
479
|
+
arguments: string;
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
export type ListPromptVersionsToolCalls = {
|
|
483
|
+
id?: string | undefined;
|
|
484
|
+
index?: number | undefined;
|
|
485
|
+
type: ListPromptVersionsPromptsType;
|
|
486
|
+
function: ListPromptVersionsFunction;
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
export type ListPromptVersionsMessages = {
|
|
490
|
+
/**
|
|
491
|
+
* The role of the prompt message
|
|
492
|
+
*/
|
|
493
|
+
role: ListPromptVersionsRole;
|
|
494
|
+
/**
|
|
495
|
+
* The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Can be null for tool messages in certain scenarios.
|
|
496
|
+
*/
|
|
497
|
+
content:
|
|
498
|
+
| string
|
|
499
|
+
| Array<ListPromptVersions21 | ListPromptVersions22 | ListPromptVersions23>
|
|
500
|
+
| null;
|
|
501
|
+
toolCalls?: Array<ListPromptVersionsToolCalls> | undefined;
|
|
502
|
+
toolCallId?: string | null | undefined;
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* [DEPRECATED] Use the `prompt` property instead. A list of messages compatible with the openAI schema.
|
|
507
|
+
*
|
|
508
|
+
* @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
509
|
+
*/
|
|
510
|
+
export type ListPromptVersionsPromptConfig = {
|
|
511
|
+
stream?: boolean | undefined;
|
|
512
|
+
model?: string | null | undefined;
|
|
513
|
+
/**
|
|
514
|
+
* The id of the resource
|
|
515
|
+
*/
|
|
516
|
+
modelDbId?: string | null | undefined;
|
|
517
|
+
/**
|
|
518
|
+
* The modality of the model
|
|
519
|
+
*/
|
|
520
|
+
modelType?: ListPromptVersionsModelType | null | undefined;
|
|
521
|
+
/**
|
|
522
|
+
* Model Parameters: Not all parameters apply to every model
|
|
523
|
+
*/
|
|
524
|
+
modelParameters?: ListPromptVersionsModelParameters | undefined;
|
|
525
|
+
provider?: ListPromptVersionsProvider | null | undefined;
|
|
526
|
+
/**
|
|
527
|
+
* The ID of the integration to use
|
|
528
|
+
*/
|
|
529
|
+
integrationId?: string | null | undefined;
|
|
530
|
+
version?: string | undefined;
|
|
531
|
+
messages: Array<ListPromptVersionsMessages>;
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
536
|
+
*/
|
|
537
|
+
export const ListPromptVersionsVoice = {
|
|
538
|
+
Alloy: "alloy",
|
|
539
|
+
Echo: "echo",
|
|
540
|
+
Fable: "fable",
|
|
541
|
+
Onyx: "onyx",
|
|
542
|
+
Nova: "nova",
|
|
543
|
+
Shimmer: "shimmer",
|
|
544
|
+
} as const;
|
|
545
|
+
/**
|
|
546
|
+
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
547
|
+
*/
|
|
548
|
+
export type ListPromptVersionsVoice = ClosedEnum<
|
|
549
|
+
typeof ListPromptVersionsVoice
|
|
550
|
+
>;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
554
|
+
*/
|
|
555
|
+
export const ListPromptVersionsPromptsFormat = {
|
|
556
|
+
Wav: "wav",
|
|
557
|
+
Mp3: "mp3",
|
|
558
|
+
Flac: "flac",
|
|
559
|
+
Opus: "opus",
|
|
560
|
+
Pcm16: "pcm16",
|
|
561
|
+
} as const;
|
|
562
|
+
/**
|
|
563
|
+
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
564
|
+
*/
|
|
565
|
+
export type ListPromptVersionsPromptsFormat = ClosedEnum<
|
|
566
|
+
typeof ListPromptVersionsPromptsFormat
|
|
567
|
+
>;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
|
|
571
|
+
*/
|
|
572
|
+
export type ListPromptVersionsAudio = {
|
|
573
|
+
/**
|
|
574
|
+
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
575
|
+
*/
|
|
576
|
+
voice: ListPromptVersionsVoice;
|
|
577
|
+
/**
|
|
578
|
+
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
579
|
+
*/
|
|
580
|
+
format: ListPromptVersionsPromptsFormat;
|
|
581
|
+
};
|
|
582
|
+
|
|
583
|
+
export type ListPromptVersionsResponseFormatJsonSchema = {
|
|
584
|
+
/**
|
|
585
|
+
* A description of what the response format is for, used by the model to determine how to respond in the format.
|
|
586
|
+
*/
|
|
587
|
+
description?: string | undefined;
|
|
588
|
+
/**
|
|
589
|
+
* The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
|
|
590
|
+
*/
|
|
591
|
+
name: string;
|
|
592
|
+
/**
|
|
593
|
+
* The schema for the response format, described as a JSON Schema object.
|
|
594
|
+
*/
|
|
595
|
+
schema?: any | undefined;
|
|
596
|
+
/**
|
|
597
|
+
* Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when strict is true.
|
|
598
|
+
*/
|
|
599
|
+
strict: boolean;
|
|
600
|
+
};
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* @remarks
|
|
604
|
+
*
|
|
605
|
+
* JSON Schema response format. Used to generate structured JSON responses
|
|
606
|
+
*/
|
|
607
|
+
export type ListPromptVersionsResponseFormatPromptsJSONSchema = {
|
|
608
|
+
type: "json_schema";
|
|
609
|
+
jsonSchema: ListPromptVersionsResponseFormatJsonSchema;
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* @remarks
|
|
614
|
+
*
|
|
615
|
+
* JSON object response format. An older method of generating JSON responses. Using `json_schema` is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.
|
|
616
|
+
*/
|
|
617
|
+
export type ListPromptVersionsResponseFormatJSONObject = {
|
|
618
|
+
type: "json_object";
|
|
619
|
+
};
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* @remarks
|
|
623
|
+
*
|
|
624
|
+
* Default response format. Used to generate text responses
|
|
625
|
+
*/
|
|
626
|
+
export type ListPromptVersionsResponseFormatText = {
|
|
627
|
+
type: "text";
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* An object specifying the format that the model must output
|
|
632
|
+
*/
|
|
633
|
+
export type ListPromptVersionsResponseFormat =
|
|
634
|
+
| ListPromptVersionsResponseFormatText
|
|
635
|
+
| ListPromptVersionsResponseFormatJSONObject
|
|
636
|
+
| ListPromptVersionsResponseFormatPromptsJSONSchema;
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
640
|
+
*
|
|
641
|
+
* @remarks
|
|
642
|
+
*
|
|
643
|
+
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
|
|
644
|
+
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
|
|
645
|
+
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
646
|
+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
|
|
647
|
+
*
|
|
648
|
+
* Any of "none", "minimal", "low", "medium", "high", "xhigh".
|
|
649
|
+
*/
|
|
650
|
+
export const ListPromptVersionsReasoningEffort = {
|
|
651
|
+
None: "none",
|
|
652
|
+
Minimal: "minimal",
|
|
653
|
+
Low: "low",
|
|
654
|
+
Medium: "medium",
|
|
655
|
+
High: "high",
|
|
656
|
+
Xhigh: "xhigh",
|
|
657
|
+
} as const;
|
|
658
|
+
/**
|
|
659
|
+
* Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
660
|
+
*
|
|
661
|
+
* @remarks
|
|
662
|
+
*
|
|
663
|
+
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
|
|
664
|
+
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
|
|
665
|
+
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
666
|
+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
|
|
667
|
+
*
|
|
668
|
+
* Any of "none", "minimal", "low", "medium", "high", "xhigh".
|
|
669
|
+
*/
|
|
670
|
+
export type ListPromptVersionsReasoningEffort = ClosedEnum<
|
|
671
|
+
typeof ListPromptVersionsReasoningEffort
|
|
672
|
+
>;
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Up to 4 sequences where the API will stop generating further tokens.
|
|
676
|
+
*/
|
|
677
|
+
export type ListPromptVersionsStop = string | Array<string>;
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
681
|
+
*/
|
|
682
|
+
export type ListPromptVersionsStreamOptions = {
|
|
683
|
+
/**
|
|
684
|
+
* 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.
|
|
685
|
+
*/
|
|
686
|
+
includeUsage?: boolean | undefined;
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
export type ListPromptVersionsThinking =
|
|
690
|
+
| components.ThinkingConfigDisabledSchema
|
|
691
|
+
| components.ThinkingConfigEnabledSchema;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* The type of the tool. Currently, only function is supported.
|
|
695
|
+
*/
|
|
696
|
+
export const ListPromptVersionsToolChoiceType = {
|
|
697
|
+
Function: "function",
|
|
698
|
+
} as const;
|
|
699
|
+
/**
|
|
700
|
+
* The type of the tool. Currently, only function is supported.
|
|
701
|
+
*/
|
|
702
|
+
export type ListPromptVersionsToolChoiceType = ClosedEnum<
|
|
703
|
+
typeof ListPromptVersionsToolChoiceType
|
|
704
|
+
>;
|
|
705
|
+
|
|
706
|
+
export type ListPromptVersionsToolChoiceFunction = {
|
|
707
|
+
/**
|
|
708
|
+
* The name of the function to call.
|
|
709
|
+
*/
|
|
710
|
+
name: string;
|
|
711
|
+
};
|
|
712
|
+
|
|
713
|
+
export type ListPromptVersionsToolChoice2 = {
|
|
714
|
+
/**
|
|
715
|
+
* The type of the tool. Currently, only function is supported.
|
|
716
|
+
*/
|
|
717
|
+
type?: ListPromptVersionsToolChoiceType | undefined;
|
|
718
|
+
function: ListPromptVersionsToolChoiceFunction;
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
export const ListPromptVersionsToolChoice1 = {
|
|
722
|
+
None: "none",
|
|
723
|
+
Auto: "auto",
|
|
724
|
+
Required: "required",
|
|
725
|
+
} as const;
|
|
726
|
+
export type ListPromptVersionsToolChoice1 = ClosedEnum<
|
|
727
|
+
typeof ListPromptVersionsToolChoice1
|
|
728
|
+
>;
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Controls which (if any) tool is called by the model.
|
|
732
|
+
*/
|
|
733
|
+
export type ListPromptVersionsToolChoice =
|
|
734
|
+
| ListPromptVersionsToolChoice2
|
|
735
|
+
| ListPromptVersionsToolChoice1;
|
|
736
|
+
|
|
737
|
+
export const ListPromptVersionsModalities = {
|
|
738
|
+
Text: "text",
|
|
739
|
+
Audio: "audio",
|
|
740
|
+
} as const;
|
|
741
|
+
export type ListPromptVersionsModalities = ClosedEnum<
|
|
742
|
+
typeof ListPromptVersionsModalities
|
|
743
|
+
>;
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* The key of the guardrail.
|
|
747
|
+
*/
|
|
748
|
+
export const ListPromptVersionsId1 = {
|
|
749
|
+
OrqPiiDetection: "orq_pii_detection",
|
|
750
|
+
OrqSexualModeration: "orq_sexual_moderation",
|
|
751
|
+
OrqHarmfulModeration: "orq_harmful_moderation",
|
|
752
|
+
} as const;
|
|
753
|
+
/**
|
|
754
|
+
* The key of the guardrail.
|
|
755
|
+
*/
|
|
756
|
+
export type ListPromptVersionsId1 = ClosedEnum<typeof ListPromptVersionsId1>;
|
|
757
|
+
|
|
758
|
+
export type ListPromptVersionsId = ListPromptVersionsId1 | string;
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Determines whether the guardrail runs on the input (user message) or output (model response).
|
|
762
|
+
*/
|
|
763
|
+
export const ListPromptVersionsExecuteOn = {
|
|
764
|
+
Input: "input",
|
|
765
|
+
Output: "output",
|
|
766
|
+
} as const;
|
|
767
|
+
/**
|
|
768
|
+
* Determines whether the guardrail runs on the input (user message) or output (model response).
|
|
769
|
+
*/
|
|
770
|
+
export type ListPromptVersionsExecuteOn = ClosedEnum<
|
|
771
|
+
typeof ListPromptVersionsExecuteOn
|
|
772
|
+
>;
|
|
773
|
+
|
|
774
|
+
export type ListPromptVersionsGuardrails = {
|
|
775
|
+
id: ListPromptVersionsId1 | string;
|
|
776
|
+
/**
|
|
777
|
+
* Determines whether the guardrail runs on the input (user message) or output (model response).
|
|
778
|
+
*/
|
|
779
|
+
executeOn: ListPromptVersionsExecuteOn;
|
|
780
|
+
};
|
|
781
|
+
|
|
782
|
+
export type ListPromptVersionsFallbacks = {
|
|
783
|
+
/**
|
|
784
|
+
* Fallback model identifier
|
|
785
|
+
*/
|
|
786
|
+
model: string;
|
|
787
|
+
};
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* Retry configuration for the request
|
|
791
|
+
*/
|
|
792
|
+
export type ListPromptVersionsRetry = {
|
|
793
|
+
/**
|
|
794
|
+
* Number of retry attempts (1-5)
|
|
795
|
+
*/
|
|
796
|
+
count: number;
|
|
797
|
+
/**
|
|
798
|
+
* HTTP status codes that trigger retry logic
|
|
799
|
+
*/
|
|
800
|
+
onCodes?: Array<number> | undefined;
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
export const ListPromptVersionsType = {
|
|
804
|
+
ExactMatch: "exact_match",
|
|
805
|
+
} as const;
|
|
806
|
+
export type ListPromptVersionsType = ClosedEnum<typeof ListPromptVersionsType>;
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Cache configuration for the request.
|
|
810
|
+
*/
|
|
811
|
+
export type ListPromptVersionsCache = {
|
|
812
|
+
/**
|
|
813
|
+
* Time to live for cached responses in seconds. Maximum 259200 seconds (3 days).
|
|
814
|
+
*/
|
|
815
|
+
ttl: number;
|
|
816
|
+
type: ListPromptVersionsType;
|
|
817
|
+
};
|
|
818
|
+
|
|
819
|
+
export const ListPromptVersionsLoadBalancerType = {
|
|
820
|
+
WeightBased: "weight_based",
|
|
821
|
+
} as const;
|
|
822
|
+
export type ListPromptVersionsLoadBalancerType = ClosedEnum<
|
|
823
|
+
typeof ListPromptVersionsLoadBalancerType
|
|
824
|
+
>;
|
|
825
|
+
|
|
826
|
+
export type ListPromptVersionsLoadBalancerModels = {
|
|
827
|
+
/**
|
|
828
|
+
* Model identifier for load balancing
|
|
829
|
+
*/
|
|
830
|
+
model: string;
|
|
831
|
+
/**
|
|
832
|
+
* Weight assigned to this model for load balancing
|
|
833
|
+
*/
|
|
834
|
+
weight: number;
|
|
835
|
+
};
|
|
836
|
+
|
|
837
|
+
export type ListPromptVersionsLoadBalancer1 = {
|
|
838
|
+
type: ListPromptVersionsLoadBalancerType;
|
|
839
|
+
models: Array<ListPromptVersionsLoadBalancerModels>;
|
|
840
|
+
};
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Load balancer configuration for the request.
|
|
844
|
+
*/
|
|
845
|
+
export type ListPromptVersionsLoadBalancer = ListPromptVersionsLoadBalancer1;
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
|
|
849
|
+
*/
|
|
850
|
+
export type ListPromptVersionsTimeout = {
|
|
851
|
+
/**
|
|
852
|
+
* Timeout value in milliseconds
|
|
853
|
+
*/
|
|
854
|
+
callTimeout: number;
|
|
855
|
+
};
|
|
856
|
+
|
|
857
|
+
export type ListPromptVersionsContentPromptsResponse2002 =
|
|
858
|
+
components.TextContentPartSchema;
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* The contents of the tool message.
|
|
862
|
+
*/
|
|
863
|
+
export type ListPromptVersionsMessagesPromptsResponse200Content =
|
|
864
|
+
| string
|
|
865
|
+
| Array<components.TextContentPartSchema>;
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
869
|
+
*/
|
|
870
|
+
export const ListPromptVersionsMessagesPromptsType = {
|
|
871
|
+
Ephemeral: "ephemeral",
|
|
872
|
+
} as const;
|
|
873
|
+
/**
|
|
874
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
875
|
+
*/
|
|
876
|
+
export type ListPromptVersionsMessagesPromptsType = ClosedEnum<
|
|
877
|
+
typeof ListPromptVersionsMessagesPromptsType
|
|
878
|
+
>;
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
882
|
+
*
|
|
883
|
+
* @remarks
|
|
884
|
+
*
|
|
885
|
+
* - `5m`: 5 minutes
|
|
886
|
+
* - `1h`: 1 hour
|
|
887
|
+
*
|
|
888
|
+
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
889
|
+
*/
|
|
890
|
+
export const ListPromptVersionsMessagesTtl = {
|
|
891
|
+
Fivem: "5m",
|
|
892
|
+
Oneh: "1h",
|
|
893
|
+
} as const;
|
|
894
|
+
/**
|
|
895
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
896
|
+
*
|
|
897
|
+
* @remarks
|
|
898
|
+
*
|
|
899
|
+
* - `5m`: 5 minutes
|
|
900
|
+
* - `1h`: 1 hour
|
|
901
|
+
*
|
|
902
|
+
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
903
|
+
*/
|
|
904
|
+
export type ListPromptVersionsMessagesTtl = ClosedEnum<
|
|
905
|
+
typeof ListPromptVersionsMessagesTtl
|
|
906
|
+
>;
|
|
907
|
+
|
|
908
|
+
export type ListPromptVersionsMessagesCacheControl = {
|
|
909
|
+
/**
|
|
910
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
911
|
+
*/
|
|
912
|
+
type: ListPromptVersionsMessagesPromptsType;
|
|
913
|
+
/**
|
|
914
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
915
|
+
*
|
|
916
|
+
* @remarks
|
|
917
|
+
*
|
|
918
|
+
* - `5m`: 5 minutes
|
|
919
|
+
* - `1h`: 1 hour
|
|
920
|
+
*
|
|
921
|
+
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
922
|
+
*/
|
|
923
|
+
ttl: ListPromptVersionsMessagesTtl;
|
|
924
|
+
};
|
|
925
|
+
|
|
926
|
+
export type ListPromptVersionsMessagesToolMessage = {
|
|
927
|
+
/**
|
|
928
|
+
* The role of the messages author, in this case tool.
|
|
929
|
+
*/
|
|
930
|
+
role: "tool";
|
|
931
|
+
/**
|
|
932
|
+
* The contents of the tool message.
|
|
933
|
+
*/
|
|
934
|
+
content: string | Array<components.TextContentPartSchema>;
|
|
935
|
+
/**
|
|
936
|
+
* Tool call that this message is responding to.
|
|
937
|
+
*/
|
|
938
|
+
toolCallId: string | null;
|
|
939
|
+
cacheControl?: ListPromptVersionsMessagesCacheControl | undefined;
|
|
940
|
+
};
|
|
941
|
+
|
|
942
|
+
export type ListPromptVersionsContentPromptsResponse2 =
|
|
943
|
+
| (components.TextContentPartSchema & { type: "text" })
|
|
944
|
+
| components.RefusalPartSchema
|
|
945
|
+
| components.ReasoningPartSchema
|
|
946
|
+
| components.RedactedReasoningPartSchema;
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
|
|
950
|
+
*/
|
|
951
|
+
export type ListPromptVersionsMessagesPromptsResponseContent =
|
|
952
|
+
| string
|
|
953
|
+
| Array<
|
|
954
|
+
| (components.TextContentPartSchema & { type: "text" })
|
|
955
|
+
| components.RefusalPartSchema
|
|
956
|
+
| components.ReasoningPartSchema
|
|
957
|
+
| components.RedactedReasoningPartSchema
|
|
958
|
+
>;
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* Data about a previous audio response from the model.
|
|
962
|
+
*/
|
|
963
|
+
export type ListPromptVersionsMessagesAudio = {
|
|
964
|
+
/**
|
|
965
|
+
* Unique identifier for a previous audio response from the model.
|
|
966
|
+
*/
|
|
967
|
+
id: string;
|
|
968
|
+
};
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* The type of the tool. Currently, only `function` is supported.
|
|
972
|
+
*/
|
|
973
|
+
export const ListPromptVersionsMessagesType = {
|
|
974
|
+
Function: "function",
|
|
975
|
+
} as const;
|
|
976
|
+
/**
|
|
977
|
+
* The type of the tool. Currently, only `function` is supported.
|
|
978
|
+
*/
|
|
979
|
+
export type ListPromptVersionsMessagesType = ClosedEnum<
|
|
980
|
+
typeof ListPromptVersionsMessagesType
|
|
981
|
+
>;
|
|
982
|
+
|
|
983
|
+
export type ListPromptVersionsMessagesFunction = {
|
|
984
|
+
/**
|
|
985
|
+
* The name of the function to call.
|
|
986
|
+
*/
|
|
987
|
+
name?: string | undefined;
|
|
988
|
+
/**
|
|
989
|
+
* 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.
|
|
990
|
+
*/
|
|
991
|
+
arguments?: string | undefined;
|
|
992
|
+
};
|
|
993
|
+
|
|
994
|
+
export type ListPromptVersionsMessagesToolCalls = {
|
|
995
|
+
/**
|
|
996
|
+
* The ID of the tool call.
|
|
997
|
+
*/
|
|
998
|
+
id: string;
|
|
999
|
+
/**
|
|
1000
|
+
* The type of the tool. Currently, only `function` is supported.
|
|
1001
|
+
*/
|
|
1002
|
+
type: ListPromptVersionsMessagesType;
|
|
1003
|
+
function: ListPromptVersionsMessagesFunction;
|
|
1004
|
+
/**
|
|
1005
|
+
* Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
|
|
1006
|
+
*/
|
|
1007
|
+
thoughtSignature?: string | undefined;
|
|
1008
|
+
};
|
|
1009
|
+
|
|
1010
|
+
export type ListPromptVersionsMessagesAssistantMessage = {
|
|
1011
|
+
/**
|
|
1012
|
+
* The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
|
|
1013
|
+
*/
|
|
1014
|
+
content?:
|
|
1015
|
+
| string
|
|
1016
|
+
| Array<
|
|
1017
|
+
| (components.TextContentPartSchema & { type: "text" })
|
|
1018
|
+
| components.RefusalPartSchema
|
|
1019
|
+
| components.ReasoningPartSchema
|
|
1020
|
+
| components.RedactedReasoningPartSchema
|
|
1021
|
+
>
|
|
1022
|
+
| null
|
|
1023
|
+
| undefined;
|
|
1024
|
+
/**
|
|
1025
|
+
* The refusal message by the assistant.
|
|
1026
|
+
*/
|
|
1027
|
+
refusal?: string | null | undefined;
|
|
1028
|
+
/**
|
|
1029
|
+
* The role of the messages author, in this case `assistant`.
|
|
1030
|
+
*/
|
|
1031
|
+
role: "assistant";
|
|
1032
|
+
/**
|
|
1033
|
+
* An optional name for the participant. Provides the model information to differentiate between participants of the same role.
|
|
1034
|
+
*/
|
|
1035
|
+
name?: string | undefined;
|
|
1036
|
+
/**
|
|
1037
|
+
* Data about a previous audio response from the model.
|
|
1038
|
+
*/
|
|
1039
|
+
audio?: ListPromptVersionsMessagesAudio | null | undefined;
|
|
1040
|
+
/**
|
|
1041
|
+
* The tool calls generated by the model, such as function calls.
|
|
1042
|
+
*/
|
|
1043
|
+
toolCalls?: Array<ListPromptVersionsMessagesToolCalls> | undefined;
|
|
1044
|
+
};
|
|
1045
|
+
|
|
1046
|
+
/**
|
|
1047
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
1048
|
+
*/
|
|
1049
|
+
export const ListPromptVersions2PromptsResponse200ApplicationJSONType = {
|
|
1050
|
+
Ephemeral: "ephemeral",
|
|
1051
|
+
} as const;
|
|
1052
|
+
/**
|
|
1053
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
1054
|
+
*/
|
|
1055
|
+
export type ListPromptVersions2PromptsResponse200ApplicationJSONType =
|
|
1056
|
+
ClosedEnum<typeof ListPromptVersions2PromptsResponse200ApplicationJSONType>;
|
|
1057
|
+
|
|
1058
|
+
/**
|
|
1059
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
1060
|
+
*
|
|
1061
|
+
* @remarks
|
|
1062
|
+
*
|
|
1063
|
+
* - `5m`: 5 minutes
|
|
1064
|
+
* - `1h`: 1 hour
|
|
1065
|
+
*
|
|
1066
|
+
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
1067
|
+
*/
|
|
1068
|
+
export const ListPromptVersions2Ttl = {
|
|
1069
|
+
Fivem: "5m",
|
|
1070
|
+
Oneh: "1h",
|
|
1071
|
+
} as const;
|
|
1072
|
+
/**
|
|
1073
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
1074
|
+
*
|
|
1075
|
+
* @remarks
|
|
1076
|
+
*
|
|
1077
|
+
* - `5m`: 5 minutes
|
|
1078
|
+
* - `1h`: 1 hour
|
|
1079
|
+
*
|
|
1080
|
+
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
1081
|
+
*/
|
|
1082
|
+
export type ListPromptVersions2Ttl = ClosedEnum<typeof ListPromptVersions2Ttl>;
|
|
1083
|
+
|
|
1084
|
+
export type ListPromptVersions2CacheControl = {
|
|
1085
|
+
/**
|
|
1086
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
1087
|
+
*/
|
|
1088
|
+
type: ListPromptVersions2PromptsResponse200ApplicationJSONType;
|
|
1089
|
+
/**
|
|
1090
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
1091
|
+
*
|
|
1092
|
+
* @remarks
|
|
1093
|
+
*
|
|
1094
|
+
* - `5m`: 5 minutes
|
|
1095
|
+
* - `1h`: 1 hour
|
|
1096
|
+
*
|
|
1097
|
+
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
1098
|
+
*/
|
|
1099
|
+
ttl: ListPromptVersions2Ttl;
|
|
1100
|
+
};
|
|
1101
|
+
|
|
1102
|
+
export type ListPromptVersions24 = {
|
|
1103
|
+
/**
|
|
1104
|
+
* The type of the content part. Always `file`.
|
|
1105
|
+
*/
|
|
1106
|
+
type: "file";
|
|
1107
|
+
cacheControl?: ListPromptVersions2CacheControl | undefined;
|
|
1108
|
+
/**
|
|
1109
|
+
* File data for the content part. Must contain either file_data or uri, but not both.
|
|
1110
|
+
*/
|
|
1111
|
+
file: components.FileContentPartSchema;
|
|
1112
|
+
};
|
|
1113
|
+
|
|
1114
|
+
export type ListPromptVersionsContentPrompts2 =
|
|
1115
|
+
| (components.TextContentPartSchema & { type: "text" })
|
|
1116
|
+
| components.ImageContentPartSchema
|
|
1117
|
+
| components.AudioContentPartSchema
|
|
1118
|
+
| ListPromptVersions24;
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* The contents of the user message.
|
|
1122
|
+
*/
|
|
1123
|
+
export type ListPromptVersionsMessagesPromptsContent =
|
|
1124
|
+
| string
|
|
1125
|
+
| Array<
|
|
1126
|
+
| (components.TextContentPartSchema & { type: "text" })
|
|
1127
|
+
| components.ImageContentPartSchema
|
|
1128
|
+
| components.AudioContentPartSchema
|
|
1129
|
+
| ListPromptVersions24
|
|
1130
|
+
>;
|
|
1131
|
+
|
|
1132
|
+
export type ListPromptVersionsMessagesUserMessage = {
|
|
1133
|
+
/**
|
|
1134
|
+
* The role of the messages author, in this case `user`.
|
|
1135
|
+
*/
|
|
1136
|
+
role: "user";
|
|
1137
|
+
/**
|
|
1138
|
+
* An optional name for the participant. Provides the model information to differentiate between participants of the same role.
|
|
1139
|
+
*/
|
|
1140
|
+
name?: string | undefined;
|
|
1141
|
+
/**
|
|
1142
|
+
* The contents of the user message.
|
|
1143
|
+
*/
|
|
1144
|
+
content:
|
|
1145
|
+
| string
|
|
1146
|
+
| Array<
|
|
1147
|
+
| (components.TextContentPartSchema & { type: "text" })
|
|
1148
|
+
| components.ImageContentPartSchema
|
|
1149
|
+
| components.AudioContentPartSchema
|
|
1150
|
+
| ListPromptVersions24
|
|
1151
|
+
>;
|
|
1152
|
+
};
|
|
1153
|
+
|
|
1154
|
+
/**
|
|
1155
|
+
* The contents of the system message.
|
|
1156
|
+
*/
|
|
1157
|
+
export type ListPromptVersionsMessagesContent =
|
|
1158
|
+
| string
|
|
1159
|
+
| Array<components.TextContentPartSchema>;
|
|
1160
|
+
|
|
1161
|
+
/**
|
|
1162
|
+
* Developer-provided instructions that the model should follow, regardless of messages sent by the user.
|
|
1163
|
+
*/
|
|
1164
|
+
export type ListPromptVersionsMessagesSystemMessage = {
|
|
1165
|
+
/**
|
|
1166
|
+
* The role of the messages author, in this case `system`.
|
|
1167
|
+
*/
|
|
1168
|
+
role: "system";
|
|
1169
|
+
/**
|
|
1170
|
+
* The contents of the system message.
|
|
1171
|
+
*/
|
|
1172
|
+
content: string | Array<components.TextContentPartSchema>;
|
|
1173
|
+
/**
|
|
1174
|
+
* An optional name for the participant. Provides the model information to differentiate between participants of the same role.
|
|
1175
|
+
*/
|
|
1176
|
+
name?: string | undefined;
|
|
1177
|
+
};
|
|
1178
|
+
|
|
1179
|
+
export type ListPromptVersionsPromptsMessages =
|
|
1180
|
+
| ListPromptVersionsMessagesSystemMessage
|
|
1181
|
+
| ListPromptVersionsMessagesUserMessage
|
|
1182
|
+
| ListPromptVersionsMessagesAssistantMessage
|
|
1183
|
+
| ListPromptVersionsMessagesToolMessage;
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* Prompt configuration with model and messages. Use this instead of prompt_config.
|
|
1187
|
+
*/
|
|
1188
|
+
export type ListPromptVersionsPromptField = {
|
|
1189
|
+
/**
|
|
1190
|
+
* The name to display on the trace. If not specified, the default system name will be used.
|
|
1191
|
+
*/
|
|
1192
|
+
name?: string | undefined;
|
|
1193
|
+
/**
|
|
1194
|
+
* Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
|
|
1195
|
+
*/
|
|
1196
|
+
audio?: ListPromptVersionsAudio | null | undefined;
|
|
1197
|
+
/**
|
|
1198
|
+
* Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
|
|
1199
|
+
*/
|
|
1200
|
+
frequencyPenalty?: number | null | undefined;
|
|
1201
|
+
/**
|
|
1202
|
+
* `[Deprecated]`. The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API.
|
|
1203
|
+
*
|
|
1204
|
+
* @remarks
|
|
1205
|
+
*
|
|
1206
|
+
* This value is now `deprecated` in favor of `max_completion_tokens`, and is not compatible with o1 series models.
|
|
1207
|
+
*/
|
|
1208
|
+
maxTokens?: number | null | undefined;
|
|
1209
|
+
/**
|
|
1210
|
+
* An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens
|
|
1211
|
+
*/
|
|
1212
|
+
maxCompletionTokens?: number | null | undefined;
|
|
1213
|
+
/**
|
|
1214
|
+
* Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.
|
|
1215
|
+
*/
|
|
1216
|
+
logprobs?: boolean | null | undefined;
|
|
1217
|
+
/**
|
|
1218
|
+
* An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.
|
|
1219
|
+
*/
|
|
1220
|
+
topLogprobs?: number | null | undefined;
|
|
1221
|
+
/**
|
|
1222
|
+
* How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs.
|
|
1223
|
+
*/
|
|
1224
|
+
n?: number | null | undefined;
|
|
1225
|
+
/**
|
|
1226
|
+
* Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
|
|
1227
|
+
*/
|
|
1228
|
+
presencePenalty?: number | null | undefined;
|
|
1229
|
+
/**
|
|
1230
|
+
* An object specifying the format that the model must output
|
|
1231
|
+
*/
|
|
1232
|
+
responseFormat?:
|
|
1233
|
+
| ListPromptVersionsResponseFormatText
|
|
1234
|
+
| ListPromptVersionsResponseFormatJSONObject
|
|
1235
|
+
| ListPromptVersionsResponseFormatPromptsJSONSchema
|
|
1236
|
+
| undefined;
|
|
1237
|
+
/**
|
|
1238
|
+
* Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
1239
|
+
*
|
|
1240
|
+
* @remarks
|
|
1241
|
+
*
|
|
1242
|
+
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
|
|
1243
|
+
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
|
|
1244
|
+
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
1245
|
+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
|
|
1246
|
+
*
|
|
1247
|
+
* Any of "none", "minimal", "low", "medium", "high", "xhigh".
|
|
1248
|
+
*/
|
|
1249
|
+
reasoningEffort?: ListPromptVersionsReasoningEffort | undefined;
|
|
1250
|
+
/**
|
|
1251
|
+
* Adjusts response verbosity. Lower levels yield shorter answers.
|
|
1252
|
+
*/
|
|
1253
|
+
verbosity?: string | undefined;
|
|
1254
|
+
/**
|
|
1255
|
+
* If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.
|
|
1256
|
+
*/
|
|
1257
|
+
seed?: number | null | undefined;
|
|
1258
|
+
/**
|
|
1259
|
+
* Up to 4 sequences where the API will stop generating further tokens.
|
|
1260
|
+
*/
|
|
1261
|
+
stop?: string | Array<string> | null | undefined;
|
|
1262
|
+
/**
|
|
1263
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
1264
|
+
*/
|
|
1265
|
+
streamOptions?: ListPromptVersionsStreamOptions | null | undefined;
|
|
1266
|
+
thinking?:
|
|
1267
|
+
| components.ThinkingConfigDisabledSchema
|
|
1268
|
+
| components.ThinkingConfigEnabledSchema
|
|
1269
|
+
| undefined;
|
|
1270
|
+
/**
|
|
1271
|
+
* What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
|
|
1272
|
+
*/
|
|
1273
|
+
temperature?: number | null | undefined;
|
|
1274
|
+
/**
|
|
1275
|
+
* An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
|
|
1276
|
+
*/
|
|
1277
|
+
topP?: number | null | undefined;
|
|
1278
|
+
/**
|
|
1279
|
+
* Limits the model to consider only the top k most likely tokens at each step.
|
|
1280
|
+
*/
|
|
1281
|
+
topK?: number | null | undefined;
|
|
1282
|
+
/**
|
|
1283
|
+
* Controls which (if any) tool is called by the model.
|
|
1284
|
+
*/
|
|
1285
|
+
toolChoice?:
|
|
1286
|
+
| ListPromptVersionsToolChoice2
|
|
1287
|
+
| ListPromptVersionsToolChoice1
|
|
1288
|
+
| undefined;
|
|
1289
|
+
/**
|
|
1290
|
+
* Whether to enable parallel function calling during tool use.
|
|
1291
|
+
*/
|
|
1292
|
+
parallelToolCalls?: boolean | undefined;
|
|
1293
|
+
/**
|
|
1294
|
+
* Output types that you would like the model to generate. Most models are capable of generating text, which is the default: ["text"]. The gpt-4o-audio-preview model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: ["text", "audio"].
|
|
1295
|
+
*/
|
|
1296
|
+
modalities?: Array<ListPromptVersionsModalities> | null | undefined;
|
|
1297
|
+
/**
|
|
1298
|
+
* A list of guardrails to apply to the request.
|
|
1299
|
+
*/
|
|
1300
|
+
guardrails?: Array<ListPromptVersionsGuardrails> | undefined;
|
|
1301
|
+
/**
|
|
1302
|
+
* Array of fallback models to use if primary model fails
|
|
1303
|
+
*/
|
|
1304
|
+
fallbacks?: Array<ListPromptVersionsFallbacks> | undefined;
|
|
1305
|
+
/**
|
|
1306
|
+
* Retry configuration for the request
|
|
1307
|
+
*/
|
|
1308
|
+
retry?: ListPromptVersionsRetry | undefined;
|
|
1309
|
+
/**
|
|
1310
|
+
* Cache configuration for the request.
|
|
1311
|
+
*/
|
|
1312
|
+
cache?: ListPromptVersionsCache | undefined;
|
|
1313
|
+
/**
|
|
1314
|
+
* Load balancer configuration for the request.
|
|
1315
|
+
*/
|
|
1316
|
+
loadBalancer?: ListPromptVersionsLoadBalancer1 | undefined;
|
|
1317
|
+
/**
|
|
1318
|
+
* Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
|
|
1319
|
+
*/
|
|
1320
|
+
timeout?: ListPromptVersionsTimeout | undefined;
|
|
1321
|
+
/**
|
|
1322
|
+
* Array of messages that make up the conversation. Each message has a role (system, user, assistant, or tool) and content.
|
|
1323
|
+
*/
|
|
1324
|
+
messages?:
|
|
1325
|
+
| Array<
|
|
1326
|
+
| ListPromptVersionsMessagesSystemMessage
|
|
1327
|
+
| ListPromptVersionsMessagesUserMessage
|
|
1328
|
+
| ListPromptVersionsMessagesAssistantMessage
|
|
1329
|
+
| ListPromptVersionsMessagesToolMessage
|
|
1330
|
+
>
|
|
1331
|
+
| undefined;
|
|
1332
|
+
/**
|
|
1333
|
+
* Model ID used to generate the response, like `openai/gpt-4o` or `anthropic/claude-3-5-sonnet-20241022`. For private models, use format: `{workspaceKey}@{provider}/{model}`.
|
|
1334
|
+
*/
|
|
1335
|
+
model?: string | null | undefined;
|
|
1336
|
+
version?: string | undefined;
|
|
1337
|
+
};
|
|
1338
|
+
|
|
1339
|
+
export const ListPromptVersionsUseCases = {
|
|
1340
|
+
AgentsSimulations: "Agents simulations",
|
|
1341
|
+
Agents: "Agents",
|
|
1342
|
+
APIInteraction: "API interaction",
|
|
1343
|
+
AutonomousAgents: "Autonomous Agents",
|
|
1344
|
+
Chatbots: "Chatbots",
|
|
1345
|
+
Classification: "Classification",
|
|
1346
|
+
CodeUnderstanding: "Code understanding",
|
|
1347
|
+
CodeWriting: "Code writing",
|
|
1348
|
+
Conversation: "Conversation",
|
|
1349
|
+
DocumentsQA: "Documents QA",
|
|
1350
|
+
Evaluation: "Evaluation",
|
|
1351
|
+
Extraction: "Extraction",
|
|
1352
|
+
MultiModal: "Multi-modal",
|
|
1353
|
+
SelfChecking: "Self-checking",
|
|
1354
|
+
SentimentAnalysis: "Sentiment analysis",
|
|
1355
|
+
Sql: "SQL",
|
|
1356
|
+
Summarization: "Summarization",
|
|
1357
|
+
Tagging: "Tagging",
|
|
1358
|
+
TranslationDocument: "Translation (document)",
|
|
1359
|
+
TranslationSentences: "Translation (sentences)",
|
|
1360
|
+
} as const;
|
|
1361
|
+
export type ListPromptVersionsUseCases = ClosedEnum<
|
|
1362
|
+
typeof ListPromptVersionsUseCases
|
|
1363
|
+
>;
|
|
1364
|
+
|
|
1365
|
+
/**
|
|
1366
|
+
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
1367
|
+
*/
|
|
1368
|
+
export const ListPromptVersionsLanguage = {
|
|
1369
|
+
Chinese: "Chinese",
|
|
1370
|
+
Dutch: "Dutch",
|
|
1371
|
+
English: "English",
|
|
1372
|
+
French: "French",
|
|
1373
|
+
German: "German",
|
|
1374
|
+
Russian: "Russian",
|
|
1375
|
+
Spanish: "Spanish",
|
|
1376
|
+
} as const;
|
|
1377
|
+
/**
|
|
1378
|
+
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
1379
|
+
*/
|
|
1380
|
+
export type ListPromptVersionsLanguage = ClosedEnum<
|
|
1381
|
+
typeof ListPromptVersionsLanguage
|
|
1382
|
+
>;
|
|
1383
|
+
|
|
1384
|
+
export type ListPromptVersionsMetadata = {
|
|
1385
|
+
/**
|
|
1386
|
+
* A list of use cases that the prompt is meant to be used for. Use this field to categorize the prompt for your own purpose
|
|
1387
|
+
*/
|
|
1388
|
+
useCases?: Array<ListPromptVersionsUseCases> | undefined;
|
|
1389
|
+
/**
|
|
1390
|
+
* The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
|
|
1391
|
+
*/
|
|
1392
|
+
language?: ListPromptVersionsLanguage | null | undefined;
|
|
1393
|
+
};
|
|
1394
|
+
|
|
1395
|
+
export type ListPromptVersionsData = {
|
|
1396
|
+
id: string;
|
|
1397
|
+
createdById?: string | null | undefined;
|
|
1398
|
+
updatedById?: string | null | undefined;
|
|
1399
|
+
/**
|
|
1400
|
+
* The prompt’s description, meant to be displayable in the UI. Use this field to optionally store a long form explanation of the prompt for your own purpose
|
|
1401
|
+
*/
|
|
1402
|
+
description?: string | null | undefined;
|
|
1403
|
+
/**
|
|
1404
|
+
* [DEPRECATED] Use the `prompt` property instead. A list of messages compatible with the openAI schema.
|
|
1405
|
+
*
|
|
1406
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
1407
|
+
*/
|
|
1408
|
+
promptConfig?: ListPromptVersionsPromptConfig | undefined;
|
|
1409
|
+
/**
|
|
1410
|
+
* Prompt configuration with model and messages. Use this instead of prompt_config.
|
|
1411
|
+
*/
|
|
1412
|
+
prompt: ListPromptVersionsPromptField;
|
|
1413
|
+
metadata?: ListPromptVersionsMetadata | undefined;
|
|
1414
|
+
timestamp: string;
|
|
1415
|
+
};
|
|
1416
|
+
|
|
1417
|
+
/**
|
|
1418
|
+
* Prompt versions retrieved.
|
|
1419
|
+
*/
|
|
1420
|
+
export type ListPromptVersionsResponseBody = {
|
|
1421
|
+
object: ListPromptVersionsObject;
|
|
1422
|
+
data: Array<ListPromptVersionsData>;
|
|
1423
|
+
hasMore: boolean;
|
|
1424
|
+
};
|
|
1425
|
+
|
|
1426
|
+
/** @internal */
|
|
1427
|
+
export type ListPromptVersionsRequest$Outbound = {
|
|
1428
|
+
prompt_id: string;
|
|
1429
|
+
limit: number;
|
|
1430
|
+
starting_after?: string | undefined;
|
|
1431
|
+
ending_before?: string | undefined;
|
|
1432
|
+
};
|
|
1433
|
+
|
|
1434
|
+
/** @internal */
|
|
1435
|
+
export const ListPromptVersionsRequest$outboundSchema: z.ZodType<
|
|
1436
|
+
ListPromptVersionsRequest$Outbound,
|
|
1437
|
+
z.ZodTypeDef,
|
|
1438
|
+
ListPromptVersionsRequest
|
|
1439
|
+
> = z.object({
|
|
1440
|
+
promptId: z.string(),
|
|
1441
|
+
limit: z.number().int().default(10),
|
|
1442
|
+
startingAfter: z.string().optional(),
|
|
1443
|
+
endingBefore: z.string().optional(),
|
|
1444
|
+
}).transform((v) => {
|
|
1445
|
+
return remap$(v, {
|
|
1446
|
+
promptId: "prompt_id",
|
|
1447
|
+
startingAfter: "starting_after",
|
|
1448
|
+
endingBefore: "ending_before",
|
|
1449
|
+
});
|
|
1450
|
+
});
|
|
1451
|
+
|
|
1452
|
+
export function listPromptVersionsRequestToJSON(
|
|
1453
|
+
listPromptVersionsRequest: ListPromptVersionsRequest,
|
|
1454
|
+
): string {
|
|
1455
|
+
return JSON.stringify(
|
|
1456
|
+
ListPromptVersionsRequest$outboundSchema.parse(listPromptVersionsRequest),
|
|
1457
|
+
);
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
/** @internal */
|
|
1461
|
+
export const ListPromptVersionsObject$inboundSchema: z.ZodNativeEnum<
|
|
1462
|
+
typeof ListPromptVersionsObject
|
|
1463
|
+
> = z.nativeEnum(ListPromptVersionsObject);
|
|
1464
|
+
|
|
1465
|
+
/** @internal */
|
|
1466
|
+
export const ListPromptVersionsModelType$inboundSchema: z.ZodNativeEnum<
|
|
1467
|
+
typeof ListPromptVersionsModelType
|
|
1468
|
+
> = z.nativeEnum(ListPromptVersionsModelType);
|
|
1469
|
+
|
|
1470
|
+
/** @internal */
|
|
1471
|
+
export const ListPromptVersionsFormat$inboundSchema: z.ZodNativeEnum<
|
|
1472
|
+
typeof ListPromptVersionsFormat
|
|
1473
|
+
> = z.nativeEnum(ListPromptVersionsFormat);
|
|
1474
|
+
|
|
1475
|
+
/** @internal */
|
|
1476
|
+
export const ListPromptVersionsResponseFormat6$inboundSchema: z.ZodNativeEnum<
|
|
1477
|
+
typeof ListPromptVersionsResponseFormat6
|
|
1478
|
+
> = z.nativeEnum(ListPromptVersionsResponseFormat6);
|
|
1479
|
+
|
|
1480
|
+
/** @internal */
|
|
1481
|
+
export const ListPromptVersionsResponseFormat5$inboundSchema: z.ZodNativeEnum<
|
|
1482
|
+
typeof ListPromptVersionsResponseFormat5
|
|
1483
|
+
> = z.nativeEnum(ListPromptVersionsResponseFormat5);
|
|
1484
|
+
|
|
1485
|
+
/** @internal */
|
|
1486
|
+
export const ListPromptVersionsResponseFormat4$inboundSchema: z.ZodNativeEnum<
|
|
1487
|
+
typeof ListPromptVersionsResponseFormat4
|
|
1488
|
+
> = z.nativeEnum(ListPromptVersionsResponseFormat4);
|
|
1489
|
+
|
|
1490
|
+
/** @internal */
|
|
1491
|
+
export const ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType$inboundSchema:
|
|
1492
|
+
z.ZodNativeEnum<
|
|
1493
|
+
typeof ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType
|
|
1494
|
+
> = z.nativeEnum(
|
|
1495
|
+
ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType,
|
|
1496
|
+
);
|
|
1497
|
+
|
|
1498
|
+
/** @internal */
|
|
1499
|
+
export const ListPromptVersionsResponseFormat3$inboundSchema: z.ZodType<
|
|
1500
|
+
ListPromptVersionsResponseFormat3,
|
|
1501
|
+
z.ZodTypeDef,
|
|
1502
|
+
unknown
|
|
1503
|
+
> = z.object({
|
|
1504
|
+
type:
|
|
1505
|
+
ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONResponseBodyType$inboundSchema,
|
|
1506
|
+
});
|
|
1507
|
+
|
|
1508
|
+
export function listPromptVersionsResponseFormat3FromJSON(
|
|
1509
|
+
jsonString: string,
|
|
1510
|
+
): SafeParseResult<ListPromptVersionsResponseFormat3, SDKValidationError> {
|
|
1511
|
+
return safeParse(
|
|
1512
|
+
jsonString,
|
|
1513
|
+
(x) => ListPromptVersionsResponseFormat3$inboundSchema.parse(JSON.parse(x)),
|
|
1514
|
+
`Failed to parse 'ListPromptVersionsResponseFormat3' from JSON`,
|
|
1515
|
+
);
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
/** @internal */
|
|
1519
|
+
export const ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType$inboundSchema:
|
|
1520
|
+
z.ZodNativeEnum<
|
|
1521
|
+
typeof ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType
|
|
1522
|
+
> = z.nativeEnum(
|
|
1523
|
+
ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType,
|
|
1524
|
+
);
|
|
1525
|
+
|
|
1526
|
+
/** @internal */
|
|
1527
|
+
export const ListPromptVersionsResponseFormat2$inboundSchema: z.ZodType<
|
|
1528
|
+
ListPromptVersionsResponseFormat2,
|
|
1529
|
+
z.ZodTypeDef,
|
|
1530
|
+
unknown
|
|
1531
|
+
> = z.object({
|
|
1532
|
+
type:
|
|
1533
|
+
ListPromptVersionsResponseFormatPromptsResponse200ApplicationJSONType$inboundSchema,
|
|
1534
|
+
});
|
|
1535
|
+
|
|
1536
|
+
export function listPromptVersionsResponseFormat2FromJSON(
|
|
1537
|
+
jsonString: string,
|
|
1538
|
+
): SafeParseResult<ListPromptVersionsResponseFormat2, SDKValidationError> {
|
|
1539
|
+
return safeParse(
|
|
1540
|
+
jsonString,
|
|
1541
|
+
(x) => ListPromptVersionsResponseFormat2$inboundSchema.parse(JSON.parse(x)),
|
|
1542
|
+
`Failed to parse 'ListPromptVersionsResponseFormat2' from JSON`,
|
|
1543
|
+
);
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
/** @internal */
|
|
1547
|
+
export const ListPromptVersionsResponseFormatPromptsResponse200Type$inboundSchema:
|
|
1548
|
+
z.ZodNativeEnum<
|
|
1549
|
+
typeof ListPromptVersionsResponseFormatPromptsResponse200Type
|
|
1550
|
+
> = z.nativeEnum(ListPromptVersionsResponseFormatPromptsResponse200Type);
|
|
1551
|
+
|
|
1552
|
+
/** @internal */
|
|
1553
|
+
export const ListPromptVersionsResponseFormatPromptsResponseJsonSchema$inboundSchema:
|
|
1554
|
+
z.ZodType<
|
|
1555
|
+
ListPromptVersionsResponseFormatPromptsResponseJsonSchema,
|
|
1556
|
+
z.ZodTypeDef,
|
|
1557
|
+
unknown
|
|
1558
|
+
> = z.object({
|
|
1559
|
+
name: z.string(),
|
|
1560
|
+
description: z.string().optional(),
|
|
1561
|
+
strict: z.boolean().optional(),
|
|
1562
|
+
schema: z.record(z.any()),
|
|
1563
|
+
});
|
|
1564
|
+
|
|
1565
|
+
export function listPromptVersionsResponseFormatPromptsResponseJsonSchemaFromJSON(
|
|
1566
|
+
jsonString: string,
|
|
1567
|
+
): SafeParseResult<
|
|
1568
|
+
ListPromptVersionsResponseFormatPromptsResponseJsonSchema,
|
|
1569
|
+
SDKValidationError
|
|
1570
|
+
> {
|
|
1571
|
+
return safeParse(
|
|
1572
|
+
jsonString,
|
|
1573
|
+
(x) =>
|
|
1574
|
+
ListPromptVersionsResponseFormatPromptsResponseJsonSchema$inboundSchema
|
|
1575
|
+
.parse(JSON.parse(x)),
|
|
1576
|
+
`Failed to parse 'ListPromptVersionsResponseFormatPromptsResponseJsonSchema' from JSON`,
|
|
1577
|
+
);
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
/** @internal */
|
|
1581
|
+
export const ListPromptVersionsResponseFormat1$inboundSchema: z.ZodType<
|
|
1582
|
+
ListPromptVersionsResponseFormat1,
|
|
1583
|
+
z.ZodTypeDef,
|
|
1584
|
+
unknown
|
|
1585
|
+
> = z.object({
|
|
1586
|
+
type: ListPromptVersionsResponseFormatPromptsResponse200Type$inboundSchema,
|
|
1587
|
+
display_name: z.string().optional(),
|
|
1588
|
+
json_schema: z.lazy(() =>
|
|
1589
|
+
ListPromptVersionsResponseFormatPromptsResponseJsonSchema$inboundSchema
|
|
1590
|
+
),
|
|
1591
|
+
}).transform((v) => {
|
|
1592
|
+
return remap$(v, {
|
|
1593
|
+
"display_name": "displayName",
|
|
1594
|
+
"json_schema": "jsonSchema",
|
|
1595
|
+
});
|
|
1596
|
+
});
|
|
1597
|
+
|
|
1598
|
+
export function listPromptVersionsResponseFormat1FromJSON(
|
|
1599
|
+
jsonString: string,
|
|
1600
|
+
): SafeParseResult<ListPromptVersionsResponseFormat1, SDKValidationError> {
|
|
1601
|
+
return safeParse(
|
|
1602
|
+
jsonString,
|
|
1603
|
+
(x) => ListPromptVersionsResponseFormat1$inboundSchema.parse(JSON.parse(x)),
|
|
1604
|
+
`Failed to parse 'ListPromptVersionsResponseFormat1' from JSON`,
|
|
1605
|
+
);
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
/** @internal */
|
|
1609
|
+
export const ListPromptVersionsPromptsResponseFormat$inboundSchema: z.ZodType<
|
|
1610
|
+
ListPromptVersionsPromptsResponseFormat,
|
|
1611
|
+
z.ZodTypeDef,
|
|
1612
|
+
unknown
|
|
1613
|
+
> = z.union([
|
|
1614
|
+
z.lazy(() => ListPromptVersionsResponseFormat1$inboundSchema),
|
|
1615
|
+
z.lazy(() => ListPromptVersionsResponseFormat2$inboundSchema),
|
|
1616
|
+
z.lazy(() => ListPromptVersionsResponseFormat3$inboundSchema),
|
|
1617
|
+
ListPromptVersionsResponseFormat4$inboundSchema,
|
|
1618
|
+
ListPromptVersionsResponseFormat5$inboundSchema,
|
|
1619
|
+
ListPromptVersionsResponseFormat6$inboundSchema,
|
|
1620
|
+
]);
|
|
1621
|
+
|
|
1622
|
+
export function listPromptVersionsPromptsResponseFormatFromJSON(
|
|
1623
|
+
jsonString: string,
|
|
1624
|
+
): SafeParseResult<
|
|
1625
|
+
ListPromptVersionsPromptsResponseFormat,
|
|
1626
|
+
SDKValidationError
|
|
1627
|
+
> {
|
|
1628
|
+
return safeParse(
|
|
1629
|
+
jsonString,
|
|
1630
|
+
(x) =>
|
|
1631
|
+
ListPromptVersionsPromptsResponseFormat$inboundSchema.parse(
|
|
1632
|
+
JSON.parse(x),
|
|
1633
|
+
),
|
|
1634
|
+
`Failed to parse 'ListPromptVersionsPromptsResponseFormat' from JSON`,
|
|
1635
|
+
);
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
/** @internal */
|
|
1639
|
+
export const ListPromptVersionsPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
|
|
1640
|
+
typeof ListPromptVersionsPhotoRealVersion
|
|
1641
|
+
> = z.nativeEnum(ListPromptVersionsPhotoRealVersion);
|
|
1642
|
+
|
|
1643
|
+
/** @internal */
|
|
1644
|
+
export const ListPromptVersionsEncodingFormat$inboundSchema: z.ZodNativeEnum<
|
|
1645
|
+
typeof ListPromptVersionsEncodingFormat
|
|
1646
|
+
> = z.nativeEnum(ListPromptVersionsEncodingFormat);
|
|
1647
|
+
|
|
1648
|
+
/** @internal */
|
|
1649
|
+
export const ListPromptVersionsPromptsReasoningEffort$inboundSchema:
|
|
1650
|
+
z.ZodNativeEnum<typeof ListPromptVersionsPromptsReasoningEffort> = z
|
|
1651
|
+
.nativeEnum(ListPromptVersionsPromptsReasoningEffort);
|
|
1652
|
+
|
|
1653
|
+
/** @internal */
|
|
1654
|
+
export const ListPromptVersionsVerbosity$inboundSchema: z.ZodNativeEnum<
|
|
1655
|
+
typeof ListPromptVersionsVerbosity
|
|
1656
|
+
> = z.nativeEnum(ListPromptVersionsVerbosity);
|
|
1657
|
+
|
|
1658
|
+
/** @internal */
|
|
1659
|
+
export const ListPromptVersionsThinkingLevel$inboundSchema: z.ZodNativeEnum<
|
|
1660
|
+
typeof ListPromptVersionsThinkingLevel
|
|
1661
|
+
> = z.nativeEnum(ListPromptVersionsThinkingLevel);
|
|
1662
|
+
|
|
1663
|
+
/** @internal */
|
|
1664
|
+
export const ListPromptVersionsModelParameters$inboundSchema: z.ZodType<
|
|
1665
|
+
ListPromptVersionsModelParameters,
|
|
1666
|
+
z.ZodTypeDef,
|
|
1667
|
+
unknown
|
|
1668
|
+
> = z.object({
|
|
1669
|
+
temperature: z.number().optional(),
|
|
1670
|
+
maxTokens: z.number().optional(),
|
|
1671
|
+
topK: z.number().optional(),
|
|
1672
|
+
topP: z.number().optional(),
|
|
1673
|
+
frequencyPenalty: z.number().optional(),
|
|
1674
|
+
presencePenalty: z.number().optional(),
|
|
1675
|
+
numImages: z.number().optional(),
|
|
1676
|
+
seed: z.number().optional(),
|
|
1677
|
+
format: ListPromptVersionsFormat$inboundSchema.optional(),
|
|
1678
|
+
dimensions: z.string().optional(),
|
|
1679
|
+
quality: z.string().optional(),
|
|
1680
|
+
style: z.string().optional(),
|
|
1681
|
+
responseFormat: z.nullable(
|
|
1682
|
+
z.union([
|
|
1683
|
+
z.lazy(() => ListPromptVersionsResponseFormat1$inboundSchema),
|
|
1684
|
+
z.lazy(() => ListPromptVersionsResponseFormat2$inboundSchema),
|
|
1685
|
+
z.lazy(() => ListPromptVersionsResponseFormat3$inboundSchema),
|
|
1686
|
+
ListPromptVersionsResponseFormat4$inboundSchema,
|
|
1687
|
+
ListPromptVersionsResponseFormat5$inboundSchema,
|
|
1688
|
+
ListPromptVersionsResponseFormat6$inboundSchema,
|
|
1689
|
+
]),
|
|
1690
|
+
).optional(),
|
|
1691
|
+
photoRealVersion: ListPromptVersionsPhotoRealVersion$inboundSchema.optional(),
|
|
1692
|
+
encoding_format: ListPromptVersionsEncodingFormat$inboundSchema.optional(),
|
|
1693
|
+
reasoningEffort: ListPromptVersionsPromptsReasoningEffort$inboundSchema
|
|
1694
|
+
.optional(),
|
|
1695
|
+
budgetTokens: z.number().optional(),
|
|
1696
|
+
verbosity: ListPromptVersionsVerbosity$inboundSchema.optional(),
|
|
1697
|
+
thinkingLevel: ListPromptVersionsThinkingLevel$inboundSchema.optional(),
|
|
1698
|
+
}).transform((v) => {
|
|
1699
|
+
return remap$(v, {
|
|
1700
|
+
"encoding_format": "encodingFormat",
|
|
1701
|
+
});
|
|
1702
|
+
});
|
|
1703
|
+
|
|
1704
|
+
export function listPromptVersionsModelParametersFromJSON(
|
|
1705
|
+
jsonString: string,
|
|
1706
|
+
): SafeParseResult<ListPromptVersionsModelParameters, SDKValidationError> {
|
|
1707
|
+
return safeParse(
|
|
1708
|
+
jsonString,
|
|
1709
|
+
(x) => ListPromptVersionsModelParameters$inboundSchema.parse(JSON.parse(x)),
|
|
1710
|
+
`Failed to parse 'ListPromptVersionsModelParameters' from JSON`,
|
|
1711
|
+
);
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
/** @internal */
|
|
1715
|
+
export const ListPromptVersionsProvider$inboundSchema: z.ZodNativeEnum<
|
|
1716
|
+
typeof ListPromptVersionsProvider
|
|
1717
|
+
> = z.nativeEnum(ListPromptVersionsProvider);
|
|
1718
|
+
|
|
1719
|
+
/** @internal */
|
|
1720
|
+
export const ListPromptVersionsRole$inboundSchema: z.ZodNativeEnum<
|
|
1721
|
+
typeof ListPromptVersionsRole
|
|
1722
|
+
> = z.nativeEnum(ListPromptVersionsRole);
|
|
1723
|
+
|
|
1724
|
+
/** @internal */
|
|
1725
|
+
export const ListPromptVersions2File$inboundSchema: z.ZodType<
|
|
1726
|
+
ListPromptVersions2File,
|
|
1727
|
+
z.ZodTypeDef,
|
|
1728
|
+
unknown
|
|
1729
|
+
> = z.object({
|
|
1730
|
+
file_data: z.string().optional(),
|
|
1731
|
+
uri: z.string().optional(),
|
|
1732
|
+
mimeType: z.string().optional(),
|
|
1733
|
+
filename: z.string().optional(),
|
|
1734
|
+
}).transform((v) => {
|
|
1735
|
+
return remap$(v, {
|
|
1736
|
+
"file_data": "fileData",
|
|
1737
|
+
});
|
|
1738
|
+
});
|
|
1739
|
+
|
|
1740
|
+
export function listPromptVersions2FileFromJSON(
|
|
1741
|
+
jsonString: string,
|
|
1742
|
+
): SafeParseResult<ListPromptVersions2File, SDKValidationError> {
|
|
1743
|
+
return safeParse(
|
|
1744
|
+
jsonString,
|
|
1745
|
+
(x) => ListPromptVersions2File$inboundSchema.parse(JSON.parse(x)),
|
|
1746
|
+
`Failed to parse 'ListPromptVersions2File' from JSON`,
|
|
1747
|
+
);
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
/** @internal */
|
|
1751
|
+
export const ListPromptVersions23$inboundSchema: z.ZodType<
|
|
1752
|
+
ListPromptVersions23,
|
|
1753
|
+
z.ZodTypeDef,
|
|
1754
|
+
unknown
|
|
1755
|
+
> = z.object({
|
|
1756
|
+
type: z.literal("file"),
|
|
1757
|
+
file: z.lazy(() => ListPromptVersions2File$inboundSchema),
|
|
1758
|
+
});
|
|
1759
|
+
|
|
1760
|
+
export function listPromptVersions23FromJSON(
|
|
1761
|
+
jsonString: string,
|
|
1762
|
+
): SafeParseResult<ListPromptVersions23, SDKValidationError> {
|
|
1763
|
+
return safeParse(
|
|
1764
|
+
jsonString,
|
|
1765
|
+
(x) => ListPromptVersions23$inboundSchema.parse(JSON.parse(x)),
|
|
1766
|
+
`Failed to parse 'ListPromptVersions23' from JSON`,
|
|
1767
|
+
);
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
/** @internal */
|
|
1771
|
+
export const ListPromptVersions2ImageUrl$inboundSchema: z.ZodType<
|
|
1772
|
+
ListPromptVersions2ImageUrl,
|
|
1773
|
+
z.ZodTypeDef,
|
|
1774
|
+
unknown
|
|
1775
|
+
> = z.object({
|
|
1776
|
+
id: z.string().optional(),
|
|
1777
|
+
url: z.string(),
|
|
1778
|
+
detail: z.string().optional(),
|
|
1779
|
+
});
|
|
1780
|
+
|
|
1781
|
+
export function listPromptVersions2ImageUrlFromJSON(
|
|
1782
|
+
jsonString: string,
|
|
1783
|
+
): SafeParseResult<ListPromptVersions2ImageUrl, SDKValidationError> {
|
|
1784
|
+
return safeParse(
|
|
1785
|
+
jsonString,
|
|
1786
|
+
(x) => ListPromptVersions2ImageUrl$inboundSchema.parse(JSON.parse(x)),
|
|
1787
|
+
`Failed to parse 'ListPromptVersions2ImageUrl' from JSON`,
|
|
1788
|
+
);
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
/** @internal */
|
|
1792
|
+
export const ListPromptVersions22$inboundSchema: z.ZodType<
|
|
1793
|
+
ListPromptVersions22,
|
|
1794
|
+
z.ZodTypeDef,
|
|
1795
|
+
unknown
|
|
1796
|
+
> = z.object({
|
|
1797
|
+
type: z.literal("image_url"),
|
|
1798
|
+
image_url: z.lazy(() => ListPromptVersions2ImageUrl$inboundSchema),
|
|
1799
|
+
}).transform((v) => {
|
|
1800
|
+
return remap$(v, {
|
|
1801
|
+
"image_url": "imageUrl",
|
|
1802
|
+
});
|
|
1803
|
+
});
|
|
1804
|
+
|
|
1805
|
+
export function listPromptVersions22FromJSON(
|
|
1806
|
+
jsonString: string,
|
|
1807
|
+
): SafeParseResult<ListPromptVersions22, SDKValidationError> {
|
|
1808
|
+
return safeParse(
|
|
1809
|
+
jsonString,
|
|
1810
|
+
(x) => ListPromptVersions22$inboundSchema.parse(JSON.parse(x)),
|
|
1811
|
+
`Failed to parse 'ListPromptVersions22' from JSON`,
|
|
1812
|
+
);
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
/** @internal */
|
|
1816
|
+
export const ListPromptVersions21$inboundSchema: z.ZodType<
|
|
1817
|
+
ListPromptVersions21,
|
|
1818
|
+
z.ZodTypeDef,
|
|
1819
|
+
unknown
|
|
1820
|
+
> = z.object({
|
|
1821
|
+
type: z.literal("text"),
|
|
1822
|
+
text: z.string(),
|
|
1823
|
+
});
|
|
1824
|
+
|
|
1825
|
+
export function listPromptVersions21FromJSON(
|
|
1826
|
+
jsonString: string,
|
|
1827
|
+
): SafeParseResult<ListPromptVersions21, SDKValidationError> {
|
|
1828
|
+
return safeParse(
|
|
1829
|
+
jsonString,
|
|
1830
|
+
(x) => ListPromptVersions21$inboundSchema.parse(JSON.parse(x)),
|
|
1831
|
+
`Failed to parse 'ListPromptVersions21' from JSON`,
|
|
1832
|
+
);
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
/** @internal */
|
|
1836
|
+
export const ListPromptVersionsContent2$inboundSchema: z.ZodType<
|
|
1837
|
+
ListPromptVersionsContent2,
|
|
1838
|
+
z.ZodTypeDef,
|
|
1839
|
+
unknown
|
|
1840
|
+
> = z.union([
|
|
1841
|
+
z.lazy(() => ListPromptVersions21$inboundSchema),
|
|
1842
|
+
z.lazy(() => ListPromptVersions22$inboundSchema),
|
|
1843
|
+
z.lazy(() => ListPromptVersions23$inboundSchema),
|
|
1844
|
+
]);
|
|
1845
|
+
|
|
1846
|
+
export function listPromptVersionsContent2FromJSON(
|
|
1847
|
+
jsonString: string,
|
|
1848
|
+
): SafeParseResult<ListPromptVersionsContent2, SDKValidationError> {
|
|
1849
|
+
return safeParse(
|
|
1850
|
+
jsonString,
|
|
1851
|
+
(x) => ListPromptVersionsContent2$inboundSchema.parse(JSON.parse(x)),
|
|
1852
|
+
`Failed to parse 'ListPromptVersionsContent2' from JSON`,
|
|
1853
|
+
);
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
/** @internal */
|
|
1857
|
+
export const ListPromptVersionsContent$inboundSchema: z.ZodType<
|
|
1858
|
+
ListPromptVersionsContent,
|
|
1859
|
+
z.ZodTypeDef,
|
|
1860
|
+
unknown
|
|
1861
|
+
> = z.union([
|
|
1862
|
+
z.string(),
|
|
1863
|
+
z.array(z.union([
|
|
1864
|
+
z.lazy(() => ListPromptVersions21$inboundSchema),
|
|
1865
|
+
z.lazy(() => ListPromptVersions22$inboundSchema),
|
|
1866
|
+
z.lazy(() => ListPromptVersions23$inboundSchema),
|
|
1867
|
+
])),
|
|
1868
|
+
]);
|
|
1869
|
+
|
|
1870
|
+
export function listPromptVersionsContentFromJSON(
|
|
1871
|
+
jsonString: string,
|
|
1872
|
+
): SafeParseResult<ListPromptVersionsContent, SDKValidationError> {
|
|
1873
|
+
return safeParse(
|
|
1874
|
+
jsonString,
|
|
1875
|
+
(x) => ListPromptVersionsContent$inboundSchema.parse(JSON.parse(x)),
|
|
1876
|
+
`Failed to parse 'ListPromptVersionsContent' from JSON`,
|
|
1877
|
+
);
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
/** @internal */
|
|
1881
|
+
export const ListPromptVersionsPromptsType$inboundSchema: z.ZodNativeEnum<
|
|
1882
|
+
typeof ListPromptVersionsPromptsType
|
|
1883
|
+
> = z.nativeEnum(ListPromptVersionsPromptsType);
|
|
1884
|
+
|
|
1885
|
+
/** @internal */
|
|
1886
|
+
export const ListPromptVersionsFunction$inboundSchema: z.ZodType<
|
|
1887
|
+
ListPromptVersionsFunction,
|
|
1888
|
+
z.ZodTypeDef,
|
|
1889
|
+
unknown
|
|
1890
|
+
> = z.object({
|
|
1891
|
+
name: z.string(),
|
|
1892
|
+
arguments: z.string(),
|
|
1893
|
+
});
|
|
1894
|
+
|
|
1895
|
+
export function listPromptVersionsFunctionFromJSON(
|
|
1896
|
+
jsonString: string,
|
|
1897
|
+
): SafeParseResult<ListPromptVersionsFunction, SDKValidationError> {
|
|
1898
|
+
return safeParse(
|
|
1899
|
+
jsonString,
|
|
1900
|
+
(x) => ListPromptVersionsFunction$inboundSchema.parse(JSON.parse(x)),
|
|
1901
|
+
`Failed to parse 'ListPromptVersionsFunction' from JSON`,
|
|
1902
|
+
);
|
|
1903
|
+
}
|
|
1904
|
+
|
|
1905
|
+
/** @internal */
|
|
1906
|
+
export const ListPromptVersionsToolCalls$inboundSchema: z.ZodType<
|
|
1907
|
+
ListPromptVersionsToolCalls,
|
|
1908
|
+
z.ZodTypeDef,
|
|
1909
|
+
unknown
|
|
1910
|
+
> = z.object({
|
|
1911
|
+
id: z.string().optional(),
|
|
1912
|
+
index: z.number().optional(),
|
|
1913
|
+
type: ListPromptVersionsPromptsType$inboundSchema,
|
|
1914
|
+
function: z.lazy(() => ListPromptVersionsFunction$inboundSchema),
|
|
1915
|
+
});
|
|
1916
|
+
|
|
1917
|
+
export function listPromptVersionsToolCallsFromJSON(
|
|
1918
|
+
jsonString: string,
|
|
1919
|
+
): SafeParseResult<ListPromptVersionsToolCalls, SDKValidationError> {
|
|
1920
|
+
return safeParse(
|
|
1921
|
+
jsonString,
|
|
1922
|
+
(x) => ListPromptVersionsToolCalls$inboundSchema.parse(JSON.parse(x)),
|
|
1923
|
+
`Failed to parse 'ListPromptVersionsToolCalls' from JSON`,
|
|
1924
|
+
);
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
/** @internal */
|
|
1928
|
+
export const ListPromptVersionsMessages$inboundSchema: z.ZodType<
|
|
1929
|
+
ListPromptVersionsMessages,
|
|
1930
|
+
z.ZodTypeDef,
|
|
1931
|
+
unknown
|
|
1932
|
+
> = z.object({
|
|
1933
|
+
role: ListPromptVersionsRole$inboundSchema,
|
|
1934
|
+
content: z.nullable(
|
|
1935
|
+
z.union([
|
|
1936
|
+
z.string(),
|
|
1937
|
+
z.array(
|
|
1938
|
+
z.union([
|
|
1939
|
+
z.lazy(() => ListPromptVersions21$inboundSchema),
|
|
1940
|
+
z.lazy(() => ListPromptVersions22$inboundSchema),
|
|
1941
|
+
z.lazy(() => ListPromptVersions23$inboundSchema),
|
|
1942
|
+
]),
|
|
1943
|
+
),
|
|
1944
|
+
]),
|
|
1945
|
+
),
|
|
1946
|
+
tool_calls: z.array(z.lazy(() => ListPromptVersionsToolCalls$inboundSchema))
|
|
1947
|
+
.optional(),
|
|
1948
|
+
tool_call_id: z.nullable(z.string()).optional(),
|
|
1949
|
+
}).transform((v) => {
|
|
1950
|
+
return remap$(v, {
|
|
1951
|
+
"tool_calls": "toolCalls",
|
|
1952
|
+
"tool_call_id": "toolCallId",
|
|
1953
|
+
});
|
|
1954
|
+
});
|
|
1955
|
+
|
|
1956
|
+
export function listPromptVersionsMessagesFromJSON(
|
|
1957
|
+
jsonString: string,
|
|
1958
|
+
): SafeParseResult<ListPromptVersionsMessages, SDKValidationError> {
|
|
1959
|
+
return safeParse(
|
|
1960
|
+
jsonString,
|
|
1961
|
+
(x) => ListPromptVersionsMessages$inboundSchema.parse(JSON.parse(x)),
|
|
1962
|
+
`Failed to parse 'ListPromptVersionsMessages' from JSON`,
|
|
1963
|
+
);
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
/** @internal */
|
|
1967
|
+
export const ListPromptVersionsPromptConfig$inboundSchema: z.ZodType<
|
|
1968
|
+
ListPromptVersionsPromptConfig,
|
|
1969
|
+
z.ZodTypeDef,
|
|
1970
|
+
unknown
|
|
1971
|
+
> = z.object({
|
|
1972
|
+
stream: z.boolean().optional(),
|
|
1973
|
+
model: z.nullable(z.string()).optional(),
|
|
1974
|
+
model_db_id: z.nullable(z.string()).optional(),
|
|
1975
|
+
model_type: z.nullable(ListPromptVersionsModelType$inboundSchema).optional(),
|
|
1976
|
+
model_parameters: z.lazy(() =>
|
|
1977
|
+
ListPromptVersionsModelParameters$inboundSchema
|
|
1978
|
+
).optional(),
|
|
1979
|
+
provider: z.nullable(ListPromptVersionsProvider$inboundSchema).optional(),
|
|
1980
|
+
integration_id: z.nullable(z.string()).optional(),
|
|
1981
|
+
version: z.string().optional(),
|
|
1982
|
+
messages: z.array(z.lazy(() => ListPromptVersionsMessages$inboundSchema)),
|
|
1983
|
+
}).transform((v) => {
|
|
1984
|
+
return remap$(v, {
|
|
1985
|
+
"model_db_id": "modelDbId",
|
|
1986
|
+
"model_type": "modelType",
|
|
1987
|
+
"model_parameters": "modelParameters",
|
|
1988
|
+
"integration_id": "integrationId",
|
|
1989
|
+
});
|
|
1990
|
+
});
|
|
1991
|
+
|
|
1992
|
+
export function listPromptVersionsPromptConfigFromJSON(
|
|
1993
|
+
jsonString: string,
|
|
1994
|
+
): SafeParseResult<ListPromptVersionsPromptConfig, SDKValidationError> {
|
|
1995
|
+
return safeParse(
|
|
1996
|
+
jsonString,
|
|
1997
|
+
(x) => ListPromptVersionsPromptConfig$inboundSchema.parse(JSON.parse(x)),
|
|
1998
|
+
`Failed to parse 'ListPromptVersionsPromptConfig' from JSON`,
|
|
1999
|
+
);
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
/** @internal */
|
|
2003
|
+
export const ListPromptVersionsVoice$inboundSchema: z.ZodNativeEnum<
|
|
2004
|
+
typeof ListPromptVersionsVoice
|
|
2005
|
+
> = z.nativeEnum(ListPromptVersionsVoice);
|
|
2006
|
+
|
|
2007
|
+
/** @internal */
|
|
2008
|
+
export const ListPromptVersionsPromptsFormat$inboundSchema: z.ZodNativeEnum<
|
|
2009
|
+
typeof ListPromptVersionsPromptsFormat
|
|
2010
|
+
> = z.nativeEnum(ListPromptVersionsPromptsFormat);
|
|
2011
|
+
|
|
2012
|
+
/** @internal */
|
|
2013
|
+
export const ListPromptVersionsAudio$inboundSchema: z.ZodType<
|
|
2014
|
+
ListPromptVersionsAudio,
|
|
2015
|
+
z.ZodTypeDef,
|
|
2016
|
+
unknown
|
|
2017
|
+
> = z.object({
|
|
2018
|
+
voice: ListPromptVersionsVoice$inboundSchema,
|
|
2019
|
+
format: ListPromptVersionsPromptsFormat$inboundSchema,
|
|
2020
|
+
});
|
|
2021
|
+
|
|
2022
|
+
export function listPromptVersionsAudioFromJSON(
|
|
2023
|
+
jsonString: string,
|
|
2024
|
+
): SafeParseResult<ListPromptVersionsAudio, SDKValidationError> {
|
|
2025
|
+
return safeParse(
|
|
2026
|
+
jsonString,
|
|
2027
|
+
(x) => ListPromptVersionsAudio$inboundSchema.parse(JSON.parse(x)),
|
|
2028
|
+
`Failed to parse 'ListPromptVersionsAudio' from JSON`,
|
|
2029
|
+
);
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
/** @internal */
|
|
2033
|
+
export const ListPromptVersionsResponseFormatJsonSchema$inboundSchema:
|
|
2034
|
+
z.ZodType<ListPromptVersionsResponseFormatJsonSchema, z.ZodTypeDef, unknown> =
|
|
2035
|
+
z.object({
|
|
2036
|
+
description: z.string().optional(),
|
|
2037
|
+
name: z.string(),
|
|
2038
|
+
schema: z.any().optional(),
|
|
2039
|
+
strict: z.boolean().default(false),
|
|
2040
|
+
});
|
|
2041
|
+
|
|
2042
|
+
export function listPromptVersionsResponseFormatJsonSchemaFromJSON(
|
|
2043
|
+
jsonString: string,
|
|
2044
|
+
): SafeParseResult<
|
|
2045
|
+
ListPromptVersionsResponseFormatJsonSchema,
|
|
2046
|
+
SDKValidationError
|
|
2047
|
+
> {
|
|
2048
|
+
return safeParse(
|
|
2049
|
+
jsonString,
|
|
2050
|
+
(x) =>
|
|
2051
|
+
ListPromptVersionsResponseFormatJsonSchema$inboundSchema.parse(
|
|
2052
|
+
JSON.parse(x),
|
|
2053
|
+
),
|
|
2054
|
+
`Failed to parse 'ListPromptVersionsResponseFormatJsonSchema' from JSON`,
|
|
2055
|
+
);
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
/** @internal */
|
|
2059
|
+
export const ListPromptVersionsResponseFormatPromptsJSONSchema$inboundSchema:
|
|
2060
|
+
z.ZodType<
|
|
2061
|
+
ListPromptVersionsResponseFormatPromptsJSONSchema,
|
|
2062
|
+
z.ZodTypeDef,
|
|
2063
|
+
unknown
|
|
2064
|
+
> = z.object({
|
|
2065
|
+
type: z.literal("json_schema"),
|
|
2066
|
+
json_schema: z.lazy(() =>
|
|
2067
|
+
ListPromptVersionsResponseFormatJsonSchema$inboundSchema
|
|
2068
|
+
),
|
|
2069
|
+
}).transform((v) => {
|
|
2070
|
+
return remap$(v, {
|
|
2071
|
+
"json_schema": "jsonSchema",
|
|
2072
|
+
});
|
|
2073
|
+
});
|
|
2074
|
+
|
|
2075
|
+
export function listPromptVersionsResponseFormatPromptsJSONSchemaFromJSON(
|
|
2076
|
+
jsonString: string,
|
|
2077
|
+
): SafeParseResult<
|
|
2078
|
+
ListPromptVersionsResponseFormatPromptsJSONSchema,
|
|
2079
|
+
SDKValidationError
|
|
2080
|
+
> {
|
|
2081
|
+
return safeParse(
|
|
2082
|
+
jsonString,
|
|
2083
|
+
(x) =>
|
|
2084
|
+
ListPromptVersionsResponseFormatPromptsJSONSchema$inboundSchema.parse(
|
|
2085
|
+
JSON.parse(x),
|
|
2086
|
+
),
|
|
2087
|
+
`Failed to parse 'ListPromptVersionsResponseFormatPromptsJSONSchema' from JSON`,
|
|
2088
|
+
);
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
/** @internal */
|
|
2092
|
+
export const ListPromptVersionsResponseFormatJSONObject$inboundSchema:
|
|
2093
|
+
z.ZodType<ListPromptVersionsResponseFormatJSONObject, z.ZodTypeDef, unknown> =
|
|
2094
|
+
z.object({
|
|
2095
|
+
type: z.literal("json_object"),
|
|
2096
|
+
});
|
|
2097
|
+
|
|
2098
|
+
export function listPromptVersionsResponseFormatJSONObjectFromJSON(
|
|
2099
|
+
jsonString: string,
|
|
2100
|
+
): SafeParseResult<
|
|
2101
|
+
ListPromptVersionsResponseFormatJSONObject,
|
|
2102
|
+
SDKValidationError
|
|
2103
|
+
> {
|
|
2104
|
+
return safeParse(
|
|
2105
|
+
jsonString,
|
|
2106
|
+
(x) =>
|
|
2107
|
+
ListPromptVersionsResponseFormatJSONObject$inboundSchema.parse(
|
|
2108
|
+
JSON.parse(x),
|
|
2109
|
+
),
|
|
2110
|
+
`Failed to parse 'ListPromptVersionsResponseFormatJSONObject' from JSON`,
|
|
2111
|
+
);
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
/** @internal */
|
|
2115
|
+
export const ListPromptVersionsResponseFormatText$inboundSchema: z.ZodType<
|
|
2116
|
+
ListPromptVersionsResponseFormatText,
|
|
2117
|
+
z.ZodTypeDef,
|
|
2118
|
+
unknown
|
|
2119
|
+
> = z.object({
|
|
2120
|
+
type: z.literal("text"),
|
|
2121
|
+
});
|
|
2122
|
+
|
|
2123
|
+
export function listPromptVersionsResponseFormatTextFromJSON(
|
|
2124
|
+
jsonString: string,
|
|
2125
|
+
): SafeParseResult<ListPromptVersionsResponseFormatText, SDKValidationError> {
|
|
2126
|
+
return safeParse(
|
|
2127
|
+
jsonString,
|
|
2128
|
+
(x) =>
|
|
2129
|
+
ListPromptVersionsResponseFormatText$inboundSchema.parse(JSON.parse(x)),
|
|
2130
|
+
`Failed to parse 'ListPromptVersionsResponseFormatText' from JSON`,
|
|
2131
|
+
);
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
/** @internal */
|
|
2135
|
+
export const ListPromptVersionsResponseFormat$inboundSchema: z.ZodType<
|
|
2136
|
+
ListPromptVersionsResponseFormat,
|
|
2137
|
+
z.ZodTypeDef,
|
|
2138
|
+
unknown
|
|
2139
|
+
> = z.union([
|
|
2140
|
+
z.lazy(() => ListPromptVersionsResponseFormatText$inboundSchema),
|
|
2141
|
+
z.lazy(() => ListPromptVersionsResponseFormatJSONObject$inboundSchema),
|
|
2142
|
+
z.lazy(() => ListPromptVersionsResponseFormatPromptsJSONSchema$inboundSchema),
|
|
2143
|
+
]);
|
|
2144
|
+
|
|
2145
|
+
export function listPromptVersionsResponseFormatFromJSON(
|
|
2146
|
+
jsonString: string,
|
|
2147
|
+
): SafeParseResult<ListPromptVersionsResponseFormat, SDKValidationError> {
|
|
2148
|
+
return safeParse(
|
|
2149
|
+
jsonString,
|
|
2150
|
+
(x) => ListPromptVersionsResponseFormat$inboundSchema.parse(JSON.parse(x)),
|
|
2151
|
+
`Failed to parse 'ListPromptVersionsResponseFormat' from JSON`,
|
|
2152
|
+
);
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
/** @internal */
|
|
2156
|
+
export const ListPromptVersionsReasoningEffort$inboundSchema: z.ZodNativeEnum<
|
|
2157
|
+
typeof ListPromptVersionsReasoningEffort
|
|
2158
|
+
> = z.nativeEnum(ListPromptVersionsReasoningEffort);
|
|
2159
|
+
|
|
2160
|
+
/** @internal */
|
|
2161
|
+
export const ListPromptVersionsStop$inboundSchema: z.ZodType<
|
|
2162
|
+
ListPromptVersionsStop,
|
|
2163
|
+
z.ZodTypeDef,
|
|
2164
|
+
unknown
|
|
2165
|
+
> = z.union([z.string(), z.array(z.string())]);
|
|
2166
|
+
|
|
2167
|
+
export function listPromptVersionsStopFromJSON(
|
|
2168
|
+
jsonString: string,
|
|
2169
|
+
): SafeParseResult<ListPromptVersionsStop, SDKValidationError> {
|
|
2170
|
+
return safeParse(
|
|
2171
|
+
jsonString,
|
|
2172
|
+
(x) => ListPromptVersionsStop$inboundSchema.parse(JSON.parse(x)),
|
|
2173
|
+
`Failed to parse 'ListPromptVersionsStop' from JSON`,
|
|
2174
|
+
);
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
/** @internal */
|
|
2178
|
+
export const ListPromptVersionsStreamOptions$inboundSchema: z.ZodType<
|
|
2179
|
+
ListPromptVersionsStreamOptions,
|
|
2180
|
+
z.ZodTypeDef,
|
|
2181
|
+
unknown
|
|
2182
|
+
> = z.object({
|
|
2183
|
+
include_usage: z.boolean().optional(),
|
|
2184
|
+
}).transform((v) => {
|
|
2185
|
+
return remap$(v, {
|
|
2186
|
+
"include_usage": "includeUsage",
|
|
2187
|
+
});
|
|
2188
|
+
});
|
|
2189
|
+
|
|
2190
|
+
export function listPromptVersionsStreamOptionsFromJSON(
|
|
2191
|
+
jsonString: string,
|
|
2192
|
+
): SafeParseResult<ListPromptVersionsStreamOptions, SDKValidationError> {
|
|
2193
|
+
return safeParse(
|
|
2194
|
+
jsonString,
|
|
2195
|
+
(x) => ListPromptVersionsStreamOptions$inboundSchema.parse(JSON.parse(x)),
|
|
2196
|
+
`Failed to parse 'ListPromptVersionsStreamOptions' from JSON`,
|
|
2197
|
+
);
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
/** @internal */
|
|
2201
|
+
export const ListPromptVersionsThinking$inboundSchema: z.ZodType<
|
|
2202
|
+
ListPromptVersionsThinking,
|
|
2203
|
+
z.ZodTypeDef,
|
|
2204
|
+
unknown
|
|
2205
|
+
> = z.union([
|
|
2206
|
+
components.ThinkingConfigDisabledSchema$inboundSchema,
|
|
2207
|
+
components.ThinkingConfigEnabledSchema$inboundSchema,
|
|
2208
|
+
]);
|
|
2209
|
+
|
|
2210
|
+
export function listPromptVersionsThinkingFromJSON(
|
|
2211
|
+
jsonString: string,
|
|
2212
|
+
): SafeParseResult<ListPromptVersionsThinking, SDKValidationError> {
|
|
2213
|
+
return safeParse(
|
|
2214
|
+
jsonString,
|
|
2215
|
+
(x) => ListPromptVersionsThinking$inboundSchema.parse(JSON.parse(x)),
|
|
2216
|
+
`Failed to parse 'ListPromptVersionsThinking' from JSON`,
|
|
2217
|
+
);
|
|
2218
|
+
}
|
|
2219
|
+
|
|
2220
|
+
/** @internal */
|
|
2221
|
+
export const ListPromptVersionsToolChoiceType$inboundSchema: z.ZodNativeEnum<
|
|
2222
|
+
typeof ListPromptVersionsToolChoiceType
|
|
2223
|
+
> = z.nativeEnum(ListPromptVersionsToolChoiceType);
|
|
2224
|
+
|
|
2225
|
+
/** @internal */
|
|
2226
|
+
export const ListPromptVersionsToolChoiceFunction$inboundSchema: z.ZodType<
|
|
2227
|
+
ListPromptVersionsToolChoiceFunction,
|
|
2228
|
+
z.ZodTypeDef,
|
|
2229
|
+
unknown
|
|
2230
|
+
> = z.object({
|
|
2231
|
+
name: z.string(),
|
|
2232
|
+
});
|
|
2233
|
+
|
|
2234
|
+
export function listPromptVersionsToolChoiceFunctionFromJSON(
|
|
2235
|
+
jsonString: string,
|
|
2236
|
+
): SafeParseResult<ListPromptVersionsToolChoiceFunction, SDKValidationError> {
|
|
2237
|
+
return safeParse(
|
|
2238
|
+
jsonString,
|
|
2239
|
+
(x) =>
|
|
2240
|
+
ListPromptVersionsToolChoiceFunction$inboundSchema.parse(JSON.parse(x)),
|
|
2241
|
+
`Failed to parse 'ListPromptVersionsToolChoiceFunction' from JSON`,
|
|
2242
|
+
);
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
/** @internal */
|
|
2246
|
+
export const ListPromptVersionsToolChoice2$inboundSchema: z.ZodType<
|
|
2247
|
+
ListPromptVersionsToolChoice2,
|
|
2248
|
+
z.ZodTypeDef,
|
|
2249
|
+
unknown
|
|
2250
|
+
> = z.object({
|
|
2251
|
+
type: ListPromptVersionsToolChoiceType$inboundSchema.optional(),
|
|
2252
|
+
function: z.lazy(() => ListPromptVersionsToolChoiceFunction$inboundSchema),
|
|
2253
|
+
});
|
|
2254
|
+
|
|
2255
|
+
export function listPromptVersionsToolChoice2FromJSON(
|
|
2256
|
+
jsonString: string,
|
|
2257
|
+
): SafeParseResult<ListPromptVersionsToolChoice2, SDKValidationError> {
|
|
2258
|
+
return safeParse(
|
|
2259
|
+
jsonString,
|
|
2260
|
+
(x) => ListPromptVersionsToolChoice2$inboundSchema.parse(JSON.parse(x)),
|
|
2261
|
+
`Failed to parse 'ListPromptVersionsToolChoice2' from JSON`,
|
|
2262
|
+
);
|
|
2263
|
+
}
|
|
2264
|
+
|
|
2265
|
+
/** @internal */
|
|
2266
|
+
export const ListPromptVersionsToolChoice1$inboundSchema: z.ZodNativeEnum<
|
|
2267
|
+
typeof ListPromptVersionsToolChoice1
|
|
2268
|
+
> = z.nativeEnum(ListPromptVersionsToolChoice1);
|
|
2269
|
+
|
|
2270
|
+
/** @internal */
|
|
2271
|
+
export const ListPromptVersionsToolChoice$inboundSchema: z.ZodType<
|
|
2272
|
+
ListPromptVersionsToolChoice,
|
|
2273
|
+
z.ZodTypeDef,
|
|
2274
|
+
unknown
|
|
2275
|
+
> = z.union([
|
|
2276
|
+
z.lazy(() => ListPromptVersionsToolChoice2$inboundSchema),
|
|
2277
|
+
ListPromptVersionsToolChoice1$inboundSchema,
|
|
2278
|
+
]);
|
|
2279
|
+
|
|
2280
|
+
export function listPromptVersionsToolChoiceFromJSON(
|
|
2281
|
+
jsonString: string,
|
|
2282
|
+
): SafeParseResult<ListPromptVersionsToolChoice, SDKValidationError> {
|
|
2283
|
+
return safeParse(
|
|
2284
|
+
jsonString,
|
|
2285
|
+
(x) => ListPromptVersionsToolChoice$inboundSchema.parse(JSON.parse(x)),
|
|
2286
|
+
`Failed to parse 'ListPromptVersionsToolChoice' from JSON`,
|
|
2287
|
+
);
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2290
|
+
/** @internal */
|
|
2291
|
+
export const ListPromptVersionsModalities$inboundSchema: z.ZodNativeEnum<
|
|
2292
|
+
typeof ListPromptVersionsModalities
|
|
2293
|
+
> = z.nativeEnum(ListPromptVersionsModalities);
|
|
2294
|
+
|
|
2295
|
+
/** @internal */
|
|
2296
|
+
export const ListPromptVersionsId1$inboundSchema: z.ZodNativeEnum<
|
|
2297
|
+
typeof ListPromptVersionsId1
|
|
2298
|
+
> = z.nativeEnum(ListPromptVersionsId1);
|
|
2299
|
+
|
|
2300
|
+
/** @internal */
|
|
2301
|
+
export const ListPromptVersionsId$inboundSchema: z.ZodType<
|
|
2302
|
+
ListPromptVersionsId,
|
|
2303
|
+
z.ZodTypeDef,
|
|
2304
|
+
unknown
|
|
2305
|
+
> = z.union([ListPromptVersionsId1$inboundSchema, z.string()]);
|
|
2306
|
+
|
|
2307
|
+
export function listPromptVersionsIdFromJSON(
|
|
2308
|
+
jsonString: string,
|
|
2309
|
+
): SafeParseResult<ListPromptVersionsId, SDKValidationError> {
|
|
2310
|
+
return safeParse(
|
|
2311
|
+
jsonString,
|
|
2312
|
+
(x) => ListPromptVersionsId$inboundSchema.parse(JSON.parse(x)),
|
|
2313
|
+
`Failed to parse 'ListPromptVersionsId' from JSON`,
|
|
2314
|
+
);
|
|
2315
|
+
}
|
|
2316
|
+
|
|
2317
|
+
/** @internal */
|
|
2318
|
+
export const ListPromptVersionsExecuteOn$inboundSchema: z.ZodNativeEnum<
|
|
2319
|
+
typeof ListPromptVersionsExecuteOn
|
|
2320
|
+
> = z.nativeEnum(ListPromptVersionsExecuteOn);
|
|
2321
|
+
|
|
2322
|
+
/** @internal */
|
|
2323
|
+
export const ListPromptVersionsGuardrails$inboundSchema: z.ZodType<
|
|
2324
|
+
ListPromptVersionsGuardrails,
|
|
2325
|
+
z.ZodTypeDef,
|
|
2326
|
+
unknown
|
|
2327
|
+
> = z.object({
|
|
2328
|
+
id: z.union([ListPromptVersionsId1$inboundSchema, z.string()]),
|
|
2329
|
+
execute_on: ListPromptVersionsExecuteOn$inboundSchema,
|
|
2330
|
+
}).transform((v) => {
|
|
2331
|
+
return remap$(v, {
|
|
2332
|
+
"execute_on": "executeOn",
|
|
2333
|
+
});
|
|
2334
|
+
});
|
|
2335
|
+
|
|
2336
|
+
export function listPromptVersionsGuardrailsFromJSON(
|
|
2337
|
+
jsonString: string,
|
|
2338
|
+
): SafeParseResult<ListPromptVersionsGuardrails, SDKValidationError> {
|
|
2339
|
+
return safeParse(
|
|
2340
|
+
jsonString,
|
|
2341
|
+
(x) => ListPromptVersionsGuardrails$inboundSchema.parse(JSON.parse(x)),
|
|
2342
|
+
`Failed to parse 'ListPromptVersionsGuardrails' from JSON`,
|
|
2343
|
+
);
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
/** @internal */
|
|
2347
|
+
export const ListPromptVersionsFallbacks$inboundSchema: z.ZodType<
|
|
2348
|
+
ListPromptVersionsFallbacks,
|
|
2349
|
+
z.ZodTypeDef,
|
|
2350
|
+
unknown
|
|
2351
|
+
> = z.object({
|
|
2352
|
+
model: z.string(),
|
|
2353
|
+
});
|
|
2354
|
+
|
|
2355
|
+
export function listPromptVersionsFallbacksFromJSON(
|
|
2356
|
+
jsonString: string,
|
|
2357
|
+
): SafeParseResult<ListPromptVersionsFallbacks, SDKValidationError> {
|
|
2358
|
+
return safeParse(
|
|
2359
|
+
jsonString,
|
|
2360
|
+
(x) => ListPromptVersionsFallbacks$inboundSchema.parse(JSON.parse(x)),
|
|
2361
|
+
`Failed to parse 'ListPromptVersionsFallbacks' from JSON`,
|
|
2362
|
+
);
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
/** @internal */
|
|
2366
|
+
export const ListPromptVersionsRetry$inboundSchema: z.ZodType<
|
|
2367
|
+
ListPromptVersionsRetry,
|
|
2368
|
+
z.ZodTypeDef,
|
|
2369
|
+
unknown
|
|
2370
|
+
> = z.object({
|
|
2371
|
+
count: z.number().default(3),
|
|
2372
|
+
on_codes: z.array(z.number()).optional(),
|
|
2373
|
+
}).transform((v) => {
|
|
2374
|
+
return remap$(v, {
|
|
2375
|
+
"on_codes": "onCodes",
|
|
2376
|
+
});
|
|
2377
|
+
});
|
|
2378
|
+
|
|
2379
|
+
export function listPromptVersionsRetryFromJSON(
|
|
2380
|
+
jsonString: string,
|
|
2381
|
+
): SafeParseResult<ListPromptVersionsRetry, SDKValidationError> {
|
|
2382
|
+
return safeParse(
|
|
2383
|
+
jsonString,
|
|
2384
|
+
(x) => ListPromptVersionsRetry$inboundSchema.parse(JSON.parse(x)),
|
|
2385
|
+
`Failed to parse 'ListPromptVersionsRetry' from JSON`,
|
|
2386
|
+
);
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
/** @internal */
|
|
2390
|
+
export const ListPromptVersionsType$inboundSchema: z.ZodNativeEnum<
|
|
2391
|
+
typeof ListPromptVersionsType
|
|
2392
|
+
> = z.nativeEnum(ListPromptVersionsType);
|
|
2393
|
+
|
|
2394
|
+
/** @internal */
|
|
2395
|
+
export const ListPromptVersionsCache$inboundSchema: z.ZodType<
|
|
2396
|
+
ListPromptVersionsCache,
|
|
2397
|
+
z.ZodTypeDef,
|
|
2398
|
+
unknown
|
|
2399
|
+
> = z.object({
|
|
2400
|
+
ttl: z.number().default(1800),
|
|
2401
|
+
type: ListPromptVersionsType$inboundSchema,
|
|
2402
|
+
});
|
|
2403
|
+
|
|
2404
|
+
export function listPromptVersionsCacheFromJSON(
|
|
2405
|
+
jsonString: string,
|
|
2406
|
+
): SafeParseResult<ListPromptVersionsCache, SDKValidationError> {
|
|
2407
|
+
return safeParse(
|
|
2408
|
+
jsonString,
|
|
2409
|
+
(x) => ListPromptVersionsCache$inboundSchema.parse(JSON.parse(x)),
|
|
2410
|
+
`Failed to parse 'ListPromptVersionsCache' from JSON`,
|
|
2411
|
+
);
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2414
|
+
/** @internal */
|
|
2415
|
+
export const ListPromptVersionsLoadBalancerType$inboundSchema: z.ZodNativeEnum<
|
|
2416
|
+
typeof ListPromptVersionsLoadBalancerType
|
|
2417
|
+
> = z.nativeEnum(ListPromptVersionsLoadBalancerType);
|
|
2418
|
+
|
|
2419
|
+
/** @internal */
|
|
2420
|
+
export const ListPromptVersionsLoadBalancerModels$inboundSchema: z.ZodType<
|
|
2421
|
+
ListPromptVersionsLoadBalancerModels,
|
|
2422
|
+
z.ZodTypeDef,
|
|
2423
|
+
unknown
|
|
2424
|
+
> = z.object({
|
|
2425
|
+
model: z.string(),
|
|
2426
|
+
weight: z.number().default(0.5),
|
|
2427
|
+
});
|
|
2428
|
+
|
|
2429
|
+
export function listPromptVersionsLoadBalancerModelsFromJSON(
|
|
2430
|
+
jsonString: string,
|
|
2431
|
+
): SafeParseResult<ListPromptVersionsLoadBalancerModels, SDKValidationError> {
|
|
2432
|
+
return safeParse(
|
|
2433
|
+
jsonString,
|
|
2434
|
+
(x) =>
|
|
2435
|
+
ListPromptVersionsLoadBalancerModels$inboundSchema.parse(JSON.parse(x)),
|
|
2436
|
+
`Failed to parse 'ListPromptVersionsLoadBalancerModels' from JSON`,
|
|
2437
|
+
);
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
/** @internal */
|
|
2441
|
+
export const ListPromptVersionsLoadBalancer1$inboundSchema: z.ZodType<
|
|
2442
|
+
ListPromptVersionsLoadBalancer1,
|
|
2443
|
+
z.ZodTypeDef,
|
|
2444
|
+
unknown
|
|
2445
|
+
> = z.object({
|
|
2446
|
+
type: ListPromptVersionsLoadBalancerType$inboundSchema,
|
|
2447
|
+
models: z.array(
|
|
2448
|
+
z.lazy(() => ListPromptVersionsLoadBalancerModels$inboundSchema),
|
|
2449
|
+
),
|
|
2450
|
+
});
|
|
2451
|
+
|
|
2452
|
+
export function listPromptVersionsLoadBalancer1FromJSON(
|
|
2453
|
+
jsonString: string,
|
|
2454
|
+
): SafeParseResult<ListPromptVersionsLoadBalancer1, SDKValidationError> {
|
|
2455
|
+
return safeParse(
|
|
2456
|
+
jsonString,
|
|
2457
|
+
(x) => ListPromptVersionsLoadBalancer1$inboundSchema.parse(JSON.parse(x)),
|
|
2458
|
+
`Failed to parse 'ListPromptVersionsLoadBalancer1' from JSON`,
|
|
2459
|
+
);
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
/** @internal */
|
|
2463
|
+
export const ListPromptVersionsLoadBalancer$inboundSchema: z.ZodType<
|
|
2464
|
+
ListPromptVersionsLoadBalancer,
|
|
2465
|
+
z.ZodTypeDef,
|
|
2466
|
+
unknown
|
|
2467
|
+
> = z.lazy(() => ListPromptVersionsLoadBalancer1$inboundSchema);
|
|
2468
|
+
|
|
2469
|
+
export function listPromptVersionsLoadBalancerFromJSON(
|
|
2470
|
+
jsonString: string,
|
|
2471
|
+
): SafeParseResult<ListPromptVersionsLoadBalancer, SDKValidationError> {
|
|
2472
|
+
return safeParse(
|
|
2473
|
+
jsonString,
|
|
2474
|
+
(x) => ListPromptVersionsLoadBalancer$inboundSchema.parse(JSON.parse(x)),
|
|
2475
|
+
`Failed to parse 'ListPromptVersionsLoadBalancer' from JSON`,
|
|
2476
|
+
);
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2479
|
+
/** @internal */
|
|
2480
|
+
export const ListPromptVersionsTimeout$inboundSchema: z.ZodType<
|
|
2481
|
+
ListPromptVersionsTimeout,
|
|
2482
|
+
z.ZodTypeDef,
|
|
2483
|
+
unknown
|
|
2484
|
+
> = z.object({
|
|
2485
|
+
call_timeout: z.number(),
|
|
2486
|
+
}).transform((v) => {
|
|
2487
|
+
return remap$(v, {
|
|
2488
|
+
"call_timeout": "callTimeout",
|
|
2489
|
+
});
|
|
2490
|
+
});
|
|
2491
|
+
|
|
2492
|
+
export function listPromptVersionsTimeoutFromJSON(
|
|
2493
|
+
jsonString: string,
|
|
2494
|
+
): SafeParseResult<ListPromptVersionsTimeout, SDKValidationError> {
|
|
2495
|
+
return safeParse(
|
|
2496
|
+
jsonString,
|
|
2497
|
+
(x) => ListPromptVersionsTimeout$inboundSchema.parse(JSON.parse(x)),
|
|
2498
|
+
`Failed to parse 'ListPromptVersionsTimeout' from JSON`,
|
|
2499
|
+
);
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2502
|
+
/** @internal */
|
|
2503
|
+
export const ListPromptVersionsContentPromptsResponse2002$inboundSchema:
|
|
2504
|
+
z.ZodType<
|
|
2505
|
+
ListPromptVersionsContentPromptsResponse2002,
|
|
2506
|
+
z.ZodTypeDef,
|
|
2507
|
+
unknown
|
|
2508
|
+
> = components.TextContentPartSchema$inboundSchema;
|
|
2509
|
+
|
|
2510
|
+
export function listPromptVersionsContentPromptsResponse2002FromJSON(
|
|
2511
|
+
jsonString: string,
|
|
2512
|
+
): SafeParseResult<
|
|
2513
|
+
ListPromptVersionsContentPromptsResponse2002,
|
|
2514
|
+
SDKValidationError
|
|
2515
|
+
> {
|
|
2516
|
+
return safeParse(
|
|
2517
|
+
jsonString,
|
|
2518
|
+
(x) =>
|
|
2519
|
+
ListPromptVersionsContentPromptsResponse2002$inboundSchema.parse(
|
|
2520
|
+
JSON.parse(x),
|
|
2521
|
+
),
|
|
2522
|
+
`Failed to parse 'ListPromptVersionsContentPromptsResponse2002' from JSON`,
|
|
2523
|
+
);
|
|
2524
|
+
}
|
|
2525
|
+
|
|
2526
|
+
/** @internal */
|
|
2527
|
+
export const ListPromptVersionsMessagesPromptsResponse200Content$inboundSchema:
|
|
2528
|
+
z.ZodType<
|
|
2529
|
+
ListPromptVersionsMessagesPromptsResponse200Content,
|
|
2530
|
+
z.ZodTypeDef,
|
|
2531
|
+
unknown
|
|
2532
|
+
> = z.union([
|
|
2533
|
+
z.string(),
|
|
2534
|
+
z.array(components.TextContentPartSchema$inboundSchema),
|
|
2535
|
+
]);
|
|
2536
|
+
|
|
2537
|
+
export function listPromptVersionsMessagesPromptsResponse200ContentFromJSON(
|
|
2538
|
+
jsonString: string,
|
|
2539
|
+
): SafeParseResult<
|
|
2540
|
+
ListPromptVersionsMessagesPromptsResponse200Content,
|
|
2541
|
+
SDKValidationError
|
|
2542
|
+
> {
|
|
2543
|
+
return safeParse(
|
|
2544
|
+
jsonString,
|
|
2545
|
+
(x) =>
|
|
2546
|
+
ListPromptVersionsMessagesPromptsResponse200Content$inboundSchema.parse(
|
|
2547
|
+
JSON.parse(x),
|
|
2548
|
+
),
|
|
2549
|
+
`Failed to parse 'ListPromptVersionsMessagesPromptsResponse200Content' from JSON`,
|
|
2550
|
+
);
|
|
2551
|
+
}
|
|
2552
|
+
|
|
2553
|
+
/** @internal */
|
|
2554
|
+
export const ListPromptVersionsMessagesPromptsType$inboundSchema:
|
|
2555
|
+
z.ZodNativeEnum<typeof ListPromptVersionsMessagesPromptsType> = z.nativeEnum(
|
|
2556
|
+
ListPromptVersionsMessagesPromptsType,
|
|
2557
|
+
);
|
|
2558
|
+
|
|
2559
|
+
/** @internal */
|
|
2560
|
+
export const ListPromptVersionsMessagesTtl$inboundSchema: z.ZodNativeEnum<
|
|
2561
|
+
typeof ListPromptVersionsMessagesTtl
|
|
2562
|
+
> = z.nativeEnum(ListPromptVersionsMessagesTtl);
|
|
2563
|
+
|
|
2564
|
+
/** @internal */
|
|
2565
|
+
export const ListPromptVersionsMessagesCacheControl$inboundSchema: z.ZodType<
|
|
2566
|
+
ListPromptVersionsMessagesCacheControl,
|
|
2567
|
+
z.ZodTypeDef,
|
|
2568
|
+
unknown
|
|
2569
|
+
> = z.object({
|
|
2570
|
+
type: ListPromptVersionsMessagesPromptsType$inboundSchema,
|
|
2571
|
+
ttl: ListPromptVersionsMessagesTtl$inboundSchema.default("5m"),
|
|
2572
|
+
});
|
|
2573
|
+
|
|
2574
|
+
export function listPromptVersionsMessagesCacheControlFromJSON(
|
|
2575
|
+
jsonString: string,
|
|
2576
|
+
): SafeParseResult<ListPromptVersionsMessagesCacheControl, SDKValidationError> {
|
|
2577
|
+
return safeParse(
|
|
2578
|
+
jsonString,
|
|
2579
|
+
(x) =>
|
|
2580
|
+
ListPromptVersionsMessagesCacheControl$inboundSchema.parse(JSON.parse(x)),
|
|
2581
|
+
`Failed to parse 'ListPromptVersionsMessagesCacheControl' from JSON`,
|
|
2582
|
+
);
|
|
2583
|
+
}
|
|
2584
|
+
|
|
2585
|
+
/** @internal */
|
|
2586
|
+
export const ListPromptVersionsMessagesToolMessage$inboundSchema: z.ZodType<
|
|
2587
|
+
ListPromptVersionsMessagesToolMessage,
|
|
2588
|
+
z.ZodTypeDef,
|
|
2589
|
+
unknown
|
|
2590
|
+
> = z.object({
|
|
2591
|
+
role: z.literal("tool"),
|
|
2592
|
+
content: z.union([
|
|
2593
|
+
z.string(),
|
|
2594
|
+
z.array(components.TextContentPartSchema$inboundSchema),
|
|
2595
|
+
]),
|
|
2596
|
+
tool_call_id: z.nullable(z.string()),
|
|
2597
|
+
cache_control: z.lazy(() =>
|
|
2598
|
+
ListPromptVersionsMessagesCacheControl$inboundSchema
|
|
2599
|
+
).optional(),
|
|
2600
|
+
}).transform((v) => {
|
|
2601
|
+
return remap$(v, {
|
|
2602
|
+
"tool_call_id": "toolCallId",
|
|
2603
|
+
"cache_control": "cacheControl",
|
|
2604
|
+
});
|
|
2605
|
+
});
|
|
2606
|
+
|
|
2607
|
+
export function listPromptVersionsMessagesToolMessageFromJSON(
|
|
2608
|
+
jsonString: string,
|
|
2609
|
+
): SafeParseResult<ListPromptVersionsMessagesToolMessage, SDKValidationError> {
|
|
2610
|
+
return safeParse(
|
|
2611
|
+
jsonString,
|
|
2612
|
+
(x) =>
|
|
2613
|
+
ListPromptVersionsMessagesToolMessage$inboundSchema.parse(JSON.parse(x)),
|
|
2614
|
+
`Failed to parse 'ListPromptVersionsMessagesToolMessage' from JSON`,
|
|
2615
|
+
);
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
/** @internal */
|
|
2619
|
+
export const ListPromptVersionsContentPromptsResponse2$inboundSchema: z.ZodType<
|
|
2620
|
+
ListPromptVersionsContentPromptsResponse2,
|
|
2621
|
+
z.ZodTypeDef,
|
|
2622
|
+
unknown
|
|
2623
|
+
> = z.union([
|
|
2624
|
+
components.TextContentPartSchema$inboundSchema.and(
|
|
2625
|
+
z.object({ type: z.literal("text") }),
|
|
2626
|
+
),
|
|
2627
|
+
components.RefusalPartSchema$inboundSchema,
|
|
2628
|
+
components.ReasoningPartSchema$inboundSchema,
|
|
2629
|
+
components.RedactedReasoningPartSchema$inboundSchema,
|
|
2630
|
+
]);
|
|
2631
|
+
|
|
2632
|
+
export function listPromptVersionsContentPromptsResponse2FromJSON(
|
|
2633
|
+
jsonString: string,
|
|
2634
|
+
): SafeParseResult<
|
|
2635
|
+
ListPromptVersionsContentPromptsResponse2,
|
|
2636
|
+
SDKValidationError
|
|
2637
|
+
> {
|
|
2638
|
+
return safeParse(
|
|
2639
|
+
jsonString,
|
|
2640
|
+
(x) =>
|
|
2641
|
+
ListPromptVersionsContentPromptsResponse2$inboundSchema.parse(
|
|
2642
|
+
JSON.parse(x),
|
|
2643
|
+
),
|
|
2644
|
+
`Failed to parse 'ListPromptVersionsContentPromptsResponse2' from JSON`,
|
|
2645
|
+
);
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2648
|
+
/** @internal */
|
|
2649
|
+
export const ListPromptVersionsMessagesPromptsResponseContent$inboundSchema:
|
|
2650
|
+
z.ZodType<
|
|
2651
|
+
ListPromptVersionsMessagesPromptsResponseContent,
|
|
2652
|
+
z.ZodTypeDef,
|
|
2653
|
+
unknown
|
|
2654
|
+
> = z.union([
|
|
2655
|
+
z.string(),
|
|
2656
|
+
z.array(
|
|
2657
|
+
z.union([
|
|
2658
|
+
components.TextContentPartSchema$inboundSchema.and(
|
|
2659
|
+
z.object({ type: z.literal("text") }),
|
|
2660
|
+
),
|
|
2661
|
+
components.RefusalPartSchema$inboundSchema,
|
|
2662
|
+
components.ReasoningPartSchema$inboundSchema,
|
|
2663
|
+
components.RedactedReasoningPartSchema$inboundSchema,
|
|
2664
|
+
]),
|
|
2665
|
+
),
|
|
2666
|
+
]);
|
|
2667
|
+
|
|
2668
|
+
export function listPromptVersionsMessagesPromptsResponseContentFromJSON(
|
|
2669
|
+
jsonString: string,
|
|
2670
|
+
): SafeParseResult<
|
|
2671
|
+
ListPromptVersionsMessagesPromptsResponseContent,
|
|
2672
|
+
SDKValidationError
|
|
2673
|
+
> {
|
|
2674
|
+
return safeParse(
|
|
2675
|
+
jsonString,
|
|
2676
|
+
(x) =>
|
|
2677
|
+
ListPromptVersionsMessagesPromptsResponseContent$inboundSchema.parse(
|
|
2678
|
+
JSON.parse(x),
|
|
2679
|
+
),
|
|
2680
|
+
`Failed to parse 'ListPromptVersionsMessagesPromptsResponseContent' from JSON`,
|
|
2681
|
+
);
|
|
2682
|
+
}
|
|
2683
|
+
|
|
2684
|
+
/** @internal */
|
|
2685
|
+
export const ListPromptVersionsMessagesAudio$inboundSchema: z.ZodType<
|
|
2686
|
+
ListPromptVersionsMessagesAudio,
|
|
2687
|
+
z.ZodTypeDef,
|
|
2688
|
+
unknown
|
|
2689
|
+
> = z.object({
|
|
2690
|
+
id: z.string(),
|
|
2691
|
+
});
|
|
2692
|
+
|
|
2693
|
+
export function listPromptVersionsMessagesAudioFromJSON(
|
|
2694
|
+
jsonString: string,
|
|
2695
|
+
): SafeParseResult<ListPromptVersionsMessagesAudio, SDKValidationError> {
|
|
2696
|
+
return safeParse(
|
|
2697
|
+
jsonString,
|
|
2698
|
+
(x) => ListPromptVersionsMessagesAudio$inboundSchema.parse(JSON.parse(x)),
|
|
2699
|
+
`Failed to parse 'ListPromptVersionsMessagesAudio' from JSON`,
|
|
2700
|
+
);
|
|
2701
|
+
}
|
|
2702
|
+
|
|
2703
|
+
/** @internal */
|
|
2704
|
+
export const ListPromptVersionsMessagesType$inboundSchema: z.ZodNativeEnum<
|
|
2705
|
+
typeof ListPromptVersionsMessagesType
|
|
2706
|
+
> = z.nativeEnum(ListPromptVersionsMessagesType);
|
|
2707
|
+
|
|
2708
|
+
/** @internal */
|
|
2709
|
+
export const ListPromptVersionsMessagesFunction$inboundSchema: z.ZodType<
|
|
2710
|
+
ListPromptVersionsMessagesFunction,
|
|
2711
|
+
z.ZodTypeDef,
|
|
2712
|
+
unknown
|
|
2713
|
+
> = z.object({
|
|
2714
|
+
name: z.string().optional(),
|
|
2715
|
+
arguments: z.string().optional(),
|
|
2716
|
+
});
|
|
2717
|
+
|
|
2718
|
+
export function listPromptVersionsMessagesFunctionFromJSON(
|
|
2719
|
+
jsonString: string,
|
|
2720
|
+
): SafeParseResult<ListPromptVersionsMessagesFunction, SDKValidationError> {
|
|
2721
|
+
return safeParse(
|
|
2722
|
+
jsonString,
|
|
2723
|
+
(x) =>
|
|
2724
|
+
ListPromptVersionsMessagesFunction$inboundSchema.parse(JSON.parse(x)),
|
|
2725
|
+
`Failed to parse 'ListPromptVersionsMessagesFunction' from JSON`,
|
|
2726
|
+
);
|
|
2727
|
+
}
|
|
2728
|
+
|
|
2729
|
+
/** @internal */
|
|
2730
|
+
export const ListPromptVersionsMessagesToolCalls$inboundSchema: z.ZodType<
|
|
2731
|
+
ListPromptVersionsMessagesToolCalls,
|
|
2732
|
+
z.ZodTypeDef,
|
|
2733
|
+
unknown
|
|
2734
|
+
> = z.object({
|
|
2735
|
+
id: z.string(),
|
|
2736
|
+
type: ListPromptVersionsMessagesType$inboundSchema,
|
|
2737
|
+
function: z.lazy(() => ListPromptVersionsMessagesFunction$inboundSchema),
|
|
2738
|
+
thought_signature: z.string().optional(),
|
|
2739
|
+
}).transform((v) => {
|
|
2740
|
+
return remap$(v, {
|
|
2741
|
+
"thought_signature": "thoughtSignature",
|
|
2742
|
+
});
|
|
2743
|
+
});
|
|
2744
|
+
|
|
2745
|
+
export function listPromptVersionsMessagesToolCallsFromJSON(
|
|
2746
|
+
jsonString: string,
|
|
2747
|
+
): SafeParseResult<ListPromptVersionsMessagesToolCalls, SDKValidationError> {
|
|
2748
|
+
return safeParse(
|
|
2749
|
+
jsonString,
|
|
2750
|
+
(x) =>
|
|
2751
|
+
ListPromptVersionsMessagesToolCalls$inboundSchema.parse(JSON.parse(x)),
|
|
2752
|
+
`Failed to parse 'ListPromptVersionsMessagesToolCalls' from JSON`,
|
|
2753
|
+
);
|
|
2754
|
+
}
|
|
2755
|
+
|
|
2756
|
+
/** @internal */
|
|
2757
|
+
export const ListPromptVersionsMessagesAssistantMessage$inboundSchema:
|
|
2758
|
+
z.ZodType<ListPromptVersionsMessagesAssistantMessage, z.ZodTypeDef, unknown> =
|
|
2759
|
+
z.object({
|
|
2760
|
+
content: z.nullable(
|
|
2761
|
+
z.union([
|
|
2762
|
+
z.string(),
|
|
2763
|
+
z.array(
|
|
2764
|
+
z.union([
|
|
2765
|
+
components.TextContentPartSchema$inboundSchema.and(
|
|
2766
|
+
z.object({ type: z.literal("text") }),
|
|
2767
|
+
),
|
|
2768
|
+
components.RefusalPartSchema$inboundSchema,
|
|
2769
|
+
components.ReasoningPartSchema$inboundSchema,
|
|
2770
|
+
components.RedactedReasoningPartSchema$inboundSchema,
|
|
2771
|
+
]),
|
|
2772
|
+
),
|
|
2773
|
+
]),
|
|
2774
|
+
).optional(),
|
|
2775
|
+
refusal: z.nullable(z.string()).optional(),
|
|
2776
|
+
role: z.literal("assistant"),
|
|
2777
|
+
name: z.string().optional(),
|
|
2778
|
+
audio: z.nullable(
|
|
2779
|
+
z.lazy(() => ListPromptVersionsMessagesAudio$inboundSchema),
|
|
2780
|
+
).optional(),
|
|
2781
|
+
tool_calls: z.array(
|
|
2782
|
+
z.lazy(() => ListPromptVersionsMessagesToolCalls$inboundSchema),
|
|
2783
|
+
).optional(),
|
|
2784
|
+
}).transform((v) => {
|
|
2785
|
+
return remap$(v, {
|
|
2786
|
+
"tool_calls": "toolCalls",
|
|
2787
|
+
});
|
|
2788
|
+
});
|
|
2789
|
+
|
|
2790
|
+
export function listPromptVersionsMessagesAssistantMessageFromJSON(
|
|
2791
|
+
jsonString: string,
|
|
2792
|
+
): SafeParseResult<
|
|
2793
|
+
ListPromptVersionsMessagesAssistantMessage,
|
|
2794
|
+
SDKValidationError
|
|
2795
|
+
> {
|
|
2796
|
+
return safeParse(
|
|
2797
|
+
jsonString,
|
|
2798
|
+
(x) =>
|
|
2799
|
+
ListPromptVersionsMessagesAssistantMessage$inboundSchema.parse(
|
|
2800
|
+
JSON.parse(x),
|
|
2801
|
+
),
|
|
2802
|
+
`Failed to parse 'ListPromptVersionsMessagesAssistantMessage' from JSON`,
|
|
2803
|
+
);
|
|
2804
|
+
}
|
|
2805
|
+
|
|
2806
|
+
/** @internal */
|
|
2807
|
+
export const ListPromptVersions2PromptsResponse200ApplicationJSONType$inboundSchema:
|
|
2808
|
+
z.ZodNativeEnum<
|
|
2809
|
+
typeof ListPromptVersions2PromptsResponse200ApplicationJSONType
|
|
2810
|
+
> = z.nativeEnum(ListPromptVersions2PromptsResponse200ApplicationJSONType);
|
|
2811
|
+
|
|
2812
|
+
/** @internal */
|
|
2813
|
+
export const ListPromptVersions2Ttl$inboundSchema: z.ZodNativeEnum<
|
|
2814
|
+
typeof ListPromptVersions2Ttl
|
|
2815
|
+
> = z.nativeEnum(ListPromptVersions2Ttl);
|
|
2816
|
+
|
|
2817
|
+
/** @internal */
|
|
2818
|
+
export const ListPromptVersions2CacheControl$inboundSchema: z.ZodType<
|
|
2819
|
+
ListPromptVersions2CacheControl,
|
|
2820
|
+
z.ZodTypeDef,
|
|
2821
|
+
unknown
|
|
2822
|
+
> = z.object({
|
|
2823
|
+
type: ListPromptVersions2PromptsResponse200ApplicationJSONType$inboundSchema,
|
|
2824
|
+
ttl: ListPromptVersions2Ttl$inboundSchema.default("5m"),
|
|
2825
|
+
});
|
|
2826
|
+
|
|
2827
|
+
export function listPromptVersions2CacheControlFromJSON(
|
|
2828
|
+
jsonString: string,
|
|
2829
|
+
): SafeParseResult<ListPromptVersions2CacheControl, SDKValidationError> {
|
|
2830
|
+
return safeParse(
|
|
2831
|
+
jsonString,
|
|
2832
|
+
(x) => ListPromptVersions2CacheControl$inboundSchema.parse(JSON.parse(x)),
|
|
2833
|
+
`Failed to parse 'ListPromptVersions2CacheControl' from JSON`,
|
|
2834
|
+
);
|
|
2835
|
+
}
|
|
2836
|
+
|
|
2837
|
+
/** @internal */
|
|
2838
|
+
export const ListPromptVersions24$inboundSchema: z.ZodType<
|
|
2839
|
+
ListPromptVersions24,
|
|
2840
|
+
z.ZodTypeDef,
|
|
2841
|
+
unknown
|
|
2842
|
+
> = z.object({
|
|
2843
|
+
type: z.literal("file"),
|
|
2844
|
+
cache_control: z.lazy(() => ListPromptVersions2CacheControl$inboundSchema)
|
|
2845
|
+
.optional(),
|
|
2846
|
+
file: components.FileContentPartSchema$inboundSchema,
|
|
2847
|
+
}).transform((v) => {
|
|
2848
|
+
return remap$(v, {
|
|
2849
|
+
"cache_control": "cacheControl",
|
|
2850
|
+
});
|
|
2851
|
+
});
|
|
2852
|
+
|
|
2853
|
+
export function listPromptVersions24FromJSON(
|
|
2854
|
+
jsonString: string,
|
|
2855
|
+
): SafeParseResult<ListPromptVersions24, SDKValidationError> {
|
|
2856
|
+
return safeParse(
|
|
2857
|
+
jsonString,
|
|
2858
|
+
(x) => ListPromptVersions24$inboundSchema.parse(JSON.parse(x)),
|
|
2859
|
+
`Failed to parse 'ListPromptVersions24' from JSON`,
|
|
2860
|
+
);
|
|
2861
|
+
}
|
|
2862
|
+
|
|
2863
|
+
/** @internal */
|
|
2864
|
+
export const ListPromptVersionsContentPrompts2$inboundSchema: z.ZodType<
|
|
2865
|
+
ListPromptVersionsContentPrompts2,
|
|
2866
|
+
z.ZodTypeDef,
|
|
2867
|
+
unknown
|
|
2868
|
+
> = z.union([
|
|
2869
|
+
components.TextContentPartSchema$inboundSchema.and(
|
|
2870
|
+
z.object({ type: z.literal("text") }),
|
|
2871
|
+
),
|
|
2872
|
+
components.ImageContentPartSchema$inboundSchema,
|
|
2873
|
+
components.AudioContentPartSchema$inboundSchema,
|
|
2874
|
+
z.lazy(() => ListPromptVersions24$inboundSchema),
|
|
2875
|
+
]);
|
|
2876
|
+
|
|
2877
|
+
export function listPromptVersionsContentPrompts2FromJSON(
|
|
2878
|
+
jsonString: string,
|
|
2879
|
+
): SafeParseResult<ListPromptVersionsContentPrompts2, SDKValidationError> {
|
|
2880
|
+
return safeParse(
|
|
2881
|
+
jsonString,
|
|
2882
|
+
(x) => ListPromptVersionsContentPrompts2$inboundSchema.parse(JSON.parse(x)),
|
|
2883
|
+
`Failed to parse 'ListPromptVersionsContentPrompts2' from JSON`,
|
|
2884
|
+
);
|
|
2885
|
+
}
|
|
2886
|
+
|
|
2887
|
+
/** @internal */
|
|
2888
|
+
export const ListPromptVersionsMessagesPromptsContent$inboundSchema: z.ZodType<
|
|
2889
|
+
ListPromptVersionsMessagesPromptsContent,
|
|
2890
|
+
z.ZodTypeDef,
|
|
2891
|
+
unknown
|
|
2892
|
+
> = z.union([
|
|
2893
|
+
z.string(),
|
|
2894
|
+
z.array(
|
|
2895
|
+
z.union([
|
|
2896
|
+
components.TextContentPartSchema$inboundSchema.and(
|
|
2897
|
+
z.object({ type: z.literal("text") }),
|
|
2898
|
+
),
|
|
2899
|
+
components.ImageContentPartSchema$inboundSchema,
|
|
2900
|
+
components.AudioContentPartSchema$inboundSchema,
|
|
2901
|
+
z.lazy(() => ListPromptVersions24$inboundSchema),
|
|
2902
|
+
]),
|
|
2903
|
+
),
|
|
2904
|
+
]);
|
|
2905
|
+
|
|
2906
|
+
export function listPromptVersionsMessagesPromptsContentFromJSON(
|
|
2907
|
+
jsonString: string,
|
|
2908
|
+
): SafeParseResult<
|
|
2909
|
+
ListPromptVersionsMessagesPromptsContent,
|
|
2910
|
+
SDKValidationError
|
|
2911
|
+
> {
|
|
2912
|
+
return safeParse(
|
|
2913
|
+
jsonString,
|
|
2914
|
+
(x) =>
|
|
2915
|
+
ListPromptVersionsMessagesPromptsContent$inboundSchema.parse(
|
|
2916
|
+
JSON.parse(x),
|
|
2917
|
+
),
|
|
2918
|
+
`Failed to parse 'ListPromptVersionsMessagesPromptsContent' from JSON`,
|
|
2919
|
+
);
|
|
2920
|
+
}
|
|
2921
|
+
|
|
2922
|
+
/** @internal */
|
|
2923
|
+
export const ListPromptVersionsMessagesUserMessage$inboundSchema: z.ZodType<
|
|
2924
|
+
ListPromptVersionsMessagesUserMessage,
|
|
2925
|
+
z.ZodTypeDef,
|
|
2926
|
+
unknown
|
|
2927
|
+
> = z.object({
|
|
2928
|
+
role: z.literal("user"),
|
|
2929
|
+
name: z.string().optional(),
|
|
2930
|
+
content: z.union([
|
|
2931
|
+
z.string(),
|
|
2932
|
+
z.array(
|
|
2933
|
+
z.union([
|
|
2934
|
+
components.TextContentPartSchema$inboundSchema.and(
|
|
2935
|
+
z.object({ type: z.literal("text") }),
|
|
2936
|
+
),
|
|
2937
|
+
components.ImageContentPartSchema$inboundSchema,
|
|
2938
|
+
components.AudioContentPartSchema$inboundSchema,
|
|
2939
|
+
z.lazy(() => ListPromptVersions24$inboundSchema),
|
|
2940
|
+
]),
|
|
2941
|
+
),
|
|
2942
|
+
]),
|
|
2943
|
+
});
|
|
2944
|
+
|
|
2945
|
+
export function listPromptVersionsMessagesUserMessageFromJSON(
|
|
2946
|
+
jsonString: string,
|
|
2947
|
+
): SafeParseResult<ListPromptVersionsMessagesUserMessage, SDKValidationError> {
|
|
2948
|
+
return safeParse(
|
|
2949
|
+
jsonString,
|
|
2950
|
+
(x) =>
|
|
2951
|
+
ListPromptVersionsMessagesUserMessage$inboundSchema.parse(JSON.parse(x)),
|
|
2952
|
+
`Failed to parse 'ListPromptVersionsMessagesUserMessage' from JSON`,
|
|
2953
|
+
);
|
|
2954
|
+
}
|
|
2955
|
+
|
|
2956
|
+
/** @internal */
|
|
2957
|
+
export const ListPromptVersionsMessagesContent$inboundSchema: z.ZodType<
|
|
2958
|
+
ListPromptVersionsMessagesContent,
|
|
2959
|
+
z.ZodTypeDef,
|
|
2960
|
+
unknown
|
|
2961
|
+
> = z.union([
|
|
2962
|
+
z.string(),
|
|
2963
|
+
z.array(components.TextContentPartSchema$inboundSchema),
|
|
2964
|
+
]);
|
|
2965
|
+
|
|
2966
|
+
export function listPromptVersionsMessagesContentFromJSON(
|
|
2967
|
+
jsonString: string,
|
|
2968
|
+
): SafeParseResult<ListPromptVersionsMessagesContent, SDKValidationError> {
|
|
2969
|
+
return safeParse(
|
|
2970
|
+
jsonString,
|
|
2971
|
+
(x) => ListPromptVersionsMessagesContent$inboundSchema.parse(JSON.parse(x)),
|
|
2972
|
+
`Failed to parse 'ListPromptVersionsMessagesContent' from JSON`,
|
|
2973
|
+
);
|
|
2974
|
+
}
|
|
2975
|
+
|
|
2976
|
+
/** @internal */
|
|
2977
|
+
export const ListPromptVersionsMessagesSystemMessage$inboundSchema: z.ZodType<
|
|
2978
|
+
ListPromptVersionsMessagesSystemMessage,
|
|
2979
|
+
z.ZodTypeDef,
|
|
2980
|
+
unknown
|
|
2981
|
+
> = z.object({
|
|
2982
|
+
role: z.literal("system"),
|
|
2983
|
+
content: z.union([
|
|
2984
|
+
z.string(),
|
|
2985
|
+
z.array(components.TextContentPartSchema$inboundSchema),
|
|
2986
|
+
]),
|
|
2987
|
+
name: z.string().optional(),
|
|
2988
|
+
});
|
|
2989
|
+
|
|
2990
|
+
export function listPromptVersionsMessagesSystemMessageFromJSON(
|
|
2991
|
+
jsonString: string,
|
|
2992
|
+
): SafeParseResult<
|
|
2993
|
+
ListPromptVersionsMessagesSystemMessage,
|
|
2994
|
+
SDKValidationError
|
|
2995
|
+
> {
|
|
2996
|
+
return safeParse(
|
|
2997
|
+
jsonString,
|
|
2998
|
+
(x) =>
|
|
2999
|
+
ListPromptVersionsMessagesSystemMessage$inboundSchema.parse(
|
|
3000
|
+
JSON.parse(x),
|
|
3001
|
+
),
|
|
3002
|
+
`Failed to parse 'ListPromptVersionsMessagesSystemMessage' from JSON`,
|
|
3003
|
+
);
|
|
3004
|
+
}
|
|
3005
|
+
|
|
3006
|
+
/** @internal */
|
|
3007
|
+
export const ListPromptVersionsPromptsMessages$inboundSchema: z.ZodType<
|
|
3008
|
+
ListPromptVersionsPromptsMessages,
|
|
3009
|
+
z.ZodTypeDef,
|
|
3010
|
+
unknown
|
|
3011
|
+
> = z.union([
|
|
3012
|
+
z.lazy(() => ListPromptVersionsMessagesSystemMessage$inboundSchema),
|
|
3013
|
+
z.lazy(() => ListPromptVersionsMessagesUserMessage$inboundSchema),
|
|
3014
|
+
z.lazy(() => ListPromptVersionsMessagesAssistantMessage$inboundSchema),
|
|
3015
|
+
z.lazy(() => ListPromptVersionsMessagesToolMessage$inboundSchema),
|
|
3016
|
+
]);
|
|
3017
|
+
|
|
3018
|
+
export function listPromptVersionsPromptsMessagesFromJSON(
|
|
3019
|
+
jsonString: string,
|
|
3020
|
+
): SafeParseResult<ListPromptVersionsPromptsMessages, SDKValidationError> {
|
|
3021
|
+
return safeParse(
|
|
3022
|
+
jsonString,
|
|
3023
|
+
(x) => ListPromptVersionsPromptsMessages$inboundSchema.parse(JSON.parse(x)),
|
|
3024
|
+
`Failed to parse 'ListPromptVersionsPromptsMessages' from JSON`,
|
|
3025
|
+
);
|
|
3026
|
+
}
|
|
3027
|
+
|
|
3028
|
+
/** @internal */
|
|
3029
|
+
export const ListPromptVersionsPromptField$inboundSchema: z.ZodType<
|
|
3030
|
+
ListPromptVersionsPromptField,
|
|
3031
|
+
z.ZodTypeDef,
|
|
3032
|
+
unknown
|
|
3033
|
+
> = z.object({
|
|
3034
|
+
name: z.string().optional(),
|
|
3035
|
+
audio: z.nullable(z.lazy(() => ListPromptVersionsAudio$inboundSchema))
|
|
3036
|
+
.optional(),
|
|
3037
|
+
frequency_penalty: z.nullable(z.number()).optional(),
|
|
3038
|
+
max_tokens: z.nullable(z.number().int()).optional(),
|
|
3039
|
+
max_completion_tokens: z.nullable(z.number().int()).optional(),
|
|
3040
|
+
logprobs: z.nullable(z.boolean()).optional(),
|
|
3041
|
+
top_logprobs: z.nullable(z.number().int()).optional(),
|
|
3042
|
+
n: z.nullable(z.number().int()).optional(),
|
|
3043
|
+
presence_penalty: z.nullable(z.number()).optional(),
|
|
3044
|
+
response_format: z.union([
|
|
3045
|
+
z.lazy(() => ListPromptVersionsResponseFormatText$inboundSchema),
|
|
3046
|
+
z.lazy(() => ListPromptVersionsResponseFormatJSONObject$inboundSchema),
|
|
3047
|
+
z.lazy(() =>
|
|
3048
|
+
ListPromptVersionsResponseFormatPromptsJSONSchema$inboundSchema
|
|
3049
|
+
),
|
|
3050
|
+
]).optional(),
|
|
3051
|
+
reasoning_effort: ListPromptVersionsReasoningEffort$inboundSchema.optional(),
|
|
3052
|
+
verbosity: z.string().optional(),
|
|
3053
|
+
seed: z.nullable(z.number()).optional(),
|
|
3054
|
+
stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
|
|
3055
|
+
stream_options: z.nullable(
|
|
3056
|
+
z.lazy(() => ListPromptVersionsStreamOptions$inboundSchema),
|
|
3057
|
+
).optional(),
|
|
3058
|
+
thinking: z.union([
|
|
3059
|
+
components.ThinkingConfigDisabledSchema$inboundSchema,
|
|
3060
|
+
components.ThinkingConfigEnabledSchema$inboundSchema,
|
|
3061
|
+
]).optional(),
|
|
3062
|
+
temperature: z.nullable(z.number()).optional(),
|
|
3063
|
+
top_p: z.nullable(z.number()).optional(),
|
|
3064
|
+
top_k: z.nullable(z.number()).optional(),
|
|
3065
|
+
tool_choice: z.union([
|
|
3066
|
+
z.lazy(() => ListPromptVersionsToolChoice2$inboundSchema),
|
|
3067
|
+
ListPromptVersionsToolChoice1$inboundSchema,
|
|
3068
|
+
]).optional(),
|
|
3069
|
+
parallel_tool_calls: z.boolean().optional(),
|
|
3070
|
+
modalities: z.nullable(z.array(ListPromptVersionsModalities$inboundSchema))
|
|
3071
|
+
.optional(),
|
|
3072
|
+
guardrails: z.array(z.lazy(() => ListPromptVersionsGuardrails$inboundSchema))
|
|
3073
|
+
.optional(),
|
|
3074
|
+
fallbacks: z.array(z.lazy(() => ListPromptVersionsFallbacks$inboundSchema))
|
|
3075
|
+
.optional(),
|
|
3076
|
+
retry: z.lazy(() => ListPromptVersionsRetry$inboundSchema).optional(),
|
|
3077
|
+
cache: z.lazy(() => ListPromptVersionsCache$inboundSchema).optional(),
|
|
3078
|
+
load_balancer: z.lazy(() => ListPromptVersionsLoadBalancer1$inboundSchema)
|
|
3079
|
+
.optional(),
|
|
3080
|
+
timeout: z.lazy(() => ListPromptVersionsTimeout$inboundSchema).optional(),
|
|
3081
|
+
messages: z.array(
|
|
3082
|
+
z.union([
|
|
3083
|
+
z.lazy(() => ListPromptVersionsMessagesSystemMessage$inboundSchema),
|
|
3084
|
+
z.lazy(() => ListPromptVersionsMessagesUserMessage$inboundSchema),
|
|
3085
|
+
z.lazy(() => ListPromptVersionsMessagesAssistantMessage$inboundSchema),
|
|
3086
|
+
z.lazy(() => ListPromptVersionsMessagesToolMessage$inboundSchema),
|
|
3087
|
+
]),
|
|
3088
|
+
).optional(),
|
|
3089
|
+
model: z.nullable(z.string()).optional(),
|
|
3090
|
+
version: z.string().optional(),
|
|
3091
|
+
}).transform((v) => {
|
|
3092
|
+
return remap$(v, {
|
|
3093
|
+
"frequency_penalty": "frequencyPenalty",
|
|
3094
|
+
"max_tokens": "maxTokens",
|
|
3095
|
+
"max_completion_tokens": "maxCompletionTokens",
|
|
3096
|
+
"top_logprobs": "topLogprobs",
|
|
3097
|
+
"presence_penalty": "presencePenalty",
|
|
3098
|
+
"response_format": "responseFormat",
|
|
3099
|
+
"reasoning_effort": "reasoningEffort",
|
|
3100
|
+
"stream_options": "streamOptions",
|
|
3101
|
+
"top_p": "topP",
|
|
3102
|
+
"top_k": "topK",
|
|
3103
|
+
"tool_choice": "toolChoice",
|
|
3104
|
+
"parallel_tool_calls": "parallelToolCalls",
|
|
3105
|
+
"load_balancer": "loadBalancer",
|
|
3106
|
+
});
|
|
3107
|
+
});
|
|
3108
|
+
|
|
3109
|
+
export function listPromptVersionsPromptFieldFromJSON(
|
|
3110
|
+
jsonString: string,
|
|
3111
|
+
): SafeParseResult<ListPromptVersionsPromptField, SDKValidationError> {
|
|
3112
|
+
return safeParse(
|
|
3113
|
+
jsonString,
|
|
3114
|
+
(x) => ListPromptVersionsPromptField$inboundSchema.parse(JSON.parse(x)),
|
|
3115
|
+
`Failed to parse 'ListPromptVersionsPromptField' from JSON`,
|
|
3116
|
+
);
|
|
3117
|
+
}
|
|
3118
|
+
|
|
3119
|
+
/** @internal */
|
|
3120
|
+
export const ListPromptVersionsUseCases$inboundSchema: z.ZodNativeEnum<
|
|
3121
|
+
typeof ListPromptVersionsUseCases
|
|
3122
|
+
> = z.nativeEnum(ListPromptVersionsUseCases);
|
|
3123
|
+
|
|
3124
|
+
/** @internal */
|
|
3125
|
+
export const ListPromptVersionsLanguage$inboundSchema: z.ZodNativeEnum<
|
|
3126
|
+
typeof ListPromptVersionsLanguage
|
|
3127
|
+
> = z.nativeEnum(ListPromptVersionsLanguage);
|
|
3128
|
+
|
|
3129
|
+
/** @internal */
|
|
3130
|
+
export const ListPromptVersionsMetadata$inboundSchema: z.ZodType<
|
|
3131
|
+
ListPromptVersionsMetadata,
|
|
3132
|
+
z.ZodTypeDef,
|
|
3133
|
+
unknown
|
|
3134
|
+
> = z.object({
|
|
3135
|
+
use_cases: z.array(ListPromptVersionsUseCases$inboundSchema).optional(),
|
|
3136
|
+
language: z.nullable(ListPromptVersionsLanguage$inboundSchema).optional(),
|
|
3137
|
+
}).transform((v) => {
|
|
3138
|
+
return remap$(v, {
|
|
3139
|
+
"use_cases": "useCases",
|
|
3140
|
+
});
|
|
3141
|
+
});
|
|
3142
|
+
|
|
3143
|
+
export function listPromptVersionsMetadataFromJSON(
|
|
3144
|
+
jsonString: string,
|
|
3145
|
+
): SafeParseResult<ListPromptVersionsMetadata, SDKValidationError> {
|
|
3146
|
+
return safeParse(
|
|
3147
|
+
jsonString,
|
|
3148
|
+
(x) => ListPromptVersionsMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
3149
|
+
`Failed to parse 'ListPromptVersionsMetadata' from JSON`,
|
|
3150
|
+
);
|
|
3151
|
+
}
|
|
3152
|
+
|
|
3153
|
+
/** @internal */
|
|
3154
|
+
export const ListPromptVersionsData$inboundSchema: z.ZodType<
|
|
3155
|
+
ListPromptVersionsData,
|
|
3156
|
+
z.ZodTypeDef,
|
|
3157
|
+
unknown
|
|
3158
|
+
> = z.object({
|
|
3159
|
+
_id: z.string(),
|
|
3160
|
+
created_by_id: z.nullable(z.string()).optional(),
|
|
3161
|
+
updated_by_id: z.nullable(z.string()).optional(),
|
|
3162
|
+
description: z.nullable(z.string()).optional(),
|
|
3163
|
+
prompt_config: z.lazy(() => ListPromptVersionsPromptConfig$inboundSchema)
|
|
3164
|
+
.optional(),
|
|
3165
|
+
prompt: z.lazy(() => ListPromptVersionsPromptField$inboundSchema),
|
|
3166
|
+
metadata: z.lazy(() => ListPromptVersionsMetadata$inboundSchema).optional(),
|
|
3167
|
+
timestamp: z.string(),
|
|
3168
|
+
}).transform((v) => {
|
|
3169
|
+
return remap$(v, {
|
|
3170
|
+
"_id": "id",
|
|
3171
|
+
"created_by_id": "createdById",
|
|
3172
|
+
"updated_by_id": "updatedById",
|
|
3173
|
+
"prompt_config": "promptConfig",
|
|
3174
|
+
});
|
|
3175
|
+
});
|
|
3176
|
+
|
|
3177
|
+
export function listPromptVersionsDataFromJSON(
|
|
3178
|
+
jsonString: string,
|
|
3179
|
+
): SafeParseResult<ListPromptVersionsData, SDKValidationError> {
|
|
3180
|
+
return safeParse(
|
|
3181
|
+
jsonString,
|
|
3182
|
+
(x) => ListPromptVersionsData$inboundSchema.parse(JSON.parse(x)),
|
|
3183
|
+
`Failed to parse 'ListPromptVersionsData' from JSON`,
|
|
3184
|
+
);
|
|
3185
|
+
}
|
|
3186
|
+
|
|
3187
|
+
/** @internal */
|
|
3188
|
+
export const ListPromptVersionsResponseBody$inboundSchema: z.ZodType<
|
|
3189
|
+
ListPromptVersionsResponseBody,
|
|
3190
|
+
z.ZodTypeDef,
|
|
3191
|
+
unknown
|
|
3192
|
+
> = z.object({
|
|
3193
|
+
object: ListPromptVersionsObject$inboundSchema,
|
|
3194
|
+
data: z.array(z.lazy(() => ListPromptVersionsData$inboundSchema)),
|
|
3195
|
+
has_more: z.boolean(),
|
|
3196
|
+
}).transform((v) => {
|
|
3197
|
+
return remap$(v, {
|
|
3198
|
+
"has_more": "hasMore",
|
|
3199
|
+
});
|
|
3200
|
+
});
|
|
3201
|
+
|
|
3202
|
+
export function listPromptVersionsResponseBodyFromJSON(
|
|
3203
|
+
jsonString: string,
|
|
3204
|
+
): SafeParseResult<ListPromptVersionsResponseBody, SDKValidationError> {
|
|
3205
|
+
return safeParse(
|
|
3206
|
+
jsonString,
|
|
3207
|
+
(x) => ListPromptVersionsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
3208
|
+
`Failed to parse 'ListPromptVersionsResponseBody' from JSON`,
|
|
3209
|
+
);
|
|
3210
|
+
}
|