@orq-ai/node 3.8.9 → 3.9.0-rc.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 +86 -82
- package/bin/mcp-server.js +1654 -1037
- package/bin/mcp-server.js.map +49 -43
- package/docs/sdks/datasets/README.md +83 -0
- package/docs/sdks/deployments/README.md +85 -0
- package/docs/sdks/knowledge/README.md +87 -77
- package/funcs/{knowledgeCreate.d.ts → datasetsCreateExperiment.d.ts} +6 -3
- package/funcs/datasetsCreateExperiment.d.ts.map +1 -0
- package/funcs/datasetsCreateExperiment.js +120 -0
- package/funcs/datasetsCreateExperiment.js.map +1 -0
- package/funcs/deploymentsCreateExperiment.d.ts +17 -0
- package/funcs/deploymentsCreateExperiment.d.ts.map +1 -0
- package/funcs/deploymentsCreateExperiment.js +120 -0
- package/funcs/deploymentsCreateExperiment.js.map +1 -0
- package/funcs/knowledgeChunkText.d.ts +17 -0
- package/funcs/knowledgeChunkText.d.ts.map +1 -0
- package/funcs/{knowledgeCreate.js → knowledgeChunkText.js} +10 -7
- package/funcs/knowledgeChunkText.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/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +7 -3
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/datasetsCreateExperiment.d.ts +8 -0
- package/mcp-server/tools/datasetsCreateExperiment.d.ts.map +1 -0
- package/mcp-server/tools/{knowledgeCreate.js → datasetsCreateExperiment.js} +10 -8
- package/mcp-server/tools/datasetsCreateExperiment.js.map +1 -0
- package/mcp-server/tools/deploymentsCreateExperiment.d.ts +8 -0
- package/mcp-server/tools/deploymentsCreateExperiment.d.ts.map +1 -0
- package/mcp-server/tools/deploymentsCreateExperiment.js +64 -0
- package/mcp-server/tools/deploymentsCreateExperiment.js.map +1 -0
- package/mcp-server/tools/knowledgeChunkText.d.ts +8 -0
- package/mcp-server/tools/knowledgeChunkText.d.ts.map +1 -0
- package/mcp-server/tools/knowledgeChunkText.js +64 -0
- package/mcp-server/tools/knowledgeChunkText.js.map +1 -0
- package/models/operations/chunktext.d.ts +961 -0
- package/models/operations/chunktext.d.ts.map +1 -0
- package/models/operations/chunktext.js +884 -0
- package/models/operations/chunktext.js.map +1 -0
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetexperiment.d.ts +140 -0
- package/models/operations/createdatasetexperiment.d.ts.map +1 -0
- package/models/operations/createdatasetexperiment.js +188 -0
- package/models/operations/createdatasetexperiment.js.map +1 -0
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createdeploymentexperiment.d.ts +152 -0
- package/models/operations/createdeploymentexperiment.d.ts.map +1 -0
- package/models/operations/createdeploymentexperiment.js +189 -0
- package/models/operations/createdeploymentexperiment.js.map +1 -0
- package/models/operations/createeval.js +16 -16
- package/models/operations/createprompt.d.ts +0 -6
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +0 -2
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/deploymentgetconfig.d.ts +0 -3
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +0 -1
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deployments.d.ts +0 -3
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +0 -1
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getallprompts.d.ts +0 -3
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +0 -1
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getevals.js +28 -28
- package/models/operations/getoneprompt.d.ts +0 -3
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +0 -1
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +0 -3
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +0 -1
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/index.d.ts +3 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +3 -1
- package/models/operations/index.js.map +1 -1
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/listpromptversions.d.ts +0 -3
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +0 -1
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +16 -16
- package/models/operations/updateknowledge.d.ts +106 -106
- package/models/operations/updateknowledge.d.ts.map +1 -1
- package/models/operations/updateknowledge.js +129 -125
- package/models/operations/updateknowledge.js.map +1 -1
- package/models/operations/updateprompt.d.ts +0 -6
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +0 -2
- package/models/operations/updateprompt.js.map +1 -1
- package/package.json +3 -2
- package/sdk/datasets.d.ts +7 -0
- package/sdk/datasets.d.ts.map +1 -1
- package/sdk/datasets.js +10 -0
- package/sdk/datasets.js.map +1 -1
- package/sdk/deployments.d.ts +7 -0
- package/sdk/deployments.d.ts.map +1 -1
- package/sdk/deployments.js +10 -0
- package/sdk/deployments.js.map +1 -1
- package/sdk/knowledge.d.ts +7 -4
- package/sdk/knowledge.d.ts.map +1 -1
- package/sdk/knowledge.js +10 -7
- package/sdk/knowledge.js.map +1 -1
- package/{packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts → src/funcs/datasetsCreateExperiment.ts} +13 -12
- package/{packages/orq-rc/src/funcs/knowledgeSearch.ts → src/funcs/deploymentsCreateExperiment.ts} +19 -13
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +7 -3
- package/{packages/orq-rc/src/mcp-server/tools/deploymentsMetricsCreate.ts → src/mcp-server/tools/datasetsCreateExperiment.ts} +7 -7
- package/{packages/orq-rc/src/mcp-server/tools/evalsRagasResponseRelevancy.ts → src/mcp-server/tools/deploymentsCreateExperiment.ts} +8 -7
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetexperiment.ts +307 -0
- package/src/models/operations/createdatasetitem.ts +2 -2
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createdeploymentexperiment.ts +321 -0
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/createprompt.ts +0 -2
- package/src/models/operations/deploymentgetconfig.ts +0 -1
- package/src/models/operations/deployments.ts +0 -1
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getallprompts.ts +0 -1
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/getoneprompt.ts +0 -1
- package/src/models/operations/getpromptversion.ts +0 -1
- package/src/models/operations/index.ts +3 -1
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/listpromptversions.ts +0 -1
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +16 -16
- package/src/models/operations/updateknowledge.ts +206 -266
- package/src/models/operations/updateprompt.ts +0 -2
- package/src/sdk/datasets.ts +18 -0
- package/src/sdk/deployments.ts +18 -0
- package/src/sdk/knowledge.ts +18 -15
- package/funcs/knowledgeCreate.d.ts.map +0 -1
- package/funcs/knowledgeCreate.js.map +0 -1
- package/mcp-server/tools/knowledgeCreate.d.ts +0 -8
- package/mcp-server/tools/knowledgeCreate.d.ts.map +0 -1
- package/mcp-server/tools/knowledgeCreate.js.map +0 -1
- package/models/operations/createknowledge.d.ts +0 -426
- package/models/operations/createknowledge.d.ts.map +0 -1
- package/models/operations/createknowledge.js +0 -431
- package/models/operations/createknowledge.js.map +0 -1
- package/packages/orq-rc/FUNCTIONS.md +0 -103
- package/packages/orq-rc/README.md +0 -955
- package/packages/orq-rc/RUNTIMES.md +0 -48
- package/packages/orq-rc/docs/sdks/contacts/README.md +0 -445
- package/packages/orq-rc/docs/sdks/datasets/README.md +0 -825
- package/packages/orq-rc/docs/sdks/deployments/README.md +0 -310
- package/packages/orq-rc/docs/sdks/evals/README.md +0 -3035
- package/packages/orq-rc/docs/sdks/feedback/README.md +0 -88
- package/packages/orq-rc/docs/sdks/files/README.md +0 -297
- package/packages/orq-rc/docs/sdks/knowledge/README.md +0 -1237
- package/packages/orq-rc/docs/sdks/metrics/README.md +0 -82
- package/packages/orq-rc/docs/sdks/models/README.md +0 -75
- package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
- package/packages/orq-rc/docs/sdks/prompts/README.md +0 -550
- package/packages/orq-rc/docs/sdks/remoteconfigs/README.md +0 -76
- package/packages/orq-rc/jsr.json +0 -28
- package/packages/orq-rc/package-lock.json +0 -3217
- package/packages/orq-rc/package.json +0 -45
- package/packages/orq-rc/src/core.ts +0 -13
- package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -165
- package/packages/orq-rc/src/funcs/contactsDelete.ts +0 -176
- package/packages/orq-rc/src/funcs/contactsList.ts +0 -169
- package/packages/orq-rc/src/funcs/contactsRetrieve.ts +0 -175
- package/packages/orq-rc/src/funcs/contactsUpdate.ts +0 -176
- package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -167
- package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -165
- package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -167
- package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -182
- package/packages/orq-rc/src/funcs/datasetsList.ts +0 -167
- package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -174
- package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -175
- package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -181
- package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -176
- package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -179
- package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -168
- package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -176
- package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -176
- package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -168
- package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -184
- package/packages/orq-rc/src/funcs/evalsAgeAppropriate.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsAll.ts +0 -173
- package/packages/orq-rc/src/funcs/evalsBertScore.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsBleuScore.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsBotDetection.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsContains.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsContainsAll.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsContainsAny.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsContainsEmail.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsContainsNone.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsContainsUrl.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsContainsValidLink.ts +0 -177
- package/packages/orq-rc/src/funcs/evalsCreate.ts +0 -169
- package/packages/orq-rc/src/funcs/evalsDelete.ts +0 -173
- package/packages/orq-rc/src/funcs/evalsEndsWith.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsExactMatch.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsFactCheckingKnowledgeBase.ts +0 -183
- package/packages/orq-rc/src/funcs/evalsGrammar.ts +0 -173
- package/packages/orq-rc/src/funcs/evalsInvoke.ts +0 -177
- package/packages/orq-rc/src/funcs/evalsLengthBetween.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsLengthGreaterThan.ts +0 -177
- package/packages/orq-rc/src/funcs/evalsLengthLessThan.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsLocalization.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsPii.ts +0 -173
- package/packages/orq-rc/src/funcs/evalsRagasCoherence.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsRagasConciseness.ts +0 -174
- package/packages/orq-rc/src/funcs/evalsRagasContextEntitiesRecall.ts +0 -183
- package/packages/orq-rc/src/funcs/evalsRagasContextPrecision.ts +0 -180
- package/packages/orq-rc/src/funcs/evalsRagasContextRecall.ts +0 -177
- package/packages/orq-rc/src/funcs/evalsRagasCorrectness.ts +0 -174
- package/packages/orq-rc/src/funcs/evalsRagasFaithfulness.ts +0 -177
- package/packages/orq-rc/src/funcs/evalsRagasHarmfulness.ts +0 -174
- package/packages/orq-rc/src/funcs/evalsRagasMaliciousness.ts +0 -177
- package/packages/orq-rc/src/funcs/evalsRagasNoiseSensitivity.ts +0 -180
- package/packages/orq-rc/src/funcs/evalsRagasResponseRelevancy.ts +0 -183
- package/packages/orq-rc/src/funcs/evalsRagasSummarization.ts +0 -177
- package/packages/orq-rc/src/funcs/evalsSentimentClassification.ts +0 -183
- package/packages/orq-rc/src/funcs/evalsSummarization.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsToneOfVoice.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsTranslation.ts +0 -175
- package/packages/orq-rc/src/funcs/evalsUpdate.ts +0 -173
- package/packages/orq-rc/src/funcs/evalsValidJson.ts +0 -175
- package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -160
- package/packages/orq-rc/src/funcs/filesCreate.ts +0 -187
- package/packages/orq-rc/src/funcs/filesDelete.ts +0 -164
- package/packages/orq-rc/src/funcs/filesGet.ts +0 -166
- package/packages/orq-rc/src/funcs/filesList.ts +0 -167
- package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -171
- package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -166
- package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -167
- package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -174
- package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -173
- package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -169
- package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -178
- package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -174
- package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -166
- package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -173
- package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -169
- package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -164
- package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -174
- package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -170
- package/packages/orq-rc/src/funcs/modelsList.ts +0 -142
- package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -160
- package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -164
- package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -181
- package/packages/orq-rc/src/funcs/promptsList.ts +0 -167
- package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -173
- package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -166
- package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -173
- package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -161
- package/packages/orq-rc/src/hooks/global.ts +0 -44
- package/packages/orq-rc/src/hooks/hooks.ts +0 -132
- package/packages/orq-rc/src/hooks/index.ts +0 -6
- package/packages/orq-rc/src/hooks/registration.ts +0 -15
- package/packages/orq-rc/src/hooks/types.ts +0 -112
- package/packages/orq-rc/src/index.ts +0 -9
- package/packages/orq-rc/src/lib/base64.ts +0 -37
- package/packages/orq-rc/src/lib/config.ts +0 -74
- package/packages/orq-rc/src/lib/dlv.ts +0 -53
- package/packages/orq-rc/src/lib/encodings.ts +0 -483
- package/packages/orq-rc/src/lib/env.ts +0 -73
- package/packages/orq-rc/src/lib/event-streams.ts +0 -264
- package/packages/orq-rc/src/lib/files.ts +0 -82
- package/packages/orq-rc/src/lib/http.ts +0 -323
- package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
- package/packages/orq-rc/src/lib/logger.ts +0 -9
- package/packages/orq-rc/src/lib/matchers.ts +0 -348
- package/packages/orq-rc/src/lib/primitives.ts +0 -150
- package/packages/orq-rc/src/lib/retries.ts +0 -218
- package/packages/orq-rc/src/lib/schemas.ts +0 -91
- package/packages/orq-rc/src/lib/sdks.ts +0 -407
- package/packages/orq-rc/src/lib/security.ts +0 -261
- package/packages/orq-rc/src/lib/url.ts +0 -33
- package/packages/orq-rc/src/mcp-server/cli/start/command.ts +0 -125
- package/packages/orq-rc/src/mcp-server/cli/start/impl.ts +0 -140
- package/packages/orq-rc/src/mcp-server/cli.ts +0 -13
- package/packages/orq-rc/src/mcp-server/console-logger.ts +0 -71
- package/packages/orq-rc/src/mcp-server/extensions.ts +0 -17
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +0 -26
- package/packages/orq-rc/src/mcp-server/prompts.ts +0 -117
- package/packages/orq-rc/src/mcp-server/resources.ts +0 -172
- package/packages/orq-rc/src/mcp-server/scopes.ts +0 -7
- package/packages/orq-rc/src/mcp-server/server.ts +0 -249
- package/packages/orq-rc/src/mcp-server/shared.ts +0 -75
- package/packages/orq-rc/src/mcp-server/tools/contactsCreate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/contactsDelete.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/contactsList.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/contactsRetrieve.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/contactsUpdate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsClear.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/datasetsCreate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoint.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsDelete.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/datasetsDeleteDatapoint.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/datasetsList.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsListDatapoints.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieve.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieveDatapoint.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsUpdate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/datasetsUpdateDatapoint.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/deploymentsGetConfig.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/deploymentsInvoke.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/deploymentsList.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/deploymentsStream.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/evalsAgeAppropriate.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsAll.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsBertScore.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsBleuScore.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsBotDetection.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsContains.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsAll.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsAny.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsEmail.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsNone.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsUrl.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsContainsValidLink.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsCreate.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsDelete.ts +0 -33
- package/packages/orq-rc/src/mcp-server/tools/evalsEndsWith.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsExactMatch.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsFactCheckingKnowledgeBase.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/evalsGrammar.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsInvoke.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsLengthBetween.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsLengthGreaterThan.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsLengthLessThan.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsLocalization.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsPii.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasCoherence.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasConciseness.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextEntitiesRecall.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextPrecision.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextRecall.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasCorrectness.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasFaithfulness.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasHarmfulness.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasMaliciousness.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasNoiseSensitivity.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasSummarization.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsSentimentClassification.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools/evalsSummarization.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsToneOfVoice.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsTranslation.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsUpdate.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/evalsValidJson.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/feedbackCreate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/filesCreate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/filesDelete.ts +0 -33
- package/packages/orq-rc/src/mcp-server/tools/filesGet.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/filesList.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateChunks.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateDatasource.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/knowledgeDelete.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunk.ts +0 -33
- package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteDatasource.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/knowledgeList.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunks.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/knowledgeListDatasources.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieve.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveChunk.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveDatasource.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/knowledgeSearch.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdate.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateChunk.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateDatasource.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/modelsList.ts +0 -30
- package/packages/orq-rc/src/mcp-server/tools/promptsCreate.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/promptsDelete.ts +0 -33
- package/packages/orq-rc/src/mcp-server/tools/promptsGetVersion.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/promptsList.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/promptsListVersions.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/promptsRetrieve.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/promptsUpdate.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/remoteconfigsRetrieve.ts +0 -36
- package/packages/orq-rc/src/mcp-server/tools.ts +0 -129
- package/packages/orq-rc/src/models/components/deployments.ts +0 -7289
- package/packages/orq-rc/src/models/components/index.ts +0 -6
- package/packages/orq-rc/src/models/components/security.ts +0 -71
- package/packages/orq-rc/src/models/errors/apierror.ts +0 -34
- package/packages/orq-rc/src/models/errors/createeval.ts +0 -82
- package/packages/orq-rc/src/models/errors/deletecontact.ts +0 -91
- package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -82
- package/packages/orq-rc/src/models/errors/evalsageappropriate.ts +0 -160
- package/packages/orq-rc/src/models/errors/evalsbertscore.ts +0 -158
- package/packages/orq-rc/src/models/errors/evalsbleuscore.ts +0 -158
- package/packages/orq-rc/src/models/errors/evalsbotdetection.ts +0 -159
- package/packages/orq-rc/src/models/errors/evalscontains.ts +0 -158
- package/packages/orq-rc/src/models/errors/evalscontainsall.ts +0 -159
- package/packages/orq-rc/src/models/errors/evalscontainsany.ts +0 -159
- package/packages/orq-rc/src/models/errors/evalscontainsemail.ts +0 -160
- package/packages/orq-rc/src/models/errors/evalscontainsnone.ts +0 -159
- package/packages/orq-rc/src/models/errors/evalscontainsurl.ts +0 -159
- package/packages/orq-rc/src/models/errors/evalscontainsvalidlink.ts +0 -161
- package/packages/orq-rc/src/models/errors/evalsendswith.ts +0 -158
- package/packages/orq-rc/src/models/errors/evalsexactmatch.ts +0 -158
- package/packages/orq-rc/src/models/errors/evalsfactcheckingknowledgebase.ts +0 -164
- package/packages/orq-rc/src/models/errors/evalsgrammar.ts +0 -158
- package/packages/orq-rc/src/models/errors/evalslengthbetween.ts +0 -160
- package/packages/orq-rc/src/models/errors/evalslengthgreaterthan.ts +0 -161
- package/packages/orq-rc/src/models/errors/evalslengthlessthan.ts +0 -160
- package/packages/orq-rc/src/models/errors/evalslocalization.ts +0 -159
- package/packages/orq-rc/src/models/errors/evalspii.ts +0 -158
- package/packages/orq-rc/src/models/errors/evalsragascoherence.ts +0 -160
- package/packages/orq-rc/src/models/errors/evalsragasconciseness.ts +0 -161
- package/packages/orq-rc/src/models/errors/evalsragascontextentitiesrecall.ts +0 -167
- package/packages/orq-rc/src/models/errors/evalsragascontextprecision.ts +0 -164
- package/packages/orq-rc/src/models/errors/evalsragascontextrecall.ts +0 -162
- package/packages/orq-rc/src/models/errors/evalsragascorrectness.ts +0 -161
- package/packages/orq-rc/src/models/errors/evalsragasfaithfulness.ts +0 -161
- package/packages/orq-rc/src/models/errors/evalsragasharmfulness.ts +0 -161
- package/packages/orq-rc/src/models/errors/evalsragasmaliciousness.ts +0 -162
- package/packages/orq-rc/src/models/errors/evalsragasnoisesensitivity.ts +0 -164
- package/packages/orq-rc/src/models/errors/evalsragasresponserelevancy.ts +0 -164
- package/packages/orq-rc/src/models/errors/evalsragassummarization.ts +0 -162
- package/packages/orq-rc/src/models/errors/evalssentimentclassification.ts +0 -164
- package/packages/orq-rc/src/models/errors/evalssummarization.ts +0 -160
- package/packages/orq-rc/src/models/errors/evalstoneofvoice.ts +0 -159
- package/packages/orq-rc/src/models/errors/evalstranslation.ts +0 -159
- package/packages/orq-rc/src/models/errors/evalsvalidjson.ts +0 -158
- package/packages/orq-rc/src/models/errors/getevals.ts +0 -82
- package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -82
- package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -92
- package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
- package/packages/orq-rc/src/models/errors/index.ts +0 -56
- package/packages/orq-rc/src/models/errors/invokeeval.ts +0 -158
- package/packages/orq-rc/src/models/errors/orqerror.ts +0 -35
- package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +0 -50
- package/packages/orq-rc/src/models/errors/retrievecontact.ts +0 -91
- package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -109
- package/packages/orq-rc/src/models/errors/updatecontact.ts +0 -85
- package/packages/orq-rc/src/models/errors/updateeval.ts +0 -82
- package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -82
- package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -75
- package/packages/orq-rc/src/models/operations/createchunk.ts +0 -428
- package/packages/orq-rc/src/models/operations/createcontact.ts +0 -267
- package/packages/orq-rc/src/models/operations/createdataset.ts +0 -296
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -5222
- package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -852
- package/packages/orq-rc/src/models/operations/createeval.ts +0 -3830
- package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
- package/packages/orq-rc/src/models/operations/createprompt.ts +0 -4083
- package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -96
- package/packages/orq-rc/src/models/operations/deletecontact.ts +0 -69
- package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -81
- package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -75
- package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -87
- package/packages/orq-rc/src/models/operations/deleteeval.ts +0 -66
- package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -78
- package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
- package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -5439
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -9379
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1256
- package/packages/orq-rc/src/models/operations/deployments.ts +0 -2328
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -9499
- package/packages/orq-rc/src/models/operations/evalsageappropriate.ts +0 -253
- package/packages/orq-rc/src/models/operations/evalsbertscore.ts +0 -197
- package/packages/orq-rc/src/models/operations/evalsbleuscore.ts +0 -131
- package/packages/orq-rc/src/models/operations/evalsbotdetection.ts +0 -249
- package/packages/orq-rc/src/models/operations/evalscontains.ts +0 -250
- package/packages/orq-rc/src/models/operations/evalscontainsall.ts +0 -248
- package/packages/orq-rc/src/models/operations/evalscontainsany.ts +0 -254
- package/packages/orq-rc/src/models/operations/evalscontainsemail.ts +0 -181
- package/packages/orq-rc/src/models/operations/evalscontainsnone.ts +0 -254
- package/packages/orq-rc/src/models/operations/evalscontainsurl.ts +0 -181
- package/packages/orq-rc/src/models/operations/evalscontainsvalidlink.ts +0 -186
- package/packages/orq-rc/src/models/operations/evalsendswith.ts +0 -250
- package/packages/orq-rc/src/models/operations/evalsexactmatch.ts +0 -183
- package/packages/orq-rc/src/models/operations/evalsfactcheckingknowledgebase.ts +0 -299
- package/packages/orq-rc/src/models/operations/evalsgrammar.ts +0 -243
- package/packages/orq-rc/src/models/operations/evalslengthbetween.ts +0 -268
- package/packages/orq-rc/src/models/operations/evalslengthgreaterthan.ts +0 -266
- package/packages/orq-rc/src/models/operations/evalslengthlessthan.ts +0 -259
- package/packages/orq-rc/src/models/operations/evalslocalization.ts +0 -253
- package/packages/orq-rc/src/models/operations/evalspii.ts +0 -243
- package/packages/orq-rc/src/models/operations/evalsragascoherence.ts +0 -152
- package/packages/orq-rc/src/models/operations/evalsragasconciseness.ts +0 -153
- package/packages/orq-rc/src/models/operations/evalsragascontextentitiesrecall.ts +0 -164
- package/packages/orq-rc/src/models/operations/evalsragascontextprecision.ts +0 -166
- package/packages/orq-rc/src/models/operations/evalsragascontextrecall.ts +0 -164
- package/packages/orq-rc/src/models/operations/evalsragascorrectness.ts +0 -153
- package/packages/orq-rc/src/models/operations/evalsragasfaithfulness.ts +0 -155
- package/packages/orq-rc/src/models/operations/evalsragasharmfulness.ts +0 -146
- package/packages/orq-rc/src/models/operations/evalsragasmaliciousness.ts +0 -157
- package/packages/orq-rc/src/models/operations/evalsragasnoisesensitivity.ts +0 -166
- package/packages/orq-rc/src/models/operations/evalsragasresponserelevancy.ts +0 -165
- package/packages/orq-rc/src/models/operations/evalsragassummarization.ts +0 -150
- package/packages/orq-rc/src/models/operations/evalssentimentclassification.ts +0 -285
- package/packages/orq-rc/src/models/operations/evalssummarization.ts +0 -253
- package/packages/orq-rc/src/models/operations/evalstoneofvoice.ts +0 -251
- package/packages/orq-rc/src/models/operations/evalstranslation.ts +0 -251
- package/packages/orq-rc/src/models/operations/evalsvalidjson.ts +0 -177
- package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
- package/packages/orq-rc/src/models/operations/fileget.ts +0 -223
- package/packages/orq-rc/src/models/operations/filelist.ts +0 -337
- package/packages/orq-rc/src/models/operations/fileupload.ts +0 -327
- package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2296
- package/packages/orq-rc/src/models/operations/getevals.ts +0 -6163
- package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -315
- package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -537
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -2157
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -2162
- package/packages/orq-rc/src/models/operations/index.ts +0 -97
- package/packages/orq-rc/src/models/operations/invokeeval.ts +0 -2520
- package/packages/orq-rc/src/models/operations/listchunks.ts +0 -494
- package/packages/orq-rc/src/models/operations/listcontacts.ts +0 -490
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -2784
- package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -406
- package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -447
- package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -663
- package/packages/orq-rc/src/models/operations/listmodels.ts +0 -273
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2294
- package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +0 -210
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -2586
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -288
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -273
- package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -3367
- package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -448
- package/packages/orq-rc/src/models/operations/updatecontact.ts +0 -325
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -5155
- package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -393
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -345
- package/packages/orq-rc/src/models/operations/updateeval.ts +0 -4131
- package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -920
- package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -4220
- package/packages/orq-rc/src/sdk/contacts.ts +0 -99
- package/packages/orq-rc/src/sdk/datasets.ts +0 -204
- package/packages/orq-rc/src/sdk/deployments.ts +0 -89
- package/packages/orq-rc/src/sdk/evals.ts +0 -639
- package/packages/orq-rc/src/sdk/feedback.ts +0 -27
- package/packages/orq-rc/src/sdk/files.ts +0 -78
- package/packages/orq-rc/src/sdk/index.ts +0 -5
- package/packages/orq-rc/src/sdk/knowledge.ts +0 -267
- package/packages/orq-rc/src/sdk/metrics.ts +0 -27
- package/packages/orq-rc/src/sdk/models.ts +0 -25
- package/packages/orq-rc/src/sdk/prompts.ts +0 -126
- package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
- package/packages/orq-rc/src/sdk/sdk.ts +0 -67
- package/packages/orq-rc/src/types/async.ts +0 -68
- package/packages/orq-rc/src/types/blobs.ts +0 -31
- package/packages/orq-rc/src/types/constdatetime.ts +0 -15
- package/packages/orq-rc/src/types/enums.ts +0 -16
- package/packages/orq-rc/src/types/fp.ts +0 -50
- package/packages/orq-rc/src/types/index.ts +0 -11
- package/packages/orq-rc/src/types/operations.ts +0 -105
- package/packages/orq-rc/src/types/rfcdate.ts +0 -54
- package/packages/orq-rc/src/types/streams.ts +0 -21
- package/packages/orq-rc/tsconfig.json +0 -41
- package/src/funcs/knowledgeCreate.ts +0 -158
- package/src/mcp-server/tools/knowledgeCreate.ts +0 -35
- package/src/models/operations/createknowledge.ts +0 -846
- /package/{packages/orq-rc/src → src}/funcs/knowledgeChunkText.ts +0 -0
- /package/{packages/orq-rc/src → src}/mcp-server/tools/knowledgeChunkText.ts +0 -0
- /package/{packages/orq-rc/src → src}/models/operations/chunktext.ts +0 -0
|
@@ -0,0 +1,884 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.Threshold2$inboundSchema = exports.SemanticChunker$ = exports.SemanticChunker$outboundSchema = exports.SemanticChunker$inboundSchema = exports.ChunkTextChunkingRequestKnowledgeReturnType$ = exports.ChunkTextChunkingRequestKnowledgeReturnType$outboundSchema = exports.ChunkTextChunkingRequestKnowledgeReturnType$inboundSchema = exports.SDPMChunkerStrategy$ = exports.SDPMChunkerStrategy$outboundSchema = exports.SDPMChunkerStrategy$inboundSchema = exports.ChunkingRequestMode$ = exports.ChunkingRequestMode$outboundSchema = exports.ChunkingRequestMode$inboundSchema = exports.ChunkingRequestThreshold$ = exports.ChunkingRequestThreshold$outboundSchema = exports.ChunkingRequestThreshold$inboundSchema = exports.ChunkTextThreshold2$ = exports.ChunkTextThreshold2$outboundSchema = exports.ChunkTextThreshold2$inboundSchema = exports.SDPMChunker$ = exports.SDPMChunker$outboundSchema = exports.SDPMChunker$inboundSchema = exports.ChunkTextChunkingRequestKnowledgeRequestReturnType$ = exports.ChunkTextChunkingRequestKnowledgeRequestReturnType$outboundSchema = exports.ChunkTextChunkingRequestKnowledgeRequestReturnType$inboundSchema = exports.AgenticChunkerStrategy$ = exports.AgenticChunkerStrategy$outboundSchema = exports.AgenticChunkerStrategy$inboundSchema = exports.AgenticChunker$ = exports.AgenticChunker$outboundSchema = exports.AgenticChunker$inboundSchema = exports.ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$ = exports.ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$outboundSchema = exports.ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$inboundSchema = exports.TokenChunker = exports.ReturnTypeT = exports.SentenceChunker = exports.ChunkingRequestReturnType = exports.RecursiveChunker = exports.ChunkTextChunkingRequestReturnType = exports.Mode = exports.Threshold2 = exports.SemanticChunker = exports.ChunkTextChunkingRequestKnowledgeReturnType = exports.ChunkingRequestMode = exports.ChunkTextThreshold2 = exports.SDPMChunker = exports.ChunkTextChunkingRequestKnowledgeRequestReturnType = exports.AgenticChunker = exports.ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType = void 0;
|
|
40
|
+
exports.ChunkTextResponseBody$ = exports.ChunkTextResponseBody$outboundSchema = exports.ChunkTextResponseBody$inboundSchema = exports.Chunks$ = exports.Chunks$outboundSchema = exports.Chunks$inboundSchema = exports.ChunkTextMetadata$ = exports.ChunkTextMetadata$outboundSchema = exports.ChunkTextMetadata$inboundSchema = exports.ChunkTextChunkingRequest$ = exports.ChunkTextChunkingRequest$outboundSchema = exports.ChunkTextChunkingRequest$inboundSchema = exports.TokenChunkerStrategy$ = exports.TokenChunkerStrategy$outboundSchema = exports.TokenChunkerStrategy$inboundSchema = exports.TokenChunker$ = exports.TokenChunker$outboundSchema = exports.TokenChunker$inboundSchema = exports.ReturnTypeT$ = exports.ReturnTypeT$outboundSchema = exports.ReturnTypeT$inboundSchema = exports.SentenceChunkerStrategy$ = exports.SentenceChunkerStrategy$outboundSchema = exports.SentenceChunkerStrategy$inboundSchema = exports.SentenceChunker$ = exports.SentenceChunker$outboundSchema = exports.SentenceChunker$inboundSchema = exports.ChunkingRequestReturnType$ = exports.ChunkingRequestReturnType$outboundSchema = exports.ChunkingRequestReturnType$inboundSchema = exports.RecursiveChunkerStrategy$ = exports.RecursiveChunkerStrategy$outboundSchema = exports.RecursiveChunkerStrategy$inboundSchema = exports.RecursiveChunker$ = exports.RecursiveChunker$outboundSchema = exports.RecursiveChunker$inboundSchema = exports.ChunkTextChunkingRequestReturnType$ = exports.ChunkTextChunkingRequestReturnType$outboundSchema = exports.ChunkTextChunkingRequestReturnType$inboundSchema = exports.SemanticChunkerStrategy$ = exports.SemanticChunkerStrategy$outboundSchema = exports.SemanticChunkerStrategy$inboundSchema = exports.Mode$ = exports.Mode$outboundSchema = exports.Mode$inboundSchema = exports.Threshold$ = exports.Threshold$outboundSchema = exports.Threshold$inboundSchema = exports.Threshold2$ = exports.Threshold2$outboundSchema = void 0;
|
|
41
|
+
exports.agenticChunkerStrategyToJSON = agenticChunkerStrategyToJSON;
|
|
42
|
+
exports.agenticChunkerStrategyFromJSON = agenticChunkerStrategyFromJSON;
|
|
43
|
+
exports.chunkingRequestThresholdToJSON = chunkingRequestThresholdToJSON;
|
|
44
|
+
exports.chunkingRequestThresholdFromJSON = chunkingRequestThresholdFromJSON;
|
|
45
|
+
exports.sdpmChunkerStrategyToJSON = sdpmChunkerStrategyToJSON;
|
|
46
|
+
exports.sdpmChunkerStrategyFromJSON = sdpmChunkerStrategyFromJSON;
|
|
47
|
+
exports.thresholdToJSON = thresholdToJSON;
|
|
48
|
+
exports.thresholdFromJSON = thresholdFromJSON;
|
|
49
|
+
exports.semanticChunkerStrategyToJSON = semanticChunkerStrategyToJSON;
|
|
50
|
+
exports.semanticChunkerStrategyFromJSON = semanticChunkerStrategyFromJSON;
|
|
51
|
+
exports.recursiveChunkerStrategyToJSON = recursiveChunkerStrategyToJSON;
|
|
52
|
+
exports.recursiveChunkerStrategyFromJSON = recursiveChunkerStrategyFromJSON;
|
|
53
|
+
exports.sentenceChunkerStrategyToJSON = sentenceChunkerStrategyToJSON;
|
|
54
|
+
exports.sentenceChunkerStrategyFromJSON = sentenceChunkerStrategyFromJSON;
|
|
55
|
+
exports.tokenChunkerStrategyToJSON = tokenChunkerStrategyToJSON;
|
|
56
|
+
exports.tokenChunkerStrategyFromJSON = tokenChunkerStrategyFromJSON;
|
|
57
|
+
exports.chunkTextChunkingRequestToJSON = chunkTextChunkingRequestToJSON;
|
|
58
|
+
exports.chunkTextChunkingRequestFromJSON = chunkTextChunkingRequestFromJSON;
|
|
59
|
+
exports.chunkTextMetadataToJSON = chunkTextMetadataToJSON;
|
|
60
|
+
exports.chunkTextMetadataFromJSON = chunkTextMetadataFromJSON;
|
|
61
|
+
exports.chunksToJSON = chunksToJSON;
|
|
62
|
+
exports.chunksFromJSON = chunksFromJSON;
|
|
63
|
+
exports.chunkTextResponseBodyToJSON = chunkTextResponseBodyToJSON;
|
|
64
|
+
exports.chunkTextResponseBodyFromJSON = chunkTextResponseBodyFromJSON;
|
|
65
|
+
const z = __importStar(require("zod"));
|
|
66
|
+
const primitives_js_1 = require("../../lib/primitives.js");
|
|
67
|
+
const schemas_js_1 = require("../../lib/schemas.js");
|
|
68
|
+
/**
|
|
69
|
+
* Return format: chunks (with metadata) or texts (plain strings)
|
|
70
|
+
*/
|
|
71
|
+
exports.ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType = {
|
|
72
|
+
Chunks: "chunks",
|
|
73
|
+
Texts: "texts",
|
|
74
|
+
};
|
|
75
|
+
exports.AgenticChunker = {
|
|
76
|
+
Agentic: "agentic",
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Return format: chunks (with metadata) or texts (plain strings)
|
|
80
|
+
*/
|
|
81
|
+
exports.ChunkTextChunkingRequestKnowledgeRequestReturnType = {
|
|
82
|
+
Chunks: "chunks",
|
|
83
|
+
Texts: "texts",
|
|
84
|
+
};
|
|
85
|
+
exports.SDPMChunker = {
|
|
86
|
+
Sdpm: "sdpm",
|
|
87
|
+
};
|
|
88
|
+
exports.ChunkTextThreshold2 = {
|
|
89
|
+
Auto: "auto",
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Chunking mode: window-based or sentence-based similarity
|
|
93
|
+
*/
|
|
94
|
+
exports.ChunkingRequestMode = {
|
|
95
|
+
Window: "window",
|
|
96
|
+
Sentence: "sentence",
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Return format: chunks (with metadata) or texts (plain strings)
|
|
100
|
+
*/
|
|
101
|
+
exports.ChunkTextChunkingRequestKnowledgeReturnType = {
|
|
102
|
+
Chunks: "chunks",
|
|
103
|
+
Texts: "texts",
|
|
104
|
+
};
|
|
105
|
+
exports.SemanticChunker = {
|
|
106
|
+
Semantic: "semantic",
|
|
107
|
+
};
|
|
108
|
+
exports.Threshold2 = {
|
|
109
|
+
Auto: "auto",
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Chunking mode: window-based or sentence-based similarity
|
|
113
|
+
*/
|
|
114
|
+
exports.Mode = {
|
|
115
|
+
Window: "window",
|
|
116
|
+
Sentence: "sentence",
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Return format: chunks (with metadata) or texts (plain strings)
|
|
120
|
+
*/
|
|
121
|
+
exports.ChunkTextChunkingRequestReturnType = {
|
|
122
|
+
Chunks: "chunks",
|
|
123
|
+
Texts: "texts",
|
|
124
|
+
};
|
|
125
|
+
exports.RecursiveChunker = {
|
|
126
|
+
Recursive: "recursive",
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Return format: chunks (with metadata) or texts (plain strings)
|
|
130
|
+
*/
|
|
131
|
+
exports.ChunkingRequestReturnType = {
|
|
132
|
+
Chunks: "chunks",
|
|
133
|
+
Texts: "texts",
|
|
134
|
+
};
|
|
135
|
+
exports.SentenceChunker = {
|
|
136
|
+
Sentence: "sentence",
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Return format: chunks (with metadata) or texts (plain strings)
|
|
140
|
+
*/
|
|
141
|
+
exports.ReturnTypeT = {
|
|
142
|
+
Chunks: "chunks",
|
|
143
|
+
Texts: "texts",
|
|
144
|
+
};
|
|
145
|
+
exports.TokenChunker = {
|
|
146
|
+
Token: "token",
|
|
147
|
+
};
|
|
148
|
+
/** @internal */
|
|
149
|
+
exports.ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$inboundSchema = z.nativeEnum(exports.ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType);
|
|
150
|
+
/** @internal */
|
|
151
|
+
exports.ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$outboundSchema = exports.ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$inboundSchema;
|
|
152
|
+
/**
|
|
153
|
+
* @internal
|
|
154
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
155
|
+
*/
|
|
156
|
+
var ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$;
|
|
157
|
+
(function (ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$) {
|
|
158
|
+
/** @deprecated use `ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$inboundSchema` instead. */
|
|
159
|
+
ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$.inboundSchema = exports.ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$inboundSchema;
|
|
160
|
+
/** @deprecated use `ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$outboundSchema` instead. */
|
|
161
|
+
ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$.outboundSchema = exports.ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$outboundSchema;
|
|
162
|
+
})(ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$ || (exports.ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$ = ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$ = {}));
|
|
163
|
+
/** @internal */
|
|
164
|
+
exports.AgenticChunker$inboundSchema = z.nativeEnum(exports.AgenticChunker);
|
|
165
|
+
/** @internal */
|
|
166
|
+
exports.AgenticChunker$outboundSchema = exports.AgenticChunker$inboundSchema;
|
|
167
|
+
/**
|
|
168
|
+
* @internal
|
|
169
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
170
|
+
*/
|
|
171
|
+
var AgenticChunker$;
|
|
172
|
+
(function (AgenticChunker$) {
|
|
173
|
+
/** @deprecated use `AgenticChunker$inboundSchema` instead. */
|
|
174
|
+
AgenticChunker$.inboundSchema = exports.AgenticChunker$inboundSchema;
|
|
175
|
+
/** @deprecated use `AgenticChunker$outboundSchema` instead. */
|
|
176
|
+
AgenticChunker$.outboundSchema = exports.AgenticChunker$outboundSchema;
|
|
177
|
+
})(AgenticChunker$ || (exports.AgenticChunker$ = AgenticChunker$ = {}));
|
|
178
|
+
/** @internal */
|
|
179
|
+
exports.AgenticChunkerStrategy$inboundSchema = z.object({
|
|
180
|
+
text: z.string(),
|
|
181
|
+
metadata: z.boolean().default(true),
|
|
182
|
+
return_type: exports.ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$inboundSchema
|
|
183
|
+
.default("chunks"),
|
|
184
|
+
strategy: exports.AgenticChunker$inboundSchema,
|
|
185
|
+
model: z.string(),
|
|
186
|
+
chunk_size: z.number().int().default(1024),
|
|
187
|
+
candidate_size: z.number().int().default(128),
|
|
188
|
+
min_characters_per_chunk: z.number().int().default(24),
|
|
189
|
+
}).transform((v) => {
|
|
190
|
+
return (0, primitives_js_1.remap)(v, {
|
|
191
|
+
"return_type": "returnType",
|
|
192
|
+
"chunk_size": "chunkSize",
|
|
193
|
+
"candidate_size": "candidateSize",
|
|
194
|
+
"min_characters_per_chunk": "minCharactersPerChunk",
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
/** @internal */
|
|
198
|
+
exports.AgenticChunkerStrategy$outboundSchema = z.object({
|
|
199
|
+
text: z.string(),
|
|
200
|
+
metadata: z.boolean().default(true),
|
|
201
|
+
returnType: exports.ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$outboundSchema
|
|
202
|
+
.default("chunks"),
|
|
203
|
+
strategy: exports.AgenticChunker$outboundSchema,
|
|
204
|
+
model: z.string(),
|
|
205
|
+
chunkSize: z.number().int().default(1024),
|
|
206
|
+
candidateSize: z.number().int().default(128),
|
|
207
|
+
minCharactersPerChunk: z.number().int().default(24),
|
|
208
|
+
}).transform((v) => {
|
|
209
|
+
return (0, primitives_js_1.remap)(v, {
|
|
210
|
+
returnType: "return_type",
|
|
211
|
+
chunkSize: "chunk_size",
|
|
212
|
+
candidateSize: "candidate_size",
|
|
213
|
+
minCharactersPerChunk: "min_characters_per_chunk",
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
/**
|
|
217
|
+
* @internal
|
|
218
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
219
|
+
*/
|
|
220
|
+
var AgenticChunkerStrategy$;
|
|
221
|
+
(function (AgenticChunkerStrategy$) {
|
|
222
|
+
/** @deprecated use `AgenticChunkerStrategy$inboundSchema` instead. */
|
|
223
|
+
AgenticChunkerStrategy$.inboundSchema = exports.AgenticChunkerStrategy$inboundSchema;
|
|
224
|
+
/** @deprecated use `AgenticChunkerStrategy$outboundSchema` instead. */
|
|
225
|
+
AgenticChunkerStrategy$.outboundSchema = exports.AgenticChunkerStrategy$outboundSchema;
|
|
226
|
+
})(AgenticChunkerStrategy$ || (exports.AgenticChunkerStrategy$ = AgenticChunkerStrategy$ = {}));
|
|
227
|
+
function agenticChunkerStrategyToJSON(agenticChunkerStrategy) {
|
|
228
|
+
return JSON.stringify(exports.AgenticChunkerStrategy$outboundSchema.parse(agenticChunkerStrategy));
|
|
229
|
+
}
|
|
230
|
+
function agenticChunkerStrategyFromJSON(jsonString) {
|
|
231
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AgenticChunkerStrategy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgenticChunkerStrategy' from JSON`);
|
|
232
|
+
}
|
|
233
|
+
/** @internal */
|
|
234
|
+
exports.ChunkTextChunkingRequestKnowledgeRequestReturnType$inboundSchema = z
|
|
235
|
+
.nativeEnum(exports.ChunkTextChunkingRequestKnowledgeRequestReturnType);
|
|
236
|
+
/** @internal */
|
|
237
|
+
exports.ChunkTextChunkingRequestKnowledgeRequestReturnType$outboundSchema = exports.ChunkTextChunkingRequestKnowledgeRequestReturnType$inboundSchema;
|
|
238
|
+
/**
|
|
239
|
+
* @internal
|
|
240
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
241
|
+
*/
|
|
242
|
+
var ChunkTextChunkingRequestKnowledgeRequestReturnType$;
|
|
243
|
+
(function (ChunkTextChunkingRequestKnowledgeRequestReturnType$) {
|
|
244
|
+
/** @deprecated use `ChunkTextChunkingRequestKnowledgeRequestReturnType$inboundSchema` instead. */
|
|
245
|
+
ChunkTextChunkingRequestKnowledgeRequestReturnType$.inboundSchema = exports.ChunkTextChunkingRequestKnowledgeRequestReturnType$inboundSchema;
|
|
246
|
+
/** @deprecated use `ChunkTextChunkingRequestKnowledgeRequestReturnType$outboundSchema` instead. */
|
|
247
|
+
ChunkTextChunkingRequestKnowledgeRequestReturnType$.outboundSchema = exports.ChunkTextChunkingRequestKnowledgeRequestReturnType$outboundSchema;
|
|
248
|
+
})(ChunkTextChunkingRequestKnowledgeRequestReturnType$ || (exports.ChunkTextChunkingRequestKnowledgeRequestReturnType$ = ChunkTextChunkingRequestKnowledgeRequestReturnType$ = {}));
|
|
249
|
+
/** @internal */
|
|
250
|
+
exports.SDPMChunker$inboundSchema = z
|
|
251
|
+
.nativeEnum(exports.SDPMChunker);
|
|
252
|
+
/** @internal */
|
|
253
|
+
exports.SDPMChunker$outboundSchema = exports.SDPMChunker$inboundSchema;
|
|
254
|
+
/**
|
|
255
|
+
* @internal
|
|
256
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
257
|
+
*/
|
|
258
|
+
var SDPMChunker$;
|
|
259
|
+
(function (SDPMChunker$) {
|
|
260
|
+
/** @deprecated use `SDPMChunker$inboundSchema` instead. */
|
|
261
|
+
SDPMChunker$.inboundSchema = exports.SDPMChunker$inboundSchema;
|
|
262
|
+
/** @deprecated use `SDPMChunker$outboundSchema` instead. */
|
|
263
|
+
SDPMChunker$.outboundSchema = exports.SDPMChunker$outboundSchema;
|
|
264
|
+
})(SDPMChunker$ || (exports.SDPMChunker$ = SDPMChunker$ = {}));
|
|
265
|
+
/** @internal */
|
|
266
|
+
exports.ChunkTextThreshold2$inboundSchema = z.nativeEnum(exports.ChunkTextThreshold2);
|
|
267
|
+
/** @internal */
|
|
268
|
+
exports.ChunkTextThreshold2$outboundSchema = exports.ChunkTextThreshold2$inboundSchema;
|
|
269
|
+
/**
|
|
270
|
+
* @internal
|
|
271
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
272
|
+
*/
|
|
273
|
+
var ChunkTextThreshold2$;
|
|
274
|
+
(function (ChunkTextThreshold2$) {
|
|
275
|
+
/** @deprecated use `ChunkTextThreshold2$inboundSchema` instead. */
|
|
276
|
+
ChunkTextThreshold2$.inboundSchema = exports.ChunkTextThreshold2$inboundSchema;
|
|
277
|
+
/** @deprecated use `ChunkTextThreshold2$outboundSchema` instead. */
|
|
278
|
+
ChunkTextThreshold2$.outboundSchema = exports.ChunkTextThreshold2$outboundSchema;
|
|
279
|
+
})(ChunkTextThreshold2$ || (exports.ChunkTextThreshold2$ = ChunkTextThreshold2$ = {}));
|
|
280
|
+
/** @internal */
|
|
281
|
+
exports.ChunkingRequestThreshold$inboundSchema = z.union([z.number(), exports.ChunkTextThreshold2$inboundSchema]);
|
|
282
|
+
/** @internal */
|
|
283
|
+
exports.ChunkingRequestThreshold$outboundSchema = z.union([z.number(), exports.ChunkTextThreshold2$outboundSchema]);
|
|
284
|
+
/**
|
|
285
|
+
* @internal
|
|
286
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
287
|
+
*/
|
|
288
|
+
var ChunkingRequestThreshold$;
|
|
289
|
+
(function (ChunkingRequestThreshold$) {
|
|
290
|
+
/** @deprecated use `ChunkingRequestThreshold$inboundSchema` instead. */
|
|
291
|
+
ChunkingRequestThreshold$.inboundSchema = exports.ChunkingRequestThreshold$inboundSchema;
|
|
292
|
+
/** @deprecated use `ChunkingRequestThreshold$outboundSchema` instead. */
|
|
293
|
+
ChunkingRequestThreshold$.outboundSchema = exports.ChunkingRequestThreshold$outboundSchema;
|
|
294
|
+
})(ChunkingRequestThreshold$ || (exports.ChunkingRequestThreshold$ = ChunkingRequestThreshold$ = {}));
|
|
295
|
+
function chunkingRequestThresholdToJSON(chunkingRequestThreshold) {
|
|
296
|
+
return JSON.stringify(exports.ChunkingRequestThreshold$outboundSchema.parse(chunkingRequestThreshold));
|
|
297
|
+
}
|
|
298
|
+
function chunkingRequestThresholdFromJSON(jsonString) {
|
|
299
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ChunkingRequestThreshold$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChunkingRequestThreshold' from JSON`);
|
|
300
|
+
}
|
|
301
|
+
/** @internal */
|
|
302
|
+
exports.ChunkingRequestMode$inboundSchema = z.nativeEnum(exports.ChunkingRequestMode);
|
|
303
|
+
/** @internal */
|
|
304
|
+
exports.ChunkingRequestMode$outboundSchema = exports.ChunkingRequestMode$inboundSchema;
|
|
305
|
+
/**
|
|
306
|
+
* @internal
|
|
307
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
308
|
+
*/
|
|
309
|
+
var ChunkingRequestMode$;
|
|
310
|
+
(function (ChunkingRequestMode$) {
|
|
311
|
+
/** @deprecated use `ChunkingRequestMode$inboundSchema` instead. */
|
|
312
|
+
ChunkingRequestMode$.inboundSchema = exports.ChunkingRequestMode$inboundSchema;
|
|
313
|
+
/** @deprecated use `ChunkingRequestMode$outboundSchema` instead. */
|
|
314
|
+
ChunkingRequestMode$.outboundSchema = exports.ChunkingRequestMode$outboundSchema;
|
|
315
|
+
})(ChunkingRequestMode$ || (exports.ChunkingRequestMode$ = ChunkingRequestMode$ = {}));
|
|
316
|
+
/** @internal */
|
|
317
|
+
exports.SDPMChunkerStrategy$inboundSchema = z.object({
|
|
318
|
+
text: z.string(),
|
|
319
|
+
metadata: z.boolean().default(true),
|
|
320
|
+
return_type: exports.ChunkTextChunkingRequestKnowledgeRequestReturnType$inboundSchema
|
|
321
|
+
.default("chunks"),
|
|
322
|
+
strategy: exports.SDPMChunker$inboundSchema,
|
|
323
|
+
chunk_size: z.number().int().default(512),
|
|
324
|
+
skip_window: z.number().int().default(1),
|
|
325
|
+
threshold: z.union([z.number(), exports.ChunkTextThreshold2$inboundSchema])
|
|
326
|
+
.optional(),
|
|
327
|
+
embedding_model: z.string(),
|
|
328
|
+
mode: exports.ChunkingRequestMode$inboundSchema.default("window"),
|
|
329
|
+
}).transform((v) => {
|
|
330
|
+
return (0, primitives_js_1.remap)(v, {
|
|
331
|
+
"return_type": "returnType",
|
|
332
|
+
"chunk_size": "chunkSize",
|
|
333
|
+
"skip_window": "skipWindow",
|
|
334
|
+
"embedding_model": "embeddingModel",
|
|
335
|
+
});
|
|
336
|
+
});
|
|
337
|
+
/** @internal */
|
|
338
|
+
exports.SDPMChunkerStrategy$outboundSchema = z.object({
|
|
339
|
+
text: z.string(),
|
|
340
|
+
metadata: z.boolean().default(true),
|
|
341
|
+
returnType: exports.ChunkTextChunkingRequestKnowledgeRequestReturnType$outboundSchema
|
|
342
|
+
.default("chunks"),
|
|
343
|
+
strategy: exports.SDPMChunker$outboundSchema,
|
|
344
|
+
chunkSize: z.number().int().default(512),
|
|
345
|
+
skipWindow: z.number().int().default(1),
|
|
346
|
+
threshold: z.union([z.number(), exports.ChunkTextThreshold2$outboundSchema])
|
|
347
|
+
.optional(),
|
|
348
|
+
embeddingModel: z.string(),
|
|
349
|
+
mode: exports.ChunkingRequestMode$outboundSchema.default("window"),
|
|
350
|
+
}).transform((v) => {
|
|
351
|
+
return (0, primitives_js_1.remap)(v, {
|
|
352
|
+
returnType: "return_type",
|
|
353
|
+
chunkSize: "chunk_size",
|
|
354
|
+
skipWindow: "skip_window",
|
|
355
|
+
embeddingModel: "embedding_model",
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
/**
|
|
359
|
+
* @internal
|
|
360
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
361
|
+
*/
|
|
362
|
+
var SDPMChunkerStrategy$;
|
|
363
|
+
(function (SDPMChunkerStrategy$) {
|
|
364
|
+
/** @deprecated use `SDPMChunkerStrategy$inboundSchema` instead. */
|
|
365
|
+
SDPMChunkerStrategy$.inboundSchema = exports.SDPMChunkerStrategy$inboundSchema;
|
|
366
|
+
/** @deprecated use `SDPMChunkerStrategy$outboundSchema` instead. */
|
|
367
|
+
SDPMChunkerStrategy$.outboundSchema = exports.SDPMChunkerStrategy$outboundSchema;
|
|
368
|
+
})(SDPMChunkerStrategy$ || (exports.SDPMChunkerStrategy$ = SDPMChunkerStrategy$ = {}));
|
|
369
|
+
function sdpmChunkerStrategyToJSON(sdpmChunkerStrategy) {
|
|
370
|
+
return JSON.stringify(exports.SDPMChunkerStrategy$outboundSchema.parse(sdpmChunkerStrategy));
|
|
371
|
+
}
|
|
372
|
+
function sdpmChunkerStrategyFromJSON(jsonString) {
|
|
373
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SDPMChunkerStrategy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SDPMChunkerStrategy' from JSON`);
|
|
374
|
+
}
|
|
375
|
+
/** @internal */
|
|
376
|
+
exports.ChunkTextChunkingRequestKnowledgeReturnType$inboundSchema = z
|
|
377
|
+
.nativeEnum(exports.ChunkTextChunkingRequestKnowledgeReturnType);
|
|
378
|
+
/** @internal */
|
|
379
|
+
exports.ChunkTextChunkingRequestKnowledgeReturnType$outboundSchema = exports.ChunkTextChunkingRequestKnowledgeReturnType$inboundSchema;
|
|
380
|
+
/**
|
|
381
|
+
* @internal
|
|
382
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
383
|
+
*/
|
|
384
|
+
var ChunkTextChunkingRequestKnowledgeReturnType$;
|
|
385
|
+
(function (ChunkTextChunkingRequestKnowledgeReturnType$) {
|
|
386
|
+
/** @deprecated use `ChunkTextChunkingRequestKnowledgeReturnType$inboundSchema` instead. */
|
|
387
|
+
ChunkTextChunkingRequestKnowledgeReturnType$.inboundSchema = exports.ChunkTextChunkingRequestKnowledgeReturnType$inboundSchema;
|
|
388
|
+
/** @deprecated use `ChunkTextChunkingRequestKnowledgeReturnType$outboundSchema` instead. */
|
|
389
|
+
ChunkTextChunkingRequestKnowledgeReturnType$.outboundSchema = exports.ChunkTextChunkingRequestKnowledgeReturnType$outboundSchema;
|
|
390
|
+
})(ChunkTextChunkingRequestKnowledgeReturnType$ || (exports.ChunkTextChunkingRequestKnowledgeReturnType$ = ChunkTextChunkingRequestKnowledgeReturnType$ = {}));
|
|
391
|
+
/** @internal */
|
|
392
|
+
exports.SemanticChunker$inboundSchema = z.nativeEnum(exports.SemanticChunker);
|
|
393
|
+
/** @internal */
|
|
394
|
+
exports.SemanticChunker$outboundSchema = exports.SemanticChunker$inboundSchema;
|
|
395
|
+
/**
|
|
396
|
+
* @internal
|
|
397
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
398
|
+
*/
|
|
399
|
+
var SemanticChunker$;
|
|
400
|
+
(function (SemanticChunker$) {
|
|
401
|
+
/** @deprecated use `SemanticChunker$inboundSchema` instead. */
|
|
402
|
+
SemanticChunker$.inboundSchema = exports.SemanticChunker$inboundSchema;
|
|
403
|
+
/** @deprecated use `SemanticChunker$outboundSchema` instead. */
|
|
404
|
+
SemanticChunker$.outboundSchema = exports.SemanticChunker$outboundSchema;
|
|
405
|
+
})(SemanticChunker$ || (exports.SemanticChunker$ = SemanticChunker$ = {}));
|
|
406
|
+
/** @internal */
|
|
407
|
+
exports.Threshold2$inboundSchema = z
|
|
408
|
+
.nativeEnum(exports.Threshold2);
|
|
409
|
+
/** @internal */
|
|
410
|
+
exports.Threshold2$outboundSchema = exports.Threshold2$inboundSchema;
|
|
411
|
+
/**
|
|
412
|
+
* @internal
|
|
413
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
414
|
+
*/
|
|
415
|
+
var Threshold2$;
|
|
416
|
+
(function (Threshold2$) {
|
|
417
|
+
/** @deprecated use `Threshold2$inboundSchema` instead. */
|
|
418
|
+
Threshold2$.inboundSchema = exports.Threshold2$inboundSchema;
|
|
419
|
+
/** @deprecated use `Threshold2$outboundSchema` instead. */
|
|
420
|
+
Threshold2$.outboundSchema = exports.Threshold2$outboundSchema;
|
|
421
|
+
})(Threshold2$ || (exports.Threshold2$ = Threshold2$ = {}));
|
|
422
|
+
/** @internal */
|
|
423
|
+
exports.Threshold$inboundSchema = z.union([z.number(), exports.Threshold2$inboundSchema]);
|
|
424
|
+
/** @internal */
|
|
425
|
+
exports.Threshold$outboundSchema = z.union([z.number(), exports.Threshold2$outboundSchema]);
|
|
426
|
+
/**
|
|
427
|
+
* @internal
|
|
428
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
429
|
+
*/
|
|
430
|
+
var Threshold$;
|
|
431
|
+
(function (Threshold$) {
|
|
432
|
+
/** @deprecated use `Threshold$inboundSchema` instead. */
|
|
433
|
+
Threshold$.inboundSchema = exports.Threshold$inboundSchema;
|
|
434
|
+
/** @deprecated use `Threshold$outboundSchema` instead. */
|
|
435
|
+
Threshold$.outboundSchema = exports.Threshold$outboundSchema;
|
|
436
|
+
})(Threshold$ || (exports.Threshold$ = Threshold$ = {}));
|
|
437
|
+
function thresholdToJSON(threshold) {
|
|
438
|
+
return JSON.stringify(exports.Threshold$outboundSchema.parse(threshold));
|
|
439
|
+
}
|
|
440
|
+
function thresholdFromJSON(jsonString) {
|
|
441
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Threshold$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Threshold' from JSON`);
|
|
442
|
+
}
|
|
443
|
+
/** @internal */
|
|
444
|
+
exports.Mode$inboundSchema = z.nativeEnum(exports.Mode);
|
|
445
|
+
/** @internal */
|
|
446
|
+
exports.Mode$outboundSchema = exports.Mode$inboundSchema;
|
|
447
|
+
/**
|
|
448
|
+
* @internal
|
|
449
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
450
|
+
*/
|
|
451
|
+
var Mode$;
|
|
452
|
+
(function (Mode$) {
|
|
453
|
+
/** @deprecated use `Mode$inboundSchema` instead. */
|
|
454
|
+
Mode$.inboundSchema = exports.Mode$inboundSchema;
|
|
455
|
+
/** @deprecated use `Mode$outboundSchema` instead. */
|
|
456
|
+
Mode$.outboundSchema = exports.Mode$outboundSchema;
|
|
457
|
+
})(Mode$ || (exports.Mode$ = Mode$ = {}));
|
|
458
|
+
/** @internal */
|
|
459
|
+
exports.SemanticChunkerStrategy$inboundSchema = z.object({
|
|
460
|
+
text: z.string(),
|
|
461
|
+
metadata: z.boolean().default(true),
|
|
462
|
+
return_type: exports.ChunkTextChunkingRequestKnowledgeReturnType$inboundSchema
|
|
463
|
+
.default("chunks"),
|
|
464
|
+
strategy: exports.SemanticChunker$inboundSchema,
|
|
465
|
+
chunk_size: z.number().int().default(512),
|
|
466
|
+
threshold: z.union([z.number(), exports.Threshold2$inboundSchema]).optional(),
|
|
467
|
+
embedding_model: z.string(),
|
|
468
|
+
mode: exports.Mode$inboundSchema.default("window"),
|
|
469
|
+
similarity_window: z.number().int().default(1),
|
|
470
|
+
}).transform((v) => {
|
|
471
|
+
return (0, primitives_js_1.remap)(v, {
|
|
472
|
+
"return_type": "returnType",
|
|
473
|
+
"chunk_size": "chunkSize",
|
|
474
|
+
"embedding_model": "embeddingModel",
|
|
475
|
+
"similarity_window": "similarityWindow",
|
|
476
|
+
});
|
|
477
|
+
});
|
|
478
|
+
/** @internal */
|
|
479
|
+
exports.SemanticChunkerStrategy$outboundSchema = z.object({
|
|
480
|
+
text: z.string(),
|
|
481
|
+
metadata: z.boolean().default(true),
|
|
482
|
+
returnType: exports.ChunkTextChunkingRequestKnowledgeReturnType$outboundSchema
|
|
483
|
+
.default("chunks"),
|
|
484
|
+
strategy: exports.SemanticChunker$outboundSchema,
|
|
485
|
+
chunkSize: z.number().int().default(512),
|
|
486
|
+
threshold: z.union([z.number(), exports.Threshold2$outboundSchema]).optional(),
|
|
487
|
+
embeddingModel: z.string(),
|
|
488
|
+
mode: exports.Mode$outboundSchema.default("window"),
|
|
489
|
+
similarityWindow: z.number().int().default(1),
|
|
490
|
+
}).transform((v) => {
|
|
491
|
+
return (0, primitives_js_1.remap)(v, {
|
|
492
|
+
returnType: "return_type",
|
|
493
|
+
chunkSize: "chunk_size",
|
|
494
|
+
embeddingModel: "embedding_model",
|
|
495
|
+
similarityWindow: "similarity_window",
|
|
496
|
+
});
|
|
497
|
+
});
|
|
498
|
+
/**
|
|
499
|
+
* @internal
|
|
500
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
501
|
+
*/
|
|
502
|
+
var SemanticChunkerStrategy$;
|
|
503
|
+
(function (SemanticChunkerStrategy$) {
|
|
504
|
+
/** @deprecated use `SemanticChunkerStrategy$inboundSchema` instead. */
|
|
505
|
+
SemanticChunkerStrategy$.inboundSchema = exports.SemanticChunkerStrategy$inboundSchema;
|
|
506
|
+
/** @deprecated use `SemanticChunkerStrategy$outboundSchema` instead. */
|
|
507
|
+
SemanticChunkerStrategy$.outboundSchema = exports.SemanticChunkerStrategy$outboundSchema;
|
|
508
|
+
})(SemanticChunkerStrategy$ || (exports.SemanticChunkerStrategy$ = SemanticChunkerStrategy$ = {}));
|
|
509
|
+
function semanticChunkerStrategyToJSON(semanticChunkerStrategy) {
|
|
510
|
+
return JSON.stringify(exports.SemanticChunkerStrategy$outboundSchema.parse(semanticChunkerStrategy));
|
|
511
|
+
}
|
|
512
|
+
function semanticChunkerStrategyFromJSON(jsonString) {
|
|
513
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SemanticChunkerStrategy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SemanticChunkerStrategy' from JSON`);
|
|
514
|
+
}
|
|
515
|
+
/** @internal */
|
|
516
|
+
exports.ChunkTextChunkingRequestReturnType$inboundSchema = z.nativeEnum(exports.ChunkTextChunkingRequestReturnType);
|
|
517
|
+
/** @internal */
|
|
518
|
+
exports.ChunkTextChunkingRequestReturnType$outboundSchema = exports.ChunkTextChunkingRequestReturnType$inboundSchema;
|
|
519
|
+
/**
|
|
520
|
+
* @internal
|
|
521
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
522
|
+
*/
|
|
523
|
+
var ChunkTextChunkingRequestReturnType$;
|
|
524
|
+
(function (ChunkTextChunkingRequestReturnType$) {
|
|
525
|
+
/** @deprecated use `ChunkTextChunkingRequestReturnType$inboundSchema` instead. */
|
|
526
|
+
ChunkTextChunkingRequestReturnType$.inboundSchema = exports.ChunkTextChunkingRequestReturnType$inboundSchema;
|
|
527
|
+
/** @deprecated use `ChunkTextChunkingRequestReturnType$outboundSchema` instead. */
|
|
528
|
+
ChunkTextChunkingRequestReturnType$.outboundSchema = exports.ChunkTextChunkingRequestReturnType$outboundSchema;
|
|
529
|
+
})(ChunkTextChunkingRequestReturnType$ || (exports.ChunkTextChunkingRequestReturnType$ = ChunkTextChunkingRequestReturnType$ = {}));
|
|
530
|
+
/** @internal */
|
|
531
|
+
exports.RecursiveChunker$inboundSchema = z.nativeEnum(exports.RecursiveChunker);
|
|
532
|
+
/** @internal */
|
|
533
|
+
exports.RecursiveChunker$outboundSchema = exports.RecursiveChunker$inboundSchema;
|
|
534
|
+
/**
|
|
535
|
+
* @internal
|
|
536
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
537
|
+
*/
|
|
538
|
+
var RecursiveChunker$;
|
|
539
|
+
(function (RecursiveChunker$) {
|
|
540
|
+
/** @deprecated use `RecursiveChunker$inboundSchema` instead. */
|
|
541
|
+
RecursiveChunker$.inboundSchema = exports.RecursiveChunker$inboundSchema;
|
|
542
|
+
/** @deprecated use `RecursiveChunker$outboundSchema` instead. */
|
|
543
|
+
RecursiveChunker$.outboundSchema = exports.RecursiveChunker$outboundSchema;
|
|
544
|
+
})(RecursiveChunker$ || (exports.RecursiveChunker$ = RecursiveChunker$ = {}));
|
|
545
|
+
/** @internal */
|
|
546
|
+
exports.RecursiveChunkerStrategy$inboundSchema = z.object({
|
|
547
|
+
text: z.string(),
|
|
548
|
+
metadata: z.boolean().default(true),
|
|
549
|
+
return_type: exports.ChunkTextChunkingRequestReturnType$inboundSchema.default("chunks"),
|
|
550
|
+
strategy: exports.RecursiveChunker$inboundSchema,
|
|
551
|
+
chunk_size: z.number().int().default(512),
|
|
552
|
+
separators: z.array(z.string()).optional(),
|
|
553
|
+
min_characters_per_chunk: z.number().int().default(24),
|
|
554
|
+
}).transform((v) => {
|
|
555
|
+
return (0, primitives_js_1.remap)(v, {
|
|
556
|
+
"return_type": "returnType",
|
|
557
|
+
"chunk_size": "chunkSize",
|
|
558
|
+
"min_characters_per_chunk": "minCharactersPerChunk",
|
|
559
|
+
});
|
|
560
|
+
});
|
|
561
|
+
/** @internal */
|
|
562
|
+
exports.RecursiveChunkerStrategy$outboundSchema = z.object({
|
|
563
|
+
text: z.string(),
|
|
564
|
+
metadata: z.boolean().default(true),
|
|
565
|
+
returnType: exports.ChunkTextChunkingRequestReturnType$outboundSchema.default("chunks"),
|
|
566
|
+
strategy: exports.RecursiveChunker$outboundSchema,
|
|
567
|
+
chunkSize: z.number().int().default(512),
|
|
568
|
+
separators: z.array(z.string()).optional(),
|
|
569
|
+
minCharactersPerChunk: z.number().int().default(24),
|
|
570
|
+
}).transform((v) => {
|
|
571
|
+
return (0, primitives_js_1.remap)(v, {
|
|
572
|
+
returnType: "return_type",
|
|
573
|
+
chunkSize: "chunk_size",
|
|
574
|
+
minCharactersPerChunk: "min_characters_per_chunk",
|
|
575
|
+
});
|
|
576
|
+
});
|
|
577
|
+
/**
|
|
578
|
+
* @internal
|
|
579
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
580
|
+
*/
|
|
581
|
+
var RecursiveChunkerStrategy$;
|
|
582
|
+
(function (RecursiveChunkerStrategy$) {
|
|
583
|
+
/** @deprecated use `RecursiveChunkerStrategy$inboundSchema` instead. */
|
|
584
|
+
RecursiveChunkerStrategy$.inboundSchema = exports.RecursiveChunkerStrategy$inboundSchema;
|
|
585
|
+
/** @deprecated use `RecursiveChunkerStrategy$outboundSchema` instead. */
|
|
586
|
+
RecursiveChunkerStrategy$.outboundSchema = exports.RecursiveChunkerStrategy$outboundSchema;
|
|
587
|
+
})(RecursiveChunkerStrategy$ || (exports.RecursiveChunkerStrategy$ = RecursiveChunkerStrategy$ = {}));
|
|
588
|
+
function recursiveChunkerStrategyToJSON(recursiveChunkerStrategy) {
|
|
589
|
+
return JSON.stringify(exports.RecursiveChunkerStrategy$outboundSchema.parse(recursiveChunkerStrategy));
|
|
590
|
+
}
|
|
591
|
+
function recursiveChunkerStrategyFromJSON(jsonString) {
|
|
592
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RecursiveChunkerStrategy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RecursiveChunkerStrategy' from JSON`);
|
|
593
|
+
}
|
|
594
|
+
/** @internal */
|
|
595
|
+
exports.ChunkingRequestReturnType$inboundSchema = z.nativeEnum(exports.ChunkingRequestReturnType);
|
|
596
|
+
/** @internal */
|
|
597
|
+
exports.ChunkingRequestReturnType$outboundSchema = exports.ChunkingRequestReturnType$inboundSchema;
|
|
598
|
+
/**
|
|
599
|
+
* @internal
|
|
600
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
601
|
+
*/
|
|
602
|
+
var ChunkingRequestReturnType$;
|
|
603
|
+
(function (ChunkingRequestReturnType$) {
|
|
604
|
+
/** @deprecated use `ChunkingRequestReturnType$inboundSchema` instead. */
|
|
605
|
+
ChunkingRequestReturnType$.inboundSchema = exports.ChunkingRequestReturnType$inboundSchema;
|
|
606
|
+
/** @deprecated use `ChunkingRequestReturnType$outboundSchema` instead. */
|
|
607
|
+
ChunkingRequestReturnType$.outboundSchema = exports.ChunkingRequestReturnType$outboundSchema;
|
|
608
|
+
})(ChunkingRequestReturnType$ || (exports.ChunkingRequestReturnType$ = ChunkingRequestReturnType$ = {}));
|
|
609
|
+
/** @internal */
|
|
610
|
+
exports.SentenceChunker$inboundSchema = z.nativeEnum(exports.SentenceChunker);
|
|
611
|
+
/** @internal */
|
|
612
|
+
exports.SentenceChunker$outboundSchema = exports.SentenceChunker$inboundSchema;
|
|
613
|
+
/**
|
|
614
|
+
* @internal
|
|
615
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
616
|
+
*/
|
|
617
|
+
var SentenceChunker$;
|
|
618
|
+
(function (SentenceChunker$) {
|
|
619
|
+
/** @deprecated use `SentenceChunker$inboundSchema` instead. */
|
|
620
|
+
SentenceChunker$.inboundSchema = exports.SentenceChunker$inboundSchema;
|
|
621
|
+
/** @deprecated use `SentenceChunker$outboundSchema` instead. */
|
|
622
|
+
SentenceChunker$.outboundSchema = exports.SentenceChunker$outboundSchema;
|
|
623
|
+
})(SentenceChunker$ || (exports.SentenceChunker$ = SentenceChunker$ = {}));
|
|
624
|
+
/** @internal */
|
|
625
|
+
exports.SentenceChunkerStrategy$inboundSchema = z.object({
|
|
626
|
+
text: z.string(),
|
|
627
|
+
metadata: z.boolean().default(true),
|
|
628
|
+
return_type: exports.ChunkingRequestReturnType$inboundSchema.default("chunks"),
|
|
629
|
+
strategy: exports.SentenceChunker$inboundSchema,
|
|
630
|
+
chunk_size: z.number().int().default(512),
|
|
631
|
+
chunk_overlap: z.number().int().default(0),
|
|
632
|
+
min_sentences_per_chunk: z.number().int().default(1),
|
|
633
|
+
}).transform((v) => {
|
|
634
|
+
return (0, primitives_js_1.remap)(v, {
|
|
635
|
+
"return_type": "returnType",
|
|
636
|
+
"chunk_size": "chunkSize",
|
|
637
|
+
"chunk_overlap": "chunkOverlap",
|
|
638
|
+
"min_sentences_per_chunk": "minSentencesPerChunk",
|
|
639
|
+
});
|
|
640
|
+
});
|
|
641
|
+
/** @internal */
|
|
642
|
+
exports.SentenceChunkerStrategy$outboundSchema = z.object({
|
|
643
|
+
text: z.string(),
|
|
644
|
+
metadata: z.boolean().default(true),
|
|
645
|
+
returnType: exports.ChunkingRequestReturnType$outboundSchema.default("chunks"),
|
|
646
|
+
strategy: exports.SentenceChunker$outboundSchema,
|
|
647
|
+
chunkSize: z.number().int().default(512),
|
|
648
|
+
chunkOverlap: z.number().int().default(0),
|
|
649
|
+
minSentencesPerChunk: z.number().int().default(1),
|
|
650
|
+
}).transform((v) => {
|
|
651
|
+
return (0, primitives_js_1.remap)(v, {
|
|
652
|
+
returnType: "return_type",
|
|
653
|
+
chunkSize: "chunk_size",
|
|
654
|
+
chunkOverlap: "chunk_overlap",
|
|
655
|
+
minSentencesPerChunk: "min_sentences_per_chunk",
|
|
656
|
+
});
|
|
657
|
+
});
|
|
658
|
+
/**
|
|
659
|
+
* @internal
|
|
660
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
661
|
+
*/
|
|
662
|
+
var SentenceChunkerStrategy$;
|
|
663
|
+
(function (SentenceChunkerStrategy$) {
|
|
664
|
+
/** @deprecated use `SentenceChunkerStrategy$inboundSchema` instead. */
|
|
665
|
+
SentenceChunkerStrategy$.inboundSchema = exports.SentenceChunkerStrategy$inboundSchema;
|
|
666
|
+
/** @deprecated use `SentenceChunkerStrategy$outboundSchema` instead. */
|
|
667
|
+
SentenceChunkerStrategy$.outboundSchema = exports.SentenceChunkerStrategy$outboundSchema;
|
|
668
|
+
})(SentenceChunkerStrategy$ || (exports.SentenceChunkerStrategy$ = SentenceChunkerStrategy$ = {}));
|
|
669
|
+
function sentenceChunkerStrategyToJSON(sentenceChunkerStrategy) {
|
|
670
|
+
return JSON.stringify(exports.SentenceChunkerStrategy$outboundSchema.parse(sentenceChunkerStrategy));
|
|
671
|
+
}
|
|
672
|
+
function sentenceChunkerStrategyFromJSON(jsonString) {
|
|
673
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SentenceChunkerStrategy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SentenceChunkerStrategy' from JSON`);
|
|
674
|
+
}
|
|
675
|
+
/** @internal */
|
|
676
|
+
exports.ReturnTypeT$inboundSchema = z
|
|
677
|
+
.nativeEnum(exports.ReturnTypeT);
|
|
678
|
+
/** @internal */
|
|
679
|
+
exports.ReturnTypeT$outboundSchema = exports.ReturnTypeT$inboundSchema;
|
|
680
|
+
/**
|
|
681
|
+
* @internal
|
|
682
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
683
|
+
*/
|
|
684
|
+
var ReturnTypeT$;
|
|
685
|
+
(function (ReturnTypeT$) {
|
|
686
|
+
/** @deprecated use `ReturnTypeT$inboundSchema` instead. */
|
|
687
|
+
ReturnTypeT$.inboundSchema = exports.ReturnTypeT$inboundSchema;
|
|
688
|
+
/** @deprecated use `ReturnTypeT$outboundSchema` instead. */
|
|
689
|
+
ReturnTypeT$.outboundSchema = exports.ReturnTypeT$outboundSchema;
|
|
690
|
+
})(ReturnTypeT$ || (exports.ReturnTypeT$ = ReturnTypeT$ = {}));
|
|
691
|
+
/** @internal */
|
|
692
|
+
exports.TokenChunker$inboundSchema = z.nativeEnum(exports.TokenChunker);
|
|
693
|
+
/** @internal */
|
|
694
|
+
exports.TokenChunker$outboundSchema = exports.TokenChunker$inboundSchema;
|
|
695
|
+
/**
|
|
696
|
+
* @internal
|
|
697
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
698
|
+
*/
|
|
699
|
+
var TokenChunker$;
|
|
700
|
+
(function (TokenChunker$) {
|
|
701
|
+
/** @deprecated use `TokenChunker$inboundSchema` instead. */
|
|
702
|
+
TokenChunker$.inboundSchema = exports.TokenChunker$inboundSchema;
|
|
703
|
+
/** @deprecated use `TokenChunker$outboundSchema` instead. */
|
|
704
|
+
TokenChunker$.outboundSchema = exports.TokenChunker$outboundSchema;
|
|
705
|
+
})(TokenChunker$ || (exports.TokenChunker$ = TokenChunker$ = {}));
|
|
706
|
+
/** @internal */
|
|
707
|
+
exports.TokenChunkerStrategy$inboundSchema = z.object({
|
|
708
|
+
text: z.string(),
|
|
709
|
+
metadata: z.boolean().default(true),
|
|
710
|
+
return_type: exports.ReturnTypeT$inboundSchema.default("chunks"),
|
|
711
|
+
strategy: exports.TokenChunker$inboundSchema,
|
|
712
|
+
chunk_size: z.number().int().default(512),
|
|
713
|
+
chunk_overlap: z.number().int().default(0),
|
|
714
|
+
}).transform((v) => {
|
|
715
|
+
return (0, primitives_js_1.remap)(v, {
|
|
716
|
+
"return_type": "returnType",
|
|
717
|
+
"chunk_size": "chunkSize",
|
|
718
|
+
"chunk_overlap": "chunkOverlap",
|
|
719
|
+
});
|
|
720
|
+
});
|
|
721
|
+
/** @internal */
|
|
722
|
+
exports.TokenChunkerStrategy$outboundSchema = z.object({
|
|
723
|
+
text: z.string(),
|
|
724
|
+
metadata: z.boolean().default(true),
|
|
725
|
+
returnType: exports.ReturnTypeT$outboundSchema.default("chunks"),
|
|
726
|
+
strategy: exports.TokenChunker$outboundSchema,
|
|
727
|
+
chunkSize: z.number().int().default(512),
|
|
728
|
+
chunkOverlap: z.number().int().default(0),
|
|
729
|
+
}).transform((v) => {
|
|
730
|
+
return (0, primitives_js_1.remap)(v, {
|
|
731
|
+
returnType: "return_type",
|
|
732
|
+
chunkSize: "chunk_size",
|
|
733
|
+
chunkOverlap: "chunk_overlap",
|
|
734
|
+
});
|
|
735
|
+
});
|
|
736
|
+
/**
|
|
737
|
+
* @internal
|
|
738
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
739
|
+
*/
|
|
740
|
+
var TokenChunkerStrategy$;
|
|
741
|
+
(function (TokenChunkerStrategy$) {
|
|
742
|
+
/** @deprecated use `TokenChunkerStrategy$inboundSchema` instead. */
|
|
743
|
+
TokenChunkerStrategy$.inboundSchema = exports.TokenChunkerStrategy$inboundSchema;
|
|
744
|
+
/** @deprecated use `TokenChunkerStrategy$outboundSchema` instead. */
|
|
745
|
+
TokenChunkerStrategy$.outboundSchema = exports.TokenChunkerStrategy$outboundSchema;
|
|
746
|
+
})(TokenChunkerStrategy$ || (exports.TokenChunkerStrategy$ = TokenChunkerStrategy$ = {}));
|
|
747
|
+
function tokenChunkerStrategyToJSON(tokenChunkerStrategy) {
|
|
748
|
+
return JSON.stringify(exports.TokenChunkerStrategy$outboundSchema.parse(tokenChunkerStrategy));
|
|
749
|
+
}
|
|
750
|
+
function tokenChunkerStrategyFromJSON(jsonString) {
|
|
751
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TokenChunkerStrategy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TokenChunkerStrategy' from JSON`);
|
|
752
|
+
}
|
|
753
|
+
/** @internal */
|
|
754
|
+
exports.ChunkTextChunkingRequest$inboundSchema = z.union([
|
|
755
|
+
z.lazy(() => exports.SemanticChunkerStrategy$inboundSchema),
|
|
756
|
+
z.lazy(() => exports.SDPMChunkerStrategy$inboundSchema),
|
|
757
|
+
z.lazy(() => exports.AgenticChunkerStrategy$inboundSchema),
|
|
758
|
+
z.lazy(() => exports.TokenChunkerStrategy$inboundSchema),
|
|
759
|
+
z.lazy(() => exports.SentenceChunkerStrategy$inboundSchema),
|
|
760
|
+
z.lazy(() => exports.RecursiveChunkerStrategy$inboundSchema),
|
|
761
|
+
]);
|
|
762
|
+
/** @internal */
|
|
763
|
+
exports.ChunkTextChunkingRequest$outboundSchema = z.union([
|
|
764
|
+
z.lazy(() => exports.SemanticChunkerStrategy$outboundSchema),
|
|
765
|
+
z.lazy(() => exports.SDPMChunkerStrategy$outboundSchema),
|
|
766
|
+
z.lazy(() => exports.AgenticChunkerStrategy$outboundSchema),
|
|
767
|
+
z.lazy(() => exports.TokenChunkerStrategy$outboundSchema),
|
|
768
|
+
z.lazy(() => exports.SentenceChunkerStrategy$outboundSchema),
|
|
769
|
+
z.lazy(() => exports.RecursiveChunkerStrategy$outboundSchema),
|
|
770
|
+
]);
|
|
771
|
+
/**
|
|
772
|
+
* @internal
|
|
773
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
774
|
+
*/
|
|
775
|
+
var ChunkTextChunkingRequest$;
|
|
776
|
+
(function (ChunkTextChunkingRequest$) {
|
|
777
|
+
/** @deprecated use `ChunkTextChunkingRequest$inboundSchema` instead. */
|
|
778
|
+
ChunkTextChunkingRequest$.inboundSchema = exports.ChunkTextChunkingRequest$inboundSchema;
|
|
779
|
+
/** @deprecated use `ChunkTextChunkingRequest$outboundSchema` instead. */
|
|
780
|
+
ChunkTextChunkingRequest$.outboundSchema = exports.ChunkTextChunkingRequest$outboundSchema;
|
|
781
|
+
})(ChunkTextChunkingRequest$ || (exports.ChunkTextChunkingRequest$ = ChunkTextChunkingRequest$ = {}));
|
|
782
|
+
function chunkTextChunkingRequestToJSON(chunkTextChunkingRequest) {
|
|
783
|
+
return JSON.stringify(exports.ChunkTextChunkingRequest$outboundSchema.parse(chunkTextChunkingRequest));
|
|
784
|
+
}
|
|
785
|
+
function chunkTextChunkingRequestFromJSON(jsonString) {
|
|
786
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ChunkTextChunkingRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChunkTextChunkingRequest' from JSON`);
|
|
787
|
+
}
|
|
788
|
+
/** @internal */
|
|
789
|
+
exports.ChunkTextMetadata$inboundSchema = z.object({
|
|
790
|
+
start_index: z.nullable(z.number()),
|
|
791
|
+
end_index: z.nullable(z.number()),
|
|
792
|
+
token_count: z.nullable(z.number()),
|
|
793
|
+
}).transform((v) => {
|
|
794
|
+
return (0, primitives_js_1.remap)(v, {
|
|
795
|
+
"start_index": "startIndex",
|
|
796
|
+
"end_index": "endIndex",
|
|
797
|
+
"token_count": "tokenCount",
|
|
798
|
+
});
|
|
799
|
+
});
|
|
800
|
+
/** @internal */
|
|
801
|
+
exports.ChunkTextMetadata$outboundSchema = z.object({
|
|
802
|
+
startIndex: z.nullable(z.number()),
|
|
803
|
+
endIndex: z.nullable(z.number()),
|
|
804
|
+
tokenCount: z.nullable(z.number()),
|
|
805
|
+
}).transform((v) => {
|
|
806
|
+
return (0, primitives_js_1.remap)(v, {
|
|
807
|
+
startIndex: "start_index",
|
|
808
|
+
endIndex: "end_index",
|
|
809
|
+
tokenCount: "token_count",
|
|
810
|
+
});
|
|
811
|
+
});
|
|
812
|
+
/**
|
|
813
|
+
* @internal
|
|
814
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
815
|
+
*/
|
|
816
|
+
var ChunkTextMetadata$;
|
|
817
|
+
(function (ChunkTextMetadata$) {
|
|
818
|
+
/** @deprecated use `ChunkTextMetadata$inboundSchema` instead. */
|
|
819
|
+
ChunkTextMetadata$.inboundSchema = exports.ChunkTextMetadata$inboundSchema;
|
|
820
|
+
/** @deprecated use `ChunkTextMetadata$outboundSchema` instead. */
|
|
821
|
+
ChunkTextMetadata$.outboundSchema = exports.ChunkTextMetadata$outboundSchema;
|
|
822
|
+
})(ChunkTextMetadata$ || (exports.ChunkTextMetadata$ = ChunkTextMetadata$ = {}));
|
|
823
|
+
function chunkTextMetadataToJSON(chunkTextMetadata) {
|
|
824
|
+
return JSON.stringify(exports.ChunkTextMetadata$outboundSchema.parse(chunkTextMetadata));
|
|
825
|
+
}
|
|
826
|
+
function chunkTextMetadataFromJSON(jsonString) {
|
|
827
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ChunkTextMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChunkTextMetadata' from JSON`);
|
|
828
|
+
}
|
|
829
|
+
/** @internal */
|
|
830
|
+
exports.Chunks$inboundSchema = z
|
|
831
|
+
.object({
|
|
832
|
+
text: z.string(),
|
|
833
|
+
index: z.number(),
|
|
834
|
+
metadata: z.lazy(() => exports.ChunkTextMetadata$inboundSchema).optional(),
|
|
835
|
+
});
|
|
836
|
+
/** @internal */
|
|
837
|
+
exports.Chunks$outboundSchema = z.object({
|
|
838
|
+
text: z.string(),
|
|
839
|
+
index: z.number(),
|
|
840
|
+
metadata: z.lazy(() => exports.ChunkTextMetadata$outboundSchema).optional(),
|
|
841
|
+
});
|
|
842
|
+
/**
|
|
843
|
+
* @internal
|
|
844
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
845
|
+
*/
|
|
846
|
+
var Chunks$;
|
|
847
|
+
(function (Chunks$) {
|
|
848
|
+
/** @deprecated use `Chunks$inboundSchema` instead. */
|
|
849
|
+
Chunks$.inboundSchema = exports.Chunks$inboundSchema;
|
|
850
|
+
/** @deprecated use `Chunks$outboundSchema` instead. */
|
|
851
|
+
Chunks$.outboundSchema = exports.Chunks$outboundSchema;
|
|
852
|
+
})(Chunks$ || (exports.Chunks$ = Chunks$ = {}));
|
|
853
|
+
function chunksToJSON(chunks) {
|
|
854
|
+
return JSON.stringify(exports.Chunks$outboundSchema.parse(chunks));
|
|
855
|
+
}
|
|
856
|
+
function chunksFromJSON(jsonString) {
|
|
857
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Chunks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Chunks' from JSON`);
|
|
858
|
+
}
|
|
859
|
+
/** @internal */
|
|
860
|
+
exports.ChunkTextResponseBody$inboundSchema = z.object({
|
|
861
|
+
chunks: z.array(z.lazy(() => exports.Chunks$inboundSchema)),
|
|
862
|
+
});
|
|
863
|
+
/** @internal */
|
|
864
|
+
exports.ChunkTextResponseBody$outboundSchema = z.object({
|
|
865
|
+
chunks: z.array(z.lazy(() => exports.Chunks$outboundSchema)),
|
|
866
|
+
});
|
|
867
|
+
/**
|
|
868
|
+
* @internal
|
|
869
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
870
|
+
*/
|
|
871
|
+
var ChunkTextResponseBody$;
|
|
872
|
+
(function (ChunkTextResponseBody$) {
|
|
873
|
+
/** @deprecated use `ChunkTextResponseBody$inboundSchema` instead. */
|
|
874
|
+
ChunkTextResponseBody$.inboundSchema = exports.ChunkTextResponseBody$inboundSchema;
|
|
875
|
+
/** @deprecated use `ChunkTextResponseBody$outboundSchema` instead. */
|
|
876
|
+
ChunkTextResponseBody$.outboundSchema = exports.ChunkTextResponseBody$outboundSchema;
|
|
877
|
+
})(ChunkTextResponseBody$ || (exports.ChunkTextResponseBody$ = ChunkTextResponseBody$ = {}));
|
|
878
|
+
function chunkTextResponseBodyToJSON(chunkTextResponseBody) {
|
|
879
|
+
return JSON.stringify(exports.ChunkTextResponseBody$outboundSchema.parse(chunkTextResponseBody));
|
|
880
|
+
}
|
|
881
|
+
function chunkTextResponseBodyFromJSON(jsonString) {
|
|
882
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ChunkTextResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChunkTextResponseBody' from JSON`);
|
|
883
|
+
}
|
|
884
|
+
//# sourceMappingURL=chunktext.js.map
|