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