@orq-ai/node 4.3.3 → 4.4.0-rc.1
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/examples/package-lock.json +4 -7
- 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/conversationresponse.js +1 -1
- package/models/components/conversationwithmessagesresponse.js +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/createconversation.js +1 -1
- package/models/operations/createconversationresponse.js +2 -2
- 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 +14 -14
- 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/generateconversationname.js +1 -1
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +14 -14
- 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/updateconversation.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 +14 -14
- 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/conversationresponse.ts +1 -1
- package/src/models/components/conversationwithmessagesresponse.ts +1 -1
- 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/createconversation.ts +1 -1
- package/src/models/operations/createconversationresponse.ts +2 -2
- 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 +14 -14
- 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/generateconversationname.ts +1 -1
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +14 -14
- 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/updateconversation.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 +14 -14
- package/src/models/operations/updateidentity.ts +1 -1
- package/src/models/operations/updatetool.ts +7 -7
- package/_speakeasy/.github/action-inputs-config.json +0 -53
- package/_speakeasy/.github/action-security-config.json +0 -88
- package/packages/orq-rc/examples/contactsCreate.example.ts +0 -42
- package/packages/orq-rc/examples/package-lock.json +0 -610
- package/packages/orq-rc/examples/package.json +0 -18
- package/packages/orq-rc/jsr.json +0 -28
- package/packages/orq-rc/package-lock.json +0 -1740
- package/packages/orq-rc/package.json +0 -30
- 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 -179
- package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +0 -183
- 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 -201
- package/packages/orq-rc/src/funcs/agentsStreamRun.ts +0 -186
- package/packages/orq-rc/src/funcs/agentsUpdate.ts +0 -184
- 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/conversationsCreate.ts +0 -161
- package/packages/orq-rc/src/funcs/conversationsCreateConversationResponse.ts +0 -186
- package/packages/orq-rc/src/funcs/conversationsDelete.ts +0 -180
- package/packages/orq-rc/src/funcs/conversationsGenerateName.ts +0 -194
- package/packages/orq-rc/src/funcs/conversationsList.ts +0 -186
- package/packages/orq-rc/src/funcs/conversationsRetrieve.ts +0 -181
- package/packages/orq-rc/src/funcs/conversationsUpdate.ts +0 -184
- 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 -183
- 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 -187
- 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 -262
- package/packages/orq-rc/src/funcs/routerAudioTranslationsCreate.ts +0 -252
- 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 -152
- 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 -345
- 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 -264
- 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 -503
- 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/conversationresponse.ts +0 -132
- package/packages/orq-rc/src/models/components/conversationwithmessagesresponse.ts +0 -149
- package/packages/orq-rc/src/models/components/createagentresponse.ts +0 -299
- 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/filecontentpartschema.ts +0 -87
- package/packages/orq-rc/src/models/components/filepart.ts +0 -218
- package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +0 -268
- package/packages/orq-rc/src/models/components/index.ts +0 -60
- package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +0 -3457
- package/packages/orq-rc/src/models/components/messageresponse.ts +0 -127
- 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 -318
- package/packages/orq-rc/src/models/components/responsefailedevent.ts +0 -72
- package/packages/orq-rc/src/models/components/responsestartedevent.ts +0 -91
- 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/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/components/usermessagerequest.ts +0 -136
- 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/deleteconversation.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/generateconversationname.ts +0 -99
- 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 -37
- 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/responsevalidationerror.ts +0 -50
- package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +0 -51
- package/packages/orq-rc/src/models/errors/retrieveconversation.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/updateconversation.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 -7093
- package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +0 -609
- package/packages/orq-rc/src/models/operations/createchatcompletion.ts +0 -6381
- package/packages/orq-rc/src/models/operations/createchunk.ts +0 -222
- package/packages/orq-rc/src/models/operations/createcompletion.ts +0 -3413
- package/packages/orq-rc/src/models/operations/createcontact.ts +0 -156
- package/packages/orq-rc/src/models/operations/createconversation.ts +0 -227
- package/packages/orq-rc/src/models/operations/createconversationresponse.ts +0 -498
- 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 -3128
- 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 -5400
- package/packages/orq-rc/src/models/operations/creatererank.ts +0 -890
- package/packages/orq-rc/src/models/operations/createresponse.ts +0 -3294
- 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/deletechunk.ts +0 -53
- package/packages/orq-rc/src/models/operations/deletechunks.ts +0 -125
- package/packages/orq-rc/src/models/operations/deleteconversation.ts +0 -39
- 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 -689
- package/packages/orq-rc/src/models/operations/deployments.ts +0 -1267
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -4613
- 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/generateconversationname.ts +0 -207
- 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 -3163
- 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 -2330
- 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 -3088
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -3133
- 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 -118
- package/packages/orq-rc/src/models/operations/invokeagent.ts +0 -733
- package/packages/orq-rc/src/models/operations/invokeeval.ts +0 -1129
- package/packages/orq-rc/src/models/operations/listagents.ts +0 -3018
- 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/listconversations.ts +0 -104
- 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 -3208
- package/packages/orq-rc/src/models/operations/parse.ts +0 -777
- 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 -3104
- package/packages/orq-rc/src/models/operations/retrieveconversation.ts +0 -41
- 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 -5351
- package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -1762
- package/packages/orq-rc/src/models/operations/streamagent.ts +0 -629
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +0 -5546
- package/packages/orq-rc/src/models/operations/updateagent.ts +0 -7447
- package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -236
- package/packages/orq-rc/src/models/operations/updateconversation.ts +0 -252
- 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 -3303
- 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 -245
- package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -5471
- package/packages/orq-rc/src/models/operations/updatetool.ts +0 -2696
- package/packages/orq-rc/src/sdk/agents.ts +0 -196
- 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/conversations.ts +0 -147
- 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/internal.ts +0 -28
- 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 -34
- package/packages/orq-rc/src/sdk/router.ts +0 -72
- package/packages/orq-rc/src/sdk/sdk.ts +0 -121
- 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
- package/packages/orq-rc/tsconfig.json +0 -40
|
@@ -1,3128 +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 CreateEvalGuardrailConfigEvalsOperator = {
|
|
13
|
-
Eq: "eq",
|
|
14
|
-
Ne: "ne",
|
|
15
|
-
Gt: "gt",
|
|
16
|
-
Gte: "gte",
|
|
17
|
-
Lt: "lt",
|
|
18
|
-
Lte: "lte",
|
|
19
|
-
} as const;
|
|
20
|
-
export type CreateEvalGuardrailConfigEvalsOperator = ClosedEnum<
|
|
21
|
-
typeof CreateEvalGuardrailConfigEvalsOperator
|
|
22
|
-
>;
|
|
23
|
-
|
|
24
|
-
export type CreateEvalGuardrailConfigEvalsNumber = {
|
|
25
|
-
enabled: boolean;
|
|
26
|
-
alertOnFailure?: boolean | undefined;
|
|
27
|
-
type: "number";
|
|
28
|
-
value: number;
|
|
29
|
-
operator: CreateEvalGuardrailConfigEvalsOperator;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export type CreateEvalGuardrailConfigEvalsBoolean = {
|
|
33
|
-
enabled: boolean;
|
|
34
|
-
alertOnFailure?: boolean | undefined;
|
|
35
|
-
type: "boolean";
|
|
36
|
-
value: boolean;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export type CreateEvalRequestBodyEvalsGuardrailConfig =
|
|
40
|
-
| CreateEvalGuardrailConfigEvalsBoolean
|
|
41
|
-
| CreateEvalGuardrailConfigEvalsNumber;
|
|
42
|
-
|
|
43
|
-
export const CreateEvalRequestBodyEvalsOutputType = {
|
|
44
|
-
Boolean: "boolean",
|
|
45
|
-
Number: "number",
|
|
46
|
-
} as const;
|
|
47
|
-
export type CreateEvalRequestBodyEvalsOutputType = ClosedEnum<
|
|
48
|
-
typeof CreateEvalRequestBodyEvalsOutputType
|
|
49
|
-
>;
|
|
50
|
-
|
|
51
|
-
export type Python = {
|
|
52
|
-
guardrailConfig?:
|
|
53
|
-
| CreateEvalGuardrailConfigEvalsBoolean
|
|
54
|
-
| CreateEvalGuardrailConfigEvalsNumber
|
|
55
|
-
| undefined;
|
|
56
|
-
outputType?: CreateEvalRequestBodyEvalsOutputType | undefined;
|
|
57
|
-
code: string;
|
|
58
|
-
type: "python_eval";
|
|
59
|
-
/**
|
|
60
|
-
* Entity storage path in the format: `project/folder/subfolder/...`
|
|
61
|
-
*
|
|
62
|
-
* @remarks
|
|
63
|
-
*
|
|
64
|
-
* The first element identifies the project, followed by nested folders (auto-created as needed).
|
|
65
|
-
*
|
|
66
|
-
* With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
|
|
67
|
-
*/
|
|
68
|
-
path: string;
|
|
69
|
-
description?: string | undefined;
|
|
70
|
-
key: string;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export const CreateEvalGuardrailConfigOperator = {
|
|
74
|
-
Eq: "eq",
|
|
75
|
-
Ne: "ne",
|
|
76
|
-
Gt: "gt",
|
|
77
|
-
Gte: "gte",
|
|
78
|
-
Lt: "lt",
|
|
79
|
-
Lte: "lte",
|
|
80
|
-
} as const;
|
|
81
|
-
export type CreateEvalGuardrailConfigOperator = ClosedEnum<
|
|
82
|
-
typeof CreateEvalGuardrailConfigOperator
|
|
83
|
-
>;
|
|
84
|
-
|
|
85
|
-
export type CreateEvalGuardrailConfigNumber = {
|
|
86
|
-
enabled: boolean;
|
|
87
|
-
alertOnFailure?: boolean | undefined;
|
|
88
|
-
type: "number";
|
|
89
|
-
value: number;
|
|
90
|
-
operator: CreateEvalGuardrailConfigOperator;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export type CreateEvalGuardrailConfigBoolean = {
|
|
94
|
-
enabled: boolean;
|
|
95
|
-
alertOnFailure?: boolean | undefined;
|
|
96
|
-
type: "boolean";
|
|
97
|
-
value: boolean;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export type CreateEvalRequestBodyGuardrailConfig =
|
|
101
|
-
| CreateEvalGuardrailConfigBoolean
|
|
102
|
-
| CreateEvalGuardrailConfigNumber;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* The type of output expected from the evaluator
|
|
106
|
-
*/
|
|
107
|
-
export const CreateEvalRequestBodyOutputType = {
|
|
108
|
-
Boolean: "boolean",
|
|
109
|
-
Categorical: "categorical",
|
|
110
|
-
Number: "number",
|
|
111
|
-
String: "string",
|
|
112
|
-
} as const;
|
|
113
|
-
/**
|
|
114
|
-
* The type of output expected from the evaluator
|
|
115
|
-
*/
|
|
116
|
-
export type CreateEvalRequestBodyOutputType = ClosedEnum<
|
|
117
|
-
typeof CreateEvalRequestBodyOutputType
|
|
118
|
-
>;
|
|
119
|
-
|
|
120
|
-
export const CreateEvalRequestBodyMethod = {
|
|
121
|
-
Get: "GET",
|
|
122
|
-
Post: "POST",
|
|
123
|
-
} as const;
|
|
124
|
-
export type CreateEvalRequestBodyMethod = ClosedEnum<
|
|
125
|
-
typeof CreateEvalRequestBodyMethod
|
|
126
|
-
>;
|
|
127
|
-
|
|
128
|
-
export type CreateEvalRequestBodyHTTP = {
|
|
129
|
-
guardrailConfig?:
|
|
130
|
-
| CreateEvalGuardrailConfigBoolean
|
|
131
|
-
| CreateEvalGuardrailConfigNumber
|
|
132
|
-
| undefined;
|
|
133
|
-
/**
|
|
134
|
-
* The type of output expected from the evaluator
|
|
135
|
-
*/
|
|
136
|
-
outputType?: CreateEvalRequestBodyOutputType | undefined;
|
|
137
|
-
type: "http_eval";
|
|
138
|
-
url: string;
|
|
139
|
-
method: CreateEvalRequestBodyMethod;
|
|
140
|
-
headers: { [k: string]: string };
|
|
141
|
-
payload: { [k: string]: any };
|
|
142
|
-
/**
|
|
143
|
-
* Entity storage path in the format: `project/folder/subfolder/...`
|
|
144
|
-
*
|
|
145
|
-
* @remarks
|
|
146
|
-
*
|
|
147
|
-
* The first element identifies the project, followed by nested folders (auto-created as needed).
|
|
148
|
-
*
|
|
149
|
-
* With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
|
|
150
|
-
*/
|
|
151
|
-
path: string;
|
|
152
|
-
description?: string | undefined;
|
|
153
|
-
key: string;
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
export const GuardrailConfigOperator = {
|
|
157
|
-
Eq: "eq",
|
|
158
|
-
Ne: "ne",
|
|
159
|
-
Gt: "gt",
|
|
160
|
-
Gte: "gte",
|
|
161
|
-
Lt: "lt",
|
|
162
|
-
Lte: "lte",
|
|
163
|
-
} as const;
|
|
164
|
-
export type GuardrailConfigOperator = ClosedEnum<
|
|
165
|
-
typeof GuardrailConfigOperator
|
|
166
|
-
>;
|
|
167
|
-
|
|
168
|
-
export type GuardrailConfigNumber = {
|
|
169
|
-
enabled: boolean;
|
|
170
|
-
alertOnFailure?: boolean | undefined;
|
|
171
|
-
type: "number";
|
|
172
|
-
value: number;
|
|
173
|
-
operator: GuardrailConfigOperator;
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
export type GuardrailConfigBoolean = {
|
|
177
|
-
enabled: boolean;
|
|
178
|
-
alertOnFailure?: boolean | undefined;
|
|
179
|
-
type: "boolean";
|
|
180
|
-
value: boolean;
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
export type RequestBodyGuardrailConfig =
|
|
184
|
-
| GuardrailConfigBoolean
|
|
185
|
-
| GuardrailConfigNumber;
|
|
186
|
-
|
|
187
|
-
export const RequestBodyOutputType = {
|
|
188
|
-
Boolean: "boolean",
|
|
189
|
-
} as const;
|
|
190
|
-
export type RequestBodyOutputType = ClosedEnum<typeof RequestBodyOutputType>;
|
|
191
|
-
|
|
192
|
-
export type Json = {
|
|
193
|
-
guardrailConfig?: GuardrailConfigBoolean | GuardrailConfigNumber | undefined;
|
|
194
|
-
outputType?: RequestBodyOutputType | undefined;
|
|
195
|
-
type: "json_schema";
|
|
196
|
-
schema: string;
|
|
197
|
-
/**
|
|
198
|
-
* Entity storage path in the format: `project/folder/subfolder/...`
|
|
199
|
-
*
|
|
200
|
-
* @remarks
|
|
201
|
-
*
|
|
202
|
-
* The first element identifies the project, followed by nested folders (auto-created as needed).
|
|
203
|
-
*
|
|
204
|
-
* With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
|
|
205
|
-
*/
|
|
206
|
-
path: string;
|
|
207
|
-
description?: string | undefined;
|
|
208
|
-
key: string;
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
export const Operator = {
|
|
212
|
-
Eq: "eq",
|
|
213
|
-
Ne: "ne",
|
|
214
|
-
Gt: "gt",
|
|
215
|
-
Gte: "gte",
|
|
216
|
-
Lt: "lt",
|
|
217
|
-
Lte: "lte",
|
|
218
|
-
} as const;
|
|
219
|
-
export type Operator = ClosedEnum<typeof Operator>;
|
|
220
|
-
|
|
221
|
-
export type NumberT = {
|
|
222
|
-
enabled: boolean;
|
|
223
|
-
alertOnFailure?: boolean | undefined;
|
|
224
|
-
type: "number";
|
|
225
|
-
value: number;
|
|
226
|
-
operator: Operator;
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
export type Boolean = {
|
|
230
|
-
enabled: boolean;
|
|
231
|
-
alertOnFailure?: boolean | undefined;
|
|
232
|
-
type: "boolean";
|
|
233
|
-
value: boolean;
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
export type GuardrailConfig = Boolean | NumberT;
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* The type of output expected from the evaluator
|
|
240
|
-
*/
|
|
241
|
-
export const OutputType = {
|
|
242
|
-
Boolean: "boolean",
|
|
243
|
-
Categorical: "categorical",
|
|
244
|
-
Number: "number",
|
|
245
|
-
String: "string",
|
|
246
|
-
} as const;
|
|
247
|
-
/**
|
|
248
|
-
* The type of output expected from the evaluator
|
|
249
|
-
*/
|
|
250
|
-
export type OutputType = ClosedEnum<typeof OutputType>;
|
|
251
|
-
|
|
252
|
-
export type Llm = {
|
|
253
|
-
guardrailConfig?: Boolean | NumberT | undefined;
|
|
254
|
-
/**
|
|
255
|
-
* The type of output expected from the evaluator
|
|
256
|
-
*/
|
|
257
|
-
outputType?: OutputType | undefined;
|
|
258
|
-
type: "llm_eval";
|
|
259
|
-
prompt: string;
|
|
260
|
-
/**
|
|
261
|
-
* Entity storage path in the format: `project/folder/subfolder/...`
|
|
262
|
-
*
|
|
263
|
-
* @remarks
|
|
264
|
-
*
|
|
265
|
-
* The first element identifies the project, followed by nested folders (auto-created as needed).
|
|
266
|
-
*
|
|
267
|
-
* With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
|
|
268
|
-
*/
|
|
269
|
-
path: string;
|
|
270
|
-
description?: string | undefined;
|
|
271
|
-
model: string;
|
|
272
|
-
key: string;
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
export type CreateEvalRequestBody =
|
|
276
|
-
| Llm
|
|
277
|
-
| Json
|
|
278
|
-
| CreateEvalRequestBodyHTTP
|
|
279
|
-
| Python;
|
|
280
|
-
|
|
281
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Operator =
|
|
282
|
-
{
|
|
283
|
-
Eq: "eq",
|
|
284
|
-
Ne: "ne",
|
|
285
|
-
Gt: "gt",
|
|
286
|
-
Gte: "gte",
|
|
287
|
-
Lt: "lt",
|
|
288
|
-
Lte: "lte",
|
|
289
|
-
} as const;
|
|
290
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Operator =
|
|
291
|
-
ClosedEnum<
|
|
292
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Operator
|
|
293
|
-
>;
|
|
294
|
-
|
|
295
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number =
|
|
296
|
-
{
|
|
297
|
-
enabled: boolean;
|
|
298
|
-
alertOnFailure: boolean;
|
|
299
|
-
type: "number";
|
|
300
|
-
value: number;
|
|
301
|
-
operator:
|
|
302
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Operator;
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean =
|
|
306
|
-
{
|
|
307
|
-
enabled: boolean;
|
|
308
|
-
alertOnFailure: boolean;
|
|
309
|
-
type: "boolean";
|
|
310
|
-
value: boolean;
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
export type CreateEvalResponseBodyEvalsResponse200ApplicationJson7GuardrailConfig =
|
|
314
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean
|
|
315
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number;
|
|
316
|
-
|
|
317
|
-
export type Typescript = {
|
|
318
|
-
id: string;
|
|
319
|
-
description: string;
|
|
320
|
-
created: string;
|
|
321
|
-
updated: string;
|
|
322
|
-
guardrailConfig?:
|
|
323
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean
|
|
324
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number
|
|
325
|
-
| undefined;
|
|
326
|
-
code: string;
|
|
327
|
-
type: "typescript_eval";
|
|
328
|
-
key: string;
|
|
329
|
-
};
|
|
330
|
-
|
|
331
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Operator =
|
|
332
|
-
{
|
|
333
|
-
Eq: "eq",
|
|
334
|
-
Ne: "ne",
|
|
335
|
-
Gt: "gt",
|
|
336
|
-
Gte: "gte",
|
|
337
|
-
Lt: "lt",
|
|
338
|
-
Lte: "lte",
|
|
339
|
-
} as const;
|
|
340
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Operator =
|
|
341
|
-
ClosedEnum<
|
|
342
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Operator
|
|
343
|
-
>;
|
|
344
|
-
|
|
345
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number =
|
|
346
|
-
{
|
|
347
|
-
enabled: boolean;
|
|
348
|
-
alertOnFailure: boolean;
|
|
349
|
-
type: "number";
|
|
350
|
-
value: number;
|
|
351
|
-
operator:
|
|
352
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Operator;
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean =
|
|
356
|
-
{
|
|
357
|
-
enabled: boolean;
|
|
358
|
-
alertOnFailure: boolean;
|
|
359
|
-
type: "boolean";
|
|
360
|
-
value: boolean;
|
|
361
|
-
};
|
|
362
|
-
|
|
363
|
-
export type CreateEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfig =
|
|
364
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean
|
|
365
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number;
|
|
366
|
-
|
|
367
|
-
export const RagasMetric = {
|
|
368
|
-
ContextPrecision: "context_precision",
|
|
369
|
-
ContextRecall: "context_recall",
|
|
370
|
-
ContextEntitiesRecall: "context_entities_recall",
|
|
371
|
-
Harmfulness: "harmfulness",
|
|
372
|
-
Maliciousness: "maliciousness",
|
|
373
|
-
Coherence: "coherence",
|
|
374
|
-
Correctness: "correctness",
|
|
375
|
-
Conciseness: "conciseness",
|
|
376
|
-
ResponseRelevancy: "response_relevancy",
|
|
377
|
-
Faithfulness: "faithfulness",
|
|
378
|
-
Summarization: "summarization",
|
|
379
|
-
NoiseSensitivity: "noise_sensitivity",
|
|
380
|
-
} as const;
|
|
381
|
-
export type RagasMetric = ClosedEnum<typeof RagasMetric>;
|
|
382
|
-
|
|
383
|
-
export type Ragas = {
|
|
384
|
-
id: string;
|
|
385
|
-
description: string;
|
|
386
|
-
created: string;
|
|
387
|
-
updated: string;
|
|
388
|
-
guardrailConfig?:
|
|
389
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean
|
|
390
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number
|
|
391
|
-
| undefined;
|
|
392
|
-
type: "ragas";
|
|
393
|
-
ragasMetric: RagasMetric;
|
|
394
|
-
key: string;
|
|
395
|
-
model: string;
|
|
396
|
-
};
|
|
397
|
-
|
|
398
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Operator =
|
|
399
|
-
{
|
|
400
|
-
Eq: "eq",
|
|
401
|
-
Ne: "ne",
|
|
402
|
-
Gt: "gt",
|
|
403
|
-
Gte: "gte",
|
|
404
|
-
Lt: "lt",
|
|
405
|
-
Lte: "lte",
|
|
406
|
-
} as const;
|
|
407
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Operator =
|
|
408
|
-
ClosedEnum<
|
|
409
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Operator
|
|
410
|
-
>;
|
|
411
|
-
|
|
412
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Number =
|
|
413
|
-
{
|
|
414
|
-
enabled: boolean;
|
|
415
|
-
alertOnFailure: boolean;
|
|
416
|
-
type: "number";
|
|
417
|
-
value: number;
|
|
418
|
-
operator:
|
|
419
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Operator;
|
|
420
|
-
};
|
|
421
|
-
|
|
422
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Boolean =
|
|
423
|
-
{
|
|
424
|
-
enabled: boolean;
|
|
425
|
-
alertOnFailure: boolean;
|
|
426
|
-
type: "boolean";
|
|
427
|
-
value: boolean;
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
export type CreateEvalResponseBodyEvalsResponse200GuardrailConfig =
|
|
431
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Boolean
|
|
432
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Number;
|
|
433
|
-
|
|
434
|
-
export type ThirtyTwo = {
|
|
435
|
-
type: "grammar_diversity";
|
|
436
|
-
};
|
|
437
|
-
|
|
438
|
-
export type ThirtyOne = {
|
|
439
|
-
type: "lexical_repetition";
|
|
440
|
-
};
|
|
441
|
-
|
|
442
|
-
export type Thirty = {
|
|
443
|
-
type: "sentences_count";
|
|
444
|
-
};
|
|
445
|
-
|
|
446
|
-
export type TwentyNine = {
|
|
447
|
-
type: "words_count";
|
|
448
|
-
};
|
|
449
|
-
|
|
450
|
-
export type TwentyEight = {
|
|
451
|
-
type: "gse_english_level";
|
|
452
|
-
};
|
|
453
|
-
|
|
454
|
-
export type TwentySeven = {
|
|
455
|
-
type: "flesch_reading_ease";
|
|
456
|
-
};
|
|
457
|
-
|
|
458
|
-
export type TwentySix = {
|
|
459
|
-
type: "most_repeated_words";
|
|
460
|
-
};
|
|
461
|
-
|
|
462
|
-
export type TwentyFive = {
|
|
463
|
-
type: "keywords_match";
|
|
464
|
-
keywords: Array<string>;
|
|
465
|
-
};
|
|
466
|
-
|
|
467
|
-
export type TwentyFour = {
|
|
468
|
-
type: "levenshtein_distance";
|
|
469
|
-
};
|
|
470
|
-
|
|
471
|
-
export type TwentyThree = {
|
|
472
|
-
type: "cosine_similarity";
|
|
473
|
-
};
|
|
474
|
-
|
|
475
|
-
export type TwentyTwo = {
|
|
476
|
-
type: "meteor_score";
|
|
477
|
-
};
|
|
478
|
-
|
|
479
|
-
export type TwentyOne = {
|
|
480
|
-
type: "rouge_n";
|
|
481
|
-
};
|
|
482
|
-
|
|
483
|
-
export type Twenty = {
|
|
484
|
-
type: "bleu_score";
|
|
485
|
-
};
|
|
486
|
-
|
|
487
|
-
export type Nineteen = {
|
|
488
|
-
type: "bert_score";
|
|
489
|
-
};
|
|
490
|
-
|
|
491
|
-
export type Eighteen = {
|
|
492
|
-
type: "moderations_google";
|
|
493
|
-
};
|
|
494
|
-
|
|
495
|
-
export type Seventeen = {
|
|
496
|
-
type: "moderations_openai";
|
|
497
|
-
};
|
|
498
|
-
|
|
499
|
-
export type Sixteen = {
|
|
500
|
-
type: "is_valid_json";
|
|
501
|
-
};
|
|
502
|
-
|
|
503
|
-
export type Fifteen = {
|
|
504
|
-
type: "regex";
|
|
505
|
-
pattern: string;
|
|
506
|
-
};
|
|
507
|
-
|
|
508
|
-
export type Fourteen = {
|
|
509
|
-
type: "one_line";
|
|
510
|
-
};
|
|
511
|
-
|
|
512
|
-
export type Thirteen = {
|
|
513
|
-
type: "length_greater_than";
|
|
514
|
-
value: number;
|
|
515
|
-
};
|
|
516
|
-
|
|
517
|
-
export type Twelve = {
|
|
518
|
-
type: "length_between";
|
|
519
|
-
min: number;
|
|
520
|
-
max: number;
|
|
521
|
-
};
|
|
522
|
-
|
|
523
|
-
export type Eleven = {
|
|
524
|
-
type: "length_less_than";
|
|
525
|
-
value: number;
|
|
526
|
-
};
|
|
527
|
-
|
|
528
|
-
export type Ten = {
|
|
529
|
-
type: "exact_match";
|
|
530
|
-
};
|
|
531
|
-
|
|
532
|
-
export type Nine = {
|
|
533
|
-
type: "ends_with";
|
|
534
|
-
value: string;
|
|
535
|
-
};
|
|
536
|
-
|
|
537
|
-
export type Eight = {
|
|
538
|
-
type: "start_with";
|
|
539
|
-
value: string;
|
|
540
|
-
};
|
|
541
|
-
|
|
542
|
-
export type Seven = {
|
|
543
|
-
type: "contains_valid_link";
|
|
544
|
-
};
|
|
545
|
-
|
|
546
|
-
export type Six = {
|
|
547
|
-
type: "contains_url";
|
|
548
|
-
};
|
|
549
|
-
|
|
550
|
-
export type Five = {
|
|
551
|
-
type: "contains_email";
|
|
552
|
-
};
|
|
553
|
-
|
|
554
|
-
export type CreateEvalFunctionParams4 = {
|
|
555
|
-
type: "contains_any";
|
|
556
|
-
keywords: Array<string>;
|
|
557
|
-
};
|
|
558
|
-
|
|
559
|
-
export type CreateEvalFunctionParams3 = {
|
|
560
|
-
type: "contains_all";
|
|
561
|
-
keywords: Array<string>;
|
|
562
|
-
};
|
|
563
|
-
|
|
564
|
-
export type CreateEvalFunctionParams2 = {
|
|
565
|
-
type: "contains_none";
|
|
566
|
-
keywords: Array<string>;
|
|
567
|
-
};
|
|
568
|
-
|
|
569
|
-
export type CreateEvalFunctionParams1 = {
|
|
570
|
-
type: "contains";
|
|
571
|
-
value: string;
|
|
572
|
-
};
|
|
573
|
-
|
|
574
|
-
export type FunctionParams =
|
|
575
|
-
| CreateEvalFunctionParams1
|
|
576
|
-
| CreateEvalFunctionParams2
|
|
577
|
-
| CreateEvalFunctionParams3
|
|
578
|
-
| CreateEvalFunctionParams4
|
|
579
|
-
| Five
|
|
580
|
-
| Six
|
|
581
|
-
| Seven
|
|
582
|
-
| Eight
|
|
583
|
-
| Nine
|
|
584
|
-
| Ten
|
|
585
|
-
| Eleven
|
|
586
|
-
| Twelve
|
|
587
|
-
| Thirteen
|
|
588
|
-
| Fourteen
|
|
589
|
-
| Fifteen
|
|
590
|
-
| Sixteen
|
|
591
|
-
| Seventeen
|
|
592
|
-
| Eighteen
|
|
593
|
-
| Nineteen
|
|
594
|
-
| Twenty
|
|
595
|
-
| TwentyOne
|
|
596
|
-
| TwentyTwo
|
|
597
|
-
| TwentyThree
|
|
598
|
-
| TwentyFour
|
|
599
|
-
| TwentyFive
|
|
600
|
-
| TwentySix
|
|
601
|
-
| TwentySeven
|
|
602
|
-
| TwentyEight
|
|
603
|
-
| TwentyNine
|
|
604
|
-
| Thirty
|
|
605
|
-
| ThirtyOne
|
|
606
|
-
| ThirtyTwo;
|
|
607
|
-
|
|
608
|
-
export type CreateEvalResponseBodyFunction = {
|
|
609
|
-
id: string;
|
|
610
|
-
description: string;
|
|
611
|
-
created: string;
|
|
612
|
-
updated: string;
|
|
613
|
-
guardrailConfig?:
|
|
614
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Boolean
|
|
615
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Number
|
|
616
|
-
| undefined;
|
|
617
|
-
type: "function_eval";
|
|
618
|
-
functionParams:
|
|
619
|
-
| CreateEvalFunctionParams1
|
|
620
|
-
| CreateEvalFunctionParams2
|
|
621
|
-
| CreateEvalFunctionParams3
|
|
622
|
-
| CreateEvalFunctionParams4
|
|
623
|
-
| Five
|
|
624
|
-
| Six
|
|
625
|
-
| Seven
|
|
626
|
-
| Eight
|
|
627
|
-
| Nine
|
|
628
|
-
| Ten
|
|
629
|
-
| Eleven
|
|
630
|
-
| Twelve
|
|
631
|
-
| Thirteen
|
|
632
|
-
| Fourteen
|
|
633
|
-
| Fifteen
|
|
634
|
-
| Sixteen
|
|
635
|
-
| Seventeen
|
|
636
|
-
| Eighteen
|
|
637
|
-
| Nineteen
|
|
638
|
-
| Twenty
|
|
639
|
-
| TwentyOne
|
|
640
|
-
| TwentyTwo
|
|
641
|
-
| TwentyThree
|
|
642
|
-
| TwentyFour
|
|
643
|
-
| TwentyFive
|
|
644
|
-
| TwentySix
|
|
645
|
-
| TwentySeven
|
|
646
|
-
| TwentyEight
|
|
647
|
-
| TwentyNine
|
|
648
|
-
| Thirty
|
|
649
|
-
| ThirtyOne
|
|
650
|
-
| ThirtyTwo;
|
|
651
|
-
key: string;
|
|
652
|
-
};
|
|
653
|
-
|
|
654
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator =
|
|
655
|
-
{
|
|
656
|
-
Eq: "eq",
|
|
657
|
-
Ne: "ne",
|
|
658
|
-
Gt: "gt",
|
|
659
|
-
Gte: "gte",
|
|
660
|
-
Lt: "lt",
|
|
661
|
-
Lte: "lte",
|
|
662
|
-
} as const;
|
|
663
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator =
|
|
664
|
-
ClosedEnum<
|
|
665
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator
|
|
666
|
-
>;
|
|
667
|
-
|
|
668
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber =
|
|
669
|
-
{
|
|
670
|
-
enabled: boolean;
|
|
671
|
-
alertOnFailure: boolean;
|
|
672
|
-
type: "number";
|
|
673
|
-
value: number;
|
|
674
|
-
operator:
|
|
675
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator;
|
|
676
|
-
};
|
|
677
|
-
|
|
678
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean =
|
|
679
|
-
{
|
|
680
|
-
enabled: boolean;
|
|
681
|
-
alertOnFailure: boolean;
|
|
682
|
-
type: "boolean";
|
|
683
|
-
value: boolean;
|
|
684
|
-
};
|
|
685
|
-
|
|
686
|
-
export type CreateEvalResponseBodyEvalsResponseGuardrailConfig =
|
|
687
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean
|
|
688
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber;
|
|
689
|
-
|
|
690
|
-
export type ResponseBodyPython = {
|
|
691
|
-
id: string;
|
|
692
|
-
description: string;
|
|
693
|
-
created: string;
|
|
694
|
-
updated: string;
|
|
695
|
-
guardrailConfig?:
|
|
696
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean
|
|
697
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber
|
|
698
|
-
| undefined;
|
|
699
|
-
code: string;
|
|
700
|
-
type: "python_eval";
|
|
701
|
-
key: string;
|
|
702
|
-
};
|
|
703
|
-
|
|
704
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator =
|
|
705
|
-
{
|
|
706
|
-
Eq: "eq",
|
|
707
|
-
Ne: "ne",
|
|
708
|
-
Gt: "gt",
|
|
709
|
-
Gte: "gte",
|
|
710
|
-
Lt: "lt",
|
|
711
|
-
Lte: "lte",
|
|
712
|
-
} as const;
|
|
713
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator =
|
|
714
|
-
ClosedEnum<
|
|
715
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator
|
|
716
|
-
>;
|
|
717
|
-
|
|
718
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber = {
|
|
719
|
-
enabled: boolean;
|
|
720
|
-
alertOnFailure: boolean;
|
|
721
|
-
type: "number";
|
|
722
|
-
value: number;
|
|
723
|
-
operator: CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator;
|
|
724
|
-
};
|
|
725
|
-
|
|
726
|
-
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean = {
|
|
727
|
-
enabled: boolean;
|
|
728
|
-
alertOnFailure: boolean;
|
|
729
|
-
type: "boolean";
|
|
730
|
-
value: boolean;
|
|
731
|
-
};
|
|
732
|
-
|
|
733
|
-
export type CreateEvalResponseBodyEvalsGuardrailConfig =
|
|
734
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean
|
|
735
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber;
|
|
736
|
-
|
|
737
|
-
export const ResponseBodyMethod = {
|
|
738
|
-
Get: "GET",
|
|
739
|
-
Post: "POST",
|
|
740
|
-
} as const;
|
|
741
|
-
export type ResponseBodyMethod = ClosedEnum<typeof ResponseBodyMethod>;
|
|
742
|
-
|
|
743
|
-
export type ResponseBodyHTTP = {
|
|
744
|
-
id: string;
|
|
745
|
-
description: string;
|
|
746
|
-
created: string;
|
|
747
|
-
updated: string;
|
|
748
|
-
guardrailConfig?:
|
|
749
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean
|
|
750
|
-
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber
|
|
751
|
-
| undefined;
|
|
752
|
-
type: "http_eval";
|
|
753
|
-
url: string;
|
|
754
|
-
method: ResponseBodyMethod;
|
|
755
|
-
headers: { [k: string]: string };
|
|
756
|
-
payload: { [k: string]: any };
|
|
757
|
-
key: string;
|
|
758
|
-
};
|
|
759
|
-
|
|
760
|
-
export const CreateEvalGuardrailConfigEvalsResponse200Operator = {
|
|
761
|
-
Eq: "eq",
|
|
762
|
-
Ne: "ne",
|
|
763
|
-
Gt: "gt",
|
|
764
|
-
Gte: "gte",
|
|
765
|
-
Lt: "lt",
|
|
766
|
-
Lte: "lte",
|
|
767
|
-
} as const;
|
|
768
|
-
export type CreateEvalGuardrailConfigEvalsResponse200Operator = ClosedEnum<
|
|
769
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200Operator
|
|
770
|
-
>;
|
|
771
|
-
|
|
772
|
-
export type CreateEvalGuardrailConfigEvalsResponse200Number = {
|
|
773
|
-
enabled: boolean;
|
|
774
|
-
alertOnFailure: boolean;
|
|
775
|
-
type: "number";
|
|
776
|
-
value: number;
|
|
777
|
-
operator: CreateEvalGuardrailConfigEvalsResponse200Operator;
|
|
778
|
-
};
|
|
779
|
-
|
|
780
|
-
export type CreateEvalGuardrailConfigEvalsResponse200Boolean = {
|
|
781
|
-
enabled: boolean;
|
|
782
|
-
alertOnFailure: boolean;
|
|
783
|
-
type: "boolean";
|
|
784
|
-
value: boolean;
|
|
785
|
-
};
|
|
786
|
-
|
|
787
|
-
export type CreateEvalResponseBodyGuardrailConfig =
|
|
788
|
-
| CreateEvalGuardrailConfigEvalsResponse200Boolean
|
|
789
|
-
| CreateEvalGuardrailConfigEvalsResponse200Number;
|
|
790
|
-
|
|
791
|
-
export type ResponseBodyJSON = {
|
|
792
|
-
id: string;
|
|
793
|
-
description: string;
|
|
794
|
-
created: string;
|
|
795
|
-
updated: string;
|
|
796
|
-
guardrailConfig?:
|
|
797
|
-
| CreateEvalGuardrailConfigEvalsResponse200Boolean
|
|
798
|
-
| CreateEvalGuardrailConfigEvalsResponse200Number
|
|
799
|
-
| undefined;
|
|
800
|
-
type: "json_schema";
|
|
801
|
-
schema: string;
|
|
802
|
-
key: string;
|
|
803
|
-
};
|
|
804
|
-
|
|
805
|
-
export const CreateEvalGuardrailConfigEvalsResponseOperator = {
|
|
806
|
-
Eq: "eq",
|
|
807
|
-
Ne: "ne",
|
|
808
|
-
Gt: "gt",
|
|
809
|
-
Gte: "gte",
|
|
810
|
-
Lt: "lt",
|
|
811
|
-
Lte: "lte",
|
|
812
|
-
} as const;
|
|
813
|
-
export type CreateEvalGuardrailConfigEvalsResponseOperator = ClosedEnum<
|
|
814
|
-
typeof CreateEvalGuardrailConfigEvalsResponseOperator
|
|
815
|
-
>;
|
|
816
|
-
|
|
817
|
-
export type CreateEvalGuardrailConfigEvalsResponseNumber = {
|
|
818
|
-
enabled: boolean;
|
|
819
|
-
alertOnFailure: boolean;
|
|
820
|
-
type: "number";
|
|
821
|
-
value: number;
|
|
822
|
-
operator: CreateEvalGuardrailConfigEvalsResponseOperator;
|
|
823
|
-
};
|
|
824
|
-
|
|
825
|
-
export type CreateEvalGuardrailConfigEvalsResponseBoolean = {
|
|
826
|
-
enabled: boolean;
|
|
827
|
-
alertOnFailure: boolean;
|
|
828
|
-
type: "boolean";
|
|
829
|
-
value: boolean;
|
|
830
|
-
};
|
|
831
|
-
|
|
832
|
-
export type ResponseBodyGuardrailConfig =
|
|
833
|
-
| CreateEvalGuardrailConfigEvalsResponseBoolean
|
|
834
|
-
| CreateEvalGuardrailConfigEvalsResponseNumber;
|
|
835
|
-
|
|
836
|
-
export type ResponseBodyLLM = {
|
|
837
|
-
id: string;
|
|
838
|
-
description: string;
|
|
839
|
-
created: string;
|
|
840
|
-
updated: string;
|
|
841
|
-
guardrailConfig?:
|
|
842
|
-
| CreateEvalGuardrailConfigEvalsResponseBoolean
|
|
843
|
-
| CreateEvalGuardrailConfigEvalsResponseNumber
|
|
844
|
-
| undefined;
|
|
845
|
-
type: "llm_eval";
|
|
846
|
-
prompt: string;
|
|
847
|
-
key: string;
|
|
848
|
-
model: string;
|
|
849
|
-
};
|
|
850
|
-
|
|
851
|
-
/**
|
|
852
|
-
* Successfully created an evaluator
|
|
853
|
-
*/
|
|
854
|
-
export type CreateEvalResponseBody =
|
|
855
|
-
| ResponseBodyLLM
|
|
856
|
-
| ResponseBodyJSON
|
|
857
|
-
| ResponseBodyHTTP
|
|
858
|
-
| ResponseBodyPython
|
|
859
|
-
| CreateEvalResponseBodyFunction
|
|
860
|
-
| Ragas
|
|
861
|
-
| Typescript;
|
|
862
|
-
|
|
863
|
-
/** @internal */
|
|
864
|
-
export const CreateEvalGuardrailConfigEvalsOperator$outboundSchema:
|
|
865
|
-
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsOperator> = z.nativeEnum(
|
|
866
|
-
CreateEvalGuardrailConfigEvalsOperator,
|
|
867
|
-
);
|
|
868
|
-
|
|
869
|
-
/** @internal */
|
|
870
|
-
export type CreateEvalGuardrailConfigEvalsNumber$Outbound = {
|
|
871
|
-
enabled: boolean;
|
|
872
|
-
alert_on_failure: boolean;
|
|
873
|
-
type: "number";
|
|
874
|
-
value: number;
|
|
875
|
-
operator: string;
|
|
876
|
-
};
|
|
877
|
-
|
|
878
|
-
/** @internal */
|
|
879
|
-
export const CreateEvalGuardrailConfigEvalsNumber$outboundSchema: z.ZodType<
|
|
880
|
-
CreateEvalGuardrailConfigEvalsNumber$Outbound,
|
|
881
|
-
z.ZodTypeDef,
|
|
882
|
-
CreateEvalGuardrailConfigEvalsNumber
|
|
883
|
-
> = z.object({
|
|
884
|
-
enabled: z.boolean(),
|
|
885
|
-
alertOnFailure: z.boolean().default(false),
|
|
886
|
-
type: z.literal("number"),
|
|
887
|
-
value: z.number(),
|
|
888
|
-
operator: CreateEvalGuardrailConfigEvalsOperator$outboundSchema,
|
|
889
|
-
}).transform((v) => {
|
|
890
|
-
return remap$(v, {
|
|
891
|
-
alertOnFailure: "alert_on_failure",
|
|
892
|
-
});
|
|
893
|
-
});
|
|
894
|
-
|
|
895
|
-
export function createEvalGuardrailConfigEvalsNumberToJSON(
|
|
896
|
-
createEvalGuardrailConfigEvalsNumber: CreateEvalGuardrailConfigEvalsNumber,
|
|
897
|
-
): string {
|
|
898
|
-
return JSON.stringify(
|
|
899
|
-
CreateEvalGuardrailConfigEvalsNumber$outboundSchema.parse(
|
|
900
|
-
createEvalGuardrailConfigEvalsNumber,
|
|
901
|
-
),
|
|
902
|
-
);
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
/** @internal */
|
|
906
|
-
export type CreateEvalGuardrailConfigEvalsBoolean$Outbound = {
|
|
907
|
-
enabled: boolean;
|
|
908
|
-
alert_on_failure: boolean;
|
|
909
|
-
type: "boolean";
|
|
910
|
-
value: boolean;
|
|
911
|
-
};
|
|
912
|
-
|
|
913
|
-
/** @internal */
|
|
914
|
-
export const CreateEvalGuardrailConfigEvalsBoolean$outboundSchema: z.ZodType<
|
|
915
|
-
CreateEvalGuardrailConfigEvalsBoolean$Outbound,
|
|
916
|
-
z.ZodTypeDef,
|
|
917
|
-
CreateEvalGuardrailConfigEvalsBoolean
|
|
918
|
-
> = z.object({
|
|
919
|
-
enabled: z.boolean(),
|
|
920
|
-
alertOnFailure: z.boolean().default(false),
|
|
921
|
-
type: z.literal("boolean"),
|
|
922
|
-
value: z.boolean(),
|
|
923
|
-
}).transform((v) => {
|
|
924
|
-
return remap$(v, {
|
|
925
|
-
alertOnFailure: "alert_on_failure",
|
|
926
|
-
});
|
|
927
|
-
});
|
|
928
|
-
|
|
929
|
-
export function createEvalGuardrailConfigEvalsBooleanToJSON(
|
|
930
|
-
createEvalGuardrailConfigEvalsBoolean: CreateEvalGuardrailConfigEvalsBoolean,
|
|
931
|
-
): string {
|
|
932
|
-
return JSON.stringify(
|
|
933
|
-
CreateEvalGuardrailConfigEvalsBoolean$outboundSchema.parse(
|
|
934
|
-
createEvalGuardrailConfigEvalsBoolean,
|
|
935
|
-
),
|
|
936
|
-
);
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
/** @internal */
|
|
940
|
-
export type CreateEvalRequestBodyEvalsGuardrailConfig$Outbound =
|
|
941
|
-
| CreateEvalGuardrailConfigEvalsBoolean$Outbound
|
|
942
|
-
| CreateEvalGuardrailConfigEvalsNumber$Outbound;
|
|
943
|
-
|
|
944
|
-
/** @internal */
|
|
945
|
-
export const CreateEvalRequestBodyEvalsGuardrailConfig$outboundSchema:
|
|
946
|
-
z.ZodType<
|
|
947
|
-
CreateEvalRequestBodyEvalsGuardrailConfig$Outbound,
|
|
948
|
-
z.ZodTypeDef,
|
|
949
|
-
CreateEvalRequestBodyEvalsGuardrailConfig
|
|
950
|
-
> = z.union([
|
|
951
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsBoolean$outboundSchema),
|
|
952
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsNumber$outboundSchema),
|
|
953
|
-
]);
|
|
954
|
-
|
|
955
|
-
export function createEvalRequestBodyEvalsGuardrailConfigToJSON(
|
|
956
|
-
createEvalRequestBodyEvalsGuardrailConfig:
|
|
957
|
-
CreateEvalRequestBodyEvalsGuardrailConfig,
|
|
958
|
-
): string {
|
|
959
|
-
return JSON.stringify(
|
|
960
|
-
CreateEvalRequestBodyEvalsGuardrailConfig$outboundSchema.parse(
|
|
961
|
-
createEvalRequestBodyEvalsGuardrailConfig,
|
|
962
|
-
),
|
|
963
|
-
);
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
/** @internal */
|
|
967
|
-
export const CreateEvalRequestBodyEvalsOutputType$outboundSchema:
|
|
968
|
-
z.ZodNativeEnum<typeof CreateEvalRequestBodyEvalsOutputType> = z.nativeEnum(
|
|
969
|
-
CreateEvalRequestBodyEvalsOutputType,
|
|
970
|
-
);
|
|
971
|
-
|
|
972
|
-
/** @internal */
|
|
973
|
-
export type Python$Outbound = {
|
|
974
|
-
guardrail_config?:
|
|
975
|
-
| CreateEvalGuardrailConfigEvalsBoolean$Outbound
|
|
976
|
-
| CreateEvalGuardrailConfigEvalsNumber$Outbound
|
|
977
|
-
| undefined;
|
|
978
|
-
output_type?: string | undefined;
|
|
979
|
-
code: string;
|
|
980
|
-
type: "python_eval";
|
|
981
|
-
path: string;
|
|
982
|
-
description: string;
|
|
983
|
-
key: string;
|
|
984
|
-
};
|
|
985
|
-
|
|
986
|
-
/** @internal */
|
|
987
|
-
export const Python$outboundSchema: z.ZodType<
|
|
988
|
-
Python$Outbound,
|
|
989
|
-
z.ZodTypeDef,
|
|
990
|
-
Python
|
|
991
|
-
> = z.object({
|
|
992
|
-
guardrailConfig: z.union([
|
|
993
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsBoolean$outboundSchema),
|
|
994
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsNumber$outboundSchema),
|
|
995
|
-
]).optional(),
|
|
996
|
-
outputType: CreateEvalRequestBodyEvalsOutputType$outboundSchema.optional(),
|
|
997
|
-
code: z.string(),
|
|
998
|
-
type: z.literal("python_eval"),
|
|
999
|
-
path: z.string(),
|
|
1000
|
-
description: z.string().default(""),
|
|
1001
|
-
key: z.string(),
|
|
1002
|
-
}).transform((v) => {
|
|
1003
|
-
return remap$(v, {
|
|
1004
|
-
guardrailConfig: "guardrail_config",
|
|
1005
|
-
outputType: "output_type",
|
|
1006
|
-
});
|
|
1007
|
-
});
|
|
1008
|
-
|
|
1009
|
-
export function pythonToJSON(python: Python): string {
|
|
1010
|
-
return JSON.stringify(Python$outboundSchema.parse(python));
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
/** @internal */
|
|
1014
|
-
export const CreateEvalGuardrailConfigOperator$outboundSchema: z.ZodNativeEnum<
|
|
1015
|
-
typeof CreateEvalGuardrailConfigOperator
|
|
1016
|
-
> = z.nativeEnum(CreateEvalGuardrailConfigOperator);
|
|
1017
|
-
|
|
1018
|
-
/** @internal */
|
|
1019
|
-
export type CreateEvalGuardrailConfigNumber$Outbound = {
|
|
1020
|
-
enabled: boolean;
|
|
1021
|
-
alert_on_failure: boolean;
|
|
1022
|
-
type: "number";
|
|
1023
|
-
value: number;
|
|
1024
|
-
operator: string;
|
|
1025
|
-
};
|
|
1026
|
-
|
|
1027
|
-
/** @internal */
|
|
1028
|
-
export const CreateEvalGuardrailConfigNumber$outboundSchema: z.ZodType<
|
|
1029
|
-
CreateEvalGuardrailConfigNumber$Outbound,
|
|
1030
|
-
z.ZodTypeDef,
|
|
1031
|
-
CreateEvalGuardrailConfigNumber
|
|
1032
|
-
> = z.object({
|
|
1033
|
-
enabled: z.boolean(),
|
|
1034
|
-
alertOnFailure: z.boolean().default(false),
|
|
1035
|
-
type: z.literal("number"),
|
|
1036
|
-
value: z.number(),
|
|
1037
|
-
operator: CreateEvalGuardrailConfigOperator$outboundSchema,
|
|
1038
|
-
}).transform((v) => {
|
|
1039
|
-
return remap$(v, {
|
|
1040
|
-
alertOnFailure: "alert_on_failure",
|
|
1041
|
-
});
|
|
1042
|
-
});
|
|
1043
|
-
|
|
1044
|
-
export function createEvalGuardrailConfigNumberToJSON(
|
|
1045
|
-
createEvalGuardrailConfigNumber: CreateEvalGuardrailConfigNumber,
|
|
1046
|
-
): string {
|
|
1047
|
-
return JSON.stringify(
|
|
1048
|
-
CreateEvalGuardrailConfigNumber$outboundSchema.parse(
|
|
1049
|
-
createEvalGuardrailConfigNumber,
|
|
1050
|
-
),
|
|
1051
|
-
);
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
/** @internal */
|
|
1055
|
-
export type CreateEvalGuardrailConfigBoolean$Outbound = {
|
|
1056
|
-
enabled: boolean;
|
|
1057
|
-
alert_on_failure: boolean;
|
|
1058
|
-
type: "boolean";
|
|
1059
|
-
value: boolean;
|
|
1060
|
-
};
|
|
1061
|
-
|
|
1062
|
-
/** @internal */
|
|
1063
|
-
export const CreateEvalGuardrailConfigBoolean$outboundSchema: z.ZodType<
|
|
1064
|
-
CreateEvalGuardrailConfigBoolean$Outbound,
|
|
1065
|
-
z.ZodTypeDef,
|
|
1066
|
-
CreateEvalGuardrailConfigBoolean
|
|
1067
|
-
> = z.object({
|
|
1068
|
-
enabled: z.boolean(),
|
|
1069
|
-
alertOnFailure: z.boolean().default(false),
|
|
1070
|
-
type: z.literal("boolean"),
|
|
1071
|
-
value: z.boolean(),
|
|
1072
|
-
}).transform((v) => {
|
|
1073
|
-
return remap$(v, {
|
|
1074
|
-
alertOnFailure: "alert_on_failure",
|
|
1075
|
-
});
|
|
1076
|
-
});
|
|
1077
|
-
|
|
1078
|
-
export function createEvalGuardrailConfigBooleanToJSON(
|
|
1079
|
-
createEvalGuardrailConfigBoolean: CreateEvalGuardrailConfigBoolean,
|
|
1080
|
-
): string {
|
|
1081
|
-
return JSON.stringify(
|
|
1082
|
-
CreateEvalGuardrailConfigBoolean$outboundSchema.parse(
|
|
1083
|
-
createEvalGuardrailConfigBoolean,
|
|
1084
|
-
),
|
|
1085
|
-
);
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
/** @internal */
|
|
1089
|
-
export type CreateEvalRequestBodyGuardrailConfig$Outbound =
|
|
1090
|
-
| CreateEvalGuardrailConfigBoolean$Outbound
|
|
1091
|
-
| CreateEvalGuardrailConfigNumber$Outbound;
|
|
1092
|
-
|
|
1093
|
-
/** @internal */
|
|
1094
|
-
export const CreateEvalRequestBodyGuardrailConfig$outboundSchema: z.ZodType<
|
|
1095
|
-
CreateEvalRequestBodyGuardrailConfig$Outbound,
|
|
1096
|
-
z.ZodTypeDef,
|
|
1097
|
-
CreateEvalRequestBodyGuardrailConfig
|
|
1098
|
-
> = z.union([
|
|
1099
|
-
z.lazy(() => CreateEvalGuardrailConfigBoolean$outboundSchema),
|
|
1100
|
-
z.lazy(() => CreateEvalGuardrailConfigNumber$outboundSchema),
|
|
1101
|
-
]);
|
|
1102
|
-
|
|
1103
|
-
export function createEvalRequestBodyGuardrailConfigToJSON(
|
|
1104
|
-
createEvalRequestBodyGuardrailConfig: CreateEvalRequestBodyGuardrailConfig,
|
|
1105
|
-
): string {
|
|
1106
|
-
return JSON.stringify(
|
|
1107
|
-
CreateEvalRequestBodyGuardrailConfig$outboundSchema.parse(
|
|
1108
|
-
createEvalRequestBodyGuardrailConfig,
|
|
1109
|
-
),
|
|
1110
|
-
);
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
/** @internal */
|
|
1114
|
-
export const CreateEvalRequestBodyOutputType$outboundSchema: z.ZodNativeEnum<
|
|
1115
|
-
typeof CreateEvalRequestBodyOutputType
|
|
1116
|
-
> = z.nativeEnum(CreateEvalRequestBodyOutputType);
|
|
1117
|
-
|
|
1118
|
-
/** @internal */
|
|
1119
|
-
export const CreateEvalRequestBodyMethod$outboundSchema: z.ZodNativeEnum<
|
|
1120
|
-
typeof CreateEvalRequestBodyMethod
|
|
1121
|
-
> = z.nativeEnum(CreateEvalRequestBodyMethod);
|
|
1122
|
-
|
|
1123
|
-
/** @internal */
|
|
1124
|
-
export type CreateEvalRequestBodyHTTP$Outbound = {
|
|
1125
|
-
guardrail_config?:
|
|
1126
|
-
| CreateEvalGuardrailConfigBoolean$Outbound
|
|
1127
|
-
| CreateEvalGuardrailConfigNumber$Outbound
|
|
1128
|
-
| undefined;
|
|
1129
|
-
output_type?: string | undefined;
|
|
1130
|
-
type: "http_eval";
|
|
1131
|
-
url: string;
|
|
1132
|
-
method: string;
|
|
1133
|
-
headers: { [k: string]: string };
|
|
1134
|
-
payload: { [k: string]: any };
|
|
1135
|
-
path: string;
|
|
1136
|
-
description: string;
|
|
1137
|
-
key: string;
|
|
1138
|
-
};
|
|
1139
|
-
|
|
1140
|
-
/** @internal */
|
|
1141
|
-
export const CreateEvalRequestBodyHTTP$outboundSchema: z.ZodType<
|
|
1142
|
-
CreateEvalRequestBodyHTTP$Outbound,
|
|
1143
|
-
z.ZodTypeDef,
|
|
1144
|
-
CreateEvalRequestBodyHTTP
|
|
1145
|
-
> = z.object({
|
|
1146
|
-
guardrailConfig: z.union([
|
|
1147
|
-
z.lazy(() => CreateEvalGuardrailConfigBoolean$outboundSchema),
|
|
1148
|
-
z.lazy(() => CreateEvalGuardrailConfigNumber$outboundSchema),
|
|
1149
|
-
]).optional(),
|
|
1150
|
-
outputType: CreateEvalRequestBodyOutputType$outboundSchema.optional(),
|
|
1151
|
-
type: z.literal("http_eval"),
|
|
1152
|
-
url: z.string(),
|
|
1153
|
-
method: CreateEvalRequestBodyMethod$outboundSchema,
|
|
1154
|
-
headers: z.record(z.string()),
|
|
1155
|
-
payload: z.record(z.any()),
|
|
1156
|
-
path: z.string(),
|
|
1157
|
-
description: z.string().default(""),
|
|
1158
|
-
key: z.string(),
|
|
1159
|
-
}).transform((v) => {
|
|
1160
|
-
return remap$(v, {
|
|
1161
|
-
guardrailConfig: "guardrail_config",
|
|
1162
|
-
outputType: "output_type",
|
|
1163
|
-
});
|
|
1164
|
-
});
|
|
1165
|
-
|
|
1166
|
-
export function createEvalRequestBodyHTTPToJSON(
|
|
1167
|
-
createEvalRequestBodyHTTP: CreateEvalRequestBodyHTTP,
|
|
1168
|
-
): string {
|
|
1169
|
-
return JSON.stringify(
|
|
1170
|
-
CreateEvalRequestBodyHTTP$outboundSchema.parse(createEvalRequestBodyHTTP),
|
|
1171
|
-
);
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
/** @internal */
|
|
1175
|
-
export const GuardrailConfigOperator$outboundSchema: z.ZodNativeEnum<
|
|
1176
|
-
typeof GuardrailConfigOperator
|
|
1177
|
-
> = z.nativeEnum(GuardrailConfigOperator);
|
|
1178
|
-
|
|
1179
|
-
/** @internal */
|
|
1180
|
-
export type GuardrailConfigNumber$Outbound = {
|
|
1181
|
-
enabled: boolean;
|
|
1182
|
-
alert_on_failure: boolean;
|
|
1183
|
-
type: "number";
|
|
1184
|
-
value: number;
|
|
1185
|
-
operator: string;
|
|
1186
|
-
};
|
|
1187
|
-
|
|
1188
|
-
/** @internal */
|
|
1189
|
-
export const GuardrailConfigNumber$outboundSchema: z.ZodType<
|
|
1190
|
-
GuardrailConfigNumber$Outbound,
|
|
1191
|
-
z.ZodTypeDef,
|
|
1192
|
-
GuardrailConfigNumber
|
|
1193
|
-
> = z.object({
|
|
1194
|
-
enabled: z.boolean(),
|
|
1195
|
-
alertOnFailure: z.boolean().default(false),
|
|
1196
|
-
type: z.literal("number"),
|
|
1197
|
-
value: z.number(),
|
|
1198
|
-
operator: GuardrailConfigOperator$outboundSchema,
|
|
1199
|
-
}).transform((v) => {
|
|
1200
|
-
return remap$(v, {
|
|
1201
|
-
alertOnFailure: "alert_on_failure",
|
|
1202
|
-
});
|
|
1203
|
-
});
|
|
1204
|
-
|
|
1205
|
-
export function guardrailConfigNumberToJSON(
|
|
1206
|
-
guardrailConfigNumber: GuardrailConfigNumber,
|
|
1207
|
-
): string {
|
|
1208
|
-
return JSON.stringify(
|
|
1209
|
-
GuardrailConfigNumber$outboundSchema.parse(guardrailConfigNumber),
|
|
1210
|
-
);
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
/** @internal */
|
|
1214
|
-
export type GuardrailConfigBoolean$Outbound = {
|
|
1215
|
-
enabled: boolean;
|
|
1216
|
-
alert_on_failure: boolean;
|
|
1217
|
-
type: "boolean";
|
|
1218
|
-
value: boolean;
|
|
1219
|
-
};
|
|
1220
|
-
|
|
1221
|
-
/** @internal */
|
|
1222
|
-
export const GuardrailConfigBoolean$outboundSchema: z.ZodType<
|
|
1223
|
-
GuardrailConfigBoolean$Outbound,
|
|
1224
|
-
z.ZodTypeDef,
|
|
1225
|
-
GuardrailConfigBoolean
|
|
1226
|
-
> = z.object({
|
|
1227
|
-
enabled: z.boolean(),
|
|
1228
|
-
alertOnFailure: z.boolean().default(false),
|
|
1229
|
-
type: z.literal("boolean"),
|
|
1230
|
-
value: z.boolean(),
|
|
1231
|
-
}).transform((v) => {
|
|
1232
|
-
return remap$(v, {
|
|
1233
|
-
alertOnFailure: "alert_on_failure",
|
|
1234
|
-
});
|
|
1235
|
-
});
|
|
1236
|
-
|
|
1237
|
-
export function guardrailConfigBooleanToJSON(
|
|
1238
|
-
guardrailConfigBoolean: GuardrailConfigBoolean,
|
|
1239
|
-
): string {
|
|
1240
|
-
return JSON.stringify(
|
|
1241
|
-
GuardrailConfigBoolean$outboundSchema.parse(guardrailConfigBoolean),
|
|
1242
|
-
);
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
/** @internal */
|
|
1246
|
-
export type RequestBodyGuardrailConfig$Outbound =
|
|
1247
|
-
| GuardrailConfigBoolean$Outbound
|
|
1248
|
-
| GuardrailConfigNumber$Outbound;
|
|
1249
|
-
|
|
1250
|
-
/** @internal */
|
|
1251
|
-
export const RequestBodyGuardrailConfig$outboundSchema: z.ZodType<
|
|
1252
|
-
RequestBodyGuardrailConfig$Outbound,
|
|
1253
|
-
z.ZodTypeDef,
|
|
1254
|
-
RequestBodyGuardrailConfig
|
|
1255
|
-
> = z.union([
|
|
1256
|
-
z.lazy(() => GuardrailConfigBoolean$outboundSchema),
|
|
1257
|
-
z.lazy(() => GuardrailConfigNumber$outboundSchema),
|
|
1258
|
-
]);
|
|
1259
|
-
|
|
1260
|
-
export function requestBodyGuardrailConfigToJSON(
|
|
1261
|
-
requestBodyGuardrailConfig: RequestBodyGuardrailConfig,
|
|
1262
|
-
): string {
|
|
1263
|
-
return JSON.stringify(
|
|
1264
|
-
RequestBodyGuardrailConfig$outboundSchema.parse(requestBodyGuardrailConfig),
|
|
1265
|
-
);
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
/** @internal */
|
|
1269
|
-
export const RequestBodyOutputType$outboundSchema: z.ZodNativeEnum<
|
|
1270
|
-
typeof RequestBodyOutputType
|
|
1271
|
-
> = z.nativeEnum(RequestBodyOutputType);
|
|
1272
|
-
|
|
1273
|
-
/** @internal */
|
|
1274
|
-
export type Json$Outbound = {
|
|
1275
|
-
guardrail_config?:
|
|
1276
|
-
| GuardrailConfigBoolean$Outbound
|
|
1277
|
-
| GuardrailConfigNumber$Outbound
|
|
1278
|
-
| undefined;
|
|
1279
|
-
output_type?: string | undefined;
|
|
1280
|
-
type: "json_schema";
|
|
1281
|
-
schema: string;
|
|
1282
|
-
path: string;
|
|
1283
|
-
description: string;
|
|
1284
|
-
key: string;
|
|
1285
|
-
};
|
|
1286
|
-
|
|
1287
|
-
/** @internal */
|
|
1288
|
-
export const Json$outboundSchema: z.ZodType<Json$Outbound, z.ZodTypeDef, Json> =
|
|
1289
|
-
z.object({
|
|
1290
|
-
guardrailConfig: z.union([
|
|
1291
|
-
z.lazy(() => GuardrailConfigBoolean$outboundSchema),
|
|
1292
|
-
z.lazy(() => GuardrailConfigNumber$outboundSchema),
|
|
1293
|
-
]).optional(),
|
|
1294
|
-
outputType: RequestBodyOutputType$outboundSchema.optional(),
|
|
1295
|
-
type: z.literal("json_schema"),
|
|
1296
|
-
schema: z.string(),
|
|
1297
|
-
path: z.string(),
|
|
1298
|
-
description: z.string().default(""),
|
|
1299
|
-
key: z.string(),
|
|
1300
|
-
}).transform((v) => {
|
|
1301
|
-
return remap$(v, {
|
|
1302
|
-
guardrailConfig: "guardrail_config",
|
|
1303
|
-
outputType: "output_type",
|
|
1304
|
-
});
|
|
1305
|
-
});
|
|
1306
|
-
|
|
1307
|
-
export function jsonToJSON(json: Json): string {
|
|
1308
|
-
return JSON.stringify(Json$outboundSchema.parse(json));
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
/** @internal */
|
|
1312
|
-
export const Operator$outboundSchema: z.ZodNativeEnum<typeof Operator> = z
|
|
1313
|
-
.nativeEnum(Operator);
|
|
1314
|
-
|
|
1315
|
-
/** @internal */
|
|
1316
|
-
export type NumberT$Outbound = {
|
|
1317
|
-
enabled: boolean;
|
|
1318
|
-
alert_on_failure: boolean;
|
|
1319
|
-
type: "number";
|
|
1320
|
-
value: number;
|
|
1321
|
-
operator: string;
|
|
1322
|
-
};
|
|
1323
|
-
|
|
1324
|
-
/** @internal */
|
|
1325
|
-
export const NumberT$outboundSchema: z.ZodType<
|
|
1326
|
-
NumberT$Outbound,
|
|
1327
|
-
z.ZodTypeDef,
|
|
1328
|
-
NumberT
|
|
1329
|
-
> = z.object({
|
|
1330
|
-
enabled: z.boolean(),
|
|
1331
|
-
alertOnFailure: z.boolean().default(false),
|
|
1332
|
-
type: z.literal("number"),
|
|
1333
|
-
value: z.number(),
|
|
1334
|
-
operator: Operator$outboundSchema,
|
|
1335
|
-
}).transform((v) => {
|
|
1336
|
-
return remap$(v, {
|
|
1337
|
-
alertOnFailure: "alert_on_failure",
|
|
1338
|
-
});
|
|
1339
|
-
});
|
|
1340
|
-
|
|
1341
|
-
export function numberToJSON(numberT: NumberT): string {
|
|
1342
|
-
return JSON.stringify(NumberT$outboundSchema.parse(numberT));
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
/** @internal */
|
|
1346
|
-
export type Boolean$Outbound = {
|
|
1347
|
-
enabled: boolean;
|
|
1348
|
-
alert_on_failure: boolean;
|
|
1349
|
-
type: "boolean";
|
|
1350
|
-
value: boolean;
|
|
1351
|
-
};
|
|
1352
|
-
|
|
1353
|
-
/** @internal */
|
|
1354
|
-
export const Boolean$outboundSchema: z.ZodType<
|
|
1355
|
-
Boolean$Outbound,
|
|
1356
|
-
z.ZodTypeDef,
|
|
1357
|
-
Boolean
|
|
1358
|
-
> = z.object({
|
|
1359
|
-
enabled: z.boolean(),
|
|
1360
|
-
alertOnFailure: z.boolean().default(false),
|
|
1361
|
-
type: z.literal("boolean"),
|
|
1362
|
-
value: z.boolean(),
|
|
1363
|
-
}).transform((v) => {
|
|
1364
|
-
return remap$(v, {
|
|
1365
|
-
alertOnFailure: "alert_on_failure",
|
|
1366
|
-
});
|
|
1367
|
-
});
|
|
1368
|
-
|
|
1369
|
-
export function booleanToJSON(value: Boolean): string {
|
|
1370
|
-
return JSON.stringify(Boolean$outboundSchema.parse(value));
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
/** @internal */
|
|
1374
|
-
export type GuardrailConfig$Outbound = Boolean$Outbound | NumberT$Outbound;
|
|
1375
|
-
|
|
1376
|
-
/** @internal */
|
|
1377
|
-
export const GuardrailConfig$outboundSchema: z.ZodType<
|
|
1378
|
-
GuardrailConfig$Outbound,
|
|
1379
|
-
z.ZodTypeDef,
|
|
1380
|
-
GuardrailConfig
|
|
1381
|
-
> = z.union([
|
|
1382
|
-
z.lazy(() => Boolean$outboundSchema),
|
|
1383
|
-
z.lazy(() => NumberT$outboundSchema),
|
|
1384
|
-
]);
|
|
1385
|
-
|
|
1386
|
-
export function guardrailConfigToJSON(
|
|
1387
|
-
guardrailConfig: GuardrailConfig,
|
|
1388
|
-
): string {
|
|
1389
|
-
return JSON.stringify(GuardrailConfig$outboundSchema.parse(guardrailConfig));
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
/** @internal */
|
|
1393
|
-
export const OutputType$outboundSchema: z.ZodNativeEnum<typeof OutputType> = z
|
|
1394
|
-
.nativeEnum(OutputType);
|
|
1395
|
-
|
|
1396
|
-
/** @internal */
|
|
1397
|
-
export type Llm$Outbound = {
|
|
1398
|
-
guardrail_config?: Boolean$Outbound | NumberT$Outbound | undefined;
|
|
1399
|
-
output_type?: string | undefined;
|
|
1400
|
-
type: "llm_eval";
|
|
1401
|
-
prompt: string;
|
|
1402
|
-
path: string;
|
|
1403
|
-
description: string;
|
|
1404
|
-
model: string;
|
|
1405
|
-
key: string;
|
|
1406
|
-
};
|
|
1407
|
-
|
|
1408
|
-
/** @internal */
|
|
1409
|
-
export const Llm$outboundSchema: z.ZodType<Llm$Outbound, z.ZodTypeDef, Llm> = z
|
|
1410
|
-
.object({
|
|
1411
|
-
guardrailConfig: z.union([
|
|
1412
|
-
z.lazy(() => Boolean$outboundSchema),
|
|
1413
|
-
z.lazy(() => NumberT$outboundSchema),
|
|
1414
|
-
]).optional(),
|
|
1415
|
-
outputType: OutputType$outboundSchema.optional(),
|
|
1416
|
-
type: z.literal("llm_eval"),
|
|
1417
|
-
prompt: z.string(),
|
|
1418
|
-
path: z.string(),
|
|
1419
|
-
description: z.string().default(""),
|
|
1420
|
-
model: z.string(),
|
|
1421
|
-
key: z.string(),
|
|
1422
|
-
}).transform((v) => {
|
|
1423
|
-
return remap$(v, {
|
|
1424
|
-
guardrailConfig: "guardrail_config",
|
|
1425
|
-
outputType: "output_type",
|
|
1426
|
-
});
|
|
1427
|
-
});
|
|
1428
|
-
|
|
1429
|
-
export function llmToJSON(llm: Llm): string {
|
|
1430
|
-
return JSON.stringify(Llm$outboundSchema.parse(llm));
|
|
1431
|
-
}
|
|
1432
|
-
|
|
1433
|
-
/** @internal */
|
|
1434
|
-
export type CreateEvalRequestBody$Outbound =
|
|
1435
|
-
| Llm$Outbound
|
|
1436
|
-
| Json$Outbound
|
|
1437
|
-
| CreateEvalRequestBodyHTTP$Outbound
|
|
1438
|
-
| Python$Outbound;
|
|
1439
|
-
|
|
1440
|
-
/** @internal */
|
|
1441
|
-
export const CreateEvalRequestBody$outboundSchema: z.ZodType<
|
|
1442
|
-
CreateEvalRequestBody$Outbound,
|
|
1443
|
-
z.ZodTypeDef,
|
|
1444
|
-
CreateEvalRequestBody
|
|
1445
|
-
> = z.union([
|
|
1446
|
-
z.lazy(() => Llm$outboundSchema),
|
|
1447
|
-
z.lazy(() => Json$outboundSchema),
|
|
1448
|
-
z.lazy(() => CreateEvalRequestBodyHTTP$outboundSchema),
|
|
1449
|
-
z.lazy(() => Python$outboundSchema),
|
|
1450
|
-
]);
|
|
1451
|
-
|
|
1452
|
-
export function createEvalRequestBodyToJSON(
|
|
1453
|
-
createEvalRequestBody: CreateEvalRequestBody,
|
|
1454
|
-
): string {
|
|
1455
|
-
return JSON.stringify(
|
|
1456
|
-
CreateEvalRequestBody$outboundSchema.parse(createEvalRequestBody),
|
|
1457
|
-
);
|
|
1458
|
-
}
|
|
1459
|
-
|
|
1460
|
-
/** @internal */
|
|
1461
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Operator$inboundSchema:
|
|
1462
|
-
z.ZodNativeEnum<
|
|
1463
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Operator
|
|
1464
|
-
> = z.nativeEnum(
|
|
1465
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Operator,
|
|
1466
|
-
);
|
|
1467
|
-
|
|
1468
|
-
/** @internal */
|
|
1469
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number$inboundSchema:
|
|
1470
|
-
z.ZodType<
|
|
1471
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number,
|
|
1472
|
-
z.ZodTypeDef,
|
|
1473
|
-
unknown
|
|
1474
|
-
> = z.object({
|
|
1475
|
-
enabled: z.boolean(),
|
|
1476
|
-
alert_on_failure: z.boolean().default(false),
|
|
1477
|
-
type: z.literal("number"),
|
|
1478
|
-
value: z.number(),
|
|
1479
|
-
operator:
|
|
1480
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Operator$inboundSchema,
|
|
1481
|
-
}).transform((v) => {
|
|
1482
|
-
return remap$(v, {
|
|
1483
|
-
"alert_on_failure": "alertOnFailure",
|
|
1484
|
-
});
|
|
1485
|
-
});
|
|
1486
|
-
|
|
1487
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7NumberFromJSON(
|
|
1488
|
-
jsonString: string,
|
|
1489
|
-
): SafeParseResult<
|
|
1490
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number,
|
|
1491
|
-
SDKValidationError
|
|
1492
|
-
> {
|
|
1493
|
-
return safeParse(
|
|
1494
|
-
jsonString,
|
|
1495
|
-
(x) =>
|
|
1496
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number$inboundSchema
|
|
1497
|
-
.parse(JSON.parse(x)),
|
|
1498
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number' from JSON`,
|
|
1499
|
-
);
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
|
-
/** @internal */
|
|
1503
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean$inboundSchema:
|
|
1504
|
-
z.ZodType<
|
|
1505
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean,
|
|
1506
|
-
z.ZodTypeDef,
|
|
1507
|
-
unknown
|
|
1508
|
-
> = z.object({
|
|
1509
|
-
enabled: z.boolean(),
|
|
1510
|
-
alert_on_failure: z.boolean().default(false),
|
|
1511
|
-
type: z.literal("boolean"),
|
|
1512
|
-
value: z.boolean(),
|
|
1513
|
-
}).transform((v) => {
|
|
1514
|
-
return remap$(v, {
|
|
1515
|
-
"alert_on_failure": "alertOnFailure",
|
|
1516
|
-
});
|
|
1517
|
-
});
|
|
1518
|
-
|
|
1519
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7BooleanFromJSON(
|
|
1520
|
-
jsonString: string,
|
|
1521
|
-
): SafeParseResult<
|
|
1522
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean,
|
|
1523
|
-
SDKValidationError
|
|
1524
|
-
> {
|
|
1525
|
-
return safeParse(
|
|
1526
|
-
jsonString,
|
|
1527
|
-
(x) =>
|
|
1528
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean$inboundSchema
|
|
1529
|
-
.parse(JSON.parse(x)),
|
|
1530
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean' from JSON`,
|
|
1531
|
-
);
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
/** @internal */
|
|
1535
|
-
export const CreateEvalResponseBodyEvalsResponse200ApplicationJson7GuardrailConfig$inboundSchema:
|
|
1536
|
-
z.ZodType<
|
|
1537
|
-
CreateEvalResponseBodyEvalsResponse200ApplicationJson7GuardrailConfig,
|
|
1538
|
-
z.ZodTypeDef,
|
|
1539
|
-
unknown
|
|
1540
|
-
> = z.union([
|
|
1541
|
-
z.lazy(() =>
|
|
1542
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean$inboundSchema
|
|
1543
|
-
),
|
|
1544
|
-
z.lazy(() =>
|
|
1545
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number$inboundSchema
|
|
1546
|
-
),
|
|
1547
|
-
]);
|
|
1548
|
-
|
|
1549
|
-
export function createEvalResponseBodyEvalsResponse200ApplicationJSON7GuardrailConfigFromJSON(
|
|
1550
|
-
jsonString: string,
|
|
1551
|
-
): SafeParseResult<
|
|
1552
|
-
CreateEvalResponseBodyEvalsResponse200ApplicationJson7GuardrailConfig,
|
|
1553
|
-
SDKValidationError
|
|
1554
|
-
> {
|
|
1555
|
-
return safeParse(
|
|
1556
|
-
jsonString,
|
|
1557
|
-
(x) =>
|
|
1558
|
-
CreateEvalResponseBodyEvalsResponse200ApplicationJson7GuardrailConfig$inboundSchema
|
|
1559
|
-
.parse(JSON.parse(x)),
|
|
1560
|
-
`Failed to parse 'CreateEvalResponseBodyEvalsResponse200ApplicationJson7GuardrailConfig' from JSON`,
|
|
1561
|
-
);
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
/** @internal */
|
|
1565
|
-
export const Typescript$inboundSchema: z.ZodType<
|
|
1566
|
-
Typescript,
|
|
1567
|
-
z.ZodTypeDef,
|
|
1568
|
-
unknown
|
|
1569
|
-
> = z.object({
|
|
1570
|
-
_id: z.string(),
|
|
1571
|
-
description: z.string(),
|
|
1572
|
-
created: z.string().default("2026-02-13T16:26:33.800Z"),
|
|
1573
|
-
updated: z.string().default("2026-02-13T16:26:33.800Z"),
|
|
1574
|
-
guardrail_config: z.union([
|
|
1575
|
-
z.lazy(() =>
|
|
1576
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean$inboundSchema
|
|
1577
|
-
),
|
|
1578
|
-
z.lazy(() =>
|
|
1579
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Number$inboundSchema
|
|
1580
|
-
),
|
|
1581
|
-
]).optional(),
|
|
1582
|
-
code: z.string(),
|
|
1583
|
-
type: z.literal("typescript_eval"),
|
|
1584
|
-
key: z.string(),
|
|
1585
|
-
}).transform((v) => {
|
|
1586
|
-
return remap$(v, {
|
|
1587
|
-
"_id": "id",
|
|
1588
|
-
"guardrail_config": "guardrailConfig",
|
|
1589
|
-
});
|
|
1590
|
-
});
|
|
1591
|
-
|
|
1592
|
-
export function typescriptFromJSON(
|
|
1593
|
-
jsonString: string,
|
|
1594
|
-
): SafeParseResult<Typescript, SDKValidationError> {
|
|
1595
|
-
return safeParse(
|
|
1596
|
-
jsonString,
|
|
1597
|
-
(x) => Typescript$inboundSchema.parse(JSON.parse(x)),
|
|
1598
|
-
`Failed to parse 'Typescript' from JSON`,
|
|
1599
|
-
);
|
|
1600
|
-
}
|
|
1601
|
-
|
|
1602
|
-
/** @internal */
|
|
1603
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Operator$inboundSchema:
|
|
1604
|
-
z.ZodNativeEnum<
|
|
1605
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Operator
|
|
1606
|
-
> = z.nativeEnum(
|
|
1607
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Operator,
|
|
1608
|
-
);
|
|
1609
|
-
|
|
1610
|
-
/** @internal */
|
|
1611
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number$inboundSchema:
|
|
1612
|
-
z.ZodType<
|
|
1613
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number,
|
|
1614
|
-
z.ZodTypeDef,
|
|
1615
|
-
unknown
|
|
1616
|
-
> = z.object({
|
|
1617
|
-
enabled: z.boolean(),
|
|
1618
|
-
alert_on_failure: z.boolean().default(false),
|
|
1619
|
-
type: z.literal("number"),
|
|
1620
|
-
value: z.number(),
|
|
1621
|
-
operator:
|
|
1622
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Operator$inboundSchema,
|
|
1623
|
-
}).transform((v) => {
|
|
1624
|
-
return remap$(v, {
|
|
1625
|
-
"alert_on_failure": "alertOnFailure",
|
|
1626
|
-
});
|
|
1627
|
-
});
|
|
1628
|
-
|
|
1629
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6NumberFromJSON(
|
|
1630
|
-
jsonString: string,
|
|
1631
|
-
): SafeParseResult<
|
|
1632
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number,
|
|
1633
|
-
SDKValidationError
|
|
1634
|
-
> {
|
|
1635
|
-
return safeParse(
|
|
1636
|
-
jsonString,
|
|
1637
|
-
(x) =>
|
|
1638
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number$inboundSchema
|
|
1639
|
-
.parse(JSON.parse(x)),
|
|
1640
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number' from JSON`,
|
|
1641
|
-
);
|
|
1642
|
-
}
|
|
1643
|
-
|
|
1644
|
-
/** @internal */
|
|
1645
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean$inboundSchema:
|
|
1646
|
-
z.ZodType<
|
|
1647
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean,
|
|
1648
|
-
z.ZodTypeDef,
|
|
1649
|
-
unknown
|
|
1650
|
-
> = z.object({
|
|
1651
|
-
enabled: z.boolean(),
|
|
1652
|
-
alert_on_failure: z.boolean().default(false),
|
|
1653
|
-
type: z.literal("boolean"),
|
|
1654
|
-
value: z.boolean(),
|
|
1655
|
-
}).transform((v) => {
|
|
1656
|
-
return remap$(v, {
|
|
1657
|
-
"alert_on_failure": "alertOnFailure",
|
|
1658
|
-
});
|
|
1659
|
-
});
|
|
1660
|
-
|
|
1661
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6BooleanFromJSON(
|
|
1662
|
-
jsonString: string,
|
|
1663
|
-
): SafeParseResult<
|
|
1664
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean,
|
|
1665
|
-
SDKValidationError
|
|
1666
|
-
> {
|
|
1667
|
-
return safeParse(
|
|
1668
|
-
jsonString,
|
|
1669
|
-
(x) =>
|
|
1670
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean$inboundSchema
|
|
1671
|
-
.parse(JSON.parse(x)),
|
|
1672
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean' from JSON`,
|
|
1673
|
-
);
|
|
1674
|
-
}
|
|
1675
|
-
|
|
1676
|
-
/** @internal */
|
|
1677
|
-
export const CreateEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfig$inboundSchema:
|
|
1678
|
-
z.ZodType<
|
|
1679
|
-
CreateEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfig,
|
|
1680
|
-
z.ZodTypeDef,
|
|
1681
|
-
unknown
|
|
1682
|
-
> = z.union([
|
|
1683
|
-
z.lazy(() =>
|
|
1684
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean$inboundSchema
|
|
1685
|
-
),
|
|
1686
|
-
z.lazy(() =>
|
|
1687
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number$inboundSchema
|
|
1688
|
-
),
|
|
1689
|
-
]);
|
|
1690
|
-
|
|
1691
|
-
export function createEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfigFromJSON(
|
|
1692
|
-
jsonString: string,
|
|
1693
|
-
): SafeParseResult<
|
|
1694
|
-
CreateEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfig,
|
|
1695
|
-
SDKValidationError
|
|
1696
|
-
> {
|
|
1697
|
-
return safeParse(
|
|
1698
|
-
jsonString,
|
|
1699
|
-
(x) =>
|
|
1700
|
-
CreateEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfig$inboundSchema
|
|
1701
|
-
.parse(JSON.parse(x)),
|
|
1702
|
-
`Failed to parse 'CreateEvalResponseBodyEvalsResponse200ApplicationJSONGuardrailConfig' from JSON`,
|
|
1703
|
-
);
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
|
-
/** @internal */
|
|
1707
|
-
export const RagasMetric$inboundSchema: z.ZodNativeEnum<typeof RagasMetric> = z
|
|
1708
|
-
.nativeEnum(RagasMetric);
|
|
1709
|
-
|
|
1710
|
-
/** @internal */
|
|
1711
|
-
export const Ragas$inboundSchema: z.ZodType<Ragas, z.ZodTypeDef, unknown> = z
|
|
1712
|
-
.object({
|
|
1713
|
-
_id: z.string(),
|
|
1714
|
-
description: z.string(),
|
|
1715
|
-
created: z.string().default("2026-02-13T16:26:33.800Z"),
|
|
1716
|
-
updated: z.string().default("2026-02-13T16:26:33.800Z"),
|
|
1717
|
-
guardrail_config: z.union([
|
|
1718
|
-
z.lazy(() =>
|
|
1719
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean$inboundSchema
|
|
1720
|
-
),
|
|
1721
|
-
z.lazy(() =>
|
|
1722
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Number$inboundSchema
|
|
1723
|
-
),
|
|
1724
|
-
]).optional(),
|
|
1725
|
-
type: z.literal("ragas"),
|
|
1726
|
-
ragas_metric: RagasMetric$inboundSchema,
|
|
1727
|
-
key: z.string(),
|
|
1728
|
-
model: z.string(),
|
|
1729
|
-
}).transform((v) => {
|
|
1730
|
-
return remap$(v, {
|
|
1731
|
-
"_id": "id",
|
|
1732
|
-
"guardrail_config": "guardrailConfig",
|
|
1733
|
-
"ragas_metric": "ragasMetric",
|
|
1734
|
-
});
|
|
1735
|
-
});
|
|
1736
|
-
|
|
1737
|
-
export function ragasFromJSON(
|
|
1738
|
-
jsonString: string,
|
|
1739
|
-
): SafeParseResult<Ragas, SDKValidationError> {
|
|
1740
|
-
return safeParse(
|
|
1741
|
-
jsonString,
|
|
1742
|
-
(x) => Ragas$inboundSchema.parse(JSON.parse(x)),
|
|
1743
|
-
`Failed to parse 'Ragas' from JSON`,
|
|
1744
|
-
);
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
/** @internal */
|
|
1748
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Operator$inboundSchema:
|
|
1749
|
-
z.ZodNativeEnum<
|
|
1750
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Operator
|
|
1751
|
-
> = z.nativeEnum(
|
|
1752
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Operator,
|
|
1753
|
-
);
|
|
1754
|
-
|
|
1755
|
-
/** @internal */
|
|
1756
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Number$inboundSchema:
|
|
1757
|
-
z.ZodType<
|
|
1758
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Number,
|
|
1759
|
-
z.ZodTypeDef,
|
|
1760
|
-
unknown
|
|
1761
|
-
> = z.object({
|
|
1762
|
-
enabled: z.boolean(),
|
|
1763
|
-
alert_on_failure: z.boolean().default(false),
|
|
1764
|
-
type: z.literal("number"),
|
|
1765
|
-
value: z.number(),
|
|
1766
|
-
operator:
|
|
1767
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Operator$inboundSchema,
|
|
1768
|
-
}).transform((v) => {
|
|
1769
|
-
return remap$(v, {
|
|
1770
|
-
"alert_on_failure": "alertOnFailure",
|
|
1771
|
-
});
|
|
1772
|
-
});
|
|
1773
|
-
|
|
1774
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5NumberFromJSON(
|
|
1775
|
-
jsonString: string,
|
|
1776
|
-
): SafeParseResult<
|
|
1777
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Number,
|
|
1778
|
-
SDKValidationError
|
|
1779
|
-
> {
|
|
1780
|
-
return safeParse(
|
|
1781
|
-
jsonString,
|
|
1782
|
-
(x) =>
|
|
1783
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Number$inboundSchema
|
|
1784
|
-
.parse(JSON.parse(x)),
|
|
1785
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Number' from JSON`,
|
|
1786
|
-
);
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
|
-
/** @internal */
|
|
1790
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Boolean$inboundSchema:
|
|
1791
|
-
z.ZodType<
|
|
1792
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Boolean,
|
|
1793
|
-
z.ZodTypeDef,
|
|
1794
|
-
unknown
|
|
1795
|
-
> = z.object({
|
|
1796
|
-
enabled: z.boolean(),
|
|
1797
|
-
alert_on_failure: z.boolean().default(false),
|
|
1798
|
-
type: z.literal("boolean"),
|
|
1799
|
-
value: z.boolean(),
|
|
1800
|
-
}).transform((v) => {
|
|
1801
|
-
return remap$(v, {
|
|
1802
|
-
"alert_on_failure": "alertOnFailure",
|
|
1803
|
-
});
|
|
1804
|
-
});
|
|
1805
|
-
|
|
1806
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5BooleanFromJSON(
|
|
1807
|
-
jsonString: string,
|
|
1808
|
-
): SafeParseResult<
|
|
1809
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Boolean,
|
|
1810
|
-
SDKValidationError
|
|
1811
|
-
> {
|
|
1812
|
-
return safeParse(
|
|
1813
|
-
jsonString,
|
|
1814
|
-
(x) =>
|
|
1815
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Boolean$inboundSchema
|
|
1816
|
-
.parse(JSON.parse(x)),
|
|
1817
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Boolean' from JSON`,
|
|
1818
|
-
);
|
|
1819
|
-
}
|
|
1820
|
-
|
|
1821
|
-
/** @internal */
|
|
1822
|
-
export const CreateEvalResponseBodyEvalsResponse200GuardrailConfig$inboundSchema:
|
|
1823
|
-
z.ZodType<
|
|
1824
|
-
CreateEvalResponseBodyEvalsResponse200GuardrailConfig,
|
|
1825
|
-
z.ZodTypeDef,
|
|
1826
|
-
unknown
|
|
1827
|
-
> = z.union([
|
|
1828
|
-
z.lazy(() =>
|
|
1829
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Boolean$inboundSchema
|
|
1830
|
-
),
|
|
1831
|
-
z.lazy(() =>
|
|
1832
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Number$inboundSchema
|
|
1833
|
-
),
|
|
1834
|
-
]);
|
|
1835
|
-
|
|
1836
|
-
export function createEvalResponseBodyEvalsResponse200GuardrailConfigFromJSON(
|
|
1837
|
-
jsonString: string,
|
|
1838
|
-
): SafeParseResult<
|
|
1839
|
-
CreateEvalResponseBodyEvalsResponse200GuardrailConfig,
|
|
1840
|
-
SDKValidationError
|
|
1841
|
-
> {
|
|
1842
|
-
return safeParse(
|
|
1843
|
-
jsonString,
|
|
1844
|
-
(x) =>
|
|
1845
|
-
CreateEvalResponseBodyEvalsResponse200GuardrailConfig$inboundSchema.parse(
|
|
1846
|
-
JSON.parse(x),
|
|
1847
|
-
),
|
|
1848
|
-
`Failed to parse 'CreateEvalResponseBodyEvalsResponse200GuardrailConfig' from JSON`,
|
|
1849
|
-
);
|
|
1850
|
-
}
|
|
1851
|
-
|
|
1852
|
-
/** @internal */
|
|
1853
|
-
export const ThirtyTwo$inboundSchema: z.ZodType<
|
|
1854
|
-
ThirtyTwo,
|
|
1855
|
-
z.ZodTypeDef,
|
|
1856
|
-
unknown
|
|
1857
|
-
> = z.object({
|
|
1858
|
-
type: z.literal("grammar_diversity"),
|
|
1859
|
-
});
|
|
1860
|
-
|
|
1861
|
-
export function thirtyTwoFromJSON(
|
|
1862
|
-
jsonString: string,
|
|
1863
|
-
): SafeParseResult<ThirtyTwo, SDKValidationError> {
|
|
1864
|
-
return safeParse(
|
|
1865
|
-
jsonString,
|
|
1866
|
-
(x) => ThirtyTwo$inboundSchema.parse(JSON.parse(x)),
|
|
1867
|
-
`Failed to parse 'ThirtyTwo' from JSON`,
|
|
1868
|
-
);
|
|
1869
|
-
}
|
|
1870
|
-
|
|
1871
|
-
/** @internal */
|
|
1872
|
-
export const ThirtyOne$inboundSchema: z.ZodType<
|
|
1873
|
-
ThirtyOne,
|
|
1874
|
-
z.ZodTypeDef,
|
|
1875
|
-
unknown
|
|
1876
|
-
> = z.object({
|
|
1877
|
-
type: z.literal("lexical_repetition"),
|
|
1878
|
-
});
|
|
1879
|
-
|
|
1880
|
-
export function thirtyOneFromJSON(
|
|
1881
|
-
jsonString: string,
|
|
1882
|
-
): SafeParseResult<ThirtyOne, SDKValidationError> {
|
|
1883
|
-
return safeParse(
|
|
1884
|
-
jsonString,
|
|
1885
|
-
(x) => ThirtyOne$inboundSchema.parse(JSON.parse(x)),
|
|
1886
|
-
`Failed to parse 'ThirtyOne' from JSON`,
|
|
1887
|
-
);
|
|
1888
|
-
}
|
|
1889
|
-
|
|
1890
|
-
/** @internal */
|
|
1891
|
-
export const Thirty$inboundSchema: z.ZodType<Thirty, z.ZodTypeDef, unknown> = z
|
|
1892
|
-
.object({
|
|
1893
|
-
type: z.literal("sentences_count"),
|
|
1894
|
-
});
|
|
1895
|
-
|
|
1896
|
-
export function thirtyFromJSON(
|
|
1897
|
-
jsonString: string,
|
|
1898
|
-
): SafeParseResult<Thirty, SDKValidationError> {
|
|
1899
|
-
return safeParse(
|
|
1900
|
-
jsonString,
|
|
1901
|
-
(x) => Thirty$inboundSchema.parse(JSON.parse(x)),
|
|
1902
|
-
`Failed to parse 'Thirty' from JSON`,
|
|
1903
|
-
);
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
|
-
/** @internal */
|
|
1907
|
-
export const TwentyNine$inboundSchema: z.ZodType<
|
|
1908
|
-
TwentyNine,
|
|
1909
|
-
z.ZodTypeDef,
|
|
1910
|
-
unknown
|
|
1911
|
-
> = z.object({
|
|
1912
|
-
type: z.literal("words_count"),
|
|
1913
|
-
});
|
|
1914
|
-
|
|
1915
|
-
export function twentyNineFromJSON(
|
|
1916
|
-
jsonString: string,
|
|
1917
|
-
): SafeParseResult<TwentyNine, SDKValidationError> {
|
|
1918
|
-
return safeParse(
|
|
1919
|
-
jsonString,
|
|
1920
|
-
(x) => TwentyNine$inboundSchema.parse(JSON.parse(x)),
|
|
1921
|
-
`Failed to parse 'TwentyNine' from JSON`,
|
|
1922
|
-
);
|
|
1923
|
-
}
|
|
1924
|
-
|
|
1925
|
-
/** @internal */
|
|
1926
|
-
export const TwentyEight$inboundSchema: z.ZodType<
|
|
1927
|
-
TwentyEight,
|
|
1928
|
-
z.ZodTypeDef,
|
|
1929
|
-
unknown
|
|
1930
|
-
> = z.object({
|
|
1931
|
-
type: z.literal("gse_english_level"),
|
|
1932
|
-
});
|
|
1933
|
-
|
|
1934
|
-
export function twentyEightFromJSON(
|
|
1935
|
-
jsonString: string,
|
|
1936
|
-
): SafeParseResult<TwentyEight, SDKValidationError> {
|
|
1937
|
-
return safeParse(
|
|
1938
|
-
jsonString,
|
|
1939
|
-
(x) => TwentyEight$inboundSchema.parse(JSON.parse(x)),
|
|
1940
|
-
`Failed to parse 'TwentyEight' from JSON`,
|
|
1941
|
-
);
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
|
-
/** @internal */
|
|
1945
|
-
export const TwentySeven$inboundSchema: z.ZodType<
|
|
1946
|
-
TwentySeven,
|
|
1947
|
-
z.ZodTypeDef,
|
|
1948
|
-
unknown
|
|
1949
|
-
> = z.object({
|
|
1950
|
-
type: z.literal("flesch_reading_ease"),
|
|
1951
|
-
});
|
|
1952
|
-
|
|
1953
|
-
export function twentySevenFromJSON(
|
|
1954
|
-
jsonString: string,
|
|
1955
|
-
): SafeParseResult<TwentySeven, SDKValidationError> {
|
|
1956
|
-
return safeParse(
|
|
1957
|
-
jsonString,
|
|
1958
|
-
(x) => TwentySeven$inboundSchema.parse(JSON.parse(x)),
|
|
1959
|
-
`Failed to parse 'TwentySeven' from JSON`,
|
|
1960
|
-
);
|
|
1961
|
-
}
|
|
1962
|
-
|
|
1963
|
-
/** @internal */
|
|
1964
|
-
export const TwentySix$inboundSchema: z.ZodType<
|
|
1965
|
-
TwentySix,
|
|
1966
|
-
z.ZodTypeDef,
|
|
1967
|
-
unknown
|
|
1968
|
-
> = z.object({
|
|
1969
|
-
type: z.literal("most_repeated_words"),
|
|
1970
|
-
});
|
|
1971
|
-
|
|
1972
|
-
export function twentySixFromJSON(
|
|
1973
|
-
jsonString: string,
|
|
1974
|
-
): SafeParseResult<TwentySix, SDKValidationError> {
|
|
1975
|
-
return safeParse(
|
|
1976
|
-
jsonString,
|
|
1977
|
-
(x) => TwentySix$inboundSchema.parse(JSON.parse(x)),
|
|
1978
|
-
`Failed to parse 'TwentySix' from JSON`,
|
|
1979
|
-
);
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
/** @internal */
|
|
1983
|
-
export const TwentyFive$inboundSchema: z.ZodType<
|
|
1984
|
-
TwentyFive,
|
|
1985
|
-
z.ZodTypeDef,
|
|
1986
|
-
unknown
|
|
1987
|
-
> = z.object({
|
|
1988
|
-
type: z.literal("keywords_match"),
|
|
1989
|
-
keywords: z.array(z.string()),
|
|
1990
|
-
});
|
|
1991
|
-
|
|
1992
|
-
export function twentyFiveFromJSON(
|
|
1993
|
-
jsonString: string,
|
|
1994
|
-
): SafeParseResult<TwentyFive, SDKValidationError> {
|
|
1995
|
-
return safeParse(
|
|
1996
|
-
jsonString,
|
|
1997
|
-
(x) => TwentyFive$inboundSchema.parse(JSON.parse(x)),
|
|
1998
|
-
`Failed to parse 'TwentyFive' from JSON`,
|
|
1999
|
-
);
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
|
-
/** @internal */
|
|
2003
|
-
export const TwentyFour$inboundSchema: z.ZodType<
|
|
2004
|
-
TwentyFour,
|
|
2005
|
-
z.ZodTypeDef,
|
|
2006
|
-
unknown
|
|
2007
|
-
> = z.object({
|
|
2008
|
-
type: z.literal("levenshtein_distance"),
|
|
2009
|
-
});
|
|
2010
|
-
|
|
2011
|
-
export function twentyFourFromJSON(
|
|
2012
|
-
jsonString: string,
|
|
2013
|
-
): SafeParseResult<TwentyFour, SDKValidationError> {
|
|
2014
|
-
return safeParse(
|
|
2015
|
-
jsonString,
|
|
2016
|
-
(x) => TwentyFour$inboundSchema.parse(JSON.parse(x)),
|
|
2017
|
-
`Failed to parse 'TwentyFour' from JSON`,
|
|
2018
|
-
);
|
|
2019
|
-
}
|
|
2020
|
-
|
|
2021
|
-
/** @internal */
|
|
2022
|
-
export const TwentyThree$inboundSchema: z.ZodType<
|
|
2023
|
-
TwentyThree,
|
|
2024
|
-
z.ZodTypeDef,
|
|
2025
|
-
unknown
|
|
2026
|
-
> = z.object({
|
|
2027
|
-
type: z.literal("cosine_similarity"),
|
|
2028
|
-
});
|
|
2029
|
-
|
|
2030
|
-
export function twentyThreeFromJSON(
|
|
2031
|
-
jsonString: string,
|
|
2032
|
-
): SafeParseResult<TwentyThree, SDKValidationError> {
|
|
2033
|
-
return safeParse(
|
|
2034
|
-
jsonString,
|
|
2035
|
-
(x) => TwentyThree$inboundSchema.parse(JSON.parse(x)),
|
|
2036
|
-
`Failed to parse 'TwentyThree' from JSON`,
|
|
2037
|
-
);
|
|
2038
|
-
}
|
|
2039
|
-
|
|
2040
|
-
/** @internal */
|
|
2041
|
-
export const TwentyTwo$inboundSchema: z.ZodType<
|
|
2042
|
-
TwentyTwo,
|
|
2043
|
-
z.ZodTypeDef,
|
|
2044
|
-
unknown
|
|
2045
|
-
> = z.object({
|
|
2046
|
-
type: z.literal("meteor_score"),
|
|
2047
|
-
});
|
|
2048
|
-
|
|
2049
|
-
export function twentyTwoFromJSON(
|
|
2050
|
-
jsonString: string,
|
|
2051
|
-
): SafeParseResult<TwentyTwo, SDKValidationError> {
|
|
2052
|
-
return safeParse(
|
|
2053
|
-
jsonString,
|
|
2054
|
-
(x) => TwentyTwo$inboundSchema.parse(JSON.parse(x)),
|
|
2055
|
-
`Failed to parse 'TwentyTwo' from JSON`,
|
|
2056
|
-
);
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
/** @internal */
|
|
2060
|
-
export const TwentyOne$inboundSchema: z.ZodType<
|
|
2061
|
-
TwentyOne,
|
|
2062
|
-
z.ZodTypeDef,
|
|
2063
|
-
unknown
|
|
2064
|
-
> = z.object({
|
|
2065
|
-
type: z.literal("rouge_n"),
|
|
2066
|
-
});
|
|
2067
|
-
|
|
2068
|
-
export function twentyOneFromJSON(
|
|
2069
|
-
jsonString: string,
|
|
2070
|
-
): SafeParseResult<TwentyOne, SDKValidationError> {
|
|
2071
|
-
return safeParse(
|
|
2072
|
-
jsonString,
|
|
2073
|
-
(x) => TwentyOne$inboundSchema.parse(JSON.parse(x)),
|
|
2074
|
-
`Failed to parse 'TwentyOne' from JSON`,
|
|
2075
|
-
);
|
|
2076
|
-
}
|
|
2077
|
-
|
|
2078
|
-
/** @internal */
|
|
2079
|
-
export const Twenty$inboundSchema: z.ZodType<Twenty, z.ZodTypeDef, unknown> = z
|
|
2080
|
-
.object({
|
|
2081
|
-
type: z.literal("bleu_score"),
|
|
2082
|
-
});
|
|
2083
|
-
|
|
2084
|
-
export function twentyFromJSON(
|
|
2085
|
-
jsonString: string,
|
|
2086
|
-
): SafeParseResult<Twenty, SDKValidationError> {
|
|
2087
|
-
return safeParse(
|
|
2088
|
-
jsonString,
|
|
2089
|
-
(x) => Twenty$inboundSchema.parse(JSON.parse(x)),
|
|
2090
|
-
`Failed to parse 'Twenty' from JSON`,
|
|
2091
|
-
);
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
/** @internal */
|
|
2095
|
-
export const Nineteen$inboundSchema: z.ZodType<
|
|
2096
|
-
Nineteen,
|
|
2097
|
-
z.ZodTypeDef,
|
|
2098
|
-
unknown
|
|
2099
|
-
> = z.object({
|
|
2100
|
-
type: z.literal("bert_score"),
|
|
2101
|
-
});
|
|
2102
|
-
|
|
2103
|
-
export function nineteenFromJSON(
|
|
2104
|
-
jsonString: string,
|
|
2105
|
-
): SafeParseResult<Nineteen, SDKValidationError> {
|
|
2106
|
-
return safeParse(
|
|
2107
|
-
jsonString,
|
|
2108
|
-
(x) => Nineteen$inboundSchema.parse(JSON.parse(x)),
|
|
2109
|
-
`Failed to parse 'Nineteen' from JSON`,
|
|
2110
|
-
);
|
|
2111
|
-
}
|
|
2112
|
-
|
|
2113
|
-
/** @internal */
|
|
2114
|
-
export const Eighteen$inboundSchema: z.ZodType<
|
|
2115
|
-
Eighteen,
|
|
2116
|
-
z.ZodTypeDef,
|
|
2117
|
-
unknown
|
|
2118
|
-
> = z.object({
|
|
2119
|
-
type: z.literal("moderations_google"),
|
|
2120
|
-
});
|
|
2121
|
-
|
|
2122
|
-
export function eighteenFromJSON(
|
|
2123
|
-
jsonString: string,
|
|
2124
|
-
): SafeParseResult<Eighteen, SDKValidationError> {
|
|
2125
|
-
return safeParse(
|
|
2126
|
-
jsonString,
|
|
2127
|
-
(x) => Eighteen$inboundSchema.parse(JSON.parse(x)),
|
|
2128
|
-
`Failed to parse 'Eighteen' from JSON`,
|
|
2129
|
-
);
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
|
-
/** @internal */
|
|
2133
|
-
export const Seventeen$inboundSchema: z.ZodType<
|
|
2134
|
-
Seventeen,
|
|
2135
|
-
z.ZodTypeDef,
|
|
2136
|
-
unknown
|
|
2137
|
-
> = z.object({
|
|
2138
|
-
type: z.literal("moderations_openai"),
|
|
2139
|
-
});
|
|
2140
|
-
|
|
2141
|
-
export function seventeenFromJSON(
|
|
2142
|
-
jsonString: string,
|
|
2143
|
-
): SafeParseResult<Seventeen, SDKValidationError> {
|
|
2144
|
-
return safeParse(
|
|
2145
|
-
jsonString,
|
|
2146
|
-
(x) => Seventeen$inboundSchema.parse(JSON.parse(x)),
|
|
2147
|
-
`Failed to parse 'Seventeen' from JSON`,
|
|
2148
|
-
);
|
|
2149
|
-
}
|
|
2150
|
-
|
|
2151
|
-
/** @internal */
|
|
2152
|
-
export const Sixteen$inboundSchema: z.ZodType<Sixteen, z.ZodTypeDef, unknown> =
|
|
2153
|
-
z.object({
|
|
2154
|
-
type: z.literal("is_valid_json"),
|
|
2155
|
-
});
|
|
2156
|
-
|
|
2157
|
-
export function sixteenFromJSON(
|
|
2158
|
-
jsonString: string,
|
|
2159
|
-
): SafeParseResult<Sixteen, SDKValidationError> {
|
|
2160
|
-
return safeParse(
|
|
2161
|
-
jsonString,
|
|
2162
|
-
(x) => Sixteen$inboundSchema.parse(JSON.parse(x)),
|
|
2163
|
-
`Failed to parse 'Sixteen' from JSON`,
|
|
2164
|
-
);
|
|
2165
|
-
}
|
|
2166
|
-
|
|
2167
|
-
/** @internal */
|
|
2168
|
-
export const Fifteen$inboundSchema: z.ZodType<Fifteen, z.ZodTypeDef, unknown> =
|
|
2169
|
-
z.object({
|
|
2170
|
-
type: z.literal("regex"),
|
|
2171
|
-
pattern: z.string(),
|
|
2172
|
-
});
|
|
2173
|
-
|
|
2174
|
-
export function fifteenFromJSON(
|
|
2175
|
-
jsonString: string,
|
|
2176
|
-
): SafeParseResult<Fifteen, SDKValidationError> {
|
|
2177
|
-
return safeParse(
|
|
2178
|
-
jsonString,
|
|
2179
|
-
(x) => Fifteen$inboundSchema.parse(JSON.parse(x)),
|
|
2180
|
-
`Failed to parse 'Fifteen' from JSON`,
|
|
2181
|
-
);
|
|
2182
|
-
}
|
|
2183
|
-
|
|
2184
|
-
/** @internal */
|
|
2185
|
-
export const Fourteen$inboundSchema: z.ZodType<
|
|
2186
|
-
Fourteen,
|
|
2187
|
-
z.ZodTypeDef,
|
|
2188
|
-
unknown
|
|
2189
|
-
> = z.object({
|
|
2190
|
-
type: z.literal("one_line"),
|
|
2191
|
-
});
|
|
2192
|
-
|
|
2193
|
-
export function fourteenFromJSON(
|
|
2194
|
-
jsonString: string,
|
|
2195
|
-
): SafeParseResult<Fourteen, SDKValidationError> {
|
|
2196
|
-
return safeParse(
|
|
2197
|
-
jsonString,
|
|
2198
|
-
(x) => Fourteen$inboundSchema.parse(JSON.parse(x)),
|
|
2199
|
-
`Failed to parse 'Fourteen' from JSON`,
|
|
2200
|
-
);
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
|
-
/** @internal */
|
|
2204
|
-
export const Thirteen$inboundSchema: z.ZodType<
|
|
2205
|
-
Thirteen,
|
|
2206
|
-
z.ZodTypeDef,
|
|
2207
|
-
unknown
|
|
2208
|
-
> = z.object({
|
|
2209
|
-
type: z.literal("length_greater_than"),
|
|
2210
|
-
value: z.number(),
|
|
2211
|
-
});
|
|
2212
|
-
|
|
2213
|
-
export function thirteenFromJSON(
|
|
2214
|
-
jsonString: string,
|
|
2215
|
-
): SafeParseResult<Thirteen, SDKValidationError> {
|
|
2216
|
-
return safeParse(
|
|
2217
|
-
jsonString,
|
|
2218
|
-
(x) => Thirteen$inboundSchema.parse(JSON.parse(x)),
|
|
2219
|
-
`Failed to parse 'Thirteen' from JSON`,
|
|
2220
|
-
);
|
|
2221
|
-
}
|
|
2222
|
-
|
|
2223
|
-
/** @internal */
|
|
2224
|
-
export const Twelve$inboundSchema: z.ZodType<Twelve, z.ZodTypeDef, unknown> = z
|
|
2225
|
-
.object({
|
|
2226
|
-
type: z.literal("length_between"),
|
|
2227
|
-
min: z.number(),
|
|
2228
|
-
max: z.number(),
|
|
2229
|
-
});
|
|
2230
|
-
|
|
2231
|
-
export function twelveFromJSON(
|
|
2232
|
-
jsonString: string,
|
|
2233
|
-
): SafeParseResult<Twelve, SDKValidationError> {
|
|
2234
|
-
return safeParse(
|
|
2235
|
-
jsonString,
|
|
2236
|
-
(x) => Twelve$inboundSchema.parse(JSON.parse(x)),
|
|
2237
|
-
`Failed to parse 'Twelve' from JSON`,
|
|
2238
|
-
);
|
|
2239
|
-
}
|
|
2240
|
-
|
|
2241
|
-
/** @internal */
|
|
2242
|
-
export const Eleven$inboundSchema: z.ZodType<Eleven, z.ZodTypeDef, unknown> = z
|
|
2243
|
-
.object({
|
|
2244
|
-
type: z.literal("length_less_than"),
|
|
2245
|
-
value: z.number(),
|
|
2246
|
-
});
|
|
2247
|
-
|
|
2248
|
-
export function elevenFromJSON(
|
|
2249
|
-
jsonString: string,
|
|
2250
|
-
): SafeParseResult<Eleven, SDKValidationError> {
|
|
2251
|
-
return safeParse(
|
|
2252
|
-
jsonString,
|
|
2253
|
-
(x) => Eleven$inboundSchema.parse(JSON.parse(x)),
|
|
2254
|
-
`Failed to parse 'Eleven' from JSON`,
|
|
2255
|
-
);
|
|
2256
|
-
}
|
|
2257
|
-
|
|
2258
|
-
/** @internal */
|
|
2259
|
-
export const Ten$inboundSchema: z.ZodType<Ten, z.ZodTypeDef, unknown> = z
|
|
2260
|
-
.object({
|
|
2261
|
-
type: z.literal("exact_match"),
|
|
2262
|
-
});
|
|
2263
|
-
|
|
2264
|
-
export function tenFromJSON(
|
|
2265
|
-
jsonString: string,
|
|
2266
|
-
): SafeParseResult<Ten, SDKValidationError> {
|
|
2267
|
-
return safeParse(
|
|
2268
|
-
jsonString,
|
|
2269
|
-
(x) => Ten$inboundSchema.parse(JSON.parse(x)),
|
|
2270
|
-
`Failed to parse 'Ten' from JSON`,
|
|
2271
|
-
);
|
|
2272
|
-
}
|
|
2273
|
-
|
|
2274
|
-
/** @internal */
|
|
2275
|
-
export const Nine$inboundSchema: z.ZodType<Nine, z.ZodTypeDef, unknown> = z
|
|
2276
|
-
.object({
|
|
2277
|
-
type: z.literal("ends_with"),
|
|
2278
|
-
value: z.string(),
|
|
2279
|
-
});
|
|
2280
|
-
|
|
2281
|
-
export function nineFromJSON(
|
|
2282
|
-
jsonString: string,
|
|
2283
|
-
): SafeParseResult<Nine, SDKValidationError> {
|
|
2284
|
-
return safeParse(
|
|
2285
|
-
jsonString,
|
|
2286
|
-
(x) => Nine$inboundSchema.parse(JSON.parse(x)),
|
|
2287
|
-
`Failed to parse 'Nine' from JSON`,
|
|
2288
|
-
);
|
|
2289
|
-
}
|
|
2290
|
-
|
|
2291
|
-
/** @internal */
|
|
2292
|
-
export const Eight$inboundSchema: z.ZodType<Eight, z.ZodTypeDef, unknown> = z
|
|
2293
|
-
.object({
|
|
2294
|
-
type: z.literal("start_with"),
|
|
2295
|
-
value: z.string(),
|
|
2296
|
-
});
|
|
2297
|
-
|
|
2298
|
-
export function eightFromJSON(
|
|
2299
|
-
jsonString: string,
|
|
2300
|
-
): SafeParseResult<Eight, SDKValidationError> {
|
|
2301
|
-
return safeParse(
|
|
2302
|
-
jsonString,
|
|
2303
|
-
(x) => Eight$inboundSchema.parse(JSON.parse(x)),
|
|
2304
|
-
`Failed to parse 'Eight' from JSON`,
|
|
2305
|
-
);
|
|
2306
|
-
}
|
|
2307
|
-
|
|
2308
|
-
/** @internal */
|
|
2309
|
-
export const Seven$inboundSchema: z.ZodType<Seven, z.ZodTypeDef, unknown> = z
|
|
2310
|
-
.object({
|
|
2311
|
-
type: z.literal("contains_valid_link"),
|
|
2312
|
-
});
|
|
2313
|
-
|
|
2314
|
-
export function sevenFromJSON(
|
|
2315
|
-
jsonString: string,
|
|
2316
|
-
): SafeParseResult<Seven, SDKValidationError> {
|
|
2317
|
-
return safeParse(
|
|
2318
|
-
jsonString,
|
|
2319
|
-
(x) => Seven$inboundSchema.parse(JSON.parse(x)),
|
|
2320
|
-
`Failed to parse 'Seven' from JSON`,
|
|
2321
|
-
);
|
|
2322
|
-
}
|
|
2323
|
-
|
|
2324
|
-
/** @internal */
|
|
2325
|
-
export const Six$inboundSchema: z.ZodType<Six, z.ZodTypeDef, unknown> = z
|
|
2326
|
-
.object({
|
|
2327
|
-
type: z.literal("contains_url"),
|
|
2328
|
-
});
|
|
2329
|
-
|
|
2330
|
-
export function sixFromJSON(
|
|
2331
|
-
jsonString: string,
|
|
2332
|
-
): SafeParseResult<Six, SDKValidationError> {
|
|
2333
|
-
return safeParse(
|
|
2334
|
-
jsonString,
|
|
2335
|
-
(x) => Six$inboundSchema.parse(JSON.parse(x)),
|
|
2336
|
-
`Failed to parse 'Six' from JSON`,
|
|
2337
|
-
);
|
|
2338
|
-
}
|
|
2339
|
-
|
|
2340
|
-
/** @internal */
|
|
2341
|
-
export const Five$inboundSchema: z.ZodType<Five, z.ZodTypeDef, unknown> = z
|
|
2342
|
-
.object({
|
|
2343
|
-
type: z.literal("contains_email"),
|
|
2344
|
-
});
|
|
2345
|
-
|
|
2346
|
-
export function fiveFromJSON(
|
|
2347
|
-
jsonString: string,
|
|
2348
|
-
): SafeParseResult<Five, SDKValidationError> {
|
|
2349
|
-
return safeParse(
|
|
2350
|
-
jsonString,
|
|
2351
|
-
(x) => Five$inboundSchema.parse(JSON.parse(x)),
|
|
2352
|
-
`Failed to parse 'Five' from JSON`,
|
|
2353
|
-
);
|
|
2354
|
-
}
|
|
2355
|
-
|
|
2356
|
-
/** @internal */
|
|
2357
|
-
export const CreateEvalFunctionParams4$inboundSchema: z.ZodType<
|
|
2358
|
-
CreateEvalFunctionParams4,
|
|
2359
|
-
z.ZodTypeDef,
|
|
2360
|
-
unknown
|
|
2361
|
-
> = z.object({
|
|
2362
|
-
type: z.literal("contains_any"),
|
|
2363
|
-
keywords: z.array(z.string()),
|
|
2364
|
-
});
|
|
2365
|
-
|
|
2366
|
-
export function createEvalFunctionParams4FromJSON(
|
|
2367
|
-
jsonString: string,
|
|
2368
|
-
): SafeParseResult<CreateEvalFunctionParams4, SDKValidationError> {
|
|
2369
|
-
return safeParse(
|
|
2370
|
-
jsonString,
|
|
2371
|
-
(x) => CreateEvalFunctionParams4$inboundSchema.parse(JSON.parse(x)),
|
|
2372
|
-
`Failed to parse 'CreateEvalFunctionParams4' from JSON`,
|
|
2373
|
-
);
|
|
2374
|
-
}
|
|
2375
|
-
|
|
2376
|
-
/** @internal */
|
|
2377
|
-
export const CreateEvalFunctionParams3$inboundSchema: z.ZodType<
|
|
2378
|
-
CreateEvalFunctionParams3,
|
|
2379
|
-
z.ZodTypeDef,
|
|
2380
|
-
unknown
|
|
2381
|
-
> = z.object({
|
|
2382
|
-
type: z.literal("contains_all"),
|
|
2383
|
-
keywords: z.array(z.string()),
|
|
2384
|
-
});
|
|
2385
|
-
|
|
2386
|
-
export function createEvalFunctionParams3FromJSON(
|
|
2387
|
-
jsonString: string,
|
|
2388
|
-
): SafeParseResult<CreateEvalFunctionParams3, SDKValidationError> {
|
|
2389
|
-
return safeParse(
|
|
2390
|
-
jsonString,
|
|
2391
|
-
(x) => CreateEvalFunctionParams3$inboundSchema.parse(JSON.parse(x)),
|
|
2392
|
-
`Failed to parse 'CreateEvalFunctionParams3' from JSON`,
|
|
2393
|
-
);
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
/** @internal */
|
|
2397
|
-
export const CreateEvalFunctionParams2$inboundSchema: z.ZodType<
|
|
2398
|
-
CreateEvalFunctionParams2,
|
|
2399
|
-
z.ZodTypeDef,
|
|
2400
|
-
unknown
|
|
2401
|
-
> = z.object({
|
|
2402
|
-
type: z.literal("contains_none"),
|
|
2403
|
-
keywords: z.array(z.string()),
|
|
2404
|
-
});
|
|
2405
|
-
|
|
2406
|
-
export function createEvalFunctionParams2FromJSON(
|
|
2407
|
-
jsonString: string,
|
|
2408
|
-
): SafeParseResult<CreateEvalFunctionParams2, SDKValidationError> {
|
|
2409
|
-
return safeParse(
|
|
2410
|
-
jsonString,
|
|
2411
|
-
(x) => CreateEvalFunctionParams2$inboundSchema.parse(JSON.parse(x)),
|
|
2412
|
-
`Failed to parse 'CreateEvalFunctionParams2' from JSON`,
|
|
2413
|
-
);
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
|
-
/** @internal */
|
|
2417
|
-
export const CreateEvalFunctionParams1$inboundSchema: z.ZodType<
|
|
2418
|
-
CreateEvalFunctionParams1,
|
|
2419
|
-
z.ZodTypeDef,
|
|
2420
|
-
unknown
|
|
2421
|
-
> = z.object({
|
|
2422
|
-
type: z.literal("contains"),
|
|
2423
|
-
value: z.string(),
|
|
2424
|
-
});
|
|
2425
|
-
|
|
2426
|
-
export function createEvalFunctionParams1FromJSON(
|
|
2427
|
-
jsonString: string,
|
|
2428
|
-
): SafeParseResult<CreateEvalFunctionParams1, SDKValidationError> {
|
|
2429
|
-
return safeParse(
|
|
2430
|
-
jsonString,
|
|
2431
|
-
(x) => CreateEvalFunctionParams1$inboundSchema.parse(JSON.parse(x)),
|
|
2432
|
-
`Failed to parse 'CreateEvalFunctionParams1' from JSON`,
|
|
2433
|
-
);
|
|
2434
|
-
}
|
|
2435
|
-
|
|
2436
|
-
/** @internal */
|
|
2437
|
-
export const FunctionParams$inboundSchema: z.ZodType<
|
|
2438
|
-
FunctionParams,
|
|
2439
|
-
z.ZodTypeDef,
|
|
2440
|
-
unknown
|
|
2441
|
-
> = z.union([
|
|
2442
|
-
z.lazy(() => CreateEvalFunctionParams1$inboundSchema),
|
|
2443
|
-
z.lazy(() => CreateEvalFunctionParams2$inboundSchema),
|
|
2444
|
-
z.lazy(() => CreateEvalFunctionParams3$inboundSchema),
|
|
2445
|
-
z.lazy(() => CreateEvalFunctionParams4$inboundSchema),
|
|
2446
|
-
z.lazy(() => Five$inboundSchema),
|
|
2447
|
-
z.lazy(() => Six$inboundSchema),
|
|
2448
|
-
z.lazy(() => Seven$inboundSchema),
|
|
2449
|
-
z.lazy(() => Eight$inboundSchema),
|
|
2450
|
-
z.lazy(() => Nine$inboundSchema),
|
|
2451
|
-
z.lazy(() => Ten$inboundSchema),
|
|
2452
|
-
z.lazy(() => Eleven$inboundSchema),
|
|
2453
|
-
z.lazy(() => Twelve$inboundSchema),
|
|
2454
|
-
z.lazy(() => Thirteen$inboundSchema),
|
|
2455
|
-
z.lazy(() => Fourteen$inboundSchema),
|
|
2456
|
-
z.lazy(() => Fifteen$inboundSchema),
|
|
2457
|
-
z.lazy(() => Sixteen$inboundSchema),
|
|
2458
|
-
z.lazy(() => Seventeen$inboundSchema),
|
|
2459
|
-
z.lazy(() => Eighteen$inboundSchema),
|
|
2460
|
-
z.lazy(() => Nineteen$inboundSchema),
|
|
2461
|
-
z.lazy(() => Twenty$inboundSchema),
|
|
2462
|
-
z.lazy(() => TwentyOne$inboundSchema),
|
|
2463
|
-
z.lazy(() => TwentyTwo$inboundSchema),
|
|
2464
|
-
z.lazy(() => TwentyThree$inboundSchema),
|
|
2465
|
-
z.lazy(() => TwentyFour$inboundSchema),
|
|
2466
|
-
z.lazy(() => TwentyFive$inboundSchema),
|
|
2467
|
-
z.lazy(() => TwentySix$inboundSchema),
|
|
2468
|
-
z.lazy(() => TwentySeven$inboundSchema),
|
|
2469
|
-
z.lazy(() => TwentyEight$inboundSchema),
|
|
2470
|
-
z.lazy(() => TwentyNine$inboundSchema),
|
|
2471
|
-
z.lazy(() => Thirty$inboundSchema),
|
|
2472
|
-
z.lazy(() => ThirtyOne$inboundSchema),
|
|
2473
|
-
z.lazy(() => ThirtyTwo$inboundSchema),
|
|
2474
|
-
]);
|
|
2475
|
-
|
|
2476
|
-
export function functionParamsFromJSON(
|
|
2477
|
-
jsonString: string,
|
|
2478
|
-
): SafeParseResult<FunctionParams, SDKValidationError> {
|
|
2479
|
-
return safeParse(
|
|
2480
|
-
jsonString,
|
|
2481
|
-
(x) => FunctionParams$inboundSchema.parse(JSON.parse(x)),
|
|
2482
|
-
`Failed to parse 'FunctionParams' from JSON`,
|
|
2483
|
-
);
|
|
2484
|
-
}
|
|
2485
|
-
|
|
2486
|
-
/** @internal */
|
|
2487
|
-
export const CreateEvalResponseBodyFunction$inboundSchema: z.ZodType<
|
|
2488
|
-
CreateEvalResponseBodyFunction,
|
|
2489
|
-
z.ZodTypeDef,
|
|
2490
|
-
unknown
|
|
2491
|
-
> = z.object({
|
|
2492
|
-
_id: z.string(),
|
|
2493
|
-
description: z.string(),
|
|
2494
|
-
created: z.string().default("2026-02-13T16:26:33.800Z"),
|
|
2495
|
-
updated: z.string().default("2026-02-13T16:26:33.800Z"),
|
|
2496
|
-
guardrail_config: z.union([
|
|
2497
|
-
z.lazy(() =>
|
|
2498
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Boolean$inboundSchema
|
|
2499
|
-
),
|
|
2500
|
-
z.lazy(() =>
|
|
2501
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Number$inboundSchema
|
|
2502
|
-
),
|
|
2503
|
-
]).optional(),
|
|
2504
|
-
type: z.literal("function_eval"),
|
|
2505
|
-
function_params: z.union([
|
|
2506
|
-
z.lazy(() => CreateEvalFunctionParams1$inboundSchema),
|
|
2507
|
-
z.lazy(() => CreateEvalFunctionParams2$inboundSchema),
|
|
2508
|
-
z.lazy(() => CreateEvalFunctionParams3$inboundSchema),
|
|
2509
|
-
z.lazy(() => CreateEvalFunctionParams4$inboundSchema),
|
|
2510
|
-
z.lazy(() => Five$inboundSchema),
|
|
2511
|
-
z.lazy(() => Six$inboundSchema),
|
|
2512
|
-
z.lazy(() => Seven$inboundSchema),
|
|
2513
|
-
z.lazy(() => Eight$inboundSchema),
|
|
2514
|
-
z.lazy(() => Nine$inboundSchema),
|
|
2515
|
-
z.lazy(() => Ten$inboundSchema),
|
|
2516
|
-
z.lazy(() => Eleven$inboundSchema),
|
|
2517
|
-
z.lazy(() => Twelve$inboundSchema),
|
|
2518
|
-
z.lazy(() => Thirteen$inboundSchema),
|
|
2519
|
-
z.lazy(() => Fourteen$inboundSchema),
|
|
2520
|
-
z.lazy(() => Fifteen$inboundSchema),
|
|
2521
|
-
z.lazy(() => Sixteen$inboundSchema),
|
|
2522
|
-
z.lazy(() => Seventeen$inboundSchema),
|
|
2523
|
-
z.lazy(() => Eighteen$inboundSchema),
|
|
2524
|
-
z.lazy(() => Nineteen$inboundSchema),
|
|
2525
|
-
z.lazy(() => Twenty$inboundSchema),
|
|
2526
|
-
z.lazy(() => TwentyOne$inboundSchema),
|
|
2527
|
-
z.lazy(() => TwentyTwo$inboundSchema),
|
|
2528
|
-
z.lazy(() => TwentyThree$inboundSchema),
|
|
2529
|
-
z.lazy(() => TwentyFour$inboundSchema),
|
|
2530
|
-
z.lazy(() => TwentyFive$inboundSchema),
|
|
2531
|
-
z.lazy(() => TwentySix$inboundSchema),
|
|
2532
|
-
z.lazy(() => TwentySeven$inboundSchema),
|
|
2533
|
-
z.lazy(() => TwentyEight$inboundSchema),
|
|
2534
|
-
z.lazy(() => TwentyNine$inboundSchema),
|
|
2535
|
-
z.lazy(() => Thirty$inboundSchema),
|
|
2536
|
-
z.lazy(() => ThirtyOne$inboundSchema),
|
|
2537
|
-
z.lazy(() => ThirtyTwo$inboundSchema),
|
|
2538
|
-
]),
|
|
2539
|
-
key: z.string(),
|
|
2540
|
-
}).transform((v) => {
|
|
2541
|
-
return remap$(v, {
|
|
2542
|
-
"_id": "id",
|
|
2543
|
-
"guardrail_config": "guardrailConfig",
|
|
2544
|
-
"function_params": "functionParams",
|
|
2545
|
-
});
|
|
2546
|
-
});
|
|
2547
|
-
|
|
2548
|
-
export function createEvalResponseBodyFunctionFromJSON(
|
|
2549
|
-
jsonString: string,
|
|
2550
|
-
): SafeParseResult<CreateEvalResponseBodyFunction, SDKValidationError> {
|
|
2551
|
-
return safeParse(
|
|
2552
|
-
jsonString,
|
|
2553
|
-
(x) => CreateEvalResponseBodyFunction$inboundSchema.parse(JSON.parse(x)),
|
|
2554
|
-
`Failed to parse 'CreateEvalResponseBodyFunction' from JSON`,
|
|
2555
|
-
);
|
|
2556
|
-
}
|
|
2557
|
-
|
|
2558
|
-
/** @internal */
|
|
2559
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator$inboundSchema:
|
|
2560
|
-
z.ZodNativeEnum<
|
|
2561
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator
|
|
2562
|
-
> = z.nativeEnum(
|
|
2563
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator,
|
|
2564
|
-
);
|
|
2565
|
-
|
|
2566
|
-
/** @internal */
|
|
2567
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema:
|
|
2568
|
-
z.ZodType<
|
|
2569
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber,
|
|
2570
|
-
z.ZodTypeDef,
|
|
2571
|
-
unknown
|
|
2572
|
-
> = z.object({
|
|
2573
|
-
enabled: z.boolean(),
|
|
2574
|
-
alert_on_failure: z.boolean().default(false),
|
|
2575
|
-
type: z.literal("number"),
|
|
2576
|
-
value: z.number(),
|
|
2577
|
-
operator:
|
|
2578
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator$inboundSchema,
|
|
2579
|
-
}).transform((v) => {
|
|
2580
|
-
return remap$(v, {
|
|
2581
|
-
"alert_on_failure": "alertOnFailure",
|
|
2582
|
-
});
|
|
2583
|
-
});
|
|
2584
|
-
|
|
2585
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumberFromJSON(
|
|
2586
|
-
jsonString: string,
|
|
2587
|
-
): SafeParseResult<
|
|
2588
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber,
|
|
2589
|
-
SDKValidationError
|
|
2590
|
-
> {
|
|
2591
|
-
return safeParse(
|
|
2592
|
-
jsonString,
|
|
2593
|
-
(x) =>
|
|
2594
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema
|
|
2595
|
-
.parse(JSON.parse(x)),
|
|
2596
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber' from JSON`,
|
|
2597
|
-
);
|
|
2598
|
-
}
|
|
2599
|
-
|
|
2600
|
-
/** @internal */
|
|
2601
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$inboundSchema:
|
|
2602
|
-
z.ZodType<
|
|
2603
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean,
|
|
2604
|
-
z.ZodTypeDef,
|
|
2605
|
-
unknown
|
|
2606
|
-
> = z.object({
|
|
2607
|
-
enabled: z.boolean(),
|
|
2608
|
-
alert_on_failure: z.boolean().default(false),
|
|
2609
|
-
type: z.literal("boolean"),
|
|
2610
|
-
value: z.boolean(),
|
|
2611
|
-
}).transform((v) => {
|
|
2612
|
-
return remap$(v, {
|
|
2613
|
-
"alert_on_failure": "alertOnFailure",
|
|
2614
|
-
});
|
|
2615
|
-
});
|
|
2616
|
-
|
|
2617
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBooleanFromJSON(
|
|
2618
|
-
jsonString: string,
|
|
2619
|
-
): SafeParseResult<
|
|
2620
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean,
|
|
2621
|
-
SDKValidationError
|
|
2622
|
-
> {
|
|
2623
|
-
return safeParse(
|
|
2624
|
-
jsonString,
|
|
2625
|
-
(x) =>
|
|
2626
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$inboundSchema
|
|
2627
|
-
.parse(JSON.parse(x)),
|
|
2628
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean' from JSON`,
|
|
2629
|
-
);
|
|
2630
|
-
}
|
|
2631
|
-
|
|
2632
|
-
/** @internal */
|
|
2633
|
-
export const CreateEvalResponseBodyEvalsResponseGuardrailConfig$inboundSchema:
|
|
2634
|
-
z.ZodType<
|
|
2635
|
-
CreateEvalResponseBodyEvalsResponseGuardrailConfig,
|
|
2636
|
-
z.ZodTypeDef,
|
|
2637
|
-
unknown
|
|
2638
|
-
> = z.union([
|
|
2639
|
-
z.lazy(() =>
|
|
2640
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$inboundSchema
|
|
2641
|
-
),
|
|
2642
|
-
z.lazy(() =>
|
|
2643
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema
|
|
2644
|
-
),
|
|
2645
|
-
]);
|
|
2646
|
-
|
|
2647
|
-
export function createEvalResponseBodyEvalsResponseGuardrailConfigFromJSON(
|
|
2648
|
-
jsonString: string,
|
|
2649
|
-
): SafeParseResult<
|
|
2650
|
-
CreateEvalResponseBodyEvalsResponseGuardrailConfig,
|
|
2651
|
-
SDKValidationError
|
|
2652
|
-
> {
|
|
2653
|
-
return safeParse(
|
|
2654
|
-
jsonString,
|
|
2655
|
-
(x) =>
|
|
2656
|
-
CreateEvalResponseBodyEvalsResponseGuardrailConfig$inboundSchema.parse(
|
|
2657
|
-
JSON.parse(x),
|
|
2658
|
-
),
|
|
2659
|
-
`Failed to parse 'CreateEvalResponseBodyEvalsResponseGuardrailConfig' from JSON`,
|
|
2660
|
-
);
|
|
2661
|
-
}
|
|
2662
|
-
|
|
2663
|
-
/** @internal */
|
|
2664
|
-
export const ResponseBodyPython$inboundSchema: z.ZodType<
|
|
2665
|
-
ResponseBodyPython,
|
|
2666
|
-
z.ZodTypeDef,
|
|
2667
|
-
unknown
|
|
2668
|
-
> = z.object({
|
|
2669
|
-
_id: z.string(),
|
|
2670
|
-
description: z.string(),
|
|
2671
|
-
created: z.string().default("2026-02-13T16:26:33.800Z"),
|
|
2672
|
-
updated: z.string().default("2026-02-13T16:26:33.800Z"),
|
|
2673
|
-
guardrail_config: z.union([
|
|
2674
|
-
z.lazy(() =>
|
|
2675
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$inboundSchema
|
|
2676
|
-
),
|
|
2677
|
-
z.lazy(() =>
|
|
2678
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema
|
|
2679
|
-
),
|
|
2680
|
-
]).optional(),
|
|
2681
|
-
code: z.string(),
|
|
2682
|
-
type: z.literal("python_eval"),
|
|
2683
|
-
key: z.string(),
|
|
2684
|
-
}).transform((v) => {
|
|
2685
|
-
return remap$(v, {
|
|
2686
|
-
"_id": "id",
|
|
2687
|
-
"guardrail_config": "guardrailConfig",
|
|
2688
|
-
});
|
|
2689
|
-
});
|
|
2690
|
-
|
|
2691
|
-
export function responseBodyPythonFromJSON(
|
|
2692
|
-
jsonString: string,
|
|
2693
|
-
): SafeParseResult<ResponseBodyPython, SDKValidationError> {
|
|
2694
|
-
return safeParse(
|
|
2695
|
-
jsonString,
|
|
2696
|
-
(x) => ResponseBodyPython$inboundSchema.parse(JSON.parse(x)),
|
|
2697
|
-
`Failed to parse 'ResponseBodyPython' from JSON`,
|
|
2698
|
-
);
|
|
2699
|
-
}
|
|
2700
|
-
|
|
2701
|
-
/** @internal */
|
|
2702
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator$inboundSchema:
|
|
2703
|
-
z.ZodNativeEnum<
|
|
2704
|
-
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator
|
|
2705
|
-
> = z.nativeEnum(
|
|
2706
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator,
|
|
2707
|
-
);
|
|
2708
|
-
|
|
2709
|
-
/** @internal */
|
|
2710
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema:
|
|
2711
|
-
z.ZodType<
|
|
2712
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber,
|
|
2713
|
-
z.ZodTypeDef,
|
|
2714
|
-
unknown
|
|
2715
|
-
> = z.object({
|
|
2716
|
-
enabled: z.boolean(),
|
|
2717
|
-
alert_on_failure: z.boolean().default(false),
|
|
2718
|
-
type: z.literal("number"),
|
|
2719
|
-
value: z.number(),
|
|
2720
|
-
operator:
|
|
2721
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator$inboundSchema,
|
|
2722
|
-
}).transform((v) => {
|
|
2723
|
-
return remap$(v, {
|
|
2724
|
-
"alert_on_failure": "alertOnFailure",
|
|
2725
|
-
});
|
|
2726
|
-
});
|
|
2727
|
-
|
|
2728
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONNumberFromJSON(
|
|
2729
|
-
jsonString: string,
|
|
2730
|
-
): SafeParseResult<
|
|
2731
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber,
|
|
2732
|
-
SDKValidationError
|
|
2733
|
-
> {
|
|
2734
|
-
return safeParse(
|
|
2735
|
-
jsonString,
|
|
2736
|
-
(x) =>
|
|
2737
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema
|
|
2738
|
-
.parse(JSON.parse(x)),
|
|
2739
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber' from JSON`,
|
|
2740
|
-
);
|
|
2741
|
-
}
|
|
2742
|
-
|
|
2743
|
-
/** @internal */
|
|
2744
|
-
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$inboundSchema:
|
|
2745
|
-
z.ZodType<
|
|
2746
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean,
|
|
2747
|
-
z.ZodTypeDef,
|
|
2748
|
-
unknown
|
|
2749
|
-
> = z.object({
|
|
2750
|
-
enabled: z.boolean(),
|
|
2751
|
-
alert_on_failure: z.boolean().default(false),
|
|
2752
|
-
type: z.literal("boolean"),
|
|
2753
|
-
value: z.boolean(),
|
|
2754
|
-
}).transform((v) => {
|
|
2755
|
-
return remap$(v, {
|
|
2756
|
-
"alert_on_failure": "alertOnFailure",
|
|
2757
|
-
});
|
|
2758
|
-
});
|
|
2759
|
-
|
|
2760
|
-
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONBooleanFromJSON(
|
|
2761
|
-
jsonString: string,
|
|
2762
|
-
): SafeParseResult<
|
|
2763
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean,
|
|
2764
|
-
SDKValidationError
|
|
2765
|
-
> {
|
|
2766
|
-
return safeParse(
|
|
2767
|
-
jsonString,
|
|
2768
|
-
(x) =>
|
|
2769
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$inboundSchema
|
|
2770
|
-
.parse(JSON.parse(x)),
|
|
2771
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean' from JSON`,
|
|
2772
|
-
);
|
|
2773
|
-
}
|
|
2774
|
-
|
|
2775
|
-
/** @internal */
|
|
2776
|
-
export const CreateEvalResponseBodyEvalsGuardrailConfig$inboundSchema:
|
|
2777
|
-
z.ZodType<CreateEvalResponseBodyEvalsGuardrailConfig, z.ZodTypeDef, unknown> =
|
|
2778
|
-
z.union([
|
|
2779
|
-
z.lazy(() =>
|
|
2780
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$inboundSchema
|
|
2781
|
-
),
|
|
2782
|
-
z.lazy(() =>
|
|
2783
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema
|
|
2784
|
-
),
|
|
2785
|
-
]);
|
|
2786
|
-
|
|
2787
|
-
export function createEvalResponseBodyEvalsGuardrailConfigFromJSON(
|
|
2788
|
-
jsonString: string,
|
|
2789
|
-
): SafeParseResult<
|
|
2790
|
-
CreateEvalResponseBodyEvalsGuardrailConfig,
|
|
2791
|
-
SDKValidationError
|
|
2792
|
-
> {
|
|
2793
|
-
return safeParse(
|
|
2794
|
-
jsonString,
|
|
2795
|
-
(x) =>
|
|
2796
|
-
CreateEvalResponseBodyEvalsGuardrailConfig$inboundSchema.parse(
|
|
2797
|
-
JSON.parse(x),
|
|
2798
|
-
),
|
|
2799
|
-
`Failed to parse 'CreateEvalResponseBodyEvalsGuardrailConfig' from JSON`,
|
|
2800
|
-
);
|
|
2801
|
-
}
|
|
2802
|
-
|
|
2803
|
-
/** @internal */
|
|
2804
|
-
export const ResponseBodyMethod$inboundSchema: z.ZodNativeEnum<
|
|
2805
|
-
typeof ResponseBodyMethod
|
|
2806
|
-
> = z.nativeEnum(ResponseBodyMethod);
|
|
2807
|
-
|
|
2808
|
-
/** @internal */
|
|
2809
|
-
export const ResponseBodyHTTP$inboundSchema: z.ZodType<
|
|
2810
|
-
ResponseBodyHTTP,
|
|
2811
|
-
z.ZodTypeDef,
|
|
2812
|
-
unknown
|
|
2813
|
-
> = z.object({
|
|
2814
|
-
_id: z.string(),
|
|
2815
|
-
description: z.string(),
|
|
2816
|
-
created: z.string().default("2026-02-13T16:26:33.800Z"),
|
|
2817
|
-
updated: z.string().default("2026-02-13T16:26:33.800Z"),
|
|
2818
|
-
guardrail_config: z.union([
|
|
2819
|
-
z.lazy(() =>
|
|
2820
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$inboundSchema
|
|
2821
|
-
),
|
|
2822
|
-
z.lazy(() =>
|
|
2823
|
-
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema
|
|
2824
|
-
),
|
|
2825
|
-
]).optional(),
|
|
2826
|
-
type: z.literal("http_eval"),
|
|
2827
|
-
url: z.string(),
|
|
2828
|
-
method: ResponseBodyMethod$inboundSchema,
|
|
2829
|
-
headers: z.record(z.string()),
|
|
2830
|
-
payload: z.record(z.any()),
|
|
2831
|
-
key: z.string(),
|
|
2832
|
-
}).transform((v) => {
|
|
2833
|
-
return remap$(v, {
|
|
2834
|
-
"_id": "id",
|
|
2835
|
-
"guardrail_config": "guardrailConfig",
|
|
2836
|
-
});
|
|
2837
|
-
});
|
|
2838
|
-
|
|
2839
|
-
export function responseBodyHTTPFromJSON(
|
|
2840
|
-
jsonString: string,
|
|
2841
|
-
): SafeParseResult<ResponseBodyHTTP, SDKValidationError> {
|
|
2842
|
-
return safeParse(
|
|
2843
|
-
jsonString,
|
|
2844
|
-
(x) => ResponseBodyHTTP$inboundSchema.parse(JSON.parse(x)),
|
|
2845
|
-
`Failed to parse 'ResponseBodyHTTP' from JSON`,
|
|
2846
|
-
);
|
|
2847
|
-
}
|
|
2848
|
-
|
|
2849
|
-
/** @internal */
|
|
2850
|
-
export const CreateEvalGuardrailConfigEvalsResponse200Operator$inboundSchema:
|
|
2851
|
-
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsResponse200Operator> = z
|
|
2852
|
-
.nativeEnum(CreateEvalGuardrailConfigEvalsResponse200Operator);
|
|
2853
|
-
|
|
2854
|
-
/** @internal */
|
|
2855
|
-
export const CreateEvalGuardrailConfigEvalsResponse200Number$inboundSchema:
|
|
2856
|
-
z.ZodType<
|
|
2857
|
-
CreateEvalGuardrailConfigEvalsResponse200Number,
|
|
2858
|
-
z.ZodTypeDef,
|
|
2859
|
-
unknown
|
|
2860
|
-
> = z.object({
|
|
2861
|
-
enabled: z.boolean(),
|
|
2862
|
-
alert_on_failure: z.boolean().default(false),
|
|
2863
|
-
type: z.literal("number"),
|
|
2864
|
-
value: z.number(),
|
|
2865
|
-
operator: CreateEvalGuardrailConfigEvalsResponse200Operator$inboundSchema,
|
|
2866
|
-
}).transform((v) => {
|
|
2867
|
-
return remap$(v, {
|
|
2868
|
-
"alert_on_failure": "alertOnFailure",
|
|
2869
|
-
});
|
|
2870
|
-
});
|
|
2871
|
-
|
|
2872
|
-
export function createEvalGuardrailConfigEvalsResponse200NumberFromJSON(
|
|
2873
|
-
jsonString: string,
|
|
2874
|
-
): SafeParseResult<
|
|
2875
|
-
CreateEvalGuardrailConfigEvalsResponse200Number,
|
|
2876
|
-
SDKValidationError
|
|
2877
|
-
> {
|
|
2878
|
-
return safeParse(
|
|
2879
|
-
jsonString,
|
|
2880
|
-
(x) =>
|
|
2881
|
-
CreateEvalGuardrailConfigEvalsResponse200Number$inboundSchema.parse(
|
|
2882
|
-
JSON.parse(x),
|
|
2883
|
-
),
|
|
2884
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200Number' from JSON`,
|
|
2885
|
-
);
|
|
2886
|
-
}
|
|
2887
|
-
|
|
2888
|
-
/** @internal */
|
|
2889
|
-
export const CreateEvalGuardrailConfigEvalsResponse200Boolean$inboundSchema:
|
|
2890
|
-
z.ZodType<
|
|
2891
|
-
CreateEvalGuardrailConfigEvalsResponse200Boolean,
|
|
2892
|
-
z.ZodTypeDef,
|
|
2893
|
-
unknown
|
|
2894
|
-
> = z.object({
|
|
2895
|
-
enabled: z.boolean(),
|
|
2896
|
-
alert_on_failure: z.boolean().default(false),
|
|
2897
|
-
type: z.literal("boolean"),
|
|
2898
|
-
value: z.boolean(),
|
|
2899
|
-
}).transform((v) => {
|
|
2900
|
-
return remap$(v, {
|
|
2901
|
-
"alert_on_failure": "alertOnFailure",
|
|
2902
|
-
});
|
|
2903
|
-
});
|
|
2904
|
-
|
|
2905
|
-
export function createEvalGuardrailConfigEvalsResponse200BooleanFromJSON(
|
|
2906
|
-
jsonString: string,
|
|
2907
|
-
): SafeParseResult<
|
|
2908
|
-
CreateEvalGuardrailConfigEvalsResponse200Boolean,
|
|
2909
|
-
SDKValidationError
|
|
2910
|
-
> {
|
|
2911
|
-
return safeParse(
|
|
2912
|
-
jsonString,
|
|
2913
|
-
(x) =>
|
|
2914
|
-
CreateEvalGuardrailConfigEvalsResponse200Boolean$inboundSchema.parse(
|
|
2915
|
-
JSON.parse(x),
|
|
2916
|
-
),
|
|
2917
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200Boolean' from JSON`,
|
|
2918
|
-
);
|
|
2919
|
-
}
|
|
2920
|
-
|
|
2921
|
-
/** @internal */
|
|
2922
|
-
export const CreateEvalResponseBodyGuardrailConfig$inboundSchema: z.ZodType<
|
|
2923
|
-
CreateEvalResponseBodyGuardrailConfig,
|
|
2924
|
-
z.ZodTypeDef,
|
|
2925
|
-
unknown
|
|
2926
|
-
> = z.union([
|
|
2927
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsResponse200Boolean$inboundSchema),
|
|
2928
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsResponse200Number$inboundSchema),
|
|
2929
|
-
]);
|
|
2930
|
-
|
|
2931
|
-
export function createEvalResponseBodyGuardrailConfigFromJSON(
|
|
2932
|
-
jsonString: string,
|
|
2933
|
-
): SafeParseResult<CreateEvalResponseBodyGuardrailConfig, SDKValidationError> {
|
|
2934
|
-
return safeParse(
|
|
2935
|
-
jsonString,
|
|
2936
|
-
(x) =>
|
|
2937
|
-
CreateEvalResponseBodyGuardrailConfig$inboundSchema.parse(JSON.parse(x)),
|
|
2938
|
-
`Failed to parse 'CreateEvalResponseBodyGuardrailConfig' from JSON`,
|
|
2939
|
-
);
|
|
2940
|
-
}
|
|
2941
|
-
|
|
2942
|
-
/** @internal */
|
|
2943
|
-
export const ResponseBodyJSON$inboundSchema: z.ZodType<
|
|
2944
|
-
ResponseBodyJSON,
|
|
2945
|
-
z.ZodTypeDef,
|
|
2946
|
-
unknown
|
|
2947
|
-
> = z.object({
|
|
2948
|
-
_id: z.string(),
|
|
2949
|
-
description: z.string(),
|
|
2950
|
-
created: z.string().default("2026-02-13T16:26:33.800Z"),
|
|
2951
|
-
updated: z.string().default("2026-02-13T16:26:33.800Z"),
|
|
2952
|
-
guardrail_config: z.union([
|
|
2953
|
-
z.lazy(() =>
|
|
2954
|
-
CreateEvalGuardrailConfigEvalsResponse200Boolean$inboundSchema
|
|
2955
|
-
),
|
|
2956
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsResponse200Number$inboundSchema),
|
|
2957
|
-
]).optional(),
|
|
2958
|
-
type: z.literal("json_schema"),
|
|
2959
|
-
schema: z.string(),
|
|
2960
|
-
key: z.string(),
|
|
2961
|
-
}).transform((v) => {
|
|
2962
|
-
return remap$(v, {
|
|
2963
|
-
"_id": "id",
|
|
2964
|
-
"guardrail_config": "guardrailConfig",
|
|
2965
|
-
});
|
|
2966
|
-
});
|
|
2967
|
-
|
|
2968
|
-
export function responseBodyJSONFromJSON(
|
|
2969
|
-
jsonString: string,
|
|
2970
|
-
): SafeParseResult<ResponseBodyJSON, SDKValidationError> {
|
|
2971
|
-
return safeParse(
|
|
2972
|
-
jsonString,
|
|
2973
|
-
(x) => ResponseBodyJSON$inboundSchema.parse(JSON.parse(x)),
|
|
2974
|
-
`Failed to parse 'ResponseBodyJSON' from JSON`,
|
|
2975
|
-
);
|
|
2976
|
-
}
|
|
2977
|
-
|
|
2978
|
-
/** @internal */
|
|
2979
|
-
export const CreateEvalGuardrailConfigEvalsResponseOperator$inboundSchema:
|
|
2980
|
-
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsResponseOperator> = z
|
|
2981
|
-
.nativeEnum(CreateEvalGuardrailConfigEvalsResponseOperator);
|
|
2982
|
-
|
|
2983
|
-
/** @internal */
|
|
2984
|
-
export const CreateEvalGuardrailConfigEvalsResponseNumber$inboundSchema:
|
|
2985
|
-
z.ZodType<
|
|
2986
|
-
CreateEvalGuardrailConfigEvalsResponseNumber,
|
|
2987
|
-
z.ZodTypeDef,
|
|
2988
|
-
unknown
|
|
2989
|
-
> = z.object({
|
|
2990
|
-
enabled: z.boolean(),
|
|
2991
|
-
alert_on_failure: z.boolean().default(false),
|
|
2992
|
-
type: z.literal("number"),
|
|
2993
|
-
value: z.number(),
|
|
2994
|
-
operator: CreateEvalGuardrailConfigEvalsResponseOperator$inboundSchema,
|
|
2995
|
-
}).transform((v) => {
|
|
2996
|
-
return remap$(v, {
|
|
2997
|
-
"alert_on_failure": "alertOnFailure",
|
|
2998
|
-
});
|
|
2999
|
-
});
|
|
3000
|
-
|
|
3001
|
-
export function createEvalGuardrailConfigEvalsResponseNumberFromJSON(
|
|
3002
|
-
jsonString: string,
|
|
3003
|
-
): SafeParseResult<
|
|
3004
|
-
CreateEvalGuardrailConfigEvalsResponseNumber,
|
|
3005
|
-
SDKValidationError
|
|
3006
|
-
> {
|
|
3007
|
-
return safeParse(
|
|
3008
|
-
jsonString,
|
|
3009
|
-
(x) =>
|
|
3010
|
-
CreateEvalGuardrailConfigEvalsResponseNumber$inboundSchema.parse(
|
|
3011
|
-
JSON.parse(x),
|
|
3012
|
-
),
|
|
3013
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponseNumber' from JSON`,
|
|
3014
|
-
);
|
|
3015
|
-
}
|
|
3016
|
-
|
|
3017
|
-
/** @internal */
|
|
3018
|
-
export const CreateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema:
|
|
3019
|
-
z.ZodType<
|
|
3020
|
-
CreateEvalGuardrailConfigEvalsResponseBoolean,
|
|
3021
|
-
z.ZodTypeDef,
|
|
3022
|
-
unknown
|
|
3023
|
-
> = z.object({
|
|
3024
|
-
enabled: z.boolean(),
|
|
3025
|
-
alert_on_failure: z.boolean().default(false),
|
|
3026
|
-
type: z.literal("boolean"),
|
|
3027
|
-
value: z.boolean(),
|
|
3028
|
-
}).transform((v) => {
|
|
3029
|
-
return remap$(v, {
|
|
3030
|
-
"alert_on_failure": "alertOnFailure",
|
|
3031
|
-
});
|
|
3032
|
-
});
|
|
3033
|
-
|
|
3034
|
-
export function createEvalGuardrailConfigEvalsResponseBooleanFromJSON(
|
|
3035
|
-
jsonString: string,
|
|
3036
|
-
): SafeParseResult<
|
|
3037
|
-
CreateEvalGuardrailConfigEvalsResponseBoolean,
|
|
3038
|
-
SDKValidationError
|
|
3039
|
-
> {
|
|
3040
|
-
return safeParse(
|
|
3041
|
-
jsonString,
|
|
3042
|
-
(x) =>
|
|
3043
|
-
CreateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema.parse(
|
|
3044
|
-
JSON.parse(x),
|
|
3045
|
-
),
|
|
3046
|
-
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponseBoolean' from JSON`,
|
|
3047
|
-
);
|
|
3048
|
-
}
|
|
3049
|
-
|
|
3050
|
-
/** @internal */
|
|
3051
|
-
export const ResponseBodyGuardrailConfig$inboundSchema: z.ZodType<
|
|
3052
|
-
ResponseBodyGuardrailConfig,
|
|
3053
|
-
z.ZodTypeDef,
|
|
3054
|
-
unknown
|
|
3055
|
-
> = z.union([
|
|
3056
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema),
|
|
3057
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseNumber$inboundSchema),
|
|
3058
|
-
]);
|
|
3059
|
-
|
|
3060
|
-
export function responseBodyGuardrailConfigFromJSON(
|
|
3061
|
-
jsonString: string,
|
|
3062
|
-
): SafeParseResult<ResponseBodyGuardrailConfig, SDKValidationError> {
|
|
3063
|
-
return safeParse(
|
|
3064
|
-
jsonString,
|
|
3065
|
-
(x) => ResponseBodyGuardrailConfig$inboundSchema.parse(JSON.parse(x)),
|
|
3066
|
-
`Failed to parse 'ResponseBodyGuardrailConfig' from JSON`,
|
|
3067
|
-
);
|
|
3068
|
-
}
|
|
3069
|
-
|
|
3070
|
-
/** @internal */
|
|
3071
|
-
export const ResponseBodyLLM$inboundSchema: z.ZodType<
|
|
3072
|
-
ResponseBodyLLM,
|
|
3073
|
-
z.ZodTypeDef,
|
|
3074
|
-
unknown
|
|
3075
|
-
> = z.object({
|
|
3076
|
-
_id: z.string(),
|
|
3077
|
-
description: z.string(),
|
|
3078
|
-
created: z.string().default("2026-02-13T16:26:33.800Z"),
|
|
3079
|
-
updated: z.string().default("2026-02-13T16:26:33.800Z"),
|
|
3080
|
-
guardrail_config: z.union([
|
|
3081
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema),
|
|
3082
|
-
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseNumber$inboundSchema),
|
|
3083
|
-
]).optional(),
|
|
3084
|
-
type: z.literal("llm_eval"),
|
|
3085
|
-
prompt: z.string(),
|
|
3086
|
-
key: z.string(),
|
|
3087
|
-
model: z.string(),
|
|
3088
|
-
}).transform((v) => {
|
|
3089
|
-
return remap$(v, {
|
|
3090
|
-
"_id": "id",
|
|
3091
|
-
"guardrail_config": "guardrailConfig",
|
|
3092
|
-
});
|
|
3093
|
-
});
|
|
3094
|
-
|
|
3095
|
-
export function responseBodyLLMFromJSON(
|
|
3096
|
-
jsonString: string,
|
|
3097
|
-
): SafeParseResult<ResponseBodyLLM, SDKValidationError> {
|
|
3098
|
-
return safeParse(
|
|
3099
|
-
jsonString,
|
|
3100
|
-
(x) => ResponseBodyLLM$inboundSchema.parse(JSON.parse(x)),
|
|
3101
|
-
`Failed to parse 'ResponseBodyLLM' from JSON`,
|
|
3102
|
-
);
|
|
3103
|
-
}
|
|
3104
|
-
|
|
3105
|
-
/** @internal */
|
|
3106
|
-
export const CreateEvalResponseBody$inboundSchema: z.ZodType<
|
|
3107
|
-
CreateEvalResponseBody,
|
|
3108
|
-
z.ZodTypeDef,
|
|
3109
|
-
unknown
|
|
3110
|
-
> = z.union([
|
|
3111
|
-
z.lazy(() => ResponseBodyLLM$inboundSchema),
|
|
3112
|
-
z.lazy(() => ResponseBodyJSON$inboundSchema),
|
|
3113
|
-
z.lazy(() => ResponseBodyHTTP$inboundSchema),
|
|
3114
|
-
z.lazy(() => ResponseBodyPython$inboundSchema),
|
|
3115
|
-
z.lazy(() => CreateEvalResponseBodyFunction$inboundSchema),
|
|
3116
|
-
z.lazy(() => Ragas$inboundSchema),
|
|
3117
|
-
z.lazy(() => Typescript$inboundSchema),
|
|
3118
|
-
]);
|
|
3119
|
-
|
|
3120
|
-
export function createEvalResponseBodyFromJSON(
|
|
3121
|
-
jsonString: string,
|
|
3122
|
-
): SafeParseResult<CreateEvalResponseBody, SDKValidationError> {
|
|
3123
|
-
return safeParse(
|
|
3124
|
-
jsonString,
|
|
3125
|
-
(x) => CreateEvalResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
3126
|
-
`Failed to parse 'CreateEvalResponseBody' from JSON`,
|
|
3127
|
-
);
|
|
3128
|
-
}
|