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