@orq-ai/node 3.6.2 → 3.6.4
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/bin/mcp-server.js +143 -43
- package/bin/mcp-server.js.map +73 -73
- package/funcs/contactsCreate.js +2 -0
- package/funcs/contactsCreate.js.map +1 -1
- package/funcs/datasetsClear.js +2 -0
- package/funcs/datasetsClear.js.map +1 -1
- package/funcs/datasetsCreate.js +2 -0
- package/funcs/datasetsCreate.js.map +1 -1
- package/funcs/datasetsCreateDatapoint.js +2 -0
- package/funcs/datasetsCreateDatapoint.js.map +1 -1
- package/funcs/datasetsCreateDatapoints.js +2 -0
- package/funcs/datasetsCreateDatapoints.js.map +1 -1
- package/funcs/datasetsCreateExperiment.js +2 -0
- package/funcs/datasetsCreateExperiment.js.map +1 -1
- package/funcs/datasetsDelete.js +2 -0
- package/funcs/datasetsDelete.js.map +1 -1
- package/funcs/datasetsDeleteDatapoint.js +2 -0
- package/funcs/datasetsDeleteDatapoint.js.map +1 -1
- package/funcs/datasetsList.js +2 -0
- package/funcs/datasetsList.js.map +1 -1
- package/funcs/datasetsListDatapoints.js +2 -0
- package/funcs/datasetsListDatapoints.js.map +1 -1
- package/funcs/datasetsRetrieve.js +2 -0
- package/funcs/datasetsRetrieve.js.map +1 -1
- package/funcs/datasetsRetrieveDatapoint.js +2 -0
- package/funcs/datasetsRetrieveDatapoint.js.map +1 -1
- package/funcs/datasetsUpdate.js +2 -0
- package/funcs/datasetsUpdate.js.map +1 -1
- package/funcs/datasetsUpdateDatapoint.js +2 -0
- package/funcs/datasetsUpdateDatapoint.js.map +1 -1
- package/funcs/deploymentsCreateExperiment.js +2 -0
- package/funcs/deploymentsCreateExperiment.js.map +1 -1
- package/funcs/deploymentsGetConfig.js +2 -0
- package/funcs/deploymentsGetConfig.js.map +1 -1
- package/funcs/deploymentsInvoke.js +2 -0
- package/funcs/deploymentsInvoke.js.map +1 -1
- package/funcs/deploymentsList.js +2 -0
- package/funcs/deploymentsList.js.map +1 -1
- package/funcs/deploymentsMetricsCreate.js +2 -0
- package/funcs/deploymentsMetricsCreate.js.map +1 -1
- package/funcs/deploymentsStream.js +2 -0
- package/funcs/deploymentsStream.js.map +1 -1
- package/funcs/feedbackCreate.js +2 -0
- package/funcs/feedbackCreate.js.map +1 -1
- package/funcs/filesCreate.js +2 -0
- package/funcs/filesCreate.js.map +1 -1
- package/funcs/filesDelete.js +2 -0
- package/funcs/filesDelete.js.map +1 -1
- package/funcs/filesGet.js +2 -0
- package/funcs/filesGet.js.map +1 -1
- package/funcs/filesList.js +2 -0
- package/funcs/filesList.js.map +1 -1
- package/funcs/knowledgeCreate.js +2 -0
- package/funcs/knowledgeCreate.js.map +1 -1
- package/funcs/knowledgeCreateChunks.js +2 -0
- package/funcs/knowledgeCreateChunks.js.map +1 -1
- package/funcs/knowledgeCreateDatasource.js +2 -0
- package/funcs/knowledgeCreateDatasource.js.map +1 -1
- package/funcs/knowledgeDelete.js +2 -0
- package/funcs/knowledgeDelete.js.map +1 -1
- package/funcs/knowledgeDeleteChunk.js +2 -0
- package/funcs/knowledgeDeleteChunk.js.map +1 -1
- package/funcs/knowledgeDeleteDatasource.js +2 -0
- package/funcs/knowledgeDeleteDatasource.js.map +1 -1
- package/funcs/knowledgeList.js +2 -0
- package/funcs/knowledgeList.js.map +1 -1
- package/funcs/knowledgeListChunks.js +2 -0
- package/funcs/knowledgeListChunks.js.map +1 -1
- package/funcs/knowledgeListDatasources.js +2 -0
- package/funcs/knowledgeListDatasources.js.map +1 -1
- package/funcs/knowledgeRetrieve.js +2 -0
- package/funcs/knowledgeRetrieve.js.map +1 -1
- package/funcs/knowledgeRetrieveChunk.js +2 -0
- package/funcs/knowledgeRetrieveChunk.js.map +1 -1
- package/funcs/knowledgeRetrieveDatasource.js +2 -0
- package/funcs/knowledgeRetrieveDatasource.js.map +1 -1
- package/funcs/knowledgeSearch.js +2 -0
- package/funcs/knowledgeSearch.js.map +1 -1
- package/funcs/knowledgeUpdate.js +2 -0
- package/funcs/knowledgeUpdate.js.map +1 -1
- package/funcs/knowledgeUpdateChunk.js +2 -0
- package/funcs/knowledgeUpdateChunk.js.map +1 -1
- package/funcs/knowledgeUpdateDatasource.js +2 -0
- package/funcs/knowledgeUpdateDatasource.js.map +1 -1
- package/funcs/modelsList.js +2 -0
- package/funcs/modelsList.js.map +1 -1
- package/funcs/promptsCreate.js +2 -0
- package/funcs/promptsCreate.js.map +1 -1
- package/funcs/promptsDelete.js +2 -0
- package/funcs/promptsDelete.js.map +1 -1
- package/funcs/promptsGetVersion.js +2 -0
- package/funcs/promptsGetVersion.js.map +1 -1
- package/funcs/promptsList.js +2 -0
- package/funcs/promptsList.js.map +1 -1
- package/funcs/promptsListVersions.js +2 -0
- package/funcs/promptsListVersions.js.map +1 -1
- package/funcs/promptsRetrieve.js +2 -0
- package/funcs/promptsRetrieve.js.map +1 -1
- package/funcs/promptsUpdate.js +2 -0
- package/funcs/promptsUpdate.js.map +1 -1
- package/funcs/remoteconfigsRetrieve.js +2 -0
- package/funcs/remoteconfigsRetrieve.js.map +1 -1
- package/hooks/types.d.ts +2 -0
- package/hooks/types.d.ts.map +1 -1
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +7 -3
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/lib/sdks.d.ts +1 -0
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +3 -3
- package/lib/sdks.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/operations/bulkcreatedatapoints.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/package.json +1 -1
- package/packages/orq-rc/README.md +73 -2
- package/packages/orq-rc/docs/sdks/datasets/README.md +0 -77
- package/packages/orq-rc/docs/sdks/evals/README.md +2661 -0
- package/packages/orq-rc/docs/sdks/knowledge/README.md +1 -1
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/funcs/contactsCreate.ts +2 -0
- package/packages/orq-rc/src/funcs/datasetsClear.ts +2 -0
- package/packages/orq-rc/src/funcs/datasetsCreate.ts +2 -0
- package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +2 -0
- package/packages/orq-rc/src/funcs/datasetsCreateExperiment.ts +2 -0
- package/packages/orq-rc/src/funcs/datasetsDelete.ts +2 -0
- package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +2 -0
- package/packages/orq-rc/src/funcs/datasetsList.ts +2 -0
- package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +2 -0
- package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +2 -0
- package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +2 -0
- package/packages/orq-rc/src/funcs/datasetsUpdate.ts +2 -0
- package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +2 -0
- package/packages/orq-rc/src/funcs/deploymentsCreateExperiment.ts +2 -0
- package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +2 -0
- package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +2 -0
- package/packages/orq-rc/src/funcs/deploymentsList.ts +2 -0
- package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +2 -0
- package/packages/orq-rc/src/funcs/deploymentsStream.ts +2 -0
- package/packages/orq-rc/src/funcs/evalsAgeAppropriate.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsBleuScore.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsBotDetection.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsContains.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsContainsAll.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsContainsAny.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsContainsEmail.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsContainsNone.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsContainsUrl.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsContainsValidLink.ts +173 -0
- package/packages/orq-rc/src/funcs/{datasetsCreateDatapoints.ts → evalsCreate.ts} +29 -29
- package/packages/orq-rc/src/funcs/evalsEndsWith.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsExactMatch.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsFactCheckingKnowledgeBase.ts +179 -0
- package/packages/orq-rc/src/funcs/evalsGrammar.ts +169 -0
- package/packages/orq-rc/src/funcs/evalsLengthBetween.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsLengthGreaterThan.ts +173 -0
- package/packages/orq-rc/src/funcs/evalsLengthLessThan.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsLocalization.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsPii.ts +169 -0
- package/packages/orq-rc/src/funcs/evalsRagasCoherence.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsRagasConciseness.ts +170 -0
- package/packages/orq-rc/src/funcs/evalsRagasContextPrecision.ts +176 -0
- package/packages/orq-rc/src/funcs/evalsRagasCorrectness.ts +170 -0
- package/packages/orq-rc/src/funcs/evalsRagasFaithfulness.ts +173 -0
- package/packages/orq-rc/src/funcs/evalsRagasHarmfulness.ts +170 -0
- package/packages/orq-rc/src/funcs/evalsRagasMaliciousness.ts +173 -0
- package/packages/orq-rc/src/funcs/evalsRagasResponseRelevancy.ts +179 -0
- package/packages/orq-rc/src/funcs/evalsRagasSummarization.ts +173 -0
- package/packages/orq-rc/src/funcs/evalsRunBertScore.ts +169 -0
- package/packages/orq-rc/src/funcs/evalsSentimentClassification.ts +179 -0
- package/packages/orq-rc/src/funcs/evalsSummarization.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsToneOfVoice.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsTranslation.ts +171 -0
- package/packages/orq-rc/src/funcs/evalsValidJson.ts +171 -0
- package/packages/orq-rc/src/funcs/feedbackCreate.ts +2 -0
- package/packages/orq-rc/src/funcs/filesCreate.ts +2 -0
- package/packages/orq-rc/src/funcs/filesDelete.ts +2 -0
- package/packages/orq-rc/src/funcs/filesGet.ts +2 -0
- package/packages/orq-rc/src/funcs/filesList.ts +2 -0
- package/packages/orq-rc/src/funcs/knowledgeCreate.ts +2 -0
- package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +6 -4
- package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +2 -0
- package/packages/orq-rc/src/funcs/knowledgeDelete.ts +2 -0
- package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +2 -0
- package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +2 -0
- package/packages/orq-rc/src/funcs/knowledgeList.ts +2 -0
- package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +2 -0
- package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +2 -0
- package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +2 -0
- package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +2 -0
- package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +2 -0
- package/packages/orq-rc/src/funcs/knowledgeSearch.ts +2 -0
- package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +2 -0
- package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +2 -0
- package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +2 -0
- package/packages/orq-rc/src/funcs/modelsList.ts +2 -0
- package/packages/orq-rc/src/funcs/promptsCreate.ts +2 -0
- package/packages/orq-rc/src/funcs/promptsDelete.ts +2 -0
- package/packages/orq-rc/src/funcs/promptsGetVersion.ts +2 -0
- package/packages/orq-rc/src/funcs/promptsList.ts +2 -0
- package/packages/orq-rc/src/funcs/promptsListVersions.ts +2 -0
- package/packages/orq-rc/src/funcs/promptsRetrieve.ts +2 -0
- package/packages/orq-rc/src/funcs/promptsUpdate.ts +2 -0
- package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +2 -0
- package/packages/orq-rc/src/hooks/types.ts +2 -0
- package/packages/orq-rc/src/index.ts +2 -0
- package/packages/orq-rc/src/lib/config.ts +7 -3
- package/packages/orq-rc/src/lib/sdks.ts +10 -4
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +71 -3
- package/packages/orq-rc/src/mcp-server/tools/evalsAgeAppropriate.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsBleuScore.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsBotDetection.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/{datasetsCreateDatapoints.ts → evalsContains.ts} +6 -8
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsAll.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsAny.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsEmail.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsNone.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsUrl.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsValidLink.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsCreate.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsEndsWith.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsExactMatch.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsFactCheckingKnowledgeBase.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsGrammar.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsLengthBetween.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsLengthGreaterThan.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsLengthLessThan.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsLocalization.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsPii.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasCoherence.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasConciseness.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextPrecision.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasCorrectness.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasFaithfulness.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasHarmfulness.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasMaliciousness.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasResponseRelevancy.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasSummarization.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsRunBertScore.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsSentimentClassification.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsSummarization.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsToneOfVoice.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsTranslation.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/evalsValidJson.ts +35 -0
- package/packages/orq-rc/src/models/errors/createeval.ts +71 -0
- package/packages/orq-rc/src/models/errors/evalsageappropriate.ts +139 -0
- package/packages/orq-rc/src/models/errors/evalsbleuscore.ts +137 -0
- package/packages/orq-rc/src/models/errors/evalsbotdetection.ts +138 -0
- package/packages/orq-rc/src/models/errors/evalscontains.ts +137 -0
- package/packages/orq-rc/src/models/errors/evalscontainsall.ts +138 -0
- package/packages/orq-rc/src/models/errors/evalscontainsany.ts +138 -0
- package/packages/orq-rc/src/models/errors/evalscontainsemail.ts +139 -0
- package/packages/orq-rc/src/models/errors/evalscontainsnone.ts +138 -0
- package/packages/orq-rc/src/models/errors/evalscontainsurl.ts +138 -0
- package/packages/orq-rc/src/models/errors/evalscontainsvalidlink.ts +140 -0
- package/packages/orq-rc/src/models/errors/evalsendswith.ts +137 -0
- package/packages/orq-rc/src/models/errors/evalsexactmatch.ts +137 -0
- package/packages/orq-rc/src/models/errors/evalsfactcheckingknowledgebase.ts +143 -0
- package/packages/orq-rc/src/models/errors/evalsgrammar.ts +137 -0
- package/packages/orq-rc/src/models/errors/evalslengthbetween.ts +139 -0
- package/packages/orq-rc/src/models/errors/evalslengthgreaterthan.ts +140 -0
- package/packages/orq-rc/src/models/errors/evalslengthlessthan.ts +139 -0
- package/packages/orq-rc/src/models/errors/evalslocalization.ts +138 -0
- package/packages/orq-rc/src/models/errors/evalspii.ts +137 -0
- package/packages/orq-rc/src/models/errors/evalsragascoherence.ts +139 -0
- package/packages/orq-rc/src/models/errors/evalsragasconciseness.ts +140 -0
- package/packages/orq-rc/src/models/errors/evalsragascontextprecision.ts +143 -0
- package/packages/orq-rc/src/models/errors/evalsragascorrectness.ts +140 -0
- package/packages/orq-rc/src/models/errors/evalsragasfaithfulness.ts +140 -0
- package/packages/orq-rc/src/models/errors/evalsragasharmfulness.ts +140 -0
- package/packages/orq-rc/src/models/errors/evalsragasmaliciousness.ts +141 -0
- package/packages/orq-rc/src/models/errors/evalsragasresponserelevancy.ts +143 -0
- package/packages/orq-rc/src/models/errors/evalsragassummarization.ts +141 -0
- package/packages/orq-rc/src/models/errors/evalssentimentclassification.ts +143 -0
- package/packages/orq-rc/src/models/errors/evalssummarization.ts +139 -0
- package/packages/orq-rc/src/models/errors/evalstoneofvoice.ts +138 -0
- package/packages/orq-rc/src/models/errors/evalstranslation.ts +138 -0
- package/packages/orq-rc/src/models/errors/evalsvalidjson.ts +137 -0
- package/packages/orq-rc/src/models/errors/index.ts +35 -0
- package/packages/orq-rc/src/models/errors/runbertscore.ts +137 -0
- package/packages/orq-rc/src/models/operations/createchunk.ts +20 -24
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +4045 -972
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +3830 -0
- package/packages/orq-rc/src/models/operations/evalsageappropriate.ts +253 -0
- package/packages/orq-rc/src/models/operations/evalsbleuscore.ts +131 -0
- package/packages/orq-rc/src/models/operations/evalsbotdetection.ts +249 -0
- package/packages/orq-rc/src/models/operations/evalscontains.ts +250 -0
- package/packages/orq-rc/src/models/operations/evalscontainsall.ts +248 -0
- package/packages/orq-rc/src/models/operations/evalscontainsany.ts +254 -0
- package/packages/orq-rc/src/models/operations/evalscontainsemail.ts +181 -0
- package/packages/orq-rc/src/models/operations/evalscontainsnone.ts +254 -0
- package/packages/orq-rc/src/models/operations/evalscontainsurl.ts +181 -0
- package/packages/orq-rc/src/models/operations/evalscontainsvalidlink.ts +186 -0
- package/packages/orq-rc/src/models/operations/evalsendswith.ts +250 -0
- package/packages/orq-rc/src/models/operations/evalsexactmatch.ts +183 -0
- package/packages/orq-rc/src/models/operations/evalsfactcheckingknowledgebase.ts +299 -0
- package/packages/orq-rc/src/models/operations/evalsgrammar.ts +243 -0
- package/packages/orq-rc/src/models/operations/evalslengthbetween.ts +268 -0
- package/packages/orq-rc/src/models/operations/evalslengthgreaterthan.ts +266 -0
- package/packages/orq-rc/src/models/operations/evalslengthlessthan.ts +259 -0
- package/packages/orq-rc/src/models/operations/evalslocalization.ts +253 -0
- package/packages/orq-rc/src/models/operations/evalspii.ts +243 -0
- package/packages/orq-rc/src/models/operations/evalsragascoherence.ts +152 -0
- package/packages/orq-rc/src/models/operations/evalsragasconciseness.ts +153 -0
- package/packages/orq-rc/src/models/operations/evalsragascontextprecision.ts +166 -0
- package/packages/orq-rc/src/models/operations/evalsragascorrectness.ts +153 -0
- package/packages/orq-rc/src/models/operations/evalsragasfaithfulness.ts +155 -0
- package/packages/orq-rc/src/models/operations/evalsragasharmfulness.ts +146 -0
- package/packages/orq-rc/src/models/operations/evalsragasmaliciousness.ts +157 -0
- package/packages/orq-rc/src/models/operations/evalsragasresponserelevancy.ts +165 -0
- package/packages/orq-rc/src/models/operations/evalsragassummarization.ts +150 -0
- package/packages/orq-rc/src/models/operations/evalssentimentclassification.ts +285 -0
- package/packages/orq-rc/src/models/operations/evalssummarization.ts +253 -0
- package/packages/orq-rc/src/models/operations/evalstoneofvoice.ts +251 -0
- package/packages/orq-rc/src/models/operations/evalstranslation.ts +251 -0
- package/packages/orq-rc/src/models/operations/evalsvalidjson.ts +177 -0
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/index.ts +35 -1
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +1805 -301
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +1737 -277
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/runbertscore.ts +197 -0
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +3990 -976
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/sdk/datasets.ts +0 -18
- package/packages/orq-rc/src/sdk/evals.ts +534 -0
- package/packages/orq-rc/src/sdk/knowledge.ts +1 -1
- package/packages/orq-rc/src/sdk/sdk.ts +6 -0
- package/src/funcs/contactsCreate.ts +2 -0
- package/src/funcs/datasetsClear.ts +2 -0
- package/src/funcs/datasetsCreate.ts +2 -0
- package/src/funcs/datasetsCreateDatapoint.ts +2 -0
- package/src/funcs/datasetsCreateDatapoints.ts +2 -0
- package/src/funcs/datasetsCreateExperiment.ts +2 -0
- package/src/funcs/datasetsDelete.ts +2 -0
- package/src/funcs/datasetsDeleteDatapoint.ts +2 -0
- package/src/funcs/datasetsList.ts +2 -0
- package/src/funcs/datasetsListDatapoints.ts +2 -0
- package/src/funcs/datasetsRetrieve.ts +2 -0
- package/src/funcs/datasetsRetrieveDatapoint.ts +2 -0
- package/src/funcs/datasetsUpdate.ts +2 -0
- package/src/funcs/datasetsUpdateDatapoint.ts +2 -0
- package/src/funcs/deploymentsCreateExperiment.ts +2 -0
- package/src/funcs/deploymentsGetConfig.ts +2 -0
- package/src/funcs/deploymentsInvoke.ts +2 -0
- package/src/funcs/deploymentsList.ts +2 -0
- package/src/funcs/deploymentsMetricsCreate.ts +2 -0
- package/src/funcs/deploymentsStream.ts +2 -0
- package/src/funcs/feedbackCreate.ts +2 -0
- package/src/funcs/filesCreate.ts +2 -0
- package/src/funcs/filesDelete.ts +2 -0
- package/src/funcs/filesGet.ts +2 -0
- package/src/funcs/filesList.ts +2 -0
- package/src/funcs/knowledgeCreate.ts +2 -0
- package/src/funcs/knowledgeCreateChunks.ts +2 -0
- package/src/funcs/knowledgeCreateDatasource.ts +2 -0
- package/src/funcs/knowledgeDelete.ts +2 -0
- package/src/funcs/knowledgeDeleteChunk.ts +2 -0
- package/src/funcs/knowledgeDeleteDatasource.ts +2 -0
- package/src/funcs/knowledgeList.ts +2 -0
- package/src/funcs/knowledgeListChunks.ts +2 -0
- package/src/funcs/knowledgeListDatasources.ts +2 -0
- package/src/funcs/knowledgeRetrieve.ts +2 -0
- package/src/funcs/knowledgeRetrieveChunk.ts +2 -0
- package/src/funcs/knowledgeRetrieveDatasource.ts +2 -0
- package/src/funcs/knowledgeSearch.ts +2 -0
- package/src/funcs/knowledgeUpdate.ts +2 -0
- package/src/funcs/knowledgeUpdateChunk.ts +2 -0
- package/src/funcs/knowledgeUpdateDatasource.ts +2 -0
- package/src/funcs/modelsList.ts +2 -0
- package/src/funcs/promptsCreate.ts +2 -0
- package/src/funcs/promptsDelete.ts +2 -0
- package/src/funcs/promptsGetVersion.ts +2 -0
- package/src/funcs/promptsList.ts +2 -0
- package/src/funcs/promptsListVersions.ts +2 -0
- package/src/funcs/promptsRetrieve.ts +2 -0
- package/src/funcs/promptsUpdate.ts +2 -0
- package/src/funcs/remoteconfigsRetrieve.ts +2 -0
- package/src/hooks/types.ts +2 -0
- package/src/index.ts +2 -0
- package/src/lib/config.ts +7 -3
- package/src/lib/sdks.ts +10 -4
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/bulkcreatedatapoints.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +2 -2
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +0 -2232
|
@@ -0,0 +1,3830 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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 CreateEvalGuardrailConfigEvalsRequestRequestBody42Type = {
|
|
13
|
+
Number: "number",
|
|
14
|
+
} as const;
|
|
15
|
+
export type CreateEvalGuardrailConfigEvalsRequestRequestBody42Type = ClosedEnum<
|
|
16
|
+
typeof CreateEvalGuardrailConfigEvalsRequestRequestBody42Type
|
|
17
|
+
>;
|
|
18
|
+
|
|
19
|
+
export const CreateEvalGuardrailConfigEvalsOperator = {
|
|
20
|
+
Eq: "eq",
|
|
21
|
+
Ne: "ne",
|
|
22
|
+
Gt: "gt",
|
|
23
|
+
Gte: "gte",
|
|
24
|
+
Lt: "lt",
|
|
25
|
+
Lte: "lte",
|
|
26
|
+
} as const;
|
|
27
|
+
export type CreateEvalGuardrailConfigEvalsOperator = ClosedEnum<
|
|
28
|
+
typeof CreateEvalGuardrailConfigEvalsOperator
|
|
29
|
+
>;
|
|
30
|
+
|
|
31
|
+
export type CreateEvalGuardrailConfigEvalsNumber = {
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
type: CreateEvalGuardrailConfigEvalsRequestRequestBody42Type;
|
|
34
|
+
value: number;
|
|
35
|
+
operator: CreateEvalGuardrailConfigEvalsOperator;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const CreateEvalGuardrailConfigEvalsRequestRequestBody4Type = {
|
|
39
|
+
Boolean: "boolean",
|
|
40
|
+
} as const;
|
|
41
|
+
export type CreateEvalGuardrailConfigEvalsRequestRequestBody4Type = ClosedEnum<
|
|
42
|
+
typeof CreateEvalGuardrailConfigEvalsRequestRequestBody4Type
|
|
43
|
+
>;
|
|
44
|
+
|
|
45
|
+
export type CreateEvalGuardrailConfigEvalsBoolean = {
|
|
46
|
+
enabled: boolean;
|
|
47
|
+
type: CreateEvalGuardrailConfigEvalsRequestRequestBody4Type;
|
|
48
|
+
value: boolean;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type CreateEvalRequestBodyEvalsGuardrailConfig =
|
|
52
|
+
| CreateEvalGuardrailConfigEvalsBoolean
|
|
53
|
+
| CreateEvalGuardrailConfigEvalsNumber;
|
|
54
|
+
|
|
55
|
+
export const CreateEvalRequestBodyEvalsRequestType = {
|
|
56
|
+
PythonEval: "python_eval",
|
|
57
|
+
} as const;
|
|
58
|
+
export type CreateEvalRequestBodyEvalsRequestType = ClosedEnum<
|
|
59
|
+
typeof CreateEvalRequestBodyEvalsRequestType
|
|
60
|
+
>;
|
|
61
|
+
|
|
62
|
+
export type Python = {
|
|
63
|
+
guardrailConfig?:
|
|
64
|
+
| CreateEvalGuardrailConfigEvalsBoolean
|
|
65
|
+
| CreateEvalGuardrailConfigEvalsNumber
|
|
66
|
+
| undefined;
|
|
67
|
+
code: string;
|
|
68
|
+
type: CreateEvalRequestBodyEvalsRequestType;
|
|
69
|
+
/**
|
|
70
|
+
* The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
|
|
71
|
+
*/
|
|
72
|
+
path: string;
|
|
73
|
+
description?: string | undefined;
|
|
74
|
+
key: string;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const CreateEvalGuardrailConfigEvalsRequestRequestBody3Type = {
|
|
78
|
+
Number: "number",
|
|
79
|
+
} as const;
|
|
80
|
+
export type CreateEvalGuardrailConfigEvalsRequestRequestBody3Type = ClosedEnum<
|
|
81
|
+
typeof CreateEvalGuardrailConfigEvalsRequestRequestBody3Type
|
|
82
|
+
>;
|
|
83
|
+
|
|
84
|
+
export const CreateEvalGuardrailConfigOperator = {
|
|
85
|
+
Eq: "eq",
|
|
86
|
+
Ne: "ne",
|
|
87
|
+
Gt: "gt",
|
|
88
|
+
Gte: "gte",
|
|
89
|
+
Lt: "lt",
|
|
90
|
+
Lte: "lte",
|
|
91
|
+
} as const;
|
|
92
|
+
export type CreateEvalGuardrailConfigOperator = ClosedEnum<
|
|
93
|
+
typeof CreateEvalGuardrailConfigOperator
|
|
94
|
+
>;
|
|
95
|
+
|
|
96
|
+
export type CreateEvalGuardrailConfigNumber = {
|
|
97
|
+
enabled: boolean;
|
|
98
|
+
type: CreateEvalGuardrailConfigEvalsRequestRequestBody3Type;
|
|
99
|
+
value: number;
|
|
100
|
+
operator: CreateEvalGuardrailConfigOperator;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export const CreateEvalGuardrailConfigEvalsRequestRequestBodyType = {
|
|
104
|
+
Boolean: "boolean",
|
|
105
|
+
} as const;
|
|
106
|
+
export type CreateEvalGuardrailConfigEvalsRequestRequestBodyType = ClosedEnum<
|
|
107
|
+
typeof CreateEvalGuardrailConfigEvalsRequestRequestBodyType
|
|
108
|
+
>;
|
|
109
|
+
|
|
110
|
+
export type CreateEvalGuardrailConfigBoolean = {
|
|
111
|
+
enabled: boolean;
|
|
112
|
+
type: CreateEvalGuardrailConfigEvalsRequestRequestBodyType;
|
|
113
|
+
value: boolean;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export type CreateEvalRequestBodyGuardrailConfig =
|
|
117
|
+
| CreateEvalGuardrailConfigBoolean
|
|
118
|
+
| CreateEvalGuardrailConfigNumber;
|
|
119
|
+
|
|
120
|
+
export const CreateEvalRequestBodyEvalsType = {
|
|
121
|
+
HttpEval: "http_eval",
|
|
122
|
+
} as const;
|
|
123
|
+
export type CreateEvalRequestBodyEvalsType = ClosedEnum<
|
|
124
|
+
typeof CreateEvalRequestBodyEvalsType
|
|
125
|
+
>;
|
|
126
|
+
|
|
127
|
+
export const Method = {
|
|
128
|
+
Get: "GET",
|
|
129
|
+
Post: "POST",
|
|
130
|
+
} as const;
|
|
131
|
+
export type Method = ClosedEnum<typeof Method>;
|
|
132
|
+
|
|
133
|
+
export type Http = {
|
|
134
|
+
guardrailConfig?:
|
|
135
|
+
| CreateEvalGuardrailConfigBoolean
|
|
136
|
+
| CreateEvalGuardrailConfigNumber
|
|
137
|
+
| undefined;
|
|
138
|
+
type: CreateEvalRequestBodyEvalsType;
|
|
139
|
+
url: string;
|
|
140
|
+
method: Method;
|
|
141
|
+
headers: { [k: string]: string };
|
|
142
|
+
payload: { [k: string]: any };
|
|
143
|
+
/**
|
|
144
|
+
* The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
|
|
145
|
+
*/
|
|
146
|
+
path: string;
|
|
147
|
+
description?: string | undefined;
|
|
148
|
+
key: string;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export const CreateEvalGuardrailConfigEvalsRequestType = {
|
|
152
|
+
Number: "number",
|
|
153
|
+
} as const;
|
|
154
|
+
export type CreateEvalGuardrailConfigEvalsRequestType = ClosedEnum<
|
|
155
|
+
typeof CreateEvalGuardrailConfigEvalsRequestType
|
|
156
|
+
>;
|
|
157
|
+
|
|
158
|
+
export const GuardrailConfigOperator = {
|
|
159
|
+
Eq: "eq",
|
|
160
|
+
Ne: "ne",
|
|
161
|
+
Gt: "gt",
|
|
162
|
+
Gte: "gte",
|
|
163
|
+
Lt: "lt",
|
|
164
|
+
Lte: "lte",
|
|
165
|
+
} as const;
|
|
166
|
+
export type GuardrailConfigOperator = ClosedEnum<
|
|
167
|
+
typeof GuardrailConfigOperator
|
|
168
|
+
>;
|
|
169
|
+
|
|
170
|
+
export type GuardrailConfigNumber = {
|
|
171
|
+
enabled: boolean;
|
|
172
|
+
type: CreateEvalGuardrailConfigEvalsRequestType;
|
|
173
|
+
value: number;
|
|
174
|
+
operator: GuardrailConfigOperator;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
export const CreateEvalGuardrailConfigEvalsType = {
|
|
178
|
+
Boolean: "boolean",
|
|
179
|
+
} as const;
|
|
180
|
+
export type CreateEvalGuardrailConfigEvalsType = ClosedEnum<
|
|
181
|
+
typeof CreateEvalGuardrailConfigEvalsType
|
|
182
|
+
>;
|
|
183
|
+
|
|
184
|
+
export type GuardrailConfigBoolean = {
|
|
185
|
+
enabled: boolean;
|
|
186
|
+
type: CreateEvalGuardrailConfigEvalsType;
|
|
187
|
+
value: boolean;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
export type RequestBodyGuardrailConfig =
|
|
191
|
+
| GuardrailConfigBoolean
|
|
192
|
+
| GuardrailConfigNumber;
|
|
193
|
+
|
|
194
|
+
export const CreateEvalRequestBodyType = {
|
|
195
|
+
JsonSchema: "json_schema",
|
|
196
|
+
} as const;
|
|
197
|
+
export type CreateEvalRequestBodyType = ClosedEnum<
|
|
198
|
+
typeof CreateEvalRequestBodyType
|
|
199
|
+
>;
|
|
200
|
+
|
|
201
|
+
export type Json = {
|
|
202
|
+
guardrailConfig?: GuardrailConfigBoolean | GuardrailConfigNumber | undefined;
|
|
203
|
+
type: CreateEvalRequestBodyType;
|
|
204
|
+
schema: string;
|
|
205
|
+
/**
|
|
206
|
+
* The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
|
|
207
|
+
*/
|
|
208
|
+
path: string;
|
|
209
|
+
description?: string | undefined;
|
|
210
|
+
key: string;
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
export const CreateEvalGuardrailConfigType = {
|
|
214
|
+
Number: "number",
|
|
215
|
+
} as const;
|
|
216
|
+
export type CreateEvalGuardrailConfigType = ClosedEnum<
|
|
217
|
+
typeof CreateEvalGuardrailConfigType
|
|
218
|
+
>;
|
|
219
|
+
|
|
220
|
+
export const Operator = {
|
|
221
|
+
Eq: "eq",
|
|
222
|
+
Ne: "ne",
|
|
223
|
+
Gt: "gt",
|
|
224
|
+
Gte: "gte",
|
|
225
|
+
Lt: "lt",
|
|
226
|
+
Lte: "lte",
|
|
227
|
+
} as const;
|
|
228
|
+
export type Operator = ClosedEnum<typeof Operator>;
|
|
229
|
+
|
|
230
|
+
export type NumberT = {
|
|
231
|
+
enabled: boolean;
|
|
232
|
+
type: CreateEvalGuardrailConfigType;
|
|
233
|
+
value: number;
|
|
234
|
+
operator: Operator;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
export const GuardrailConfigType = {
|
|
238
|
+
Boolean: "boolean",
|
|
239
|
+
} as const;
|
|
240
|
+
export type GuardrailConfigType = ClosedEnum<typeof GuardrailConfigType>;
|
|
241
|
+
|
|
242
|
+
export type Boolean = {
|
|
243
|
+
enabled: boolean;
|
|
244
|
+
type: GuardrailConfigType;
|
|
245
|
+
value: boolean;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
export type GuardrailConfig = Boolean | NumberT;
|
|
249
|
+
|
|
250
|
+
export const RequestBodyType = {
|
|
251
|
+
LlmEval: "llm_eval",
|
|
252
|
+
} as const;
|
|
253
|
+
export type RequestBodyType = ClosedEnum<typeof RequestBodyType>;
|
|
254
|
+
|
|
255
|
+
export type Llm = {
|
|
256
|
+
guardrailConfig?: Boolean | NumberT | undefined;
|
|
257
|
+
type: RequestBodyType;
|
|
258
|
+
prompt: string;
|
|
259
|
+
/**
|
|
260
|
+
* The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
|
|
261
|
+
*/
|
|
262
|
+
path: string;
|
|
263
|
+
description?: string | undefined;
|
|
264
|
+
model: string;
|
|
265
|
+
key: string;
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
export type CreateEvalRequestBody = Json | Python | Llm | Http;
|
|
269
|
+
|
|
270
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type =
|
|
271
|
+
{
|
|
272
|
+
Number: "number",
|
|
273
|
+
} as const;
|
|
274
|
+
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type =
|
|
275
|
+
ClosedEnum<
|
|
276
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type
|
|
277
|
+
>;
|
|
278
|
+
|
|
279
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator =
|
|
280
|
+
{
|
|
281
|
+
Eq: "eq",
|
|
282
|
+
Ne: "ne",
|
|
283
|
+
Gt: "gt",
|
|
284
|
+
Gte: "gte",
|
|
285
|
+
Lt: "lt",
|
|
286
|
+
Lte: "lte",
|
|
287
|
+
} as const;
|
|
288
|
+
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator =
|
|
289
|
+
ClosedEnum<
|
|
290
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator
|
|
291
|
+
>;
|
|
292
|
+
|
|
293
|
+
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber =
|
|
294
|
+
{
|
|
295
|
+
enabled: boolean;
|
|
296
|
+
type:
|
|
297
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type;
|
|
298
|
+
value: number;
|
|
299
|
+
operator:
|
|
300
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator;
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type =
|
|
304
|
+
{
|
|
305
|
+
Boolean: "boolean",
|
|
306
|
+
} as const;
|
|
307
|
+
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type =
|
|
308
|
+
ClosedEnum<
|
|
309
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type
|
|
310
|
+
>;
|
|
311
|
+
|
|
312
|
+
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean =
|
|
313
|
+
{
|
|
314
|
+
enabled: boolean;
|
|
315
|
+
type:
|
|
316
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type;
|
|
317
|
+
value: boolean;
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
export type CreateEvalResponseBodyEvalsResponseGuardrailConfig =
|
|
321
|
+
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean
|
|
322
|
+
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber;
|
|
323
|
+
|
|
324
|
+
export const CreateEvalResponseBodyEvalsResponseType = {
|
|
325
|
+
PythonEval: "python_eval",
|
|
326
|
+
} as const;
|
|
327
|
+
export type CreateEvalResponseBodyEvalsResponseType = ClosedEnum<
|
|
328
|
+
typeof CreateEvalResponseBodyEvalsResponseType
|
|
329
|
+
>;
|
|
330
|
+
|
|
331
|
+
export type ResponseBodyPython = {
|
|
332
|
+
id: string;
|
|
333
|
+
description: string;
|
|
334
|
+
created?: string | undefined;
|
|
335
|
+
updated?: string | undefined;
|
|
336
|
+
guardrailConfig?:
|
|
337
|
+
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean
|
|
338
|
+
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber
|
|
339
|
+
| undefined;
|
|
340
|
+
code: string;
|
|
341
|
+
type: CreateEvalResponseBodyEvalsResponseType;
|
|
342
|
+
key: string;
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type =
|
|
346
|
+
{
|
|
347
|
+
Number: "number",
|
|
348
|
+
} as const;
|
|
349
|
+
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type =
|
|
350
|
+
ClosedEnum<
|
|
351
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type
|
|
352
|
+
>;
|
|
353
|
+
|
|
354
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator =
|
|
355
|
+
{
|
|
356
|
+
Eq: "eq",
|
|
357
|
+
Ne: "ne",
|
|
358
|
+
Gt: "gt",
|
|
359
|
+
Gte: "gte",
|
|
360
|
+
Lt: "lt",
|
|
361
|
+
Lte: "lte",
|
|
362
|
+
} as const;
|
|
363
|
+
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator =
|
|
364
|
+
ClosedEnum<
|
|
365
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator
|
|
366
|
+
>;
|
|
367
|
+
|
|
368
|
+
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber = {
|
|
369
|
+
enabled: boolean;
|
|
370
|
+
type:
|
|
371
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type;
|
|
372
|
+
value: number;
|
|
373
|
+
operator: CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator;
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type =
|
|
377
|
+
{
|
|
378
|
+
Boolean: "boolean",
|
|
379
|
+
} as const;
|
|
380
|
+
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type =
|
|
381
|
+
ClosedEnum<
|
|
382
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type
|
|
383
|
+
>;
|
|
384
|
+
|
|
385
|
+
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean = {
|
|
386
|
+
enabled: boolean;
|
|
387
|
+
type:
|
|
388
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type;
|
|
389
|
+
value: boolean;
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
export type CreateEvalResponseBodyEvalsGuardrailConfig =
|
|
393
|
+
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean
|
|
394
|
+
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber;
|
|
395
|
+
|
|
396
|
+
export const CreateEvalResponseBodyEvalsType = {
|
|
397
|
+
HttpEval: "http_eval",
|
|
398
|
+
} as const;
|
|
399
|
+
export type CreateEvalResponseBodyEvalsType = ClosedEnum<
|
|
400
|
+
typeof CreateEvalResponseBodyEvalsType
|
|
401
|
+
>;
|
|
402
|
+
|
|
403
|
+
export const ResponseBodyMethod = {
|
|
404
|
+
Get: "GET",
|
|
405
|
+
Post: "POST",
|
|
406
|
+
} as const;
|
|
407
|
+
export type ResponseBodyMethod = ClosedEnum<typeof ResponseBodyMethod>;
|
|
408
|
+
|
|
409
|
+
export type ResponseBodyHTTP = {
|
|
410
|
+
id: string;
|
|
411
|
+
description: string;
|
|
412
|
+
created?: string | undefined;
|
|
413
|
+
updated?: string | undefined;
|
|
414
|
+
guardrailConfig?:
|
|
415
|
+
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean
|
|
416
|
+
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber
|
|
417
|
+
| undefined;
|
|
418
|
+
type: CreateEvalResponseBodyEvalsType;
|
|
419
|
+
url: string;
|
|
420
|
+
method: ResponseBodyMethod;
|
|
421
|
+
headers: { [k: string]: string };
|
|
422
|
+
payload: { [k: string]: any };
|
|
423
|
+
key: string;
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType =
|
|
427
|
+
{
|
|
428
|
+
Number: "number",
|
|
429
|
+
} as const;
|
|
430
|
+
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType =
|
|
431
|
+
ClosedEnum<
|
|
432
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType
|
|
433
|
+
>;
|
|
434
|
+
|
|
435
|
+
export const CreateEvalGuardrailConfigEvalsResponse200Operator = {
|
|
436
|
+
Eq: "eq",
|
|
437
|
+
Ne: "ne",
|
|
438
|
+
Gt: "gt",
|
|
439
|
+
Gte: "gte",
|
|
440
|
+
Lt: "lt",
|
|
441
|
+
Lte: "lte",
|
|
442
|
+
} as const;
|
|
443
|
+
export type CreateEvalGuardrailConfigEvalsResponse200Operator = ClosedEnum<
|
|
444
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200Operator
|
|
445
|
+
>;
|
|
446
|
+
|
|
447
|
+
export type CreateEvalGuardrailConfigEvalsResponse200Number = {
|
|
448
|
+
enabled: boolean;
|
|
449
|
+
type:
|
|
450
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType;
|
|
451
|
+
value: number;
|
|
452
|
+
operator: CreateEvalGuardrailConfigEvalsResponse200Operator;
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType = {
|
|
456
|
+
Boolean: "boolean",
|
|
457
|
+
} as const;
|
|
458
|
+
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType =
|
|
459
|
+
ClosedEnum<
|
|
460
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType
|
|
461
|
+
>;
|
|
462
|
+
|
|
463
|
+
export type CreateEvalGuardrailConfigEvalsResponse200Boolean = {
|
|
464
|
+
enabled: boolean;
|
|
465
|
+
type: CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType;
|
|
466
|
+
value: boolean;
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
export type CreateEvalResponseBodyGuardrailConfig =
|
|
470
|
+
| CreateEvalGuardrailConfigEvalsResponse200Boolean
|
|
471
|
+
| CreateEvalGuardrailConfigEvalsResponse200Number;
|
|
472
|
+
|
|
473
|
+
export const CreateEvalResponseBodyType = {
|
|
474
|
+
JsonSchema: "json_schema",
|
|
475
|
+
} as const;
|
|
476
|
+
export type CreateEvalResponseBodyType = ClosedEnum<
|
|
477
|
+
typeof CreateEvalResponseBodyType
|
|
478
|
+
>;
|
|
479
|
+
|
|
480
|
+
export type ResponseBodyJSON = {
|
|
481
|
+
id: string;
|
|
482
|
+
description: string;
|
|
483
|
+
created?: string | undefined;
|
|
484
|
+
updated?: string | undefined;
|
|
485
|
+
guardrailConfig?:
|
|
486
|
+
| CreateEvalGuardrailConfigEvalsResponse200Boolean
|
|
487
|
+
| CreateEvalGuardrailConfigEvalsResponse200Number
|
|
488
|
+
| undefined;
|
|
489
|
+
type: CreateEvalResponseBodyType;
|
|
490
|
+
schema: string;
|
|
491
|
+
key: string;
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
export const CreateEvalGuardrailConfigEvalsResponse200Type = {
|
|
495
|
+
Number: "number",
|
|
496
|
+
} as const;
|
|
497
|
+
export type CreateEvalGuardrailConfigEvalsResponse200Type = ClosedEnum<
|
|
498
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200Type
|
|
499
|
+
>;
|
|
500
|
+
|
|
501
|
+
export const CreateEvalGuardrailConfigEvalsResponseOperator = {
|
|
502
|
+
Eq: "eq",
|
|
503
|
+
Ne: "ne",
|
|
504
|
+
Gt: "gt",
|
|
505
|
+
Gte: "gte",
|
|
506
|
+
Lt: "lt",
|
|
507
|
+
Lte: "lte",
|
|
508
|
+
} as const;
|
|
509
|
+
export type CreateEvalGuardrailConfigEvalsResponseOperator = ClosedEnum<
|
|
510
|
+
typeof CreateEvalGuardrailConfigEvalsResponseOperator
|
|
511
|
+
>;
|
|
512
|
+
|
|
513
|
+
export type CreateEvalGuardrailConfigEvalsResponseNumber = {
|
|
514
|
+
enabled: boolean;
|
|
515
|
+
type: CreateEvalGuardrailConfigEvalsResponse200Type;
|
|
516
|
+
value: number;
|
|
517
|
+
operator: CreateEvalGuardrailConfigEvalsResponseOperator;
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
export const CreateEvalGuardrailConfigEvalsResponseType = {
|
|
521
|
+
Boolean: "boolean",
|
|
522
|
+
} as const;
|
|
523
|
+
export type CreateEvalGuardrailConfigEvalsResponseType = ClosedEnum<
|
|
524
|
+
typeof CreateEvalGuardrailConfigEvalsResponseType
|
|
525
|
+
>;
|
|
526
|
+
|
|
527
|
+
export type CreateEvalGuardrailConfigEvalsResponseBoolean = {
|
|
528
|
+
enabled: boolean;
|
|
529
|
+
type: CreateEvalGuardrailConfigEvalsResponseType;
|
|
530
|
+
value: boolean;
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
export type ResponseBodyGuardrailConfig =
|
|
534
|
+
| CreateEvalGuardrailConfigEvalsResponseBoolean
|
|
535
|
+
| CreateEvalGuardrailConfigEvalsResponseNumber;
|
|
536
|
+
|
|
537
|
+
export const ResponseBodyType = {
|
|
538
|
+
LlmEval: "llm_eval",
|
|
539
|
+
} as const;
|
|
540
|
+
export type ResponseBodyType = ClosedEnum<typeof ResponseBodyType>;
|
|
541
|
+
|
|
542
|
+
export type ResponseBodyLLM = {
|
|
543
|
+
id: string;
|
|
544
|
+
description: string;
|
|
545
|
+
created?: string | undefined;
|
|
546
|
+
updated?: string | undefined;
|
|
547
|
+
guardrailConfig?:
|
|
548
|
+
| CreateEvalGuardrailConfigEvalsResponseBoolean
|
|
549
|
+
| CreateEvalGuardrailConfigEvalsResponseNumber
|
|
550
|
+
| undefined;
|
|
551
|
+
type: ResponseBodyType;
|
|
552
|
+
prompt: string;
|
|
553
|
+
key: string;
|
|
554
|
+
model: string;
|
|
555
|
+
};
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Successfully created an evaluator
|
|
559
|
+
*/
|
|
560
|
+
export type CreateEvalResponseBody =
|
|
561
|
+
| ResponseBodyJSON
|
|
562
|
+
| ResponseBodyPython
|
|
563
|
+
| ResponseBodyLLM
|
|
564
|
+
| ResponseBodyHTTP;
|
|
565
|
+
|
|
566
|
+
/** @internal */
|
|
567
|
+
export const CreateEvalGuardrailConfigEvalsRequestRequestBody42Type$inboundSchema:
|
|
568
|
+
z.ZodNativeEnum<
|
|
569
|
+
typeof CreateEvalGuardrailConfigEvalsRequestRequestBody42Type
|
|
570
|
+
> = z.nativeEnum(CreateEvalGuardrailConfigEvalsRequestRequestBody42Type);
|
|
571
|
+
|
|
572
|
+
/** @internal */
|
|
573
|
+
export const CreateEvalGuardrailConfigEvalsRequestRequestBody42Type$outboundSchema:
|
|
574
|
+
z.ZodNativeEnum<
|
|
575
|
+
typeof CreateEvalGuardrailConfigEvalsRequestRequestBody42Type
|
|
576
|
+
> = CreateEvalGuardrailConfigEvalsRequestRequestBody42Type$inboundSchema;
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* @internal
|
|
580
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
581
|
+
*/
|
|
582
|
+
export namespace CreateEvalGuardrailConfigEvalsRequestRequestBody42Type$ {
|
|
583
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsRequestRequestBody42Type$inboundSchema` instead. */
|
|
584
|
+
export const inboundSchema =
|
|
585
|
+
CreateEvalGuardrailConfigEvalsRequestRequestBody42Type$inboundSchema;
|
|
586
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsRequestRequestBody42Type$outboundSchema` instead. */
|
|
587
|
+
export const outboundSchema =
|
|
588
|
+
CreateEvalGuardrailConfigEvalsRequestRequestBody42Type$outboundSchema;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
/** @internal */
|
|
592
|
+
export const CreateEvalGuardrailConfigEvalsOperator$inboundSchema:
|
|
593
|
+
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsOperator> = z.nativeEnum(
|
|
594
|
+
CreateEvalGuardrailConfigEvalsOperator,
|
|
595
|
+
);
|
|
596
|
+
|
|
597
|
+
/** @internal */
|
|
598
|
+
export const CreateEvalGuardrailConfigEvalsOperator$outboundSchema:
|
|
599
|
+
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsOperator> =
|
|
600
|
+
CreateEvalGuardrailConfigEvalsOperator$inboundSchema;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* @internal
|
|
604
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
605
|
+
*/
|
|
606
|
+
export namespace CreateEvalGuardrailConfigEvalsOperator$ {
|
|
607
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsOperator$inboundSchema` instead. */
|
|
608
|
+
export const inboundSchema =
|
|
609
|
+
CreateEvalGuardrailConfigEvalsOperator$inboundSchema;
|
|
610
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsOperator$outboundSchema` instead. */
|
|
611
|
+
export const outboundSchema =
|
|
612
|
+
CreateEvalGuardrailConfigEvalsOperator$outboundSchema;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
/** @internal */
|
|
616
|
+
export const CreateEvalGuardrailConfigEvalsNumber$inboundSchema: z.ZodType<
|
|
617
|
+
CreateEvalGuardrailConfigEvalsNumber,
|
|
618
|
+
z.ZodTypeDef,
|
|
619
|
+
unknown
|
|
620
|
+
> = z.object({
|
|
621
|
+
enabled: z.boolean(),
|
|
622
|
+
type: CreateEvalGuardrailConfigEvalsRequestRequestBody42Type$inboundSchema,
|
|
623
|
+
value: z.number(),
|
|
624
|
+
operator: CreateEvalGuardrailConfigEvalsOperator$inboundSchema,
|
|
625
|
+
});
|
|
626
|
+
|
|
627
|
+
/** @internal */
|
|
628
|
+
export type CreateEvalGuardrailConfigEvalsNumber$Outbound = {
|
|
629
|
+
enabled: boolean;
|
|
630
|
+
type: string;
|
|
631
|
+
value: number;
|
|
632
|
+
operator: string;
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
/** @internal */
|
|
636
|
+
export const CreateEvalGuardrailConfigEvalsNumber$outboundSchema: z.ZodType<
|
|
637
|
+
CreateEvalGuardrailConfigEvalsNumber$Outbound,
|
|
638
|
+
z.ZodTypeDef,
|
|
639
|
+
CreateEvalGuardrailConfigEvalsNumber
|
|
640
|
+
> = z.object({
|
|
641
|
+
enabled: z.boolean(),
|
|
642
|
+
type: CreateEvalGuardrailConfigEvalsRequestRequestBody42Type$outboundSchema,
|
|
643
|
+
value: z.number(),
|
|
644
|
+
operator: CreateEvalGuardrailConfigEvalsOperator$outboundSchema,
|
|
645
|
+
});
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* @internal
|
|
649
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
650
|
+
*/
|
|
651
|
+
export namespace CreateEvalGuardrailConfigEvalsNumber$ {
|
|
652
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsNumber$inboundSchema` instead. */
|
|
653
|
+
export const inboundSchema =
|
|
654
|
+
CreateEvalGuardrailConfigEvalsNumber$inboundSchema;
|
|
655
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsNumber$outboundSchema` instead. */
|
|
656
|
+
export const outboundSchema =
|
|
657
|
+
CreateEvalGuardrailConfigEvalsNumber$outboundSchema;
|
|
658
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsNumber$Outbound` instead. */
|
|
659
|
+
export type Outbound = CreateEvalGuardrailConfigEvalsNumber$Outbound;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
export function createEvalGuardrailConfigEvalsNumberToJSON(
|
|
663
|
+
createEvalGuardrailConfigEvalsNumber: CreateEvalGuardrailConfigEvalsNumber,
|
|
664
|
+
): string {
|
|
665
|
+
return JSON.stringify(
|
|
666
|
+
CreateEvalGuardrailConfigEvalsNumber$outboundSchema.parse(
|
|
667
|
+
createEvalGuardrailConfigEvalsNumber,
|
|
668
|
+
),
|
|
669
|
+
);
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
export function createEvalGuardrailConfigEvalsNumberFromJSON(
|
|
673
|
+
jsonString: string,
|
|
674
|
+
): SafeParseResult<CreateEvalGuardrailConfigEvalsNumber, SDKValidationError> {
|
|
675
|
+
return safeParse(
|
|
676
|
+
jsonString,
|
|
677
|
+
(x) =>
|
|
678
|
+
CreateEvalGuardrailConfigEvalsNumber$inboundSchema.parse(JSON.parse(x)),
|
|
679
|
+
`Failed to parse 'CreateEvalGuardrailConfigEvalsNumber' from JSON`,
|
|
680
|
+
);
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
/** @internal */
|
|
684
|
+
export const CreateEvalGuardrailConfigEvalsRequestRequestBody4Type$inboundSchema:
|
|
685
|
+
z.ZodNativeEnum<
|
|
686
|
+
typeof CreateEvalGuardrailConfigEvalsRequestRequestBody4Type
|
|
687
|
+
> = z.nativeEnum(CreateEvalGuardrailConfigEvalsRequestRequestBody4Type);
|
|
688
|
+
|
|
689
|
+
/** @internal */
|
|
690
|
+
export const CreateEvalGuardrailConfigEvalsRequestRequestBody4Type$outboundSchema:
|
|
691
|
+
z.ZodNativeEnum<
|
|
692
|
+
typeof CreateEvalGuardrailConfigEvalsRequestRequestBody4Type
|
|
693
|
+
> = CreateEvalGuardrailConfigEvalsRequestRequestBody4Type$inboundSchema;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* @internal
|
|
697
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
698
|
+
*/
|
|
699
|
+
export namespace CreateEvalGuardrailConfigEvalsRequestRequestBody4Type$ {
|
|
700
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsRequestRequestBody4Type$inboundSchema` instead. */
|
|
701
|
+
export const inboundSchema =
|
|
702
|
+
CreateEvalGuardrailConfigEvalsRequestRequestBody4Type$inboundSchema;
|
|
703
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsRequestRequestBody4Type$outboundSchema` instead. */
|
|
704
|
+
export const outboundSchema =
|
|
705
|
+
CreateEvalGuardrailConfigEvalsRequestRequestBody4Type$outboundSchema;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
/** @internal */
|
|
709
|
+
export const CreateEvalGuardrailConfigEvalsBoolean$inboundSchema: z.ZodType<
|
|
710
|
+
CreateEvalGuardrailConfigEvalsBoolean,
|
|
711
|
+
z.ZodTypeDef,
|
|
712
|
+
unknown
|
|
713
|
+
> = z.object({
|
|
714
|
+
enabled: z.boolean(),
|
|
715
|
+
type: CreateEvalGuardrailConfigEvalsRequestRequestBody4Type$inboundSchema,
|
|
716
|
+
value: z.boolean(),
|
|
717
|
+
});
|
|
718
|
+
|
|
719
|
+
/** @internal */
|
|
720
|
+
export type CreateEvalGuardrailConfigEvalsBoolean$Outbound = {
|
|
721
|
+
enabled: boolean;
|
|
722
|
+
type: string;
|
|
723
|
+
value: boolean;
|
|
724
|
+
};
|
|
725
|
+
|
|
726
|
+
/** @internal */
|
|
727
|
+
export const CreateEvalGuardrailConfigEvalsBoolean$outboundSchema: z.ZodType<
|
|
728
|
+
CreateEvalGuardrailConfigEvalsBoolean$Outbound,
|
|
729
|
+
z.ZodTypeDef,
|
|
730
|
+
CreateEvalGuardrailConfigEvalsBoolean
|
|
731
|
+
> = z.object({
|
|
732
|
+
enabled: z.boolean(),
|
|
733
|
+
type: CreateEvalGuardrailConfigEvalsRequestRequestBody4Type$outboundSchema,
|
|
734
|
+
value: z.boolean(),
|
|
735
|
+
});
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* @internal
|
|
739
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
740
|
+
*/
|
|
741
|
+
export namespace CreateEvalGuardrailConfigEvalsBoolean$ {
|
|
742
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsBoolean$inboundSchema` instead. */
|
|
743
|
+
export const inboundSchema =
|
|
744
|
+
CreateEvalGuardrailConfigEvalsBoolean$inboundSchema;
|
|
745
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsBoolean$outboundSchema` instead. */
|
|
746
|
+
export const outboundSchema =
|
|
747
|
+
CreateEvalGuardrailConfigEvalsBoolean$outboundSchema;
|
|
748
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsBoolean$Outbound` instead. */
|
|
749
|
+
export type Outbound = CreateEvalGuardrailConfigEvalsBoolean$Outbound;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
export function createEvalGuardrailConfigEvalsBooleanToJSON(
|
|
753
|
+
createEvalGuardrailConfigEvalsBoolean: CreateEvalGuardrailConfigEvalsBoolean,
|
|
754
|
+
): string {
|
|
755
|
+
return JSON.stringify(
|
|
756
|
+
CreateEvalGuardrailConfigEvalsBoolean$outboundSchema.parse(
|
|
757
|
+
createEvalGuardrailConfigEvalsBoolean,
|
|
758
|
+
),
|
|
759
|
+
);
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
export function createEvalGuardrailConfigEvalsBooleanFromJSON(
|
|
763
|
+
jsonString: string,
|
|
764
|
+
): SafeParseResult<CreateEvalGuardrailConfigEvalsBoolean, SDKValidationError> {
|
|
765
|
+
return safeParse(
|
|
766
|
+
jsonString,
|
|
767
|
+
(x) =>
|
|
768
|
+
CreateEvalGuardrailConfigEvalsBoolean$inboundSchema.parse(JSON.parse(x)),
|
|
769
|
+
`Failed to parse 'CreateEvalGuardrailConfigEvalsBoolean' from JSON`,
|
|
770
|
+
);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/** @internal */
|
|
774
|
+
export const CreateEvalRequestBodyEvalsGuardrailConfig$inboundSchema: z.ZodType<
|
|
775
|
+
CreateEvalRequestBodyEvalsGuardrailConfig,
|
|
776
|
+
z.ZodTypeDef,
|
|
777
|
+
unknown
|
|
778
|
+
> = z.union([
|
|
779
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsBoolean$inboundSchema),
|
|
780
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsNumber$inboundSchema),
|
|
781
|
+
]);
|
|
782
|
+
|
|
783
|
+
/** @internal */
|
|
784
|
+
export type CreateEvalRequestBodyEvalsGuardrailConfig$Outbound =
|
|
785
|
+
| CreateEvalGuardrailConfigEvalsBoolean$Outbound
|
|
786
|
+
| CreateEvalGuardrailConfigEvalsNumber$Outbound;
|
|
787
|
+
|
|
788
|
+
/** @internal */
|
|
789
|
+
export const CreateEvalRequestBodyEvalsGuardrailConfig$outboundSchema:
|
|
790
|
+
z.ZodType<
|
|
791
|
+
CreateEvalRequestBodyEvalsGuardrailConfig$Outbound,
|
|
792
|
+
z.ZodTypeDef,
|
|
793
|
+
CreateEvalRequestBodyEvalsGuardrailConfig
|
|
794
|
+
> = z.union([
|
|
795
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsBoolean$outboundSchema),
|
|
796
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsNumber$outboundSchema),
|
|
797
|
+
]);
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* @internal
|
|
801
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
802
|
+
*/
|
|
803
|
+
export namespace CreateEvalRequestBodyEvalsGuardrailConfig$ {
|
|
804
|
+
/** @deprecated use `CreateEvalRequestBodyEvalsGuardrailConfig$inboundSchema` instead. */
|
|
805
|
+
export const inboundSchema =
|
|
806
|
+
CreateEvalRequestBodyEvalsGuardrailConfig$inboundSchema;
|
|
807
|
+
/** @deprecated use `CreateEvalRequestBodyEvalsGuardrailConfig$outboundSchema` instead. */
|
|
808
|
+
export const outboundSchema =
|
|
809
|
+
CreateEvalRequestBodyEvalsGuardrailConfig$outboundSchema;
|
|
810
|
+
/** @deprecated use `CreateEvalRequestBodyEvalsGuardrailConfig$Outbound` instead. */
|
|
811
|
+
export type Outbound = CreateEvalRequestBodyEvalsGuardrailConfig$Outbound;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
export function createEvalRequestBodyEvalsGuardrailConfigToJSON(
|
|
815
|
+
createEvalRequestBodyEvalsGuardrailConfig:
|
|
816
|
+
CreateEvalRequestBodyEvalsGuardrailConfig,
|
|
817
|
+
): string {
|
|
818
|
+
return JSON.stringify(
|
|
819
|
+
CreateEvalRequestBodyEvalsGuardrailConfig$outboundSchema.parse(
|
|
820
|
+
createEvalRequestBodyEvalsGuardrailConfig,
|
|
821
|
+
),
|
|
822
|
+
);
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
export function createEvalRequestBodyEvalsGuardrailConfigFromJSON(
|
|
826
|
+
jsonString: string,
|
|
827
|
+
): SafeParseResult<
|
|
828
|
+
CreateEvalRequestBodyEvalsGuardrailConfig,
|
|
829
|
+
SDKValidationError
|
|
830
|
+
> {
|
|
831
|
+
return safeParse(
|
|
832
|
+
jsonString,
|
|
833
|
+
(x) =>
|
|
834
|
+
CreateEvalRequestBodyEvalsGuardrailConfig$inboundSchema.parse(
|
|
835
|
+
JSON.parse(x),
|
|
836
|
+
),
|
|
837
|
+
`Failed to parse 'CreateEvalRequestBodyEvalsGuardrailConfig' from JSON`,
|
|
838
|
+
);
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
/** @internal */
|
|
842
|
+
export const CreateEvalRequestBodyEvalsRequestType$inboundSchema:
|
|
843
|
+
z.ZodNativeEnum<typeof CreateEvalRequestBodyEvalsRequestType> = z.nativeEnum(
|
|
844
|
+
CreateEvalRequestBodyEvalsRequestType,
|
|
845
|
+
);
|
|
846
|
+
|
|
847
|
+
/** @internal */
|
|
848
|
+
export const CreateEvalRequestBodyEvalsRequestType$outboundSchema:
|
|
849
|
+
z.ZodNativeEnum<typeof CreateEvalRequestBodyEvalsRequestType> =
|
|
850
|
+
CreateEvalRequestBodyEvalsRequestType$inboundSchema;
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* @internal
|
|
854
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
855
|
+
*/
|
|
856
|
+
export namespace CreateEvalRequestBodyEvalsRequestType$ {
|
|
857
|
+
/** @deprecated use `CreateEvalRequestBodyEvalsRequestType$inboundSchema` instead. */
|
|
858
|
+
export const inboundSchema =
|
|
859
|
+
CreateEvalRequestBodyEvalsRequestType$inboundSchema;
|
|
860
|
+
/** @deprecated use `CreateEvalRequestBodyEvalsRequestType$outboundSchema` instead. */
|
|
861
|
+
export const outboundSchema =
|
|
862
|
+
CreateEvalRequestBodyEvalsRequestType$outboundSchema;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
/** @internal */
|
|
866
|
+
export const Python$inboundSchema: z.ZodType<Python, z.ZodTypeDef, unknown> = z
|
|
867
|
+
.object({
|
|
868
|
+
guardrail_config: z.union([
|
|
869
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsBoolean$inboundSchema),
|
|
870
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsNumber$inboundSchema),
|
|
871
|
+
]).optional(),
|
|
872
|
+
code: z.string(),
|
|
873
|
+
type: CreateEvalRequestBodyEvalsRequestType$inboundSchema,
|
|
874
|
+
path: z.string(),
|
|
875
|
+
description: z.string().default(""),
|
|
876
|
+
key: z.string(),
|
|
877
|
+
}).transform((v) => {
|
|
878
|
+
return remap$(v, {
|
|
879
|
+
"guardrail_config": "guardrailConfig",
|
|
880
|
+
});
|
|
881
|
+
});
|
|
882
|
+
|
|
883
|
+
/** @internal */
|
|
884
|
+
export type Python$Outbound = {
|
|
885
|
+
guardrail_config?:
|
|
886
|
+
| CreateEvalGuardrailConfigEvalsBoolean$Outbound
|
|
887
|
+
| CreateEvalGuardrailConfigEvalsNumber$Outbound
|
|
888
|
+
| undefined;
|
|
889
|
+
code: string;
|
|
890
|
+
type: string;
|
|
891
|
+
path: string;
|
|
892
|
+
description: string;
|
|
893
|
+
key: string;
|
|
894
|
+
};
|
|
895
|
+
|
|
896
|
+
/** @internal */
|
|
897
|
+
export const Python$outboundSchema: z.ZodType<
|
|
898
|
+
Python$Outbound,
|
|
899
|
+
z.ZodTypeDef,
|
|
900
|
+
Python
|
|
901
|
+
> = z.object({
|
|
902
|
+
guardrailConfig: z.union([
|
|
903
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsBoolean$outboundSchema),
|
|
904
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsNumber$outboundSchema),
|
|
905
|
+
]).optional(),
|
|
906
|
+
code: z.string(),
|
|
907
|
+
type: CreateEvalRequestBodyEvalsRequestType$outboundSchema,
|
|
908
|
+
path: z.string(),
|
|
909
|
+
description: z.string().default(""),
|
|
910
|
+
key: z.string(),
|
|
911
|
+
}).transform((v) => {
|
|
912
|
+
return remap$(v, {
|
|
913
|
+
guardrailConfig: "guardrail_config",
|
|
914
|
+
});
|
|
915
|
+
});
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* @internal
|
|
919
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
920
|
+
*/
|
|
921
|
+
export namespace Python$ {
|
|
922
|
+
/** @deprecated use `Python$inboundSchema` instead. */
|
|
923
|
+
export const inboundSchema = Python$inboundSchema;
|
|
924
|
+
/** @deprecated use `Python$outboundSchema` instead. */
|
|
925
|
+
export const outboundSchema = Python$outboundSchema;
|
|
926
|
+
/** @deprecated use `Python$Outbound` instead. */
|
|
927
|
+
export type Outbound = Python$Outbound;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
export function pythonToJSON(python: Python): string {
|
|
931
|
+
return JSON.stringify(Python$outboundSchema.parse(python));
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
export function pythonFromJSON(
|
|
935
|
+
jsonString: string,
|
|
936
|
+
): SafeParseResult<Python, SDKValidationError> {
|
|
937
|
+
return safeParse(
|
|
938
|
+
jsonString,
|
|
939
|
+
(x) => Python$inboundSchema.parse(JSON.parse(x)),
|
|
940
|
+
`Failed to parse 'Python' from JSON`,
|
|
941
|
+
);
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
/** @internal */
|
|
945
|
+
export const CreateEvalGuardrailConfigEvalsRequestRequestBody3Type$inboundSchema:
|
|
946
|
+
z.ZodNativeEnum<
|
|
947
|
+
typeof CreateEvalGuardrailConfigEvalsRequestRequestBody3Type
|
|
948
|
+
> = z.nativeEnum(CreateEvalGuardrailConfigEvalsRequestRequestBody3Type);
|
|
949
|
+
|
|
950
|
+
/** @internal */
|
|
951
|
+
export const CreateEvalGuardrailConfigEvalsRequestRequestBody3Type$outboundSchema:
|
|
952
|
+
z.ZodNativeEnum<
|
|
953
|
+
typeof CreateEvalGuardrailConfigEvalsRequestRequestBody3Type
|
|
954
|
+
> = CreateEvalGuardrailConfigEvalsRequestRequestBody3Type$inboundSchema;
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* @internal
|
|
958
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
959
|
+
*/
|
|
960
|
+
export namespace CreateEvalGuardrailConfigEvalsRequestRequestBody3Type$ {
|
|
961
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsRequestRequestBody3Type$inboundSchema` instead. */
|
|
962
|
+
export const inboundSchema =
|
|
963
|
+
CreateEvalGuardrailConfigEvalsRequestRequestBody3Type$inboundSchema;
|
|
964
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsRequestRequestBody3Type$outboundSchema` instead. */
|
|
965
|
+
export const outboundSchema =
|
|
966
|
+
CreateEvalGuardrailConfigEvalsRequestRequestBody3Type$outboundSchema;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
/** @internal */
|
|
970
|
+
export const CreateEvalGuardrailConfigOperator$inboundSchema: z.ZodNativeEnum<
|
|
971
|
+
typeof CreateEvalGuardrailConfigOperator
|
|
972
|
+
> = z.nativeEnum(CreateEvalGuardrailConfigOperator);
|
|
973
|
+
|
|
974
|
+
/** @internal */
|
|
975
|
+
export const CreateEvalGuardrailConfigOperator$outboundSchema: z.ZodNativeEnum<
|
|
976
|
+
typeof CreateEvalGuardrailConfigOperator
|
|
977
|
+
> = CreateEvalGuardrailConfigOperator$inboundSchema;
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* @internal
|
|
981
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
982
|
+
*/
|
|
983
|
+
export namespace CreateEvalGuardrailConfigOperator$ {
|
|
984
|
+
/** @deprecated use `CreateEvalGuardrailConfigOperator$inboundSchema` instead. */
|
|
985
|
+
export const inboundSchema = CreateEvalGuardrailConfigOperator$inboundSchema;
|
|
986
|
+
/** @deprecated use `CreateEvalGuardrailConfigOperator$outboundSchema` instead. */
|
|
987
|
+
export const outboundSchema =
|
|
988
|
+
CreateEvalGuardrailConfigOperator$outboundSchema;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
/** @internal */
|
|
992
|
+
export const CreateEvalGuardrailConfigNumber$inboundSchema: z.ZodType<
|
|
993
|
+
CreateEvalGuardrailConfigNumber,
|
|
994
|
+
z.ZodTypeDef,
|
|
995
|
+
unknown
|
|
996
|
+
> = z.object({
|
|
997
|
+
enabled: z.boolean(),
|
|
998
|
+
type: CreateEvalGuardrailConfigEvalsRequestRequestBody3Type$inboundSchema,
|
|
999
|
+
value: z.number(),
|
|
1000
|
+
operator: CreateEvalGuardrailConfigOperator$inboundSchema,
|
|
1001
|
+
});
|
|
1002
|
+
|
|
1003
|
+
/** @internal */
|
|
1004
|
+
export type CreateEvalGuardrailConfigNumber$Outbound = {
|
|
1005
|
+
enabled: boolean;
|
|
1006
|
+
type: string;
|
|
1007
|
+
value: number;
|
|
1008
|
+
operator: string;
|
|
1009
|
+
};
|
|
1010
|
+
|
|
1011
|
+
/** @internal */
|
|
1012
|
+
export const CreateEvalGuardrailConfigNumber$outboundSchema: z.ZodType<
|
|
1013
|
+
CreateEvalGuardrailConfigNumber$Outbound,
|
|
1014
|
+
z.ZodTypeDef,
|
|
1015
|
+
CreateEvalGuardrailConfigNumber
|
|
1016
|
+
> = z.object({
|
|
1017
|
+
enabled: z.boolean(),
|
|
1018
|
+
type: CreateEvalGuardrailConfigEvalsRequestRequestBody3Type$outboundSchema,
|
|
1019
|
+
value: z.number(),
|
|
1020
|
+
operator: CreateEvalGuardrailConfigOperator$outboundSchema,
|
|
1021
|
+
});
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* @internal
|
|
1025
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1026
|
+
*/
|
|
1027
|
+
export namespace CreateEvalGuardrailConfigNumber$ {
|
|
1028
|
+
/** @deprecated use `CreateEvalGuardrailConfigNumber$inboundSchema` instead. */
|
|
1029
|
+
export const inboundSchema = CreateEvalGuardrailConfigNumber$inboundSchema;
|
|
1030
|
+
/** @deprecated use `CreateEvalGuardrailConfigNumber$outboundSchema` instead. */
|
|
1031
|
+
export const outboundSchema = CreateEvalGuardrailConfigNumber$outboundSchema;
|
|
1032
|
+
/** @deprecated use `CreateEvalGuardrailConfigNumber$Outbound` instead. */
|
|
1033
|
+
export type Outbound = CreateEvalGuardrailConfigNumber$Outbound;
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
export function createEvalGuardrailConfigNumberToJSON(
|
|
1037
|
+
createEvalGuardrailConfigNumber: CreateEvalGuardrailConfigNumber,
|
|
1038
|
+
): string {
|
|
1039
|
+
return JSON.stringify(
|
|
1040
|
+
CreateEvalGuardrailConfigNumber$outboundSchema.parse(
|
|
1041
|
+
createEvalGuardrailConfigNumber,
|
|
1042
|
+
),
|
|
1043
|
+
);
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
export function createEvalGuardrailConfigNumberFromJSON(
|
|
1047
|
+
jsonString: string,
|
|
1048
|
+
): SafeParseResult<CreateEvalGuardrailConfigNumber, SDKValidationError> {
|
|
1049
|
+
return safeParse(
|
|
1050
|
+
jsonString,
|
|
1051
|
+
(x) => CreateEvalGuardrailConfigNumber$inboundSchema.parse(JSON.parse(x)),
|
|
1052
|
+
`Failed to parse 'CreateEvalGuardrailConfigNumber' from JSON`,
|
|
1053
|
+
);
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
/** @internal */
|
|
1057
|
+
export const CreateEvalGuardrailConfigEvalsRequestRequestBodyType$inboundSchema:
|
|
1058
|
+
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsRequestRequestBodyType> =
|
|
1059
|
+
z.nativeEnum(CreateEvalGuardrailConfigEvalsRequestRequestBodyType);
|
|
1060
|
+
|
|
1061
|
+
/** @internal */
|
|
1062
|
+
export const CreateEvalGuardrailConfigEvalsRequestRequestBodyType$outboundSchema:
|
|
1063
|
+
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsRequestRequestBodyType> =
|
|
1064
|
+
CreateEvalGuardrailConfigEvalsRequestRequestBodyType$inboundSchema;
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* @internal
|
|
1068
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1069
|
+
*/
|
|
1070
|
+
export namespace CreateEvalGuardrailConfigEvalsRequestRequestBodyType$ {
|
|
1071
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsRequestRequestBodyType$inboundSchema` instead. */
|
|
1072
|
+
export const inboundSchema =
|
|
1073
|
+
CreateEvalGuardrailConfigEvalsRequestRequestBodyType$inboundSchema;
|
|
1074
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsRequestRequestBodyType$outboundSchema` instead. */
|
|
1075
|
+
export const outboundSchema =
|
|
1076
|
+
CreateEvalGuardrailConfigEvalsRequestRequestBodyType$outboundSchema;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
/** @internal */
|
|
1080
|
+
export const CreateEvalGuardrailConfigBoolean$inboundSchema: z.ZodType<
|
|
1081
|
+
CreateEvalGuardrailConfigBoolean,
|
|
1082
|
+
z.ZodTypeDef,
|
|
1083
|
+
unknown
|
|
1084
|
+
> = z.object({
|
|
1085
|
+
enabled: z.boolean(),
|
|
1086
|
+
type: CreateEvalGuardrailConfigEvalsRequestRequestBodyType$inboundSchema,
|
|
1087
|
+
value: z.boolean(),
|
|
1088
|
+
});
|
|
1089
|
+
|
|
1090
|
+
/** @internal */
|
|
1091
|
+
export type CreateEvalGuardrailConfigBoolean$Outbound = {
|
|
1092
|
+
enabled: boolean;
|
|
1093
|
+
type: string;
|
|
1094
|
+
value: boolean;
|
|
1095
|
+
};
|
|
1096
|
+
|
|
1097
|
+
/** @internal */
|
|
1098
|
+
export const CreateEvalGuardrailConfigBoolean$outboundSchema: z.ZodType<
|
|
1099
|
+
CreateEvalGuardrailConfigBoolean$Outbound,
|
|
1100
|
+
z.ZodTypeDef,
|
|
1101
|
+
CreateEvalGuardrailConfigBoolean
|
|
1102
|
+
> = z.object({
|
|
1103
|
+
enabled: z.boolean(),
|
|
1104
|
+
type: CreateEvalGuardrailConfigEvalsRequestRequestBodyType$outboundSchema,
|
|
1105
|
+
value: z.boolean(),
|
|
1106
|
+
});
|
|
1107
|
+
|
|
1108
|
+
/**
|
|
1109
|
+
* @internal
|
|
1110
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1111
|
+
*/
|
|
1112
|
+
export namespace CreateEvalGuardrailConfigBoolean$ {
|
|
1113
|
+
/** @deprecated use `CreateEvalGuardrailConfigBoolean$inboundSchema` instead. */
|
|
1114
|
+
export const inboundSchema = CreateEvalGuardrailConfigBoolean$inboundSchema;
|
|
1115
|
+
/** @deprecated use `CreateEvalGuardrailConfigBoolean$outboundSchema` instead. */
|
|
1116
|
+
export const outboundSchema = CreateEvalGuardrailConfigBoolean$outboundSchema;
|
|
1117
|
+
/** @deprecated use `CreateEvalGuardrailConfigBoolean$Outbound` instead. */
|
|
1118
|
+
export type Outbound = CreateEvalGuardrailConfigBoolean$Outbound;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
export function createEvalGuardrailConfigBooleanToJSON(
|
|
1122
|
+
createEvalGuardrailConfigBoolean: CreateEvalGuardrailConfigBoolean,
|
|
1123
|
+
): string {
|
|
1124
|
+
return JSON.stringify(
|
|
1125
|
+
CreateEvalGuardrailConfigBoolean$outboundSchema.parse(
|
|
1126
|
+
createEvalGuardrailConfigBoolean,
|
|
1127
|
+
),
|
|
1128
|
+
);
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
export function createEvalGuardrailConfigBooleanFromJSON(
|
|
1132
|
+
jsonString: string,
|
|
1133
|
+
): SafeParseResult<CreateEvalGuardrailConfigBoolean, SDKValidationError> {
|
|
1134
|
+
return safeParse(
|
|
1135
|
+
jsonString,
|
|
1136
|
+
(x) => CreateEvalGuardrailConfigBoolean$inboundSchema.parse(JSON.parse(x)),
|
|
1137
|
+
`Failed to parse 'CreateEvalGuardrailConfigBoolean' from JSON`,
|
|
1138
|
+
);
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
/** @internal */
|
|
1142
|
+
export const CreateEvalRequestBodyGuardrailConfig$inboundSchema: z.ZodType<
|
|
1143
|
+
CreateEvalRequestBodyGuardrailConfig,
|
|
1144
|
+
z.ZodTypeDef,
|
|
1145
|
+
unknown
|
|
1146
|
+
> = z.union([
|
|
1147
|
+
z.lazy(() => CreateEvalGuardrailConfigBoolean$inboundSchema),
|
|
1148
|
+
z.lazy(() => CreateEvalGuardrailConfigNumber$inboundSchema),
|
|
1149
|
+
]);
|
|
1150
|
+
|
|
1151
|
+
/** @internal */
|
|
1152
|
+
export type CreateEvalRequestBodyGuardrailConfig$Outbound =
|
|
1153
|
+
| CreateEvalGuardrailConfigBoolean$Outbound
|
|
1154
|
+
| CreateEvalGuardrailConfigNumber$Outbound;
|
|
1155
|
+
|
|
1156
|
+
/** @internal */
|
|
1157
|
+
export const CreateEvalRequestBodyGuardrailConfig$outboundSchema: z.ZodType<
|
|
1158
|
+
CreateEvalRequestBodyGuardrailConfig$Outbound,
|
|
1159
|
+
z.ZodTypeDef,
|
|
1160
|
+
CreateEvalRequestBodyGuardrailConfig
|
|
1161
|
+
> = z.union([
|
|
1162
|
+
z.lazy(() => CreateEvalGuardrailConfigBoolean$outboundSchema),
|
|
1163
|
+
z.lazy(() => CreateEvalGuardrailConfigNumber$outboundSchema),
|
|
1164
|
+
]);
|
|
1165
|
+
|
|
1166
|
+
/**
|
|
1167
|
+
* @internal
|
|
1168
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1169
|
+
*/
|
|
1170
|
+
export namespace CreateEvalRequestBodyGuardrailConfig$ {
|
|
1171
|
+
/** @deprecated use `CreateEvalRequestBodyGuardrailConfig$inboundSchema` instead. */
|
|
1172
|
+
export const inboundSchema =
|
|
1173
|
+
CreateEvalRequestBodyGuardrailConfig$inboundSchema;
|
|
1174
|
+
/** @deprecated use `CreateEvalRequestBodyGuardrailConfig$outboundSchema` instead. */
|
|
1175
|
+
export const outboundSchema =
|
|
1176
|
+
CreateEvalRequestBodyGuardrailConfig$outboundSchema;
|
|
1177
|
+
/** @deprecated use `CreateEvalRequestBodyGuardrailConfig$Outbound` instead. */
|
|
1178
|
+
export type Outbound = CreateEvalRequestBodyGuardrailConfig$Outbound;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
export function createEvalRequestBodyGuardrailConfigToJSON(
|
|
1182
|
+
createEvalRequestBodyGuardrailConfig: CreateEvalRequestBodyGuardrailConfig,
|
|
1183
|
+
): string {
|
|
1184
|
+
return JSON.stringify(
|
|
1185
|
+
CreateEvalRequestBodyGuardrailConfig$outboundSchema.parse(
|
|
1186
|
+
createEvalRequestBodyGuardrailConfig,
|
|
1187
|
+
),
|
|
1188
|
+
);
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
export function createEvalRequestBodyGuardrailConfigFromJSON(
|
|
1192
|
+
jsonString: string,
|
|
1193
|
+
): SafeParseResult<CreateEvalRequestBodyGuardrailConfig, SDKValidationError> {
|
|
1194
|
+
return safeParse(
|
|
1195
|
+
jsonString,
|
|
1196
|
+
(x) =>
|
|
1197
|
+
CreateEvalRequestBodyGuardrailConfig$inboundSchema.parse(JSON.parse(x)),
|
|
1198
|
+
`Failed to parse 'CreateEvalRequestBodyGuardrailConfig' from JSON`,
|
|
1199
|
+
);
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
/** @internal */
|
|
1203
|
+
export const CreateEvalRequestBodyEvalsType$inboundSchema: z.ZodNativeEnum<
|
|
1204
|
+
typeof CreateEvalRequestBodyEvalsType
|
|
1205
|
+
> = z.nativeEnum(CreateEvalRequestBodyEvalsType);
|
|
1206
|
+
|
|
1207
|
+
/** @internal */
|
|
1208
|
+
export const CreateEvalRequestBodyEvalsType$outboundSchema: z.ZodNativeEnum<
|
|
1209
|
+
typeof CreateEvalRequestBodyEvalsType
|
|
1210
|
+
> = CreateEvalRequestBodyEvalsType$inboundSchema;
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* @internal
|
|
1214
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1215
|
+
*/
|
|
1216
|
+
export namespace CreateEvalRequestBodyEvalsType$ {
|
|
1217
|
+
/** @deprecated use `CreateEvalRequestBodyEvalsType$inboundSchema` instead. */
|
|
1218
|
+
export const inboundSchema = CreateEvalRequestBodyEvalsType$inboundSchema;
|
|
1219
|
+
/** @deprecated use `CreateEvalRequestBodyEvalsType$outboundSchema` instead. */
|
|
1220
|
+
export const outboundSchema = CreateEvalRequestBodyEvalsType$outboundSchema;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
/** @internal */
|
|
1224
|
+
export const Method$inboundSchema: z.ZodNativeEnum<typeof Method> = z
|
|
1225
|
+
.nativeEnum(Method);
|
|
1226
|
+
|
|
1227
|
+
/** @internal */
|
|
1228
|
+
export const Method$outboundSchema: z.ZodNativeEnum<typeof Method> =
|
|
1229
|
+
Method$inboundSchema;
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* @internal
|
|
1233
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1234
|
+
*/
|
|
1235
|
+
export namespace Method$ {
|
|
1236
|
+
/** @deprecated use `Method$inboundSchema` instead. */
|
|
1237
|
+
export const inboundSchema = Method$inboundSchema;
|
|
1238
|
+
/** @deprecated use `Method$outboundSchema` instead. */
|
|
1239
|
+
export const outboundSchema = Method$outboundSchema;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
/** @internal */
|
|
1243
|
+
export const Http$inboundSchema: z.ZodType<Http, z.ZodTypeDef, unknown> = z
|
|
1244
|
+
.object({
|
|
1245
|
+
guardrail_config: z.union([
|
|
1246
|
+
z.lazy(() => CreateEvalGuardrailConfigBoolean$inboundSchema),
|
|
1247
|
+
z.lazy(() => CreateEvalGuardrailConfigNumber$inboundSchema),
|
|
1248
|
+
]).optional(),
|
|
1249
|
+
type: CreateEvalRequestBodyEvalsType$inboundSchema,
|
|
1250
|
+
url: z.string(),
|
|
1251
|
+
method: Method$inboundSchema,
|
|
1252
|
+
headers: z.record(z.string()),
|
|
1253
|
+
payload: z.record(z.any()),
|
|
1254
|
+
path: z.string(),
|
|
1255
|
+
description: z.string().default(""),
|
|
1256
|
+
key: z.string(),
|
|
1257
|
+
}).transform((v) => {
|
|
1258
|
+
return remap$(v, {
|
|
1259
|
+
"guardrail_config": "guardrailConfig",
|
|
1260
|
+
});
|
|
1261
|
+
});
|
|
1262
|
+
|
|
1263
|
+
/** @internal */
|
|
1264
|
+
export type Http$Outbound = {
|
|
1265
|
+
guardrail_config?:
|
|
1266
|
+
| CreateEvalGuardrailConfigBoolean$Outbound
|
|
1267
|
+
| CreateEvalGuardrailConfigNumber$Outbound
|
|
1268
|
+
| undefined;
|
|
1269
|
+
type: string;
|
|
1270
|
+
url: string;
|
|
1271
|
+
method: string;
|
|
1272
|
+
headers: { [k: string]: string };
|
|
1273
|
+
payload: { [k: string]: any };
|
|
1274
|
+
path: string;
|
|
1275
|
+
description: string;
|
|
1276
|
+
key: string;
|
|
1277
|
+
};
|
|
1278
|
+
|
|
1279
|
+
/** @internal */
|
|
1280
|
+
export const Http$outboundSchema: z.ZodType<Http$Outbound, z.ZodTypeDef, Http> =
|
|
1281
|
+
z.object({
|
|
1282
|
+
guardrailConfig: z.union([
|
|
1283
|
+
z.lazy(() => CreateEvalGuardrailConfigBoolean$outboundSchema),
|
|
1284
|
+
z.lazy(() => CreateEvalGuardrailConfigNumber$outboundSchema),
|
|
1285
|
+
]).optional(),
|
|
1286
|
+
type: CreateEvalRequestBodyEvalsType$outboundSchema,
|
|
1287
|
+
url: z.string(),
|
|
1288
|
+
method: Method$outboundSchema,
|
|
1289
|
+
headers: z.record(z.string()),
|
|
1290
|
+
payload: z.record(z.any()),
|
|
1291
|
+
path: z.string(),
|
|
1292
|
+
description: z.string().default(""),
|
|
1293
|
+
key: z.string(),
|
|
1294
|
+
}).transform((v) => {
|
|
1295
|
+
return remap$(v, {
|
|
1296
|
+
guardrailConfig: "guardrail_config",
|
|
1297
|
+
});
|
|
1298
|
+
});
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* @internal
|
|
1302
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1303
|
+
*/
|
|
1304
|
+
export namespace Http$ {
|
|
1305
|
+
/** @deprecated use `Http$inboundSchema` instead. */
|
|
1306
|
+
export const inboundSchema = Http$inboundSchema;
|
|
1307
|
+
/** @deprecated use `Http$outboundSchema` instead. */
|
|
1308
|
+
export const outboundSchema = Http$outboundSchema;
|
|
1309
|
+
/** @deprecated use `Http$Outbound` instead. */
|
|
1310
|
+
export type Outbound = Http$Outbound;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
export function httpToJSON(http: Http): string {
|
|
1314
|
+
return JSON.stringify(Http$outboundSchema.parse(http));
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
export function httpFromJSON(
|
|
1318
|
+
jsonString: string,
|
|
1319
|
+
): SafeParseResult<Http, SDKValidationError> {
|
|
1320
|
+
return safeParse(
|
|
1321
|
+
jsonString,
|
|
1322
|
+
(x) => Http$inboundSchema.parse(JSON.parse(x)),
|
|
1323
|
+
`Failed to parse 'Http' from JSON`,
|
|
1324
|
+
);
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
/** @internal */
|
|
1328
|
+
export const CreateEvalGuardrailConfigEvalsRequestType$inboundSchema:
|
|
1329
|
+
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsRequestType> = z
|
|
1330
|
+
.nativeEnum(CreateEvalGuardrailConfigEvalsRequestType);
|
|
1331
|
+
|
|
1332
|
+
/** @internal */
|
|
1333
|
+
export const CreateEvalGuardrailConfigEvalsRequestType$outboundSchema:
|
|
1334
|
+
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsRequestType> =
|
|
1335
|
+
CreateEvalGuardrailConfigEvalsRequestType$inboundSchema;
|
|
1336
|
+
|
|
1337
|
+
/**
|
|
1338
|
+
* @internal
|
|
1339
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1340
|
+
*/
|
|
1341
|
+
export namespace CreateEvalGuardrailConfigEvalsRequestType$ {
|
|
1342
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsRequestType$inboundSchema` instead. */
|
|
1343
|
+
export const inboundSchema =
|
|
1344
|
+
CreateEvalGuardrailConfigEvalsRequestType$inboundSchema;
|
|
1345
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsRequestType$outboundSchema` instead. */
|
|
1346
|
+
export const outboundSchema =
|
|
1347
|
+
CreateEvalGuardrailConfigEvalsRequestType$outboundSchema;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
/** @internal */
|
|
1351
|
+
export const GuardrailConfigOperator$inboundSchema: z.ZodNativeEnum<
|
|
1352
|
+
typeof GuardrailConfigOperator
|
|
1353
|
+
> = z.nativeEnum(GuardrailConfigOperator);
|
|
1354
|
+
|
|
1355
|
+
/** @internal */
|
|
1356
|
+
export const GuardrailConfigOperator$outboundSchema: z.ZodNativeEnum<
|
|
1357
|
+
typeof GuardrailConfigOperator
|
|
1358
|
+
> = GuardrailConfigOperator$inboundSchema;
|
|
1359
|
+
|
|
1360
|
+
/**
|
|
1361
|
+
* @internal
|
|
1362
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1363
|
+
*/
|
|
1364
|
+
export namespace GuardrailConfigOperator$ {
|
|
1365
|
+
/** @deprecated use `GuardrailConfigOperator$inboundSchema` instead. */
|
|
1366
|
+
export const inboundSchema = GuardrailConfigOperator$inboundSchema;
|
|
1367
|
+
/** @deprecated use `GuardrailConfigOperator$outboundSchema` instead. */
|
|
1368
|
+
export const outboundSchema = GuardrailConfigOperator$outboundSchema;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
/** @internal */
|
|
1372
|
+
export const GuardrailConfigNumber$inboundSchema: z.ZodType<
|
|
1373
|
+
GuardrailConfigNumber,
|
|
1374
|
+
z.ZodTypeDef,
|
|
1375
|
+
unknown
|
|
1376
|
+
> = z.object({
|
|
1377
|
+
enabled: z.boolean(),
|
|
1378
|
+
type: CreateEvalGuardrailConfigEvalsRequestType$inboundSchema,
|
|
1379
|
+
value: z.number(),
|
|
1380
|
+
operator: GuardrailConfigOperator$inboundSchema,
|
|
1381
|
+
});
|
|
1382
|
+
|
|
1383
|
+
/** @internal */
|
|
1384
|
+
export type GuardrailConfigNumber$Outbound = {
|
|
1385
|
+
enabled: boolean;
|
|
1386
|
+
type: string;
|
|
1387
|
+
value: number;
|
|
1388
|
+
operator: string;
|
|
1389
|
+
};
|
|
1390
|
+
|
|
1391
|
+
/** @internal */
|
|
1392
|
+
export const GuardrailConfigNumber$outboundSchema: z.ZodType<
|
|
1393
|
+
GuardrailConfigNumber$Outbound,
|
|
1394
|
+
z.ZodTypeDef,
|
|
1395
|
+
GuardrailConfigNumber
|
|
1396
|
+
> = z.object({
|
|
1397
|
+
enabled: z.boolean(),
|
|
1398
|
+
type: CreateEvalGuardrailConfigEvalsRequestType$outboundSchema,
|
|
1399
|
+
value: z.number(),
|
|
1400
|
+
operator: GuardrailConfigOperator$outboundSchema,
|
|
1401
|
+
});
|
|
1402
|
+
|
|
1403
|
+
/**
|
|
1404
|
+
* @internal
|
|
1405
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1406
|
+
*/
|
|
1407
|
+
export namespace GuardrailConfigNumber$ {
|
|
1408
|
+
/** @deprecated use `GuardrailConfigNumber$inboundSchema` instead. */
|
|
1409
|
+
export const inboundSchema = GuardrailConfigNumber$inboundSchema;
|
|
1410
|
+
/** @deprecated use `GuardrailConfigNumber$outboundSchema` instead. */
|
|
1411
|
+
export const outboundSchema = GuardrailConfigNumber$outboundSchema;
|
|
1412
|
+
/** @deprecated use `GuardrailConfigNumber$Outbound` instead. */
|
|
1413
|
+
export type Outbound = GuardrailConfigNumber$Outbound;
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
export function guardrailConfigNumberToJSON(
|
|
1417
|
+
guardrailConfigNumber: GuardrailConfigNumber,
|
|
1418
|
+
): string {
|
|
1419
|
+
return JSON.stringify(
|
|
1420
|
+
GuardrailConfigNumber$outboundSchema.parse(guardrailConfigNumber),
|
|
1421
|
+
);
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
export function guardrailConfigNumberFromJSON(
|
|
1425
|
+
jsonString: string,
|
|
1426
|
+
): SafeParseResult<GuardrailConfigNumber, SDKValidationError> {
|
|
1427
|
+
return safeParse(
|
|
1428
|
+
jsonString,
|
|
1429
|
+
(x) => GuardrailConfigNumber$inboundSchema.parse(JSON.parse(x)),
|
|
1430
|
+
`Failed to parse 'GuardrailConfigNumber' from JSON`,
|
|
1431
|
+
);
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
/** @internal */
|
|
1435
|
+
export const CreateEvalGuardrailConfigEvalsType$inboundSchema: z.ZodNativeEnum<
|
|
1436
|
+
typeof CreateEvalGuardrailConfigEvalsType
|
|
1437
|
+
> = z.nativeEnum(CreateEvalGuardrailConfigEvalsType);
|
|
1438
|
+
|
|
1439
|
+
/** @internal */
|
|
1440
|
+
export const CreateEvalGuardrailConfigEvalsType$outboundSchema: z.ZodNativeEnum<
|
|
1441
|
+
typeof CreateEvalGuardrailConfigEvalsType
|
|
1442
|
+
> = CreateEvalGuardrailConfigEvalsType$inboundSchema;
|
|
1443
|
+
|
|
1444
|
+
/**
|
|
1445
|
+
* @internal
|
|
1446
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1447
|
+
*/
|
|
1448
|
+
export namespace CreateEvalGuardrailConfigEvalsType$ {
|
|
1449
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsType$inboundSchema` instead. */
|
|
1450
|
+
export const inboundSchema = CreateEvalGuardrailConfigEvalsType$inboundSchema;
|
|
1451
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsType$outboundSchema` instead. */
|
|
1452
|
+
export const outboundSchema =
|
|
1453
|
+
CreateEvalGuardrailConfigEvalsType$outboundSchema;
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
/** @internal */
|
|
1457
|
+
export const GuardrailConfigBoolean$inboundSchema: z.ZodType<
|
|
1458
|
+
GuardrailConfigBoolean,
|
|
1459
|
+
z.ZodTypeDef,
|
|
1460
|
+
unknown
|
|
1461
|
+
> = z.object({
|
|
1462
|
+
enabled: z.boolean(),
|
|
1463
|
+
type: CreateEvalGuardrailConfigEvalsType$inboundSchema,
|
|
1464
|
+
value: z.boolean(),
|
|
1465
|
+
});
|
|
1466
|
+
|
|
1467
|
+
/** @internal */
|
|
1468
|
+
export type GuardrailConfigBoolean$Outbound = {
|
|
1469
|
+
enabled: boolean;
|
|
1470
|
+
type: string;
|
|
1471
|
+
value: boolean;
|
|
1472
|
+
};
|
|
1473
|
+
|
|
1474
|
+
/** @internal */
|
|
1475
|
+
export const GuardrailConfigBoolean$outboundSchema: z.ZodType<
|
|
1476
|
+
GuardrailConfigBoolean$Outbound,
|
|
1477
|
+
z.ZodTypeDef,
|
|
1478
|
+
GuardrailConfigBoolean
|
|
1479
|
+
> = z.object({
|
|
1480
|
+
enabled: z.boolean(),
|
|
1481
|
+
type: CreateEvalGuardrailConfigEvalsType$outboundSchema,
|
|
1482
|
+
value: z.boolean(),
|
|
1483
|
+
});
|
|
1484
|
+
|
|
1485
|
+
/**
|
|
1486
|
+
* @internal
|
|
1487
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1488
|
+
*/
|
|
1489
|
+
export namespace GuardrailConfigBoolean$ {
|
|
1490
|
+
/** @deprecated use `GuardrailConfigBoolean$inboundSchema` instead. */
|
|
1491
|
+
export const inboundSchema = GuardrailConfigBoolean$inboundSchema;
|
|
1492
|
+
/** @deprecated use `GuardrailConfigBoolean$outboundSchema` instead. */
|
|
1493
|
+
export const outboundSchema = GuardrailConfigBoolean$outboundSchema;
|
|
1494
|
+
/** @deprecated use `GuardrailConfigBoolean$Outbound` instead. */
|
|
1495
|
+
export type Outbound = GuardrailConfigBoolean$Outbound;
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
export function guardrailConfigBooleanToJSON(
|
|
1499
|
+
guardrailConfigBoolean: GuardrailConfigBoolean,
|
|
1500
|
+
): string {
|
|
1501
|
+
return JSON.stringify(
|
|
1502
|
+
GuardrailConfigBoolean$outboundSchema.parse(guardrailConfigBoolean),
|
|
1503
|
+
);
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
export function guardrailConfigBooleanFromJSON(
|
|
1507
|
+
jsonString: string,
|
|
1508
|
+
): SafeParseResult<GuardrailConfigBoolean, SDKValidationError> {
|
|
1509
|
+
return safeParse(
|
|
1510
|
+
jsonString,
|
|
1511
|
+
(x) => GuardrailConfigBoolean$inboundSchema.parse(JSON.parse(x)),
|
|
1512
|
+
`Failed to parse 'GuardrailConfigBoolean' from JSON`,
|
|
1513
|
+
);
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
/** @internal */
|
|
1517
|
+
export const RequestBodyGuardrailConfig$inboundSchema: z.ZodType<
|
|
1518
|
+
RequestBodyGuardrailConfig,
|
|
1519
|
+
z.ZodTypeDef,
|
|
1520
|
+
unknown
|
|
1521
|
+
> = z.union([
|
|
1522
|
+
z.lazy(() => GuardrailConfigBoolean$inboundSchema),
|
|
1523
|
+
z.lazy(() => GuardrailConfigNumber$inboundSchema),
|
|
1524
|
+
]);
|
|
1525
|
+
|
|
1526
|
+
/** @internal */
|
|
1527
|
+
export type RequestBodyGuardrailConfig$Outbound =
|
|
1528
|
+
| GuardrailConfigBoolean$Outbound
|
|
1529
|
+
| GuardrailConfigNumber$Outbound;
|
|
1530
|
+
|
|
1531
|
+
/** @internal */
|
|
1532
|
+
export const RequestBodyGuardrailConfig$outboundSchema: z.ZodType<
|
|
1533
|
+
RequestBodyGuardrailConfig$Outbound,
|
|
1534
|
+
z.ZodTypeDef,
|
|
1535
|
+
RequestBodyGuardrailConfig
|
|
1536
|
+
> = z.union([
|
|
1537
|
+
z.lazy(() => GuardrailConfigBoolean$outboundSchema),
|
|
1538
|
+
z.lazy(() => GuardrailConfigNumber$outboundSchema),
|
|
1539
|
+
]);
|
|
1540
|
+
|
|
1541
|
+
/**
|
|
1542
|
+
* @internal
|
|
1543
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1544
|
+
*/
|
|
1545
|
+
export namespace RequestBodyGuardrailConfig$ {
|
|
1546
|
+
/** @deprecated use `RequestBodyGuardrailConfig$inboundSchema` instead. */
|
|
1547
|
+
export const inboundSchema = RequestBodyGuardrailConfig$inboundSchema;
|
|
1548
|
+
/** @deprecated use `RequestBodyGuardrailConfig$outboundSchema` instead. */
|
|
1549
|
+
export const outboundSchema = RequestBodyGuardrailConfig$outboundSchema;
|
|
1550
|
+
/** @deprecated use `RequestBodyGuardrailConfig$Outbound` instead. */
|
|
1551
|
+
export type Outbound = RequestBodyGuardrailConfig$Outbound;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
export function requestBodyGuardrailConfigToJSON(
|
|
1555
|
+
requestBodyGuardrailConfig: RequestBodyGuardrailConfig,
|
|
1556
|
+
): string {
|
|
1557
|
+
return JSON.stringify(
|
|
1558
|
+
RequestBodyGuardrailConfig$outboundSchema.parse(requestBodyGuardrailConfig),
|
|
1559
|
+
);
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
export function requestBodyGuardrailConfigFromJSON(
|
|
1563
|
+
jsonString: string,
|
|
1564
|
+
): SafeParseResult<RequestBodyGuardrailConfig, SDKValidationError> {
|
|
1565
|
+
return safeParse(
|
|
1566
|
+
jsonString,
|
|
1567
|
+
(x) => RequestBodyGuardrailConfig$inboundSchema.parse(JSON.parse(x)),
|
|
1568
|
+
`Failed to parse 'RequestBodyGuardrailConfig' from JSON`,
|
|
1569
|
+
);
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
/** @internal */
|
|
1573
|
+
export const CreateEvalRequestBodyType$inboundSchema: z.ZodNativeEnum<
|
|
1574
|
+
typeof CreateEvalRequestBodyType
|
|
1575
|
+
> = z.nativeEnum(CreateEvalRequestBodyType);
|
|
1576
|
+
|
|
1577
|
+
/** @internal */
|
|
1578
|
+
export const CreateEvalRequestBodyType$outboundSchema: z.ZodNativeEnum<
|
|
1579
|
+
typeof CreateEvalRequestBodyType
|
|
1580
|
+
> = CreateEvalRequestBodyType$inboundSchema;
|
|
1581
|
+
|
|
1582
|
+
/**
|
|
1583
|
+
* @internal
|
|
1584
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1585
|
+
*/
|
|
1586
|
+
export namespace CreateEvalRequestBodyType$ {
|
|
1587
|
+
/** @deprecated use `CreateEvalRequestBodyType$inboundSchema` instead. */
|
|
1588
|
+
export const inboundSchema = CreateEvalRequestBodyType$inboundSchema;
|
|
1589
|
+
/** @deprecated use `CreateEvalRequestBodyType$outboundSchema` instead. */
|
|
1590
|
+
export const outboundSchema = CreateEvalRequestBodyType$outboundSchema;
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
/** @internal */
|
|
1594
|
+
export const Json$inboundSchema: z.ZodType<Json, z.ZodTypeDef, unknown> = z
|
|
1595
|
+
.object({
|
|
1596
|
+
guardrail_config: z.union([
|
|
1597
|
+
z.lazy(() => GuardrailConfigBoolean$inboundSchema),
|
|
1598
|
+
z.lazy(() => GuardrailConfigNumber$inboundSchema),
|
|
1599
|
+
]).optional(),
|
|
1600
|
+
type: CreateEvalRequestBodyType$inboundSchema,
|
|
1601
|
+
schema: z.string(),
|
|
1602
|
+
path: z.string(),
|
|
1603
|
+
description: z.string().default(""),
|
|
1604
|
+
key: z.string(),
|
|
1605
|
+
}).transform((v) => {
|
|
1606
|
+
return remap$(v, {
|
|
1607
|
+
"guardrail_config": "guardrailConfig",
|
|
1608
|
+
});
|
|
1609
|
+
});
|
|
1610
|
+
|
|
1611
|
+
/** @internal */
|
|
1612
|
+
export type Json$Outbound = {
|
|
1613
|
+
guardrail_config?:
|
|
1614
|
+
| GuardrailConfigBoolean$Outbound
|
|
1615
|
+
| GuardrailConfigNumber$Outbound
|
|
1616
|
+
| undefined;
|
|
1617
|
+
type: string;
|
|
1618
|
+
schema: string;
|
|
1619
|
+
path: string;
|
|
1620
|
+
description: string;
|
|
1621
|
+
key: string;
|
|
1622
|
+
};
|
|
1623
|
+
|
|
1624
|
+
/** @internal */
|
|
1625
|
+
export const Json$outboundSchema: z.ZodType<Json$Outbound, z.ZodTypeDef, Json> =
|
|
1626
|
+
z.object({
|
|
1627
|
+
guardrailConfig: z.union([
|
|
1628
|
+
z.lazy(() => GuardrailConfigBoolean$outboundSchema),
|
|
1629
|
+
z.lazy(() => GuardrailConfigNumber$outboundSchema),
|
|
1630
|
+
]).optional(),
|
|
1631
|
+
type: CreateEvalRequestBodyType$outboundSchema,
|
|
1632
|
+
schema: z.string(),
|
|
1633
|
+
path: z.string(),
|
|
1634
|
+
description: z.string().default(""),
|
|
1635
|
+
key: z.string(),
|
|
1636
|
+
}).transform((v) => {
|
|
1637
|
+
return remap$(v, {
|
|
1638
|
+
guardrailConfig: "guardrail_config",
|
|
1639
|
+
});
|
|
1640
|
+
});
|
|
1641
|
+
|
|
1642
|
+
/**
|
|
1643
|
+
* @internal
|
|
1644
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1645
|
+
*/
|
|
1646
|
+
export namespace Json$ {
|
|
1647
|
+
/** @deprecated use `Json$inboundSchema` instead. */
|
|
1648
|
+
export const inboundSchema = Json$inboundSchema;
|
|
1649
|
+
/** @deprecated use `Json$outboundSchema` instead. */
|
|
1650
|
+
export const outboundSchema = Json$outboundSchema;
|
|
1651
|
+
/** @deprecated use `Json$Outbound` instead. */
|
|
1652
|
+
export type Outbound = Json$Outbound;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
export function jsonToJSON(json: Json): string {
|
|
1656
|
+
return JSON.stringify(Json$outboundSchema.parse(json));
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
export function jsonFromJSON(
|
|
1660
|
+
jsonString: string,
|
|
1661
|
+
): SafeParseResult<Json, SDKValidationError> {
|
|
1662
|
+
return safeParse(
|
|
1663
|
+
jsonString,
|
|
1664
|
+
(x) => Json$inboundSchema.parse(JSON.parse(x)),
|
|
1665
|
+
`Failed to parse 'Json' from JSON`,
|
|
1666
|
+
);
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
/** @internal */
|
|
1670
|
+
export const CreateEvalGuardrailConfigType$inboundSchema: z.ZodNativeEnum<
|
|
1671
|
+
typeof CreateEvalGuardrailConfigType
|
|
1672
|
+
> = z.nativeEnum(CreateEvalGuardrailConfigType);
|
|
1673
|
+
|
|
1674
|
+
/** @internal */
|
|
1675
|
+
export const CreateEvalGuardrailConfigType$outboundSchema: z.ZodNativeEnum<
|
|
1676
|
+
typeof CreateEvalGuardrailConfigType
|
|
1677
|
+
> = CreateEvalGuardrailConfigType$inboundSchema;
|
|
1678
|
+
|
|
1679
|
+
/**
|
|
1680
|
+
* @internal
|
|
1681
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1682
|
+
*/
|
|
1683
|
+
export namespace CreateEvalGuardrailConfigType$ {
|
|
1684
|
+
/** @deprecated use `CreateEvalGuardrailConfigType$inboundSchema` instead. */
|
|
1685
|
+
export const inboundSchema = CreateEvalGuardrailConfigType$inboundSchema;
|
|
1686
|
+
/** @deprecated use `CreateEvalGuardrailConfigType$outboundSchema` instead. */
|
|
1687
|
+
export const outboundSchema = CreateEvalGuardrailConfigType$outboundSchema;
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
/** @internal */
|
|
1691
|
+
export const Operator$inboundSchema: z.ZodNativeEnum<typeof Operator> = z
|
|
1692
|
+
.nativeEnum(Operator);
|
|
1693
|
+
|
|
1694
|
+
/** @internal */
|
|
1695
|
+
export const Operator$outboundSchema: z.ZodNativeEnum<typeof Operator> =
|
|
1696
|
+
Operator$inboundSchema;
|
|
1697
|
+
|
|
1698
|
+
/**
|
|
1699
|
+
* @internal
|
|
1700
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1701
|
+
*/
|
|
1702
|
+
export namespace Operator$ {
|
|
1703
|
+
/** @deprecated use `Operator$inboundSchema` instead. */
|
|
1704
|
+
export const inboundSchema = Operator$inboundSchema;
|
|
1705
|
+
/** @deprecated use `Operator$outboundSchema` instead. */
|
|
1706
|
+
export const outboundSchema = Operator$outboundSchema;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
/** @internal */
|
|
1710
|
+
export const NumberT$inboundSchema: z.ZodType<NumberT, z.ZodTypeDef, unknown> =
|
|
1711
|
+
z.object({
|
|
1712
|
+
enabled: z.boolean(),
|
|
1713
|
+
type: CreateEvalGuardrailConfigType$inboundSchema,
|
|
1714
|
+
value: z.number(),
|
|
1715
|
+
operator: Operator$inboundSchema,
|
|
1716
|
+
});
|
|
1717
|
+
|
|
1718
|
+
/** @internal */
|
|
1719
|
+
export type NumberT$Outbound = {
|
|
1720
|
+
enabled: boolean;
|
|
1721
|
+
type: string;
|
|
1722
|
+
value: number;
|
|
1723
|
+
operator: string;
|
|
1724
|
+
};
|
|
1725
|
+
|
|
1726
|
+
/** @internal */
|
|
1727
|
+
export const NumberT$outboundSchema: z.ZodType<
|
|
1728
|
+
NumberT$Outbound,
|
|
1729
|
+
z.ZodTypeDef,
|
|
1730
|
+
NumberT
|
|
1731
|
+
> = z.object({
|
|
1732
|
+
enabled: z.boolean(),
|
|
1733
|
+
type: CreateEvalGuardrailConfigType$outboundSchema,
|
|
1734
|
+
value: z.number(),
|
|
1735
|
+
operator: Operator$outboundSchema,
|
|
1736
|
+
});
|
|
1737
|
+
|
|
1738
|
+
/**
|
|
1739
|
+
* @internal
|
|
1740
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1741
|
+
*/
|
|
1742
|
+
export namespace NumberT$ {
|
|
1743
|
+
/** @deprecated use `NumberT$inboundSchema` instead. */
|
|
1744
|
+
export const inboundSchema = NumberT$inboundSchema;
|
|
1745
|
+
/** @deprecated use `NumberT$outboundSchema` instead. */
|
|
1746
|
+
export const outboundSchema = NumberT$outboundSchema;
|
|
1747
|
+
/** @deprecated use `NumberT$Outbound` instead. */
|
|
1748
|
+
export type Outbound = NumberT$Outbound;
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
export function numberToJSON(numberT: NumberT): string {
|
|
1752
|
+
return JSON.stringify(NumberT$outboundSchema.parse(numberT));
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
export function numberFromJSON(
|
|
1756
|
+
jsonString: string,
|
|
1757
|
+
): SafeParseResult<NumberT, SDKValidationError> {
|
|
1758
|
+
return safeParse(
|
|
1759
|
+
jsonString,
|
|
1760
|
+
(x) => NumberT$inboundSchema.parse(JSON.parse(x)),
|
|
1761
|
+
`Failed to parse 'NumberT' from JSON`,
|
|
1762
|
+
);
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
/** @internal */
|
|
1766
|
+
export const GuardrailConfigType$inboundSchema: z.ZodNativeEnum<
|
|
1767
|
+
typeof GuardrailConfigType
|
|
1768
|
+
> = z.nativeEnum(GuardrailConfigType);
|
|
1769
|
+
|
|
1770
|
+
/** @internal */
|
|
1771
|
+
export const GuardrailConfigType$outboundSchema: z.ZodNativeEnum<
|
|
1772
|
+
typeof GuardrailConfigType
|
|
1773
|
+
> = GuardrailConfigType$inboundSchema;
|
|
1774
|
+
|
|
1775
|
+
/**
|
|
1776
|
+
* @internal
|
|
1777
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1778
|
+
*/
|
|
1779
|
+
export namespace GuardrailConfigType$ {
|
|
1780
|
+
/** @deprecated use `GuardrailConfigType$inboundSchema` instead. */
|
|
1781
|
+
export const inboundSchema = GuardrailConfigType$inboundSchema;
|
|
1782
|
+
/** @deprecated use `GuardrailConfigType$outboundSchema` instead. */
|
|
1783
|
+
export const outboundSchema = GuardrailConfigType$outboundSchema;
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
/** @internal */
|
|
1787
|
+
export const Boolean$inboundSchema: z.ZodType<Boolean, z.ZodTypeDef, unknown> =
|
|
1788
|
+
z.object({
|
|
1789
|
+
enabled: z.boolean(),
|
|
1790
|
+
type: GuardrailConfigType$inboundSchema,
|
|
1791
|
+
value: z.boolean(),
|
|
1792
|
+
});
|
|
1793
|
+
|
|
1794
|
+
/** @internal */
|
|
1795
|
+
export type Boolean$Outbound = {
|
|
1796
|
+
enabled: boolean;
|
|
1797
|
+
type: string;
|
|
1798
|
+
value: boolean;
|
|
1799
|
+
};
|
|
1800
|
+
|
|
1801
|
+
/** @internal */
|
|
1802
|
+
export const Boolean$outboundSchema: z.ZodType<
|
|
1803
|
+
Boolean$Outbound,
|
|
1804
|
+
z.ZodTypeDef,
|
|
1805
|
+
Boolean
|
|
1806
|
+
> = z.object({
|
|
1807
|
+
enabled: z.boolean(),
|
|
1808
|
+
type: GuardrailConfigType$outboundSchema,
|
|
1809
|
+
value: z.boolean(),
|
|
1810
|
+
});
|
|
1811
|
+
|
|
1812
|
+
/**
|
|
1813
|
+
* @internal
|
|
1814
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1815
|
+
*/
|
|
1816
|
+
export namespace Boolean$ {
|
|
1817
|
+
/** @deprecated use `Boolean$inboundSchema` instead. */
|
|
1818
|
+
export const inboundSchema = Boolean$inboundSchema;
|
|
1819
|
+
/** @deprecated use `Boolean$outboundSchema` instead. */
|
|
1820
|
+
export const outboundSchema = Boolean$outboundSchema;
|
|
1821
|
+
/** @deprecated use `Boolean$Outbound` instead. */
|
|
1822
|
+
export type Outbound = Boolean$Outbound;
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
export function booleanToJSON(value: Boolean): string {
|
|
1826
|
+
return JSON.stringify(Boolean$outboundSchema.parse(value));
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
export function booleanFromJSON(
|
|
1830
|
+
jsonString: string,
|
|
1831
|
+
): SafeParseResult<Boolean, SDKValidationError> {
|
|
1832
|
+
return safeParse(
|
|
1833
|
+
jsonString,
|
|
1834
|
+
(x) => Boolean$inboundSchema.parse(JSON.parse(x)),
|
|
1835
|
+
`Failed to parse 'Boolean' from JSON`,
|
|
1836
|
+
);
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
/** @internal */
|
|
1840
|
+
export const GuardrailConfig$inboundSchema: z.ZodType<
|
|
1841
|
+
GuardrailConfig,
|
|
1842
|
+
z.ZodTypeDef,
|
|
1843
|
+
unknown
|
|
1844
|
+
> = z.union([
|
|
1845
|
+
z.lazy(() => Boolean$inboundSchema),
|
|
1846
|
+
z.lazy(() => NumberT$inboundSchema),
|
|
1847
|
+
]);
|
|
1848
|
+
|
|
1849
|
+
/** @internal */
|
|
1850
|
+
export type GuardrailConfig$Outbound = Boolean$Outbound | NumberT$Outbound;
|
|
1851
|
+
|
|
1852
|
+
/** @internal */
|
|
1853
|
+
export const GuardrailConfig$outboundSchema: z.ZodType<
|
|
1854
|
+
GuardrailConfig$Outbound,
|
|
1855
|
+
z.ZodTypeDef,
|
|
1856
|
+
GuardrailConfig
|
|
1857
|
+
> = z.union([
|
|
1858
|
+
z.lazy(() => Boolean$outboundSchema),
|
|
1859
|
+
z.lazy(() => NumberT$outboundSchema),
|
|
1860
|
+
]);
|
|
1861
|
+
|
|
1862
|
+
/**
|
|
1863
|
+
* @internal
|
|
1864
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1865
|
+
*/
|
|
1866
|
+
export namespace GuardrailConfig$ {
|
|
1867
|
+
/** @deprecated use `GuardrailConfig$inboundSchema` instead. */
|
|
1868
|
+
export const inboundSchema = GuardrailConfig$inboundSchema;
|
|
1869
|
+
/** @deprecated use `GuardrailConfig$outboundSchema` instead. */
|
|
1870
|
+
export const outboundSchema = GuardrailConfig$outboundSchema;
|
|
1871
|
+
/** @deprecated use `GuardrailConfig$Outbound` instead. */
|
|
1872
|
+
export type Outbound = GuardrailConfig$Outbound;
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
export function guardrailConfigToJSON(
|
|
1876
|
+
guardrailConfig: GuardrailConfig,
|
|
1877
|
+
): string {
|
|
1878
|
+
return JSON.stringify(GuardrailConfig$outboundSchema.parse(guardrailConfig));
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
export function guardrailConfigFromJSON(
|
|
1882
|
+
jsonString: string,
|
|
1883
|
+
): SafeParseResult<GuardrailConfig, SDKValidationError> {
|
|
1884
|
+
return safeParse(
|
|
1885
|
+
jsonString,
|
|
1886
|
+
(x) => GuardrailConfig$inboundSchema.parse(JSON.parse(x)),
|
|
1887
|
+
`Failed to parse 'GuardrailConfig' from JSON`,
|
|
1888
|
+
);
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
/** @internal */
|
|
1892
|
+
export const RequestBodyType$inboundSchema: z.ZodNativeEnum<
|
|
1893
|
+
typeof RequestBodyType
|
|
1894
|
+
> = z.nativeEnum(RequestBodyType);
|
|
1895
|
+
|
|
1896
|
+
/** @internal */
|
|
1897
|
+
export const RequestBodyType$outboundSchema: z.ZodNativeEnum<
|
|
1898
|
+
typeof RequestBodyType
|
|
1899
|
+
> = RequestBodyType$inboundSchema;
|
|
1900
|
+
|
|
1901
|
+
/**
|
|
1902
|
+
* @internal
|
|
1903
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1904
|
+
*/
|
|
1905
|
+
export namespace RequestBodyType$ {
|
|
1906
|
+
/** @deprecated use `RequestBodyType$inboundSchema` instead. */
|
|
1907
|
+
export const inboundSchema = RequestBodyType$inboundSchema;
|
|
1908
|
+
/** @deprecated use `RequestBodyType$outboundSchema` instead. */
|
|
1909
|
+
export const outboundSchema = RequestBodyType$outboundSchema;
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
/** @internal */
|
|
1913
|
+
export const Llm$inboundSchema: z.ZodType<Llm, z.ZodTypeDef, unknown> = z
|
|
1914
|
+
.object({
|
|
1915
|
+
guardrail_config: z.union([
|
|
1916
|
+
z.lazy(() => Boolean$inboundSchema),
|
|
1917
|
+
z.lazy(() => NumberT$inboundSchema),
|
|
1918
|
+
]).optional(),
|
|
1919
|
+
type: RequestBodyType$inboundSchema,
|
|
1920
|
+
prompt: z.string(),
|
|
1921
|
+
path: z.string(),
|
|
1922
|
+
description: z.string().default(""),
|
|
1923
|
+
model: z.string(),
|
|
1924
|
+
key: z.string(),
|
|
1925
|
+
}).transform((v) => {
|
|
1926
|
+
return remap$(v, {
|
|
1927
|
+
"guardrail_config": "guardrailConfig",
|
|
1928
|
+
});
|
|
1929
|
+
});
|
|
1930
|
+
|
|
1931
|
+
/** @internal */
|
|
1932
|
+
export type Llm$Outbound = {
|
|
1933
|
+
guardrail_config?: Boolean$Outbound | NumberT$Outbound | undefined;
|
|
1934
|
+
type: string;
|
|
1935
|
+
prompt: string;
|
|
1936
|
+
path: string;
|
|
1937
|
+
description: string;
|
|
1938
|
+
model: string;
|
|
1939
|
+
key: string;
|
|
1940
|
+
};
|
|
1941
|
+
|
|
1942
|
+
/** @internal */
|
|
1943
|
+
export const Llm$outboundSchema: z.ZodType<Llm$Outbound, z.ZodTypeDef, Llm> = z
|
|
1944
|
+
.object({
|
|
1945
|
+
guardrailConfig: z.union([
|
|
1946
|
+
z.lazy(() => Boolean$outboundSchema),
|
|
1947
|
+
z.lazy(() => NumberT$outboundSchema),
|
|
1948
|
+
]).optional(),
|
|
1949
|
+
type: RequestBodyType$outboundSchema,
|
|
1950
|
+
prompt: z.string(),
|
|
1951
|
+
path: z.string(),
|
|
1952
|
+
description: z.string().default(""),
|
|
1953
|
+
model: z.string(),
|
|
1954
|
+
key: z.string(),
|
|
1955
|
+
}).transform((v) => {
|
|
1956
|
+
return remap$(v, {
|
|
1957
|
+
guardrailConfig: "guardrail_config",
|
|
1958
|
+
});
|
|
1959
|
+
});
|
|
1960
|
+
|
|
1961
|
+
/**
|
|
1962
|
+
* @internal
|
|
1963
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1964
|
+
*/
|
|
1965
|
+
export namespace Llm$ {
|
|
1966
|
+
/** @deprecated use `Llm$inboundSchema` instead. */
|
|
1967
|
+
export const inboundSchema = Llm$inboundSchema;
|
|
1968
|
+
/** @deprecated use `Llm$outboundSchema` instead. */
|
|
1969
|
+
export const outboundSchema = Llm$outboundSchema;
|
|
1970
|
+
/** @deprecated use `Llm$Outbound` instead. */
|
|
1971
|
+
export type Outbound = Llm$Outbound;
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
export function llmToJSON(llm: Llm): string {
|
|
1975
|
+
return JSON.stringify(Llm$outboundSchema.parse(llm));
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
export function llmFromJSON(
|
|
1979
|
+
jsonString: string,
|
|
1980
|
+
): SafeParseResult<Llm, SDKValidationError> {
|
|
1981
|
+
return safeParse(
|
|
1982
|
+
jsonString,
|
|
1983
|
+
(x) => Llm$inboundSchema.parse(JSON.parse(x)),
|
|
1984
|
+
`Failed to parse 'Llm' from JSON`,
|
|
1985
|
+
);
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
/** @internal */
|
|
1989
|
+
export const CreateEvalRequestBody$inboundSchema: z.ZodType<
|
|
1990
|
+
CreateEvalRequestBody,
|
|
1991
|
+
z.ZodTypeDef,
|
|
1992
|
+
unknown
|
|
1993
|
+
> = z.union([
|
|
1994
|
+
z.lazy(() => Json$inboundSchema),
|
|
1995
|
+
z.lazy(() => Python$inboundSchema),
|
|
1996
|
+
z.lazy(() => Llm$inboundSchema),
|
|
1997
|
+
z.lazy(() => Http$inboundSchema),
|
|
1998
|
+
]);
|
|
1999
|
+
|
|
2000
|
+
/** @internal */
|
|
2001
|
+
export type CreateEvalRequestBody$Outbound =
|
|
2002
|
+
| Json$Outbound
|
|
2003
|
+
| Python$Outbound
|
|
2004
|
+
| Llm$Outbound
|
|
2005
|
+
| Http$Outbound;
|
|
2006
|
+
|
|
2007
|
+
/** @internal */
|
|
2008
|
+
export const CreateEvalRequestBody$outboundSchema: z.ZodType<
|
|
2009
|
+
CreateEvalRequestBody$Outbound,
|
|
2010
|
+
z.ZodTypeDef,
|
|
2011
|
+
CreateEvalRequestBody
|
|
2012
|
+
> = z.union([
|
|
2013
|
+
z.lazy(() => Json$outboundSchema),
|
|
2014
|
+
z.lazy(() => Python$outboundSchema),
|
|
2015
|
+
z.lazy(() => Llm$outboundSchema),
|
|
2016
|
+
z.lazy(() => Http$outboundSchema),
|
|
2017
|
+
]);
|
|
2018
|
+
|
|
2019
|
+
/**
|
|
2020
|
+
* @internal
|
|
2021
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2022
|
+
*/
|
|
2023
|
+
export namespace CreateEvalRequestBody$ {
|
|
2024
|
+
/** @deprecated use `CreateEvalRequestBody$inboundSchema` instead. */
|
|
2025
|
+
export const inboundSchema = CreateEvalRequestBody$inboundSchema;
|
|
2026
|
+
/** @deprecated use `CreateEvalRequestBody$outboundSchema` instead. */
|
|
2027
|
+
export const outboundSchema = CreateEvalRequestBody$outboundSchema;
|
|
2028
|
+
/** @deprecated use `CreateEvalRequestBody$Outbound` instead. */
|
|
2029
|
+
export type Outbound = CreateEvalRequestBody$Outbound;
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
export function createEvalRequestBodyToJSON(
|
|
2033
|
+
createEvalRequestBody: CreateEvalRequestBody,
|
|
2034
|
+
): string {
|
|
2035
|
+
return JSON.stringify(
|
|
2036
|
+
CreateEvalRequestBody$outboundSchema.parse(createEvalRequestBody),
|
|
2037
|
+
);
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
export function createEvalRequestBodyFromJSON(
|
|
2041
|
+
jsonString: string,
|
|
2042
|
+
): SafeParseResult<CreateEvalRequestBody, SDKValidationError> {
|
|
2043
|
+
return safeParse(
|
|
2044
|
+
jsonString,
|
|
2045
|
+
(x) => CreateEvalRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
2046
|
+
`Failed to parse 'CreateEvalRequestBody' from JSON`,
|
|
2047
|
+
);
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
/** @internal */
|
|
2051
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type$inboundSchema:
|
|
2052
|
+
z.ZodNativeEnum<
|
|
2053
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type
|
|
2054
|
+
> = z.nativeEnum(
|
|
2055
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type,
|
|
2056
|
+
);
|
|
2057
|
+
|
|
2058
|
+
/** @internal */
|
|
2059
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type$outboundSchema:
|
|
2060
|
+
z.ZodNativeEnum<
|
|
2061
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type
|
|
2062
|
+
> =
|
|
2063
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type$inboundSchema;
|
|
2064
|
+
|
|
2065
|
+
/**
|
|
2066
|
+
* @internal
|
|
2067
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2068
|
+
*/
|
|
2069
|
+
export namespace CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type$ {
|
|
2070
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type$inboundSchema` instead. */
|
|
2071
|
+
export const inboundSchema =
|
|
2072
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type$inboundSchema;
|
|
2073
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type$outboundSchema` instead. */
|
|
2074
|
+
export const outboundSchema =
|
|
2075
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type$outboundSchema;
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
/** @internal */
|
|
2079
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator$inboundSchema:
|
|
2080
|
+
z.ZodNativeEnum<
|
|
2081
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator
|
|
2082
|
+
> = z.nativeEnum(
|
|
2083
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator,
|
|
2084
|
+
);
|
|
2085
|
+
|
|
2086
|
+
/** @internal */
|
|
2087
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator$outboundSchema:
|
|
2088
|
+
z.ZodNativeEnum<
|
|
2089
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator
|
|
2090
|
+
> =
|
|
2091
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator$inboundSchema;
|
|
2092
|
+
|
|
2093
|
+
/**
|
|
2094
|
+
* @internal
|
|
2095
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2096
|
+
*/
|
|
2097
|
+
export namespace CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator$ {
|
|
2098
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator$inboundSchema` instead. */
|
|
2099
|
+
export const inboundSchema =
|
|
2100
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator$inboundSchema;
|
|
2101
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator$outboundSchema` instead. */
|
|
2102
|
+
export const outboundSchema =
|
|
2103
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator$outboundSchema;
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
/** @internal */
|
|
2107
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema:
|
|
2108
|
+
z.ZodType<
|
|
2109
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber,
|
|
2110
|
+
z.ZodTypeDef,
|
|
2111
|
+
unknown
|
|
2112
|
+
> = z.object({
|
|
2113
|
+
enabled: z.boolean(),
|
|
2114
|
+
type:
|
|
2115
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type$inboundSchema,
|
|
2116
|
+
value: z.number(),
|
|
2117
|
+
operator:
|
|
2118
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator$inboundSchema,
|
|
2119
|
+
});
|
|
2120
|
+
|
|
2121
|
+
/** @internal */
|
|
2122
|
+
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$Outbound =
|
|
2123
|
+
{
|
|
2124
|
+
enabled: boolean;
|
|
2125
|
+
type: string;
|
|
2126
|
+
value: number;
|
|
2127
|
+
operator: string;
|
|
2128
|
+
};
|
|
2129
|
+
|
|
2130
|
+
/** @internal */
|
|
2131
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$outboundSchema:
|
|
2132
|
+
z.ZodType<
|
|
2133
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$Outbound,
|
|
2134
|
+
z.ZodTypeDef,
|
|
2135
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber
|
|
2136
|
+
> = z.object({
|
|
2137
|
+
enabled: z.boolean(),
|
|
2138
|
+
type:
|
|
2139
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody42Type$outboundSchema,
|
|
2140
|
+
value: z.number(),
|
|
2141
|
+
operator:
|
|
2142
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyOperator$outboundSchema,
|
|
2143
|
+
});
|
|
2144
|
+
|
|
2145
|
+
/**
|
|
2146
|
+
* @internal
|
|
2147
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2148
|
+
*/
|
|
2149
|
+
export namespace CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$ {
|
|
2150
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema` instead. */
|
|
2151
|
+
export const inboundSchema =
|
|
2152
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema;
|
|
2153
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$outboundSchema` instead. */
|
|
2154
|
+
export const outboundSchema =
|
|
2155
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$outboundSchema;
|
|
2156
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$Outbound` instead. */
|
|
2157
|
+
export type Outbound =
|
|
2158
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$Outbound;
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumberToJSON(
|
|
2162
|
+
createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber:
|
|
2163
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber,
|
|
2164
|
+
): string {
|
|
2165
|
+
return JSON.stringify(
|
|
2166
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$outboundSchema
|
|
2167
|
+
.parse(
|
|
2168
|
+
createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber,
|
|
2169
|
+
),
|
|
2170
|
+
);
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumberFromJSON(
|
|
2174
|
+
jsonString: string,
|
|
2175
|
+
): SafeParseResult<
|
|
2176
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber,
|
|
2177
|
+
SDKValidationError
|
|
2178
|
+
> {
|
|
2179
|
+
return safeParse(
|
|
2180
|
+
jsonString,
|
|
2181
|
+
(x) =>
|
|
2182
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema
|
|
2183
|
+
.parse(JSON.parse(x)),
|
|
2184
|
+
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber' from JSON`,
|
|
2185
|
+
);
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
/** @internal */
|
|
2189
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type$inboundSchema:
|
|
2190
|
+
z.ZodNativeEnum<
|
|
2191
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type
|
|
2192
|
+
> = z.nativeEnum(
|
|
2193
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type,
|
|
2194
|
+
);
|
|
2195
|
+
|
|
2196
|
+
/** @internal */
|
|
2197
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type$outboundSchema:
|
|
2198
|
+
z.ZodNativeEnum<
|
|
2199
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type
|
|
2200
|
+
> =
|
|
2201
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type$inboundSchema;
|
|
2202
|
+
|
|
2203
|
+
/**
|
|
2204
|
+
* @internal
|
|
2205
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2206
|
+
*/
|
|
2207
|
+
export namespace CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type$ {
|
|
2208
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type$inboundSchema` instead. */
|
|
2209
|
+
export const inboundSchema =
|
|
2210
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type$inboundSchema;
|
|
2211
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type$outboundSchema` instead. */
|
|
2212
|
+
export const outboundSchema =
|
|
2213
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type$outboundSchema;
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
/** @internal */
|
|
2217
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$inboundSchema:
|
|
2218
|
+
z.ZodType<
|
|
2219
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean,
|
|
2220
|
+
z.ZodTypeDef,
|
|
2221
|
+
unknown
|
|
2222
|
+
> = z.object({
|
|
2223
|
+
enabled: z.boolean(),
|
|
2224
|
+
type:
|
|
2225
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type$inboundSchema,
|
|
2226
|
+
value: z.boolean(),
|
|
2227
|
+
});
|
|
2228
|
+
|
|
2229
|
+
/** @internal */
|
|
2230
|
+
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$Outbound =
|
|
2231
|
+
{
|
|
2232
|
+
enabled: boolean;
|
|
2233
|
+
type: string;
|
|
2234
|
+
value: boolean;
|
|
2235
|
+
};
|
|
2236
|
+
|
|
2237
|
+
/** @internal */
|
|
2238
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$outboundSchema:
|
|
2239
|
+
z.ZodType<
|
|
2240
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$Outbound,
|
|
2241
|
+
z.ZodTypeDef,
|
|
2242
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean
|
|
2243
|
+
> = z.object({
|
|
2244
|
+
enabled: z.boolean(),
|
|
2245
|
+
type:
|
|
2246
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody4Type$outboundSchema,
|
|
2247
|
+
value: z.boolean(),
|
|
2248
|
+
});
|
|
2249
|
+
|
|
2250
|
+
/**
|
|
2251
|
+
* @internal
|
|
2252
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2253
|
+
*/
|
|
2254
|
+
export namespace CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$ {
|
|
2255
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$inboundSchema` instead. */
|
|
2256
|
+
export const inboundSchema =
|
|
2257
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$inboundSchema;
|
|
2258
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$outboundSchema` instead. */
|
|
2259
|
+
export const outboundSchema =
|
|
2260
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$outboundSchema;
|
|
2261
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$Outbound` instead. */
|
|
2262
|
+
export type Outbound =
|
|
2263
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$Outbound;
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2266
|
+
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBooleanToJSON(
|
|
2267
|
+
createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean:
|
|
2268
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean,
|
|
2269
|
+
): string {
|
|
2270
|
+
return JSON.stringify(
|
|
2271
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$outboundSchema
|
|
2272
|
+
.parse(
|
|
2273
|
+
createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean,
|
|
2274
|
+
),
|
|
2275
|
+
);
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBooleanFromJSON(
|
|
2279
|
+
jsonString: string,
|
|
2280
|
+
): SafeParseResult<
|
|
2281
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean,
|
|
2282
|
+
SDKValidationError
|
|
2283
|
+
> {
|
|
2284
|
+
return safeParse(
|
|
2285
|
+
jsonString,
|
|
2286
|
+
(x) =>
|
|
2287
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$inboundSchema
|
|
2288
|
+
.parse(JSON.parse(x)),
|
|
2289
|
+
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean' from JSON`,
|
|
2290
|
+
);
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
/** @internal */
|
|
2294
|
+
export const CreateEvalResponseBodyEvalsResponseGuardrailConfig$inboundSchema:
|
|
2295
|
+
z.ZodType<
|
|
2296
|
+
CreateEvalResponseBodyEvalsResponseGuardrailConfig,
|
|
2297
|
+
z.ZodTypeDef,
|
|
2298
|
+
unknown
|
|
2299
|
+
> = z.union([
|
|
2300
|
+
z.lazy(() =>
|
|
2301
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$inboundSchema
|
|
2302
|
+
),
|
|
2303
|
+
z.lazy(() =>
|
|
2304
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema
|
|
2305
|
+
),
|
|
2306
|
+
]);
|
|
2307
|
+
|
|
2308
|
+
/** @internal */
|
|
2309
|
+
export type CreateEvalResponseBodyEvalsResponseGuardrailConfig$Outbound =
|
|
2310
|
+
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$Outbound
|
|
2311
|
+
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$Outbound;
|
|
2312
|
+
|
|
2313
|
+
/** @internal */
|
|
2314
|
+
export const CreateEvalResponseBodyEvalsResponseGuardrailConfig$outboundSchema:
|
|
2315
|
+
z.ZodType<
|
|
2316
|
+
CreateEvalResponseBodyEvalsResponseGuardrailConfig$Outbound,
|
|
2317
|
+
z.ZodTypeDef,
|
|
2318
|
+
CreateEvalResponseBodyEvalsResponseGuardrailConfig
|
|
2319
|
+
> = z.union([
|
|
2320
|
+
z.lazy(() =>
|
|
2321
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$outboundSchema
|
|
2322
|
+
),
|
|
2323
|
+
z.lazy(() =>
|
|
2324
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$outboundSchema
|
|
2325
|
+
),
|
|
2326
|
+
]);
|
|
2327
|
+
|
|
2328
|
+
/**
|
|
2329
|
+
* @internal
|
|
2330
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2331
|
+
*/
|
|
2332
|
+
export namespace CreateEvalResponseBodyEvalsResponseGuardrailConfig$ {
|
|
2333
|
+
/** @deprecated use `CreateEvalResponseBodyEvalsResponseGuardrailConfig$inboundSchema` instead. */
|
|
2334
|
+
export const inboundSchema =
|
|
2335
|
+
CreateEvalResponseBodyEvalsResponseGuardrailConfig$inboundSchema;
|
|
2336
|
+
/** @deprecated use `CreateEvalResponseBodyEvalsResponseGuardrailConfig$outboundSchema` instead. */
|
|
2337
|
+
export const outboundSchema =
|
|
2338
|
+
CreateEvalResponseBodyEvalsResponseGuardrailConfig$outboundSchema;
|
|
2339
|
+
/** @deprecated use `CreateEvalResponseBodyEvalsResponseGuardrailConfig$Outbound` instead. */
|
|
2340
|
+
export type Outbound =
|
|
2341
|
+
CreateEvalResponseBodyEvalsResponseGuardrailConfig$Outbound;
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
export function createEvalResponseBodyEvalsResponseGuardrailConfigToJSON(
|
|
2345
|
+
createEvalResponseBodyEvalsResponseGuardrailConfig:
|
|
2346
|
+
CreateEvalResponseBodyEvalsResponseGuardrailConfig,
|
|
2347
|
+
): string {
|
|
2348
|
+
return JSON.stringify(
|
|
2349
|
+
CreateEvalResponseBodyEvalsResponseGuardrailConfig$outboundSchema.parse(
|
|
2350
|
+
createEvalResponseBodyEvalsResponseGuardrailConfig,
|
|
2351
|
+
),
|
|
2352
|
+
);
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
export function createEvalResponseBodyEvalsResponseGuardrailConfigFromJSON(
|
|
2356
|
+
jsonString: string,
|
|
2357
|
+
): SafeParseResult<
|
|
2358
|
+
CreateEvalResponseBodyEvalsResponseGuardrailConfig,
|
|
2359
|
+
SDKValidationError
|
|
2360
|
+
> {
|
|
2361
|
+
return safeParse(
|
|
2362
|
+
jsonString,
|
|
2363
|
+
(x) =>
|
|
2364
|
+
CreateEvalResponseBodyEvalsResponseGuardrailConfig$inboundSchema.parse(
|
|
2365
|
+
JSON.parse(x),
|
|
2366
|
+
),
|
|
2367
|
+
`Failed to parse 'CreateEvalResponseBodyEvalsResponseGuardrailConfig' from JSON`,
|
|
2368
|
+
);
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
/** @internal */
|
|
2372
|
+
export const CreateEvalResponseBodyEvalsResponseType$inboundSchema:
|
|
2373
|
+
z.ZodNativeEnum<typeof CreateEvalResponseBodyEvalsResponseType> = z
|
|
2374
|
+
.nativeEnum(CreateEvalResponseBodyEvalsResponseType);
|
|
2375
|
+
|
|
2376
|
+
/** @internal */
|
|
2377
|
+
export const CreateEvalResponseBodyEvalsResponseType$outboundSchema:
|
|
2378
|
+
z.ZodNativeEnum<typeof CreateEvalResponseBodyEvalsResponseType> =
|
|
2379
|
+
CreateEvalResponseBodyEvalsResponseType$inboundSchema;
|
|
2380
|
+
|
|
2381
|
+
/**
|
|
2382
|
+
* @internal
|
|
2383
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2384
|
+
*/
|
|
2385
|
+
export namespace CreateEvalResponseBodyEvalsResponseType$ {
|
|
2386
|
+
/** @deprecated use `CreateEvalResponseBodyEvalsResponseType$inboundSchema` instead. */
|
|
2387
|
+
export const inboundSchema =
|
|
2388
|
+
CreateEvalResponseBodyEvalsResponseType$inboundSchema;
|
|
2389
|
+
/** @deprecated use `CreateEvalResponseBodyEvalsResponseType$outboundSchema` instead. */
|
|
2390
|
+
export const outboundSchema =
|
|
2391
|
+
CreateEvalResponseBodyEvalsResponseType$outboundSchema;
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
/** @internal */
|
|
2395
|
+
export const ResponseBodyPython$inboundSchema: z.ZodType<
|
|
2396
|
+
ResponseBodyPython,
|
|
2397
|
+
z.ZodTypeDef,
|
|
2398
|
+
unknown
|
|
2399
|
+
> = z.object({
|
|
2400
|
+
_id: z.string(),
|
|
2401
|
+
description: z.string(),
|
|
2402
|
+
created: z.string().default("2025-06-03T12:31:43.231Z"),
|
|
2403
|
+
updated: z.string().default("2025-06-03T12:31:43.231Z"),
|
|
2404
|
+
guardrail_config: z.union([
|
|
2405
|
+
z.lazy(() =>
|
|
2406
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$inboundSchema
|
|
2407
|
+
),
|
|
2408
|
+
z.lazy(() =>
|
|
2409
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema
|
|
2410
|
+
),
|
|
2411
|
+
]).optional(),
|
|
2412
|
+
code: z.string(),
|
|
2413
|
+
type: CreateEvalResponseBodyEvalsResponseType$inboundSchema,
|
|
2414
|
+
key: z.string(),
|
|
2415
|
+
}).transform((v) => {
|
|
2416
|
+
return remap$(v, {
|
|
2417
|
+
"_id": "id",
|
|
2418
|
+
"guardrail_config": "guardrailConfig",
|
|
2419
|
+
});
|
|
2420
|
+
});
|
|
2421
|
+
|
|
2422
|
+
/** @internal */
|
|
2423
|
+
export type ResponseBodyPython$Outbound = {
|
|
2424
|
+
_id: string;
|
|
2425
|
+
description: string;
|
|
2426
|
+
created: string;
|
|
2427
|
+
updated: string;
|
|
2428
|
+
guardrail_config?:
|
|
2429
|
+
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$Outbound
|
|
2430
|
+
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$Outbound
|
|
2431
|
+
| undefined;
|
|
2432
|
+
code: string;
|
|
2433
|
+
type: string;
|
|
2434
|
+
key: string;
|
|
2435
|
+
};
|
|
2436
|
+
|
|
2437
|
+
/** @internal */
|
|
2438
|
+
export const ResponseBodyPython$outboundSchema: z.ZodType<
|
|
2439
|
+
ResponseBodyPython$Outbound,
|
|
2440
|
+
z.ZodTypeDef,
|
|
2441
|
+
ResponseBodyPython
|
|
2442
|
+
> = z.object({
|
|
2443
|
+
id: z.string(),
|
|
2444
|
+
description: z.string(),
|
|
2445
|
+
created: z.string().default("2025-06-03T12:31:43.231Z"),
|
|
2446
|
+
updated: z.string().default("2025-06-03T12:31:43.231Z"),
|
|
2447
|
+
guardrailConfig: z.union([
|
|
2448
|
+
z.lazy(() =>
|
|
2449
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$outboundSchema
|
|
2450
|
+
),
|
|
2451
|
+
z.lazy(() =>
|
|
2452
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$outboundSchema
|
|
2453
|
+
),
|
|
2454
|
+
]).optional(),
|
|
2455
|
+
code: z.string(),
|
|
2456
|
+
type: CreateEvalResponseBodyEvalsResponseType$outboundSchema,
|
|
2457
|
+
key: z.string(),
|
|
2458
|
+
}).transform((v) => {
|
|
2459
|
+
return remap$(v, {
|
|
2460
|
+
id: "_id",
|
|
2461
|
+
guardrailConfig: "guardrail_config",
|
|
2462
|
+
});
|
|
2463
|
+
});
|
|
2464
|
+
|
|
2465
|
+
/**
|
|
2466
|
+
* @internal
|
|
2467
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2468
|
+
*/
|
|
2469
|
+
export namespace ResponseBodyPython$ {
|
|
2470
|
+
/** @deprecated use `ResponseBodyPython$inboundSchema` instead. */
|
|
2471
|
+
export const inboundSchema = ResponseBodyPython$inboundSchema;
|
|
2472
|
+
/** @deprecated use `ResponseBodyPython$outboundSchema` instead. */
|
|
2473
|
+
export const outboundSchema = ResponseBodyPython$outboundSchema;
|
|
2474
|
+
/** @deprecated use `ResponseBodyPython$Outbound` instead. */
|
|
2475
|
+
export type Outbound = ResponseBodyPython$Outbound;
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
export function responseBodyPythonToJSON(
|
|
2479
|
+
responseBodyPython: ResponseBodyPython,
|
|
2480
|
+
): string {
|
|
2481
|
+
return JSON.stringify(
|
|
2482
|
+
ResponseBodyPython$outboundSchema.parse(responseBodyPython),
|
|
2483
|
+
);
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
export function responseBodyPythonFromJSON(
|
|
2487
|
+
jsonString: string,
|
|
2488
|
+
): SafeParseResult<ResponseBodyPython, SDKValidationError> {
|
|
2489
|
+
return safeParse(
|
|
2490
|
+
jsonString,
|
|
2491
|
+
(x) => ResponseBodyPython$inboundSchema.parse(JSON.parse(x)),
|
|
2492
|
+
`Failed to parse 'ResponseBodyPython' from JSON`,
|
|
2493
|
+
);
|
|
2494
|
+
}
|
|
2495
|
+
|
|
2496
|
+
/** @internal */
|
|
2497
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type$inboundSchema:
|
|
2498
|
+
z.ZodNativeEnum<
|
|
2499
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type
|
|
2500
|
+
> = z.nativeEnum(
|
|
2501
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type,
|
|
2502
|
+
);
|
|
2503
|
+
|
|
2504
|
+
/** @internal */
|
|
2505
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type$outboundSchema:
|
|
2506
|
+
z.ZodNativeEnum<
|
|
2507
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type
|
|
2508
|
+
> =
|
|
2509
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type$inboundSchema;
|
|
2510
|
+
|
|
2511
|
+
/**
|
|
2512
|
+
* @internal
|
|
2513
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2514
|
+
*/
|
|
2515
|
+
export namespace CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type$ {
|
|
2516
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type$inboundSchema` instead. */
|
|
2517
|
+
export const inboundSchema =
|
|
2518
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type$inboundSchema;
|
|
2519
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type$outboundSchema` instead. */
|
|
2520
|
+
export const outboundSchema =
|
|
2521
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type$outboundSchema;
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2524
|
+
/** @internal */
|
|
2525
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator$inboundSchema:
|
|
2526
|
+
z.ZodNativeEnum<
|
|
2527
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator
|
|
2528
|
+
> = z.nativeEnum(
|
|
2529
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator,
|
|
2530
|
+
);
|
|
2531
|
+
|
|
2532
|
+
/** @internal */
|
|
2533
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator$outboundSchema:
|
|
2534
|
+
z.ZodNativeEnum<
|
|
2535
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator
|
|
2536
|
+
> =
|
|
2537
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator$inboundSchema;
|
|
2538
|
+
|
|
2539
|
+
/**
|
|
2540
|
+
* @internal
|
|
2541
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2542
|
+
*/
|
|
2543
|
+
export namespace CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator$ {
|
|
2544
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator$inboundSchema` instead. */
|
|
2545
|
+
export const inboundSchema =
|
|
2546
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator$inboundSchema;
|
|
2547
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator$outboundSchema` instead. */
|
|
2548
|
+
export const outboundSchema =
|
|
2549
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator$outboundSchema;
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
/** @internal */
|
|
2553
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema:
|
|
2554
|
+
z.ZodType<
|
|
2555
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber,
|
|
2556
|
+
z.ZodTypeDef,
|
|
2557
|
+
unknown
|
|
2558
|
+
> = z.object({
|
|
2559
|
+
enabled: z.boolean(),
|
|
2560
|
+
type:
|
|
2561
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type$inboundSchema,
|
|
2562
|
+
value: z.number(),
|
|
2563
|
+
operator:
|
|
2564
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator$inboundSchema,
|
|
2565
|
+
});
|
|
2566
|
+
|
|
2567
|
+
/** @internal */
|
|
2568
|
+
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$Outbound =
|
|
2569
|
+
{
|
|
2570
|
+
enabled: boolean;
|
|
2571
|
+
type: string;
|
|
2572
|
+
value: number;
|
|
2573
|
+
operator: string;
|
|
2574
|
+
};
|
|
2575
|
+
|
|
2576
|
+
/** @internal */
|
|
2577
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$outboundSchema:
|
|
2578
|
+
z.ZodType<
|
|
2579
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$Outbound,
|
|
2580
|
+
z.ZodTypeDef,
|
|
2581
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber
|
|
2582
|
+
> = z.object({
|
|
2583
|
+
enabled: z.boolean(),
|
|
2584
|
+
type:
|
|
2585
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody32Type$outboundSchema,
|
|
2586
|
+
value: z.number(),
|
|
2587
|
+
operator:
|
|
2588
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONOperator$outboundSchema,
|
|
2589
|
+
});
|
|
2590
|
+
|
|
2591
|
+
/**
|
|
2592
|
+
* @internal
|
|
2593
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2594
|
+
*/
|
|
2595
|
+
export namespace CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$ {
|
|
2596
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema` instead. */
|
|
2597
|
+
export const inboundSchema =
|
|
2598
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema;
|
|
2599
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$outboundSchema` instead. */
|
|
2600
|
+
export const outboundSchema =
|
|
2601
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$outboundSchema;
|
|
2602
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$Outbound` instead. */
|
|
2603
|
+
export type Outbound =
|
|
2604
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$Outbound;
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONNumberToJSON(
|
|
2608
|
+
createEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber:
|
|
2609
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber,
|
|
2610
|
+
): string {
|
|
2611
|
+
return JSON.stringify(
|
|
2612
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$outboundSchema
|
|
2613
|
+
.parse(createEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber),
|
|
2614
|
+
);
|
|
2615
|
+
}
|
|
2616
|
+
|
|
2617
|
+
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONNumberFromJSON(
|
|
2618
|
+
jsonString: string,
|
|
2619
|
+
): SafeParseResult<
|
|
2620
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber,
|
|
2621
|
+
SDKValidationError
|
|
2622
|
+
> {
|
|
2623
|
+
return safeParse(
|
|
2624
|
+
jsonString,
|
|
2625
|
+
(x) =>
|
|
2626
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema
|
|
2627
|
+
.parse(JSON.parse(x)),
|
|
2628
|
+
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber' from JSON`,
|
|
2629
|
+
);
|
|
2630
|
+
}
|
|
2631
|
+
|
|
2632
|
+
/** @internal */
|
|
2633
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type$inboundSchema:
|
|
2634
|
+
z.ZodNativeEnum<
|
|
2635
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type
|
|
2636
|
+
> = z.nativeEnum(
|
|
2637
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type,
|
|
2638
|
+
);
|
|
2639
|
+
|
|
2640
|
+
/** @internal */
|
|
2641
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type$outboundSchema:
|
|
2642
|
+
z.ZodNativeEnum<
|
|
2643
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type
|
|
2644
|
+
> =
|
|
2645
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type$inboundSchema;
|
|
2646
|
+
|
|
2647
|
+
/**
|
|
2648
|
+
* @internal
|
|
2649
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2650
|
+
*/
|
|
2651
|
+
export namespace CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type$ {
|
|
2652
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type$inboundSchema` instead. */
|
|
2653
|
+
export const inboundSchema =
|
|
2654
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type$inboundSchema;
|
|
2655
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type$outboundSchema` instead. */
|
|
2656
|
+
export const outboundSchema =
|
|
2657
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type$outboundSchema;
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2660
|
+
/** @internal */
|
|
2661
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$inboundSchema:
|
|
2662
|
+
z.ZodType<
|
|
2663
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean,
|
|
2664
|
+
z.ZodTypeDef,
|
|
2665
|
+
unknown
|
|
2666
|
+
> = z.object({
|
|
2667
|
+
enabled: z.boolean(),
|
|
2668
|
+
type:
|
|
2669
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type$inboundSchema,
|
|
2670
|
+
value: z.boolean(),
|
|
2671
|
+
});
|
|
2672
|
+
|
|
2673
|
+
/** @internal */
|
|
2674
|
+
export type CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$Outbound =
|
|
2675
|
+
{
|
|
2676
|
+
enabled: boolean;
|
|
2677
|
+
type: string;
|
|
2678
|
+
value: boolean;
|
|
2679
|
+
};
|
|
2680
|
+
|
|
2681
|
+
/** @internal */
|
|
2682
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$outboundSchema:
|
|
2683
|
+
z.ZodType<
|
|
2684
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$Outbound,
|
|
2685
|
+
z.ZodTypeDef,
|
|
2686
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean
|
|
2687
|
+
> = z.object({
|
|
2688
|
+
enabled: z.boolean(),
|
|
2689
|
+
type:
|
|
2690
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody3Type$outboundSchema,
|
|
2691
|
+
value: z.boolean(),
|
|
2692
|
+
});
|
|
2693
|
+
|
|
2694
|
+
/**
|
|
2695
|
+
* @internal
|
|
2696
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2697
|
+
*/
|
|
2698
|
+
export namespace CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$ {
|
|
2699
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$inboundSchema` instead. */
|
|
2700
|
+
export const inboundSchema =
|
|
2701
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$inboundSchema;
|
|
2702
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$outboundSchema` instead. */
|
|
2703
|
+
export const outboundSchema =
|
|
2704
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$outboundSchema;
|
|
2705
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$Outbound` instead. */
|
|
2706
|
+
export type Outbound =
|
|
2707
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$Outbound;
|
|
2708
|
+
}
|
|
2709
|
+
|
|
2710
|
+
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONBooleanToJSON(
|
|
2711
|
+
createEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean:
|
|
2712
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean,
|
|
2713
|
+
): string {
|
|
2714
|
+
return JSON.stringify(
|
|
2715
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$outboundSchema
|
|
2716
|
+
.parse(createEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean),
|
|
2717
|
+
);
|
|
2718
|
+
}
|
|
2719
|
+
|
|
2720
|
+
export function createEvalGuardrailConfigEvalsResponse200ApplicationJSONBooleanFromJSON(
|
|
2721
|
+
jsonString: string,
|
|
2722
|
+
): SafeParseResult<
|
|
2723
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean,
|
|
2724
|
+
SDKValidationError
|
|
2725
|
+
> {
|
|
2726
|
+
return safeParse(
|
|
2727
|
+
jsonString,
|
|
2728
|
+
(x) =>
|
|
2729
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$inboundSchema
|
|
2730
|
+
.parse(JSON.parse(x)),
|
|
2731
|
+
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean' from JSON`,
|
|
2732
|
+
);
|
|
2733
|
+
}
|
|
2734
|
+
|
|
2735
|
+
/** @internal */
|
|
2736
|
+
export const CreateEvalResponseBodyEvalsGuardrailConfig$inboundSchema:
|
|
2737
|
+
z.ZodType<CreateEvalResponseBodyEvalsGuardrailConfig, z.ZodTypeDef, unknown> =
|
|
2738
|
+
z.union([
|
|
2739
|
+
z.lazy(() =>
|
|
2740
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$inboundSchema
|
|
2741
|
+
),
|
|
2742
|
+
z.lazy(() =>
|
|
2743
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema
|
|
2744
|
+
),
|
|
2745
|
+
]);
|
|
2746
|
+
|
|
2747
|
+
/** @internal */
|
|
2748
|
+
export type CreateEvalResponseBodyEvalsGuardrailConfig$Outbound =
|
|
2749
|
+
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$Outbound
|
|
2750
|
+
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$Outbound;
|
|
2751
|
+
|
|
2752
|
+
/** @internal */
|
|
2753
|
+
export const CreateEvalResponseBodyEvalsGuardrailConfig$outboundSchema:
|
|
2754
|
+
z.ZodType<
|
|
2755
|
+
CreateEvalResponseBodyEvalsGuardrailConfig$Outbound,
|
|
2756
|
+
z.ZodTypeDef,
|
|
2757
|
+
CreateEvalResponseBodyEvalsGuardrailConfig
|
|
2758
|
+
> = z.union([
|
|
2759
|
+
z.lazy(() =>
|
|
2760
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$outboundSchema
|
|
2761
|
+
),
|
|
2762
|
+
z.lazy(() =>
|
|
2763
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$outboundSchema
|
|
2764
|
+
),
|
|
2765
|
+
]);
|
|
2766
|
+
|
|
2767
|
+
/**
|
|
2768
|
+
* @internal
|
|
2769
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2770
|
+
*/
|
|
2771
|
+
export namespace CreateEvalResponseBodyEvalsGuardrailConfig$ {
|
|
2772
|
+
/** @deprecated use `CreateEvalResponseBodyEvalsGuardrailConfig$inboundSchema` instead. */
|
|
2773
|
+
export const inboundSchema =
|
|
2774
|
+
CreateEvalResponseBodyEvalsGuardrailConfig$inboundSchema;
|
|
2775
|
+
/** @deprecated use `CreateEvalResponseBodyEvalsGuardrailConfig$outboundSchema` instead. */
|
|
2776
|
+
export const outboundSchema =
|
|
2777
|
+
CreateEvalResponseBodyEvalsGuardrailConfig$outboundSchema;
|
|
2778
|
+
/** @deprecated use `CreateEvalResponseBodyEvalsGuardrailConfig$Outbound` instead. */
|
|
2779
|
+
export type Outbound = CreateEvalResponseBodyEvalsGuardrailConfig$Outbound;
|
|
2780
|
+
}
|
|
2781
|
+
|
|
2782
|
+
export function createEvalResponseBodyEvalsGuardrailConfigToJSON(
|
|
2783
|
+
createEvalResponseBodyEvalsGuardrailConfig:
|
|
2784
|
+
CreateEvalResponseBodyEvalsGuardrailConfig,
|
|
2785
|
+
): string {
|
|
2786
|
+
return JSON.stringify(
|
|
2787
|
+
CreateEvalResponseBodyEvalsGuardrailConfig$outboundSchema.parse(
|
|
2788
|
+
createEvalResponseBodyEvalsGuardrailConfig,
|
|
2789
|
+
),
|
|
2790
|
+
);
|
|
2791
|
+
}
|
|
2792
|
+
|
|
2793
|
+
export function createEvalResponseBodyEvalsGuardrailConfigFromJSON(
|
|
2794
|
+
jsonString: string,
|
|
2795
|
+
): SafeParseResult<
|
|
2796
|
+
CreateEvalResponseBodyEvalsGuardrailConfig,
|
|
2797
|
+
SDKValidationError
|
|
2798
|
+
> {
|
|
2799
|
+
return safeParse(
|
|
2800
|
+
jsonString,
|
|
2801
|
+
(x) =>
|
|
2802
|
+
CreateEvalResponseBodyEvalsGuardrailConfig$inboundSchema.parse(
|
|
2803
|
+
JSON.parse(x),
|
|
2804
|
+
),
|
|
2805
|
+
`Failed to parse 'CreateEvalResponseBodyEvalsGuardrailConfig' from JSON`,
|
|
2806
|
+
);
|
|
2807
|
+
}
|
|
2808
|
+
|
|
2809
|
+
/** @internal */
|
|
2810
|
+
export const CreateEvalResponseBodyEvalsType$inboundSchema: z.ZodNativeEnum<
|
|
2811
|
+
typeof CreateEvalResponseBodyEvalsType
|
|
2812
|
+
> = z.nativeEnum(CreateEvalResponseBodyEvalsType);
|
|
2813
|
+
|
|
2814
|
+
/** @internal */
|
|
2815
|
+
export const CreateEvalResponseBodyEvalsType$outboundSchema: z.ZodNativeEnum<
|
|
2816
|
+
typeof CreateEvalResponseBodyEvalsType
|
|
2817
|
+
> = CreateEvalResponseBodyEvalsType$inboundSchema;
|
|
2818
|
+
|
|
2819
|
+
/**
|
|
2820
|
+
* @internal
|
|
2821
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2822
|
+
*/
|
|
2823
|
+
export namespace CreateEvalResponseBodyEvalsType$ {
|
|
2824
|
+
/** @deprecated use `CreateEvalResponseBodyEvalsType$inboundSchema` instead. */
|
|
2825
|
+
export const inboundSchema = CreateEvalResponseBodyEvalsType$inboundSchema;
|
|
2826
|
+
/** @deprecated use `CreateEvalResponseBodyEvalsType$outboundSchema` instead. */
|
|
2827
|
+
export const outboundSchema = CreateEvalResponseBodyEvalsType$outboundSchema;
|
|
2828
|
+
}
|
|
2829
|
+
|
|
2830
|
+
/** @internal */
|
|
2831
|
+
export const ResponseBodyMethod$inboundSchema: z.ZodNativeEnum<
|
|
2832
|
+
typeof ResponseBodyMethod
|
|
2833
|
+
> = z.nativeEnum(ResponseBodyMethod);
|
|
2834
|
+
|
|
2835
|
+
/** @internal */
|
|
2836
|
+
export const ResponseBodyMethod$outboundSchema: z.ZodNativeEnum<
|
|
2837
|
+
typeof ResponseBodyMethod
|
|
2838
|
+
> = ResponseBodyMethod$inboundSchema;
|
|
2839
|
+
|
|
2840
|
+
/**
|
|
2841
|
+
* @internal
|
|
2842
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2843
|
+
*/
|
|
2844
|
+
export namespace ResponseBodyMethod$ {
|
|
2845
|
+
/** @deprecated use `ResponseBodyMethod$inboundSchema` instead. */
|
|
2846
|
+
export const inboundSchema = ResponseBodyMethod$inboundSchema;
|
|
2847
|
+
/** @deprecated use `ResponseBodyMethod$outboundSchema` instead. */
|
|
2848
|
+
export const outboundSchema = ResponseBodyMethod$outboundSchema;
|
|
2849
|
+
}
|
|
2850
|
+
|
|
2851
|
+
/** @internal */
|
|
2852
|
+
export const ResponseBodyHTTP$inboundSchema: z.ZodType<
|
|
2853
|
+
ResponseBodyHTTP,
|
|
2854
|
+
z.ZodTypeDef,
|
|
2855
|
+
unknown
|
|
2856
|
+
> = z.object({
|
|
2857
|
+
_id: z.string(),
|
|
2858
|
+
description: z.string(),
|
|
2859
|
+
created: z.string().default("2025-06-03T12:31:43.231Z"),
|
|
2860
|
+
updated: z.string().default("2025-06-03T12:31:43.231Z"),
|
|
2861
|
+
guardrail_config: z.union([
|
|
2862
|
+
z.lazy(() =>
|
|
2863
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$inboundSchema
|
|
2864
|
+
),
|
|
2865
|
+
z.lazy(() =>
|
|
2866
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema
|
|
2867
|
+
),
|
|
2868
|
+
]).optional(),
|
|
2869
|
+
type: CreateEvalResponseBodyEvalsType$inboundSchema,
|
|
2870
|
+
url: z.string(),
|
|
2871
|
+
method: ResponseBodyMethod$inboundSchema,
|
|
2872
|
+
headers: z.record(z.string()),
|
|
2873
|
+
payload: z.record(z.any()),
|
|
2874
|
+
key: z.string(),
|
|
2875
|
+
}).transform((v) => {
|
|
2876
|
+
return remap$(v, {
|
|
2877
|
+
"_id": "id",
|
|
2878
|
+
"guardrail_config": "guardrailConfig",
|
|
2879
|
+
});
|
|
2880
|
+
});
|
|
2881
|
+
|
|
2882
|
+
/** @internal */
|
|
2883
|
+
export type ResponseBodyHTTP$Outbound = {
|
|
2884
|
+
_id: string;
|
|
2885
|
+
description: string;
|
|
2886
|
+
created: string;
|
|
2887
|
+
updated: string;
|
|
2888
|
+
guardrail_config?:
|
|
2889
|
+
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$Outbound
|
|
2890
|
+
| CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$Outbound
|
|
2891
|
+
| undefined;
|
|
2892
|
+
type: string;
|
|
2893
|
+
url: string;
|
|
2894
|
+
method: string;
|
|
2895
|
+
headers: { [k: string]: string };
|
|
2896
|
+
payload: { [k: string]: any };
|
|
2897
|
+
key: string;
|
|
2898
|
+
};
|
|
2899
|
+
|
|
2900
|
+
/** @internal */
|
|
2901
|
+
export const ResponseBodyHTTP$outboundSchema: z.ZodType<
|
|
2902
|
+
ResponseBodyHTTP$Outbound,
|
|
2903
|
+
z.ZodTypeDef,
|
|
2904
|
+
ResponseBodyHTTP
|
|
2905
|
+
> = z.object({
|
|
2906
|
+
id: z.string(),
|
|
2907
|
+
description: z.string(),
|
|
2908
|
+
created: z.string().default("2025-06-03T12:31:43.231Z"),
|
|
2909
|
+
updated: z.string().default("2025-06-03T12:31:43.231Z"),
|
|
2910
|
+
guardrailConfig: z.union([
|
|
2911
|
+
z.lazy(() =>
|
|
2912
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$outboundSchema
|
|
2913
|
+
),
|
|
2914
|
+
z.lazy(() =>
|
|
2915
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$outboundSchema
|
|
2916
|
+
),
|
|
2917
|
+
]).optional(),
|
|
2918
|
+
type: CreateEvalResponseBodyEvalsType$outboundSchema,
|
|
2919
|
+
url: z.string(),
|
|
2920
|
+
method: ResponseBodyMethod$outboundSchema,
|
|
2921
|
+
headers: z.record(z.string()),
|
|
2922
|
+
payload: z.record(z.any()),
|
|
2923
|
+
key: z.string(),
|
|
2924
|
+
}).transform((v) => {
|
|
2925
|
+
return remap$(v, {
|
|
2926
|
+
id: "_id",
|
|
2927
|
+
guardrailConfig: "guardrail_config",
|
|
2928
|
+
});
|
|
2929
|
+
});
|
|
2930
|
+
|
|
2931
|
+
/**
|
|
2932
|
+
* @internal
|
|
2933
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2934
|
+
*/
|
|
2935
|
+
export namespace ResponseBodyHTTP$ {
|
|
2936
|
+
/** @deprecated use `ResponseBodyHTTP$inboundSchema` instead. */
|
|
2937
|
+
export const inboundSchema = ResponseBodyHTTP$inboundSchema;
|
|
2938
|
+
/** @deprecated use `ResponseBodyHTTP$outboundSchema` instead. */
|
|
2939
|
+
export const outboundSchema = ResponseBodyHTTP$outboundSchema;
|
|
2940
|
+
/** @deprecated use `ResponseBodyHTTP$Outbound` instead. */
|
|
2941
|
+
export type Outbound = ResponseBodyHTTP$Outbound;
|
|
2942
|
+
}
|
|
2943
|
+
|
|
2944
|
+
export function responseBodyHTTPToJSON(
|
|
2945
|
+
responseBodyHTTP: ResponseBodyHTTP,
|
|
2946
|
+
): string {
|
|
2947
|
+
return JSON.stringify(
|
|
2948
|
+
ResponseBodyHTTP$outboundSchema.parse(responseBodyHTTP),
|
|
2949
|
+
);
|
|
2950
|
+
}
|
|
2951
|
+
|
|
2952
|
+
export function responseBodyHTTPFromJSON(
|
|
2953
|
+
jsonString: string,
|
|
2954
|
+
): SafeParseResult<ResponseBodyHTTP, SDKValidationError> {
|
|
2955
|
+
return safeParse(
|
|
2956
|
+
jsonString,
|
|
2957
|
+
(x) => ResponseBodyHTTP$inboundSchema.parse(JSON.parse(x)),
|
|
2958
|
+
`Failed to parse 'ResponseBodyHTTP' from JSON`,
|
|
2959
|
+
);
|
|
2960
|
+
}
|
|
2961
|
+
|
|
2962
|
+
/** @internal */
|
|
2963
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType$inboundSchema:
|
|
2964
|
+
z.ZodNativeEnum<
|
|
2965
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType
|
|
2966
|
+
> = z.nativeEnum(
|
|
2967
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType,
|
|
2968
|
+
);
|
|
2969
|
+
|
|
2970
|
+
/** @internal */
|
|
2971
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType$outboundSchema:
|
|
2972
|
+
z.ZodNativeEnum<
|
|
2973
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType
|
|
2974
|
+
> =
|
|
2975
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType$inboundSchema;
|
|
2976
|
+
|
|
2977
|
+
/**
|
|
2978
|
+
* @internal
|
|
2979
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2980
|
+
*/
|
|
2981
|
+
export namespace CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType$ {
|
|
2982
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType$inboundSchema` instead. */
|
|
2983
|
+
export const inboundSchema =
|
|
2984
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType$inboundSchema;
|
|
2985
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType$outboundSchema` instead. */
|
|
2986
|
+
export const outboundSchema =
|
|
2987
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType$outboundSchema;
|
|
2988
|
+
}
|
|
2989
|
+
|
|
2990
|
+
/** @internal */
|
|
2991
|
+
export const CreateEvalGuardrailConfigEvalsResponse200Operator$inboundSchema:
|
|
2992
|
+
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsResponse200Operator> = z
|
|
2993
|
+
.nativeEnum(CreateEvalGuardrailConfigEvalsResponse200Operator);
|
|
2994
|
+
|
|
2995
|
+
/** @internal */
|
|
2996
|
+
export const CreateEvalGuardrailConfigEvalsResponse200Operator$outboundSchema:
|
|
2997
|
+
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsResponse200Operator> =
|
|
2998
|
+
CreateEvalGuardrailConfigEvalsResponse200Operator$inboundSchema;
|
|
2999
|
+
|
|
3000
|
+
/**
|
|
3001
|
+
* @internal
|
|
3002
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3003
|
+
*/
|
|
3004
|
+
export namespace CreateEvalGuardrailConfigEvalsResponse200Operator$ {
|
|
3005
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200Operator$inboundSchema` instead. */
|
|
3006
|
+
export const inboundSchema =
|
|
3007
|
+
CreateEvalGuardrailConfigEvalsResponse200Operator$inboundSchema;
|
|
3008
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200Operator$outboundSchema` instead. */
|
|
3009
|
+
export const outboundSchema =
|
|
3010
|
+
CreateEvalGuardrailConfigEvalsResponse200Operator$outboundSchema;
|
|
3011
|
+
}
|
|
3012
|
+
|
|
3013
|
+
/** @internal */
|
|
3014
|
+
export const CreateEvalGuardrailConfigEvalsResponse200Number$inboundSchema:
|
|
3015
|
+
z.ZodType<
|
|
3016
|
+
CreateEvalGuardrailConfigEvalsResponse200Number,
|
|
3017
|
+
z.ZodTypeDef,
|
|
3018
|
+
unknown
|
|
3019
|
+
> = z.object({
|
|
3020
|
+
enabled: z.boolean(),
|
|
3021
|
+
type:
|
|
3022
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType$inboundSchema,
|
|
3023
|
+
value: z.number(),
|
|
3024
|
+
operator: CreateEvalGuardrailConfigEvalsResponse200Operator$inboundSchema,
|
|
3025
|
+
});
|
|
3026
|
+
|
|
3027
|
+
/** @internal */
|
|
3028
|
+
export type CreateEvalGuardrailConfigEvalsResponse200Number$Outbound = {
|
|
3029
|
+
enabled: boolean;
|
|
3030
|
+
type: string;
|
|
3031
|
+
value: number;
|
|
3032
|
+
operator: string;
|
|
3033
|
+
};
|
|
3034
|
+
|
|
3035
|
+
/** @internal */
|
|
3036
|
+
export const CreateEvalGuardrailConfigEvalsResponse200Number$outboundSchema:
|
|
3037
|
+
z.ZodType<
|
|
3038
|
+
CreateEvalGuardrailConfigEvalsResponse200Number$Outbound,
|
|
3039
|
+
z.ZodTypeDef,
|
|
3040
|
+
CreateEvalGuardrailConfigEvalsResponse200Number
|
|
3041
|
+
> = z.object({
|
|
3042
|
+
enabled: z.boolean(),
|
|
3043
|
+
type:
|
|
3044
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyType$outboundSchema,
|
|
3045
|
+
value: z.number(),
|
|
3046
|
+
operator: CreateEvalGuardrailConfigEvalsResponse200Operator$outboundSchema,
|
|
3047
|
+
});
|
|
3048
|
+
|
|
3049
|
+
/**
|
|
3050
|
+
* @internal
|
|
3051
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3052
|
+
*/
|
|
3053
|
+
export namespace CreateEvalGuardrailConfigEvalsResponse200Number$ {
|
|
3054
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200Number$inboundSchema` instead. */
|
|
3055
|
+
export const inboundSchema =
|
|
3056
|
+
CreateEvalGuardrailConfigEvalsResponse200Number$inboundSchema;
|
|
3057
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200Number$outboundSchema` instead. */
|
|
3058
|
+
export const outboundSchema =
|
|
3059
|
+
CreateEvalGuardrailConfigEvalsResponse200Number$outboundSchema;
|
|
3060
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200Number$Outbound` instead. */
|
|
3061
|
+
export type Outbound =
|
|
3062
|
+
CreateEvalGuardrailConfigEvalsResponse200Number$Outbound;
|
|
3063
|
+
}
|
|
3064
|
+
|
|
3065
|
+
export function createEvalGuardrailConfigEvalsResponse200NumberToJSON(
|
|
3066
|
+
createEvalGuardrailConfigEvalsResponse200Number:
|
|
3067
|
+
CreateEvalGuardrailConfigEvalsResponse200Number,
|
|
3068
|
+
): string {
|
|
3069
|
+
return JSON.stringify(
|
|
3070
|
+
CreateEvalGuardrailConfigEvalsResponse200Number$outboundSchema.parse(
|
|
3071
|
+
createEvalGuardrailConfigEvalsResponse200Number,
|
|
3072
|
+
),
|
|
3073
|
+
);
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
export function createEvalGuardrailConfigEvalsResponse200NumberFromJSON(
|
|
3077
|
+
jsonString: string,
|
|
3078
|
+
): SafeParseResult<
|
|
3079
|
+
CreateEvalGuardrailConfigEvalsResponse200Number,
|
|
3080
|
+
SDKValidationError
|
|
3081
|
+
> {
|
|
3082
|
+
return safeParse(
|
|
3083
|
+
jsonString,
|
|
3084
|
+
(x) =>
|
|
3085
|
+
CreateEvalGuardrailConfigEvalsResponse200Number$inboundSchema.parse(
|
|
3086
|
+
JSON.parse(x),
|
|
3087
|
+
),
|
|
3088
|
+
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200Number' from JSON`,
|
|
3089
|
+
);
|
|
3090
|
+
}
|
|
3091
|
+
|
|
3092
|
+
/** @internal */
|
|
3093
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType$inboundSchema:
|
|
3094
|
+
z.ZodNativeEnum<
|
|
3095
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType
|
|
3096
|
+
> = z.nativeEnum(
|
|
3097
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType,
|
|
3098
|
+
);
|
|
3099
|
+
|
|
3100
|
+
/** @internal */
|
|
3101
|
+
export const CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType$outboundSchema:
|
|
3102
|
+
z.ZodNativeEnum<
|
|
3103
|
+
typeof CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType
|
|
3104
|
+
> =
|
|
3105
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType$inboundSchema;
|
|
3106
|
+
|
|
3107
|
+
/**
|
|
3108
|
+
* @internal
|
|
3109
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3110
|
+
*/
|
|
3111
|
+
export namespace CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType$ {
|
|
3112
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType$inboundSchema` instead. */
|
|
3113
|
+
export const inboundSchema =
|
|
3114
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType$inboundSchema;
|
|
3115
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType$outboundSchema` instead. */
|
|
3116
|
+
export const outboundSchema =
|
|
3117
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType$outboundSchema;
|
|
3118
|
+
}
|
|
3119
|
+
|
|
3120
|
+
/** @internal */
|
|
3121
|
+
export const CreateEvalGuardrailConfigEvalsResponse200Boolean$inboundSchema:
|
|
3122
|
+
z.ZodType<
|
|
3123
|
+
CreateEvalGuardrailConfigEvalsResponse200Boolean,
|
|
3124
|
+
z.ZodTypeDef,
|
|
3125
|
+
unknown
|
|
3126
|
+
> = z.object({
|
|
3127
|
+
enabled: z.boolean(),
|
|
3128
|
+
type:
|
|
3129
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType$inboundSchema,
|
|
3130
|
+
value: z.boolean(),
|
|
3131
|
+
});
|
|
3132
|
+
|
|
3133
|
+
/** @internal */
|
|
3134
|
+
export type CreateEvalGuardrailConfigEvalsResponse200Boolean$Outbound = {
|
|
3135
|
+
enabled: boolean;
|
|
3136
|
+
type: string;
|
|
3137
|
+
value: boolean;
|
|
3138
|
+
};
|
|
3139
|
+
|
|
3140
|
+
/** @internal */
|
|
3141
|
+
export const CreateEvalGuardrailConfigEvalsResponse200Boolean$outboundSchema:
|
|
3142
|
+
z.ZodType<
|
|
3143
|
+
CreateEvalGuardrailConfigEvalsResponse200Boolean$Outbound,
|
|
3144
|
+
z.ZodTypeDef,
|
|
3145
|
+
CreateEvalGuardrailConfigEvalsResponse200Boolean
|
|
3146
|
+
> = z.object({
|
|
3147
|
+
enabled: z.boolean(),
|
|
3148
|
+
type:
|
|
3149
|
+
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONType$outboundSchema,
|
|
3150
|
+
value: z.boolean(),
|
|
3151
|
+
});
|
|
3152
|
+
|
|
3153
|
+
/**
|
|
3154
|
+
* @internal
|
|
3155
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3156
|
+
*/
|
|
3157
|
+
export namespace CreateEvalGuardrailConfigEvalsResponse200Boolean$ {
|
|
3158
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200Boolean$inboundSchema` instead. */
|
|
3159
|
+
export const inboundSchema =
|
|
3160
|
+
CreateEvalGuardrailConfigEvalsResponse200Boolean$inboundSchema;
|
|
3161
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200Boolean$outboundSchema` instead. */
|
|
3162
|
+
export const outboundSchema =
|
|
3163
|
+
CreateEvalGuardrailConfigEvalsResponse200Boolean$outboundSchema;
|
|
3164
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200Boolean$Outbound` instead. */
|
|
3165
|
+
export type Outbound =
|
|
3166
|
+
CreateEvalGuardrailConfigEvalsResponse200Boolean$Outbound;
|
|
3167
|
+
}
|
|
3168
|
+
|
|
3169
|
+
export function createEvalGuardrailConfigEvalsResponse200BooleanToJSON(
|
|
3170
|
+
createEvalGuardrailConfigEvalsResponse200Boolean:
|
|
3171
|
+
CreateEvalGuardrailConfigEvalsResponse200Boolean,
|
|
3172
|
+
): string {
|
|
3173
|
+
return JSON.stringify(
|
|
3174
|
+
CreateEvalGuardrailConfigEvalsResponse200Boolean$outboundSchema.parse(
|
|
3175
|
+
createEvalGuardrailConfigEvalsResponse200Boolean,
|
|
3176
|
+
),
|
|
3177
|
+
);
|
|
3178
|
+
}
|
|
3179
|
+
|
|
3180
|
+
export function createEvalGuardrailConfigEvalsResponse200BooleanFromJSON(
|
|
3181
|
+
jsonString: string,
|
|
3182
|
+
): SafeParseResult<
|
|
3183
|
+
CreateEvalGuardrailConfigEvalsResponse200Boolean,
|
|
3184
|
+
SDKValidationError
|
|
3185
|
+
> {
|
|
3186
|
+
return safeParse(
|
|
3187
|
+
jsonString,
|
|
3188
|
+
(x) =>
|
|
3189
|
+
CreateEvalGuardrailConfigEvalsResponse200Boolean$inboundSchema.parse(
|
|
3190
|
+
JSON.parse(x),
|
|
3191
|
+
),
|
|
3192
|
+
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponse200Boolean' from JSON`,
|
|
3193
|
+
);
|
|
3194
|
+
}
|
|
3195
|
+
|
|
3196
|
+
/** @internal */
|
|
3197
|
+
export const CreateEvalResponseBodyGuardrailConfig$inboundSchema: z.ZodType<
|
|
3198
|
+
CreateEvalResponseBodyGuardrailConfig,
|
|
3199
|
+
z.ZodTypeDef,
|
|
3200
|
+
unknown
|
|
3201
|
+
> = z.union([
|
|
3202
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsResponse200Boolean$inboundSchema),
|
|
3203
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsResponse200Number$inboundSchema),
|
|
3204
|
+
]);
|
|
3205
|
+
|
|
3206
|
+
/** @internal */
|
|
3207
|
+
export type CreateEvalResponseBodyGuardrailConfig$Outbound =
|
|
3208
|
+
| CreateEvalGuardrailConfigEvalsResponse200Boolean$Outbound
|
|
3209
|
+
| CreateEvalGuardrailConfigEvalsResponse200Number$Outbound;
|
|
3210
|
+
|
|
3211
|
+
/** @internal */
|
|
3212
|
+
export const CreateEvalResponseBodyGuardrailConfig$outboundSchema: z.ZodType<
|
|
3213
|
+
CreateEvalResponseBodyGuardrailConfig$Outbound,
|
|
3214
|
+
z.ZodTypeDef,
|
|
3215
|
+
CreateEvalResponseBodyGuardrailConfig
|
|
3216
|
+
> = z.union([
|
|
3217
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsResponse200Boolean$outboundSchema),
|
|
3218
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsResponse200Number$outboundSchema),
|
|
3219
|
+
]);
|
|
3220
|
+
|
|
3221
|
+
/**
|
|
3222
|
+
* @internal
|
|
3223
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3224
|
+
*/
|
|
3225
|
+
export namespace CreateEvalResponseBodyGuardrailConfig$ {
|
|
3226
|
+
/** @deprecated use `CreateEvalResponseBodyGuardrailConfig$inboundSchema` instead. */
|
|
3227
|
+
export const inboundSchema =
|
|
3228
|
+
CreateEvalResponseBodyGuardrailConfig$inboundSchema;
|
|
3229
|
+
/** @deprecated use `CreateEvalResponseBodyGuardrailConfig$outboundSchema` instead. */
|
|
3230
|
+
export const outboundSchema =
|
|
3231
|
+
CreateEvalResponseBodyGuardrailConfig$outboundSchema;
|
|
3232
|
+
/** @deprecated use `CreateEvalResponseBodyGuardrailConfig$Outbound` instead. */
|
|
3233
|
+
export type Outbound = CreateEvalResponseBodyGuardrailConfig$Outbound;
|
|
3234
|
+
}
|
|
3235
|
+
|
|
3236
|
+
export function createEvalResponseBodyGuardrailConfigToJSON(
|
|
3237
|
+
createEvalResponseBodyGuardrailConfig: CreateEvalResponseBodyGuardrailConfig,
|
|
3238
|
+
): string {
|
|
3239
|
+
return JSON.stringify(
|
|
3240
|
+
CreateEvalResponseBodyGuardrailConfig$outboundSchema.parse(
|
|
3241
|
+
createEvalResponseBodyGuardrailConfig,
|
|
3242
|
+
),
|
|
3243
|
+
);
|
|
3244
|
+
}
|
|
3245
|
+
|
|
3246
|
+
export function createEvalResponseBodyGuardrailConfigFromJSON(
|
|
3247
|
+
jsonString: string,
|
|
3248
|
+
): SafeParseResult<CreateEvalResponseBodyGuardrailConfig, SDKValidationError> {
|
|
3249
|
+
return safeParse(
|
|
3250
|
+
jsonString,
|
|
3251
|
+
(x) =>
|
|
3252
|
+
CreateEvalResponseBodyGuardrailConfig$inboundSchema.parse(JSON.parse(x)),
|
|
3253
|
+
`Failed to parse 'CreateEvalResponseBodyGuardrailConfig' from JSON`,
|
|
3254
|
+
);
|
|
3255
|
+
}
|
|
3256
|
+
|
|
3257
|
+
/** @internal */
|
|
3258
|
+
export const CreateEvalResponseBodyType$inboundSchema: z.ZodNativeEnum<
|
|
3259
|
+
typeof CreateEvalResponseBodyType
|
|
3260
|
+
> = z.nativeEnum(CreateEvalResponseBodyType);
|
|
3261
|
+
|
|
3262
|
+
/** @internal */
|
|
3263
|
+
export const CreateEvalResponseBodyType$outboundSchema: z.ZodNativeEnum<
|
|
3264
|
+
typeof CreateEvalResponseBodyType
|
|
3265
|
+
> = CreateEvalResponseBodyType$inboundSchema;
|
|
3266
|
+
|
|
3267
|
+
/**
|
|
3268
|
+
* @internal
|
|
3269
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3270
|
+
*/
|
|
3271
|
+
export namespace CreateEvalResponseBodyType$ {
|
|
3272
|
+
/** @deprecated use `CreateEvalResponseBodyType$inboundSchema` instead. */
|
|
3273
|
+
export const inboundSchema = CreateEvalResponseBodyType$inboundSchema;
|
|
3274
|
+
/** @deprecated use `CreateEvalResponseBodyType$outboundSchema` instead. */
|
|
3275
|
+
export const outboundSchema = CreateEvalResponseBodyType$outboundSchema;
|
|
3276
|
+
}
|
|
3277
|
+
|
|
3278
|
+
/** @internal */
|
|
3279
|
+
export const ResponseBodyJSON$inboundSchema: z.ZodType<
|
|
3280
|
+
ResponseBodyJSON,
|
|
3281
|
+
z.ZodTypeDef,
|
|
3282
|
+
unknown
|
|
3283
|
+
> = z.object({
|
|
3284
|
+
_id: z.string(),
|
|
3285
|
+
description: z.string(),
|
|
3286
|
+
created: z.string().default("2025-06-03T12:31:43.231Z"),
|
|
3287
|
+
updated: z.string().default("2025-06-03T12:31:43.231Z"),
|
|
3288
|
+
guardrail_config: z.union([
|
|
3289
|
+
z.lazy(() =>
|
|
3290
|
+
CreateEvalGuardrailConfigEvalsResponse200Boolean$inboundSchema
|
|
3291
|
+
),
|
|
3292
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsResponse200Number$inboundSchema),
|
|
3293
|
+
]).optional(),
|
|
3294
|
+
type: CreateEvalResponseBodyType$inboundSchema,
|
|
3295
|
+
schema: z.string(),
|
|
3296
|
+
key: z.string(),
|
|
3297
|
+
}).transform((v) => {
|
|
3298
|
+
return remap$(v, {
|
|
3299
|
+
"_id": "id",
|
|
3300
|
+
"guardrail_config": "guardrailConfig",
|
|
3301
|
+
});
|
|
3302
|
+
});
|
|
3303
|
+
|
|
3304
|
+
/** @internal */
|
|
3305
|
+
export type ResponseBodyJSON$Outbound = {
|
|
3306
|
+
_id: string;
|
|
3307
|
+
description: string;
|
|
3308
|
+
created: string;
|
|
3309
|
+
updated: string;
|
|
3310
|
+
guardrail_config?:
|
|
3311
|
+
| CreateEvalGuardrailConfigEvalsResponse200Boolean$Outbound
|
|
3312
|
+
| CreateEvalGuardrailConfigEvalsResponse200Number$Outbound
|
|
3313
|
+
| undefined;
|
|
3314
|
+
type: string;
|
|
3315
|
+
schema: string;
|
|
3316
|
+
key: string;
|
|
3317
|
+
};
|
|
3318
|
+
|
|
3319
|
+
/** @internal */
|
|
3320
|
+
export const ResponseBodyJSON$outboundSchema: z.ZodType<
|
|
3321
|
+
ResponseBodyJSON$Outbound,
|
|
3322
|
+
z.ZodTypeDef,
|
|
3323
|
+
ResponseBodyJSON
|
|
3324
|
+
> = z.object({
|
|
3325
|
+
id: z.string(),
|
|
3326
|
+
description: z.string(),
|
|
3327
|
+
created: z.string().default("2025-06-03T12:31:43.231Z"),
|
|
3328
|
+
updated: z.string().default("2025-06-03T12:31:43.231Z"),
|
|
3329
|
+
guardrailConfig: z.union([
|
|
3330
|
+
z.lazy(() =>
|
|
3331
|
+
CreateEvalGuardrailConfigEvalsResponse200Boolean$outboundSchema
|
|
3332
|
+
),
|
|
3333
|
+
z.lazy(() =>
|
|
3334
|
+
CreateEvalGuardrailConfigEvalsResponse200Number$outboundSchema
|
|
3335
|
+
),
|
|
3336
|
+
]).optional(),
|
|
3337
|
+
type: CreateEvalResponseBodyType$outboundSchema,
|
|
3338
|
+
schema: z.string(),
|
|
3339
|
+
key: z.string(),
|
|
3340
|
+
}).transform((v) => {
|
|
3341
|
+
return remap$(v, {
|
|
3342
|
+
id: "_id",
|
|
3343
|
+
guardrailConfig: "guardrail_config",
|
|
3344
|
+
});
|
|
3345
|
+
});
|
|
3346
|
+
|
|
3347
|
+
/**
|
|
3348
|
+
* @internal
|
|
3349
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3350
|
+
*/
|
|
3351
|
+
export namespace ResponseBodyJSON$ {
|
|
3352
|
+
/** @deprecated use `ResponseBodyJSON$inboundSchema` instead. */
|
|
3353
|
+
export const inboundSchema = ResponseBodyJSON$inboundSchema;
|
|
3354
|
+
/** @deprecated use `ResponseBodyJSON$outboundSchema` instead. */
|
|
3355
|
+
export const outboundSchema = ResponseBodyJSON$outboundSchema;
|
|
3356
|
+
/** @deprecated use `ResponseBodyJSON$Outbound` instead. */
|
|
3357
|
+
export type Outbound = ResponseBodyJSON$Outbound;
|
|
3358
|
+
}
|
|
3359
|
+
|
|
3360
|
+
export function responseBodyJSONToJSON(
|
|
3361
|
+
responseBodyJSON: ResponseBodyJSON,
|
|
3362
|
+
): string {
|
|
3363
|
+
return JSON.stringify(
|
|
3364
|
+
ResponseBodyJSON$outboundSchema.parse(responseBodyJSON),
|
|
3365
|
+
);
|
|
3366
|
+
}
|
|
3367
|
+
|
|
3368
|
+
export function responseBodyJSONFromJSON(
|
|
3369
|
+
jsonString: string,
|
|
3370
|
+
): SafeParseResult<ResponseBodyJSON, SDKValidationError> {
|
|
3371
|
+
return safeParse(
|
|
3372
|
+
jsonString,
|
|
3373
|
+
(x) => ResponseBodyJSON$inboundSchema.parse(JSON.parse(x)),
|
|
3374
|
+
`Failed to parse 'ResponseBodyJSON' from JSON`,
|
|
3375
|
+
);
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3378
|
+
/** @internal */
|
|
3379
|
+
export const CreateEvalGuardrailConfigEvalsResponse200Type$inboundSchema:
|
|
3380
|
+
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsResponse200Type> = z
|
|
3381
|
+
.nativeEnum(CreateEvalGuardrailConfigEvalsResponse200Type);
|
|
3382
|
+
|
|
3383
|
+
/** @internal */
|
|
3384
|
+
export const CreateEvalGuardrailConfigEvalsResponse200Type$outboundSchema:
|
|
3385
|
+
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsResponse200Type> =
|
|
3386
|
+
CreateEvalGuardrailConfigEvalsResponse200Type$inboundSchema;
|
|
3387
|
+
|
|
3388
|
+
/**
|
|
3389
|
+
* @internal
|
|
3390
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3391
|
+
*/
|
|
3392
|
+
export namespace CreateEvalGuardrailConfigEvalsResponse200Type$ {
|
|
3393
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200Type$inboundSchema` instead. */
|
|
3394
|
+
export const inboundSchema =
|
|
3395
|
+
CreateEvalGuardrailConfigEvalsResponse200Type$inboundSchema;
|
|
3396
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponse200Type$outboundSchema` instead. */
|
|
3397
|
+
export const outboundSchema =
|
|
3398
|
+
CreateEvalGuardrailConfigEvalsResponse200Type$outboundSchema;
|
|
3399
|
+
}
|
|
3400
|
+
|
|
3401
|
+
/** @internal */
|
|
3402
|
+
export const CreateEvalGuardrailConfigEvalsResponseOperator$inboundSchema:
|
|
3403
|
+
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsResponseOperator> = z
|
|
3404
|
+
.nativeEnum(CreateEvalGuardrailConfigEvalsResponseOperator);
|
|
3405
|
+
|
|
3406
|
+
/** @internal */
|
|
3407
|
+
export const CreateEvalGuardrailConfigEvalsResponseOperator$outboundSchema:
|
|
3408
|
+
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsResponseOperator> =
|
|
3409
|
+
CreateEvalGuardrailConfigEvalsResponseOperator$inboundSchema;
|
|
3410
|
+
|
|
3411
|
+
/**
|
|
3412
|
+
* @internal
|
|
3413
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3414
|
+
*/
|
|
3415
|
+
export namespace CreateEvalGuardrailConfigEvalsResponseOperator$ {
|
|
3416
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponseOperator$inboundSchema` instead. */
|
|
3417
|
+
export const inboundSchema =
|
|
3418
|
+
CreateEvalGuardrailConfigEvalsResponseOperator$inboundSchema;
|
|
3419
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponseOperator$outboundSchema` instead. */
|
|
3420
|
+
export const outboundSchema =
|
|
3421
|
+
CreateEvalGuardrailConfigEvalsResponseOperator$outboundSchema;
|
|
3422
|
+
}
|
|
3423
|
+
|
|
3424
|
+
/** @internal */
|
|
3425
|
+
export const CreateEvalGuardrailConfigEvalsResponseNumber$inboundSchema:
|
|
3426
|
+
z.ZodType<
|
|
3427
|
+
CreateEvalGuardrailConfigEvalsResponseNumber,
|
|
3428
|
+
z.ZodTypeDef,
|
|
3429
|
+
unknown
|
|
3430
|
+
> = z.object({
|
|
3431
|
+
enabled: z.boolean(),
|
|
3432
|
+
type: CreateEvalGuardrailConfigEvalsResponse200Type$inboundSchema,
|
|
3433
|
+
value: z.number(),
|
|
3434
|
+
operator: CreateEvalGuardrailConfigEvalsResponseOperator$inboundSchema,
|
|
3435
|
+
});
|
|
3436
|
+
|
|
3437
|
+
/** @internal */
|
|
3438
|
+
export type CreateEvalGuardrailConfigEvalsResponseNumber$Outbound = {
|
|
3439
|
+
enabled: boolean;
|
|
3440
|
+
type: string;
|
|
3441
|
+
value: number;
|
|
3442
|
+
operator: string;
|
|
3443
|
+
};
|
|
3444
|
+
|
|
3445
|
+
/** @internal */
|
|
3446
|
+
export const CreateEvalGuardrailConfigEvalsResponseNumber$outboundSchema:
|
|
3447
|
+
z.ZodType<
|
|
3448
|
+
CreateEvalGuardrailConfigEvalsResponseNumber$Outbound,
|
|
3449
|
+
z.ZodTypeDef,
|
|
3450
|
+
CreateEvalGuardrailConfigEvalsResponseNumber
|
|
3451
|
+
> = z.object({
|
|
3452
|
+
enabled: z.boolean(),
|
|
3453
|
+
type: CreateEvalGuardrailConfigEvalsResponse200Type$outboundSchema,
|
|
3454
|
+
value: z.number(),
|
|
3455
|
+
operator: CreateEvalGuardrailConfigEvalsResponseOperator$outboundSchema,
|
|
3456
|
+
});
|
|
3457
|
+
|
|
3458
|
+
/**
|
|
3459
|
+
* @internal
|
|
3460
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3461
|
+
*/
|
|
3462
|
+
export namespace CreateEvalGuardrailConfigEvalsResponseNumber$ {
|
|
3463
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponseNumber$inboundSchema` instead. */
|
|
3464
|
+
export const inboundSchema =
|
|
3465
|
+
CreateEvalGuardrailConfigEvalsResponseNumber$inboundSchema;
|
|
3466
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponseNumber$outboundSchema` instead. */
|
|
3467
|
+
export const outboundSchema =
|
|
3468
|
+
CreateEvalGuardrailConfigEvalsResponseNumber$outboundSchema;
|
|
3469
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponseNumber$Outbound` instead. */
|
|
3470
|
+
export type Outbound = CreateEvalGuardrailConfigEvalsResponseNumber$Outbound;
|
|
3471
|
+
}
|
|
3472
|
+
|
|
3473
|
+
export function createEvalGuardrailConfigEvalsResponseNumberToJSON(
|
|
3474
|
+
createEvalGuardrailConfigEvalsResponseNumber:
|
|
3475
|
+
CreateEvalGuardrailConfigEvalsResponseNumber,
|
|
3476
|
+
): string {
|
|
3477
|
+
return JSON.stringify(
|
|
3478
|
+
CreateEvalGuardrailConfigEvalsResponseNumber$outboundSchema.parse(
|
|
3479
|
+
createEvalGuardrailConfigEvalsResponseNumber,
|
|
3480
|
+
),
|
|
3481
|
+
);
|
|
3482
|
+
}
|
|
3483
|
+
|
|
3484
|
+
export function createEvalGuardrailConfigEvalsResponseNumberFromJSON(
|
|
3485
|
+
jsonString: string,
|
|
3486
|
+
): SafeParseResult<
|
|
3487
|
+
CreateEvalGuardrailConfigEvalsResponseNumber,
|
|
3488
|
+
SDKValidationError
|
|
3489
|
+
> {
|
|
3490
|
+
return safeParse(
|
|
3491
|
+
jsonString,
|
|
3492
|
+
(x) =>
|
|
3493
|
+
CreateEvalGuardrailConfigEvalsResponseNumber$inboundSchema.parse(
|
|
3494
|
+
JSON.parse(x),
|
|
3495
|
+
),
|
|
3496
|
+
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponseNumber' from JSON`,
|
|
3497
|
+
);
|
|
3498
|
+
}
|
|
3499
|
+
|
|
3500
|
+
/** @internal */
|
|
3501
|
+
export const CreateEvalGuardrailConfigEvalsResponseType$inboundSchema:
|
|
3502
|
+
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsResponseType> = z
|
|
3503
|
+
.nativeEnum(CreateEvalGuardrailConfigEvalsResponseType);
|
|
3504
|
+
|
|
3505
|
+
/** @internal */
|
|
3506
|
+
export const CreateEvalGuardrailConfigEvalsResponseType$outboundSchema:
|
|
3507
|
+
z.ZodNativeEnum<typeof CreateEvalGuardrailConfigEvalsResponseType> =
|
|
3508
|
+
CreateEvalGuardrailConfigEvalsResponseType$inboundSchema;
|
|
3509
|
+
|
|
3510
|
+
/**
|
|
3511
|
+
* @internal
|
|
3512
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3513
|
+
*/
|
|
3514
|
+
export namespace CreateEvalGuardrailConfigEvalsResponseType$ {
|
|
3515
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponseType$inboundSchema` instead. */
|
|
3516
|
+
export const inboundSchema =
|
|
3517
|
+
CreateEvalGuardrailConfigEvalsResponseType$inboundSchema;
|
|
3518
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponseType$outboundSchema` instead. */
|
|
3519
|
+
export const outboundSchema =
|
|
3520
|
+
CreateEvalGuardrailConfigEvalsResponseType$outboundSchema;
|
|
3521
|
+
}
|
|
3522
|
+
|
|
3523
|
+
/** @internal */
|
|
3524
|
+
export const CreateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema:
|
|
3525
|
+
z.ZodType<
|
|
3526
|
+
CreateEvalGuardrailConfigEvalsResponseBoolean,
|
|
3527
|
+
z.ZodTypeDef,
|
|
3528
|
+
unknown
|
|
3529
|
+
> = z.object({
|
|
3530
|
+
enabled: z.boolean(),
|
|
3531
|
+
type: CreateEvalGuardrailConfigEvalsResponseType$inboundSchema,
|
|
3532
|
+
value: z.boolean(),
|
|
3533
|
+
});
|
|
3534
|
+
|
|
3535
|
+
/** @internal */
|
|
3536
|
+
export type CreateEvalGuardrailConfigEvalsResponseBoolean$Outbound = {
|
|
3537
|
+
enabled: boolean;
|
|
3538
|
+
type: string;
|
|
3539
|
+
value: boolean;
|
|
3540
|
+
};
|
|
3541
|
+
|
|
3542
|
+
/** @internal */
|
|
3543
|
+
export const CreateEvalGuardrailConfigEvalsResponseBoolean$outboundSchema:
|
|
3544
|
+
z.ZodType<
|
|
3545
|
+
CreateEvalGuardrailConfigEvalsResponseBoolean$Outbound,
|
|
3546
|
+
z.ZodTypeDef,
|
|
3547
|
+
CreateEvalGuardrailConfigEvalsResponseBoolean
|
|
3548
|
+
> = z.object({
|
|
3549
|
+
enabled: z.boolean(),
|
|
3550
|
+
type: CreateEvalGuardrailConfigEvalsResponseType$outboundSchema,
|
|
3551
|
+
value: z.boolean(),
|
|
3552
|
+
});
|
|
3553
|
+
|
|
3554
|
+
/**
|
|
3555
|
+
* @internal
|
|
3556
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3557
|
+
*/
|
|
3558
|
+
export namespace CreateEvalGuardrailConfigEvalsResponseBoolean$ {
|
|
3559
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema` instead. */
|
|
3560
|
+
export const inboundSchema =
|
|
3561
|
+
CreateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema;
|
|
3562
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponseBoolean$outboundSchema` instead. */
|
|
3563
|
+
export const outboundSchema =
|
|
3564
|
+
CreateEvalGuardrailConfigEvalsResponseBoolean$outboundSchema;
|
|
3565
|
+
/** @deprecated use `CreateEvalGuardrailConfigEvalsResponseBoolean$Outbound` instead. */
|
|
3566
|
+
export type Outbound = CreateEvalGuardrailConfigEvalsResponseBoolean$Outbound;
|
|
3567
|
+
}
|
|
3568
|
+
|
|
3569
|
+
export function createEvalGuardrailConfigEvalsResponseBooleanToJSON(
|
|
3570
|
+
createEvalGuardrailConfigEvalsResponseBoolean:
|
|
3571
|
+
CreateEvalGuardrailConfigEvalsResponseBoolean,
|
|
3572
|
+
): string {
|
|
3573
|
+
return JSON.stringify(
|
|
3574
|
+
CreateEvalGuardrailConfigEvalsResponseBoolean$outboundSchema.parse(
|
|
3575
|
+
createEvalGuardrailConfigEvalsResponseBoolean,
|
|
3576
|
+
),
|
|
3577
|
+
);
|
|
3578
|
+
}
|
|
3579
|
+
|
|
3580
|
+
export function createEvalGuardrailConfigEvalsResponseBooleanFromJSON(
|
|
3581
|
+
jsonString: string,
|
|
3582
|
+
): SafeParseResult<
|
|
3583
|
+
CreateEvalGuardrailConfigEvalsResponseBoolean,
|
|
3584
|
+
SDKValidationError
|
|
3585
|
+
> {
|
|
3586
|
+
return safeParse(
|
|
3587
|
+
jsonString,
|
|
3588
|
+
(x) =>
|
|
3589
|
+
CreateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema.parse(
|
|
3590
|
+
JSON.parse(x),
|
|
3591
|
+
),
|
|
3592
|
+
`Failed to parse 'CreateEvalGuardrailConfigEvalsResponseBoolean' from JSON`,
|
|
3593
|
+
);
|
|
3594
|
+
}
|
|
3595
|
+
|
|
3596
|
+
/** @internal */
|
|
3597
|
+
export const ResponseBodyGuardrailConfig$inboundSchema: z.ZodType<
|
|
3598
|
+
ResponseBodyGuardrailConfig,
|
|
3599
|
+
z.ZodTypeDef,
|
|
3600
|
+
unknown
|
|
3601
|
+
> = z.union([
|
|
3602
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema),
|
|
3603
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseNumber$inboundSchema),
|
|
3604
|
+
]);
|
|
3605
|
+
|
|
3606
|
+
/** @internal */
|
|
3607
|
+
export type ResponseBodyGuardrailConfig$Outbound =
|
|
3608
|
+
| CreateEvalGuardrailConfigEvalsResponseBoolean$Outbound
|
|
3609
|
+
| CreateEvalGuardrailConfigEvalsResponseNumber$Outbound;
|
|
3610
|
+
|
|
3611
|
+
/** @internal */
|
|
3612
|
+
export const ResponseBodyGuardrailConfig$outboundSchema: z.ZodType<
|
|
3613
|
+
ResponseBodyGuardrailConfig$Outbound,
|
|
3614
|
+
z.ZodTypeDef,
|
|
3615
|
+
ResponseBodyGuardrailConfig
|
|
3616
|
+
> = z.union([
|
|
3617
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseBoolean$outboundSchema),
|
|
3618
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseNumber$outboundSchema),
|
|
3619
|
+
]);
|
|
3620
|
+
|
|
3621
|
+
/**
|
|
3622
|
+
* @internal
|
|
3623
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3624
|
+
*/
|
|
3625
|
+
export namespace ResponseBodyGuardrailConfig$ {
|
|
3626
|
+
/** @deprecated use `ResponseBodyGuardrailConfig$inboundSchema` instead. */
|
|
3627
|
+
export const inboundSchema = ResponseBodyGuardrailConfig$inboundSchema;
|
|
3628
|
+
/** @deprecated use `ResponseBodyGuardrailConfig$outboundSchema` instead. */
|
|
3629
|
+
export const outboundSchema = ResponseBodyGuardrailConfig$outboundSchema;
|
|
3630
|
+
/** @deprecated use `ResponseBodyGuardrailConfig$Outbound` instead. */
|
|
3631
|
+
export type Outbound = ResponseBodyGuardrailConfig$Outbound;
|
|
3632
|
+
}
|
|
3633
|
+
|
|
3634
|
+
export function responseBodyGuardrailConfigToJSON(
|
|
3635
|
+
responseBodyGuardrailConfig: ResponseBodyGuardrailConfig,
|
|
3636
|
+
): string {
|
|
3637
|
+
return JSON.stringify(
|
|
3638
|
+
ResponseBodyGuardrailConfig$outboundSchema.parse(
|
|
3639
|
+
responseBodyGuardrailConfig,
|
|
3640
|
+
),
|
|
3641
|
+
);
|
|
3642
|
+
}
|
|
3643
|
+
|
|
3644
|
+
export function responseBodyGuardrailConfigFromJSON(
|
|
3645
|
+
jsonString: string,
|
|
3646
|
+
): SafeParseResult<ResponseBodyGuardrailConfig, SDKValidationError> {
|
|
3647
|
+
return safeParse(
|
|
3648
|
+
jsonString,
|
|
3649
|
+
(x) => ResponseBodyGuardrailConfig$inboundSchema.parse(JSON.parse(x)),
|
|
3650
|
+
`Failed to parse 'ResponseBodyGuardrailConfig' from JSON`,
|
|
3651
|
+
);
|
|
3652
|
+
}
|
|
3653
|
+
|
|
3654
|
+
/** @internal */
|
|
3655
|
+
export const ResponseBodyType$inboundSchema: z.ZodNativeEnum<
|
|
3656
|
+
typeof ResponseBodyType
|
|
3657
|
+
> = z.nativeEnum(ResponseBodyType);
|
|
3658
|
+
|
|
3659
|
+
/** @internal */
|
|
3660
|
+
export const ResponseBodyType$outboundSchema: z.ZodNativeEnum<
|
|
3661
|
+
typeof ResponseBodyType
|
|
3662
|
+
> = ResponseBodyType$inboundSchema;
|
|
3663
|
+
|
|
3664
|
+
/**
|
|
3665
|
+
* @internal
|
|
3666
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3667
|
+
*/
|
|
3668
|
+
export namespace ResponseBodyType$ {
|
|
3669
|
+
/** @deprecated use `ResponseBodyType$inboundSchema` instead. */
|
|
3670
|
+
export const inboundSchema = ResponseBodyType$inboundSchema;
|
|
3671
|
+
/** @deprecated use `ResponseBodyType$outboundSchema` instead. */
|
|
3672
|
+
export const outboundSchema = ResponseBodyType$outboundSchema;
|
|
3673
|
+
}
|
|
3674
|
+
|
|
3675
|
+
/** @internal */
|
|
3676
|
+
export const ResponseBodyLLM$inboundSchema: z.ZodType<
|
|
3677
|
+
ResponseBodyLLM,
|
|
3678
|
+
z.ZodTypeDef,
|
|
3679
|
+
unknown
|
|
3680
|
+
> = z.object({
|
|
3681
|
+
_id: z.string(),
|
|
3682
|
+
description: z.string(),
|
|
3683
|
+
created: z.string().default("2025-06-03T12:31:43.231Z"),
|
|
3684
|
+
updated: z.string().default("2025-06-03T12:31:43.231Z"),
|
|
3685
|
+
guardrail_config: z.union([
|
|
3686
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema),
|
|
3687
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseNumber$inboundSchema),
|
|
3688
|
+
]).optional(),
|
|
3689
|
+
type: ResponseBodyType$inboundSchema,
|
|
3690
|
+
prompt: z.string(),
|
|
3691
|
+
key: z.string(),
|
|
3692
|
+
model: z.string(),
|
|
3693
|
+
}).transform((v) => {
|
|
3694
|
+
return remap$(v, {
|
|
3695
|
+
"_id": "id",
|
|
3696
|
+
"guardrail_config": "guardrailConfig",
|
|
3697
|
+
});
|
|
3698
|
+
});
|
|
3699
|
+
|
|
3700
|
+
/** @internal */
|
|
3701
|
+
export type ResponseBodyLLM$Outbound = {
|
|
3702
|
+
_id: string;
|
|
3703
|
+
description: string;
|
|
3704
|
+
created: string;
|
|
3705
|
+
updated: string;
|
|
3706
|
+
guardrail_config?:
|
|
3707
|
+
| CreateEvalGuardrailConfigEvalsResponseBoolean$Outbound
|
|
3708
|
+
| CreateEvalGuardrailConfigEvalsResponseNumber$Outbound
|
|
3709
|
+
| undefined;
|
|
3710
|
+
type: string;
|
|
3711
|
+
prompt: string;
|
|
3712
|
+
key: string;
|
|
3713
|
+
model: string;
|
|
3714
|
+
};
|
|
3715
|
+
|
|
3716
|
+
/** @internal */
|
|
3717
|
+
export const ResponseBodyLLM$outboundSchema: z.ZodType<
|
|
3718
|
+
ResponseBodyLLM$Outbound,
|
|
3719
|
+
z.ZodTypeDef,
|
|
3720
|
+
ResponseBodyLLM
|
|
3721
|
+
> = z.object({
|
|
3722
|
+
id: z.string(),
|
|
3723
|
+
description: z.string(),
|
|
3724
|
+
created: z.string().default("2025-06-03T12:31:43.231Z"),
|
|
3725
|
+
updated: z.string().default("2025-06-03T12:31:43.231Z"),
|
|
3726
|
+
guardrailConfig: z.union([
|
|
3727
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseBoolean$outboundSchema),
|
|
3728
|
+
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseNumber$outboundSchema),
|
|
3729
|
+
]).optional(),
|
|
3730
|
+
type: ResponseBodyType$outboundSchema,
|
|
3731
|
+
prompt: z.string(),
|
|
3732
|
+
key: z.string(),
|
|
3733
|
+
model: z.string(),
|
|
3734
|
+
}).transform((v) => {
|
|
3735
|
+
return remap$(v, {
|
|
3736
|
+
id: "_id",
|
|
3737
|
+
guardrailConfig: "guardrail_config",
|
|
3738
|
+
});
|
|
3739
|
+
});
|
|
3740
|
+
|
|
3741
|
+
/**
|
|
3742
|
+
* @internal
|
|
3743
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3744
|
+
*/
|
|
3745
|
+
export namespace ResponseBodyLLM$ {
|
|
3746
|
+
/** @deprecated use `ResponseBodyLLM$inboundSchema` instead. */
|
|
3747
|
+
export const inboundSchema = ResponseBodyLLM$inboundSchema;
|
|
3748
|
+
/** @deprecated use `ResponseBodyLLM$outboundSchema` instead. */
|
|
3749
|
+
export const outboundSchema = ResponseBodyLLM$outboundSchema;
|
|
3750
|
+
/** @deprecated use `ResponseBodyLLM$Outbound` instead. */
|
|
3751
|
+
export type Outbound = ResponseBodyLLM$Outbound;
|
|
3752
|
+
}
|
|
3753
|
+
|
|
3754
|
+
export function responseBodyLLMToJSON(
|
|
3755
|
+
responseBodyLLM: ResponseBodyLLM,
|
|
3756
|
+
): string {
|
|
3757
|
+
return JSON.stringify(ResponseBodyLLM$outboundSchema.parse(responseBodyLLM));
|
|
3758
|
+
}
|
|
3759
|
+
|
|
3760
|
+
export function responseBodyLLMFromJSON(
|
|
3761
|
+
jsonString: string,
|
|
3762
|
+
): SafeParseResult<ResponseBodyLLM, SDKValidationError> {
|
|
3763
|
+
return safeParse(
|
|
3764
|
+
jsonString,
|
|
3765
|
+
(x) => ResponseBodyLLM$inboundSchema.parse(JSON.parse(x)),
|
|
3766
|
+
`Failed to parse 'ResponseBodyLLM' from JSON`,
|
|
3767
|
+
);
|
|
3768
|
+
}
|
|
3769
|
+
|
|
3770
|
+
/** @internal */
|
|
3771
|
+
export const CreateEvalResponseBody$inboundSchema: z.ZodType<
|
|
3772
|
+
CreateEvalResponseBody,
|
|
3773
|
+
z.ZodTypeDef,
|
|
3774
|
+
unknown
|
|
3775
|
+
> = z.union([
|
|
3776
|
+
z.lazy(() => ResponseBodyJSON$inboundSchema),
|
|
3777
|
+
z.lazy(() => ResponseBodyPython$inboundSchema),
|
|
3778
|
+
z.lazy(() => ResponseBodyLLM$inboundSchema),
|
|
3779
|
+
z.lazy(() => ResponseBodyHTTP$inboundSchema),
|
|
3780
|
+
]);
|
|
3781
|
+
|
|
3782
|
+
/** @internal */
|
|
3783
|
+
export type CreateEvalResponseBody$Outbound =
|
|
3784
|
+
| ResponseBodyJSON$Outbound
|
|
3785
|
+
| ResponseBodyPython$Outbound
|
|
3786
|
+
| ResponseBodyLLM$Outbound
|
|
3787
|
+
| ResponseBodyHTTP$Outbound;
|
|
3788
|
+
|
|
3789
|
+
/** @internal */
|
|
3790
|
+
export const CreateEvalResponseBody$outboundSchema: z.ZodType<
|
|
3791
|
+
CreateEvalResponseBody$Outbound,
|
|
3792
|
+
z.ZodTypeDef,
|
|
3793
|
+
CreateEvalResponseBody
|
|
3794
|
+
> = z.union([
|
|
3795
|
+
z.lazy(() => ResponseBodyJSON$outboundSchema),
|
|
3796
|
+
z.lazy(() => ResponseBodyPython$outboundSchema),
|
|
3797
|
+
z.lazy(() => ResponseBodyLLM$outboundSchema),
|
|
3798
|
+
z.lazy(() => ResponseBodyHTTP$outboundSchema),
|
|
3799
|
+
]);
|
|
3800
|
+
|
|
3801
|
+
/**
|
|
3802
|
+
* @internal
|
|
3803
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3804
|
+
*/
|
|
3805
|
+
export namespace CreateEvalResponseBody$ {
|
|
3806
|
+
/** @deprecated use `CreateEvalResponseBody$inboundSchema` instead. */
|
|
3807
|
+
export const inboundSchema = CreateEvalResponseBody$inboundSchema;
|
|
3808
|
+
/** @deprecated use `CreateEvalResponseBody$outboundSchema` instead. */
|
|
3809
|
+
export const outboundSchema = CreateEvalResponseBody$outboundSchema;
|
|
3810
|
+
/** @deprecated use `CreateEvalResponseBody$Outbound` instead. */
|
|
3811
|
+
export type Outbound = CreateEvalResponseBody$Outbound;
|
|
3812
|
+
}
|
|
3813
|
+
|
|
3814
|
+
export function createEvalResponseBodyToJSON(
|
|
3815
|
+
createEvalResponseBody: CreateEvalResponseBody,
|
|
3816
|
+
): string {
|
|
3817
|
+
return JSON.stringify(
|
|
3818
|
+
CreateEvalResponseBody$outboundSchema.parse(createEvalResponseBody),
|
|
3819
|
+
);
|
|
3820
|
+
}
|
|
3821
|
+
|
|
3822
|
+
export function createEvalResponseBodyFromJSON(
|
|
3823
|
+
jsonString: string,
|
|
3824
|
+
): SafeParseResult<CreateEvalResponseBody, SDKValidationError> {
|
|
3825
|
+
return safeParse(
|
|
3826
|
+
jsonString,
|
|
3827
|
+
(x) => CreateEvalResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
3828
|
+
`Failed to parse 'CreateEvalResponseBody' from JSON`,
|
|
3829
|
+
);
|
|
3830
|
+
}
|