@orq-ai/node 4.5.3 → 4.6.0-rc.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/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/lib/config.js.map +1 -1
- package/models/components/partdoneevent.js +1 -1
- package/models/components/reasoningpart.js +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/createidentity.js +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/fileget.js +1 -1
- package/models/operations/filelist.js +1 -1
- package/models/operations/fileupload.js +1 -1
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +16 -16
- 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/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.js +1 -1
- package/models/operations/streamrunagent.js +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.js +16 -16
- package/models/operations/updateidentity.js +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +4 -3
- package/src/lib/config.ts +2 -2
- package/src/models/components/partdoneevent.ts +1 -1
- package/src/models/components/reasoningpart.ts +1 -1
- 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/createidentity.ts +1 -1
- package/src/models/operations/createtool.ts +6 -6
- 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/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +16 -16
- 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/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 +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- 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 +16 -16
- package/src/models/operations/updateidentity.ts +1 -1
- package/src/models/operations/updatetool.ts +7 -7
- package/packages/orq-rc/examples/contactsCreate.example.ts +0 -42
- package/packages/orq-rc/src/core.ts +0 -13
- package/packages/orq-rc/src/funcs/agentsCreate.ts +0 -161
- package/packages/orq-rc/src/funcs/agentsDelete.ts +0 -180
- package/packages/orq-rc/src/funcs/agentsInvoke.ts +0 -177
- package/packages/orq-rc/src/funcs/agentsList.ts +0 -184
- package/packages/orq-rc/src/funcs/agentsPostV2AgentsA2a.ts +0 -178
- package/packages/orq-rc/src/funcs/agentsPostV2AgentsKeyCardRefresh.ts +0 -187
- package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +0 -183
- package/packages/orq-rc/src/funcs/agentsResponsesGet.ts +0 -182
- package/packages/orq-rc/src/funcs/agentsRetrieve.ts +0 -180
- package/packages/orq-rc/src/funcs/agentsRun.ts +0 -162
- package/packages/orq-rc/src/funcs/agentsStream.ts +0 -204
- package/packages/orq-rc/src/funcs/agentsStreamRun.ts +0 -189
- package/packages/orq-rc/src/funcs/agentsUpdate.ts +0 -184
- package/packages/orq-rc/src/funcs/annotationsCreate.ts +0 -171
- package/packages/orq-rc/src/funcs/annotationsDelete.ts +0 -171
- package/packages/orq-rc/src/funcs/chunkingParse.ts +0 -160
- package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -160
- package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -167
- package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -165
- package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -171
- package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -167
- package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -182
- package/packages/orq-rc/src/funcs/datasetsList.ts +0 -167
- package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -174
- package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -175
- package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -181
- package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -176
- package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -179
- package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -168
- package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -176
- package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -176
- package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -168
- package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -186
- package/packages/orq-rc/src/funcs/evalsAll.ts +0 -173
- package/packages/orq-rc/src/funcs/evalsCreate.ts +0 -169
- package/packages/orq-rc/src/funcs/evalsDelete.ts +0 -173
- package/packages/orq-rc/src/funcs/evalsInvoke.ts +0 -181
- package/packages/orq-rc/src/funcs/evalsUpdate.ts +0 -173
- package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +0 -183
- package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -160
- package/packages/orq-rc/src/funcs/filesCreate.ts +0 -198
- package/packages/orq-rc/src/funcs/filesDelete.ts +0 -164
- package/packages/orq-rc/src/funcs/filesGet.ts +0 -166
- package/packages/orq-rc/src/funcs/filesList.ts +0 -167
- package/packages/orq-rc/src/funcs/identitiesCreate.ts +0 -165
- package/packages/orq-rc/src/funcs/identitiesDelete.ts +0 -176
- package/packages/orq-rc/src/funcs/identitiesList.ts +0 -170
- package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +0 -175
- package/packages/orq-rc/src/funcs/identitiesUpdate.ts +0 -176
- package/packages/orq-rc/src/funcs/knowledgeCreate.ts +0 -158
- package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -171
- package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -166
- package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -167
- package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -174
- package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +0 -170
- package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -173
- package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +0 -170
- package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -169
- package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -178
- package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +0 -171
- package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -174
- package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -166
- package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -173
- package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -169
- package/packages/orq-rc/src/funcs/knowledgeSearch.ts +0 -167
- package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -164
- package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -174
- package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -170
- package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +0 -162
- package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +0 -176
- package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +0 -170
- package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +0 -168
- package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +0 -185
- package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +0 -180
- package/packages/orq-rc/src/funcs/memoryStoresList.ts +0 -178
- package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +0 -184
- package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +0 -177
- package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +0 -177
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +0 -179
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +0 -174
- package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +0 -168
- package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +0 -180
- package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +0 -175
- package/packages/orq-rc/src/funcs/modelsList.ts +0 -142
- package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -160
- package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -173
- package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -181
- package/packages/orq-rc/src/funcs/promptsList.ts +0 -167
- package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -173
- package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -166
- package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -173
- package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -161
- package/packages/orq-rc/src/funcs/routerAudioSpeechCreate.ts +0 -161
- package/packages/orq-rc/src/funcs/routerAudioTranscriptionsCreate.ts +0 -273
- package/packages/orq-rc/src/funcs/routerAudioTranslationsCreate.ts +0 -263
- package/packages/orq-rc/src/funcs/routerChatCompletionsCreate.ts +0 -168
- package/packages/orq-rc/src/funcs/routerCompletionsCreate.ts +0 -168
- package/packages/orq-rc/src/funcs/routerEmbeddingsCreate.ts +0 -161
- package/packages/orq-rc/src/funcs/routerImagesEditsCreate.ts +0 -222
- package/packages/orq-rc/src/funcs/routerImagesGenerationsCreate.ts +0 -160
- package/packages/orq-rc/src/funcs/routerImagesVariationsCreate.ts +0 -218
- package/packages/orq-rc/src/funcs/routerModerationsCreate.ts +0 -167
- package/packages/orq-rc/src/funcs/routerOcr.ts +0 -158
- package/packages/orq-rc/src/funcs/routerRerankCreate.ts +0 -160
- package/packages/orq-rc/src/funcs/routerResponsesCreate.ts +0 -167
- package/packages/orq-rc/src/funcs/toolsCreate.ts +0 -163
- package/packages/orq-rc/src/funcs/toolsDelete.ts +0 -167
- package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersions.ts +0 -183
- package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +0 -190
- package/packages/orq-rc/src/funcs/toolsList.ts +0 -176
- package/packages/orq-rc/src/funcs/toolsRetrieve.ts +0 -166
- package/packages/orq-rc/src/funcs/toolsUpdate.ts +0 -176
- package/packages/orq-rc/src/hooks/global.ts +0 -44
- package/packages/orq-rc/src/hooks/hooks.ts +0 -132
- package/packages/orq-rc/src/hooks/index.ts +0 -6
- package/packages/orq-rc/src/hooks/registration.ts +0 -15
- package/packages/orq-rc/src/hooks/types.ts +0 -112
- package/packages/orq-rc/src/index.ts +0 -9
- package/packages/orq-rc/src/lib/base64.ts +0 -37
- package/packages/orq-rc/src/lib/config.ts +0 -74
- package/packages/orq-rc/src/lib/dlv.ts +0 -53
- package/packages/orq-rc/src/lib/encodings.ts +0 -497
- package/packages/orq-rc/src/lib/env.ts +0 -89
- package/packages/orq-rc/src/lib/event-streams.ts +0 -161
- package/packages/orq-rc/src/lib/files.ts +0 -82
- package/packages/orq-rc/src/lib/http.ts +0 -323
- package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
- package/packages/orq-rc/src/lib/logger.ts +0 -9
- package/packages/orq-rc/src/lib/matchers.ts +0 -346
- package/packages/orq-rc/src/lib/primitives.ts +0 -150
- package/packages/orq-rc/src/lib/retries.ts +0 -218
- package/packages/orq-rc/src/lib/schemas.ts +0 -91
- package/packages/orq-rc/src/lib/sdks.ts +0 -407
- package/packages/orq-rc/src/lib/security.ts +0 -263
- package/packages/orq-rc/src/lib/url.ts +0 -33
- package/packages/orq-rc/src/models/components/actionreviewedstreamingevent.ts +0 -99
- package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +0 -185
- package/packages/orq-rc/src/models/components/agenterroredstreamingevent.ts +0 -73
- package/packages/orq-rc/src/models/components/agentexecutionstartedstreamingevent.ts +0 -91
- package/packages/orq-rc/src/models/components/agenthandedoffstreamingevent.ts +0 -71
- package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +0 -507
- package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +0 -165
- package/packages/orq-rc/src/models/components/agentresponsemessage.ts +0 -103
- package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +0 -517
- package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +0 -807
- package/packages/orq-rc/src/models/components/audiocontentpartschema.ts +0 -136
- package/packages/orq-rc/src/models/components/createagentresponse.ts +0 -305
- package/packages/orq-rc/src/models/components/datapart.ts +0 -38
- package/packages/orq-rc/src/models/components/errorpart.ts +0 -58
- package/packages/orq-rc/src/models/components/errorstreamingevent.ts +0 -66
- package/packages/orq-rc/src/models/components/executionnamedstreamingevent.ts +0 -71
- package/packages/orq-rc/src/models/components/executionreviewedstreamingevent.ts +0 -61
- package/packages/orq-rc/src/models/components/executionreviewrequiredstreamingevent.ts +0 -67
- package/packages/orq-rc/src/models/components/extendedmessage.ts +0 -146
- package/packages/orq-rc/src/models/components/filecontentpartschema.ts +0 -87
- package/packages/orq-rc/src/models/components/filepart.ts +0 -218
- package/packages/orq-rc/src/models/components/getagentresponse.ts +0 -348
- package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +0 -268
- package/packages/orq-rc/src/models/components/index.ts +0 -59
- package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +0 -3450
- package/packages/orq-rc/src/models/components/partdelta.ts +0 -39
- package/packages/orq-rc/src/models/components/partdeltaevent.ts +0 -73
- package/packages/orq-rc/src/models/components/partdoneevent.ts +0 -139
- package/packages/orq-rc/src/models/components/publiccontact.ts +0 -71
- package/packages/orq-rc/src/models/components/publicidentity.ts +0 -69
- package/packages/orq-rc/src/models/components/reasoningpart.ts +0 -62
- package/packages/orq-rc/src/models/components/reasoningpartschema.ts +0 -71
- package/packages/orq-rc/src/models/components/redactedreasoningpartschema.ts +0 -66
- package/packages/orq-rc/src/models/components/refusalpartschema.ts +0 -64
- package/packages/orq-rc/src/models/components/responsedoneevent.ts +0 -324
- package/packages/orq-rc/src/models/components/responsefailedevent.ts +0 -72
- package/packages/orq-rc/src/models/components/responsestartedevent.ts +0 -97
- package/packages/orq-rc/src/models/components/responsestreamingevent.ts +0 -85
- package/packages/orq-rc/src/models/components/reviewoutcome.ts +0 -23
- package/packages/orq-rc/src/models/components/security.ts +0 -32
- package/packages/orq-rc/src/models/components/telemetry.ts +0 -48
- package/packages/orq-rc/src/models/components/textcontentpartschema.ts +0 -207
- package/packages/orq-rc/src/models/components/textpart.ts +0 -54
- package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +0 -59
- package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +0 -106
- package/packages/orq-rc/src/models/components/timeoutstreamingevent.ts +0 -64
- package/packages/orq-rc/src/models/components/toolcallpart.ts +0 -51
- package/packages/orq-rc/src/models/components/tooldoneevent.ts +0 -77
- package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +0 -230
- package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +0 -214
- package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +0 -200
- package/packages/orq-rc/src/models/components/toolfailedevent.ts +0 -77
- package/packages/orq-rc/src/models/components/toolresultpart.ts +0 -71
- package/packages/orq-rc/src/models/components/toolreviewdoneevent.ts +0 -78
- package/packages/orq-rc/src/models/components/toolreviewrequestedevent.ts +0 -87
- package/packages/orq-rc/src/models/components/toolstartedevent.ts +0 -82
- package/packages/orq-rc/src/models/errors/apierror.ts +0 -40
- package/packages/orq-rc/src/models/errors/createeval.ts +0 -51
- package/packages/orq-rc/src/models/errors/createmoderation.ts +0 -84
- package/packages/orq-rc/src/models/errors/createtranscription.ts +0 -87
- package/packages/orq-rc/src/models/errors/createtranslation.ts +0 -87
- package/packages/orq-rc/src/models/errors/deleteagent.ts +0 -51
- package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -51
- package/packages/orq-rc/src/models/errors/deleteidentity.ts +0 -62
- package/packages/orq-rc/src/models/errors/deleteprompt.ts +0 -51
- package/packages/orq-rc/src/models/errors/getevals.ts +0 -51
- package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -51
- package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +0 -51
- package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +0 -51
- package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +0 -52
- package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -59
- package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
- package/packages/orq-rc/src/models/errors/index.ts +0 -35
- package/packages/orq-rc/src/models/errors/invokeeval.ts +0 -141
- package/packages/orq-rc/src/models/errors/orqerror.ts +0 -35
- package/packages/orq-rc/src/models/errors/postv2agentsa2a.ts +0 -96
- package/packages/orq-rc/src/models/errors/postv2agentskeycardrefresh.ts +0 -97
- package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +0 -50
- package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +0 -51
- package/packages/orq-rc/src/models/errors/retrieveidentity.ts +0 -62
- package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -109
- package/packages/orq-rc/src/models/errors/streamagent.ts +0 -51
- package/packages/orq-rc/src/models/errors/streamrunagent.ts +0 -51
- package/packages/orq-rc/src/models/errors/updateagent.ts +0 -51
- package/packages/orq-rc/src/models/errors/updateeval.ts +0 -51
- package/packages/orq-rc/src/models/errors/updateidentity.ts +0 -54
- package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -51
- package/packages/orq-rc/src/models/errors/updatetool.ts +0 -62
- package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -39
- package/packages/orq-rc/src/models/operations/createagentrequest.ts +0 -6393
- package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +0 -644
- package/packages/orq-rc/src/models/operations/createannotation.ts +0 -166
- package/packages/orq-rc/src/models/operations/createchatcompletion.ts +0 -6392
- package/packages/orq-rc/src/models/operations/createchunk.ts +0 -222
- package/packages/orq-rc/src/models/operations/createcompletion.ts +0 -3418
- package/packages/orq-rc/src/models/operations/createcontact.ts +0 -156
- package/packages/orq-rc/src/models/operations/createdataset.ts +0 -162
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -2551
- package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -437
- package/packages/orq-rc/src/models/operations/createembedding.ts +0 -947
- package/packages/orq-rc/src/models/operations/createeval.ts +0 -4170
- package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -144
- package/packages/orq-rc/src/models/operations/createidentity.ts +0 -162
- package/packages/orq-rc/src/models/operations/createimage.ts +0 -1028
- package/packages/orq-rc/src/models/operations/createimageedit.ts +0 -1045
- package/packages/orq-rc/src/models/operations/createimagevariation.ts +0 -1067
- package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -944
- package/packages/orq-rc/src/models/operations/creatememory.ts +0 -142
- package/packages/orq-rc/src/models/operations/creatememorydocument.ts +0 -152
- package/packages/orq-rc/src/models/operations/creatememorystore.ts +0 -199
- package/packages/orq-rc/src/models/operations/createmoderation.ts +0 -664
- package/packages/orq-rc/src/models/operations/createprompt.ts +0 -5391
- package/packages/orq-rc/src/models/operations/creatererank.ts +0 -890
- package/packages/orq-rc/src/models/operations/createresponse.ts +0 -3325
- package/packages/orq-rc/src/models/operations/createspeech.ts +0 -700
- package/packages/orq-rc/src/models/operations/createtool.ts +0 -2499
- package/packages/orq-rc/src/models/operations/createtranscription.ts +0 -955
- package/packages/orq-rc/src/models/operations/createtranslation.ts +0 -930
- package/packages/orq-rc/src/models/operations/deleteagent.ts +0 -39
- package/packages/orq-rc/src/models/operations/deleteannotation.ts +0 -79
- package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -53
- package/packages/orq-rc/src/models/operations/deletechunks.ts +0 -125
- package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -46
- package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -39
- package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -46
- package/packages/orq-rc/src/models/operations/deleteeval.ts +0 -31
- package/packages/orq-rc/src/models/operations/deleteidentity.ts +0 -34
- package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -39
- package/packages/orq-rc/src/models/operations/deletememory.ts +0 -46
- package/packages/orq-rc/src/models/operations/deletememorydocument.ts +0 -55
- package/packages/orq-rc/src/models/operations/deletememorystore.ts +0 -39
- package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -34
- package/packages/orq-rc/src/models/operations/deletetool.ts +0 -36
- package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -2370
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -4525
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -729
- package/packages/orq-rc/src/models/operations/deployments.ts +0 -1269
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -4653
- package/packages/orq-rc/src/models/operations/filedelete.ts +0 -39
- package/packages/orq-rc/src/models/operations/fileget.ts +0 -116
- package/packages/orq-rc/src/models/operations/filelist.ts +0 -172
- package/packages/orq-rc/src/models/operations/fileupload.ts +0 -170
- package/packages/orq-rc/src/models/operations/getagentresponse.ts +0 -46
- package/packages/orq-rc/src/models/operations/getallmemories.ts +0 -173
- package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +0 -188
- package/packages/orq-rc/src/models/operations/getallmemorystores.ts +0 -200
- package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -3165
- package/packages/orq-rc/src/models/operations/getalltools.ts +0 -1398
- package/packages/orq-rc/src/models/operations/getchunkscount.ts +0 -121
- package/packages/orq-rc/src/models/operations/getevals.ts +0 -2842
- package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -171
- package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -652
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -3090
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -3135
- package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +0 -162
- package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +0 -163
- package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +0 -110
- package/packages/orq-rc/src/models/operations/index.ts +0 -116
- package/packages/orq-rc/src/models/operations/invokeagent.ts +0 -777
- package/packages/orq-rc/src/models/operations/invokeeval.ts +0 -1253
- package/packages/orq-rc/src/models/operations/listagents.ts +0 -2754
- package/packages/orq-rc/src/models/operations/listchunks.ts +0 -260
- package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +0 -263
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -1498
- package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -205
- package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -235
- package/packages/orq-rc/src/models/operations/listidentities.ts +0 -275
- package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -642
- package/packages/orq-rc/src/models/operations/listmodels.ts +0 -143
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -3210
- package/packages/orq-rc/src/models/operations/parse.ts +0 -777
- package/packages/orq-rc/src/models/operations/postv2agentsa2a.ts +0 -252
- package/packages/orq-rc/src/models/operations/postv2agentskeycardrefresh.ts +0 -100
- package/packages/orq-rc/src/models/operations/postv2routerocr.ts +0 -478
- package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -108
- package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +0 -2814
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -1402
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -150
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -152
- package/packages/orq-rc/src/models/operations/retrieveidentity.ts +0 -117
- package/packages/orq-rc/src/models/operations/retrievememory.ts +0 -112
- package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +0 -118
- package/packages/orq-rc/src/models/operations/retrievememorystore.ts +0 -144
- package/packages/orq-rc/src/models/operations/retrievetool.ts +0 -1379
- package/packages/orq-rc/src/models/operations/runagent.ts +0 -4927
- package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -1762
- package/packages/orq-rc/src/models/operations/streamagent.ts +0 -668
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +0 -5089
- package/packages/orq-rc/src/models/operations/updateagent.ts +0 -6824
- package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -236
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -2555
- package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -206
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -186
- package/packages/orq-rc/src/models/operations/updateeval.ts +0 -4152
- package/packages/orq-rc/src/models/operations/updateidentity.ts +0 -189
- package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -1231
- package/packages/orq-rc/src/models/operations/updatememory.ts +0 -142
- package/packages/orq-rc/src/models/operations/updatememorydocument.ts +0 -159
- package/packages/orq-rc/src/models/operations/updatememorystore.ts +0 -188
- package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -5473
- package/packages/orq-rc/src/models/operations/updatetool.ts +0 -2810
- package/packages/orq-rc/src/sdk/agents.ts +0 -234
- package/packages/orq-rc/src/sdk/annotations.ts +0 -39
- package/packages/orq-rc/src/sdk/audio.ts +0 -25
- package/packages/orq-rc/src/sdk/chat.ts +0 -13
- package/packages/orq-rc/src/sdk/chunking.ts +0 -27
- package/packages/orq-rc/src/sdk/completions.ts +0 -32
- package/packages/orq-rc/src/sdk/contacts.ts +0 -27
- package/packages/orq-rc/src/sdk/datasets.ts +0 -204
- package/packages/orq-rc/src/sdk/deployments.ts +0 -89
- package/packages/orq-rc/src/sdk/edits.ts +0 -27
- package/packages/orq-rc/src/sdk/embeddings.ts +0 -27
- package/packages/orq-rc/src/sdk/evals.ts +0 -84
- package/packages/orq-rc/src/sdk/evaluators.ts +0 -27
- package/packages/orq-rc/src/sdk/feedback.ts +0 -27
- package/packages/orq-rc/src/sdk/files.ts +0 -78
- package/packages/orq-rc/src/sdk/generations.ts +0 -27
- package/packages/orq-rc/src/sdk/identities.ts +0 -99
- package/packages/orq-rc/src/sdk/images.ts +0 -25
- package/packages/orq-rc/src/sdk/index.ts +0 -5
- package/packages/orq-rc/src/sdk/knowledge.ts +0 -309
- package/packages/orq-rc/src/sdk/memorystores.ts +0 -286
- package/packages/orq-rc/src/sdk/metrics.ts +0 -27
- package/packages/orq-rc/src/sdk/models.ts +0 -25
- package/packages/orq-rc/src/sdk/moderations.ts +0 -24
- package/packages/orq-rc/src/sdk/orqcompletions.ts +0 -32
- package/packages/orq-rc/src/sdk/orqresponses.ts +0 -32
- package/packages/orq-rc/src/sdk/prompts.ts +0 -126
- package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
- package/packages/orq-rc/src/sdk/rerank.ts +0 -27
- package/packages/orq-rc/src/sdk/responses.ts +0 -53
- package/packages/orq-rc/src/sdk/router.ts +0 -72
- package/packages/orq-rc/src/sdk/sdk.ts +0 -115
- package/packages/orq-rc/src/sdk/speech.ts +0 -27
- package/packages/orq-rc/src/sdk/tools.ts +0 -135
- package/packages/orq-rc/src/sdk/transcriptions.ts +0 -24
- package/packages/orq-rc/src/sdk/translations.ts +0 -24
- package/packages/orq-rc/src/sdk/variations.ts +0 -27
- package/packages/orq-rc/src/types/async.ts +0 -68
- package/packages/orq-rc/src/types/blobs.ts +0 -32
- package/packages/orq-rc/src/types/constdatetime.ts +0 -15
- package/packages/orq-rc/src/types/enums.ts +0 -45
- package/packages/orq-rc/src/types/fp.ts +0 -50
- package/packages/orq-rc/src/types/index.ts +0 -11
- package/packages/orq-rc/src/types/operations.ts +0 -105
- package/packages/orq-rc/src/types/rfcdate.ts +0 -54
- package/packages/orq-rc/src/types/streams.ts +0 -21
- package/packages/orq-rc/src/types/unrecognized.ts +0 -35
|
@@ -1,4170 +0,0 @@
|
|
|
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
-
|
|
12
|
-
export const CreateEvalGuardrailConfigOperator = {
|
|
13
|
-
Eq: "eq",
|
|
14
|
-
Ne: "ne",
|
|
15
|
-
Gt: "gt",
|
|
16
|
-
Gte: "gte",
|
|
17
|
-
Lt: "lt",
|
|
18
|
-
Lte: "lte",
|
|
19
|
-
} as const;
|
|
20
|
-
export type CreateEvalGuardrailConfigOperator = ClosedEnum<
|
|
21
|
-
typeof CreateEvalGuardrailConfigOperator
|
|
22
|
-
>;
|
|
23
|
-
|
|
24
|
-
export type CreateEvalGuardrailConfigNumber = {
|
|
25
|
-
enabled: boolean;
|
|
26
|
-
alertOnFailure?: boolean | undefined;
|
|
27
|
-
type: "number";
|
|
28
|
-
value: number;
|
|
29
|
-
operator: CreateEvalGuardrailConfigOperator;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export type CreateEvalGuardrailConfigBoolean = {
|
|
33
|
-
enabled: boolean;
|
|
34
|
-
alertOnFailure?: boolean | undefined;
|
|
35
|
-
type: "boolean";
|
|
36
|
-
value: boolean;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export type CreateEvalRequestBodyGuardrailConfig =
|
|
40
|
-
| CreateEvalGuardrailConfigBoolean
|
|
41
|
-
| CreateEvalGuardrailConfigNumber;
|
|
42
|
-
|
|
43
|
-
export const CreateEvalRequestBodyOutputType = {
|
|
44
|
-
Boolean: "boolean",
|
|
45
|
-
Number: "number",
|
|
46
|
-
} as const;
|
|
47
|
-
export type CreateEvalRequestBodyOutputType = ClosedEnum<
|
|
48
|
-
typeof CreateEvalRequestBodyOutputType
|
|
49
|
-
>;
|
|
50
|
-
|
|
51
|
-
export const CreateEvalRequestBodyType = {
|
|
52
|
-
PythonEval: "python_eval",
|
|
53
|
-
} as const;
|
|
54
|
-
export type CreateEvalRequestBodyType = ClosedEnum<
|
|
55
|
-
typeof CreateEvalRequestBodyType
|
|
56
|
-
>;
|
|
57
|
-
|
|
58
|
-
export type Python = {
|
|
59
|
-
guardrailConfig?:
|
|
60
|
-
| CreateEvalGuardrailConfigBoolean
|
|
61
|
-
| CreateEvalGuardrailConfigNumber
|
|
62
|
-
| undefined;
|
|
63
|
-
outputType?: CreateEvalRequestBodyOutputType | undefined;
|
|
64
|
-
code: string;
|
|
65
|
-
type: CreateEvalRequestBodyType;
|
|
66
|
-
/**
|
|
67
|
-
* Entity storage path in the format: `project/folder/subfolder/...`
|
|
68
|
-
*
|
|
69
|
-
* @remarks
|
|
70
|
-
*
|
|
71
|
-
* The first element identifies the project, followed by nested folders (auto-created as needed).
|
|
72
|
-
*
|
|
73
|
-
* With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
|
|
74
|
-
*/
|
|
75
|
-
path: string;
|
|
76
|
-
description?: string | undefined;
|
|
77
|
-
key: string;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export const GuardrailConfigOperator = {
|
|
81
|
-
Eq: "eq",
|
|
82
|
-
Ne: "ne",
|
|
83
|
-
Gt: "gt",
|
|
84
|
-
Gte: "gte",
|
|
85
|
-
Lt: "lt",
|
|
86
|
-
Lte: "lte",
|
|
87
|
-
} as const;
|
|
88
|
-
export type GuardrailConfigOperator = ClosedEnum<
|
|
89
|
-
typeof GuardrailConfigOperator
|
|
90
|
-
>;
|
|
91
|
-
|
|
92
|
-
export type GuardrailConfigNumber = {
|
|
93
|
-
enabled: boolean;
|
|
94
|
-
alertOnFailure?: boolean | undefined;
|
|
95
|
-
type: "number";
|
|
96
|
-
value: number;
|
|
97
|
-
operator: GuardrailConfigOperator;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export type GuardrailConfigBoolean = {
|
|
101
|
-
enabled: boolean;
|
|
102
|
-
alertOnFailure?: boolean | undefined;
|
|
103
|
-
type: "boolean";
|
|
104
|
-
value: boolean;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
export type RequestBodyGuardrailConfig =
|
|
108
|
-
| GuardrailConfigBoolean
|
|
109
|
-
| GuardrailConfigNumber;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* The type of output expected from the evaluator
|
|
113
|
-
*/
|
|
114
|
-
export const RequestBodyOutputType = {
|
|
115
|
-
Boolean: "boolean",
|
|
116
|
-
Categorical: "categorical",
|
|
117
|
-
Number: "number",
|
|
118
|
-
String: "string",
|
|
119
|
-
} as const;
|
|
120
|
-
/**
|
|
121
|
-
* The type of output expected from the evaluator
|
|
122
|
-
*/
|
|
123
|
-
export type RequestBodyOutputType = ClosedEnum<typeof RequestBodyOutputType>;
|
|
124
|
-
|
|
125
|
-
export const RequestBodyType = {
|
|
126
|
-
HttpEval: "http_eval",
|
|
127
|
-
} as const;
|
|
128
|
-
export type RequestBodyType = ClosedEnum<typeof RequestBodyType>;
|
|
129
|
-
|
|
130
|
-
export const CreateEvalRequestBodyMethod = {
|
|
131
|
-
Get: "GET",
|
|
132
|
-
Post: "POST",
|
|
133
|
-
} as const;
|
|
134
|
-
export type CreateEvalRequestBodyMethod = ClosedEnum<
|
|
135
|
-
typeof CreateEvalRequestBodyMethod
|
|
136
|
-
>;
|
|
137
|
-
|
|
138
|
-
export type CreateEvalRequestBodyHTTP = {
|
|
139
|
-
guardrailConfig?: GuardrailConfigBoolean | GuardrailConfigNumber | undefined;
|
|
140
|
-
/**
|
|
141
|
-
* The type of output expected from the evaluator
|
|
142
|
-
*/
|
|
143
|
-
outputType?: RequestBodyOutputType | undefined;
|
|
144
|
-
type: RequestBodyType;
|
|
145
|
-
url: string;
|
|
146
|
-
method: CreateEvalRequestBodyMethod;
|
|
147
|
-
headers: { [k: string]: string };
|
|
148
|
-
payload: { [k: string]: any };
|
|
149
|
-
/**
|
|
150
|
-
* Entity storage path in the format: `project/folder/subfolder/...`
|
|
151
|
-
*
|
|
152
|
-
* @remarks
|
|
153
|
-
*
|
|
154
|
-
* The first element identifies the project, followed by nested folders (auto-created as needed).
|
|
155
|
-
*
|
|
156
|
-
* With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
|
|
157
|
-
*/
|
|
158
|
-
path: string;
|
|
159
|
-
description?: string | undefined;
|
|
160
|
-
key: string;
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
export const Operator = {
|
|
164
|
-
Eq: "eq",
|
|
165
|
-
Ne: "ne",
|
|
166
|
-
Gt: "gt",
|
|
167
|
-
Gte: "gte",
|
|
168
|
-
Lt: "lt",
|
|
169
|
-
Lte: "lte",
|
|
170
|
-
} as const;
|
|
171
|
-
export type Operator = ClosedEnum<typeof Operator>;
|
|
172
|
-
|
|
173
|
-
export type NumberT = {
|
|
174
|
-
enabled: boolean;
|
|
175
|
-
alertOnFailure?: boolean | undefined;
|
|
176
|
-
type: "number";
|
|
177
|
-
value: number;
|
|
178
|
-
operator: Operator;
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
export type Boolean = {
|
|
182
|
-
enabled: boolean;
|
|
183
|
-
alertOnFailure?: boolean | undefined;
|
|
184
|
-
type: "boolean";
|
|
185
|
-
value: boolean;
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
export type GuardrailConfig = Boolean | NumberT;
|
|
189
|
-
|
|
190
|
-
export const OutputType = {
|
|
191
|
-
Boolean: "boolean",
|
|
192
|
-
} as const;
|
|
193
|
-
export type OutputType = ClosedEnum<typeof OutputType>;
|
|
194
|
-
|
|
195
|
-
export const CreateEvalRequestBodyEvalsType = {
|
|
196
|
-
JsonSchema: "json_schema",
|
|
197
|
-
} as const;
|
|
198
|
-
export type CreateEvalRequestBodyEvalsType = ClosedEnum<
|
|
199
|
-
typeof CreateEvalRequestBodyEvalsType
|
|
200
|
-
>;
|
|
201
|
-
|
|
202
|
-
export type Json = {
|
|
203
|
-
guardrailConfig?: Boolean | NumberT | undefined;
|
|
204
|
-
outputType?: OutputType | undefined;
|
|
205
|
-
type: CreateEvalRequestBodyEvalsType;
|
|
206
|
-
schema: string;
|
|
207
|
-
/**
|
|
208
|
-
* Entity storage path in the format: `project/folder/subfolder/...`
|
|
209
|
-
*
|
|
210
|
-
* @remarks
|
|
211
|
-
*
|
|
212
|
-
* The first element identifies the project, followed by nested folders (auto-created as needed).
|
|
213
|
-
*
|
|
214
|
-
* With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
|
|
215
|
-
*/
|
|
216
|
-
path: string;
|
|
217
|
-
description?: string | undefined;
|
|
218
|
-
key: string;
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
export const CreateEvalGuardrailConfigEvalsOperator = {
|
|
222
|
-
Eq: "eq",
|
|
223
|
-
Ne: "ne",
|
|
224
|
-
Gt: "gt",
|
|
225
|
-
Gte: "gte",
|
|
226
|
-
Lt: "lt",
|
|
227
|
-
Lte: "lte",
|
|
228
|
-
} as const;
|
|
229
|
-
export type CreateEvalGuardrailConfigEvalsOperator = ClosedEnum<
|
|
230
|
-
typeof CreateEvalGuardrailConfigEvalsOperator
|
|
231
|
-
>;
|
|
232
|
-
|
|
233
|
-
export type CreateEvalGuardrailConfigEvalsNumber = {
|
|
234
|
-
enabled: boolean;
|
|
235
|
-
alertOnFailure?: boolean | undefined;
|
|
236
|
-
type: "number";
|
|
237
|
-
value: number;
|
|
238
|
-
operator: CreateEvalGuardrailConfigEvalsOperator;
|
|
239
|
-
};
|
|
240
|
-
|
|
241
|
-
export type CreateEvalGuardrailConfigEvalsBoolean = {
|
|
242
|
-
enabled: boolean;
|
|
243
|
-
alertOnFailure?: boolean | undefined;
|
|
244
|
-
type: "boolean";
|
|
245
|
-
value: boolean;
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
export type LLMGuardrailConfig =
|
|
249
|
-
| CreateEvalGuardrailConfigEvalsBoolean
|
|
250
|
-
| CreateEvalGuardrailConfigEvalsNumber;
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* The type of output expected from the evaluator
|
|
254
|
-
*/
|
|
255
|
-
export const LLMOutputType = {
|
|
256
|
-
Boolean: "boolean",
|
|
257
|
-
Categorical: "categorical",
|
|
258
|
-
Number: "number",
|
|
259
|
-
String: "string",
|
|
260
|
-
} as const;
|
|
261
|
-
/**
|
|
262
|
-
* The type of output expected from the evaluator
|
|
263
|
-
*/
|
|
264
|
-
export type LLMOutputType = ClosedEnum<typeof LLMOutputType>;
|
|
265
|
-
|
|
266
|
-
export const LLMType = {
|
|
267
|
-
LlmEval: "llm_eval",
|
|
268
|
-
} as const;
|
|
269
|
-
export type LLMType = ClosedEnum<typeof LLMType>;
|
|
270
|
-
|
|
271
|
-
export type CreateEvalLLMRetry = {
|
|
272
|
-
count?: number | undefined;
|
|
273
|
-
onCodes?: Array<number> | undefined;
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
export type CreateEvalLLMFallbacks = {
|
|
277
|
-
model: string;
|
|
278
|
-
};
|
|
279
|
-
|
|
280
|
-
export type LLMJudges = {
|
|
281
|
-
model: string;
|
|
282
|
-
retry?: CreateEvalLLMRetry | undefined;
|
|
283
|
-
fallbacks?: Array<CreateEvalLLMFallbacks> | undefined;
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
export type LLMRetry = {
|
|
287
|
-
count?: number | undefined;
|
|
288
|
-
onCodes?: Array<number> | undefined;
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
export type LLMFallbacks = {
|
|
292
|
-
model: string;
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
export type LLMReplacementJudges = {
|
|
296
|
-
model: string;
|
|
297
|
-
retry?: LLMRetry | undefined;
|
|
298
|
-
fallbacks?: Array<LLMFallbacks> | undefined;
|
|
299
|
-
};
|
|
300
|
-
|
|
301
|
-
export const LLMTieValue = {
|
|
302
|
-
Tie: "Tie",
|
|
303
|
-
} as const;
|
|
304
|
-
export type LLMTieValue = ClosedEnum<typeof LLMTieValue>;
|
|
305
|
-
|
|
306
|
-
export type LLMJury = {
|
|
307
|
-
judges: Array<LLMJudges>;
|
|
308
|
-
replacementJudges?: Array<LLMReplacementJudges> | undefined;
|
|
309
|
-
minSuccessfulJudges?: number | undefined;
|
|
310
|
-
tieValue?: LLMTieValue | undefined;
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
export type Llm2 = {
|
|
314
|
-
guardrailConfig?:
|
|
315
|
-
| CreateEvalGuardrailConfigEvalsBoolean
|
|
316
|
-
| CreateEvalGuardrailConfigEvalsNumber
|
|
317
|
-
| undefined;
|
|
318
|
-
/**
|
|
319
|
-
* The type of output expected from the evaluator
|
|
320
|
-
*/
|
|
321
|
-
outputType?: LLMOutputType | undefined;
|
|
322
|
-
type: LLMType;
|
|
323
|
-
repetitions?: number | undefined;
|
|
324
|
-
prompt: string;
|
|
325
|
-
/**
|
|
326
|
-
* Entity storage path in the format: `project/folder/subfolder/...`
|
|
327
|
-
*
|
|
328
|
-
* @remarks
|
|
329
|
-
*
|
|
330
|
-
* The first element identifies the project, followed by nested folders (auto-created as needed).
|
|
331
|
-
*
|
|
332
|
-
* With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
|
|
333
|
-
*/
|
|
334
|
-
path: string;
|
|
335
|
-
description?: string | undefined;
|
|
336
|
-
key: string;
|
|
337
|
-
mode: "jury";
|
|
338
|
-
jury: LLMJury;
|
|
339
|
-
};
|
|
340
|
-
|
|
341
|
-
export const CreateEvalGuardrailConfigEvalsRequestOperator = {
|
|
342
|
-
Eq: "eq",
|
|
343
|
-
Ne: "ne",
|
|
344
|
-
Gt: "gt",
|
|
345
|
-
Gte: "gte",
|
|
346
|
-
Lt: "lt",
|
|
347
|
-
Lte: "lte",
|
|
348
|
-
} as const;
|
|
349
|
-
export type CreateEvalGuardrailConfigEvalsRequestOperator = ClosedEnum<
|
|
350
|
-
typeof CreateEvalGuardrailConfigEvalsRequestOperator
|
|
351
|
-
>;
|
|
352
|
-
|
|
353
|
-
export type CreateEvalGuardrailConfigEvalsRequestNumber = {
|
|
354
|
-
enabled: boolean;
|
|
355
|
-
alertOnFailure?: boolean | undefined;
|
|
356
|
-
type: "number";
|
|
357
|
-
value: number;
|
|
358
|
-
operator: CreateEvalGuardrailConfigEvalsRequestOperator;
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
export type CreateEvalGuardrailConfigEvalsRequestBoolean = {
|
|
362
|
-
enabled: boolean;
|
|
363
|
-
alertOnFailure?: boolean | undefined;
|
|
364
|
-
type: "boolean";
|
|
365
|
-
value: boolean;
|
|
366
|
-
};
|
|
367
|
-
|
|
368
|
-
export type CreateEvalLLMGuardrailConfig =
|
|
369
|
-
| CreateEvalGuardrailConfigEvalsRequestBoolean
|
|
370
|
-
| CreateEvalGuardrailConfigEvalsRequestNumber;
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* The type of output expected from the evaluator
|
|
374
|
-
*/
|
|
375
|
-
export const CreateEvalLLMOutputType = {
|
|
376
|
-
Boolean: "boolean",
|
|
377
|
-
Categorical: "categorical",
|
|
378
|
-
Number: "number",
|
|
379
|
-
String: "string",
|
|
380
|
-
} as const;
|
|
381
|
-
/**
|
|
382
|
-
* The type of output expected from the evaluator
|
|
383
|
-
*/
|
|
384
|
-
export type CreateEvalLLMOutputType = ClosedEnum<
|
|
385
|
-
typeof CreateEvalLLMOutputType
|
|
386
|
-
>;
|
|
387
|
-
|
|
388
|
-
export const CreateEvalLLMType = {
|
|
389
|
-
LlmEval: "llm_eval",
|
|
390
|
-
} as const;
|
|
391
|
-
export type CreateEvalLLMType = ClosedEnum<typeof CreateEvalLLMType>;
|
|
392
|
-
|
|
393
|
-
export type Llm1 = {
|
|
394
|
-
guardrailConfig?:
|
|
395
|
-
| CreateEvalGuardrailConfigEvalsRequestBoolean
|
|
396
|
-
| CreateEvalGuardrailConfigEvalsRequestNumber
|
|
397
|
-
| undefined;
|
|
398
|
-
/**
|
|
399
|
-
* The type of output expected from the evaluator
|
|
400
|
-
*/
|
|
401
|
-
outputType?: CreateEvalLLMOutputType | undefined;
|
|
402
|
-
type: CreateEvalLLMType;
|
|
403
|
-
repetitions?: number | undefined;
|
|
404
|
-
prompt: string;
|
|
405
|
-
/**
|
|
406
|
-
* Entity storage path in the format: `project/folder/subfolder/...`
|
|
407
|
-
*
|
|
408
|
-
* @remarks
|
|
409
|
-
*
|
|
410
|
-
* The first element identifies the project, followed by nested folders (auto-created as needed).
|
|
411
|
-
*
|
|
412
|
-
* With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
|
|
413
|
-
*/
|
|
414
|
-
path: string;
|
|
415
|
-
description?: string | undefined;
|
|
416
|
-
key: string;
|
|
417
|
-
mode: "single";
|
|
418
|
-
model: string;
|
|
419
|
-
};
|
|
420
|
-
|
|
421
|
-
export type Llm = Llm1 | Llm2;
|
|
422
|
-
|
|
423
|
-
export type CreateEvalRequestBody =
|
|
424
|
-
| CreateEvalRequestBodyHTTP
|
|
425
|
-
| Json
|
|
426
|
-
| Python
|
|
427
|
-
| Llm1
|
|
428
|
-
| Llm2;
|
|
429
|
-
|
|
430
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Operator =
|
|
431
|
-
{
|
|
432
|
-
Eq: "eq",
|
|
433
|
-
Ne: "ne",
|
|
434
|
-
Gt: "gt",
|
|
435
|
-
Gte: "gte",
|
|
436
|
-
Lt: "lt",
|
|
437
|
-
Lte: "lte",
|
|
438
|
-
} as const;
|
|
439
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Operator =
|
|
440
|
-
ClosedEnum<
|
|
441
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Operator
|
|
442
|
-
>;
|
|
443
|
-
|
|
444
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number =
|
|
445
|
-
{
|
|
446
|
-
enabled: boolean;
|
|
447
|
-
alertOnFailure: boolean;
|
|
448
|
-
type: "number";
|
|
449
|
-
value: number;
|
|
450
|
-
operator:
|
|
451
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Operator;
|
|
452
|
-
};
|
|
453
|
-
|
|
454
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean =
|
|
455
|
-
{
|
|
456
|
-
enabled: boolean;
|
|
457
|
-
alertOnFailure: boolean;
|
|
458
|
-
type: "boolean";
|
|
459
|
-
value: boolean;
|
|
460
|
-
};
|
|
461
|
-
|
|
462
|
-
export type CreateEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfig =
|
|
463
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean
|
|
464
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number;
|
|
465
|
-
|
|
466
|
-
export const CreateEvalResponseBodyEvalsResponse200ApplicationJSONType = {
|
|
467
|
-
TypescriptEval: "typescript_eval",
|
|
468
|
-
} as const;
|
|
469
|
-
export type CreateEvalResponseBodyEvalsResponse200ApplicationJSONType =
|
|
470
|
-
ClosedEnum<typeof CreateEvalResponseBodyEvalsResponse200ApplicationJSONType>;
|
|
471
|
-
|
|
472
|
-
export type Typescript = {
|
|
473
|
-
id: string;
|
|
474
|
-
description: string;
|
|
475
|
-
created: string;
|
|
476
|
-
updated: string;
|
|
477
|
-
guardrailConfig?:
|
|
478
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean
|
|
479
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number
|
|
480
|
-
| undefined;
|
|
481
|
-
code: string;
|
|
482
|
-
type: CreateEvalResponseBodyEvalsResponse200ApplicationJSONType;
|
|
483
|
-
key: string;
|
|
484
|
-
};
|
|
485
|
-
|
|
486
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Operator =
|
|
487
|
-
{
|
|
488
|
-
Eq: "eq",
|
|
489
|
-
Ne: "ne",
|
|
490
|
-
Gt: "gt",
|
|
491
|
-
Gte: "gte",
|
|
492
|
-
Lt: "lt",
|
|
493
|
-
Lte: "lte",
|
|
494
|
-
} as const;
|
|
495
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Operator =
|
|
496
|
-
ClosedEnum<
|
|
497
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Operator
|
|
498
|
-
>;
|
|
499
|
-
|
|
500
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number =
|
|
501
|
-
{
|
|
502
|
-
enabled: boolean;
|
|
503
|
-
alertOnFailure: boolean;
|
|
504
|
-
type: "number";
|
|
505
|
-
value: number;
|
|
506
|
-
operator:
|
|
507
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Operator;
|
|
508
|
-
};
|
|
509
|
-
|
|
510
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean =
|
|
511
|
-
{
|
|
512
|
-
enabled: boolean;
|
|
513
|
-
alertOnFailure: boolean;
|
|
514
|
-
type: "boolean";
|
|
515
|
-
value: boolean;
|
|
516
|
-
};
|
|
517
|
-
|
|
518
|
-
export type CreateEvalResponseBodyEvalsResponse200GuardrailConfig =
|
|
519
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean
|
|
520
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number;
|
|
521
|
-
|
|
522
|
-
export const CreateEvalResponseBodyEvalsResponse200Type = {
|
|
523
|
-
Ragas: "ragas",
|
|
524
|
-
} as const;
|
|
525
|
-
export type CreateEvalResponseBodyEvalsResponse200Type = ClosedEnum<
|
|
526
|
-
typeof CreateEvalResponseBodyEvalsResponse200Type
|
|
527
|
-
>;
|
|
528
|
-
|
|
529
|
-
export const RagasMetric = {
|
|
530
|
-
ContextPrecision: "context_precision",
|
|
531
|
-
ContextRecall: "context_recall",
|
|
532
|
-
ContextEntitiesRecall: "context_entities_recall",
|
|
533
|
-
Harmfulness: "harmfulness",
|
|
534
|
-
Maliciousness: "maliciousness",
|
|
535
|
-
Coherence: "coherence",
|
|
536
|
-
Correctness: "correctness",
|
|
537
|
-
Conciseness: "conciseness",
|
|
538
|
-
ResponseRelevancy: "response_relevancy",
|
|
539
|
-
Faithfulness: "faithfulness",
|
|
540
|
-
Summarization: "summarization",
|
|
541
|
-
NoiseSensitivity: "noise_sensitivity",
|
|
542
|
-
} as const;
|
|
543
|
-
export type RagasMetric = ClosedEnum<typeof RagasMetric>;
|
|
544
|
-
|
|
545
|
-
export type Ragas = {
|
|
546
|
-
id: string;
|
|
547
|
-
description: string;
|
|
548
|
-
created: string;
|
|
549
|
-
updated: string;
|
|
550
|
-
guardrailConfig?:
|
|
551
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean
|
|
552
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number
|
|
553
|
-
| undefined;
|
|
554
|
-
type: CreateEvalResponseBodyEvalsResponse200Type;
|
|
555
|
-
ragasMetric: RagasMetric;
|
|
556
|
-
key: string;
|
|
557
|
-
model: string;
|
|
558
|
-
};
|
|
559
|
-
|
|
560
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator =
|
|
561
|
-
{
|
|
562
|
-
Eq: "eq",
|
|
563
|
-
Ne: "ne",
|
|
564
|
-
Gt: "gt",
|
|
565
|
-
Gte: "gte",
|
|
566
|
-
Lt: "lt",
|
|
567
|
-
Lte: "lte",
|
|
568
|
-
} as const;
|
|
569
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator =
|
|
570
|
-
ClosedEnum<
|
|
571
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator
|
|
572
|
-
>;
|
|
573
|
-
|
|
574
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber =
|
|
575
|
-
{
|
|
576
|
-
enabled: boolean;
|
|
577
|
-
alertOnFailure: boolean;
|
|
578
|
-
type: "number";
|
|
579
|
-
value: number;
|
|
580
|
-
operator:
|
|
581
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator;
|
|
582
|
-
};
|
|
583
|
-
|
|
584
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean =
|
|
585
|
-
{
|
|
586
|
-
enabled: boolean;
|
|
587
|
-
alertOnFailure: boolean;
|
|
588
|
-
type: "boolean";
|
|
589
|
-
value: boolean;
|
|
590
|
-
};
|
|
591
|
-
|
|
592
|
-
export type CreateEvalResponseBodyEvalsResponseGuardrailConfig =
|
|
593
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean
|
|
594
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber;
|
|
595
|
-
|
|
596
|
-
export const CreateEvalResponseBodyEvalsResponseType = {
|
|
597
|
-
FunctionEval: "function_eval",
|
|
598
|
-
} as const;
|
|
599
|
-
export type CreateEvalResponseBodyEvalsResponseType = ClosedEnum<
|
|
600
|
-
typeof CreateEvalResponseBodyEvalsResponseType
|
|
601
|
-
>;
|
|
602
|
-
|
|
603
|
-
export type ThirtyTwo = {
|
|
604
|
-
type: "grammar_diversity";
|
|
605
|
-
};
|
|
606
|
-
|
|
607
|
-
export type ThirtyOne = {
|
|
608
|
-
type: "lexical_repetition";
|
|
609
|
-
};
|
|
610
|
-
|
|
611
|
-
export type Thirty = {
|
|
612
|
-
type: "sentences_count";
|
|
613
|
-
};
|
|
614
|
-
|
|
615
|
-
export type TwentyNine = {
|
|
616
|
-
type: "words_count";
|
|
617
|
-
};
|
|
618
|
-
|
|
619
|
-
export type TwentyEight = {
|
|
620
|
-
type: "gse_english_level";
|
|
621
|
-
};
|
|
622
|
-
|
|
623
|
-
export type TwentySeven = {
|
|
624
|
-
type: "flesch_reading_ease";
|
|
625
|
-
};
|
|
626
|
-
|
|
627
|
-
export type TwentySix = {
|
|
628
|
-
type: "most_repeated_words";
|
|
629
|
-
};
|
|
630
|
-
|
|
631
|
-
export type TwentyFive = {
|
|
632
|
-
type: "keywords_match";
|
|
633
|
-
keywords: Array<string>;
|
|
634
|
-
};
|
|
635
|
-
|
|
636
|
-
export type TwentyFour = {
|
|
637
|
-
type: "levenshtein_distance";
|
|
638
|
-
};
|
|
639
|
-
|
|
640
|
-
export type TwentyThree = {
|
|
641
|
-
type: "cosine_similarity";
|
|
642
|
-
};
|
|
643
|
-
|
|
644
|
-
export type TwentyTwo = {
|
|
645
|
-
type: "meteor_score";
|
|
646
|
-
};
|
|
647
|
-
|
|
648
|
-
export type TwentyOne = {
|
|
649
|
-
type: "rouge_n";
|
|
650
|
-
};
|
|
651
|
-
|
|
652
|
-
export type Twenty = {
|
|
653
|
-
type: "bleu_score";
|
|
654
|
-
};
|
|
655
|
-
|
|
656
|
-
export type Nineteen = {
|
|
657
|
-
type: "bert_score";
|
|
658
|
-
};
|
|
659
|
-
|
|
660
|
-
export type Eighteen = {
|
|
661
|
-
type: "moderations_google";
|
|
662
|
-
};
|
|
663
|
-
|
|
664
|
-
export type Seventeen = {
|
|
665
|
-
type: "moderations_openai";
|
|
666
|
-
};
|
|
667
|
-
|
|
668
|
-
export type Sixteen = {
|
|
669
|
-
type: "is_valid_json";
|
|
670
|
-
};
|
|
671
|
-
|
|
672
|
-
export type Fifteen = {
|
|
673
|
-
type: "regex";
|
|
674
|
-
pattern: string;
|
|
675
|
-
};
|
|
676
|
-
|
|
677
|
-
export type Fourteen = {
|
|
678
|
-
type: "one_line";
|
|
679
|
-
};
|
|
680
|
-
|
|
681
|
-
export type Thirteen = {
|
|
682
|
-
type: "length_greater_than";
|
|
683
|
-
value: number;
|
|
684
|
-
};
|
|
685
|
-
|
|
686
|
-
export type Twelve = {
|
|
687
|
-
type: "length_between";
|
|
688
|
-
min: number;
|
|
689
|
-
max: number;
|
|
690
|
-
};
|
|
691
|
-
|
|
692
|
-
export type Eleven = {
|
|
693
|
-
type: "length_less_than";
|
|
694
|
-
value: number;
|
|
695
|
-
};
|
|
696
|
-
|
|
697
|
-
export type Ten = {
|
|
698
|
-
type: "exact_match";
|
|
699
|
-
};
|
|
700
|
-
|
|
701
|
-
export type Nine = {
|
|
702
|
-
type: "ends_with";
|
|
703
|
-
value: string;
|
|
704
|
-
};
|
|
705
|
-
|
|
706
|
-
export type Eight = {
|
|
707
|
-
type: "start_with";
|
|
708
|
-
value: string;
|
|
709
|
-
};
|
|
710
|
-
|
|
711
|
-
export type Seven = {
|
|
712
|
-
type: "contains_valid_link";
|
|
713
|
-
};
|
|
714
|
-
|
|
715
|
-
export type Six = {
|
|
716
|
-
type: "contains_url";
|
|
717
|
-
};
|
|
718
|
-
|
|
719
|
-
export type Five = {
|
|
720
|
-
type: "contains_email";
|
|
721
|
-
};
|
|
722
|
-
|
|
723
|
-
export type CreateEvalFunctionParams4 = {
|
|
724
|
-
type: "contains_any";
|
|
725
|
-
keywords: Array<string>;
|
|
726
|
-
};
|
|
727
|
-
|
|
728
|
-
export type CreateEvalFunctionParams3 = {
|
|
729
|
-
type: "contains_all";
|
|
730
|
-
keywords: Array<string>;
|
|
731
|
-
};
|
|
732
|
-
|
|
733
|
-
export type FunctionParams2 = {
|
|
734
|
-
type: "contains_none";
|
|
735
|
-
keywords: Array<string>;
|
|
736
|
-
};
|
|
737
|
-
|
|
738
|
-
export type FunctionParams1 = {
|
|
739
|
-
type: "contains";
|
|
740
|
-
value: string;
|
|
741
|
-
};
|
|
742
|
-
|
|
743
|
-
export type FunctionParams =
|
|
744
|
-
| FunctionParams1
|
|
745
|
-
| FunctionParams2
|
|
746
|
-
| CreateEvalFunctionParams3
|
|
747
|
-
| CreateEvalFunctionParams4
|
|
748
|
-
| Five
|
|
749
|
-
| Six
|
|
750
|
-
| Seven
|
|
751
|
-
| Eight
|
|
752
|
-
| Nine
|
|
753
|
-
| Ten
|
|
754
|
-
| Eleven
|
|
755
|
-
| Twelve
|
|
756
|
-
| Thirteen
|
|
757
|
-
| Fourteen
|
|
758
|
-
| Fifteen
|
|
759
|
-
| Sixteen
|
|
760
|
-
| Seventeen
|
|
761
|
-
| Eighteen
|
|
762
|
-
| Nineteen
|
|
763
|
-
| Twenty
|
|
764
|
-
| TwentyOne
|
|
765
|
-
| TwentyTwo
|
|
766
|
-
| TwentyThree
|
|
767
|
-
| TwentyFour
|
|
768
|
-
| TwentyFive
|
|
769
|
-
| TwentySix
|
|
770
|
-
| TwentySeven
|
|
771
|
-
| TwentyEight
|
|
772
|
-
| TwentyNine
|
|
773
|
-
| Thirty
|
|
774
|
-
| ThirtyOne
|
|
775
|
-
| ThirtyTwo;
|
|
776
|
-
|
|
777
|
-
export type CreateEvalResponseBodyFunction = {
|
|
778
|
-
id: string;
|
|
779
|
-
description: string;
|
|
780
|
-
created: string;
|
|
781
|
-
updated: string;
|
|
782
|
-
guardrailConfig?:
|
|
783
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean
|
|
784
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber
|
|
785
|
-
| undefined;
|
|
786
|
-
type: CreateEvalResponseBodyEvalsResponseType;
|
|
787
|
-
functionParams:
|
|
788
|
-
| FunctionParams1
|
|
789
|
-
| FunctionParams2
|
|
790
|
-
| CreateEvalFunctionParams3
|
|
791
|
-
| CreateEvalFunctionParams4
|
|
792
|
-
| Five
|
|
793
|
-
| Six
|
|
794
|
-
| Seven
|
|
795
|
-
| Eight
|
|
796
|
-
| Nine
|
|
797
|
-
| Ten
|
|
798
|
-
| Eleven
|
|
799
|
-
| Twelve
|
|
800
|
-
| Thirteen
|
|
801
|
-
| Fourteen
|
|
802
|
-
| Fifteen
|
|
803
|
-
| Sixteen
|
|
804
|
-
| Seventeen
|
|
805
|
-
| Eighteen
|
|
806
|
-
| Nineteen
|
|
807
|
-
| Twenty
|
|
808
|
-
| TwentyOne
|
|
809
|
-
| TwentyTwo
|
|
810
|
-
| TwentyThree
|
|
811
|
-
| TwentyFour
|
|
812
|
-
| TwentyFive
|
|
813
|
-
| TwentySix
|
|
814
|
-
| TwentySeven
|
|
815
|
-
| TwentyEight
|
|
816
|
-
| TwentyNine
|
|
817
|
-
| Thirty
|
|
818
|
-
| ThirtyOne
|
|
819
|
-
| ThirtyTwo;
|
|
820
|
-
key: string;
|
|
821
|
-
};
|
|
822
|
-
|
|
823
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator =
|
|
824
|
-
{
|
|
825
|
-
Eq: "eq",
|
|
826
|
-
Ne: "ne",
|
|
827
|
-
Gt: "gt",
|
|
828
|
-
Gte: "gte",
|
|
829
|
-
Lt: "lt",
|
|
830
|
-
Lte: "lte",
|
|
831
|
-
} as const;
|
|
832
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator =
|
|
833
|
-
ClosedEnum<
|
|
834
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator
|
|
835
|
-
>;
|
|
836
|
-
|
|
837
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber = {
|
|
838
|
-
enabled: boolean;
|
|
839
|
-
alertOnFailure: boolean;
|
|
840
|
-
type: "number";
|
|
841
|
-
value: number;
|
|
842
|
-
operator: CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator;
|
|
843
|
-
};
|
|
844
|
-
|
|
845
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean = {
|
|
846
|
-
enabled: boolean;
|
|
847
|
-
alertOnFailure: boolean;
|
|
848
|
-
type: "boolean";
|
|
849
|
-
value: boolean;
|
|
850
|
-
};
|
|
851
|
-
|
|
852
|
-
export type CreateEvalResponseBodyEvalsGuardrailConfig =
|
|
853
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean
|
|
854
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber;
|
|
855
|
-
|
|
856
|
-
export const CreateEvalResponseBodyEvalsType = {
|
|
857
|
-
PythonEval: "python_eval",
|
|
858
|
-
} as const;
|
|
859
|
-
export type CreateEvalResponseBodyEvalsType = ClosedEnum<
|
|
860
|
-
typeof CreateEvalResponseBodyEvalsType
|
|
861
|
-
>;
|
|
862
|
-
|
|
863
|
-
export type ResponseBodyPython = {
|
|
864
|
-
id: string;
|
|
865
|
-
description: string;
|
|
866
|
-
created: string;
|
|
867
|
-
updated: string;
|
|
868
|
-
guardrailConfig?:
|
|
869
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean
|
|
870
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber
|
|
871
|
-
| undefined;
|
|
872
|
-
code: string;
|
|
873
|
-
type: CreateEvalResponseBodyEvalsType;
|
|
874
|
-
key: string;
|
|
875
|
-
};
|
|
876
|
-
|
|
877
|
-
export const CreateEvalGuardrailConfigEvalsResponse200Operator = {
|
|
878
|
-
Eq: "eq",
|
|
879
|
-
Ne: "ne",
|
|
880
|
-
Gt: "gt",
|
|
881
|
-
Gte: "gte",
|
|
882
|
-
Lt: "lt",
|
|
883
|
-
Lte: "lte",
|
|
884
|
-
} as const;
|
|
885
|
-
export type CreateEvalGuardrailConfigEvalsResponse200Operator = ClosedEnum<
|
|
886
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200Operator
|
|
887
|
-
>;
|
|
888
|
-
|
|
889
|
-
export type CreateEvalGuardrailConfigEvalsResponse200Number = {
|
|
890
|
-
enabled: boolean;
|
|
891
|
-
alertOnFailure: boolean;
|
|
892
|
-
type: "number";
|
|
893
|
-
value: number;
|
|
894
|
-
operator: CreateEvalGuardrailConfigEvalsResponse200Operator;
|
|
895
|
-
};
|
|
896
|
-
|
|
897
|
-
export type CreateEvalGuardrailConfigEvalsResponse200Boolean = {
|
|
898
|
-
enabled: boolean;
|
|
899
|
-
alertOnFailure: boolean;
|
|
900
|
-
type: "boolean";
|
|
901
|
-
value: boolean;
|
|
902
|
-
};
|
|
903
|
-
|
|
904
|
-
export type CreateEvalResponseBodyGuardrailConfig =
|
|
905
|
-
| CreateEvalGuardrailConfigEvalsResponse200Boolean
|
|
906
|
-
| CreateEvalGuardrailConfigEvalsResponse200Number;
|
|
907
|
-
|
|
908
|
-
export const CreateEvalResponseBodyType = {
|
|
909
|
-
HttpEval: "http_eval",
|
|
910
|
-
} as const;
|
|
911
|
-
export type CreateEvalResponseBodyType = ClosedEnum<
|
|
912
|
-
typeof CreateEvalResponseBodyType
|
|
913
|
-
>;
|
|
914
|
-
|
|
915
|
-
export const ResponseBodyMethod = {
|
|
916
|
-
Get: "GET",
|
|
917
|
-
Post: "POST",
|
|
918
|
-
} as const;
|
|
919
|
-
export type ResponseBodyMethod = ClosedEnum<typeof ResponseBodyMethod>;
|
|
920
|
-
|
|
921
|
-
export type ResponseBodyHTTP = {
|
|
922
|
-
id: string;
|
|
923
|
-
description: string;
|
|
924
|
-
created: string;
|
|
925
|
-
updated: string;
|
|
926
|
-
guardrailConfig?:
|
|
927
|
-
| CreateEvalGuardrailConfigEvalsResponse200Boolean
|
|
928
|
-
| CreateEvalGuardrailConfigEvalsResponse200Number
|
|
929
|
-
| undefined;
|
|
930
|
-
type: CreateEvalResponseBodyType;
|
|
931
|
-
url: string;
|
|
932
|
-
method: ResponseBodyMethod;
|
|
933
|
-
headers: { [k: string]: string };
|
|
934
|
-
payload: { [k: string]: any };
|
|
935
|
-
key: string;
|
|
936
|
-
};
|
|
937
|
-
|
|
938
|
-
export const CreateEvalGuardrailConfigEvalsResponseOperator = {
|
|
939
|
-
Eq: "eq",
|
|
940
|
-
Ne: "ne",
|
|
941
|
-
Gt: "gt",
|
|
942
|
-
Gte: "gte",
|
|
943
|
-
Lt: "lt",
|
|
944
|
-
Lte: "lte",
|
|
945
|
-
} as const;
|
|
946
|
-
export type CreateEvalGuardrailConfigEvalsResponseOperator = ClosedEnum<
|
|
947
|
-
typeof CreateEvalGuardrailConfigEvalsResponseOperator
|
|
948
|
-
>;
|
|
949
|
-
|
|
950
|
-
export type CreateEvalGuardrailConfigEvalsResponseNumber = {
|
|
951
|
-
enabled: boolean;
|
|
952
|
-
alertOnFailure: boolean;
|
|
953
|
-
type: "number";
|
|
954
|
-
value: number;
|
|
955
|
-
operator: CreateEvalGuardrailConfigEvalsResponseOperator;
|
|
956
|
-
};
|
|
957
|
-
|
|
958
|
-
export type CreateEvalGuardrailConfigEvalsResponseBoolean = {
|
|
959
|
-
enabled: boolean;
|
|
960
|
-
alertOnFailure: boolean;
|
|
961
|
-
type: "boolean";
|
|
962
|
-
value: boolean;
|
|
963
|
-
};
|
|
964
|
-
|
|
965
|
-
export type ResponseBodyGuardrailConfig =
|
|
966
|
-
| CreateEvalGuardrailConfigEvalsResponseBoolean
|
|
967
|
-
| CreateEvalGuardrailConfigEvalsResponseNumber;
|
|
968
|
-
|
|
969
|
-
export const ResponseBodyType = {
|
|
970
|
-
JsonSchema: "json_schema",
|
|
971
|
-
} as const;
|
|
972
|
-
export type ResponseBodyType = ClosedEnum<typeof ResponseBodyType>;
|
|
973
|
-
|
|
974
|
-
export type ResponseBodyJSON = {
|
|
975
|
-
id: string;
|
|
976
|
-
description: string;
|
|
977
|
-
created: string;
|
|
978
|
-
updated: string;
|
|
979
|
-
guardrailConfig?:
|
|
980
|
-
| CreateEvalGuardrailConfigEvalsResponseBoolean
|
|
981
|
-
| CreateEvalGuardrailConfigEvalsResponseNumber
|
|
982
|
-
| undefined;
|
|
983
|
-
type: ResponseBodyType;
|
|
984
|
-
schema: string;
|
|
985
|
-
key: string;
|
|
986
|
-
};
|
|
987
|
-
|
|
988
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMOperator =
|
|
989
|
-
{
|
|
990
|
-
Eq: "eq",
|
|
991
|
-
Ne: "ne",
|
|
992
|
-
Gt: "gt",
|
|
993
|
-
Gte: "gte",
|
|
994
|
-
Lt: "lt",
|
|
995
|
-
Lte: "lte",
|
|
996
|
-
} as const;
|
|
997
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMOperator =
|
|
998
|
-
ClosedEnum<
|
|
999
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMOperator
|
|
1000
|
-
>;
|
|
1001
|
-
|
|
1002
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMNumber =
|
|
1003
|
-
{
|
|
1004
|
-
enabled: boolean;
|
|
1005
|
-
alertOnFailure: boolean;
|
|
1006
|
-
type: "number";
|
|
1007
|
-
value: number;
|
|
1008
|
-
operator:
|
|
1009
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMOperator;
|
|
1010
|
-
};
|
|
1011
|
-
|
|
1012
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMBoolean =
|
|
1013
|
-
{
|
|
1014
|
-
enabled: boolean;
|
|
1015
|
-
alertOnFailure: boolean;
|
|
1016
|
-
type: "boolean";
|
|
1017
|
-
value: boolean;
|
|
1018
|
-
};
|
|
1019
|
-
|
|
1020
|
-
export type CreateEvalLLMEvalsResponseGuardrailConfig =
|
|
1021
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMBoolean
|
|
1022
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMNumber;
|
|
1023
|
-
|
|
1024
|
-
export const CreateEvalLLMEvalsResponseType = {
|
|
1025
|
-
LlmEval: "llm_eval",
|
|
1026
|
-
} as const;
|
|
1027
|
-
export type CreateEvalLLMEvalsResponseType = ClosedEnum<
|
|
1028
|
-
typeof CreateEvalLLMEvalsResponseType
|
|
1029
|
-
>;
|
|
1030
|
-
|
|
1031
|
-
export type CreateEvalLLMEvalsResponseRetry = {
|
|
1032
|
-
count: number;
|
|
1033
|
-
onCodes?: Array<number> | undefined;
|
|
1034
|
-
};
|
|
1035
|
-
|
|
1036
|
-
export type CreateEvalLLMEvalsResponseFallbacks = {
|
|
1037
|
-
model: string;
|
|
1038
|
-
};
|
|
1039
|
-
|
|
1040
|
-
export type CreateEvalLLMJudges = {
|
|
1041
|
-
model: string;
|
|
1042
|
-
retry?: CreateEvalLLMEvalsResponseRetry | undefined;
|
|
1043
|
-
fallbacks?: Array<CreateEvalLLMEvalsResponseFallbacks> | undefined;
|
|
1044
|
-
};
|
|
1045
|
-
|
|
1046
|
-
export type CreateEvalLLMEvalsRetry = {
|
|
1047
|
-
count: number;
|
|
1048
|
-
onCodes?: Array<number> | undefined;
|
|
1049
|
-
};
|
|
1050
|
-
|
|
1051
|
-
export type CreateEvalLLMEvalsFallbacks = {
|
|
1052
|
-
model: string;
|
|
1053
|
-
};
|
|
1054
|
-
|
|
1055
|
-
export type CreateEvalLLMReplacementJudges = {
|
|
1056
|
-
model: string;
|
|
1057
|
-
retry?: CreateEvalLLMEvalsRetry | undefined;
|
|
1058
|
-
fallbacks?: Array<CreateEvalLLMEvalsFallbacks> | undefined;
|
|
1059
|
-
};
|
|
1060
|
-
|
|
1061
|
-
export const CreateEvalLLMTieValue = {
|
|
1062
|
-
Tie: "Tie",
|
|
1063
|
-
} as const;
|
|
1064
|
-
export type CreateEvalLLMTieValue = ClosedEnum<typeof CreateEvalLLMTieValue>;
|
|
1065
|
-
|
|
1066
|
-
export type CreateEvalLLMJury = {
|
|
1067
|
-
judges: Array<CreateEvalLLMJudges>;
|
|
1068
|
-
replacementJudges?: Array<CreateEvalLLMReplacementJudges> | undefined;
|
|
1069
|
-
minSuccessfulJudges: number;
|
|
1070
|
-
tieValue: CreateEvalLLMTieValue;
|
|
1071
|
-
};
|
|
1072
|
-
|
|
1073
|
-
export type CreateEvalLlm2 = {
|
|
1074
|
-
id: string;
|
|
1075
|
-
description: string;
|
|
1076
|
-
created: string;
|
|
1077
|
-
updated: string;
|
|
1078
|
-
guardrailConfig?:
|
|
1079
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMBoolean
|
|
1080
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMNumber
|
|
1081
|
-
| undefined;
|
|
1082
|
-
type: CreateEvalLLMEvalsResponseType;
|
|
1083
|
-
repetitions?: number | undefined;
|
|
1084
|
-
prompt: string;
|
|
1085
|
-
key: string;
|
|
1086
|
-
mode: "jury";
|
|
1087
|
-
jury: CreateEvalLLMJury;
|
|
1088
|
-
};
|
|
1089
|
-
|
|
1090
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Operator =
|
|
1091
|
-
{
|
|
1092
|
-
Eq: "eq",
|
|
1093
|
-
Ne: "ne",
|
|
1094
|
-
Gt: "gt",
|
|
1095
|
-
Gte: "gte",
|
|
1096
|
-
Lt: "lt",
|
|
1097
|
-
Lte: "lte",
|
|
1098
|
-
} as const;
|
|
1099
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Operator =
|
|
1100
|
-
ClosedEnum<
|
|
1101
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Operator
|
|
1102
|
-
>;
|
|
1103
|
-
|
|
1104
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Number =
|
|
1105
|
-
{
|
|
1106
|
-
enabled: boolean;
|
|
1107
|
-
alertOnFailure: boolean;
|
|
1108
|
-
type: "number";
|
|
1109
|
-
value: number;
|
|
1110
|
-
operator:
|
|
1111
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Operator;
|
|
1112
|
-
};
|
|
1113
|
-
|
|
1114
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Boolean =
|
|
1115
|
-
{
|
|
1116
|
-
enabled: boolean;
|
|
1117
|
-
alertOnFailure: boolean;
|
|
1118
|
-
type: "boolean";
|
|
1119
|
-
value: boolean;
|
|
1120
|
-
};
|
|
1121
|
-
|
|
1122
|
-
export type CreateEvalLLMEvalsGuardrailConfig =
|
|
1123
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Boolean
|
|
1124
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Number;
|
|
1125
|
-
|
|
1126
|
-
export const CreateEvalLLMEvalsType = {
|
|
1127
|
-
LlmEval: "llm_eval",
|
|
1128
|
-
} as const;
|
|
1129
|
-
export type CreateEvalLLMEvalsType = ClosedEnum<typeof CreateEvalLLMEvalsType>;
|
|
1130
|
-
|
|
1131
|
-
export type CreateEvalLlm1 = {
|
|
1132
|
-
id: string;
|
|
1133
|
-
description: string;
|
|
1134
|
-
created: string;
|
|
1135
|
-
updated: string;
|
|
1136
|
-
guardrailConfig?:
|
|
1137
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Boolean
|
|
1138
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Number
|
|
1139
|
-
| undefined;
|
|
1140
|
-
type: CreateEvalLLMEvalsType;
|
|
1141
|
-
repetitions?: number | undefined;
|
|
1142
|
-
prompt: string;
|
|
1143
|
-
key: string;
|
|
1144
|
-
mode: "single";
|
|
1145
|
-
model: string;
|
|
1146
|
-
};
|
|
1147
|
-
|
|
1148
|
-
export type ResponseBodyLLM = CreateEvalLlm1 | CreateEvalLlm2;
|
|
1149
|
-
|
|
1150
|
-
/**
|
|
1151
|
-
* Successfully created an evaluator
|
|
1152
|
-
*/
|
|
1153
|
-
export type CreateEvalResponseBody =
|
|
1154
|
-
| ResponseBodyHTTP
|
|
1155
|
-
| Ragas
|
|
1156
|
-
| ResponseBodyJSON
|
|
1157
|
-
| ResponseBodyPython
|
|
1158
|
-
| CreateEvalResponseBodyFunction
|
|
1159
|
-
| Typescript
|
|
1160
|
-
| CreateEvalLlm1
|
|
1161
|
-
| CreateEvalLlm2;
|
|
1162
|
-
|
|
1163
|
-
/** @internal */
|
|
1164
|
-
export const CreateEvalGuardrailConfigOperator$outboundSchema: z.ZodNativeEnum<
|
|
1165
|
-
typeof CreateEvalGuardrailConfigOperator
|
|
1166
|
-
> = z.nativeEnum(CreateEvalGuardrailConfigOperator);
|
|
1167
|
-
|
|
1168
|
-
/** @internal */
|
|
1169
|
-
export type CreateEvalGuardrailConfigNumber$Outbound = {
|
|
1170
|
-
enabled: boolean;
|
|
1171
|
-
alert_on_failure: boolean;
|
|
1172
|
-
type: "number";
|
|
1173
|
-
value: number;
|
|
1174
|
-
operator: string;
|
|
1175
|
-
};
|
|
1176
|
-
|
|
1177
|
-
/** @internal */
|
|
1178
|
-
export const CreateEvalGuardrailConfigNumber$outboundSchema: z.ZodType<
|
|
1179
|
-
CreateEvalGuardrailConfigNumber$Outbound,
|
|
1180
|
-
z.ZodTypeDef,
|
|
1181
|
-
CreateEvalGuardrailConfigNumber
|
|
1182
|
-
> = z.object({
|
|
1183
|
-
enabled: z.boolean(),
|
|
1184
|
-
alertOnFailure: z.boolean().default(false),
|
|
1185
|
-
type: z.literal("number"),
|
|
1186
|
-
value: z.number(),
|
|
1187
|
-
operator: CreateEvalGuardrailConfigOperator$outboundSchema,
|
|
1188
|
-
}).transform((v) => {
|
|
1189
|
-
return remap$(v, {
|
|
1190
|
-
alertOnFailure: "alert_on_failure",
|
|
1191
|
-
});
|
|
1192
|
-
});
|
|
1193
|
-
|
|
1194
|
-
export function createEvalGuardrailConfigNumberToJSON(
|
|
1195
|
-
createEvalGuardrailConfigNumber: CreateEvalGuardrailConfigNumber,
|
|
1196
|
-
): string {
|
|
1197
|
-
return JSON.stringify(
|
|
1198
|
-
CreateEvalGuardrailConfigNumber$outboundSchema.parse(
|
|
1199
|
-
createEvalGuardrailConfigNumber,
|
|
1200
|
-
),
|
|
1201
|
-
);
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
/** @internal */
|
|
1205
|
-
export type CreateEvalGuardrailConfigBoolean$Outbound = {
|
|
1206
|
-
enabled: boolean;
|
|
1207
|
-
alert_on_failure: boolean;
|
|
1208
|
-
type: "boolean";
|
|
1209
|
-
value: boolean;
|
|
1210
|
-
};
|
|
1211
|
-
|
|
1212
|
-
/** @internal */
|
|
1213
|
-
export const CreateEvalGuardrailConfigBoolean$outboundSchema: z.ZodType<
|
|
1214
|
-
CreateEvalGuardrailConfigBoolean$Outbound,
|
|
1215
|
-
z.ZodTypeDef,
|
|
1216
|
-
CreateEvalGuardrailConfigBoolean
|
|
1217
|
-
> = z.object({
|
|
1218
|
-
enabled: z.boolean(),
|
|
1219
|
-
alertOnFailure: z.boolean().default(false),
|
|
1220
|
-
type: z.literal("boolean"),
|
|
1221
|
-
value: z.boolean(),
|
|
1222
|
-
}).transform((v) => {
|
|
1223
|
-
return remap$(v, {
|
|
1224
|
-
alertOnFailure: "alert_on_failure",
|
|
1225
|
-
});
|
|
1226
|
-
});
|
|
1227
|
-
|
|
1228
|
-
export function createEvalGuardrailConfigBooleanToJSON(
|
|
1229
|
-
createEvalGuardrailConfigBoolean: CreateEvalGuardrailConfigBoolean,
|
|
1230
|
-
): string {
|
|
1231
|
-
return JSON.stringify(
|
|
1232
|
-
CreateEvalGuardrailConfigBoolean$outboundSchema.parse(
|
|
1233
|
-
createEvalGuardrailConfigBoolean,
|
|
1234
|
-
),
|
|
1235
|
-
);
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
/** @internal */
|
|
1239
|
-
export type CreateEvalRequestBodyGuardrailConfig$Outbound =
|
|
1240
|
-
| CreateEvalGuardrailConfigBoolean$Outbound
|
|
1241
|
-
| CreateEvalGuardrailConfigNumber$Outbound;
|
|
1242
|
-
|
|
1243
|
-
/** @internal */
|
|
1244
|
-
export const CreateEvalRequestBodyGuardrailConfig$outboundSchema: z.ZodType<
|
|
1245
|
-
CreateEvalRequestBodyGuardrailConfig$Outbound,
|
|
1246
|
-
z.ZodTypeDef,
|
|
1247
|
-
CreateEvalRequestBodyGuardrailConfig
|
|
1248
|
-
> = z.union([
|
|
1249
|
-
z.lazy(() => CreateEvalGuardrailConfigBoolean$outboundSchema),
|
|
1250
|
-
z.lazy(() => CreateEvalGuardrailConfigNumber$outboundSchema),
|
|
1251
|
-
]);
|
|
1252
|
-
|
|
1253
|
-
export function createEvalRequestBodyGuardrailConfigToJSON(
|
|
1254
|
-
createEvalRequestBodyGuardrailConfig: CreateEvalRequestBodyGuardrailConfig,
|
|
1255
|
-
): string {
|
|
1256
|
-
return JSON.stringify(
|
|
1257
|
-
CreateEvalRequestBodyGuardrailConfig$outboundSchema.parse(
|
|
1258
|
-
createEvalRequestBodyGuardrailConfig,
|
|
1259
|
-
),
|
|
1260
|
-
);
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
/** @internal */
|
|
1264
|
-
export const CreateEvalRequestBodyOutputType$outboundSchema: z.ZodNativeEnum<
|
|
1265
|
-
typeof CreateEvalRequestBodyOutputType
|
|
1266
|
-
> = z.nativeEnum(CreateEvalRequestBodyOutputType);
|
|
1267
|
-
|
|
1268
|
-
/** @internal */
|
|
1269
|
-
export const CreateEvalRequestBodyType$outboundSchema: z.ZodNativeEnum<
|
|
1270
|
-
typeof CreateEvalRequestBodyType
|
|
1271
|
-
> = z.nativeEnum(CreateEvalRequestBodyType);
|
|
1272
|
-
|
|
1273
|
-
/** @internal */
|
|
1274
|
-
export type Python$Outbound = {
|
|
1275
|
-
guardrail_config?:
|
|
1276
|
-
| CreateEvalGuardrailConfigBoolean$Outbound
|
|
1277
|
-
| CreateEvalGuardrailConfigNumber$Outbound
|
|
1278
|
-
| undefined;
|
|
1279
|
-
output_type?: string | undefined;
|
|
1280
|
-
code: string;
|
|
1281
|
-
type: string;
|
|
1282
|
-
path: string;
|
|
1283
|
-
description: string;
|
|
1284
|
-
key: string;
|
|
1285
|
-
};
|
|
1286
|
-
|
|
1287
|
-
/** @internal */
|
|
1288
|
-
export const Python$outboundSchema: z.ZodType<
|
|
1289
|
-
Python$Outbound,
|
|
1290
|
-
z.ZodTypeDef,
|
|
1291
|
-
Python
|
|
1292
|
-
> = z.object({
|
|
1293
|
-
guardrailConfig: z.union([
|
|
1294
|
-
z.lazy(() => CreateEvalGuardrailConfigBoolean$outboundSchema),
|
|
1295
|
-
z.lazy(() => CreateEvalGuardrailConfigNumber$outboundSchema),
|
|
1296
|
-
]).optional(),
|
|
1297
|
-
outputType: CreateEvalRequestBodyOutputType$outboundSchema.optional(),
|
|
1298
|
-
code: z.string(),
|
|
1299
|
-
type: CreateEvalRequestBodyType$outboundSchema,
|
|
1300
|
-
path: z.string(),
|
|
1301
|
-
description: z.string().default(""),
|
|
1302
|
-
key: z.string(),
|
|
1303
|
-
}).transform((v) => {
|
|
1304
|
-
return remap$(v, {
|
|
1305
|
-
guardrailConfig: "guardrail_config",
|
|
1306
|
-
outputType: "output_type",
|
|
1307
|
-
});
|
|
1308
|
-
});
|
|
1309
|
-
|
|
1310
|
-
export function pythonToJSON(python: Python): string {
|
|
1311
|
-
return JSON.stringify(Python$outboundSchema.parse(python));
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
/** @internal */
|
|
1315
|
-
export const GuardrailConfigOperator$outboundSchema: z.ZodNativeEnum<
|
|
1316
|
-
typeof GuardrailConfigOperator
|
|
1317
|
-
> = z.nativeEnum(GuardrailConfigOperator);
|
|
1318
|
-
|
|
1319
|
-
/** @internal */
|
|
1320
|
-
export type GuardrailConfigNumber$Outbound = {
|
|
1321
|
-
enabled: boolean;
|
|
1322
|
-
alert_on_failure: boolean;
|
|
1323
|
-
type: "number";
|
|
1324
|
-
value: number;
|
|
1325
|
-
operator: string;
|
|
1326
|
-
};
|
|
1327
|
-
|
|
1328
|
-
/** @internal */
|
|
1329
|
-
export const GuardrailConfigNumber$outboundSchema: z.ZodType<
|
|
1330
|
-
GuardrailConfigNumber$Outbound,
|
|
1331
|
-
z.ZodTypeDef,
|
|
1332
|
-
GuardrailConfigNumber
|
|
1333
|
-
> = z.object({
|
|
1334
|
-
enabled: z.boolean(),
|
|
1335
|
-
alertOnFailure: z.boolean().default(false),
|
|
1336
|
-
type: z.literal("number"),
|
|
1337
|
-
value: z.number(),
|
|
1338
|
-
operator: GuardrailConfigOperator$outboundSchema,
|
|
1339
|
-
}).transform((v) => {
|
|
1340
|
-
return remap$(v, {
|
|
1341
|
-
alertOnFailure: "alert_on_failure",
|
|
1342
|
-
});
|
|
1343
|
-
});
|
|
1344
|
-
|
|
1345
|
-
export function guardrailConfigNumberToJSON(
|
|
1346
|
-
guardrailConfigNumber: GuardrailConfigNumber,
|
|
1347
|
-
): string {
|
|
1348
|
-
return JSON.stringify(
|
|
1349
|
-
GuardrailConfigNumber$outboundSchema.parse(guardrailConfigNumber),
|
|
1350
|
-
);
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
/** @internal */
|
|
1354
|
-
export type GuardrailConfigBoolean$Outbound = {
|
|
1355
|
-
enabled: boolean;
|
|
1356
|
-
alert_on_failure: boolean;
|
|
1357
|
-
type: "boolean";
|
|
1358
|
-
value: boolean;
|
|
1359
|
-
};
|
|
1360
|
-
|
|
1361
|
-
/** @internal */
|
|
1362
|
-
export const GuardrailConfigBoolean$outboundSchema: z.ZodType<
|
|
1363
|
-
GuardrailConfigBoolean$Outbound,
|
|
1364
|
-
z.ZodTypeDef,
|
|
1365
|
-
GuardrailConfigBoolean
|
|
1366
|
-
> = z.object({
|
|
1367
|
-
enabled: z.boolean(),
|
|
1368
|
-
alertOnFailure: z.boolean().default(false),
|
|
1369
|
-
type: z.literal("boolean"),
|
|
1370
|
-
value: z.boolean(),
|
|
1371
|
-
}).transform((v) => {
|
|
1372
|
-
return remap$(v, {
|
|
1373
|
-
alertOnFailure: "alert_on_failure",
|
|
1374
|
-
});
|
|
1375
|
-
});
|
|
1376
|
-
|
|
1377
|
-
export function guardrailConfigBooleanToJSON(
|
|
1378
|
-
guardrailConfigBoolean: GuardrailConfigBoolean,
|
|
1379
|
-
): string {
|
|
1380
|
-
return JSON.stringify(
|
|
1381
|
-
GuardrailConfigBoolean$outboundSchema.parse(guardrailConfigBoolean),
|
|
1382
|
-
);
|
|
1383
|
-
}
|
|
1384
|
-
|
|
1385
|
-
/** @internal */
|
|
1386
|
-
export type RequestBodyGuardrailConfig$Outbound =
|
|
1387
|
-
| GuardrailConfigBoolean$Outbound
|
|
1388
|
-
| GuardrailConfigNumber$Outbound;
|
|
1389
|
-
|
|
1390
|
-
/** @internal */
|
|
1391
|
-
export const RequestBodyGuardrailConfig$outboundSchema: z.ZodType<
|
|
1392
|
-
RequestBodyGuardrailConfig$Outbound,
|
|
1393
|
-
z.ZodTypeDef,
|
|
1394
|
-
RequestBodyGuardrailConfig
|
|
1395
|
-
> = z.union([
|
|
1396
|
-
z.lazy(() => GuardrailConfigBoolean$outboundSchema),
|
|
1397
|
-
z.lazy(() => GuardrailConfigNumber$outboundSchema),
|
|
1398
|
-
]);
|
|
1399
|
-
|
|
1400
|
-
export function requestBodyGuardrailConfigToJSON(
|
|
1401
|
-
requestBodyGuardrailConfig: RequestBodyGuardrailConfig,
|
|
1402
|
-
): string {
|
|
1403
|
-
return JSON.stringify(
|
|
1404
|
-
RequestBodyGuardrailConfig$outboundSchema.parse(requestBodyGuardrailConfig),
|
|
1405
|
-
);
|
|
1406
|
-
}
|
|
1407
|
-
|
|
1408
|
-
/** @internal */
|
|
1409
|
-
export const RequestBodyOutputType$outboundSchema: z.ZodNativeEnum<
|
|
1410
|
-
typeof RequestBodyOutputType
|
|
1411
|
-
> = z.nativeEnum(RequestBodyOutputType);
|
|
1412
|
-
|
|
1413
|
-
/** @internal */
|
|
1414
|
-
export const RequestBodyType$outboundSchema: z.ZodNativeEnum<
|
|
1415
|
-
typeof RequestBodyType
|
|
1416
|
-
> = z.nativeEnum(RequestBodyType);
|
|
1417
|
-
|
|
1418
|
-
/** @internal */
|
|
1419
|
-
export const CreateEvalRequestBodyMethod$outboundSchema: z.ZodNativeEnum<
|
|
1420
|
-
typeof CreateEvalRequestBodyMethod
|
|
1421
|
-
> = z.nativeEnum(CreateEvalRequestBodyMethod);
|
|
1422
|
-
|
|
1423
|
-
/** @internal */
|
|
1424
|
-
export type CreateEvalRequestBodyHTTP$Outbound = {
|
|
1425
|
-
guardrail_config?:
|
|
1426
|
-
| GuardrailConfigBoolean$Outbound
|
|
1427
|
-
| GuardrailConfigNumber$Outbound
|
|
1428
|
-
| undefined;
|
|
1429
|
-
output_type?: string | undefined;
|
|
1430
|
-
type: string;
|
|
1431
|
-
url: string;
|
|
1432
|
-
method: string;
|
|
1433
|
-
headers: { [k: string]: string };
|
|
1434
|
-
payload: { [k: string]: any };
|
|
1435
|
-
path: string;
|
|
1436
|
-
description: string;
|
|
1437
|
-
key: string;
|
|
1438
|
-
};
|
|
1439
|
-
|
|
1440
|
-
/** @internal */
|
|
1441
|
-
export const CreateEvalRequestBodyHTTP$outboundSchema: z.ZodType<
|
|
1442
|
-
CreateEvalRequestBodyHTTP$Outbound,
|
|
1443
|
-
z.ZodTypeDef,
|
|
1444
|
-
CreateEvalRequestBodyHTTP
|
|
1445
|
-
> = z.object({
|
|
1446
|
-
guardrailConfig: z.union([
|
|
1447
|
-
z.lazy(() => GuardrailConfigBoolean$outboundSchema),
|
|
1448
|
-
z.lazy(() => GuardrailConfigNumber$outboundSchema),
|
|
1449
|
-
]).optional(),
|
|
1450
|
-
outputType: RequestBodyOutputType$outboundSchema.optional(),
|
|
1451
|
-
type: RequestBodyType$outboundSchema,
|
|
1452
|
-
url: z.string(),
|
|
1453
|
-
method: CreateEvalRequestBodyMethod$outboundSchema,
|
|
1454
|
-
headers: z.record(z.string()),
|
|
1455
|
-
payload: z.record(z.any()),
|
|
1456
|
-
path: z.string(),
|
|
1457
|
-
description: z.string().default(""),
|
|
1458
|
-
key: z.string(),
|
|
1459
|
-
}).transform((v) => {
|
|
1460
|
-
return remap$(v, {
|
|
1461
|
-
guardrailConfig: "guardrail_config",
|
|
1462
|
-
outputType: "output_type",
|
|
1463
|
-
});
|
|
1464
|
-
});
|
|
1465
|
-
|
|
1466
|
-
export function createEvalRequestBodyHTTPToJSON(
|
|
1467
|
-
createEvalRequestBodyHTTP: CreateEvalRequestBodyHTTP,
|
|
1468
|
-
): string {
|
|
1469
|
-
return JSON.stringify(
|
|
1470
|
-
CreateEvalRequestBodyHTTP$outboundSchema.parse(createEvalRequestBodyHTTP),
|
|
1471
|
-
);
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
/** @internal */
|
|
1475
|
-
export const Operator$outboundSchema: z.ZodNativeEnum<typeof Operator> = z
|
|
1476
|
-
.nativeEnum(Operator);
|
|
1477
|
-
|
|
1478
|
-
/** @internal */
|
|
1479
|
-
export type NumberT$Outbound = {
|
|
1480
|
-
enabled: boolean;
|
|
1481
|
-
alert_on_failure: boolean;
|
|
1482
|
-
type: "number";
|
|
1483
|
-
value: number;
|
|
1484
|
-
operator: string;
|
|
1485
|
-
};
|
|
1486
|
-
|
|
1487
|
-
/** @internal */
|
|
1488
|
-
export const NumberT$outboundSchema: z.ZodType<
|
|
1489
|
-
NumberT$Outbound,
|
|
1490
|
-
z.ZodTypeDef,
|
|
1491
|
-
NumberT
|
|
1492
|
-
> = z.object({
|
|
1493
|
-
enabled: z.boolean(),
|
|
1494
|
-
alertOnFailure: z.boolean().default(false),
|
|
1495
|
-
type: z.literal("number"),
|
|
1496
|
-
value: z.number(),
|
|
1497
|
-
operator: Operator$outboundSchema,
|
|
1498
|
-
}).transform((v) => {
|
|
1499
|
-
return remap$(v, {
|
|
1500
|
-
alertOnFailure: "alert_on_failure",
|
|
1501
|
-
});
|
|
1502
|
-
});
|
|
1503
|
-
|
|
1504
|
-
export function numberToJSON(numberT: NumberT): string {
|
|
1505
|
-
return JSON.stringify(NumberT$outboundSchema.parse(numberT));
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
/** @internal */
|
|
1509
|
-
export type Boolean$Outbound = {
|
|
1510
|
-
enabled: boolean;
|
|
1511
|
-
alert_on_failure: boolean;
|
|
1512
|
-
type: "boolean";
|
|
1513
|
-
value: boolean;
|
|
1514
|
-
};
|
|
1515
|
-
|
|
1516
|
-
/** @internal */
|
|
1517
|
-
export const Boolean$outboundSchema: z.ZodType<
|
|
1518
|
-
Boolean$Outbound,
|
|
1519
|
-
z.ZodTypeDef,
|
|
1520
|
-
Boolean
|
|
1521
|
-
> = z.object({
|
|
1522
|
-
enabled: z.boolean(),
|
|
1523
|
-
alertOnFailure: z.boolean().default(false),
|
|
1524
|
-
type: z.literal("boolean"),
|
|
1525
|
-
value: z.boolean(),
|
|
1526
|
-
}).transform((v) => {
|
|
1527
|
-
return remap$(v, {
|
|
1528
|
-
alertOnFailure: "alert_on_failure",
|
|
1529
|
-
});
|
|
1530
|
-
});
|
|
1531
|
-
|
|
1532
|
-
export function booleanToJSON(value: Boolean): string {
|
|
1533
|
-
return JSON.stringify(Boolean$outboundSchema.parse(value));
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
|
-
/** @internal */
|
|
1537
|
-
export type GuardrailConfig$Outbound = Boolean$Outbound | NumberT$Outbound;
|
|
1538
|
-
|
|
1539
|
-
/** @internal */
|
|
1540
|
-
export const GuardrailConfig$outboundSchema: z.ZodType<
|
|
1541
|
-
GuardrailConfig$Outbound,
|
|
1542
|
-
z.ZodTypeDef,
|
|
1543
|
-
GuardrailConfig
|
|
1544
|
-
> = z.union([
|
|
1545
|
-
z.lazy(() => Boolean$outboundSchema),
|
|
1546
|
-
z.lazy(() => NumberT$outboundSchema),
|
|
1547
|
-
]);
|
|
1548
|
-
|
|
1549
|
-
export function guardrailConfigToJSON(
|
|
1550
|
-
guardrailConfig: GuardrailConfig,
|
|
1551
|
-
): string {
|
|
1552
|
-
return JSON.stringify(GuardrailConfig$outboundSchema.parse(guardrailConfig));
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
|
-
/** @internal */
|
|
1556
|
-
export const OutputType$outboundSchema: z.ZodNativeEnum<typeof OutputType> = z
|
|
1557
|
-
.nativeEnum(OutputType);
|
|
1558
|
-
|
|
1559
|
-
/** @internal */
|
|
1560
|
-
export const CreateEvalRequestBodyEvalsType$outboundSchema: z.ZodNativeEnum<
|
|
1561
|
-
typeof CreateEvalRequestBodyEvalsType
|
|
1562
|
-
> = z.nativeEnum(CreateEvalRequestBodyEvalsType);
|
|
1563
|
-
|
|
1564
|
-
/** @internal */
|
|
1565
|
-
export type Json$Outbound = {
|
|
1566
|
-
guardrail_config?: Boolean$Outbound | NumberT$Outbound | undefined;
|
|
1567
|
-
output_type?: string | undefined;
|
|
1568
|
-
type: string;
|
|
1569
|
-
schema: string;
|
|
1570
|
-
path: string;
|
|
1571
|
-
description: string;
|
|
1572
|
-
key: string;
|
|
1573
|
-
};
|
|
1574
|
-
|
|
1575
|
-
/** @internal */
|
|
1576
|
-
export const Json$outboundSchema: z.ZodType<Json$Outbound, z.ZodTypeDef, Json> =
|
|
1577
|
-
z.object({
|
|
1578
|
-
guardrailConfig: z.union([
|
|
1579
|
-
z.lazy(() => Boolean$outboundSchema),
|
|
1580
|
-
z.lazy(() => NumberT$outboundSchema),
|
|
1581
|
-
]).optional(),
|
|
1582
|
-
outputType: OutputType$outboundSchema.optional(),
|
|
1583
|
-
type: CreateEvalRequestBodyEvalsType$outboundSchema,
|
|
1584
|
-
schema: z.string(),
|
|
1585
|
-
path: z.string(),
|
|
1586
|
-
description: z.string().default(""),
|
|
1587
|
-
key: z.string(),
|
|
1588
|
-
}).transform((v) => {
|
|
1589
|
-
return remap$(v, {
|
|
1590
|
-
guardrailConfig: "guardrail_config",
|
|
1591
|
-
outputType: "output_type",
|
|
1592
|
-
});
|
|
1593
|
-
});
|
|
1594
|
-
|
|
1595
|
-
export function jsonToJSON(json: Json): string {
|
|
1596
|
-
return JSON.stringify(Json$outboundSchema.parse(json));
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
/** @internal */
|
|
1600
|
-
export const CreateEvalGuardrailConfigEvalsOperator$outboundSchema:
|
|
1601
|
-
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsOperator> = z.nativeEnum(
|
|
1602
|
-
CreateEvalGuardrailConfigEvalsOperator,
|
|
1603
|
-
);
|
|
1604
|
-
|
|
1605
|
-
/** @internal */
|
|
1606
|
-
export type CreateEvalGuardrailConfigEvalsNumber$Outbound = {
|
|
1607
|
-
enabled: boolean;
|
|
1608
|
-
alert_on_failure: boolean;
|
|
1609
|
-
type: "number";
|
|
1610
|
-
value: number;
|
|
1611
|
-
operator: string;
|
|
1612
|
-
};
|
|
1613
|
-
|
|
1614
|
-
/** @internal */
|
|
1615
|
-
export const CreateEvalGuardrailConfigEvalsNumber$outboundSchema: z.ZodType<
|
|
1616
|
-
CreateEvalGuardrailConfigEvalsNumber$Outbound,
|
|
1617
|
-
z.ZodTypeDef,
|
|
1618
|
-
CreateEvalGuardrailConfigEvalsNumber
|
|
1619
|
-
> = z.object({
|
|
1620
|
-
enabled: z.boolean(),
|
|
1621
|
-
alertOnFailure: z.boolean().default(false),
|
|
1622
|
-
type: z.literal("number"),
|
|
1623
|
-
value: z.number(),
|
|
1624
|
-
operator: CreateEvalGuardrailConfigEvalsOperator$outboundSchema,
|
|
1625
|
-
}).transform((v) => {
|
|
1626
|
-
return remap$(v, {
|
|
1627
|
-
alertOnFailure: "alert_on_failure",
|
|
1628
|
-
});
|
|
1629
|
-
});
|
|
1630
|
-
|
|
1631
|
-
export function createEvalGuardrailConfigEvalsNumberToJSON(
|
|
1632
|
-
createEvalGuardrailConfigEvalsNumber: CreateEvalGuardrailConfigEvalsNumber,
|
|
1633
|
-
): string {
|
|
1634
|
-
return JSON.stringify(
|
|
1635
|
-
CreateEvalGuardrailConfigEvalsNumber$outboundSchema.parse(
|
|
1636
|
-
createEvalGuardrailConfigEvalsNumber,
|
|
1637
|
-
),
|
|
1638
|
-
);
|
|
1639
|
-
}
|
|
1640
|
-
|
|
1641
|
-
/** @internal */
|
|
1642
|
-
export type CreateEvalGuardrailConfigEvalsBoolean$Outbound = {
|
|
1643
|
-
enabled: boolean;
|
|
1644
|
-
alert_on_failure: boolean;
|
|
1645
|
-
type: "boolean";
|
|
1646
|
-
value: boolean;
|
|
1647
|
-
};
|
|
1648
|
-
|
|
1649
|
-
/** @internal */
|
|
1650
|
-
export const CreateEvalGuardrailConfigEvalsBoolean$outboundSchema: z.ZodType<
|
|
1651
|
-
CreateEvalGuardrailConfigEvalsBoolean$Outbound,
|
|
1652
|
-
z.ZodTypeDef,
|
|
1653
|
-
CreateEvalGuardrailConfigEvalsBoolean
|
|
1654
|
-
> = z.object({
|
|
1655
|
-
enabled: z.boolean(),
|
|
1656
|
-
alertOnFailure: z.boolean().default(false),
|
|
1657
|
-
type: z.literal("boolean"),
|
|
1658
|
-
value: z.boolean(),
|
|
1659
|
-
}).transform((v) => {
|
|
1660
|
-
return remap$(v, {
|
|
1661
|
-
alertOnFailure: "alert_on_failure",
|
|
1662
|
-
});
|
|
1663
|
-
});
|
|
1664
|
-
|
|
1665
|
-
export function createEvalGuardrailConfigEvalsBooleanToJSON(
|
|
1666
|
-
createEvalGuardrailConfigEvalsBoolean: CreateEvalGuardrailConfigEvalsBoolean,
|
|
1667
|
-
): string {
|
|
1668
|
-
return JSON.stringify(
|
|
1669
|
-
CreateEvalGuardrailConfigEvalsBoolean$outboundSchema.parse(
|
|
1670
|
-
createEvalGuardrailConfigEvalsBoolean,
|
|
1671
|
-
),
|
|
1672
|
-
);
|
|
1673
|
-
}
|
|
1674
|
-
|
|
1675
|
-
/** @internal */
|
|
1676
|
-
export type LLMGuardrailConfig$Outbound =
|
|
1677
|
-
| CreateEvalGuardrailConfigEvalsBoolean$Outbound
|
|
1678
|
-
| CreateEvalGuardrailConfigEvalsNumber$Outbound;
|
|
1679
|
-
|
|
1680
|
-
/** @internal */
|
|
1681
|
-
export const LLMGuardrailConfig$outboundSchema: z.ZodType<
|
|
1682
|
-
LLMGuardrailConfig$Outbound,
|
|
1683
|
-
z.ZodTypeDef,
|
|
1684
|
-
LLMGuardrailConfig
|
|
1685
|
-
> = z.union([
|
|
1686
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsBoolean$outboundSchema),
|
|
1687
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsNumber$outboundSchema),
|
|
1688
|
-
]);
|
|
1689
|
-
|
|
1690
|
-
export function llmGuardrailConfigToJSON(
|
|
1691
|
-
llmGuardrailConfig: LLMGuardrailConfig,
|
|
1692
|
-
): string {
|
|
1693
|
-
return JSON.stringify(
|
|
1694
|
-
LLMGuardrailConfig$outboundSchema.parse(llmGuardrailConfig),
|
|
1695
|
-
);
|
|
1696
|
-
}
|
|
1697
|
-
|
|
1698
|
-
/** @internal */
|
|
1699
|
-
export const LLMOutputType$outboundSchema: z.ZodNativeEnum<
|
|
1700
|
-
typeof LLMOutputType
|
|
1701
|
-
> = z.nativeEnum(LLMOutputType);
|
|
1702
|
-
|
|
1703
|
-
/** @internal */
|
|
1704
|
-
export const LLMType$outboundSchema: z.ZodNativeEnum<typeof LLMType> = z
|
|
1705
|
-
.nativeEnum(LLMType);
|
|
1706
|
-
|
|
1707
|
-
/** @internal */
|
|
1708
|
-
export type CreateEvalLLMRetry$Outbound = {
|
|
1709
|
-
count: number;
|
|
1710
|
-
on_codes?: Array<number> | undefined;
|
|
1711
|
-
};
|
|
1712
|
-
|
|
1713
|
-
/** @internal */
|
|
1714
|
-
export const CreateEvalLLMRetry$outboundSchema: z.ZodType<
|
|
1715
|
-
CreateEvalLLMRetry$Outbound,
|
|
1716
|
-
z.ZodTypeDef,
|
|
1717
|
-
CreateEvalLLMRetry
|
|
1718
|
-
> = z.object({
|
|
1719
|
-
count: z.number().int().default(2),
|
|
1720
|
-
onCodes: z.array(z.number().int()).optional(),
|
|
1721
|
-
}).transform((v) => {
|
|
1722
|
-
return remap$(v, {
|
|
1723
|
-
onCodes: "on_codes",
|
|
1724
|
-
});
|
|
1725
|
-
});
|
|
1726
|
-
|
|
1727
|
-
export function createEvalLLMRetryToJSON(
|
|
1728
|
-
createEvalLLMRetry: CreateEvalLLMRetry,
|
|
1729
|
-
): string {
|
|
1730
|
-
return JSON.stringify(
|
|
1731
|
-
CreateEvalLLMRetry$outboundSchema.parse(createEvalLLMRetry),
|
|
1732
|
-
);
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
/** @internal */
|
|
1736
|
-
export type CreateEvalLLMFallbacks$Outbound = {
|
|
1737
|
-
model: string;
|
|
1738
|
-
};
|
|
1739
|
-
|
|
1740
|
-
/** @internal */
|
|
1741
|
-
export const CreateEvalLLMFallbacks$outboundSchema: z.ZodType<
|
|
1742
|
-
CreateEvalLLMFallbacks$Outbound,
|
|
1743
|
-
z.ZodTypeDef,
|
|
1744
|
-
CreateEvalLLMFallbacks
|
|
1745
|
-
> = z.object({
|
|
1746
|
-
model: z.string(),
|
|
1747
|
-
});
|
|
1748
|
-
|
|
1749
|
-
export function createEvalLLMFallbacksToJSON(
|
|
1750
|
-
createEvalLLMFallbacks: CreateEvalLLMFallbacks,
|
|
1751
|
-
): string {
|
|
1752
|
-
return JSON.stringify(
|
|
1753
|
-
CreateEvalLLMFallbacks$outboundSchema.parse(createEvalLLMFallbacks),
|
|
1754
|
-
);
|
|
1755
|
-
}
|
|
1756
|
-
|
|
1757
|
-
/** @internal */
|
|
1758
|
-
export type LLMJudges$Outbound = {
|
|
1759
|
-
model: string;
|
|
1760
|
-
retry?: CreateEvalLLMRetry$Outbound | undefined;
|
|
1761
|
-
fallbacks?: Array<CreateEvalLLMFallbacks$Outbound> | undefined;
|
|
1762
|
-
};
|
|
1763
|
-
|
|
1764
|
-
/** @internal */
|
|
1765
|
-
export const LLMJudges$outboundSchema: z.ZodType<
|
|
1766
|
-
LLMJudges$Outbound,
|
|
1767
|
-
z.ZodTypeDef,
|
|
1768
|
-
LLMJudges
|
|
1769
|
-
> = z.object({
|
|
1770
|
-
model: z.string(),
|
|
1771
|
-
retry: z.lazy(() => CreateEvalLLMRetry$outboundSchema).optional(),
|
|
1772
|
-
fallbacks: z.array(z.lazy(() => CreateEvalLLMFallbacks$outboundSchema))
|
|
1773
|
-
.optional(),
|
|
1774
|
-
});
|
|
1775
|
-
|
|
1776
|
-
export function llmJudgesToJSON(llmJudges: LLMJudges): string {
|
|
1777
|
-
return JSON.stringify(LLMJudges$outboundSchema.parse(llmJudges));
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
/** @internal */
|
|
1781
|
-
export type LLMRetry$Outbound = {
|
|
1782
|
-
count: number;
|
|
1783
|
-
on_codes?: Array<number> | undefined;
|
|
1784
|
-
};
|
|
1785
|
-
|
|
1786
|
-
/** @internal */
|
|
1787
|
-
export const LLMRetry$outboundSchema: z.ZodType<
|
|
1788
|
-
LLMRetry$Outbound,
|
|
1789
|
-
z.ZodTypeDef,
|
|
1790
|
-
LLMRetry
|
|
1791
|
-
> = z.object({
|
|
1792
|
-
count: z.number().int().default(2),
|
|
1793
|
-
onCodes: z.array(z.number().int()).optional(),
|
|
1794
|
-
}).transform((v) => {
|
|
1795
|
-
return remap$(v, {
|
|
1796
|
-
onCodes: "on_codes",
|
|
1797
|
-
});
|
|
1798
|
-
});
|
|
1799
|
-
|
|
1800
|
-
export function llmRetryToJSON(llmRetry: LLMRetry): string {
|
|
1801
|
-
return JSON.stringify(LLMRetry$outboundSchema.parse(llmRetry));
|
|
1802
|
-
}
|
|
1803
|
-
|
|
1804
|
-
/** @internal */
|
|
1805
|
-
export type LLMFallbacks$Outbound = {
|
|
1806
|
-
model: string;
|
|
1807
|
-
};
|
|
1808
|
-
|
|
1809
|
-
/** @internal */
|
|
1810
|
-
export const LLMFallbacks$outboundSchema: z.ZodType<
|
|
1811
|
-
LLMFallbacks$Outbound,
|
|
1812
|
-
z.ZodTypeDef,
|
|
1813
|
-
LLMFallbacks
|
|
1814
|
-
> = z.object({
|
|
1815
|
-
model: z.string(),
|
|
1816
|
-
});
|
|
1817
|
-
|
|
1818
|
-
export function llmFallbacksToJSON(llmFallbacks: LLMFallbacks): string {
|
|
1819
|
-
return JSON.stringify(LLMFallbacks$outboundSchema.parse(llmFallbacks));
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
|
-
/** @internal */
|
|
1823
|
-
export type LLMReplacementJudges$Outbound = {
|
|
1824
|
-
model: string;
|
|
1825
|
-
retry?: LLMRetry$Outbound | undefined;
|
|
1826
|
-
fallbacks?: Array<LLMFallbacks$Outbound> | undefined;
|
|
1827
|
-
};
|
|
1828
|
-
|
|
1829
|
-
/** @internal */
|
|
1830
|
-
export const LLMReplacementJudges$outboundSchema: z.ZodType<
|
|
1831
|
-
LLMReplacementJudges$Outbound,
|
|
1832
|
-
z.ZodTypeDef,
|
|
1833
|
-
LLMReplacementJudges
|
|
1834
|
-
> = z.object({
|
|
1835
|
-
model: z.string(),
|
|
1836
|
-
retry: z.lazy(() => LLMRetry$outboundSchema).optional(),
|
|
1837
|
-
fallbacks: z.array(z.lazy(() => LLMFallbacks$outboundSchema)).optional(),
|
|
1838
|
-
});
|
|
1839
|
-
|
|
1840
|
-
export function llmReplacementJudgesToJSON(
|
|
1841
|
-
llmReplacementJudges: LLMReplacementJudges,
|
|
1842
|
-
): string {
|
|
1843
|
-
return JSON.stringify(
|
|
1844
|
-
LLMReplacementJudges$outboundSchema.parse(llmReplacementJudges),
|
|
1845
|
-
);
|
|
1846
|
-
}
|
|
1847
|
-
|
|
1848
|
-
/** @internal */
|
|
1849
|
-
export const LLMTieValue$outboundSchema: z.ZodNativeEnum<typeof LLMTieValue> = z
|
|
1850
|
-
.nativeEnum(LLMTieValue);
|
|
1851
|
-
|
|
1852
|
-
/** @internal */
|
|
1853
|
-
export type LLMJury$Outbound = {
|
|
1854
|
-
judges: Array<LLMJudges$Outbound>;
|
|
1855
|
-
replacement_judges?: Array<LLMReplacementJudges$Outbound> | undefined;
|
|
1856
|
-
min_successful_judges: number;
|
|
1857
|
-
tie_value: string;
|
|
1858
|
-
};
|
|
1859
|
-
|
|
1860
|
-
/** @internal */
|
|
1861
|
-
export const LLMJury$outboundSchema: z.ZodType<
|
|
1862
|
-
LLMJury$Outbound,
|
|
1863
|
-
z.ZodTypeDef,
|
|
1864
|
-
LLMJury
|
|
1865
|
-
> = z.object({
|
|
1866
|
-
judges: z.array(z.lazy(() => LLMJudges$outboundSchema)),
|
|
1867
|
-
replacementJudges: z.array(z.lazy(() => LLMReplacementJudges$outboundSchema))
|
|
1868
|
-
.optional(),
|
|
1869
|
-
minSuccessfulJudges: z.number().int().default(2),
|
|
1870
|
-
tieValue: LLMTieValue$outboundSchema.default("Tie"),
|
|
1871
|
-
}).transform((v) => {
|
|
1872
|
-
return remap$(v, {
|
|
1873
|
-
replacementJudges: "replacement_judges",
|
|
1874
|
-
minSuccessfulJudges: "min_successful_judges",
|
|
1875
|
-
tieValue: "tie_value",
|
|
1876
|
-
});
|
|
1877
|
-
});
|
|
1878
|
-
|
|
1879
|
-
export function llmJuryToJSON(llmJury: LLMJury): string {
|
|
1880
|
-
return JSON.stringify(LLMJury$outboundSchema.parse(llmJury));
|
|
1881
|
-
}
|
|
1882
|
-
|
|
1883
|
-
/** @internal */
|
|
1884
|
-
export type Llm2$Outbound = {
|
|
1885
|
-
guardrail_config?:
|
|
1886
|
-
| CreateEvalGuardrailConfigEvalsBoolean$Outbound
|
|
1887
|
-
| CreateEvalGuardrailConfigEvalsNumber$Outbound
|
|
1888
|
-
| undefined;
|
|
1889
|
-
output_type?: string | undefined;
|
|
1890
|
-
type: string;
|
|
1891
|
-
repetitions?: number | undefined;
|
|
1892
|
-
prompt: string;
|
|
1893
|
-
path: string;
|
|
1894
|
-
description: string;
|
|
1895
|
-
key: string;
|
|
1896
|
-
mode: "jury";
|
|
1897
|
-
jury: LLMJury$Outbound;
|
|
1898
|
-
};
|
|
1899
|
-
|
|
1900
|
-
/** @internal */
|
|
1901
|
-
export const Llm2$outboundSchema: z.ZodType<Llm2$Outbound, z.ZodTypeDef, Llm2> =
|
|
1902
|
-
z.object({
|
|
1903
|
-
guardrailConfig: z.union([
|
|
1904
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsBoolean$outboundSchema),
|
|
1905
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsNumber$outboundSchema),
|
|
1906
|
-
]).optional(),
|
|
1907
|
-
outputType: LLMOutputType$outboundSchema.optional(),
|
|
1908
|
-
type: LLMType$outboundSchema,
|
|
1909
|
-
repetitions: z.number().int().optional(),
|
|
1910
|
-
prompt: z.string(),
|
|
1911
|
-
path: z.string(),
|
|
1912
|
-
description: z.string().default(""),
|
|
1913
|
-
key: z.string(),
|
|
1914
|
-
mode: z.literal("jury"),
|
|
1915
|
-
jury: z.lazy(() => LLMJury$outboundSchema),
|
|
1916
|
-
}).transform((v) => {
|
|
1917
|
-
return remap$(v, {
|
|
1918
|
-
guardrailConfig: "guardrail_config",
|
|
1919
|
-
outputType: "output_type",
|
|
1920
|
-
});
|
|
1921
|
-
});
|
|
1922
|
-
|
|
1923
|
-
export function llm2ToJSON(llm2: Llm2): string {
|
|
1924
|
-
return JSON.stringify(Llm2$outboundSchema.parse(llm2));
|
|
1925
|
-
}
|
|
1926
|
-
|
|
1927
|
-
/** @internal */
|
|
1928
|
-
export const CreateEvalGuardrailConfigEvalsRequestOperator$outboundSchema:
|
|
1929
|
-
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsRequestOperator> = z
|
|
1930
|
-
.nativeEnum(CreateEvalGuardrailConfigEvalsRequestOperator);
|
|
1931
|
-
|
|
1932
|
-
/** @internal */
|
|
1933
|
-
export type CreateEvalGuardrailConfigEvalsRequestNumber$Outbound = {
|
|
1934
|
-
enabled: boolean;
|
|
1935
|
-
alert_on_failure: boolean;
|
|
1936
|
-
type: "number";
|
|
1937
|
-
value: number;
|
|
1938
|
-
operator: string;
|
|
1939
|
-
};
|
|
1940
|
-
|
|
1941
|
-
/** @internal */
|
|
1942
|
-
export const CreateEvalGuardrailConfigEvalsRequestNumber$outboundSchema:
|
|
1943
|
-
z.ZodType<
|
|
1944
|
-
CreateEvalGuardrailConfigEvalsRequestNumber$Outbound,
|
|
1945
|
-
z.ZodTypeDef,
|
|
1946
|
-
CreateEvalGuardrailConfigEvalsRequestNumber
|
|
1947
|
-
> = z.object({
|
|
1948
|
-
enabled: z.boolean(),
|
|
1949
|
-
alertOnFailure: z.boolean().default(false),
|
|
1950
|
-
type: z.literal("number"),
|
|
1951
|
-
value: z.number(),
|
|
1952
|
-
operator: CreateEvalGuardrailConfigEvalsRequestOperator$outboundSchema,
|
|
1953
|
-
}).transform((v) => {
|
|
1954
|
-
return remap$(v, {
|
|
1955
|
-
alertOnFailure: "alert_on_failure",
|
|
1956
|
-
});
|
|
1957
|
-
});
|
|
1958
|
-
|
|
1959
|
-
export function createEvalGuardrailConfigEvalsRequestNumberToJSON(
|
|
1960
|
-
createEvalGuardrailConfigEvalsRequestNumber:
|
|
1961
|
-
CreateEvalGuardrailConfigEvalsRequestNumber,
|
|
1962
|
-
): string {
|
|
1963
|
-
return JSON.stringify(
|
|
1964
|
-
CreateEvalGuardrailConfigEvalsRequestNumber$outboundSchema.parse(
|
|
1965
|
-
createEvalGuardrailConfigEvalsRequestNumber,
|
|
1966
|
-
),
|
|
1967
|
-
);
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1970
|
-
/** @internal */
|
|
1971
|
-
export type CreateEvalGuardrailConfigEvalsRequestBoolean$Outbound = {
|
|
1972
|
-
enabled: boolean;
|
|
1973
|
-
alert_on_failure: boolean;
|
|
1974
|
-
type: "boolean";
|
|
1975
|
-
value: boolean;
|
|
1976
|
-
};
|
|
1977
|
-
|
|
1978
|
-
/** @internal */
|
|
1979
|
-
export const CreateEvalGuardrailConfigEvalsRequestBoolean$outboundSchema:
|
|
1980
|
-
z.ZodType<
|
|
1981
|
-
CreateEvalGuardrailConfigEvalsRequestBoolean$Outbound,
|
|
1982
|
-
z.ZodTypeDef,
|
|
1983
|
-
CreateEvalGuardrailConfigEvalsRequestBoolean
|
|
1984
|
-
> = z.object({
|
|
1985
|
-
enabled: z.boolean(),
|
|
1986
|
-
alertOnFailure: z.boolean().default(false),
|
|
1987
|
-
type: z.literal("boolean"),
|
|
1988
|
-
value: z.boolean(),
|
|
1989
|
-
}).transform((v) => {
|
|
1990
|
-
return remap$(v, {
|
|
1991
|
-
alertOnFailure: "alert_on_failure",
|
|
1992
|
-
});
|
|
1993
|
-
});
|
|
1994
|
-
|
|
1995
|
-
export function createEvalGuardrailConfigEvalsRequestBooleanToJSON(
|
|
1996
|
-
createEvalGuardrailConfigEvalsRequestBoolean:
|
|
1997
|
-
CreateEvalGuardrailConfigEvalsRequestBoolean,
|
|
1998
|
-
): string {
|
|
1999
|
-
return JSON.stringify(
|
|
2000
|
-
CreateEvalGuardrailConfigEvalsRequestBoolean$outboundSchema.parse(
|
|
2001
|
-
createEvalGuardrailConfigEvalsRequestBoolean,
|
|
2002
|
-
),
|
|
2003
|
-
);
|
|
2004
|
-
}
|
|
2005
|
-
|
|
2006
|
-
/** @internal */
|
|
2007
|
-
export type CreateEvalLLMGuardrailConfig$Outbound =
|
|
2008
|
-
| CreateEvalGuardrailConfigEvalsRequestBoolean$Outbound
|
|
2009
|
-
| CreateEvalGuardrailConfigEvalsRequestNumber$Outbound;
|
|
2010
|
-
|
|
2011
|
-
/** @internal */
|
|
2012
|
-
export const CreateEvalLLMGuardrailConfig$outboundSchema: z.ZodType<
|
|
2013
|
-
CreateEvalLLMGuardrailConfig$Outbound,
|
|
2014
|
-
z.ZodTypeDef,
|
|
2015
|
-
CreateEvalLLMGuardrailConfig
|
|
2016
|
-
> = z.union([
|
|
2017
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsRequestBoolean$outboundSchema),
|
|
2018
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsRequestNumber$outboundSchema),
|
|
2019
|
-
]);
|
|
2020
|
-
|
|
2021
|
-
export function createEvalLLMGuardrailConfigToJSON(
|
|
2022
|
-
createEvalLLMGuardrailConfig: CreateEvalLLMGuardrailConfig,
|
|
2023
|
-
): string {
|
|
2024
|
-
return JSON.stringify(
|
|
2025
|
-
CreateEvalLLMGuardrailConfig$outboundSchema.parse(
|
|
2026
|
-
createEvalLLMGuardrailConfig,
|
|
2027
|
-
),
|
|
2028
|
-
);
|
|
2029
|
-
}
|
|
2030
|
-
|
|
2031
|
-
/** @internal */
|
|
2032
|
-
export const CreateEvalLLMOutputType$outboundSchema: z.ZodNativeEnum<
|
|
2033
|
-
typeof CreateEvalLLMOutputType
|
|
2034
|
-
> = z.nativeEnum(CreateEvalLLMOutputType);
|
|
2035
|
-
|
|
2036
|
-
/** @internal */
|
|
2037
|
-
export const CreateEvalLLMType$outboundSchema: z.ZodNativeEnum<
|
|
2038
|
-
typeof CreateEvalLLMType
|
|
2039
|
-
> = z.nativeEnum(CreateEvalLLMType);
|
|
2040
|
-
|
|
2041
|
-
/** @internal */
|
|
2042
|
-
export type Llm1$Outbound = {
|
|
2043
|
-
guardrail_config?:
|
|
2044
|
-
| CreateEvalGuardrailConfigEvalsRequestBoolean$Outbound
|
|
2045
|
-
| CreateEvalGuardrailConfigEvalsRequestNumber$Outbound
|
|
2046
|
-
| undefined;
|
|
2047
|
-
output_type?: string | undefined;
|
|
2048
|
-
type: string;
|
|
2049
|
-
repetitions?: number | undefined;
|
|
2050
|
-
prompt: string;
|
|
2051
|
-
path: string;
|
|
2052
|
-
description: string;
|
|
2053
|
-
key: string;
|
|
2054
|
-
mode: "single";
|
|
2055
|
-
model: string;
|
|
2056
|
-
};
|
|
2057
|
-
|
|
2058
|
-
/** @internal */
|
|
2059
|
-
export const Llm1$outboundSchema: z.ZodType<Llm1$Outbound, z.ZodTypeDef, Llm1> =
|
|
2060
|
-
z.object({
|
|
2061
|
-
guardrailConfig: z.union([
|
|
2062
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsRequestBoolean$outboundSchema),
|
|
2063
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsRequestNumber$outboundSchema),
|
|
2064
|
-
]).optional(),
|
|
2065
|
-
outputType: CreateEvalLLMOutputType$outboundSchema.optional(),
|
|
2066
|
-
type: CreateEvalLLMType$outboundSchema,
|
|
2067
|
-
repetitions: z.number().int().optional(),
|
|
2068
|
-
prompt: z.string(),
|
|
2069
|
-
path: z.string(),
|
|
2070
|
-
description: z.string().default(""),
|
|
2071
|
-
key: z.string(),
|
|
2072
|
-
mode: z.literal("single"),
|
|
2073
|
-
model: z.string(),
|
|
2074
|
-
}).transform((v) => {
|
|
2075
|
-
return remap$(v, {
|
|
2076
|
-
guardrailConfig: "guardrail_config",
|
|
2077
|
-
outputType: "output_type",
|
|
2078
|
-
});
|
|
2079
|
-
});
|
|
2080
|
-
|
|
2081
|
-
export function llm1ToJSON(llm1: Llm1): string {
|
|
2082
|
-
return JSON.stringify(Llm1$outboundSchema.parse(llm1));
|
|
2083
|
-
}
|
|
2084
|
-
|
|
2085
|
-
/** @internal */
|
|
2086
|
-
export type Llm$Outbound = Llm1$Outbound | Llm2$Outbound;
|
|
2087
|
-
|
|
2088
|
-
/** @internal */
|
|
2089
|
-
export const Llm$outboundSchema: z.ZodType<Llm$Outbound, z.ZodTypeDef, Llm> = z
|
|
2090
|
-
.union([
|
|
2091
|
-
z.lazy(() => Llm1$outboundSchema),
|
|
2092
|
-
z.lazy(() => Llm2$outboundSchema),
|
|
2093
|
-
]);
|
|
2094
|
-
|
|
2095
|
-
export function llmToJSON(llm: Llm): string {
|
|
2096
|
-
return JSON.stringify(Llm$outboundSchema.parse(llm));
|
|
2097
|
-
}
|
|
2098
|
-
|
|
2099
|
-
/** @internal */
|
|
2100
|
-
export type CreateEvalRequestBody$Outbound =
|
|
2101
|
-
| CreateEvalRequestBodyHTTP$Outbound
|
|
2102
|
-
| Json$Outbound
|
|
2103
|
-
| Python$Outbound
|
|
2104
|
-
| Llm1$Outbound
|
|
2105
|
-
| Llm2$Outbound;
|
|
2106
|
-
|
|
2107
|
-
/** @internal */
|
|
2108
|
-
export const CreateEvalRequestBody$outboundSchema: z.ZodType<
|
|
2109
|
-
CreateEvalRequestBody$Outbound,
|
|
2110
|
-
z.ZodTypeDef,
|
|
2111
|
-
CreateEvalRequestBody
|
|
2112
|
-
> = z.union([
|
|
2113
|
-
z.lazy(() => CreateEvalRequestBodyHTTP$outboundSchema),
|
|
2114
|
-
z.lazy(() => Json$outboundSchema),
|
|
2115
|
-
z.lazy(() => Python$outboundSchema),
|
|
2116
|
-
z.union([
|
|
2117
|
-
z.lazy(() => Llm1$outboundSchema),
|
|
2118
|
-
z.lazy(() => Llm2$outboundSchema),
|
|
2119
|
-
]),
|
|
2120
|
-
]);
|
|
2121
|
-
|
|
2122
|
-
export function createEvalRequestBodyToJSON(
|
|
2123
|
-
createEvalRequestBody: CreateEvalRequestBody,
|
|
2124
|
-
): string {
|
|
2125
|
-
return JSON.stringify(
|
|
2126
|
-
CreateEvalRequestBody$outboundSchema.parse(createEvalRequestBody),
|
|
2127
|
-
);
|
|
2128
|
-
}
|
|
2129
|
-
|
|
2130
|
-
/** @internal */
|
|
2131
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Operator$inboundSchema:
|
|
2132
|
-
z.ZodNativeEnum<
|
|
2133
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Operator
|
|
2134
|
-
> = z.nativeEnum(
|
|
2135
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Operator,
|
|
2136
|
-
);
|
|
2137
|
-
|
|
2138
|
-
/** @internal */
|
|
2139
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number$inboundSchema:
|
|
2140
|
-
z.ZodType<
|
|
2141
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number,
|
|
2142
|
-
z.ZodTypeDef,
|
|
2143
|
-
unknown
|
|
2144
|
-
> = z.object({
|
|
2145
|
-
enabled: z.boolean(),
|
|
2146
|
-
alert_on_failure: z.boolean().default(false),
|
|
2147
|
-
type: z.literal("number"),
|
|
2148
|
-
value: z.number(),
|
|
2149
|
-
operator:
|
|
2150
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Operator$inboundSchema,
|
|
2151
|
-
}).transform((v) => {
|
|
2152
|
-
return remap$(v, {
|
|
2153
|
-
"alert_on_failure": "alertOnFailure",
|
|
2154
|
-
});
|
|
2155
|
-
});
|
|
2156
|
-
|
|
2157
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7NumberFromJSON(
|
|
2158
|
-
jsonString: string,
|
|
2159
|
-
): SafeParseResult<
|
|
2160
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number,
|
|
2161
|
-
SDKValidationError
|
|
2162
|
-
> {
|
|
2163
|
-
return safeParse(
|
|
2164
|
-
jsonString,
|
|
2165
|
-
(x) =>
|
|
2166
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number$inboundSchema
|
|
2167
|
-
.parse(JSON.parse(x)),
|
|
2168
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number' from JSON`,
|
|
2169
|
-
);
|
|
2170
|
-
}
|
|
2171
|
-
|
|
2172
|
-
/** @internal */
|
|
2173
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean$inboundSchema:
|
|
2174
|
-
z.ZodType<
|
|
2175
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean,
|
|
2176
|
-
z.ZodTypeDef,
|
|
2177
|
-
unknown
|
|
2178
|
-
> = z.object({
|
|
2179
|
-
enabled: z.boolean(),
|
|
2180
|
-
alert_on_failure: z.boolean().default(false),
|
|
2181
|
-
type: z.literal("boolean"),
|
|
2182
|
-
value: z.boolean(),
|
|
2183
|
-
}).transform((v) => {
|
|
2184
|
-
return remap$(v, {
|
|
2185
|
-
"alert_on_failure": "alertOnFailure",
|
|
2186
|
-
});
|
|
2187
|
-
});
|
|
2188
|
-
|
|
2189
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7BooleanFromJSON(
|
|
2190
|
-
jsonString: string,
|
|
2191
|
-
): SafeParseResult<
|
|
2192
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean,
|
|
2193
|
-
SDKValidationError
|
|
2194
|
-
> {
|
|
2195
|
-
return safeParse(
|
|
2196
|
-
jsonString,
|
|
2197
|
-
(x) =>
|
|
2198
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean$inboundSchema
|
|
2199
|
-
.parse(JSON.parse(x)),
|
|
2200
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean' from JSON`,
|
|
2201
|
-
);
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
|
-
/** @internal */
|
|
2205
|
-
export const CreateEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfig$inboundSchema:
|
|
2206
|
-
z.ZodType<
|
|
2207
|
-
CreateEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfig,
|
|
2208
|
-
z.ZodTypeDef,
|
|
2209
|
-
unknown
|
|
2210
|
-
> = z.union([
|
|
2211
|
-
z.lazy(() =>
|
|
2212
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean$inboundSchema
|
|
2213
|
-
),
|
|
2214
|
-
z.lazy(() =>
|
|
2215
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number$inboundSchema
|
|
2216
|
-
),
|
|
2217
|
-
]);
|
|
2218
|
-
|
|
2219
|
-
export function createEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfigFromJSON(
|
|
2220
|
-
jsonString: string,
|
|
2221
|
-
): SafeParseResult<
|
|
2222
|
-
CreateEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfig,
|
|
2223
|
-
SDKValidationError
|
|
2224
|
-
> {
|
|
2225
|
-
return safeParse(
|
|
2226
|
-
jsonString,
|
|
2227
|
-
(x) =>
|
|
2228
|
-
CreateEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfig$inboundSchema
|
|
2229
|
-
.parse(JSON.parse(x)),
|
|
2230
|
-
`Failed to parse 'CreateEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfig' from JSON`,
|
|
2231
|
-
);
|
|
2232
|
-
}
|
|
2233
|
-
|
|
2234
|
-
/** @internal */
|
|
2235
|
-
export const CreateEvalResponseBodyEvalsResponse200ApplicationJSONType$inboundSchema:
|
|
2236
|
-
z.ZodNativeEnum<
|
|
2237
|
-
typeof CreateEvalResponseBodyEvalsResponse200ApplicationJSONType
|
|
2238
|
-
> = z.nativeEnum(CreateEvalResponseBodyEvalsResponse200ApplicationJSONType);
|
|
2239
|
-
|
|
2240
|
-
/** @internal */
|
|
2241
|
-
export const Typescript$inboundSchema: z.ZodType<
|
|
2242
|
-
Typescript,
|
|
2243
|
-
z.ZodTypeDef,
|
|
2244
|
-
unknown
|
|
2245
|
-
> = z.object({
|
|
2246
|
-
_id: z.string(),
|
|
2247
|
-
description: z.string(),
|
|
2248
|
-
created: z.string().default("2026-03-10T17:52:42.263Z"),
|
|
2249
|
-
updated: z.string().default("2026-03-10T17:52:42.263Z"),
|
|
2250
|
-
guardrail_config: z.union([
|
|
2251
|
-
z.lazy(() =>
|
|
2252
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean$inboundSchema
|
|
2253
|
-
),
|
|
2254
|
-
z.lazy(() =>
|
|
2255
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number$inboundSchema
|
|
2256
|
-
),
|
|
2257
|
-
]).optional(),
|
|
2258
|
-
code: z.string(),
|
|
2259
|
-
type: CreateEvalResponseBodyEvalsResponse200ApplicationJSONType$inboundSchema,
|
|
2260
|
-
key: z.string(),
|
|
2261
|
-
}).transform((v) => {
|
|
2262
|
-
return remap$(v, {
|
|
2263
|
-
"_id": "id",
|
|
2264
|
-
"guardrail_config": "guardrailConfig",
|
|
2265
|
-
});
|
|
2266
|
-
});
|
|
2267
|
-
|
|
2268
|
-
export function typescriptFromJSON(
|
|
2269
|
-
jsonString: string,
|
|
2270
|
-
): SafeParseResult<Typescript, SDKValidationError> {
|
|
2271
|
-
return safeParse(
|
|
2272
|
-
jsonString,
|
|
2273
|
-
(x) => Typescript$inboundSchema.parse(JSON.parse(x)),
|
|
2274
|
-
`Failed to parse 'Typescript' from JSON`,
|
|
2275
|
-
);
|
|
2276
|
-
}
|
|
2277
|
-
|
|
2278
|
-
/** @internal */
|
|
2279
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Operator$inboundSchema:
|
|
2280
|
-
z.ZodNativeEnum<
|
|
2281
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Operator
|
|
2282
|
-
> = z.nativeEnum(
|
|
2283
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Operator,
|
|
2284
|
-
);
|
|
2285
|
-
|
|
2286
|
-
/** @internal */
|
|
2287
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number$inboundSchema:
|
|
2288
|
-
z.ZodType<
|
|
2289
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number,
|
|
2290
|
-
z.ZodTypeDef,
|
|
2291
|
-
unknown
|
|
2292
|
-
> = z.object({
|
|
2293
|
-
enabled: z.boolean(),
|
|
2294
|
-
alert_on_failure: z.boolean().default(false),
|
|
2295
|
-
type: z.literal("number"),
|
|
2296
|
-
value: z.number(),
|
|
2297
|
-
operator:
|
|
2298
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Operator$inboundSchema,
|
|
2299
|
-
}).transform((v) => {
|
|
2300
|
-
return remap$(v, {
|
|
2301
|
-
"alert_on_failure": "alertOnFailure",
|
|
2302
|
-
});
|
|
2303
|
-
});
|
|
2304
|
-
|
|
2305
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6NumberFromJSON(
|
|
2306
|
-
jsonString: string,
|
|
2307
|
-
): SafeParseResult<
|
|
2308
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number,
|
|
2309
|
-
SDKValidationError
|
|
2310
|
-
> {
|
|
2311
|
-
return safeParse(
|
|
2312
|
-
jsonString,
|
|
2313
|
-
(x) =>
|
|
2314
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number$inboundSchema
|
|
2315
|
-
.parse(JSON.parse(x)),
|
|
2316
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number' from JSON`,
|
|
2317
|
-
);
|
|
2318
|
-
}
|
|
2319
|
-
|
|
2320
|
-
/** @internal */
|
|
2321
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean$inboundSchema:
|
|
2322
|
-
z.ZodType<
|
|
2323
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean,
|
|
2324
|
-
z.ZodTypeDef,
|
|
2325
|
-
unknown
|
|
2326
|
-
> = z.object({
|
|
2327
|
-
enabled: z.boolean(),
|
|
2328
|
-
alert_on_failure: z.boolean().default(false),
|
|
2329
|
-
type: z.literal("boolean"),
|
|
2330
|
-
value: z.boolean(),
|
|
2331
|
-
}).transform((v) => {
|
|
2332
|
-
return remap$(v, {
|
|
2333
|
-
"alert_on_failure": "alertOnFailure",
|
|
2334
|
-
});
|
|
2335
|
-
});
|
|
2336
|
-
|
|
2337
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6BooleanFromJSON(
|
|
2338
|
-
jsonString: string,
|
|
2339
|
-
): SafeParseResult<
|
|
2340
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean,
|
|
2341
|
-
SDKValidationError
|
|
2342
|
-
> {
|
|
2343
|
-
return safeParse(
|
|
2344
|
-
jsonString,
|
|
2345
|
-
(x) =>
|
|
2346
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean$inboundSchema
|
|
2347
|
-
.parse(JSON.parse(x)),
|
|
2348
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean' from JSON`,
|
|
2349
|
-
);
|
|
2350
|
-
}
|
|
2351
|
-
|
|
2352
|
-
/** @internal */
|
|
2353
|
-
export const CreateEvalResponseBodyEvalsResponse200GuardrailConfig$inboundSchema:
|
|
2354
|
-
z.ZodType<
|
|
2355
|
-
CreateEvalResponseBodyEvalsResponse200GuardrailConfig,
|
|
2356
|
-
z.ZodTypeDef,
|
|
2357
|
-
unknown
|
|
2358
|
-
> = z.union([
|
|
2359
|
-
z.lazy(() =>
|
|
2360
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean$inboundSchema
|
|
2361
|
-
),
|
|
2362
|
-
z.lazy(() =>
|
|
2363
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number$inboundSchema
|
|
2364
|
-
),
|
|
2365
|
-
]);
|
|
2366
|
-
|
|
2367
|
-
export function createEvalResponseBodyEvalsResponse200GuardrailConfigFromJSON(
|
|
2368
|
-
jsonString: string,
|
|
2369
|
-
): SafeParseResult<
|
|
2370
|
-
CreateEvalResponseBodyEvalsResponse200GuardrailConfig,
|
|
2371
|
-
SDKValidationError
|
|
2372
|
-
> {
|
|
2373
|
-
return safeParse(
|
|
2374
|
-
jsonString,
|
|
2375
|
-
(x) =>
|
|
2376
|
-
CreateEvalResponseBodyEvalsResponse200GuardrailConfig$inboundSchema.parse(
|
|
2377
|
-
JSON.parse(x),
|
|
2378
|
-
),
|
|
2379
|
-
`Failed to parse 'CreateEvalResponseBodyEvalsResponse200GuardrailConfig' from JSON`,
|
|
2380
|
-
);
|
|
2381
|
-
}
|
|
2382
|
-
|
|
2383
|
-
/** @internal */
|
|
2384
|
-
export const CreateEvalResponseBodyEvalsResponse200Type$inboundSchema:
|
|
2385
|
-
z.ZodNativeEnum<typeof CreateEvalResponseBodyEvalsResponse200Type> = z
|
|
2386
|
-
.nativeEnum(CreateEvalResponseBodyEvalsResponse200Type);
|
|
2387
|
-
|
|
2388
|
-
/** @internal */
|
|
2389
|
-
export const RagasMetric$inboundSchema: z.ZodNativeEnum<typeof RagasMetric> = z
|
|
2390
|
-
.nativeEnum(RagasMetric);
|
|
2391
|
-
|
|
2392
|
-
/** @internal */
|
|
2393
|
-
export const Ragas$inboundSchema: z.ZodType<Ragas, z.ZodTypeDef, unknown> = z
|
|
2394
|
-
.object({
|
|
2395
|
-
_id: z.string(),
|
|
2396
|
-
description: z.string(),
|
|
2397
|
-
created: z.string().default("2026-03-10T17:52:42.263Z"),
|
|
2398
|
-
updated: z.string().default("2026-03-10T17:52:42.263Z"),
|
|
2399
|
-
guardrail_config: z.union([
|
|
2400
|
-
z.lazy(() =>
|
|
2401
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean$inboundSchema
|
|
2402
|
-
),
|
|
2403
|
-
z.lazy(() =>
|
|
2404
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number$inboundSchema
|
|
2405
|
-
),
|
|
2406
|
-
]).optional(),
|
|
2407
|
-
type: CreateEvalResponseBodyEvalsResponse200Type$inboundSchema,
|
|
2408
|
-
ragas_metric: RagasMetric$inboundSchema,
|
|
2409
|
-
key: z.string(),
|
|
2410
|
-
model: z.string(),
|
|
2411
|
-
}).transform((v) => {
|
|
2412
|
-
return remap$(v, {
|
|
2413
|
-
"_id": "id",
|
|
2414
|
-
"guardrail_config": "guardrailConfig",
|
|
2415
|
-
"ragas_metric": "ragasMetric",
|
|
2416
|
-
});
|
|
2417
|
-
});
|
|
2418
|
-
|
|
2419
|
-
export function ragasFromJSON(
|
|
2420
|
-
jsonString: string,
|
|
2421
|
-
): SafeParseResult<Ragas, SDKValidationError> {
|
|
2422
|
-
return safeParse(
|
|
2423
|
-
jsonString,
|
|
2424
|
-
(x) => Ragas$inboundSchema.parse(JSON.parse(x)),
|
|
2425
|
-
`Failed to parse 'Ragas' from JSON`,
|
|
2426
|
-
);
|
|
2427
|
-
}
|
|
2428
|
-
|
|
2429
|
-
/** @internal */
|
|
2430
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator$inboundSchema:
|
|
2431
|
-
z.ZodNativeEnum<
|
|
2432
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator
|
|
2433
|
-
> = z.nativeEnum(
|
|
2434
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator,
|
|
2435
|
-
);
|
|
2436
|
-
|
|
2437
|
-
/** @internal */
|
|
2438
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema:
|
|
2439
|
-
z.ZodType<
|
|
2440
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber,
|
|
2441
|
-
z.ZodTypeDef,
|
|
2442
|
-
unknown
|
|
2443
|
-
> = z.object({
|
|
2444
|
-
enabled: z.boolean(),
|
|
2445
|
-
alert_on_failure: z.boolean().default(false),
|
|
2446
|
-
type: z.literal("number"),
|
|
2447
|
-
value: z.number(),
|
|
2448
|
-
operator:
|
|
2449
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator$inboundSchema,
|
|
2450
|
-
}).transform((v) => {
|
|
2451
|
-
return remap$(v, {
|
|
2452
|
-
"alert_on_failure": "alertOnFailure",
|
|
2453
|
-
});
|
|
2454
|
-
});
|
|
2455
|
-
|
|
2456
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumberFromJSON(
|
|
2457
|
-
jsonString: string,
|
|
2458
|
-
): SafeParseResult<
|
|
2459
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber,
|
|
2460
|
-
SDKValidationError
|
|
2461
|
-
> {
|
|
2462
|
-
return safeParse(
|
|
2463
|
-
jsonString,
|
|
2464
|
-
(x) =>
|
|
2465
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema
|
|
2466
|
-
.parse(JSON.parse(x)),
|
|
2467
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber' from JSON`,
|
|
2468
|
-
);
|
|
2469
|
-
}
|
|
2470
|
-
|
|
2471
|
-
/** @internal */
|
|
2472
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$inboundSchema:
|
|
2473
|
-
z.ZodType<
|
|
2474
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean,
|
|
2475
|
-
z.ZodTypeDef,
|
|
2476
|
-
unknown
|
|
2477
|
-
> = z.object({
|
|
2478
|
-
enabled: z.boolean(),
|
|
2479
|
-
alert_on_failure: z.boolean().default(false),
|
|
2480
|
-
type: z.literal("boolean"),
|
|
2481
|
-
value: z.boolean(),
|
|
2482
|
-
}).transform((v) => {
|
|
2483
|
-
return remap$(v, {
|
|
2484
|
-
"alert_on_failure": "alertOnFailure",
|
|
2485
|
-
});
|
|
2486
|
-
});
|
|
2487
|
-
|
|
2488
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBooleanFromJSON(
|
|
2489
|
-
jsonString: string,
|
|
2490
|
-
): SafeParseResult<
|
|
2491
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean,
|
|
2492
|
-
SDKValidationError
|
|
2493
|
-
> {
|
|
2494
|
-
return safeParse(
|
|
2495
|
-
jsonString,
|
|
2496
|
-
(x) =>
|
|
2497
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$inboundSchema
|
|
2498
|
-
.parse(JSON.parse(x)),
|
|
2499
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean' from JSON`,
|
|
2500
|
-
);
|
|
2501
|
-
}
|
|
2502
|
-
|
|
2503
|
-
/** @internal */
|
|
2504
|
-
export const CreateEvalResponseBodyEvalsResponseGuardrailConfig$inboundSchema:
|
|
2505
|
-
z.ZodType<
|
|
2506
|
-
CreateEvalResponseBodyEvalsResponseGuardrailConfig,
|
|
2507
|
-
z.ZodTypeDef,
|
|
2508
|
-
unknown
|
|
2509
|
-
> = z.union([
|
|
2510
|
-
z.lazy(() =>
|
|
2511
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$inboundSchema
|
|
2512
|
-
),
|
|
2513
|
-
z.lazy(() =>
|
|
2514
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema
|
|
2515
|
-
),
|
|
2516
|
-
]);
|
|
2517
|
-
|
|
2518
|
-
export function createEvalResponseBodyEvalsResponseGuardrailConfigFromJSON(
|
|
2519
|
-
jsonString: string,
|
|
2520
|
-
): SafeParseResult<
|
|
2521
|
-
CreateEvalResponseBodyEvalsResponseGuardrailConfig,
|
|
2522
|
-
SDKValidationError
|
|
2523
|
-
> {
|
|
2524
|
-
return safeParse(
|
|
2525
|
-
jsonString,
|
|
2526
|
-
(x) =>
|
|
2527
|
-
CreateEvalResponseBodyEvalsResponseGuardrailConfig$inboundSchema.parse(
|
|
2528
|
-
JSON.parse(x),
|
|
2529
|
-
),
|
|
2530
|
-
`Failed to parse 'CreateEvalResponseBodyEvalsResponseGuardrailConfig' from JSON`,
|
|
2531
|
-
);
|
|
2532
|
-
}
|
|
2533
|
-
|
|
2534
|
-
/** @internal */
|
|
2535
|
-
export const CreateEvalResponseBodyEvalsResponseType$inboundSchema:
|
|
2536
|
-
z.ZodNativeEnum<typeof CreateEvalResponseBodyEvalsResponseType> = z
|
|
2537
|
-
.nativeEnum(CreateEvalResponseBodyEvalsResponseType);
|
|
2538
|
-
|
|
2539
|
-
/** @internal */
|
|
2540
|
-
export const ThirtyTwo$inboundSchema: z.ZodType<
|
|
2541
|
-
ThirtyTwo,
|
|
2542
|
-
z.ZodTypeDef,
|
|
2543
|
-
unknown
|
|
2544
|
-
> = z.object({
|
|
2545
|
-
type: z.literal("grammar_diversity"),
|
|
2546
|
-
});
|
|
2547
|
-
|
|
2548
|
-
export function thirtyTwoFromJSON(
|
|
2549
|
-
jsonString: string,
|
|
2550
|
-
): SafeParseResult<ThirtyTwo, SDKValidationError> {
|
|
2551
|
-
return safeParse(
|
|
2552
|
-
jsonString,
|
|
2553
|
-
(x) => ThirtyTwo$inboundSchema.parse(JSON.parse(x)),
|
|
2554
|
-
`Failed to parse 'ThirtyTwo' from JSON`,
|
|
2555
|
-
);
|
|
2556
|
-
}
|
|
2557
|
-
|
|
2558
|
-
/** @internal */
|
|
2559
|
-
export const ThirtyOne$inboundSchema: z.ZodType<
|
|
2560
|
-
ThirtyOne,
|
|
2561
|
-
z.ZodTypeDef,
|
|
2562
|
-
unknown
|
|
2563
|
-
> = z.object({
|
|
2564
|
-
type: z.literal("lexical_repetition"),
|
|
2565
|
-
});
|
|
2566
|
-
|
|
2567
|
-
export function thirtyOneFromJSON(
|
|
2568
|
-
jsonString: string,
|
|
2569
|
-
): SafeParseResult<ThirtyOne, SDKValidationError> {
|
|
2570
|
-
return safeParse(
|
|
2571
|
-
jsonString,
|
|
2572
|
-
(x) => ThirtyOne$inboundSchema.parse(JSON.parse(x)),
|
|
2573
|
-
`Failed to parse 'ThirtyOne' from JSON`,
|
|
2574
|
-
);
|
|
2575
|
-
}
|
|
2576
|
-
|
|
2577
|
-
/** @internal */
|
|
2578
|
-
export const Thirty$inboundSchema: z.ZodType<Thirty, z.ZodTypeDef, unknown> = z
|
|
2579
|
-
.object({
|
|
2580
|
-
type: z.literal("sentences_count"),
|
|
2581
|
-
});
|
|
2582
|
-
|
|
2583
|
-
export function thirtyFromJSON(
|
|
2584
|
-
jsonString: string,
|
|
2585
|
-
): SafeParseResult<Thirty, SDKValidationError> {
|
|
2586
|
-
return safeParse(
|
|
2587
|
-
jsonString,
|
|
2588
|
-
(x) => Thirty$inboundSchema.parse(JSON.parse(x)),
|
|
2589
|
-
`Failed to parse 'Thirty' from JSON`,
|
|
2590
|
-
);
|
|
2591
|
-
}
|
|
2592
|
-
|
|
2593
|
-
/** @internal */
|
|
2594
|
-
export const TwentyNine$inboundSchema: z.ZodType<
|
|
2595
|
-
TwentyNine,
|
|
2596
|
-
z.ZodTypeDef,
|
|
2597
|
-
unknown
|
|
2598
|
-
> = z.object({
|
|
2599
|
-
type: z.literal("words_count"),
|
|
2600
|
-
});
|
|
2601
|
-
|
|
2602
|
-
export function twentyNineFromJSON(
|
|
2603
|
-
jsonString: string,
|
|
2604
|
-
): SafeParseResult<TwentyNine, SDKValidationError> {
|
|
2605
|
-
return safeParse(
|
|
2606
|
-
jsonString,
|
|
2607
|
-
(x) => TwentyNine$inboundSchema.parse(JSON.parse(x)),
|
|
2608
|
-
`Failed to parse 'TwentyNine' from JSON`,
|
|
2609
|
-
);
|
|
2610
|
-
}
|
|
2611
|
-
|
|
2612
|
-
/** @internal */
|
|
2613
|
-
export const TwentyEight$inboundSchema: z.ZodType<
|
|
2614
|
-
TwentyEight,
|
|
2615
|
-
z.ZodTypeDef,
|
|
2616
|
-
unknown
|
|
2617
|
-
> = z.object({
|
|
2618
|
-
type: z.literal("gse_english_level"),
|
|
2619
|
-
});
|
|
2620
|
-
|
|
2621
|
-
export function twentyEightFromJSON(
|
|
2622
|
-
jsonString: string,
|
|
2623
|
-
): SafeParseResult<TwentyEight, SDKValidationError> {
|
|
2624
|
-
return safeParse(
|
|
2625
|
-
jsonString,
|
|
2626
|
-
(x) => TwentyEight$inboundSchema.parse(JSON.parse(x)),
|
|
2627
|
-
`Failed to parse 'TwentyEight' from JSON`,
|
|
2628
|
-
);
|
|
2629
|
-
}
|
|
2630
|
-
|
|
2631
|
-
/** @internal */
|
|
2632
|
-
export const TwentySeven$inboundSchema: z.ZodType<
|
|
2633
|
-
TwentySeven,
|
|
2634
|
-
z.ZodTypeDef,
|
|
2635
|
-
unknown
|
|
2636
|
-
> = z.object({
|
|
2637
|
-
type: z.literal("flesch_reading_ease"),
|
|
2638
|
-
});
|
|
2639
|
-
|
|
2640
|
-
export function twentySevenFromJSON(
|
|
2641
|
-
jsonString: string,
|
|
2642
|
-
): SafeParseResult<TwentySeven, SDKValidationError> {
|
|
2643
|
-
return safeParse(
|
|
2644
|
-
jsonString,
|
|
2645
|
-
(x) => TwentySeven$inboundSchema.parse(JSON.parse(x)),
|
|
2646
|
-
`Failed to parse 'TwentySeven' from JSON`,
|
|
2647
|
-
);
|
|
2648
|
-
}
|
|
2649
|
-
|
|
2650
|
-
/** @internal */
|
|
2651
|
-
export const TwentySix$inboundSchema: z.ZodType<
|
|
2652
|
-
TwentySix,
|
|
2653
|
-
z.ZodTypeDef,
|
|
2654
|
-
unknown
|
|
2655
|
-
> = z.object({
|
|
2656
|
-
type: z.literal("most_repeated_words"),
|
|
2657
|
-
});
|
|
2658
|
-
|
|
2659
|
-
export function twentySixFromJSON(
|
|
2660
|
-
jsonString: string,
|
|
2661
|
-
): SafeParseResult<TwentySix, SDKValidationError> {
|
|
2662
|
-
return safeParse(
|
|
2663
|
-
jsonString,
|
|
2664
|
-
(x) => TwentySix$inboundSchema.parse(JSON.parse(x)),
|
|
2665
|
-
`Failed to parse 'TwentySix' from JSON`,
|
|
2666
|
-
);
|
|
2667
|
-
}
|
|
2668
|
-
|
|
2669
|
-
/** @internal */
|
|
2670
|
-
export const TwentyFive$inboundSchema: z.ZodType<
|
|
2671
|
-
TwentyFive,
|
|
2672
|
-
z.ZodTypeDef,
|
|
2673
|
-
unknown
|
|
2674
|
-
> = z.object({
|
|
2675
|
-
type: z.literal("keywords_match"),
|
|
2676
|
-
keywords: z.array(z.string()),
|
|
2677
|
-
});
|
|
2678
|
-
|
|
2679
|
-
export function twentyFiveFromJSON(
|
|
2680
|
-
jsonString: string,
|
|
2681
|
-
): SafeParseResult<TwentyFive, SDKValidationError> {
|
|
2682
|
-
return safeParse(
|
|
2683
|
-
jsonString,
|
|
2684
|
-
(x) => TwentyFive$inboundSchema.parse(JSON.parse(x)),
|
|
2685
|
-
`Failed to parse 'TwentyFive' from JSON`,
|
|
2686
|
-
);
|
|
2687
|
-
}
|
|
2688
|
-
|
|
2689
|
-
/** @internal */
|
|
2690
|
-
export const TwentyFour$inboundSchema: z.ZodType<
|
|
2691
|
-
TwentyFour,
|
|
2692
|
-
z.ZodTypeDef,
|
|
2693
|
-
unknown
|
|
2694
|
-
> = z.object({
|
|
2695
|
-
type: z.literal("levenshtein_distance"),
|
|
2696
|
-
});
|
|
2697
|
-
|
|
2698
|
-
export function twentyFourFromJSON(
|
|
2699
|
-
jsonString: string,
|
|
2700
|
-
): SafeParseResult<TwentyFour, SDKValidationError> {
|
|
2701
|
-
return safeParse(
|
|
2702
|
-
jsonString,
|
|
2703
|
-
(x) => TwentyFour$inboundSchema.parse(JSON.parse(x)),
|
|
2704
|
-
`Failed to parse 'TwentyFour' from JSON`,
|
|
2705
|
-
);
|
|
2706
|
-
}
|
|
2707
|
-
|
|
2708
|
-
/** @internal */
|
|
2709
|
-
export const TwentyThree$inboundSchema: z.ZodType<
|
|
2710
|
-
TwentyThree,
|
|
2711
|
-
z.ZodTypeDef,
|
|
2712
|
-
unknown
|
|
2713
|
-
> = z.object({
|
|
2714
|
-
type: z.literal("cosine_similarity"),
|
|
2715
|
-
});
|
|
2716
|
-
|
|
2717
|
-
export function twentyThreeFromJSON(
|
|
2718
|
-
jsonString: string,
|
|
2719
|
-
): SafeParseResult<TwentyThree, SDKValidationError> {
|
|
2720
|
-
return safeParse(
|
|
2721
|
-
jsonString,
|
|
2722
|
-
(x) => TwentyThree$inboundSchema.parse(JSON.parse(x)),
|
|
2723
|
-
`Failed to parse 'TwentyThree' from JSON`,
|
|
2724
|
-
);
|
|
2725
|
-
}
|
|
2726
|
-
|
|
2727
|
-
/** @internal */
|
|
2728
|
-
export const TwentyTwo$inboundSchema: z.ZodType<
|
|
2729
|
-
TwentyTwo,
|
|
2730
|
-
z.ZodTypeDef,
|
|
2731
|
-
unknown
|
|
2732
|
-
> = z.object({
|
|
2733
|
-
type: z.literal("meteor_score"),
|
|
2734
|
-
});
|
|
2735
|
-
|
|
2736
|
-
export function twentyTwoFromJSON(
|
|
2737
|
-
jsonString: string,
|
|
2738
|
-
): SafeParseResult<TwentyTwo, SDKValidationError> {
|
|
2739
|
-
return safeParse(
|
|
2740
|
-
jsonString,
|
|
2741
|
-
(x) => TwentyTwo$inboundSchema.parse(JSON.parse(x)),
|
|
2742
|
-
`Failed to parse 'TwentyTwo' from JSON`,
|
|
2743
|
-
);
|
|
2744
|
-
}
|
|
2745
|
-
|
|
2746
|
-
/** @internal */
|
|
2747
|
-
export const TwentyOne$inboundSchema: z.ZodType<
|
|
2748
|
-
TwentyOne,
|
|
2749
|
-
z.ZodTypeDef,
|
|
2750
|
-
unknown
|
|
2751
|
-
> = z.object({
|
|
2752
|
-
type: z.literal("rouge_n"),
|
|
2753
|
-
});
|
|
2754
|
-
|
|
2755
|
-
export function twentyOneFromJSON(
|
|
2756
|
-
jsonString: string,
|
|
2757
|
-
): SafeParseResult<TwentyOne, SDKValidationError> {
|
|
2758
|
-
return safeParse(
|
|
2759
|
-
jsonString,
|
|
2760
|
-
(x) => TwentyOne$inboundSchema.parse(JSON.parse(x)),
|
|
2761
|
-
`Failed to parse 'TwentyOne' from JSON`,
|
|
2762
|
-
);
|
|
2763
|
-
}
|
|
2764
|
-
|
|
2765
|
-
/** @internal */
|
|
2766
|
-
export const Twenty$inboundSchema: z.ZodType<Twenty, z.ZodTypeDef, unknown> = z
|
|
2767
|
-
.object({
|
|
2768
|
-
type: z.literal("bleu_score"),
|
|
2769
|
-
});
|
|
2770
|
-
|
|
2771
|
-
export function twentyFromJSON(
|
|
2772
|
-
jsonString: string,
|
|
2773
|
-
): SafeParseResult<Twenty, SDKValidationError> {
|
|
2774
|
-
return safeParse(
|
|
2775
|
-
jsonString,
|
|
2776
|
-
(x) => Twenty$inboundSchema.parse(JSON.parse(x)),
|
|
2777
|
-
`Failed to parse 'Twenty' from JSON`,
|
|
2778
|
-
);
|
|
2779
|
-
}
|
|
2780
|
-
|
|
2781
|
-
/** @internal */
|
|
2782
|
-
export const Nineteen$inboundSchema: z.ZodType<
|
|
2783
|
-
Nineteen,
|
|
2784
|
-
z.ZodTypeDef,
|
|
2785
|
-
unknown
|
|
2786
|
-
> = z.object({
|
|
2787
|
-
type: z.literal("bert_score"),
|
|
2788
|
-
});
|
|
2789
|
-
|
|
2790
|
-
export function nineteenFromJSON(
|
|
2791
|
-
jsonString: string,
|
|
2792
|
-
): SafeParseResult<Nineteen, SDKValidationError> {
|
|
2793
|
-
return safeParse(
|
|
2794
|
-
jsonString,
|
|
2795
|
-
(x) => Nineteen$inboundSchema.parse(JSON.parse(x)),
|
|
2796
|
-
`Failed to parse 'Nineteen' from JSON`,
|
|
2797
|
-
);
|
|
2798
|
-
}
|
|
2799
|
-
|
|
2800
|
-
/** @internal */
|
|
2801
|
-
export const Eighteen$inboundSchema: z.ZodType<
|
|
2802
|
-
Eighteen,
|
|
2803
|
-
z.ZodTypeDef,
|
|
2804
|
-
unknown
|
|
2805
|
-
> = z.object({
|
|
2806
|
-
type: z.literal("moderations_google"),
|
|
2807
|
-
});
|
|
2808
|
-
|
|
2809
|
-
export function eighteenFromJSON(
|
|
2810
|
-
jsonString: string,
|
|
2811
|
-
): SafeParseResult<Eighteen, SDKValidationError> {
|
|
2812
|
-
return safeParse(
|
|
2813
|
-
jsonString,
|
|
2814
|
-
(x) => Eighteen$inboundSchema.parse(JSON.parse(x)),
|
|
2815
|
-
`Failed to parse 'Eighteen' from JSON`,
|
|
2816
|
-
);
|
|
2817
|
-
}
|
|
2818
|
-
|
|
2819
|
-
/** @internal */
|
|
2820
|
-
export const Seventeen$inboundSchema: z.ZodType<
|
|
2821
|
-
Seventeen,
|
|
2822
|
-
z.ZodTypeDef,
|
|
2823
|
-
unknown
|
|
2824
|
-
> = z.object({
|
|
2825
|
-
type: z.literal("moderations_openai"),
|
|
2826
|
-
});
|
|
2827
|
-
|
|
2828
|
-
export function seventeenFromJSON(
|
|
2829
|
-
jsonString: string,
|
|
2830
|
-
): SafeParseResult<Seventeen, SDKValidationError> {
|
|
2831
|
-
return safeParse(
|
|
2832
|
-
jsonString,
|
|
2833
|
-
(x) => Seventeen$inboundSchema.parse(JSON.parse(x)),
|
|
2834
|
-
`Failed to parse 'Seventeen' from JSON`,
|
|
2835
|
-
);
|
|
2836
|
-
}
|
|
2837
|
-
|
|
2838
|
-
/** @internal */
|
|
2839
|
-
export const Sixteen$inboundSchema: z.ZodType<Sixteen, z.ZodTypeDef, unknown> =
|
|
2840
|
-
z.object({
|
|
2841
|
-
type: z.literal("is_valid_json"),
|
|
2842
|
-
});
|
|
2843
|
-
|
|
2844
|
-
export function sixteenFromJSON(
|
|
2845
|
-
jsonString: string,
|
|
2846
|
-
): SafeParseResult<Sixteen, SDKValidationError> {
|
|
2847
|
-
return safeParse(
|
|
2848
|
-
jsonString,
|
|
2849
|
-
(x) => Sixteen$inboundSchema.parse(JSON.parse(x)),
|
|
2850
|
-
`Failed to parse 'Sixteen' from JSON`,
|
|
2851
|
-
);
|
|
2852
|
-
}
|
|
2853
|
-
|
|
2854
|
-
/** @internal */
|
|
2855
|
-
export const Fifteen$inboundSchema: z.ZodType<Fifteen, z.ZodTypeDef, unknown> =
|
|
2856
|
-
z.object({
|
|
2857
|
-
type: z.literal("regex"),
|
|
2858
|
-
pattern: z.string(),
|
|
2859
|
-
});
|
|
2860
|
-
|
|
2861
|
-
export function fifteenFromJSON(
|
|
2862
|
-
jsonString: string,
|
|
2863
|
-
): SafeParseResult<Fifteen, SDKValidationError> {
|
|
2864
|
-
return safeParse(
|
|
2865
|
-
jsonString,
|
|
2866
|
-
(x) => Fifteen$inboundSchema.parse(JSON.parse(x)),
|
|
2867
|
-
`Failed to parse 'Fifteen' from JSON`,
|
|
2868
|
-
);
|
|
2869
|
-
}
|
|
2870
|
-
|
|
2871
|
-
/** @internal */
|
|
2872
|
-
export const Fourteen$inboundSchema: z.ZodType<
|
|
2873
|
-
Fourteen,
|
|
2874
|
-
z.ZodTypeDef,
|
|
2875
|
-
unknown
|
|
2876
|
-
> = z.object({
|
|
2877
|
-
type: z.literal("one_line"),
|
|
2878
|
-
});
|
|
2879
|
-
|
|
2880
|
-
export function fourteenFromJSON(
|
|
2881
|
-
jsonString: string,
|
|
2882
|
-
): SafeParseResult<Fourteen, SDKValidationError> {
|
|
2883
|
-
return safeParse(
|
|
2884
|
-
jsonString,
|
|
2885
|
-
(x) => Fourteen$inboundSchema.parse(JSON.parse(x)),
|
|
2886
|
-
`Failed to parse 'Fourteen' from JSON`,
|
|
2887
|
-
);
|
|
2888
|
-
}
|
|
2889
|
-
|
|
2890
|
-
/** @internal */
|
|
2891
|
-
export const Thirteen$inboundSchema: z.ZodType<
|
|
2892
|
-
Thirteen,
|
|
2893
|
-
z.ZodTypeDef,
|
|
2894
|
-
unknown
|
|
2895
|
-
> = z.object({
|
|
2896
|
-
type: z.literal("length_greater_than"),
|
|
2897
|
-
value: z.number(),
|
|
2898
|
-
});
|
|
2899
|
-
|
|
2900
|
-
export function thirteenFromJSON(
|
|
2901
|
-
jsonString: string,
|
|
2902
|
-
): SafeParseResult<Thirteen, SDKValidationError> {
|
|
2903
|
-
return safeParse(
|
|
2904
|
-
jsonString,
|
|
2905
|
-
(x) => Thirteen$inboundSchema.parse(JSON.parse(x)),
|
|
2906
|
-
`Failed to parse 'Thirteen' from JSON`,
|
|
2907
|
-
);
|
|
2908
|
-
}
|
|
2909
|
-
|
|
2910
|
-
/** @internal */
|
|
2911
|
-
export const Twelve$inboundSchema: z.ZodType<Twelve, z.ZodTypeDef, unknown> = z
|
|
2912
|
-
.object({
|
|
2913
|
-
type: z.literal("length_between"),
|
|
2914
|
-
min: z.number(),
|
|
2915
|
-
max: z.number(),
|
|
2916
|
-
});
|
|
2917
|
-
|
|
2918
|
-
export function twelveFromJSON(
|
|
2919
|
-
jsonString: string,
|
|
2920
|
-
): SafeParseResult<Twelve, SDKValidationError> {
|
|
2921
|
-
return safeParse(
|
|
2922
|
-
jsonString,
|
|
2923
|
-
(x) => Twelve$inboundSchema.parse(JSON.parse(x)),
|
|
2924
|
-
`Failed to parse 'Twelve' from JSON`,
|
|
2925
|
-
);
|
|
2926
|
-
}
|
|
2927
|
-
|
|
2928
|
-
/** @internal */
|
|
2929
|
-
export const Eleven$inboundSchema: z.ZodType<Eleven, z.ZodTypeDef, unknown> = z
|
|
2930
|
-
.object({
|
|
2931
|
-
type: z.literal("length_less_than"),
|
|
2932
|
-
value: z.number(),
|
|
2933
|
-
});
|
|
2934
|
-
|
|
2935
|
-
export function elevenFromJSON(
|
|
2936
|
-
jsonString: string,
|
|
2937
|
-
): SafeParseResult<Eleven, SDKValidationError> {
|
|
2938
|
-
return safeParse(
|
|
2939
|
-
jsonString,
|
|
2940
|
-
(x) => Eleven$inboundSchema.parse(JSON.parse(x)),
|
|
2941
|
-
`Failed to parse 'Eleven' from JSON`,
|
|
2942
|
-
);
|
|
2943
|
-
}
|
|
2944
|
-
|
|
2945
|
-
/** @internal */
|
|
2946
|
-
export const Ten$inboundSchema: z.ZodType<Ten, z.ZodTypeDef, unknown> = z
|
|
2947
|
-
.object({
|
|
2948
|
-
type: z.literal("exact_match"),
|
|
2949
|
-
});
|
|
2950
|
-
|
|
2951
|
-
export function tenFromJSON(
|
|
2952
|
-
jsonString: string,
|
|
2953
|
-
): SafeParseResult<Ten, SDKValidationError> {
|
|
2954
|
-
return safeParse(
|
|
2955
|
-
jsonString,
|
|
2956
|
-
(x) => Ten$inboundSchema.parse(JSON.parse(x)),
|
|
2957
|
-
`Failed to parse 'Ten' from JSON`,
|
|
2958
|
-
);
|
|
2959
|
-
}
|
|
2960
|
-
|
|
2961
|
-
/** @internal */
|
|
2962
|
-
export const Nine$inboundSchema: z.ZodType<Nine, z.ZodTypeDef, unknown> = z
|
|
2963
|
-
.object({
|
|
2964
|
-
type: z.literal("ends_with"),
|
|
2965
|
-
value: z.string(),
|
|
2966
|
-
});
|
|
2967
|
-
|
|
2968
|
-
export function nineFromJSON(
|
|
2969
|
-
jsonString: string,
|
|
2970
|
-
): SafeParseResult<Nine, SDKValidationError> {
|
|
2971
|
-
return safeParse(
|
|
2972
|
-
jsonString,
|
|
2973
|
-
(x) => Nine$inboundSchema.parse(JSON.parse(x)),
|
|
2974
|
-
`Failed to parse 'Nine' from JSON`,
|
|
2975
|
-
);
|
|
2976
|
-
}
|
|
2977
|
-
|
|
2978
|
-
/** @internal */
|
|
2979
|
-
export const Eight$inboundSchema: z.ZodType<Eight, z.ZodTypeDef, unknown> = z
|
|
2980
|
-
.object({
|
|
2981
|
-
type: z.literal("start_with"),
|
|
2982
|
-
value: z.string(),
|
|
2983
|
-
});
|
|
2984
|
-
|
|
2985
|
-
export function eightFromJSON(
|
|
2986
|
-
jsonString: string,
|
|
2987
|
-
): SafeParseResult<Eight, SDKValidationError> {
|
|
2988
|
-
return safeParse(
|
|
2989
|
-
jsonString,
|
|
2990
|
-
(x) => Eight$inboundSchema.parse(JSON.parse(x)),
|
|
2991
|
-
`Failed to parse 'Eight' from JSON`,
|
|
2992
|
-
);
|
|
2993
|
-
}
|
|
2994
|
-
|
|
2995
|
-
/** @internal */
|
|
2996
|
-
export const Seven$inboundSchema: z.ZodType<Seven, z.ZodTypeDef, unknown> = z
|
|
2997
|
-
.object({
|
|
2998
|
-
type: z.literal("contains_valid_link"),
|
|
2999
|
-
});
|
|
3000
|
-
|
|
3001
|
-
export function sevenFromJSON(
|
|
3002
|
-
jsonString: string,
|
|
3003
|
-
): SafeParseResult<Seven, SDKValidationError> {
|
|
3004
|
-
return safeParse(
|
|
3005
|
-
jsonString,
|
|
3006
|
-
(x) => Seven$inboundSchema.parse(JSON.parse(x)),
|
|
3007
|
-
`Failed to parse 'Seven' from JSON`,
|
|
3008
|
-
);
|
|
3009
|
-
}
|
|
3010
|
-
|
|
3011
|
-
/** @internal */
|
|
3012
|
-
export const Six$inboundSchema: z.ZodType<Six, z.ZodTypeDef, unknown> = z
|
|
3013
|
-
.object({
|
|
3014
|
-
type: z.literal("contains_url"),
|
|
3015
|
-
});
|
|
3016
|
-
|
|
3017
|
-
export function sixFromJSON(
|
|
3018
|
-
jsonString: string,
|
|
3019
|
-
): SafeParseResult<Six, SDKValidationError> {
|
|
3020
|
-
return safeParse(
|
|
3021
|
-
jsonString,
|
|
3022
|
-
(x) => Six$inboundSchema.parse(JSON.parse(x)),
|
|
3023
|
-
`Failed to parse 'Six' from JSON`,
|
|
3024
|
-
);
|
|
3025
|
-
}
|
|
3026
|
-
|
|
3027
|
-
/** @internal */
|
|
3028
|
-
export const Five$inboundSchema: z.ZodType<Five, z.ZodTypeDef, unknown> = z
|
|
3029
|
-
.object({
|
|
3030
|
-
type: z.literal("contains_email"),
|
|
3031
|
-
});
|
|
3032
|
-
|
|
3033
|
-
export function fiveFromJSON(
|
|
3034
|
-
jsonString: string,
|
|
3035
|
-
): SafeParseResult<Five, SDKValidationError> {
|
|
3036
|
-
return safeParse(
|
|
3037
|
-
jsonString,
|
|
3038
|
-
(x) => Five$inboundSchema.parse(JSON.parse(x)),
|
|
3039
|
-
`Failed to parse 'Five' from JSON`,
|
|
3040
|
-
);
|
|
3041
|
-
}
|
|
3042
|
-
|
|
3043
|
-
/** @internal */
|
|
3044
|
-
export const CreateEvalFunctionParams4$inboundSchema: z.ZodType<
|
|
3045
|
-
CreateEvalFunctionParams4,
|
|
3046
|
-
z.ZodTypeDef,
|
|
3047
|
-
unknown
|
|
3048
|
-
> = z.object({
|
|
3049
|
-
type: z.literal("contains_any"),
|
|
3050
|
-
keywords: z.array(z.string()),
|
|
3051
|
-
});
|
|
3052
|
-
|
|
3053
|
-
export function createEvalFunctionParams4FromJSON(
|
|
3054
|
-
jsonString: string,
|
|
3055
|
-
): SafeParseResult<CreateEvalFunctionParams4, SDKValidationError> {
|
|
3056
|
-
return safeParse(
|
|
3057
|
-
jsonString,
|
|
3058
|
-
(x) => CreateEvalFunctionParams4$inboundSchema.parse(JSON.parse(x)),
|
|
3059
|
-
`Failed to parse 'CreateEvalFunctionParams4' from JSON`,
|
|
3060
|
-
);
|
|
3061
|
-
}
|
|
3062
|
-
|
|
3063
|
-
/** @internal */
|
|
3064
|
-
export const CreateEvalFunctionParams3$inboundSchema: z.ZodType<
|
|
3065
|
-
CreateEvalFunctionParams3,
|
|
3066
|
-
z.ZodTypeDef,
|
|
3067
|
-
unknown
|
|
3068
|
-
> = z.object({
|
|
3069
|
-
type: z.literal("contains_all"),
|
|
3070
|
-
keywords: z.array(z.string()),
|
|
3071
|
-
});
|
|
3072
|
-
|
|
3073
|
-
export function createEvalFunctionParams3FromJSON(
|
|
3074
|
-
jsonString: string,
|
|
3075
|
-
): SafeParseResult<CreateEvalFunctionParams3, SDKValidationError> {
|
|
3076
|
-
return safeParse(
|
|
3077
|
-
jsonString,
|
|
3078
|
-
(x) => CreateEvalFunctionParams3$inboundSchema.parse(JSON.parse(x)),
|
|
3079
|
-
`Failed to parse 'CreateEvalFunctionParams3' from JSON`,
|
|
3080
|
-
);
|
|
3081
|
-
}
|
|
3082
|
-
|
|
3083
|
-
/** @internal */
|
|
3084
|
-
export const FunctionParams2$inboundSchema: z.ZodType<
|
|
3085
|
-
FunctionParams2,
|
|
3086
|
-
z.ZodTypeDef,
|
|
3087
|
-
unknown
|
|
3088
|
-
> = z.object({
|
|
3089
|
-
type: z.literal("contains_none"),
|
|
3090
|
-
keywords: z.array(z.string()),
|
|
3091
|
-
});
|
|
3092
|
-
|
|
3093
|
-
export function functionParams2FromJSON(
|
|
3094
|
-
jsonString: string,
|
|
3095
|
-
): SafeParseResult<FunctionParams2, SDKValidationError> {
|
|
3096
|
-
return safeParse(
|
|
3097
|
-
jsonString,
|
|
3098
|
-
(x) => FunctionParams2$inboundSchema.parse(JSON.parse(x)),
|
|
3099
|
-
`Failed to parse 'FunctionParams2' from JSON`,
|
|
3100
|
-
);
|
|
3101
|
-
}
|
|
3102
|
-
|
|
3103
|
-
/** @internal */
|
|
3104
|
-
export const FunctionParams1$inboundSchema: z.ZodType<
|
|
3105
|
-
FunctionParams1,
|
|
3106
|
-
z.ZodTypeDef,
|
|
3107
|
-
unknown
|
|
3108
|
-
> = z.object({
|
|
3109
|
-
type: z.literal("contains"),
|
|
3110
|
-
value: z.string(),
|
|
3111
|
-
});
|
|
3112
|
-
|
|
3113
|
-
export function functionParams1FromJSON(
|
|
3114
|
-
jsonString: string,
|
|
3115
|
-
): SafeParseResult<FunctionParams1, SDKValidationError> {
|
|
3116
|
-
return safeParse(
|
|
3117
|
-
jsonString,
|
|
3118
|
-
(x) => FunctionParams1$inboundSchema.parse(JSON.parse(x)),
|
|
3119
|
-
`Failed to parse 'FunctionParams1' from JSON`,
|
|
3120
|
-
);
|
|
3121
|
-
}
|
|
3122
|
-
|
|
3123
|
-
/** @internal */
|
|
3124
|
-
export const FunctionParams$inboundSchema: z.ZodType<
|
|
3125
|
-
FunctionParams,
|
|
3126
|
-
z.ZodTypeDef,
|
|
3127
|
-
unknown
|
|
3128
|
-
> = z.union([
|
|
3129
|
-
z.lazy(() => FunctionParams1$inboundSchema),
|
|
3130
|
-
z.lazy(() => FunctionParams2$inboundSchema),
|
|
3131
|
-
z.lazy(() => CreateEvalFunctionParams3$inboundSchema),
|
|
3132
|
-
z.lazy(() => CreateEvalFunctionParams4$inboundSchema),
|
|
3133
|
-
z.lazy(() => Five$inboundSchema),
|
|
3134
|
-
z.lazy(() => Six$inboundSchema),
|
|
3135
|
-
z.lazy(() => Seven$inboundSchema),
|
|
3136
|
-
z.lazy(() => Eight$inboundSchema),
|
|
3137
|
-
z.lazy(() => Nine$inboundSchema),
|
|
3138
|
-
z.lazy(() => Ten$inboundSchema),
|
|
3139
|
-
z.lazy(() => Eleven$inboundSchema),
|
|
3140
|
-
z.lazy(() => Twelve$inboundSchema),
|
|
3141
|
-
z.lazy(() => Thirteen$inboundSchema),
|
|
3142
|
-
z.lazy(() => Fourteen$inboundSchema),
|
|
3143
|
-
z.lazy(() => Fifteen$inboundSchema),
|
|
3144
|
-
z.lazy(() => Sixteen$inboundSchema),
|
|
3145
|
-
z.lazy(() => Seventeen$inboundSchema),
|
|
3146
|
-
z.lazy(() => Eighteen$inboundSchema),
|
|
3147
|
-
z.lazy(() => Nineteen$inboundSchema),
|
|
3148
|
-
z.lazy(() => Twenty$inboundSchema),
|
|
3149
|
-
z.lazy(() => TwentyOne$inboundSchema),
|
|
3150
|
-
z.lazy(() => TwentyTwo$inboundSchema),
|
|
3151
|
-
z.lazy(() => TwentyThree$inboundSchema),
|
|
3152
|
-
z.lazy(() => TwentyFour$inboundSchema),
|
|
3153
|
-
z.lazy(() => TwentyFive$inboundSchema),
|
|
3154
|
-
z.lazy(() => TwentySix$inboundSchema),
|
|
3155
|
-
z.lazy(() => TwentySeven$inboundSchema),
|
|
3156
|
-
z.lazy(() => TwentyEight$inboundSchema),
|
|
3157
|
-
z.lazy(() => TwentyNine$inboundSchema),
|
|
3158
|
-
z.lazy(() => Thirty$inboundSchema),
|
|
3159
|
-
z.lazy(() => ThirtyOne$inboundSchema),
|
|
3160
|
-
z.lazy(() => ThirtyTwo$inboundSchema),
|
|
3161
|
-
]);
|
|
3162
|
-
|
|
3163
|
-
export function functionParamsFromJSON(
|
|
3164
|
-
jsonString: string,
|
|
3165
|
-
): SafeParseResult<FunctionParams, SDKValidationError> {
|
|
3166
|
-
return safeParse(
|
|
3167
|
-
jsonString,
|
|
3168
|
-
(x) => FunctionParams$inboundSchema.parse(JSON.parse(x)),
|
|
3169
|
-
`Failed to parse 'FunctionParams' from JSON`,
|
|
3170
|
-
);
|
|
3171
|
-
}
|
|
3172
|
-
|
|
3173
|
-
/** @internal */
|
|
3174
|
-
export const CreateEvalResponseBodyFunction$inboundSchema: z.ZodType<
|
|
3175
|
-
CreateEvalResponseBodyFunction,
|
|
3176
|
-
z.ZodTypeDef,
|
|
3177
|
-
unknown
|
|
3178
|
-
> = z.object({
|
|
3179
|
-
_id: z.string(),
|
|
3180
|
-
description: z.string(),
|
|
3181
|
-
created: z.string().default("2026-03-10T17:52:42.263Z"),
|
|
3182
|
-
updated: z.string().default("2026-03-10T17:52:42.263Z"),
|
|
3183
|
-
guardrail_config: z.union([
|
|
3184
|
-
z.lazy(() =>
|
|
3185
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$inboundSchema
|
|
3186
|
-
),
|
|
3187
|
-
z.lazy(() =>
|
|
3188
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema
|
|
3189
|
-
),
|
|
3190
|
-
]).optional(),
|
|
3191
|
-
type: CreateEvalResponseBodyEvalsResponseType$inboundSchema,
|
|
3192
|
-
function_params: z.union([
|
|
3193
|
-
z.lazy(() => FunctionParams1$inboundSchema),
|
|
3194
|
-
z.lazy(() => FunctionParams2$inboundSchema),
|
|
3195
|
-
z.lazy(() => CreateEvalFunctionParams3$inboundSchema),
|
|
3196
|
-
z.lazy(() => CreateEvalFunctionParams4$inboundSchema),
|
|
3197
|
-
z.lazy(() => Five$inboundSchema),
|
|
3198
|
-
z.lazy(() => Six$inboundSchema),
|
|
3199
|
-
z.lazy(() => Seven$inboundSchema),
|
|
3200
|
-
z.lazy(() => Eight$inboundSchema),
|
|
3201
|
-
z.lazy(() => Nine$inboundSchema),
|
|
3202
|
-
z.lazy(() => Ten$inboundSchema),
|
|
3203
|
-
z.lazy(() => Eleven$inboundSchema),
|
|
3204
|
-
z.lazy(() => Twelve$inboundSchema),
|
|
3205
|
-
z.lazy(() => Thirteen$inboundSchema),
|
|
3206
|
-
z.lazy(() => Fourteen$inboundSchema),
|
|
3207
|
-
z.lazy(() => Fifteen$inboundSchema),
|
|
3208
|
-
z.lazy(() => Sixteen$inboundSchema),
|
|
3209
|
-
z.lazy(() => Seventeen$inboundSchema),
|
|
3210
|
-
z.lazy(() => Eighteen$inboundSchema),
|
|
3211
|
-
z.lazy(() => Nineteen$inboundSchema),
|
|
3212
|
-
z.lazy(() => Twenty$inboundSchema),
|
|
3213
|
-
z.lazy(() => TwentyOne$inboundSchema),
|
|
3214
|
-
z.lazy(() => TwentyTwo$inboundSchema),
|
|
3215
|
-
z.lazy(() => TwentyThree$inboundSchema),
|
|
3216
|
-
z.lazy(() => TwentyFour$inboundSchema),
|
|
3217
|
-
z.lazy(() => TwentyFive$inboundSchema),
|
|
3218
|
-
z.lazy(() => TwentySix$inboundSchema),
|
|
3219
|
-
z.lazy(() => TwentySeven$inboundSchema),
|
|
3220
|
-
z.lazy(() => TwentyEight$inboundSchema),
|
|
3221
|
-
z.lazy(() => TwentyNine$inboundSchema),
|
|
3222
|
-
z.lazy(() => Thirty$inboundSchema),
|
|
3223
|
-
z.lazy(() => ThirtyOne$inboundSchema),
|
|
3224
|
-
z.lazy(() => ThirtyTwo$inboundSchema),
|
|
3225
|
-
]),
|
|
3226
|
-
key: z.string(),
|
|
3227
|
-
}).transform((v) => {
|
|
3228
|
-
return remap$(v, {
|
|
3229
|
-
"_id": "id",
|
|
3230
|
-
"guardrail_config": "guardrailConfig",
|
|
3231
|
-
"function_params": "functionParams",
|
|
3232
|
-
});
|
|
3233
|
-
});
|
|
3234
|
-
|
|
3235
|
-
export function createEvalResponseBodyFunctionFromJSON(
|
|
3236
|
-
jsonString: string,
|
|
3237
|
-
): SafeParseResult<CreateEvalResponseBodyFunction, SDKValidationError> {
|
|
3238
|
-
return safeParse(
|
|
3239
|
-
jsonString,
|
|
3240
|
-
(x) => CreateEvalResponseBodyFunction$inboundSchema.parse(JSON.parse(x)),
|
|
3241
|
-
`Failed to parse 'CreateEvalResponseBodyFunction' from JSON`,
|
|
3242
|
-
);
|
|
3243
|
-
}
|
|
3244
|
-
|
|
3245
|
-
/** @internal */
|
|
3246
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator$inboundSchema:
|
|
3247
|
-
z.ZodNativeEnum<
|
|
3248
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator
|
|
3249
|
-
> = z.nativeEnum(
|
|
3250
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator,
|
|
3251
|
-
);
|
|
3252
|
-
|
|
3253
|
-
/** @internal */
|
|
3254
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema:
|
|
3255
|
-
z.ZodType<
|
|
3256
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber,
|
|
3257
|
-
z.ZodTypeDef,
|
|
3258
|
-
unknown
|
|
3259
|
-
> = z.object({
|
|
3260
|
-
enabled: z.boolean(),
|
|
3261
|
-
alert_on_failure: z.boolean().default(false),
|
|
3262
|
-
type: z.literal("number"),
|
|
3263
|
-
value: z.number(),
|
|
3264
|
-
operator:
|
|
3265
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator$inboundSchema,
|
|
3266
|
-
}).transform((v) => {
|
|
3267
|
-
return remap$(v, {
|
|
3268
|
-
"alert_on_failure": "alertOnFailure",
|
|
3269
|
-
});
|
|
3270
|
-
});
|
|
3271
|
-
|
|
3272
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONNumberFromJSON(
|
|
3273
|
-
jsonString: string,
|
|
3274
|
-
): SafeParseResult<
|
|
3275
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber,
|
|
3276
|
-
SDKValidationError
|
|
3277
|
-
> {
|
|
3278
|
-
return safeParse(
|
|
3279
|
-
jsonString,
|
|
3280
|
-
(x) =>
|
|
3281
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema
|
|
3282
|
-
.parse(JSON.parse(x)),
|
|
3283
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber' from JSON`,
|
|
3284
|
-
);
|
|
3285
|
-
}
|
|
3286
|
-
|
|
3287
|
-
/** @internal */
|
|
3288
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$inboundSchema:
|
|
3289
|
-
z.ZodType<
|
|
3290
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean,
|
|
3291
|
-
z.ZodTypeDef,
|
|
3292
|
-
unknown
|
|
3293
|
-
> = z.object({
|
|
3294
|
-
enabled: z.boolean(),
|
|
3295
|
-
alert_on_failure: z.boolean().default(false),
|
|
3296
|
-
type: z.literal("boolean"),
|
|
3297
|
-
value: z.boolean(),
|
|
3298
|
-
}).transform((v) => {
|
|
3299
|
-
return remap$(v, {
|
|
3300
|
-
"alert_on_failure": "alertOnFailure",
|
|
3301
|
-
});
|
|
3302
|
-
});
|
|
3303
|
-
|
|
3304
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONBooleanFromJSON(
|
|
3305
|
-
jsonString: string,
|
|
3306
|
-
): SafeParseResult<
|
|
3307
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean,
|
|
3308
|
-
SDKValidationError
|
|
3309
|
-
> {
|
|
3310
|
-
return safeParse(
|
|
3311
|
-
jsonString,
|
|
3312
|
-
(x) =>
|
|
3313
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$inboundSchema
|
|
3314
|
-
.parse(JSON.parse(x)),
|
|
3315
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean' from JSON`,
|
|
3316
|
-
);
|
|
3317
|
-
}
|
|
3318
|
-
|
|
3319
|
-
/** @internal */
|
|
3320
|
-
export const CreateEvalResponseBodyEvalsGuardrailConfig$inboundSchema:
|
|
3321
|
-
z.ZodType<CreateEvalResponseBodyEvalsGuardrailConfig, z.ZodTypeDef, unknown> =
|
|
3322
|
-
z.union([
|
|
3323
|
-
z.lazy(() =>
|
|
3324
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$inboundSchema
|
|
3325
|
-
),
|
|
3326
|
-
z.lazy(() =>
|
|
3327
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema
|
|
3328
|
-
),
|
|
3329
|
-
]);
|
|
3330
|
-
|
|
3331
|
-
export function createEvalResponseBodyEvalsGuardrailConfigFromJSON(
|
|
3332
|
-
jsonString: string,
|
|
3333
|
-
): SafeParseResult<
|
|
3334
|
-
CreateEvalResponseBodyEvalsGuardrailConfig,
|
|
3335
|
-
SDKValidationError
|
|
3336
|
-
> {
|
|
3337
|
-
return safeParse(
|
|
3338
|
-
jsonString,
|
|
3339
|
-
(x) =>
|
|
3340
|
-
CreateEvalResponseBodyEvalsGuardrailConfig$inboundSchema.parse(
|
|
3341
|
-
JSON.parse(x),
|
|
3342
|
-
),
|
|
3343
|
-
`Failed to parse 'CreateEvalResponseBodyEvalsGuardrailConfig' from JSON`,
|
|
3344
|
-
);
|
|
3345
|
-
}
|
|
3346
|
-
|
|
3347
|
-
/** @internal */
|
|
3348
|
-
export const CreateEvalResponseBodyEvalsType$inboundSchema: z.ZodNativeEnum<
|
|
3349
|
-
typeof CreateEvalResponseBodyEvalsType
|
|
3350
|
-
> = z.nativeEnum(CreateEvalResponseBodyEvalsType);
|
|
3351
|
-
|
|
3352
|
-
/** @internal */
|
|
3353
|
-
export const ResponseBodyPython$inboundSchema: z.ZodType<
|
|
3354
|
-
ResponseBodyPython,
|
|
3355
|
-
z.ZodTypeDef,
|
|
3356
|
-
unknown
|
|
3357
|
-
> = z.object({
|
|
3358
|
-
_id: z.string(),
|
|
3359
|
-
description: z.string(),
|
|
3360
|
-
created: z.string().default("2026-03-10T17:52:42.263Z"),
|
|
3361
|
-
updated: z.string().default("2026-03-10T17:52:42.263Z"),
|
|
3362
|
-
guardrail_config: z.union([
|
|
3363
|
-
z.lazy(() =>
|
|
3364
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$inboundSchema
|
|
3365
|
-
),
|
|
3366
|
-
z.lazy(() =>
|
|
3367
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema
|
|
3368
|
-
),
|
|
3369
|
-
]).optional(),
|
|
3370
|
-
code: z.string(),
|
|
3371
|
-
type: CreateEvalResponseBodyEvalsType$inboundSchema,
|
|
3372
|
-
key: z.string(),
|
|
3373
|
-
}).transform((v) => {
|
|
3374
|
-
return remap$(v, {
|
|
3375
|
-
"_id": "id",
|
|
3376
|
-
"guardrail_config": "guardrailConfig",
|
|
3377
|
-
});
|
|
3378
|
-
});
|
|
3379
|
-
|
|
3380
|
-
export function responseBodyPythonFromJSON(
|
|
3381
|
-
jsonString: string,
|
|
3382
|
-
): SafeParseResult<ResponseBodyPython, SDKValidationError> {
|
|
3383
|
-
return safeParse(
|
|
3384
|
-
jsonString,
|
|
3385
|
-
(x) => ResponseBodyPython$inboundSchema.parse(JSON.parse(x)),
|
|
3386
|
-
`Failed to parse 'ResponseBodyPython' from JSON`,
|
|
3387
|
-
);
|
|
3388
|
-
}
|
|
3389
|
-
|
|
3390
|
-
/** @internal */
|
|
3391
|
-
export const CreateEvalGuardrailConfigEvalsResponse200Operator$inboundSchema:
|
|
3392
|
-
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsResponse200Operator> = z
|
|
3393
|
-
.nativeEnum(CreateEvalGuardrailConfigEvalsResponse200Operator);
|
|
3394
|
-
|
|
3395
|
-
/** @internal */
|
|
3396
|
-
export const CreateEvalGuardrailConfigEvalsResponse200Number$inboundSchema:
|
|
3397
|
-
z.ZodType<
|
|
3398
|
-
CreateEvalGuardrailConfigEvalsResponse200Number,
|
|
3399
|
-
z.ZodTypeDef,
|
|
3400
|
-
unknown
|
|
3401
|
-
> = z.object({
|
|
3402
|
-
enabled: z.boolean(),
|
|
3403
|
-
alert_on_failure: z.boolean().default(false),
|
|
3404
|
-
type: z.literal("number"),
|
|
3405
|
-
value: z.number(),
|
|
3406
|
-
operator: CreateEvalGuardrailConfigEvalsResponse200Operator$inboundSchema,
|
|
3407
|
-
}).transform((v) => {
|
|
3408
|
-
return remap$(v, {
|
|
3409
|
-
"alert_on_failure": "alertOnFailure",
|
|
3410
|
-
});
|
|
3411
|
-
});
|
|
3412
|
-
|
|
3413
|
-
export function createEvalGuardrailConfigEvalsResponse200NumberFromJSON(
|
|
3414
|
-
jsonString: string,
|
|
3415
|
-
): SafeParseResult<
|
|
3416
|
-
CreateEvalGuardrailConfigEvalsResponse200Number,
|
|
3417
|
-
SDKValidationError
|
|
3418
|
-
> {
|
|
3419
|
-
return safeParse(
|
|
3420
|
-
jsonString,
|
|
3421
|
-
(x) =>
|
|
3422
|
-
CreateEvalGuardrailConfigEvalsResponse200Number$inboundSchema.parse(
|
|
3423
|
-
JSON.parse(x),
|
|
3424
|
-
),
|
|
3425
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200Number' from JSON`,
|
|
3426
|
-
);
|
|
3427
|
-
}
|
|
3428
|
-
|
|
3429
|
-
/** @internal */
|
|
3430
|
-
export const CreateEvalGuardrailConfigEvalsResponse200Boolean$inboundSchema:
|
|
3431
|
-
z.ZodType<
|
|
3432
|
-
CreateEvalGuardrailConfigEvalsResponse200Boolean,
|
|
3433
|
-
z.ZodTypeDef,
|
|
3434
|
-
unknown
|
|
3435
|
-
> = z.object({
|
|
3436
|
-
enabled: z.boolean(),
|
|
3437
|
-
alert_on_failure: z.boolean().default(false),
|
|
3438
|
-
type: z.literal("boolean"),
|
|
3439
|
-
value: z.boolean(),
|
|
3440
|
-
}).transform((v) => {
|
|
3441
|
-
return remap$(v, {
|
|
3442
|
-
"alert_on_failure": "alertOnFailure",
|
|
3443
|
-
});
|
|
3444
|
-
});
|
|
3445
|
-
|
|
3446
|
-
export function createEvalGuardrailConfigEvalsResponse200BooleanFromJSON(
|
|
3447
|
-
jsonString: string,
|
|
3448
|
-
): SafeParseResult<
|
|
3449
|
-
CreateEvalGuardrailConfigEvalsResponse200Boolean,
|
|
3450
|
-
SDKValidationError
|
|
3451
|
-
> {
|
|
3452
|
-
return safeParse(
|
|
3453
|
-
jsonString,
|
|
3454
|
-
(x) =>
|
|
3455
|
-
CreateEvalGuardrailConfigEvalsResponse200Boolean$inboundSchema.parse(
|
|
3456
|
-
JSON.parse(x),
|
|
3457
|
-
),
|
|
3458
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200Boolean' from JSON`,
|
|
3459
|
-
);
|
|
3460
|
-
}
|
|
3461
|
-
|
|
3462
|
-
/** @internal */
|
|
3463
|
-
export const CreateEvalResponseBodyGuardrailConfig$inboundSchema: z.ZodType<
|
|
3464
|
-
CreateEvalResponseBodyGuardrailConfig,
|
|
3465
|
-
z.ZodTypeDef,
|
|
3466
|
-
unknown
|
|
3467
|
-
> = z.union([
|
|
3468
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsResponse200Boolean$inboundSchema),
|
|
3469
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsResponse200Number$inboundSchema),
|
|
3470
|
-
]);
|
|
3471
|
-
|
|
3472
|
-
export function createEvalResponseBodyGuardrailConfigFromJSON(
|
|
3473
|
-
jsonString: string,
|
|
3474
|
-
): SafeParseResult<CreateEvalResponseBodyGuardrailConfig, SDKValidationError> {
|
|
3475
|
-
return safeParse(
|
|
3476
|
-
jsonString,
|
|
3477
|
-
(x) =>
|
|
3478
|
-
CreateEvalResponseBodyGuardrailConfig$inboundSchema.parse(JSON.parse(x)),
|
|
3479
|
-
`Failed to parse 'CreateEvalResponseBodyGuardrailConfig' from JSON`,
|
|
3480
|
-
);
|
|
3481
|
-
}
|
|
3482
|
-
|
|
3483
|
-
/** @internal */
|
|
3484
|
-
export const CreateEvalResponseBodyType$inboundSchema: z.ZodNativeEnum<
|
|
3485
|
-
typeof CreateEvalResponseBodyType
|
|
3486
|
-
> = z.nativeEnum(CreateEvalResponseBodyType);
|
|
3487
|
-
|
|
3488
|
-
/** @internal */
|
|
3489
|
-
export const ResponseBodyMethod$inboundSchema: z.ZodNativeEnum<
|
|
3490
|
-
typeof ResponseBodyMethod
|
|
3491
|
-
> = z.nativeEnum(ResponseBodyMethod);
|
|
3492
|
-
|
|
3493
|
-
/** @internal */
|
|
3494
|
-
export const ResponseBodyHTTP$inboundSchema: z.ZodType<
|
|
3495
|
-
ResponseBodyHTTP,
|
|
3496
|
-
z.ZodTypeDef,
|
|
3497
|
-
unknown
|
|
3498
|
-
> = z.object({
|
|
3499
|
-
_id: z.string(),
|
|
3500
|
-
description: z.string(),
|
|
3501
|
-
created: z.string().default("2026-03-10T17:52:42.263Z"),
|
|
3502
|
-
updated: z.string().default("2026-03-10T17:52:42.263Z"),
|
|
3503
|
-
guardrail_config: z.union([
|
|
3504
|
-
z.lazy(() =>
|
|
3505
|
-
CreateEvalGuardrailConfigEvalsResponse200Boolean$inboundSchema
|
|
3506
|
-
),
|
|
3507
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsResponse200Number$inboundSchema),
|
|
3508
|
-
]).optional(),
|
|
3509
|
-
type: CreateEvalResponseBodyType$inboundSchema,
|
|
3510
|
-
url: z.string(),
|
|
3511
|
-
method: ResponseBodyMethod$inboundSchema,
|
|
3512
|
-
headers: z.record(z.string()),
|
|
3513
|
-
payload: z.record(z.any()),
|
|
3514
|
-
key: z.string(),
|
|
3515
|
-
}).transform((v) => {
|
|
3516
|
-
return remap$(v, {
|
|
3517
|
-
"_id": "id",
|
|
3518
|
-
"guardrail_config": "guardrailConfig",
|
|
3519
|
-
});
|
|
3520
|
-
});
|
|
3521
|
-
|
|
3522
|
-
export function responseBodyHTTPFromJSON(
|
|
3523
|
-
jsonString: string,
|
|
3524
|
-
): SafeParseResult<ResponseBodyHTTP, SDKValidationError> {
|
|
3525
|
-
return safeParse(
|
|
3526
|
-
jsonString,
|
|
3527
|
-
(x) => ResponseBodyHTTP$inboundSchema.parse(JSON.parse(x)),
|
|
3528
|
-
`Failed to parse 'ResponseBodyHTTP' from JSON`,
|
|
3529
|
-
);
|
|
3530
|
-
}
|
|
3531
|
-
|
|
3532
|
-
/** @internal */
|
|
3533
|
-
export const CreateEvalGuardrailConfigEvalsResponseOperator$inboundSchema:
|
|
3534
|
-
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsResponseOperator> = z
|
|
3535
|
-
.nativeEnum(CreateEvalGuardrailConfigEvalsResponseOperator);
|
|
3536
|
-
|
|
3537
|
-
/** @internal */
|
|
3538
|
-
export const CreateEvalGuardrailConfigEvalsResponseNumber$inboundSchema:
|
|
3539
|
-
z.ZodType<
|
|
3540
|
-
CreateEvalGuardrailConfigEvalsResponseNumber,
|
|
3541
|
-
z.ZodTypeDef,
|
|
3542
|
-
unknown
|
|
3543
|
-
> = z.object({
|
|
3544
|
-
enabled: z.boolean(),
|
|
3545
|
-
alert_on_failure: z.boolean().default(false),
|
|
3546
|
-
type: z.literal("number"),
|
|
3547
|
-
value: z.number(),
|
|
3548
|
-
operator: CreateEvalGuardrailConfigEvalsResponseOperator$inboundSchema,
|
|
3549
|
-
}).transform((v) => {
|
|
3550
|
-
return remap$(v, {
|
|
3551
|
-
"alert_on_failure": "alertOnFailure",
|
|
3552
|
-
});
|
|
3553
|
-
});
|
|
3554
|
-
|
|
3555
|
-
export function createEvalGuardrailConfigEvalsResponseNumberFromJSON(
|
|
3556
|
-
jsonString: string,
|
|
3557
|
-
): SafeParseResult<
|
|
3558
|
-
CreateEvalGuardrailConfigEvalsResponseNumber,
|
|
3559
|
-
SDKValidationError
|
|
3560
|
-
> {
|
|
3561
|
-
return safeParse(
|
|
3562
|
-
jsonString,
|
|
3563
|
-
(x) =>
|
|
3564
|
-
CreateEvalGuardrailConfigEvalsResponseNumber$inboundSchema.parse(
|
|
3565
|
-
JSON.parse(x),
|
|
3566
|
-
),
|
|
3567
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponseNumber' from JSON`,
|
|
3568
|
-
);
|
|
3569
|
-
}
|
|
3570
|
-
|
|
3571
|
-
/** @internal */
|
|
3572
|
-
export const CreateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema:
|
|
3573
|
-
z.ZodType<
|
|
3574
|
-
CreateEvalGuardrailConfigEvalsResponseBoolean,
|
|
3575
|
-
z.ZodTypeDef,
|
|
3576
|
-
unknown
|
|
3577
|
-
> = z.object({
|
|
3578
|
-
enabled: z.boolean(),
|
|
3579
|
-
alert_on_failure: z.boolean().default(false),
|
|
3580
|
-
type: z.literal("boolean"),
|
|
3581
|
-
value: z.boolean(),
|
|
3582
|
-
}).transform((v) => {
|
|
3583
|
-
return remap$(v, {
|
|
3584
|
-
"alert_on_failure": "alertOnFailure",
|
|
3585
|
-
});
|
|
3586
|
-
});
|
|
3587
|
-
|
|
3588
|
-
export function createEvalGuardrailConfigEvalsResponseBooleanFromJSON(
|
|
3589
|
-
jsonString: string,
|
|
3590
|
-
): SafeParseResult<
|
|
3591
|
-
CreateEvalGuardrailConfigEvalsResponseBoolean,
|
|
3592
|
-
SDKValidationError
|
|
3593
|
-
> {
|
|
3594
|
-
return safeParse(
|
|
3595
|
-
jsonString,
|
|
3596
|
-
(x) =>
|
|
3597
|
-
CreateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema.parse(
|
|
3598
|
-
JSON.parse(x),
|
|
3599
|
-
),
|
|
3600
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponseBoolean' from JSON`,
|
|
3601
|
-
);
|
|
3602
|
-
}
|
|
3603
|
-
|
|
3604
|
-
/** @internal */
|
|
3605
|
-
export const ResponseBodyGuardrailConfig$inboundSchema: z.ZodType<
|
|
3606
|
-
ResponseBodyGuardrailConfig,
|
|
3607
|
-
z.ZodTypeDef,
|
|
3608
|
-
unknown
|
|
3609
|
-
> = z.union([
|
|
3610
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema),
|
|
3611
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseNumber$inboundSchema),
|
|
3612
|
-
]);
|
|
3613
|
-
|
|
3614
|
-
export function responseBodyGuardrailConfigFromJSON(
|
|
3615
|
-
jsonString: string,
|
|
3616
|
-
): SafeParseResult<ResponseBodyGuardrailConfig, SDKValidationError> {
|
|
3617
|
-
return safeParse(
|
|
3618
|
-
jsonString,
|
|
3619
|
-
(x) => ResponseBodyGuardrailConfig$inboundSchema.parse(JSON.parse(x)),
|
|
3620
|
-
`Failed to parse 'ResponseBodyGuardrailConfig' from JSON`,
|
|
3621
|
-
);
|
|
3622
|
-
}
|
|
3623
|
-
|
|
3624
|
-
/** @internal */
|
|
3625
|
-
export const ResponseBodyType$inboundSchema: z.ZodNativeEnum<
|
|
3626
|
-
typeof ResponseBodyType
|
|
3627
|
-
> = z.nativeEnum(ResponseBodyType);
|
|
3628
|
-
|
|
3629
|
-
/** @internal */
|
|
3630
|
-
export const ResponseBodyJSON$inboundSchema: z.ZodType<
|
|
3631
|
-
ResponseBodyJSON,
|
|
3632
|
-
z.ZodTypeDef,
|
|
3633
|
-
unknown
|
|
3634
|
-
> = z.object({
|
|
3635
|
-
_id: z.string(),
|
|
3636
|
-
description: z.string(),
|
|
3637
|
-
created: z.string().default("2026-03-10T17:52:42.263Z"),
|
|
3638
|
-
updated: z.string().default("2026-03-10T17:52:42.263Z"),
|
|
3639
|
-
guardrail_config: z.union([
|
|
3640
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema),
|
|
3641
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseNumber$inboundSchema),
|
|
3642
|
-
]).optional(),
|
|
3643
|
-
type: ResponseBodyType$inboundSchema,
|
|
3644
|
-
schema: z.string(),
|
|
3645
|
-
key: z.string(),
|
|
3646
|
-
}).transform((v) => {
|
|
3647
|
-
return remap$(v, {
|
|
3648
|
-
"_id": "id",
|
|
3649
|
-
"guardrail_config": "guardrailConfig",
|
|
3650
|
-
});
|
|
3651
|
-
});
|
|
3652
|
-
|
|
3653
|
-
export function responseBodyJSONFromJSON(
|
|
3654
|
-
jsonString: string,
|
|
3655
|
-
): SafeParseResult<ResponseBodyJSON, SDKValidationError> {
|
|
3656
|
-
return safeParse(
|
|
3657
|
-
jsonString,
|
|
3658
|
-
(x) => ResponseBodyJSON$inboundSchema.parse(JSON.parse(x)),
|
|
3659
|
-
`Failed to parse 'ResponseBodyJSON' from JSON`,
|
|
3660
|
-
);
|
|
3661
|
-
}
|
|
3662
|
-
|
|
3663
|
-
/** @internal */
|
|
3664
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMOperator$inboundSchema:
|
|
3665
|
-
z.ZodNativeEnum<
|
|
3666
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMOperator
|
|
3667
|
-
> = z.nativeEnum(
|
|
3668
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMOperator,
|
|
3669
|
-
);
|
|
3670
|
-
|
|
3671
|
-
/** @internal */
|
|
3672
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMNumber$inboundSchema:
|
|
3673
|
-
z.ZodType<
|
|
3674
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMNumber,
|
|
3675
|
-
z.ZodTypeDef,
|
|
3676
|
-
unknown
|
|
3677
|
-
> = z.object({
|
|
3678
|
-
enabled: z.boolean(),
|
|
3679
|
-
alert_on_failure: z.boolean().default(false),
|
|
3680
|
-
type: z.literal("number"),
|
|
3681
|
-
value: z.number(),
|
|
3682
|
-
operator:
|
|
3683
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMOperator$inboundSchema,
|
|
3684
|
-
}).transform((v) => {
|
|
3685
|
-
return remap$(v, {
|
|
3686
|
-
"alert_on_failure": "alertOnFailure",
|
|
3687
|
-
});
|
|
3688
|
-
});
|
|
3689
|
-
|
|
3690
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMNumberFromJSON(
|
|
3691
|
-
jsonString: string,
|
|
3692
|
-
): SafeParseResult<
|
|
3693
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMNumber,
|
|
3694
|
-
SDKValidationError
|
|
3695
|
-
> {
|
|
3696
|
-
return safeParse(
|
|
3697
|
-
jsonString,
|
|
3698
|
-
(x) =>
|
|
3699
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMNumber$inboundSchema
|
|
3700
|
-
.parse(JSON.parse(x)),
|
|
3701
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMNumber' from JSON`,
|
|
3702
|
-
);
|
|
3703
|
-
}
|
|
3704
|
-
|
|
3705
|
-
/** @internal */
|
|
3706
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMBoolean$inboundSchema:
|
|
3707
|
-
z.ZodType<
|
|
3708
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMBoolean,
|
|
3709
|
-
z.ZodTypeDef,
|
|
3710
|
-
unknown
|
|
3711
|
-
> = z.object({
|
|
3712
|
-
enabled: z.boolean(),
|
|
3713
|
-
alert_on_failure: z.boolean().default(false),
|
|
3714
|
-
type: z.literal("boolean"),
|
|
3715
|
-
value: z.boolean(),
|
|
3716
|
-
}).transform((v) => {
|
|
3717
|
-
return remap$(v, {
|
|
3718
|
-
"alert_on_failure": "alertOnFailure",
|
|
3719
|
-
});
|
|
3720
|
-
});
|
|
3721
|
-
|
|
3722
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMBooleanFromJSON(
|
|
3723
|
-
jsonString: string,
|
|
3724
|
-
): SafeParseResult<
|
|
3725
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMBoolean,
|
|
3726
|
-
SDKValidationError
|
|
3727
|
-
> {
|
|
3728
|
-
return safeParse(
|
|
3729
|
-
jsonString,
|
|
3730
|
-
(x) =>
|
|
3731
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMBoolean$inboundSchema
|
|
3732
|
-
.parse(JSON.parse(x)),
|
|
3733
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMBoolean' from JSON`,
|
|
3734
|
-
);
|
|
3735
|
-
}
|
|
3736
|
-
|
|
3737
|
-
/** @internal */
|
|
3738
|
-
export const CreateEvalLLMEvalsResponseGuardrailConfig$inboundSchema: z.ZodType<
|
|
3739
|
-
CreateEvalLLMEvalsResponseGuardrailConfig,
|
|
3740
|
-
z.ZodTypeDef,
|
|
3741
|
-
unknown
|
|
3742
|
-
> = z.union([
|
|
3743
|
-
z.lazy(() =>
|
|
3744
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMBoolean$inboundSchema
|
|
3745
|
-
),
|
|
3746
|
-
z.lazy(() =>
|
|
3747
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMNumber$inboundSchema
|
|
3748
|
-
),
|
|
3749
|
-
]);
|
|
3750
|
-
|
|
3751
|
-
export function createEvalLLMEvalsResponseGuardrailConfigFromJSON(
|
|
3752
|
-
jsonString: string,
|
|
3753
|
-
): SafeParseResult<
|
|
3754
|
-
CreateEvalLLMEvalsResponseGuardrailConfig,
|
|
3755
|
-
SDKValidationError
|
|
3756
|
-
> {
|
|
3757
|
-
return safeParse(
|
|
3758
|
-
jsonString,
|
|
3759
|
-
(x) =>
|
|
3760
|
-
CreateEvalLLMEvalsResponseGuardrailConfig$inboundSchema.parse(
|
|
3761
|
-
JSON.parse(x),
|
|
3762
|
-
),
|
|
3763
|
-
`Failed to parse 'CreateEvalLLMEvalsResponseGuardrailConfig' from JSON`,
|
|
3764
|
-
);
|
|
3765
|
-
}
|
|
3766
|
-
|
|
3767
|
-
/** @internal */
|
|
3768
|
-
export const CreateEvalLLMEvalsResponseType$inboundSchema: z.ZodNativeEnum<
|
|
3769
|
-
typeof CreateEvalLLMEvalsResponseType
|
|
3770
|
-
> = z.nativeEnum(CreateEvalLLMEvalsResponseType);
|
|
3771
|
-
|
|
3772
|
-
/** @internal */
|
|
3773
|
-
export const CreateEvalLLMEvalsResponseRetry$inboundSchema: z.ZodType<
|
|
3774
|
-
CreateEvalLLMEvalsResponseRetry,
|
|
3775
|
-
z.ZodTypeDef,
|
|
3776
|
-
unknown
|
|
3777
|
-
> = z.object({
|
|
3778
|
-
count: z.number().int().default(2),
|
|
3779
|
-
on_codes: z.array(z.number().int()).optional(),
|
|
3780
|
-
}).transform((v) => {
|
|
3781
|
-
return remap$(v, {
|
|
3782
|
-
"on_codes": "onCodes",
|
|
3783
|
-
});
|
|
3784
|
-
});
|
|
3785
|
-
|
|
3786
|
-
export function createEvalLLMEvalsResponseRetryFromJSON(
|
|
3787
|
-
jsonString: string,
|
|
3788
|
-
): SafeParseResult<CreateEvalLLMEvalsResponseRetry, SDKValidationError> {
|
|
3789
|
-
return safeParse(
|
|
3790
|
-
jsonString,
|
|
3791
|
-
(x) => CreateEvalLLMEvalsResponseRetry$inboundSchema.parse(JSON.parse(x)),
|
|
3792
|
-
`Failed to parse 'CreateEvalLLMEvalsResponseRetry' from JSON`,
|
|
3793
|
-
);
|
|
3794
|
-
}
|
|
3795
|
-
|
|
3796
|
-
/** @internal */
|
|
3797
|
-
export const CreateEvalLLMEvalsResponseFallbacks$inboundSchema: z.ZodType<
|
|
3798
|
-
CreateEvalLLMEvalsResponseFallbacks,
|
|
3799
|
-
z.ZodTypeDef,
|
|
3800
|
-
unknown
|
|
3801
|
-
> = z.object({
|
|
3802
|
-
model: z.string(),
|
|
3803
|
-
});
|
|
3804
|
-
|
|
3805
|
-
export function createEvalLLMEvalsResponseFallbacksFromJSON(
|
|
3806
|
-
jsonString: string,
|
|
3807
|
-
): SafeParseResult<CreateEvalLLMEvalsResponseFallbacks, SDKValidationError> {
|
|
3808
|
-
return safeParse(
|
|
3809
|
-
jsonString,
|
|
3810
|
-
(x) =>
|
|
3811
|
-
CreateEvalLLMEvalsResponseFallbacks$inboundSchema.parse(JSON.parse(x)),
|
|
3812
|
-
`Failed to parse 'CreateEvalLLMEvalsResponseFallbacks' from JSON`,
|
|
3813
|
-
);
|
|
3814
|
-
}
|
|
3815
|
-
|
|
3816
|
-
/** @internal */
|
|
3817
|
-
export const CreateEvalLLMJudges$inboundSchema: z.ZodType<
|
|
3818
|
-
CreateEvalLLMJudges,
|
|
3819
|
-
z.ZodTypeDef,
|
|
3820
|
-
unknown
|
|
3821
|
-
> = z.object({
|
|
3822
|
-
model: z.string(),
|
|
3823
|
-
retry: z.lazy(() => CreateEvalLLMEvalsResponseRetry$inboundSchema).optional(),
|
|
3824
|
-
fallbacks: z.array(
|
|
3825
|
-
z.lazy(() => CreateEvalLLMEvalsResponseFallbacks$inboundSchema),
|
|
3826
|
-
).optional(),
|
|
3827
|
-
});
|
|
3828
|
-
|
|
3829
|
-
export function createEvalLLMJudgesFromJSON(
|
|
3830
|
-
jsonString: string,
|
|
3831
|
-
): SafeParseResult<CreateEvalLLMJudges, SDKValidationError> {
|
|
3832
|
-
return safeParse(
|
|
3833
|
-
jsonString,
|
|
3834
|
-
(x) => CreateEvalLLMJudges$inboundSchema.parse(JSON.parse(x)),
|
|
3835
|
-
`Failed to parse 'CreateEvalLLMJudges' from JSON`,
|
|
3836
|
-
);
|
|
3837
|
-
}
|
|
3838
|
-
|
|
3839
|
-
/** @internal */
|
|
3840
|
-
export const CreateEvalLLMEvalsRetry$inboundSchema: z.ZodType<
|
|
3841
|
-
CreateEvalLLMEvalsRetry,
|
|
3842
|
-
z.ZodTypeDef,
|
|
3843
|
-
unknown
|
|
3844
|
-
> = z.object({
|
|
3845
|
-
count: z.number().int().default(2),
|
|
3846
|
-
on_codes: z.array(z.number().int()).optional(),
|
|
3847
|
-
}).transform((v) => {
|
|
3848
|
-
return remap$(v, {
|
|
3849
|
-
"on_codes": "onCodes",
|
|
3850
|
-
});
|
|
3851
|
-
});
|
|
3852
|
-
|
|
3853
|
-
export function createEvalLLMEvalsRetryFromJSON(
|
|
3854
|
-
jsonString: string,
|
|
3855
|
-
): SafeParseResult<CreateEvalLLMEvalsRetry, SDKValidationError> {
|
|
3856
|
-
return safeParse(
|
|
3857
|
-
jsonString,
|
|
3858
|
-
(x) => CreateEvalLLMEvalsRetry$inboundSchema.parse(JSON.parse(x)),
|
|
3859
|
-
`Failed to parse 'CreateEvalLLMEvalsRetry' from JSON`,
|
|
3860
|
-
);
|
|
3861
|
-
}
|
|
3862
|
-
|
|
3863
|
-
/** @internal */
|
|
3864
|
-
export const CreateEvalLLMEvalsFallbacks$inboundSchema: z.ZodType<
|
|
3865
|
-
CreateEvalLLMEvalsFallbacks,
|
|
3866
|
-
z.ZodTypeDef,
|
|
3867
|
-
unknown
|
|
3868
|
-
> = z.object({
|
|
3869
|
-
model: z.string(),
|
|
3870
|
-
});
|
|
3871
|
-
|
|
3872
|
-
export function createEvalLLMEvalsFallbacksFromJSON(
|
|
3873
|
-
jsonString: string,
|
|
3874
|
-
): SafeParseResult<CreateEvalLLMEvalsFallbacks, SDKValidationError> {
|
|
3875
|
-
return safeParse(
|
|
3876
|
-
jsonString,
|
|
3877
|
-
(x) => CreateEvalLLMEvalsFallbacks$inboundSchema.parse(JSON.parse(x)),
|
|
3878
|
-
`Failed to parse 'CreateEvalLLMEvalsFallbacks' from JSON`,
|
|
3879
|
-
);
|
|
3880
|
-
}
|
|
3881
|
-
|
|
3882
|
-
/** @internal */
|
|
3883
|
-
export const CreateEvalLLMReplacementJudges$inboundSchema: z.ZodType<
|
|
3884
|
-
CreateEvalLLMReplacementJudges,
|
|
3885
|
-
z.ZodTypeDef,
|
|
3886
|
-
unknown
|
|
3887
|
-
> = z.object({
|
|
3888
|
-
model: z.string(),
|
|
3889
|
-
retry: z.lazy(() => CreateEvalLLMEvalsRetry$inboundSchema).optional(),
|
|
3890
|
-
fallbacks: z.array(z.lazy(() => CreateEvalLLMEvalsFallbacks$inboundSchema))
|
|
3891
|
-
.optional(),
|
|
3892
|
-
});
|
|
3893
|
-
|
|
3894
|
-
export function createEvalLLMReplacementJudgesFromJSON(
|
|
3895
|
-
jsonString: string,
|
|
3896
|
-
): SafeParseResult<CreateEvalLLMReplacementJudges, SDKValidationError> {
|
|
3897
|
-
return safeParse(
|
|
3898
|
-
jsonString,
|
|
3899
|
-
(x) => CreateEvalLLMReplacementJudges$inboundSchema.parse(JSON.parse(x)),
|
|
3900
|
-
`Failed to parse 'CreateEvalLLMReplacementJudges' from JSON`,
|
|
3901
|
-
);
|
|
3902
|
-
}
|
|
3903
|
-
|
|
3904
|
-
/** @internal */
|
|
3905
|
-
export const CreateEvalLLMTieValue$inboundSchema: z.ZodNativeEnum<
|
|
3906
|
-
typeof CreateEvalLLMTieValue
|
|
3907
|
-
> = z.nativeEnum(CreateEvalLLMTieValue);
|
|
3908
|
-
|
|
3909
|
-
/** @internal */
|
|
3910
|
-
export const CreateEvalLLMJury$inboundSchema: z.ZodType<
|
|
3911
|
-
CreateEvalLLMJury,
|
|
3912
|
-
z.ZodTypeDef,
|
|
3913
|
-
unknown
|
|
3914
|
-
> = z.object({
|
|
3915
|
-
judges: z.array(z.lazy(() => CreateEvalLLMJudges$inboundSchema)),
|
|
3916
|
-
replacement_judges: z.array(
|
|
3917
|
-
z.lazy(() => CreateEvalLLMReplacementJudges$inboundSchema),
|
|
3918
|
-
).optional(),
|
|
3919
|
-
min_successful_judges: z.number().int().default(2),
|
|
3920
|
-
tie_value: CreateEvalLLMTieValue$inboundSchema.default("Tie"),
|
|
3921
|
-
}).transform((v) => {
|
|
3922
|
-
return remap$(v, {
|
|
3923
|
-
"replacement_judges": "replacementJudges",
|
|
3924
|
-
"min_successful_judges": "minSuccessfulJudges",
|
|
3925
|
-
"tie_value": "tieValue",
|
|
3926
|
-
});
|
|
3927
|
-
});
|
|
3928
|
-
|
|
3929
|
-
export function createEvalLLMJuryFromJSON(
|
|
3930
|
-
jsonString: string,
|
|
3931
|
-
): SafeParseResult<CreateEvalLLMJury, SDKValidationError> {
|
|
3932
|
-
return safeParse(
|
|
3933
|
-
jsonString,
|
|
3934
|
-
(x) => CreateEvalLLMJury$inboundSchema.parse(JSON.parse(x)),
|
|
3935
|
-
`Failed to parse 'CreateEvalLLMJury' from JSON`,
|
|
3936
|
-
);
|
|
3937
|
-
}
|
|
3938
|
-
|
|
3939
|
-
/** @internal */
|
|
3940
|
-
export const CreateEvalLlm2$inboundSchema: z.ZodType<
|
|
3941
|
-
CreateEvalLlm2,
|
|
3942
|
-
z.ZodTypeDef,
|
|
3943
|
-
unknown
|
|
3944
|
-
> = z.object({
|
|
3945
|
-
_id: z.string(),
|
|
3946
|
-
description: z.string(),
|
|
3947
|
-
created: z.string().default("2026-03-10T17:52:42.263Z"),
|
|
3948
|
-
updated: z.string().default("2026-03-10T17:52:42.263Z"),
|
|
3949
|
-
guardrail_config: z.union([
|
|
3950
|
-
z.lazy(() =>
|
|
3951
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMBoolean$inboundSchema
|
|
3952
|
-
),
|
|
3953
|
-
z.lazy(() =>
|
|
3954
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1LLMNumber$inboundSchema
|
|
3955
|
-
),
|
|
3956
|
-
]).optional(),
|
|
3957
|
-
type: CreateEvalLLMEvalsResponseType$inboundSchema,
|
|
3958
|
-
repetitions: z.number().int().optional(),
|
|
3959
|
-
prompt: z.string(),
|
|
3960
|
-
key: z.string(),
|
|
3961
|
-
mode: z.literal("jury"),
|
|
3962
|
-
jury: z.lazy(() => CreateEvalLLMJury$inboundSchema),
|
|
3963
|
-
}).transform((v) => {
|
|
3964
|
-
return remap$(v, {
|
|
3965
|
-
"_id": "id",
|
|
3966
|
-
"guardrail_config": "guardrailConfig",
|
|
3967
|
-
});
|
|
3968
|
-
});
|
|
3969
|
-
|
|
3970
|
-
export function createEvalLLM2FromJSON(
|
|
3971
|
-
jsonString: string,
|
|
3972
|
-
): SafeParseResult<CreateEvalLlm2, SDKValidationError> {
|
|
3973
|
-
return safeParse(
|
|
3974
|
-
jsonString,
|
|
3975
|
-
(x) => CreateEvalLlm2$inboundSchema.parse(JSON.parse(x)),
|
|
3976
|
-
`Failed to parse 'CreateEvalLlm2' from JSON`,
|
|
3977
|
-
);
|
|
3978
|
-
}
|
|
3979
|
-
|
|
3980
|
-
/** @internal */
|
|
3981
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Operator$inboundSchema:
|
|
3982
|
-
z.ZodNativeEnum<
|
|
3983
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Operator
|
|
3984
|
-
> = z.nativeEnum(
|
|
3985
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Operator,
|
|
3986
|
-
);
|
|
3987
|
-
|
|
3988
|
-
/** @internal */
|
|
3989
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Number$inboundSchema:
|
|
3990
|
-
z.ZodType<
|
|
3991
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Number,
|
|
3992
|
-
z.ZodTypeDef,
|
|
3993
|
-
unknown
|
|
3994
|
-
> = z.object({
|
|
3995
|
-
enabled: z.boolean(),
|
|
3996
|
-
alert_on_failure: z.boolean().default(false),
|
|
3997
|
-
type: z.literal("number"),
|
|
3998
|
-
value: z.number(),
|
|
3999
|
-
operator:
|
|
4000
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Operator$inboundSchema,
|
|
4001
|
-
}).transform((v) => {
|
|
4002
|
-
return remap$(v, {
|
|
4003
|
-
"alert_on_failure": "alertOnFailure",
|
|
4004
|
-
});
|
|
4005
|
-
});
|
|
4006
|
-
|
|
4007
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1NumberFromJSON(
|
|
4008
|
-
jsonString: string,
|
|
4009
|
-
): SafeParseResult<
|
|
4010
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Number,
|
|
4011
|
-
SDKValidationError
|
|
4012
|
-
> {
|
|
4013
|
-
return safeParse(
|
|
4014
|
-
jsonString,
|
|
4015
|
-
(x) =>
|
|
4016
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Number$inboundSchema
|
|
4017
|
-
.parse(JSON.parse(x)),
|
|
4018
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Number' from JSON`,
|
|
4019
|
-
);
|
|
4020
|
-
}
|
|
4021
|
-
|
|
4022
|
-
/** @internal */
|
|
4023
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Boolean$inboundSchema:
|
|
4024
|
-
z.ZodType<
|
|
4025
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Boolean,
|
|
4026
|
-
z.ZodTypeDef,
|
|
4027
|
-
unknown
|
|
4028
|
-
> = z.object({
|
|
4029
|
-
enabled: z.boolean(),
|
|
4030
|
-
alert_on_failure: z.boolean().default(false),
|
|
4031
|
-
type: z.literal("boolean"),
|
|
4032
|
-
value: z.boolean(),
|
|
4033
|
-
}).transform((v) => {
|
|
4034
|
-
return remap$(v, {
|
|
4035
|
-
"alert_on_failure": "alertOnFailure",
|
|
4036
|
-
});
|
|
4037
|
-
});
|
|
4038
|
-
|
|
4039
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1BooleanFromJSON(
|
|
4040
|
-
jsonString: string,
|
|
4041
|
-
): SafeParseResult<
|
|
4042
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Boolean,
|
|
4043
|
-
SDKValidationError
|
|
4044
|
-
> {
|
|
4045
|
-
return safeParse(
|
|
4046
|
-
jsonString,
|
|
4047
|
-
(x) =>
|
|
4048
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Boolean$inboundSchema
|
|
4049
|
-
.parse(JSON.parse(x)),
|
|
4050
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Boolean' from JSON`,
|
|
4051
|
-
);
|
|
4052
|
-
}
|
|
4053
|
-
|
|
4054
|
-
/** @internal */
|
|
4055
|
-
export const CreateEvalLLMEvalsGuardrailConfig$inboundSchema: z.ZodType<
|
|
4056
|
-
CreateEvalLLMEvalsGuardrailConfig,
|
|
4057
|
-
z.ZodTypeDef,
|
|
4058
|
-
unknown
|
|
4059
|
-
> = z.union([
|
|
4060
|
-
z.lazy(() =>
|
|
4061
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Boolean$inboundSchema
|
|
4062
|
-
),
|
|
4063
|
-
z.lazy(() =>
|
|
4064
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Number$inboundSchema
|
|
4065
|
-
),
|
|
4066
|
-
]);
|
|
4067
|
-
|
|
4068
|
-
export function createEvalLLMEvalsGuardrailConfigFromJSON(
|
|
4069
|
-
jsonString: string,
|
|
4070
|
-
): SafeParseResult<CreateEvalLLMEvalsGuardrailConfig, SDKValidationError> {
|
|
4071
|
-
return safeParse(
|
|
4072
|
-
jsonString,
|
|
4073
|
-
(x) => CreateEvalLLMEvalsGuardrailConfig$inboundSchema.parse(JSON.parse(x)),
|
|
4074
|
-
`Failed to parse 'CreateEvalLLMEvalsGuardrailConfig' from JSON`,
|
|
4075
|
-
);
|
|
4076
|
-
}
|
|
4077
|
-
|
|
4078
|
-
/** @internal */
|
|
4079
|
-
export const CreateEvalLLMEvalsType$inboundSchema: z.ZodNativeEnum<
|
|
4080
|
-
typeof CreateEvalLLMEvalsType
|
|
4081
|
-
> = z.nativeEnum(CreateEvalLLMEvalsType);
|
|
4082
|
-
|
|
4083
|
-
/** @internal */
|
|
4084
|
-
export const CreateEvalLlm1$inboundSchema: z.ZodType<
|
|
4085
|
-
CreateEvalLlm1,
|
|
4086
|
-
z.ZodTypeDef,
|
|
4087
|
-
unknown
|
|
4088
|
-
> = z.object({
|
|
4089
|
-
_id: z.string(),
|
|
4090
|
-
description: z.string(),
|
|
4091
|
-
created: z.string().default("2026-03-10T17:52:42.263Z"),
|
|
4092
|
-
updated: z.string().default("2026-03-10T17:52:42.263Z"),
|
|
4093
|
-
guardrail_config: z.union([
|
|
4094
|
-
z.lazy(() =>
|
|
4095
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Boolean$inboundSchema
|
|
4096
|
-
),
|
|
4097
|
-
z.lazy(() =>
|
|
4098
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody1Number$inboundSchema
|
|
4099
|
-
),
|
|
4100
|
-
]).optional(),
|
|
4101
|
-
type: CreateEvalLLMEvalsType$inboundSchema,
|
|
4102
|
-
repetitions: z.number().int().optional(),
|
|
4103
|
-
prompt: z.string(),
|
|
4104
|
-
key: z.string(),
|
|
4105
|
-
mode: z.literal("single"),
|
|
4106
|
-
model: z.string(),
|
|
4107
|
-
}).transform((v) => {
|
|
4108
|
-
return remap$(v, {
|
|
4109
|
-
"_id": "id",
|
|
4110
|
-
"guardrail_config": "guardrailConfig",
|
|
4111
|
-
});
|
|
4112
|
-
});
|
|
4113
|
-
|
|
4114
|
-
export function createEvalLLM1FromJSON(
|
|
4115
|
-
jsonString: string,
|
|
4116
|
-
): SafeParseResult<CreateEvalLlm1, SDKValidationError> {
|
|
4117
|
-
return safeParse(
|
|
4118
|
-
jsonString,
|
|
4119
|
-
(x) => CreateEvalLlm1$inboundSchema.parse(JSON.parse(x)),
|
|
4120
|
-
`Failed to parse 'CreateEvalLlm1' from JSON`,
|
|
4121
|
-
);
|
|
4122
|
-
}
|
|
4123
|
-
|
|
4124
|
-
/** @internal */
|
|
4125
|
-
export const ResponseBodyLLM$inboundSchema: z.ZodType<
|
|
4126
|
-
ResponseBodyLLM,
|
|
4127
|
-
z.ZodTypeDef,
|
|
4128
|
-
unknown
|
|
4129
|
-
> = z.union([
|
|
4130
|
-
z.lazy(() => CreateEvalLlm1$inboundSchema),
|
|
4131
|
-
z.lazy(() => CreateEvalLlm2$inboundSchema),
|
|
4132
|
-
]);
|
|
4133
|
-
|
|
4134
|
-
export function responseBodyLLMFromJSON(
|
|
4135
|
-
jsonString: string,
|
|
4136
|
-
): SafeParseResult<ResponseBodyLLM, SDKValidationError> {
|
|
4137
|
-
return safeParse(
|
|
4138
|
-
jsonString,
|
|
4139
|
-
(x) => ResponseBodyLLM$inboundSchema.parse(JSON.parse(x)),
|
|
4140
|
-
`Failed to parse 'ResponseBodyLLM' from JSON`,
|
|
4141
|
-
);
|
|
4142
|
-
}
|
|
4143
|
-
|
|
4144
|
-
/** @internal */
|
|
4145
|
-
export const CreateEvalResponseBody$inboundSchema: z.ZodType<
|
|
4146
|
-
CreateEvalResponseBody,
|
|
4147
|
-
z.ZodTypeDef,
|
|
4148
|
-
unknown
|
|
4149
|
-
> = z.union([
|
|
4150
|
-
z.lazy(() => ResponseBodyHTTP$inboundSchema),
|
|
4151
|
-
z.lazy(() => Ragas$inboundSchema),
|
|
4152
|
-
z.lazy(() => ResponseBodyJSON$inboundSchema),
|
|
4153
|
-
z.lazy(() => ResponseBodyPython$inboundSchema),
|
|
4154
|
-
z.lazy(() => CreateEvalResponseBodyFunction$inboundSchema),
|
|
4155
|
-
z.lazy(() => Typescript$inboundSchema),
|
|
4156
|
-
z.union([
|
|
4157
|
-
z.lazy(() => CreateEvalLlm1$inboundSchema),
|
|
4158
|
-
z.lazy(() => CreateEvalLlm2$inboundSchema),
|
|
4159
|
-
]),
|
|
4160
|
-
]);
|
|
4161
|
-
|
|
4162
|
-
export function createEvalResponseBodyFromJSON(
|
|
4163
|
-
jsonString: string,
|
|
4164
|
-
): SafeParseResult<CreateEvalResponseBody, SDKValidationError> {
|
|
4165
|
-
return safeParse(
|
|
4166
|
-
jsonString,
|
|
4167
|
-
(x) => CreateEvalResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
4168
|
-
`Failed to parse 'CreateEvalResponseBody' from JSON`,
|
|
4169
|
-
);
|
|
4170
|
-
}
|